@ailib-official/ai-protocol 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +6 -0
- package/README.md +415 -0
- package/dist/index.json +8 -0
- package/dist/v1/models/ai21.json +140 -0
- package/dist/v1/models/baichuan.json +138 -0
- package/dist/v1/models/cerebras.json +147 -0
- package/dist/v1/models/claude.json +114 -0
- package/dist/v1/models/cohere.json +235 -0
- package/dist/v1/models/deepinfra.json +43 -0
- package/dist/v1/models/deepseek-chat.json +55 -0
- package/dist/v1/models/doubao.json +197 -0
- package/dist/v1/models/ernie.json +223 -0
- package/dist/v1/models/fireworks.json +222 -0
- package/dist/v1/models/gemini.json +58 -0
- package/dist/v1/models/gpt.json +166 -0
- package/dist/v1/models/grok.json +138 -0
- package/dist/v1/models/huggingface.json +183 -0
- package/dist/v1/models/hunyuan.json +255 -0
- package/dist/v1/models/jina.json +139 -0
- package/dist/v1/models/lepton.json +188 -0
- package/dist/v1/models/llama.json +143 -0
- package/dist/v1/models/minimax.json +194 -0
- package/dist/v1/models/mistral.json +177 -0
- package/dist/v1/models/moonshot.json +144 -0
- package/dist/v1/models/nvidia.json +212 -0
- package/dist/v1/models/palmyra.json +103 -0
- package/dist/v1/models/perplexity.json +143 -0
- package/dist/v1/models/qwen.json +49 -0
- package/dist/v1/models/replicate.json +206 -0
- package/dist/v1/models/sensenova.json +144 -0
- package/dist/v1/models/siliconflow.json +44 -0
- package/dist/v1/models/spark.json +173 -0
- package/dist/v1/models/stable-diffusion.json +161 -0
- package/dist/v1/models/tiangong.json +169 -0
- package/dist/v1/models/together.json +43 -0
- package/dist/v1/models/yi.json +199 -0
- package/dist/v1/models/zhipu.json +250 -0
- package/dist/v1/providers/ai21.json +215 -0
- package/dist/v1/providers/anthropic.json +253 -0
- package/dist/v1/providers/anyscale.json +115 -0
- package/dist/v1/providers/azure.json +188 -0
- package/dist/v1/providers/baichuan.json +205 -0
- package/dist/v1/providers/baidu.json +205 -0
- package/dist/v1/providers/cerebras.json +216 -0
- package/dist/v1/providers/cohere.json +209 -0
- package/dist/v1/providers/deepinfra.json +196 -0
- package/dist/v1/providers/deepseek.json +221 -0
- package/dist/v1/providers/doubao.json +209 -0
- package/dist/v1/providers/fireworks.json +227 -0
- package/dist/v1/providers/gemini.json +279 -0
- package/dist/v1/providers/groq.json +218 -0
- package/dist/v1/providers/huggingface.json +181 -0
- package/dist/v1/providers/hunyuan.json +198 -0
- package/dist/v1/providers/jina.json +202 -0
- package/dist/v1/providers/lepton.json +221 -0
- package/dist/v1/providers/minimax.json +209 -0
- package/dist/v1/providers/mistral.json +214 -0
- package/dist/v1/providers/moonshot.json +214 -0
- package/dist/v1/providers/nvidia.json +213 -0
- package/dist/v1/providers/openai.json +267 -0
- package/dist/v1/providers/openrouter.json +220 -0
- package/dist/v1/providers/perplexity.json +172 -0
- package/dist/v1/providers/qwen.json +231 -0
- package/dist/v1/providers/replicate.json +192 -0
- package/dist/v1/providers/sensenova.json +185 -0
- package/dist/v1/providers/siliconflow.json +197 -0
- package/dist/v1/providers/spark.json +204 -0
- package/dist/v1/providers/stability.json +221 -0
- package/dist/v1/providers/tiangong.json +207 -0
- package/dist/v1/providers/together.json +196 -0
- package/dist/v1/providers/writer.json +253 -0
- package/dist/v1/providers/xai.json +238 -0
- package/dist/v1/providers/yi.json +205 -0
- package/dist/v1/providers/zhipu.json +208 -0
- package/dist/v1/spec.json +783 -0
- package/dist/v2/providers/anthropic.json +372 -0
- package/dist/v2/providers/cohere.json +109 -0
- package/dist/v2/providers/deepseek.json +272 -0
- package/dist/v2/providers/doubao.json +260 -0
- package/dist/v2/providers/google.json +388 -0
- package/dist/v2/providers/jina.json +71 -0
- package/dist/v2/providers/moonshot.json +284 -0
- package/dist/v2/providers/openai.json +419 -0
- package/dist/v2/providers/qwen.json +274 -0
- package/dist/v2/providers/zhipu.json +257 -0
- package/dist/v2-alpha/providers/anthropic.json +182 -0
- package/dist/v2-alpha/providers/gemini.json +187 -0
- package/dist/v2-alpha/providers/openai.json +215 -0
- package/dist/v2-alpha/spec.json +644 -0
- package/package.json +61 -0
- package/schemas/spec.json +186 -0
- package/schemas/v1.json +1116 -0
- package/schemas/v2/availability.json +66 -0
- package/schemas/v2/capabilities.json +182 -0
- package/schemas/v2/capability-profile.json +174 -0
- package/schemas/v2/computer-use.json +222 -0
- package/schemas/v2/context-policy.json +148 -0
- package/schemas/v2/endpoint.json +2 -0
- package/schemas/v2/error-codes.yaml +225 -0
- package/schemas/v2/errors.json +250 -0
- package/schemas/v2/execution-metadata.json +59 -0
- package/schemas/v2/mcp.json +225 -0
- package/schemas/v2/message-roles.json +10 -0
- package/schemas/v2/multimodal.json +297 -0
- package/schemas/v2/pricing.json +14 -0
- package/schemas/v2/provider-contract.json +317 -0
- package/schemas/v2/provider.json +203 -0
- package/schemas/v2/regions.json +14 -0
- package/v1/models/ai21.yaml +97 -0
- package/v1/models/baichuan.yaml +95 -0
- package/v1/models/cerebras.yaml +99 -0
- package/v1/models/claude.yaml +59 -0
- package/v1/models/cohere.yaml +165 -0
- package/v1/models/deepinfra.yaml +29 -0
- package/v1/models/deepseek-chat.yaml +32 -0
- package/v1/models/doubao.yaml +129 -0
- package/v1/models/ernie.yaml +146 -0
- package/v1/models/fireworks.yaml +145 -0
- package/v1/models/gemini.yaml +32 -0
- package/v1/models/gpt.yaml +90 -0
- package/v1/models/grok.yaml +74 -0
- package/v1/models/huggingface.yaml +110 -0
- package/v1/models/hunyuan.yaml +164 -0
- package/v1/models/jina.yaml +98 -0
- package/v1/models/lepton.yaml +130 -0
- package/v1/models/llama.yaml +91 -0
- package/v1/models/minimax.yaml +132 -0
- package/v1/models/mistral.yaml +100 -0
- package/v1/models/moonshot.yaml +97 -0
- package/v1/models/nvidia.yaml +118 -0
- package/v1/models/palmyra.yaml +59 -0
- package/v1/models/perplexity.yaml +97 -0
- package/v1/models/qwen.yaml +27 -0
- package/v1/models/replicate.yaml +136 -0
- package/v1/models/sensenova.yaml +97 -0
- package/v1/models/siliconflow.yaml +29 -0
- package/v1/models/spark.yaml +114 -0
- package/v1/models/stable-diffusion.yaml +113 -0
- package/v1/models/tiangong.yaml +114 -0
- package/v1/models/together.yaml +29 -0
- package/v1/models/yi.yaml +132 -0
- package/v1/models/zhipu.yaml +163 -0
- package/v1/providers/ai21.yaml +176 -0
- package/v1/providers/anthropic.yaml +209 -0
- package/v1/providers/anyscale.yaml +106 -0
- package/v1/providers/azure.yaml +155 -0
- package/v1/providers/baichuan.yaml +168 -0
- package/v1/providers/baidu.yaml +173 -0
- package/v1/providers/cerebras.yaml +178 -0
- package/v1/providers/cohere.yaml +175 -0
- package/v1/providers/deepinfra.yaml +156 -0
- package/v1/providers/deepseek.yaml +189 -0
- package/v1/providers/doubao.yaml +172 -0
- package/v1/providers/fireworks.yaml +187 -0
- package/v1/providers/gemini.yaml +229 -0
- package/v1/providers/groq.yaml +181 -0
- package/v1/providers/huggingface.yaml +157 -0
- package/v1/providers/hunyuan.yaml +162 -0
- package/v1/providers/jina.yaml +171 -0
- package/v1/providers/lepton.yaml +183 -0
- package/v1/providers/minimax.yaml +172 -0
- package/v1/providers/mistral.yaml +186 -0
- package/v1/providers/moonshot.yaml +176 -0
- package/v1/providers/nvidia.yaml +172 -0
- package/v1/providers/openai.yaml +224 -0
- package/v1/providers/openrouter.yaml +181 -0
- package/v1/providers/perplexity.yaml +144 -0
- package/v1/providers/qwen.yaml +192 -0
- package/v1/providers/replicate.yaml +159 -0
- package/v1/providers/sensenova.yaml +153 -0
- package/v1/providers/siliconflow.yaml +156 -0
- package/v1/providers/spark.yaml +167 -0
- package/v1/providers/stability.yaml +185 -0
- package/v1/providers/tiangong.yaml +170 -0
- package/v1/providers/together.yaml +156 -0
- package/v1/providers/writer.yaml +212 -0
- package/v1/providers/xai.yaml +206 -0
- package/v1/providers/yi.yaml +168 -0
- package/v1/providers/zhipu.yaml +171 -0
- package/v1/spec.yaml +637 -0
- package/v2/providers/anthropic.yaml +244 -0
- package/v2/providers/cohere.yaml +75 -0
- package/v2/providers/deepseek.yaml +176 -0
- package/v2/providers/doubao.yaml +169 -0
- package/v2/providers/google.yaml +245 -0
- package/v2/providers/jina.yaml +55 -0
- package/v2/providers/moonshot.yaml +186 -0
- package/v2/providers/openai.yaml +266 -0
- package/v2/providers/qwen.yaml +174 -0
- package/v2/providers/zhipu.yaml +176 -0
- package/v2-alpha/providers/anthropic.yaml +134 -0
- package/v2-alpha/providers/gemini.yaml +144 -0
- package/v2-alpha/providers/openai.yaml +154 -0
- package/v2-alpha/spec.yaml +512 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/ailib-official/ai-protocol/main/schemas/v2/availability.json",
|
|
4
|
+
"title": "Availability and Health Check",
|
|
5
|
+
"description": "Provider availability configuration and health check definition",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["required", "regions", "check"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"required": {
|
|
10
|
+
"type": "boolean",
|
|
11
|
+
"description": "Whether the provider must be reachable at runtime startup"
|
|
12
|
+
},
|
|
13
|
+
"regions": {
|
|
14
|
+
"$ref": "./regions.json"
|
|
15
|
+
},
|
|
16
|
+
"interval_ms": {
|
|
17
|
+
"type": "integer",
|
|
18
|
+
"minimum": 1000,
|
|
19
|
+
"description": "Suggested health check interval in milliseconds (runtime may override)"
|
|
20
|
+
},
|
|
21
|
+
"fallback": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"description": "Optional fallback check when primary check fails (e.g., POST ping)",
|
|
24
|
+
"properties": {
|
|
25
|
+
"method": { "type": "string", "enum": ["GET", "POST"] },
|
|
26
|
+
"path": { "type": "string", "pattern": "^/" },
|
|
27
|
+
"expected_status": { "type": "array", "items": { "type": "integer" } }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"check": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"required": ["method", "path", "expected_status"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"method": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": ["HEAD", "GET"],
|
|
37
|
+
"description": "HTTP method for health check"
|
|
38
|
+
},
|
|
39
|
+
"path": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"pattern": "^/",
|
|
42
|
+
"description": "Path relative to base_url for health check"
|
|
43
|
+
},
|
|
44
|
+
"expected_status": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"minItems": 1,
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "integer",
|
|
49
|
+
"minimum": 100,
|
|
50
|
+
"maximum": 599
|
|
51
|
+
},
|
|
52
|
+
"description": "HTTP status codes that indicate healthy state"
|
|
53
|
+
},
|
|
54
|
+
"timeout_ms": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"minimum": 100,
|
|
57
|
+
"default": 3000,
|
|
58
|
+
"description": "Timeout for health check in milliseconds"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"additionalProperties": false
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"additionalProperties": false
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/ailib-official/ai-protocol/main/schemas/v2/capabilities.json",
|
|
4
|
+
"title": "AI-Protocol Capability Declaration",
|
|
5
|
+
"description": "Structured capability declaration for V2 provider manifests. Defines required and optional capabilities that a provider supports, enabling capability-based loading in runtimes.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"oneOf": [
|
|
8
|
+
{
|
|
9
|
+
"description": "V2 structured format with required/optional separation",
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": ["required"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"required": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"description": "Capabilities that MUST be available for this provider to function",
|
|
16
|
+
"items": { "$ref": "#/$defs/capability_name" },
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"uniqueItems": true
|
|
19
|
+
},
|
|
20
|
+
"optional": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"description": "Capabilities that MAY be available and can be loaded on demand",
|
|
23
|
+
"items": { "$ref": "#/$defs/capability_name" },
|
|
24
|
+
"uniqueItems": true,
|
|
25
|
+
"default": []
|
|
26
|
+
},
|
|
27
|
+
"feature_flags": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"description": "Fine-grained feature toggles within capabilities",
|
|
30
|
+
"properties": {
|
|
31
|
+
"structured_output": {
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"default": false,
|
|
34
|
+
"description": "Supports JSON mode / schema-constrained output"
|
|
35
|
+
},
|
|
36
|
+
"parallel_tool_calls": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"default": false,
|
|
39
|
+
"description": "Supports parallel tool invocations in a single response"
|
|
40
|
+
},
|
|
41
|
+
"extended_thinking": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"default": false,
|
|
44
|
+
"description": "Supports extended reasoning / thinking blocks"
|
|
45
|
+
},
|
|
46
|
+
"streaming_usage": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"default": false,
|
|
49
|
+
"description": "Reports token usage during streaming"
|
|
50
|
+
},
|
|
51
|
+
"system_messages": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"default": true,
|
|
54
|
+
"description": "Supports system role messages"
|
|
55
|
+
},
|
|
56
|
+
"image_generation": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"default": false,
|
|
59
|
+
"description": "Supports image generation"
|
|
60
|
+
},
|
|
61
|
+
"json_mode": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"default": false,
|
|
64
|
+
"description": "Supports JSON mode for constrained output generation"
|
|
65
|
+
},
|
|
66
|
+
"json_schema_mode": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"default": false,
|
|
69
|
+
"description": "Supports JSON schema-constrained output generation"
|
|
70
|
+
},
|
|
71
|
+
"reasoning_tokens": {
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"default": false,
|
|
74
|
+
"description": "Reports reasoning/thinking tokens separately in usage metadata"
|
|
75
|
+
},
|
|
76
|
+
"streaming_tool_calls": {
|
|
77
|
+
"type": "boolean",
|
|
78
|
+
"default": false,
|
|
79
|
+
"description": "Supports tool call streaming with incremental argument chunks"
|
|
80
|
+
},
|
|
81
|
+
"recursive_tool_calls": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"default": false,
|
|
84
|
+
"description": "Supports multi-turn recursive tool calling without client re-prompting"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"additionalProperties": {
|
|
88
|
+
"type": "boolean"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"additionalProperties": false
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"description": "V1 legacy format - simple boolean flags (backward compatible)",
|
|
96
|
+
"type": "object",
|
|
97
|
+
"properties": {
|
|
98
|
+
"streaming": {
|
|
99
|
+
"type": "boolean",
|
|
100
|
+
"description": "Supports streaming responses"
|
|
101
|
+
},
|
|
102
|
+
"tools": {
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"description": "Supports tool / function calling"
|
|
105
|
+
},
|
|
106
|
+
"vision": {
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"description": "Supports image or multimodal inputs"
|
|
109
|
+
},
|
|
110
|
+
"agentic": {
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"default": false,
|
|
113
|
+
"description": "Supports agentic reasoning and multi-turn tool sequences"
|
|
114
|
+
},
|
|
115
|
+
"reasoning": {
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"default": false,
|
|
118
|
+
"description": "Supports extended reasoning / thinking blocks"
|
|
119
|
+
},
|
|
120
|
+
"parallel_tools": {
|
|
121
|
+
"type": "boolean",
|
|
122
|
+
"default": false,
|
|
123
|
+
"description": "Supports parallel tool invocations"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"additionalProperties": false
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"$defs": {
|
|
130
|
+
"capability_name": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"description": "Standard capability identifier",
|
|
133
|
+
"enum": [
|
|
134
|
+
"text",
|
|
135
|
+
"streaming",
|
|
136
|
+
"vision",
|
|
137
|
+
"audio",
|
|
138
|
+
"video",
|
|
139
|
+
"tools",
|
|
140
|
+
"parallel_tools",
|
|
141
|
+
"agentic",
|
|
142
|
+
"reasoning",
|
|
143
|
+
"embeddings",
|
|
144
|
+
"structured_output",
|
|
145
|
+
"batch",
|
|
146
|
+
"image_generation",
|
|
147
|
+
"computer_use",
|
|
148
|
+
"mcp_client",
|
|
149
|
+
"mcp_server",
|
|
150
|
+
"stt",
|
|
151
|
+
"tts",
|
|
152
|
+
"rerank"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
"capability_module_mapping": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"description": "Reference: Maps capability names to runtime modules",
|
|
158
|
+
"properties": {
|
|
159
|
+
"text": { "const": "Core (always loaded)" },
|
|
160
|
+
"streaming": { "const": "streaming.*" },
|
|
161
|
+
"vision": { "const": "multimodal.vision" },
|
|
162
|
+
"audio": { "const": "multimodal.audio" },
|
|
163
|
+
"video": { "const": "multimodal.video" },
|
|
164
|
+
"tools": { "const": "tools.*" },
|
|
165
|
+
"parallel_tools": { "const": "tools.parallel" },
|
|
166
|
+
"agentic": { "const": "agentic.*" },
|
|
167
|
+
"reasoning": { "const": "reasoning.*" },
|
|
168
|
+
"embeddings": { "const": "embeddings.*" },
|
|
169
|
+
"structured_output": { "const": "structured.*" },
|
|
170
|
+
"batch": { "const": "batch.*" },
|
|
171
|
+
"image_generation": { "const": "generation.image" },
|
|
172
|
+
"computer_use": { "const": "computer_use.*" },
|
|
173
|
+
"mcp_client": { "const": "mcp.client" },
|
|
174
|
+
"mcp_server": { "const": "mcp.server" },
|
|
175
|
+
"stt": { "const": "stt.*" },
|
|
176
|
+
"tts": { "const": "tts.*" },
|
|
177
|
+
"rerank": { "const": "rerank.*" }
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/ailib-official/ai-protocol/main/schemas/v2/capability-profile.json",
|
|
4
|
+
"title": "AI-Protocol Capability Profile (Staged IOS/IOSPC Phase)",
|
|
5
|
+
"description": "Optional staged capability profile for governance. ios_v1 limits scope to Inputs/Outcomes/Systems. iospc_v1 introduces Process/Contract in report-first mode. Metadata-only and MUST NOT imply runtime behavioral changes by itself.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["phase"],
|
|
9
|
+
"allOf": [
|
|
10
|
+
{
|
|
11
|
+
"if": { "properties": { "phase": { "const": "ios_v1" } }, "required": ["phase"] },
|
|
12
|
+
"then": {
|
|
13
|
+
"anyOf": [
|
|
14
|
+
{ "required": ["inputs"] },
|
|
15
|
+
{ "required": ["outcomes"] },
|
|
16
|
+
{ "required": ["systems"] }
|
|
17
|
+
],
|
|
18
|
+
"not": {
|
|
19
|
+
"anyOf": [
|
|
20
|
+
{ "required": ["process"] },
|
|
21
|
+
{ "required": ["contract"] }
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"if": { "properties": { "phase": { "const": "iospc_v1" } }, "required": ["phase"] },
|
|
28
|
+
"then": {
|
|
29
|
+
"allOf": [
|
|
30
|
+
{
|
|
31
|
+
"anyOf": [
|
|
32
|
+
{ "required": ["inputs"] },
|
|
33
|
+
{ "required": ["outcomes"] },
|
|
34
|
+
{ "required": ["systems"] }
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"anyOf": [
|
|
39
|
+
{ "required": ["process"] },
|
|
40
|
+
{ "required": ["contract"] }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"properties": {
|
|
48
|
+
"phase": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"enum": ["ios_v1", "iospc_v1"],
|
|
51
|
+
"default": "ios_v1",
|
|
52
|
+
"description": "Staged rollout marker. ios_v1 enables Inputs/Outcomes/Systems only. iospc_v1 allows Process/Contract in report-first mode."
|
|
53
|
+
},
|
|
54
|
+
"inputs": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"description": "Input constraints and limits (I)",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"properties": {
|
|
59
|
+
"modalities": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"enum": ["text", "image", "audio", "video", "tool_result", "other"]
|
|
64
|
+
},
|
|
65
|
+
"uniqueItems": true
|
|
66
|
+
},
|
|
67
|
+
"max_references": {
|
|
68
|
+
"type": "integer",
|
|
69
|
+
"minimum": 0,
|
|
70
|
+
"maximum": 64
|
|
71
|
+
},
|
|
72
|
+
"max_payload_mb": {
|
|
73
|
+
"type": "number",
|
|
74
|
+
"minimum": 0,
|
|
75
|
+
"maximum": 2048
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"outcomes": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"description": "Semantic output declaration (O)",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"properties": {
|
|
84
|
+
"types": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"enum": [
|
|
89
|
+
"text_completion",
|
|
90
|
+
"structured_json",
|
|
91
|
+
"image_generation",
|
|
92
|
+
"video_generation",
|
|
93
|
+
"reasoning_trace",
|
|
94
|
+
"tool_call_sequence",
|
|
95
|
+
"other"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"uniqueItems": true
|
|
99
|
+
},
|
|
100
|
+
"quality_tier": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"enum": ["best_effort", "standard", "high"]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"systems": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"description": "External system dependencies (S)",
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"properties": {
|
|
111
|
+
"requires": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"enum": ["mcp", "search", "filesystem", "browser", "gis", "other"]
|
|
116
|
+
},
|
|
117
|
+
"uniqueItems": true
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"process": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"description": "Execution process declaration (P) for iospc_v1 only.",
|
|
124
|
+
"additionalProperties": false,
|
|
125
|
+
"properties": {
|
|
126
|
+
"mode": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"enum": ["sync", "async", "hybrid"]
|
|
129
|
+
},
|
|
130
|
+
"supports_callbacks": {
|
|
131
|
+
"type": "boolean"
|
|
132
|
+
},
|
|
133
|
+
"max_async_jobs": {
|
|
134
|
+
"type": "integer",
|
|
135
|
+
"minimum": 1,
|
|
136
|
+
"maximum": 100000
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"contract": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"description": "Execution contract declaration (C) for iospc_v1 only.",
|
|
143
|
+
"additionalProperties": false,
|
|
144
|
+
"properties": {
|
|
145
|
+
"safety_profile": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"enum": ["baseline", "standard", "strict"]
|
|
148
|
+
},
|
|
149
|
+
"cost_class": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"enum": ["low", "medium", "high", "premium"]
|
|
152
|
+
},
|
|
153
|
+
"error_model_ref": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"minLength": 1
|
|
156
|
+
},
|
|
157
|
+
"sla_tier": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"enum": ["best_effort", "standard", "enterprise"]
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"future_reserved": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"description": "Reserved names for future staged expansion.",
|
|
166
|
+
"items": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"enum": ["process", "contract"]
|
|
169
|
+
},
|
|
170
|
+
"default": ["process", "contract"],
|
|
171
|
+
"uniqueItems": true
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/ailib-official/ai-protocol/main/schemas/v2/computer-use.json",
|
|
4
|
+
"title": "AI-Protocol V2 Computer Use",
|
|
5
|
+
"description": "Computer Use capability configuration for V2 provider manifests. Standardizes how providers expose GUI automation and desktop interaction capabilities. Validated against Anthropic (screen_based, Beta), Google (tool_based, GA), and OpenAI (screen_based, Preview) implementations.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"supported": {
|
|
9
|
+
"type": "boolean",
|
|
10
|
+
"default": false,
|
|
11
|
+
"description": "Whether the provider supports computer use / GUI automation"
|
|
12
|
+
},
|
|
13
|
+
"status": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"enum": ["ga", "beta", "preview", "experimental"],
|
|
16
|
+
"description": "Maturity status of computer use support"
|
|
17
|
+
},
|
|
18
|
+
"implementation": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": ["screen_based", "tool_based", "hybrid"],
|
|
21
|
+
"description": "Implementation approach: screen_based (screenshot loop with coordinates), tool_based (structured semantic actions), hybrid (both approaches available)"
|
|
22
|
+
},
|
|
23
|
+
"actions": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"description": "Supported computer use actions —normalized across all implementations",
|
|
26
|
+
"properties": {
|
|
27
|
+
"screenshot": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"properties": {
|
|
30
|
+
"supported": { "type": "boolean", "default": true },
|
|
31
|
+
"formats": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": { "type": "string", "enum": ["png", "jpeg", "webp"] },
|
|
34
|
+
"minItems": 1,
|
|
35
|
+
"description": "Supported screenshot output formats"
|
|
36
|
+
},
|
|
37
|
+
"max_resolution": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"pattern": "^\\d+x\\d+$",
|
|
40
|
+
"description": "Maximum screenshot resolution (e.g. '4096x4096')"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
},
|
|
45
|
+
"mouse": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": {
|
|
48
|
+
"supported": { "type": "boolean", "default": true },
|
|
49
|
+
"operations": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"enum": ["click", "double_click", "right_click", "drag", "move", "scroll"]
|
|
54
|
+
},
|
|
55
|
+
"minItems": 1,
|
|
56
|
+
"uniqueItems": true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"additionalProperties": false
|
|
60
|
+
},
|
|
61
|
+
"keyboard": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"supported": { "type": "boolean", "default": true },
|
|
65
|
+
"operations": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"enum": ["type", "key_press", "key_release", "shortcut"]
|
|
70
|
+
},
|
|
71
|
+
"minItems": 1,
|
|
72
|
+
"uniqueItems": true
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": false
|
|
76
|
+
},
|
|
77
|
+
"browser": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"properties": {
|
|
80
|
+
"supported": { "type": "boolean", "default": false },
|
|
81
|
+
"operations": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"enum": ["navigate", "fill_form", "click_element", "scroll", "back", "forward", "refresh"]
|
|
86
|
+
},
|
|
87
|
+
"uniqueItems": true
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"additionalProperties": false
|
|
91
|
+
},
|
|
92
|
+
"zoom": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"properties": {
|
|
95
|
+
"supported": { "type": "boolean", "default": false },
|
|
96
|
+
"description": { "type": "string" }
|
|
97
|
+
},
|
|
98
|
+
"description": "Screen region zoom for detailed inspection (Anthropic computer_20251124)",
|
|
99
|
+
"additionalProperties": false
|
|
100
|
+
},
|
|
101
|
+
"file": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"properties": {
|
|
104
|
+
"supported": { "type": "boolean", "default": false },
|
|
105
|
+
"operations": {
|
|
106
|
+
"type": "array",
|
|
107
|
+
"items": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"enum": ["read", "write", "list", "delete", "move"]
|
|
110
|
+
},
|
|
111
|
+
"uniqueItems": true
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"description": "File system operations (primarily Google tool_based implementation)",
|
|
115
|
+
"additionalProperties": false
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"additionalProperties": false
|
|
119
|
+
},
|
|
120
|
+
"safety": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"description": "Safety configuration for computer use —mandatory safeguards",
|
|
123
|
+
"properties": {
|
|
124
|
+
"confirmation_required": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"default": true,
|
|
127
|
+
"description": "Require human confirmation for consequential actions"
|
|
128
|
+
},
|
|
129
|
+
"sandbox_mode": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"enum": ["required", "recommended", "optional"],
|
|
132
|
+
"default": "recommended",
|
|
133
|
+
"description": "Whether sandbox/VM environment is required"
|
|
134
|
+
},
|
|
135
|
+
"action_logging": {
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"default": true,
|
|
138
|
+
"description": "Whether all actions are logged for audit trail"
|
|
139
|
+
},
|
|
140
|
+
"domain_allowlist": {
|
|
141
|
+
"type": "boolean",
|
|
142
|
+
"default": false,
|
|
143
|
+
"description": "Whether domain allowlisting is supported for web browsing"
|
|
144
|
+
},
|
|
145
|
+
"sensitive_data_protection": {
|
|
146
|
+
"type": "boolean",
|
|
147
|
+
"default": true,
|
|
148
|
+
"description": "Whether the system avoids accessing sensitive data (passwords, PII)"
|
|
149
|
+
},
|
|
150
|
+
"max_actions_per_turn": {
|
|
151
|
+
"type": "integer",
|
|
152
|
+
"minimum": 1,
|
|
153
|
+
"description": "Maximum number of actions allowed per model turn"
|
|
154
|
+
},
|
|
155
|
+
"action_timeout_ms": {
|
|
156
|
+
"type": "integer",
|
|
157
|
+
"minimum": 1000,
|
|
158
|
+
"default": 30000,
|
|
159
|
+
"description": "Timeout for individual action execution"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"additionalProperties": false
|
|
163
|
+
},
|
|
164
|
+
"environment": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"description": "Supported execution environments",
|
|
167
|
+
"properties": {
|
|
168
|
+
"browser": {
|
|
169
|
+
"type": "boolean",
|
|
170
|
+
"default": true,
|
|
171
|
+
"description": "Browser-based environment (Playwright, Selenium, Puppeteer)"
|
|
172
|
+
},
|
|
173
|
+
"desktop": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"default": false,
|
|
176
|
+
"description": "Full desktop environment (VM, Docker, native OS)"
|
|
177
|
+
},
|
|
178
|
+
"display_config": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"properties": {
|
|
181
|
+
"width": { "type": "integer", "minimum": 320, "description": "Display width in pixels" },
|
|
182
|
+
"height": { "type": "integer", "minimum": 240, "description": "Display height in pixels" }
|
|
183
|
+
},
|
|
184
|
+
"additionalProperties": false
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"additionalProperties": false
|
|
188
|
+
},
|
|
189
|
+
"provider_mapping": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"description": "Provider-specific API configuration for computer use",
|
|
192
|
+
"properties": {
|
|
193
|
+
"tool_type": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"description": "Provider's tool type identifier (e.g. 'computer_20251124', 'computer_use_preview', 'computer_use')"
|
|
196
|
+
},
|
|
197
|
+
"beta_header": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"description": "Required beta header for the feature"
|
|
200
|
+
},
|
|
201
|
+
"api_endpoint": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"description": "Specific API endpoint for computer use (if different from main chat)"
|
|
204
|
+
},
|
|
205
|
+
"model_requirement": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"description": "Specific model required for computer use (e.g. 'computer-use-preview')"
|
|
208
|
+
},
|
|
209
|
+
"config_method": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"enum": ["tool_parameter", "sdk_config", "api_header"],
|
|
212
|
+
"description": "How computer use is activated in the provider API"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"additionalProperties": true
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"if": { "properties": { "supported": { "const": true } } },
|
|
219
|
+
"then": { "required": ["implementation", "actions", "safety"] },
|
|
220
|
+
"additionalProperties": false
|
|
221
|
+
}
|
|
222
|
+
|