@irogane/kaji 0.2.0-beta.11 → 0.3.0

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.
Files changed (137) hide show
  1. package/README.md +112 -551
  2. package/dist/index.d.mts +253 -0
  3. package/dist/index.mjs +440 -0
  4. package/package.json +28 -166
  5. package/contracts/README.md +0 -14
  6. package/contracts/beta-core-v1.json +0 -52
  7. package/contracts/cli/init-cases-v1.json +0 -27
  8. package/contracts/errors/error-codes.json +0 -48
  9. package/contracts/errors/integration-recovery-v1.json +0 -127
  10. package/contracts/errors/provider-normalization.json +0 -111
  11. package/contracts/events/conformance-invalid.json +0 -20
  12. package/contracts/events/conformance.json +0 -511
  13. package/contracts/events/new-kaji-event-v1.schema.json +0 -1021
  14. package/contracts/events/stored-kaji-event-v1.schema.json +0 -1025
  15. package/contracts/feature-tiers-v1.json +0 -488
  16. package/contracts/integrations/abi-index-v1.json +0 -8
  17. package/contracts/integrations/conformance-invalid.json +0 -443
  18. package/contracts/integrations/conformance-valid.json +0 -121
  19. package/contracts/integrations/copy-provenance-v1.schema.json +0 -61
  20. package/contracts/integrations/echo-tool-abi-v1.json +0 -37
  21. package/contracts/integrations/github-api-conformance-v1.json +0 -644
  22. package/contracts/integrations/github-tool-abi-typescript-v1.json +0 -369
  23. package/contracts/integrations/github-tool-abi-v1.json +0 -146
  24. package/contracts/integrations/gmail-api-conformance-v1.json +0 -750
  25. package/contracts/integrations/gmail-tool-abi-v1.json +0 -62
  26. package/contracts/integrations/index.schema.json +0 -37
  27. package/contracts/integrations/manifest.schema.json +0 -119
  28. package/contracts/parity/expected-normalized.json +0 -4906
  29. package/contracts/parity/scenarios.json +0 -100
  30. package/contracts/parity/scenarios.schema.json +0 -214
  31. package/contracts/providers/cost-conformance.json +0 -112
  32. package/contracts/release/github-proof-v1.schema.json +0 -138
  33. package/contracts/release/gmail-proof-v1.schema.json +0 -138
  34. package/contracts/release/kaji-ts-consumer-handoff-v1.schema.json +0 -1289
  35. package/contracts/release/publisher-identity-receipt-v1.schema.json +0 -319
  36. package/contracts/release/typescript-onboarding-evidence-v1.schema.json +0 -740
  37. package/contracts/tools/conformance-invalid.json +0 -271
  38. package/contracts/tools/conformance-valid.json +0 -78
  39. package/contracts/tools/tool-schema-v1.schema.json +0 -18
  40. package/dist/anthropic.cjs +0 -1231
  41. package/dist/anthropic.cjs.map +0 -1
  42. package/dist/anthropic.d.cts +0 -26
  43. package/dist/anthropic.d.ts +0 -26
  44. package/dist/anthropic.js +0 -270
  45. package/dist/anthropic.js.map +0 -1
  46. package/dist/auth.cjs +0 -1507
  47. package/dist/auth.cjs.map +0 -1
  48. package/dist/auth.d.cts +0 -129
  49. package/dist/auth.d.ts +0 -129
  50. package/dist/auth.js +0 -1039
  51. package/dist/auth.js.map +0 -1
  52. package/dist/base-B9FRMcP8.d.cts +0 -140
  53. package/dist/base-nHQd1VtS.d.ts +0 -140
  54. package/dist/chunk-AAM33KAO.js +0 -4367
  55. package/dist/chunk-AAM33KAO.js.map +0 -1
  56. package/dist/chunk-KAJ6BM64.js +0 -153
  57. package/dist/chunk-KAJ6BM64.js.map +0 -1
  58. package/dist/chunk-KCAXIOZS.js +0 -308
  59. package/dist/chunk-KCAXIOZS.js.map +0 -1
  60. package/dist/chunk-LSJ4AVO2.js +0 -243
  61. package/dist/chunk-LSJ4AVO2.js.map +0 -1
  62. package/dist/chunk-TM7ZGOJX.js +0 -716
  63. package/dist/chunk-TM7ZGOJX.js.map +0 -1
  64. package/dist/cli/bin.d.ts +0 -2
  65. package/dist/cli/bin.js +0 -13
  66. package/dist/cli/bin.js.map +0 -1
  67. package/dist/cli/chunk-2RCWPRVY.js +0 -6277
  68. package/dist/cli/chunk-2RCWPRVY.js.map +0 -1
  69. package/dist/cli/chunk-SEBX54TR.js +0 -681
  70. package/dist/cli/chunk-SEBX54TR.js.map +0 -1
  71. package/dist/cli/index.d.ts +0 -232
  72. package/dist/cli/index.js +0 -11
  73. package/dist/cli/index.js.map +0 -1
  74. package/dist/cli/init-worker.d.ts +0 -2
  75. package/dist/cli/init-worker.js +0 -18
  76. package/dist/cli/init-worker.js.map +0 -1
  77. package/dist/cli/integration-copy-worker.js +0 -48
  78. package/dist/cli/integration-copy-worker.js.map +0 -1
  79. package/dist/cli/package-entry-cjs.cjs +0 -21
  80. package/dist/cli/package-entry-cjs.cjs.map +0 -1
  81. package/dist/cli/package-entry-cjs.d.cts +0 -2
  82. package/dist/cli/package-entry.d.ts +0 -2
  83. package/dist/cli/package-entry.js +0 -13
  84. package/dist/cli/package-entry.js.map +0 -1
  85. package/dist/context-BaFHrQHv.d.cts +0 -21
  86. package/dist/context-BaFHrQHv.d.ts +0 -21
  87. package/dist/context-C-YPY-GS.d.cts +0 -1538
  88. package/dist/context-C-YPY-GS.d.ts +0 -1538
  89. package/dist/index.cjs +0 -12346
  90. package/dist/index.cjs.map +0 -1
  91. package/dist/index.d.cts +0 -1560
  92. package/dist/index.d.ts +0 -1560
  93. package/dist/index.js +0 -7852
  94. package/dist/index.js.map +0 -1
  95. package/dist/integrations/github.cjs +0 -2092
  96. package/dist/integrations/github.cjs.map +0 -1
  97. package/dist/integrations/github.d.cts +0 -21
  98. package/dist/integrations/github.d.ts +0 -21
  99. package/dist/integrations/github.js +0 -2088
  100. package/dist/integrations/github.js.map +0 -1
  101. package/dist/integrations.cjs +0 -3370
  102. package/dist/integrations.cjs.map +0 -1
  103. package/dist/integrations.d.cts +0 -202
  104. package/dist/integrations.d.ts +0 -202
  105. package/dist/integrations.js +0 -2650
  106. package/dist/integrations.js.map +0 -1
  107. package/dist/observability-Cj--OkME.d.cts +0 -96
  108. package/dist/observability-Cj--OkME.d.ts +0 -96
  109. package/dist/openai.cjs +0 -1235
  110. package/dist/openai.cjs.map +0 -1
  111. package/dist/openai.d.cts +0 -32
  112. package/dist/openai.d.ts +0 -32
  113. package/dist/openai.js +0 -272
  114. package/dist/openai.js.map +0 -1
  115. package/dist/testing.cjs +0 -554
  116. package/dist/testing.cjs.map +0 -1
  117. package/dist/testing.d.cts +0 -43
  118. package/dist/testing.d.ts +0 -43
  119. package/dist/testing.js +0 -118
  120. package/dist/testing.js.map +0 -1
  121. package/registry/echo/index.ts +0 -53
  122. package/registry/echo/manifest.json +0 -53
  123. package/registry/github/LICENSE +0 -105
  124. package/registry/github/client.ts +0 -1727
  125. package/registry/github/index.ts +0 -263
  126. package/registry/github/manifest.json +0 -227
  127. package/registry/github/owner-fixtures.json +0 -10
  128. package/registry/github/tests/github.test.ts +0 -32
  129. package/registry/gmail/LICENSE +0 -105
  130. package/registry/gmail/client.ts +0 -548
  131. package/registry/gmail/index.ts +0 -165
  132. package/registry/gmail/manifest.json +0 -102
  133. package/registry/gmail/owner-fixtures.json +0 -10
  134. package/registry/gmail/tests/gmail.test.ts +0 -32
  135. package/registry/index.json +0 -21
  136. package/registry/index.schema.json +0 -37
  137. package/registry/schema.json +0 -119
