@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,62 +0,0 @@
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
- }
@@ -1,37 +0,0 @@
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
- }
@@ -1,119 +0,0 @@
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
- }