@irogane/kaji 0.2.0-beta.11
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 +105 -0
- package/README.md +598 -0
- package/contracts/README.md +14 -0
- package/contracts/beta-core-v1.json +52 -0
- package/contracts/cli/init-cases-v1.json +27 -0
- package/contracts/errors/error-codes.json +48 -0
- package/contracts/errors/integration-recovery-v1.json +127 -0
- package/contracts/errors/provider-normalization.json +111 -0
- package/contracts/events/conformance-invalid.json +20 -0
- package/contracts/events/conformance.json +511 -0
- package/contracts/events/new-kaji-event-v1.schema.json +1021 -0
- package/contracts/events/stored-kaji-event-v1.schema.json +1025 -0
- package/contracts/feature-tiers-v1.json +488 -0
- package/contracts/integrations/abi-index-v1.json +8 -0
- package/contracts/integrations/conformance-invalid.json +443 -0
- package/contracts/integrations/conformance-valid.json +121 -0
- package/contracts/integrations/copy-provenance-v1.schema.json +61 -0
- package/contracts/integrations/echo-tool-abi-v1.json +37 -0
- package/contracts/integrations/github-api-conformance-v1.json +644 -0
- package/contracts/integrations/github-tool-abi-typescript-v1.json +369 -0
- package/contracts/integrations/github-tool-abi-v1.json +146 -0
- package/contracts/integrations/gmail-api-conformance-v1.json +750 -0
- package/contracts/integrations/gmail-tool-abi-v1.json +62 -0
- package/contracts/integrations/index.schema.json +37 -0
- package/contracts/integrations/manifest.schema.json +119 -0
- package/contracts/parity/expected-normalized.json +4906 -0
- package/contracts/parity/scenarios.json +100 -0
- package/contracts/parity/scenarios.schema.json +214 -0
- package/contracts/providers/cost-conformance.json +112 -0
- package/contracts/release/github-proof-v1.schema.json +138 -0
- package/contracts/release/gmail-proof-v1.schema.json +138 -0
- package/contracts/release/kaji-ts-consumer-handoff-v1.schema.json +1289 -0
- package/contracts/release/publisher-identity-receipt-v1.schema.json +319 -0
- package/contracts/release/typescript-onboarding-evidence-v1.schema.json +740 -0
- package/contracts/tools/conformance-invalid.json +271 -0
- package/contracts/tools/conformance-valid.json +78 -0
- package/contracts/tools/tool-schema-v1.schema.json +18 -0
- package/dist/anthropic.cjs +1231 -0
- package/dist/anthropic.cjs.map +1 -0
- package/dist/anthropic.d.cts +26 -0
- package/dist/anthropic.d.ts +26 -0
- package/dist/anthropic.js +270 -0
- package/dist/anthropic.js.map +1 -0
- package/dist/auth.cjs +1507 -0
- package/dist/auth.cjs.map +1 -0
- package/dist/auth.d.cts +129 -0
- package/dist/auth.d.ts +129 -0
- package/dist/auth.js +1039 -0
- package/dist/auth.js.map +1 -0
- package/dist/base-B9FRMcP8.d.cts +140 -0
- package/dist/base-nHQd1VtS.d.ts +140 -0
- package/dist/chunk-AAM33KAO.js +4367 -0
- package/dist/chunk-AAM33KAO.js.map +1 -0
- package/dist/chunk-KAJ6BM64.js +153 -0
- package/dist/chunk-KAJ6BM64.js.map +1 -0
- package/dist/chunk-KCAXIOZS.js +308 -0
- package/dist/chunk-KCAXIOZS.js.map +1 -0
- package/dist/chunk-LSJ4AVO2.js +243 -0
- package/dist/chunk-LSJ4AVO2.js.map +1 -0
- package/dist/chunk-TM7ZGOJX.js +716 -0
- package/dist/chunk-TM7ZGOJX.js.map +1 -0
- package/dist/cli/bin.d.ts +2 -0
- package/dist/cli/bin.js +13 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/chunk-2RCWPRVY.js +6277 -0
- package/dist/cli/chunk-2RCWPRVY.js.map +1 -0
- package/dist/cli/chunk-SEBX54TR.js +681 -0
- package/dist/cli/chunk-SEBX54TR.js.map +1 -0
- package/dist/cli/index.d.ts +232 -0
- package/dist/cli/index.js +11 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init-worker.d.ts +2 -0
- package/dist/cli/init-worker.js +18 -0
- package/dist/cli/init-worker.js.map +1 -0
- package/dist/cli/integration-copy-worker.js +48 -0
- package/dist/cli/integration-copy-worker.js.map +1 -0
- package/dist/cli/package-entry-cjs.cjs +21 -0
- package/dist/cli/package-entry-cjs.cjs.map +1 -0
- package/dist/cli/package-entry-cjs.d.cts +2 -0
- package/dist/cli/package-entry.d.ts +2 -0
- package/dist/cli/package-entry.js +13 -0
- package/dist/cli/package-entry.js.map +1 -0
- package/dist/context-BaFHrQHv.d.cts +21 -0
- package/dist/context-BaFHrQHv.d.ts +21 -0
- package/dist/context-C-YPY-GS.d.cts +1538 -0
- package/dist/context-C-YPY-GS.d.ts +1538 -0
- package/dist/index.cjs +12346 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1560 -0
- package/dist/index.d.ts +1560 -0
- package/dist/index.js +7852 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/github.cjs +2092 -0
- package/dist/integrations/github.cjs.map +1 -0
- package/dist/integrations/github.d.cts +21 -0
- package/dist/integrations/github.d.ts +21 -0
- package/dist/integrations/github.js +2088 -0
- package/dist/integrations/github.js.map +1 -0
- package/dist/integrations.cjs +3370 -0
- package/dist/integrations.cjs.map +1 -0
- package/dist/integrations.d.cts +202 -0
- package/dist/integrations.d.ts +202 -0
- package/dist/integrations.js +2650 -0
- package/dist/integrations.js.map +1 -0
- package/dist/observability-Cj--OkME.d.cts +96 -0
- package/dist/observability-Cj--OkME.d.ts +96 -0
- package/dist/openai.cjs +1235 -0
- package/dist/openai.cjs.map +1 -0
- package/dist/openai.d.cts +32 -0
- package/dist/openai.d.ts +32 -0
- package/dist/openai.js +272 -0
- package/dist/openai.js.map +1 -0
- package/dist/testing.cjs +554 -0
- package/dist/testing.cjs.map +1 -0
- package/dist/testing.d.cts +43 -0
- package/dist/testing.d.ts +43 -0
- package/dist/testing.js +118 -0
- package/dist/testing.js.map +1 -0
- package/package.json +188 -0
- package/registry/echo/index.ts +53 -0
- package/registry/echo/manifest.json +53 -0
- package/registry/github/LICENSE +105 -0
- package/registry/github/client.ts +1727 -0
- package/registry/github/index.ts +263 -0
- package/registry/github/manifest.json +227 -0
- package/registry/github/owner-fixtures.json +10 -0
- package/registry/github/tests/github.test.ts +32 -0
- package/registry/gmail/LICENSE +105 -0
- package/registry/gmail/client.ts +548 -0
- package/registry/gmail/index.ts +165 -0
- package/registry/gmail/manifest.json +102 -0
- package/registry/gmail/owner-fixtures.json +10 -0
- package/registry/gmail/tests/gmail.test.ts +32 -0
- package/registry/index.json +21 -0
- package/registry/index.schema.json +37 -0
- package/registry/schema.json +119 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"namespace": "gmail",
|
|
5
|
+
"tools": [
|
|
6
|
+
{
|
|
7
|
+
"name": "get_message",
|
|
8
|
+
"description": "Get a message from the authenticated user's mailbox.",
|
|
9
|
+
"parameters": {
|
|
10
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"message_id": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
14
|
+
},
|
|
15
|
+
"required": ["message_id"],
|
|
16
|
+
"additionalProperties": false
|
|
17
|
+
},
|
|
18
|
+
"risk": "read",
|
|
19
|
+
"parallel_safe": true,
|
|
20
|
+
"timeout_ms": 10000
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "list_messages",
|
|
24
|
+
"description": "List messages in the authenticated user's mailbox. Pass `page_token` from a prior result's `next_page_token` to page through results.",
|
|
25
|
+
"parameters": {
|
|
26
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"query": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
30
|
+
"max_results": {
|
|
31
|
+
"type": "integer",
|
|
32
|
+
"minimum": 1,
|
|
33
|
+
"maximum": 100,
|
|
34
|
+
"default": 10
|
|
35
|
+
},
|
|
36
|
+
"page_token": { "type": "string", "minLength": 1, "maxLength": 2048 }
|
|
37
|
+
},
|
|
38
|
+
"required": [],
|
|
39
|
+
"additionalProperties": false
|
|
40
|
+
},
|
|
41
|
+
"risk": "read",
|
|
42
|
+
"parallel_safe": true,
|
|
43
|
+
"timeout_ms": 10000
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "send_message",
|
|
47
|
+
"description": "Send an email as the authenticated user. `raw` is the complete RFC 2822 message, base64url-encoded.",
|
|
48
|
+
"parameters": {
|
|
49
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"raw": { "type": "string", "minLength": 1, "maxLength": 1048576 }
|
|
53
|
+
},
|
|
54
|
+
"required": ["raw"],
|
|
55
|
+
"additionalProperties": false
|
|
56
|
+
},
|
|
57
|
+
"risk": "external_effect",
|
|
58
|
+
"parallel_safe": false,
|
|
59
|
+
"timeout_ms": 15000
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://kaji.dev/schemas/integration-index-v1.json",
|
|
4
|
+
"title": "Kaji integration registry index",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["$schema", "version", "integrations"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "const": "./index.schema.json" },
|
|
10
|
+
"version": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
13
|
+
},
|
|
14
|
+
"integrations": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"propertyNames": { "pattern": "^[a-z][a-z0-9_-]*$" },
|
|
17
|
+
"additionalProperties": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["manifest", "stability", "runtimes"],
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"manifest": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*(?:^|/)\\.\\.?(?:/|$))[A-Za-z0-9_@.+-]+(?:/[A-Za-z0-9_@.+-]+)*$"
|
|
25
|
+
},
|
|
26
|
+
"stability": { "enum": ["experimental", "beta"] },
|
|
27
|
+
"runtimes": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"minItems": 1,
|
|
30
|
+
"uniqueItems": true,
|
|
31
|
+
"items": { "enum": ["python", "typescript"] }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://kaji.dev/schemas/integration-manifest-v1.json",
|
|
4
|
+
"title": "Kaji integration manifest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["name", "version", "namespace", "description", "auth", "files", "tools"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"maxLength": 128,
|
|
12
|
+
"pattern": "^[a-z][a-z0-9_-]*$"
|
|
13
|
+
},
|
|
14
|
+
"version": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
17
|
+
},
|
|
18
|
+
"namespace": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
21
|
+
},
|
|
22
|
+
"description": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1
|
|
25
|
+
},
|
|
26
|
+
"auth": {
|
|
27
|
+
"oneOf": [
|
|
28
|
+
{
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": ["kind"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"kind": { "const": "none" }
|
|
33
|
+
},
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["kind", "env"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"kind": { "const": "env" },
|
|
41
|
+
"env": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"pattern": "^[A-Z][A-Z0-9_]*$"
|
|
44
|
+
},
|
|
45
|
+
"optional": { "type": "boolean", "default": false },
|
|
46
|
+
"docs": { "type": "string", "format": "uri" }
|
|
47
|
+
},
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "object",
|
|
52
|
+
"required": ["kind", "provider", "clientIdEnv", "scopes"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"kind": { "const": "oauth" },
|
|
55
|
+
"provider": { "enum": ["google"] },
|
|
56
|
+
"clientIdEnv": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"pattern": "^[A-Z][A-Z0-9_]*$"
|
|
59
|
+
},
|
|
60
|
+
"clientSecretEnv": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^[A-Z][A-Z0-9_]*$"
|
|
63
|
+
},
|
|
64
|
+
"scopes": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"minItems": 1,
|
|
67
|
+
"uniqueItems": true,
|
|
68
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 512 }
|
|
69
|
+
},
|
|
70
|
+
"docs": { "type": "string", "format": "uri" }
|
|
71
|
+
},
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"files": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"minItems": 1,
|
|
79
|
+
"uniqueItems": true,
|
|
80
|
+
"items": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*(?:^|/)\\.\\.?(?:/|$))[A-Za-z0-9_@.+-]+(?:/[A-Za-z0-9_@.+-]+)*$"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"tools": {
|
|
86
|
+
"type": "array",
|
|
87
|
+
"minItems": 1,
|
|
88
|
+
"uniqueItems": true,
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"required": ["name", "description", "parameters", "risk", "parallel_safe"],
|
|
92
|
+
"additionalProperties": false,
|
|
93
|
+
"properties": {
|
|
94
|
+
"name": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
97
|
+
},
|
|
98
|
+
"description": { "type": "string", "minLength": 1 },
|
|
99
|
+
"parameters": { "type": "object" },
|
|
100
|
+
"risk": {
|
|
101
|
+
"enum": ["read", "write", "external_effect", "destructive", "admin"]
|
|
102
|
+
},
|
|
103
|
+
"parallel_safe": { "type": "boolean" },
|
|
104
|
+
"timeout_ms": { "type": "integer", "minimum": 1 }
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"extras": {
|
|
109
|
+
"type": "array",
|
|
110
|
+
"uniqueItems": true,
|
|
111
|
+
"items": { "type": "string", "minLength": 1 }
|
|
112
|
+
},
|
|
113
|
+
"peerDeps": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"propertyNames": { "minLength": 1 },
|
|
116
|
+
"additionalProperties": { "type": "string", "minLength": 1 }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|