@@ -1,443 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "cases": [
4
- {
5
- "name": "environment auth missing env",
6
- "target": "manifest",
7
- "document": {
8
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
9
- "auth": { "kind": "env" }, "files": ["index.ts"],
10
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
11
- },
12
- "expectedPath": "/auth",
13
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
14
- },
15
- {
16
- "name": "environment auth has unsafe lowercase env",
17
- "target": "manifest",
18
- "document": {
19
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
20
- "auth": { "kind": "env", "env": "api_key" }, "files": ["index.ts"],
21
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
22
- },
23
- "expectedPath": "/auth",
24
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
25
- },
26
- {
27
- "name": "environment auth has OAuth fields",
28
- "target": "manifest",
29
- "document": {
30
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
31
- "auth": { "kind": "env", "env": "API_KEY", "scopes": ["read"] },
32
- "files": ["index.ts"],
33
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
34
- },
35
- "expectedPath": "/auth",
36
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
37
- },
38
- {
39
- "name": "OAuth auth missing provider",
40
- "target": "manifest",
41
- "document": {
42
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
43
- "auth": { "kind": "oauth", "clientIdEnv": "GOOGLE_CLIENT_ID", "scopes": ["read"] }, "files": ["index.ts"],
44
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
45
- },
46
- "expectedPath": "/auth",
47
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
48
- },
49
- {
50
- "name": "OAuth auth missing client ID environment variable",
51
- "target": "manifest",
52
- "document": {
53
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
54
- "auth": { "kind": "oauth", "provider": "google", "scopes": ["read"] }, "files": ["index.ts"],
55
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
56
- },
57
- "expectedPath": "/auth",
58
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
59
- },
60
- {
61
- "name": "OAuth auth missing scopes",
62
- "target": "manifest",
63
- "document": {
64
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
65
- "auth": { "kind": "oauth", "provider": "google", "clientIdEnv": "GOOGLE_CLIENT_ID" }, "files": ["index.ts"],
66
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
67
- },
68
- "expectedPath": "/auth",
69
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
70
- },
71
- {
72
- "name": "OAuth auth has empty scopes",
73
- "target": "manifest",
74
- "document": {
75
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
76
- "auth": { "kind": "oauth", "provider": "google", "clientIdEnv": "GOOGLE_CLIENT_ID", "scopes": [] }, "files": ["index.ts"],
77
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
78
- },
79
- "expectedPath": "/auth",
80
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
81
- },
82
- {
83
- "name": "OAuth auth has duplicate scopes",
84
- "target": "manifest",
85
- "document": {
86
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
87
- "auth": { "kind": "oauth", "provider": "google", "clientIdEnv": "GOOGLE_CLIENT_ID", "scopes": ["read", "read"] },
88
- "files": ["index.ts"],
89
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
90
- },
91
- "expectedPath": "/auth",
92
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
93
- },
94
- {
95
- "name": "OAuth auth has env fields",
96
- "target": "manifest",
97
- "document": {
98
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
99
- "auth": { "kind": "oauth", "provider": "google", "clientIdEnv": "GOOGLE_CLIENT_ID", "scopes": ["read"], "env": "API_KEY" },
100
- "files": ["index.ts"],
101
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
102
- },
103
- "expectedPath": "/auth",
104
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
105
- },
106
- {
107
- "name": "none auth has credential fields",
108
- "target": "manifest",
109
- "document": {
110
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
111
- "auth": { "kind": "none", "env": "API_KEY" }, "files": ["index.ts"],
112
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
113
- },
114
- "expectedPath": "/auth",
115
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
116
- },
117
- {
118
- "name": "invalid authentication docs URI",
119
- "target": "manifest",
120
- "document": {
121
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
122
- "auth": { "kind": "env", "env": "API_KEY", "docs": "not a uri" },
123
- "files": ["index.ts"],
124
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
125
- },
126
- "expectedPath": "/auth",
127
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
128
- },
129
- {
130
- "name": "tool missing risk",
131
- "target": "manifest",
132
- "document": {
133
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
134
- "auth": { "kind": "none" }, "files": ["index.ts"],
135
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "parallel_safe": false }]
136
- },
137
- "expectedPath": "/tools/0",
138
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
139
- },
140
- {
141
- "name": "tool missing name",
142
- "target": "manifest",
143
- "document": {
144
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
145
- "auth": { "kind": "none" }, "files": ["index.ts"],
146
- "tools": [{ "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
147
- },
148
- "expectedPath": "/tools/0",
149
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
150
- },
151
- {
152
- "name": "tool missing parameters",
153
- "target": "manifest",
154
- "document": {
155
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
156
- "auth": { "kind": "none" }, "files": ["index.ts"],
157
- "tools": [{ "name": "x", "description": "x", "risk": "read", "parallel_safe": false }]
158
- },
159
- "expectedPath": "/tools/0",
160
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
161
- },
162
- {
163
- "name": "tool missing parallel safe classification",
164
- "target": "manifest",
165
- "document": {
166
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
167
- "auth": { "kind": "none" }, "files": ["index.ts"],
168
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read" }]
169
- },
170
- "expectedPath": "/tools/0",
171
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
172
- },
173
- {
174
- "name": "tool has invalid Draft 2020-12 parameter schema",
175
- "target": "manifest",
176
- "document": {
177
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
178
- "auth": { "kind": "none" }, "files": ["index.ts"],
179
- "tools": [{ "name": "x", "description": "x", "parameters": { "type": "not-a-json-type" }, "risk": "read", "parallel_safe": false }]
180
- },
181
- "expectedPath": "/tools/0/parameters/type",
182
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
183
- },
184
- {
185
- "name": "tool has unsupported parameter schema dialect",
186
- "target": "manifest",
187
- "document": {
188
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
189
- "auth": { "kind": "none" }, "files": ["index.ts"],
190
- "tools": [{ "name": "x", "description": "x", "parameters": { "$schema": "https://json-schema.org/draft/2019-09/schema" }, "risk": "read", "parallel_safe": false }]
191
- },
192
- "expectedPath": "/tools/0/parameters/$schema",
193
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
194
- },
195
- {
196
- "name": "tool has invalid regular expression pattern",
197
- "target": "manifest",
198
- "document": {
199
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
200
- "auth": { "kind": "none" }, "files": ["index.ts"],
201
- "tools": [{ "name": "x", "description": "x", "parameters": { "type": "object", "properties": { "value": { "type": "string", "pattern": "[" } } }, "risk": "read", "parallel_safe": false }]
202
- },
203
- "expectedPath": "/tools/0/parameters/properties/value/pattern",
204
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
205
- },
206
- {
207
- "name": "tool has invalid schema identifier",
208
- "target": "manifest",
209
- "document": {
210
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
211
- "auth": { "kind": "none" }, "files": ["index.ts"],
212
- "tools": [{ "name": "x", "description": "x", "parameters": { "type": "object", "properties": { "value": { "$id": "not uri with spaces", "type": "object" } } }, "risk": "read", "parallel_safe": false }]
213
- },
214
- "expectedPath": "/tools/0/parameters/properties/value/$id",
215
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
216
- },
217
- {
218
- "name": "tool pattern uses ECMAScript named capture",
219
- "target": "manifest",
220
- "document": {
221
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
222
- "auth": { "kind": "none" }, "files": ["index.ts"],
223
- "tools": [{ "name": "x", "description": "x", "parameters": { "type": "object", "properties": { "value": { "type": "string", "pattern": "(?<name>a)" } } }, "risk": "read", "parallel_safe": false }]
224
- },
225
- "expectedPath": "/tools/0/parameters/properties/value/pattern",
226
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
227
- },
228
- {
229
- "name": "tool pattern uses Python named capture",
230
- "target": "manifest",
231
- "document": {
232
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
233
- "auth": { "kind": "none" }, "files": ["index.ts"],
234
- "tools": [{ "name": "x", "description": "x", "parameters": { "type": "object", "properties": { "value": { "type": "string", "pattern": "(?P<name>a)" } } }, "risk": "read", "parallel_safe": false }]
235
- },
236
- "expectedPath": "/tools/0/parameters/properties/value/pattern",
237
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
238
- },
239
- {
240
- "name": "tool pattern uses inline flags",
241
- "target": "manifest",
242
- "document": {
243
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
244
- "auth": { "kind": "none" }, "files": ["index.ts"],
245
- "tools": [{ "name": "x", "description": "x", "parameters": { "type": "object", "properties": { "value": { "type": "string", "pattern": "(?i:a)" } } }, "risk": "read", "parallel_safe": false }]
246
- },
247
- "expectedPath": "/tools/0/parameters/properties/value/pattern",
248
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
249
- },
250
- {
251
- "name": "tool pattern uses atomic groups",
252
- "target": "manifest",
253
- "document": {
254
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
255
- "auth": { "kind": "none" }, "files": ["index.ts"],
256
- "tools": [{ "name": "x", "description": "x", "parameters": { "type": "object", "properties": { "value": { "type": "string", "pattern": "(?>a)" } } }, "risk": "read", "parallel_safe": false }]
257
- },
258
- "expectedPath": "/tools/0/parameters/properties/value/pattern",
259
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
260
- },
261
- {
262
- "name": "tool pattern uses Python anchors",
263
- "target": "manifest",
264
- "document": {
265
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
266
- "auth": { "kind": "none" }, "files": ["index.ts"],
267
- "tools": [{ "name": "x", "description": "x", "parameters": { "type": "object", "properties": { "value": { "type": "string", "pattern": "\\A[a-z]+\\Z" } } }, "risk": "read", "parallel_safe": false }]
268
- },
269
- "expectedPath": "/tools/0/parameters/properties/value/pattern",
270
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
271
- },
272
- {
273
- "name": "tool pattern uses Unicode properties",
274
- "target": "manifest",
275
- "document": {
276
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
277
- "auth": { "kind": "none" }, "files": ["index.ts"],
278
- "tools": [{ "name": "x", "description": "x", "parameters": { "type": "object", "properties": { "value": { "type": "string", "pattern": "\\p{Letter}+" } } }, "risk": "read", "parallel_safe": false }]
279
- },
280
- "expectedPath": "/tools/0/parameters/properties/value/pattern",
281
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
282
- },
283
- {
284
- "name": "tool pattern uses backreferences",
285
- "target": "manifest",
286
- "document": {
287
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
288
- "auth": { "kind": "none" }, "files": ["index.ts"],
289
- "tools": [{ "name": "x", "description": "x", "parameters": { "type": "object", "properties": { "value": { "type": "string", "pattern": "(a)\\1" } } }, "risk": "read", "parallel_safe": false }]
290
- },
291
- "expectedPath": "/tools/0/parameters/properties/value/pattern",
292
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
293
- },
294
- {
295
- "name": "tool has non-positive timeout",
296
- "target": "manifest",
297
- "document": {
298
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
299
- "auth": { "kind": "none" }, "files": ["index.ts"],
300
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false, "timeout_ms": 0 }]
301
- },
302
- "expectedPath": "/tools/0/timeout_ms",
303
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
304
- },
305
- {
306
- "name": "duplicate tool name",
307
- "target": "manifest",
308
- "document": {
309
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
310
- "auth": { "kind": "none" }, "files": ["index.ts"],
311
- "tools": [
312
- { "name": "x", "description": "first", "parameters": {}, "risk": "read", "parallel_safe": false },
313
- { "name": "x", "description": "second", "parameters": {}, "risk": "write", "parallel_safe": false }
314
- ]
315
- },
316
- "expectedPath": "/tools/1/name",
317
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
318
- },
319
- {
320
- "name": "absolute manifest file path",
321
- "target": "manifest",
322
- "document": {
323
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
324
- "auth": { "kind": "none" }, "files": ["/tmp/index.ts"],
325
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
326
- },
327
- "expectedPath": "/files/0",
328
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
329
- },
330
- {
331
- "name": "parent traversal manifest file path",
332
- "target": "manifest",
333
- "document": {
334
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
335
- "auth": { "kind": "none" }, "files": ["../index.ts"],
336
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
337
- },
338
- "expectedPath": "/files/0",
339
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
340
- },
341
- {
342
- "name": "duplicate manifest file",
343
- "target": "manifest",
344
- "document": {
345
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
346
- "auth": { "kind": "none" }, "files": ["index.ts", "index.ts"],
347
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
348
- },
349
- "expectedPath": "/files",
350
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
351
- },
352
- {
353
- "name": "index manifest path escapes registry",
354
- "target": "index",
355
- "document": {
356
- "$schema": "./index.schema.json", "version": "0.1.0",
357
- "integrations": {
358
- "x": { "manifest": "../x/manifest.json", "stability": "beta", "runtimes": ["typescript"] }
359
- }
360
- },
361
- "expectedPath": "/integrations/x/manifest",
362
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
363
- },
364
- {
365
- "name": "unknown stability tier",
366
- "target": "index",
367
- "document": {
368
- "$schema": "./index.schema.json", "version": "0.1.0",
369
- "integrations": {
370
- "x": { "manifest": "x/manifest.json", "stability": "preview", "runtimes": ["typescript"] }
371
- }
372
- },
373
- "expectedPath": "/integrations/x/stability",
374
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
375
- },
376
- {
377
- "name": "unknown integration runtime",
378
- "target": "index",
379
- "document": {
380
- "$schema": "./index.schema.json", "version": "0.1.0",
381
- "integrations": {
382
- "x": { "manifest": "x/manifest.json", "stability": "beta", "runtimes": ["ruby"] }
383
- }
384
- },
385
- "expectedPath": "/integrations/x/runtimes/0",
386
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
387
- },
388
- {
389
- "name": "index key does not match manifest name",
390
- "target": "registry",
391
- "index": {
392
- "$schema": "./index.schema.json", "version": "0.1.0",
393
- "integrations": {
394
- "alias": { "manifest": "actual/manifest.json", "stability": "beta", "runtimes": ["typescript"] }
395
- }
396
- },
397
- "manifests": {
398
- "actual/manifest.json": {
399
- "name": "actual", "version": "0.1.0", "namespace": "actual", "description": "actual",
400
- "auth": { "kind": "none" }, "files": ["index.ts"],
401
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
402
- }
403
- },
404
- "files": ["actual/index.ts"],
405
- "expectedPath": "/name",
406
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
407
- },
408
- {
409
- "name": "index points to missing manifest",
410
- "target": "registry",
411
- "index": {
412
- "$schema": "./index.schema.json", "version": "0.1.0",
413
- "integrations": {
414
- "ghost": { "manifest": "ghost/manifest.json", "stability": "experimental", "runtimes": ["typescript"] }
415
- }
416
- },
417
- "manifests": {},
418
- "files": [],
419
- "expectedPath": "/integrations/ghost/manifest",
420
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
421
- },
422
- {
423
- "name": "manifest references missing file",
424
- "target": "registry",
425
- "index": {
426
- "$schema": "./index.schema.json", "version": "0.1.0",
427
- "integrations": {
428
- "x": { "manifest": "x/manifest.json", "stability": "experimental", "runtimes": ["typescript"] }
429
- }
430
- },
431
- "manifests": {
432
- "x/manifest.json": {
433
- "name": "x", "version": "0.1.0", "namespace": "x", "description": "x",
434
- "auth": { "kind": "none" }, "files": ["missing.ts"],
435
- "tools": [{ "name": "x", "description": "x", "parameters": {}, "risk": "read", "parallel_safe": false }]
436
- }
437
- },
438
- "files": [],
439
- "expectedPath": "/files/0",
440
- "expectedCode": "INTEGRATION_SCHEMA_INVALID"
441
- }
442
- ]
443
- }
@@ -1,121 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "cases": [
4
- {
5
- "name": "manifest with no authentication",
6
- "target": "manifest",
7
- "document": {
8
- "name": "echo",
9
- "version": "0.1.0",
10
- "namespace": "echo",
11
- "description": "Echo text.",
12
- "auth": { "kind": "none" },
13
- "files": ["index.ts"],
14
- "tools": [
15
- {
16
- "name": "say",
17
- "description": "Echo text.",
18
- "parameters": {
19
- "$schema": "https://json-schema.org/draft/2020-12/schema",
20
- "type": "object",
21
- "properties": {
22
- "message": {
23
- "$id": "https://kaji.dev/schemas/echo-message-v1.json",
24
- "type": "string",
25
- "pattern": "^[a-z]+$"
26
- }
27
- },
28
- "required": ["message"],
29
- "additionalProperties": false
30
- },
31
- "risk": "read",
32
- "parallel_safe": false
33
- }
34
- ]
35
- }
36
- },
37
- {
38
- "name": "manifest with optional environment authentication",
39
- "target": "manifest",
40
- "document": {
41
- "name": "search",
42
- "version": "0.1.0",
43
- "namespace": "search",
44
- "description": "Search text.",
45
- "auth": {
46
- "kind": "env",
47
- "env": "SEARCH_API_KEY",
48
- "optional": true,
49
- "docs": "https://example.com/auth"
50
- },
51
- "files": ["index.ts"],
52
- "tools": [
53
- {
54
- "name": "search",
55
- "description": "Search text.",
56
- "parameters": {
57
- "type": "object",
58
- "properties": {
59
- "query": {
60
- "type": "string",
61
- "pattern": "^(red|blue)-[0-9]{1,3}$"
62
- }
63
- }
64
- },
65
- "risk": "read",
66
- "parallel_safe": true,
67
- "timeout_ms": 1000
68
- }
69
- ]
70
- }
71
- },
72
- {
73
- "name": "manifest with OAuth authentication",
74
- "target": "manifest",
75
- "document": {
76
- "name": "mail",
77
- "version": "0.1.0",
78
- "namespace": "mail",
79
- "description": "Read mail.",
80
- "auth": {
81
- "kind": "oauth",
82
- "provider": "google",
83
- "clientIdEnv": "GOOGLE_CLIENT_ID",
84
- "clientSecretEnv": "GOOGLE_CLIENT_SECRET",
85
- "scopes": ["https://www.googleapis.com/auth/gmail.readonly"],
86
- "docs": "https://example.com/oauth"
87
- },
88
- "files": ["mail/index.ts"],
89
- "tools": [
90
- {
91
- "name": "read",
92
- "description": "Read mail.",
93
- "parameters": { "type": "object" },
94
- "risk": "read",
95
- "parallel_safe": false
96
- }
97
- ]
98
- }
99
- },
100
- {
101
- "name": "registry index with beta and experimental entries",
102
- "target": "index",
103
- "document": {
104
- "$schema": "./index.schema.json",
105
- "version": "0.1.0",
106
- "integrations": {
107
- "echo": {
108
- "manifest": "echo/manifest.json",
109
- "stability": "beta",
110
- "runtimes": ["python", "typescript"]
111
- },
112
- "http": {
113
- "manifest": "http/manifest.json",
114
- "stability": "experimental",
115
- "runtimes": ["typescript"]
116
- }
117
- }
118
- }
119
- }
120
- ]
121
- }
@@ -1,61 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://kaji.dev/schemas/integration-copy-provenance-v1.json",
4
- "title": "Kaji copied integration bundle provenance",
5
- "type": "object",
6
- "required": [
7
- "schemaVersion",
8
- "integration",
9
- "sdkVersion",
10
- "runtime",
11
- "stability",
12
- "registryEntrySha256",
13
- "abiSha256",
14
- "manifestSha256",
15
- "license",
16
- "files"
17
- ],
18
- "additionalProperties": false,
19
- "properties": {
20
- "schemaVersion": { "const": "1.0.0" },
21
- "integration": {
22
- "type": "string",
23
- "pattern": "^[a-z][a-z0-9_-]*$"
24
- },
25
- "sdkVersion": { "type": "string", "minLength": 1, "maxLength": 128 },
26
- "runtime": { "enum": ["python", "typescript"] },
27
- "stability": { "enum": ["experimental", "beta"] },
28
- "registryEntrySha256": { "$ref": "#/$defs/sha256" },
29
- "abiSha256": { "$ref": "#/$defs/sha256" },
30
- "manifestSha256": { "$ref": "#/$defs/sha256" },
31
- "license": {
32
- "type": "object",
33
- "required": ["identifier", "url", "sha256"],
34
- "additionalProperties": false,
35
- "properties": {
36
- "identifier": { "type": "string", "minLength": 1, "maxLength": 128 },
37
- "url": { "type": "string", "format": "uri" },
38
- "sha256": { "$ref": "#/$defs/sha256" }
39
- }
40
- },
41
- "files": {
42
- "type": "object",
43
- "minProperties": 1,
44
- "propertyNames": {
45
- "allOf": [
46
- {
47
- "pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*(?:^|/)\\.\\.?(?:/|$))[A-Za-z0-9_@.+-]+(?:/[A-Za-z0-9_@.+-]+)*$"
48
- },
49
- { "not": { "const": ".kaji-integration-provenance.json" } }
50
- ]
51
- },
52
- "additionalProperties": { "$ref": "#/$defs/sha256" }
53
- }
54
- },
55
- "$defs": {
56
- "sha256": {
57
- "type": "string",
58
- "pattern": "^[a-f0-9]{64}$"
59
- }
60
- }
61
- }