Skip to content

Commit bce2eed

Browse files
feat: Adding basic type support for input, output and config (#46)
Signed-off-by: Janos Sarusi-Kis <janossk@cisco.com>
1 parent c823e93 commit bce2eed

File tree

1 file changed

+195
-13
lines changed

1 file changed

+195
-13
lines changed

openapi.json

Lines changed: 195 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"openapi": "3.1.1",
33
"info": {
44
"title": "Agent Connect Protocol",
5-
"version": "0.2.2"
5+
"version": "0.2.3"
66
},
77
"tags": [
88
{
@@ -1984,6 +1984,13 @@
19841984
"minimum": 0
19851985
}
19861986
}
1987+
},
1988+
{
1989+
"type": "integer",
1990+
"format": "int32",
1991+
"minimum": 0,
1992+
"description": "User's age"
1993+
19871994
}
19881995
]
19891996
},
@@ -2008,6 +2015,13 @@
20082015
"format": "int32",
20092016
"minimum": 0
20102017
}
2018+
},
2019+
{
2020+
"type": "integer",
2021+
"format": "int32",
2022+
"minimum": 0,
2023+
"description": "User's age"
2024+
20112025
}
20122026
]
20132027
},
@@ -2056,6 +2070,11 @@
20562070
"format": "int32",
20572071
"minimum": 0
20582072
}
2073+
},
2074+
{
2075+
"type": "integer",
2076+
"format": "int32",
2077+
"description": "An integer value"
20592078
}
20602079
]
20612080
},
@@ -2080,6 +2099,13 @@
20802099
"format": "int32",
20812100
"minimum": 0
20822101
}
2102+
},
2103+
{
2104+
"type": "integer",
2105+
"format": "int32",
2106+
"minimum": 0,
2107+
"description": "An integer value"
2108+
20832109
}
20842110
]
20852111
},
@@ -3089,39 +3115,195 @@
30893115
]
30903116
},
30913117
"InputSchema": {
3092-
"type": "object",
30933118
"title": "Input Schema",
3094-
"description": "The input to the agent. The schema is described in agent ACP descriptor under 'spec.thread_state'.'input'."
3119+
"description": "The input of the agent. The schema is described in agent ACP descriptor under 'spec.input'.",
3120+
"oneOf": [
3121+
{
3122+
"type": "object",
3123+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object"
3124+
},
3125+
{
3126+
"type": "string",
3127+
"description": "String input to the agent."
3128+
},
3129+
{
3130+
"type": "integer",
3131+
"description": "Integer input to the agent."
3132+
},
3133+
{
3134+
"type":"number",
3135+
"description": "Number input to the agent."
3136+
},
3137+
{
3138+
"type": "boolean",
3139+
"description": "Boolean input to the agent."
3140+
},
3141+
{
3142+
"type": "array",
3143+
"description": "Array input to the agent.",
3144+
"items": {}
3145+
}
3146+
]
30953147
},
30963148
"OutputSchema": {
3097-
"type": "object",
30983149
"title": "Output Schema",
3099-
"description": "The output of the agent. The schema is described in agent ACP descriptor under 'spec.output'."
3150+
"description": "The output of the agent. The schema is described in agent ACP descriptor under 'spec.output'.",
3151+
"oneOf": [
3152+
{
3153+
"type": "object",
3154+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object"
3155+
},
3156+
{
3157+
"type": "string",
3158+
"description": "String output to the agent."
3159+
},
3160+
{
3161+
"type": "integer",
3162+
"description": "Integer output to the agent."
3163+
},
3164+
{
3165+
"type":"number",
3166+
"description": "Number output to the agent."
3167+
},
3168+
{
3169+
"type": "boolean",
3170+
"description": "Boolean output to the agent."
3171+
},
3172+
{
3173+
"type": "array",
3174+
"description": "Array input to the agent.",
3175+
"items": {}
3176+
}
3177+
]
31003178
},
31013179
"ConfigSchema": {
3102-
"type": "object",
31033180
"title": "Config",
3104-
"description": "The configuration for this agent. The schema is described in agent ACP descriptor under 'spec.config'. If missing, default values are used."
3181+
"description": "The configuration for this agent. The schema is described in agent ACP descriptor under 'spec.config'. If missing, default values are used.",
3182+
"oneOf": [
3183+
{
3184+
"type": "object",
3185+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object"
3186+
},
3187+
{
3188+
"type": "string",
3189+
"description": "String config to the agent."
3190+
},
3191+
{
3192+
"type": "integer",
3193+
"description": "Integer config to the agent."
3194+
},
3195+
{
3196+
"type":"number",
3197+
"description": "Number config to the agent."
3198+
},
3199+
{
3200+
"type": "boolean",
3201+
"description": "Boolean config to the agent."
3202+
},
3203+
{
3204+
"type": "array",
3205+
"description": "Array input to the agent.",
3206+
"items": {}
3207+
}
3208+
]
31053209
},
31063210
"ThreadStateSchema": {
3107-
"type": "object",
31083211
"title": "Thread State Schema",
3109-
"description": "The thread state. The schema is described in agent ACP descriptor under 'spec.thread_state'."
3212+
"description": "The thread state. The schema is described in agent ACP descriptor under 'spec.thread_state'.",
3213+
"oneOf": [
3214+
{
3215+
"type": "object",
3216+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object"
3217+
},
3218+
{
3219+
"type": "string",
3220+
"description": "String thread state to the agent."
3221+
},
3222+
{
3223+
"type": "integer",
3224+
"description": "Integer thread state to the agent."
3225+
},
3226+
{
3227+
"type":"number",
3228+
"description": "Number thread state to the agent."
3229+
},
3230+
{
3231+
"type": "boolean",
3232+
"description": "Boolean thread state to the agent."
3233+
},
3234+
{
3235+
"type": "array",
3236+
"description": "Array input to the agent.",
3237+
"items": {}
3238+
}
3239+
]
31103240
},
31113241
"StreamUpdateSchema": {
31123242
"type": "object",
31133243
"title": "Stream Update Schema",
31143244
"description": "An update in the SSE event streaming where streaming mode is set to custom. The schema is described in agent ACP descriptor under 'spec.custom_streaming_update'."
31153245
},
31163246
"InterruptPayloadSchema": {
3117-
"type": "object",
31183247
"title": "Interrupt Payload",
3119-
"description": "This schema describes the interrupt payload. Actual schema describes a polimorphic object, which means a schema structured with `oneOf` and `discriminator`. The discriminator is the `interrupt_type`, while the schemas will be the ones defined in the agent spec under `interrupts`/`interrupt_payload` For example: oneOf:\n - $ref: '#/components/schemas/ApprovalInterruptPayload'\n - $ref: '#/components/schemas/QuestionInterruptPayload'\ndiscriminator:\n propertyName: interruput_type\n mapping:\n approval: '#/components/schemas/ApprovalInterruptPayload'\n question: '#/components/schemas/QuestionInterruptPayload'"
3248+
"description": "This schema describes the interrupt payload. Actual schema describes a polimorphic object, which means a schema structured with `oneOf` and `discriminator`. The discriminator is the `interrupt_type`, while the schemas will be the ones defined in the agent spec under `interrupts`/`interrupt_payload` For example: oneOf:\n - $ref: '#/components/schemas/ApprovalInterruptPayload'\n - $ref: '#/components/schemas/QuestionInterruptPayload'\ndiscriminator:\n propertyName: interruput_type\n mapping:\n approval: '#/components/schemas/ApprovalInterruptPayload'\n question: '#/components/schemas/QuestionInterruptPayload'",
3249+
"oneOf": [
3250+
{
3251+
"type": "object",
3252+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object"
3253+
},
3254+
{
3255+
"type": "string",
3256+
"description": "String interrupt to the agent."
3257+
},
3258+
{
3259+
"type": "integer",
3260+
"description": "Integer interrupt to the agent."
3261+
},
3262+
{
3263+
"type":"number",
3264+
"description": "Number interrupt to the agent."
3265+
},
3266+
{
3267+
"type": "boolean",
3268+
"description": "Boolean interrupt to the agent."
3269+
},
3270+
{
3271+
"type": "array",
3272+
"description": "Array input to the agent.",
3273+
"items": {}
3274+
}
3275+
]
31203276
},
31213277
"ResumePayloadSchema": {
3122-
"type": "object",
31233278
"title": "Resume Payload Schema",
3124-
"description": "This schema describes the resume payload after an interrupt. Actual schema describes a polimorphic object, which means a schema structured with `oneOf` and `discriminator`. The discriminator is the `interrupt_type`, while the schemas will be those defined in the agent spec under `interrupts`/`resume_payload` For example: oneOf:\n - $ref: '#/components/schemas/ApprovalResumePayload'\n - $ref: '#/components/schemas/QuestionResumePayload'\ndiscriminator:\n propertyName: interrupt_type\n mapping:\n approval: '#/components/schemas/ApprovalResumePayload'\n question: '#/components/schemas/QuestionResumePayload'"
3279+
"description": "This schema describes the resume payload after an interrupt. Actual schema describes a polimorphic object, which means a schema structured with `oneOf` and `discriminator`. The discriminator is the `interrupt_type`, while the schemas will be those defined in the agent spec under `interrupts`/`resume_payload` For example: oneOf:\n - $ref: '#/components/schemas/ApprovalResumePayload'\n - $ref: '#/components/schemas/QuestionResumePayload'\ndiscriminator:\n propertyName: interrupt_type\n mapping:\n approval: '#/components/schemas/ApprovalResumePayload'\n question: '#/components/schemas/QuestionResumePayload'",
3280+
"oneOf": [
3281+
{
3282+
"type": "object",
3283+
"description": "This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object"
3284+
},
3285+
{
3286+
"type": "string",
3287+
"description": "String resume to the agent."
3288+
},
3289+
{
3290+
"type": "integer",
3291+
"description": "Integer resume to the agent."
3292+
},
3293+
{
3294+
"type":"number",
3295+
"description": "Number resume to the agent."
3296+
},
3297+
{
3298+
"type": "boolean",
3299+
"description": "Boolean resume to the agent."
3300+
},
3301+
{
3302+
"type": "array",
3303+
"description": "Array input to the agent.",
3304+
"items": {}
3305+
}
3306+
]
31253307
}
31263308
}
31273309
}

0 commit comments

Comments
 (0)