@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,263 +0,0 @@
1
- // This is YOUR GitHub integration. Edit it.
2
-
3
- import {
4
- Integration,
5
- type MetricsSink,
6
- type ToolExecutionContext,
7
- type ToolHandler,
8
- type ToolSpec,
9
- type TraceSink,
10
- } from "@irogane/kaji";
11
- import { createGitHubRequester } from "@irogane/kaji/integrations";
12
-
13
- import { GitHubClient } from "./client";
14
-
15
- export type SharedGitHubClient = Pick<
16
- GitHubClient,
17
- "addComment" | "createIssue" | "getFile" | "getIssue" | "listIssues" | "searchCode"
18
- >;
19
-
20
- const repository = {
21
- type: "string",
22
- pattern: "^[A-Za-z0-9_.-]{1,100}/[A-Za-z0-9_.-]{1,100}$",
23
- } as const;
24
- const issueNumber = { type: "integer", minimum: 1, maximum: Number.MAX_SAFE_INTEGER } as const;
25
-
26
- function parameters(
27
- properties: Readonly<Record<string, unknown>>,
28
- required: readonly string[],
29
- ): Record<string, unknown> {
30
- return {
31
- $schema: "https://json-schema.org/draft/2020-12/schema",
32
- type: "object",
33
- properties,
34
- required: [...required],
35
- additionalProperties: false,
36
- };
37
- }
38
-
39
- function specs(): readonly ToolSpec[] {
40
- return [
41
- {
42
- name: "add_comment",
43
- description: "Add a comment to a GitHub issue.",
44
- parameters: parameters(
45
- {
46
- repository,
47
- issue_number: issueNumber,
48
- body: { type: "string", minLength: 1, maxLength: 16_384 },
49
- },
50
- ["repository", "issue_number", "body"],
51
- ),
52
- risk: "external_effect",
53
- parallel_safe: false,
54
- timeout_ms: 15_000,
55
- },
56
- {
57
- name: "create_issue",
58
- description: "Create a GitHub issue.",
59
- parameters: parameters(
60
- {
61
- repository,
62
- title: { type: "string", minLength: 1, maxLength: 256 },
63
- body: { type: "string", minLength: 0, maxLength: 16_384 },
64
- },
65
- ["repository", "title", "body"],
66
- ),
67
- risk: "external_effect",
68
- parallel_safe: false,
69
- timeout_ms: 15_000,
70
- },
71
- {
72
- name: "get_file",
73
- description: "Get a file from a GitHub repository.",
74
- parameters: parameters(
75
- {
76
- repository,
77
- path: { type: "string", minLength: 1, maxLength: 512 },
78
- ref: { type: "string", minLength: 1, maxLength: 100 },
79
- },
80
- ["repository", "path"],
81
- ),
82
- risk: "read",
83
- parallel_safe: true,
84
- timeout_ms: 10_000,
85
- },
86
- {
87
- name: "get_issue",
88
- description: "Get a GitHub issue.",
89
- parameters: parameters({ repository, issue_number: issueNumber }, [
90
- "repository",
91
- "issue_number",
92
- ]),
93
- risk: "read",
94
- parallel_safe: true,
95
- timeout_ms: 10_000,
96
- },
97
- {
98
- name: "list_issues",
99
- description: "List GitHub issues.",
100
- parameters: parameters(
101
- {
102
- repository,
103
- state: { type: "string", enum: ["open", "closed", "all"], default: "open" },
104
- page: { type: "integer", minimum: 1, maximum: 1_000, default: 1 },
105
- per_page: { type: "integer", minimum: 1, maximum: 20, default: 10 },
106
- },
107
- ["repository"],
108
- ),
109
- risk: "read",
110
- parallel_safe: true,
111
- timeout_ms: 10_000,
112
- },
113
- {
114
- name: "search_code",
115
- description: "Search code in a GitHub repository.",
116
- parameters: parameters(
117
- {
118
- repository,
119
- query: { type: "string", minLength: 1, maxLength: 256 },
120
- page: { type: "integer", minimum: 1, maximum: 50, default: 1 },
121
- per_page: { type: "integer", minimum: 1, maximum: 20, default: 10 },
122
- },
123
- ["repository", "query"],
124
- ),
125
- risk: "read",
126
- parallel_safe: true,
127
- timeout_ms: 10_000,
128
- },
129
- ];
130
- }
131
-
132
- function objectResult(value: unknown): Record<string, unknown> {
133
- if (typeof value !== "object" || value === null || Array.isArray(value)) {
134
- throw new Error("GitHub client returned an invalid tool result");
135
- }
136
- return value as Record<string, unknown>;
137
- }
138
-
139
- function handler(client: SharedGitHubClient, name: string): ToolHandler {
140
- return async (args, context) => {
141
- switch (name) {
142
- case "add_comment":
143
- return objectResult(
144
- await client.addComment(context, {
145
- repository: args.repository as string,
146
- issueNumber: args.issue_number as number,
147
- body: args.body as string,
148
- }),
149
- );
150
- case "create_issue":
151
- return objectResult(
152
- await client.createIssue(context, {
153
- repository: args.repository as string,
154
- title: args.title as string,
155
- body: args.body as string,
156
- }),
157
- );
158
- case "get_file":
159
- return objectResult(
160
- await client.getFile(context, {
161
- repository: args.repository as string,
162
- path: args.path as string,
163
- ...(args.ref === undefined ? {} : { ref: args.ref as string }),
164
- }),
165
- );
166
- case "get_issue":
167
- return objectResult(
168
- await client.getIssue(context, {
169
- repository: args.repository as string,
170
- issueNumber: args.issue_number as number,
171
- }),
172
- );
173
- case "list_issues":
174
- return objectResult(
175
- await client.listIssues(context, {
176
- repository: args.repository as string,
177
- ...(args.state === undefined ? {} : { state: args.state as "open" | "closed" | "all" }),
178
- ...(args.page === undefined ? {} : { page: args.page as number }),
179
- ...(args.per_page === undefined ? {} : { perPage: args.per_page as number }),
180
- }),
181
- );
182
- case "search_code":
183
- return objectResult(
184
- await client.searchCode(context, {
185
- repository: args.repository as string,
186
- query: args.query as string,
187
- ...(args.page === undefined ? {} : { page: args.page as number }),
188
- ...(args.per_page === undefined ? {} : { perPage: args.per_page as number }),
189
- }),
190
- );
191
- default:
192
- throw new Error("Unknown GitHub tool");
193
- }
194
- };
195
- }
196
-
197
- export function createSharedGitHubToolBindings(
198
- client: SharedGitHubClient,
199
- ): [ToolSpec, ToolHandler][] {
200
- return specs().map((spec) => [spec, handler(client, spec.name)]);
201
- }
202
-
203
- export class GitHubIntegration extends Integration {
204
- readonly namespace = "github";
205
- private closeOwnedRequester: (() => void) | undefined;
206
-
207
- constructor(
208
- private readonly client: SharedGitHubClient,
209
- closeOwnedRequester?: () => void,
210
- ) {
211
- super();
212
- this.closeOwnedRequester = closeOwnedRequester;
213
- }
214
-
215
- override tools(): [ToolSpec, ToolHandler][] {
216
- return createSharedGitHubToolBindings(this.client);
217
- }
218
-
219
- close(): void {
220
- const close = this.closeOwnedRequester;
221
- if (close === undefined) return;
222
- close();
223
- this.closeOwnedRequester = undefined;
224
- }
225
- }
226
-
227
- export interface CreateGitHubIntegrationOptions {
228
- readonly tokenFor: (context: ToolExecutionContext) => Promise<string>;
229
- readonly repositories: readonly string[];
230
- readonly metricsSink?: MetricsSink;
231
- readonly traceSink?: TraceSink;
232
- }
233
-
234
- export function createGithubIntegration(
235
- options: CreateGitHubIntegrationOptions,
236
- ): GitHubIntegration {
237
- const { metricsSink, traceSink, ...clientOptions } = options;
238
- const http = createGitHubRequester({ metricsSink, traceSink });
239
- return new GitHubIntegration(
240
- new GitHubClient({
241
- ...clientOptions,
242
- http,
243
- }),
244
- () => http.close(),
245
- );
246
- }
247
-
248
- function createGithubIntegrationForTest(client: SharedGitHubClient): GitHubIntegration {
249
- return new GitHubIntegration(client);
250
- }
251
-
252
- const inspectionClient = new Proxy(
253
- {},
254
- {
255
- get: () => async () => {
256
- throw new Error("inspection dependencies must not execute");
257
- },
258
- },
259
- ) as SharedGitHubClient;
260
-
261
- export function inspectIntegration(): GitHubIntegration {
262
- return createGithubIntegrationForTest(inspectionClient);
263
- }
@@ -1,227 +0,0 @@
1
- {
2
- "name": "github",
3
- "version": "0.1.0",
4
- "namespace": "github",
5
- "description": "Repository-scoped GitHub code, issue, and comment tools.",
6
- "auth": {
7
- "kind": "env",
8
- "env": "GITHUB_TOKEN",
9
- "docs": "https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens"
10
- },
11
- "files": [
12
- "index.ts",
13
- "client.ts",
14
- "tests/github.test.ts",
15
- "owner-fixtures.json",
16
- "LICENSE"
17
- ],
18
- "tools": [
19
- {
20
- "name": "add_comment",
21
- "description": "Add a comment to a GitHub issue.",
22
- "parameters": {
23
- "$schema": "https://json-schema.org/draft/2020-12/schema",
24
- "type": "object",
25
- "properties": {
26
- "repository": {
27
- "type": "string",
28
- "pattern": "^[A-Za-z0-9_.-]{1,100}/[A-Za-z0-9_.-]{1,100}$"
29
- },
30
- "issue_number": {
31
- "type": "integer",
32
- "minimum": 1,
33
- "maximum": 9007199254740991
34
- },
35
- "body": {
36
- "type": "string",
37
- "minLength": 1,
38
- "maxLength": 16384
39
- }
40
- },
41
- "required": [
42
- "repository",
43
- "issue_number",
44
- "body"
45
- ],
46
- "additionalProperties": false
47
- },
48
- "risk": "external_effect",
49
- "parallel_safe": false,
50
- "timeout_ms": 15000
51
- },
52
- {
53
- "name": "create_issue",
54
- "description": "Create a GitHub issue.",
55
- "parameters": {
56
- "$schema": "https://json-schema.org/draft/2020-12/schema",
57
- "type": "object",
58
- "properties": {
59
- "repository": {
60
- "type": "string",
61
- "pattern": "^[A-Za-z0-9_.-]{1,100}/[A-Za-z0-9_.-]{1,100}$"
62
- },
63
- "title": {
64
- "type": "string",
65
- "minLength": 1,
66
- "maxLength": 256
67
- },
68
- "body": {
69
- "type": "string",
70
- "minLength": 0,
71
- "maxLength": 16384
72
- }
73
- },
74
- "required": [
75
- "repository",
76
- "title",
77
- "body"
78
- ],
79
- "additionalProperties": false
80
- },
81
- "risk": "external_effect",
82
- "parallel_safe": false,
83
- "timeout_ms": 15000
84
- },
85
- {
86
- "name": "get_file",
87
- "description": "Get a file from a GitHub repository.",
88
- "parameters": {
89
- "$schema": "https://json-schema.org/draft/2020-12/schema",
90
- "type": "object",
91
- "properties": {
92
- "repository": {
93
- "type": "string",
94
- "pattern": "^[A-Za-z0-9_.-]{1,100}/[A-Za-z0-9_.-]{1,100}$"
95
- },
96
- "path": {
97
- "type": "string",
98
- "minLength": 1,
99
- "maxLength": 512
100
- },
101
- "ref": {
102
- "type": "string",
103
- "minLength": 1,
104
- "maxLength": 100
105
- }
106
- },
107
- "required": [
108
- "repository",
109
- "path"
110
- ],
111
- "additionalProperties": false
112
- },
113
- "risk": "read",
114
- "parallel_safe": true,
115
- "timeout_ms": 10000
116
- },
117
- {
118
- "name": "get_issue",
119
- "description": "Get a GitHub issue.",
120
- "parameters": {
121
- "$schema": "https://json-schema.org/draft/2020-12/schema",
122
- "type": "object",
123
- "properties": {
124
- "repository": {
125
- "type": "string",
126
- "pattern": "^[A-Za-z0-9_.-]{1,100}/[A-Za-z0-9_.-]{1,100}$"
127
- },
128
- "issue_number": {
129
- "type": "integer",
130
- "minimum": 1,
131
- "maximum": 9007199254740991
132
- }
133
- },
134
- "required": [
135
- "repository",
136
- "issue_number"
137
- ],
138
- "additionalProperties": false
139
- },
140
- "risk": "read",
141
- "parallel_safe": true,
142
- "timeout_ms": 10000
143
- },
144
- {
145
- "name": "list_issues",
146
- "description": "List GitHub issues.",
147
- "parameters": {
148
- "$schema": "https://json-schema.org/draft/2020-12/schema",
149
- "type": "object",
150
- "properties": {
151
- "repository": {
152
- "type": "string",
153
- "pattern": "^[A-Za-z0-9_.-]{1,100}/[A-Za-z0-9_.-]{1,100}$"
154
- },
155
- "state": {
156
- "type": "string",
157
- "enum": [
158
- "open",
159
- "closed",
160
- "all"
161
- ],
162
- "default": "open"
163
- },
164
- "page": {
165
- "type": "integer",
166
- "minimum": 1,
167
- "maximum": 1000,
168
- "default": 1
169
- },
170
- "per_page": {
171
- "type": "integer",
172
- "minimum": 1,
173
- "maximum": 20,
174
- "default": 10
175
- }
176
- },
177
- "required": [
178
- "repository"
179
- ],
180
- "additionalProperties": false
181
- },
182
- "risk": "read",
183
- "parallel_safe": true,
184
- "timeout_ms": 10000
185
- },
186
- {
187
- "name": "search_code",
188
- "description": "Search code in a GitHub repository.",
189
- "parameters": {
190
- "$schema": "https://json-schema.org/draft/2020-12/schema",
191
- "type": "object",
192
- "properties": {
193
- "repository": {
194
- "type": "string",
195
- "pattern": "^[A-Za-z0-9_.-]{1,100}/[A-Za-z0-9_.-]{1,100}$"
196
- },
197
- "query": {
198
- "type": "string",
199
- "minLength": 1,
200
- "maxLength": 256
201
- },
202
- "page": {
203
- "type": "integer",
204
- "minimum": 1,
205
- "maximum": 50,
206
- "default": 1
207
- },
208
- "per_page": {
209
- "type": "integer",
210
- "minimum": 1,
211
- "maximum": 20,
212
- "default": 10
213
- }
214
- },
215
- "required": [
216
- "repository",
217
- "query"
218
- ],
219
- "additionalProperties": false
220
- },
221
- "risk": "read",
222
- "parallel_safe": true,
223
- "timeout_ms": 10000
224
- }
225
- ],
226
- "peerDeps": {}
227
- }
@@ -1,10 +0,0 @@
1
- {
2
- "schemaVersion": "1.0.0",
3
- "outcomes": [
4
- { "name": "success", "expected": "success" },
5
- { "name": "missing_auth", "expected": "INTEGRATION_AUTH_REQUIRED" },
6
- { "name": "rate_limit", "expected": "INTEGRATION_RATE_LIMITED" },
7
- { "name": "approval_rejected", "expected": "APPROVAL_REJECTED" },
8
- { "name": "connection_lost_after_dispatch", "expected": "unknown" }
9
- ]
10
- }
@@ -1,32 +0,0 @@
1
- // This is YOUR no-network GitHub owner fixture test. Edit it.
2
-
3
- import { readFileSync } from "node:fs";
4
- import { describe, expect, it } from "vitest";
5
-
6
- const closedOutcomes = new Set([
7
- "success",
8
- "missing_auth",
9
- "rate_limit",
10
- "approval_rejected",
11
- "connection_lost_after_dispatch",
12
- ]);
13
-
14
- export function scriptedOutcome(name: string): string {
15
- if (!closedOutcomes.has(name)) throw new Error("unknown scripted GitHub outcome");
16
- const fixture = JSON.parse(
17
- readFileSync(new URL("../owner-fixtures.json", import.meta.url), "utf8"),
18
- ) as { outcomes: Array<{ name: string; expected: string }> };
19
- return fixture.outcomes.find((row) => row.name === name)!.expected;
20
- }
21
-
22
- describe("GitHub owner fixtures", () => {
23
- it("keeps scripted outcomes closed and network-free", () => {
24
- expect([...closedOutcomes].map((name) => [name, scriptedOutcome(name)])).toEqual([
25
- ["success", "success"],
26
- ["missing_auth", "INTEGRATION_AUTH_REQUIRED"],
27
- ["rate_limit", "INTEGRATION_RATE_LIMITED"],
28
- ["approval_rejected", "APPROVAL_REJECTED"],
29
- ["connection_lost_after_dispatch", "unknown"],
30
- ]);
31
- });
32
- });
@@ -1,105 +0,0 @@
1
- # Functional Source License, Version 1.1, ALv2 Future License
2
-
3
- ## Abbreviation
4
-
5
- FSL-1.1-ALv2
6
-
7
- ## Notice
8
-
9
- Copyright 2026 Enkang Yuan
10
-
11
- ## Terms and Conditions
12
-
13
- ### Licensor ("We")
14
-
15
- The party offering the Software under these Terms and Conditions.
16
-
17
- ### The Software
18
-
19
- The "Software" is each version of the software that we make available under
20
- these Terms and Conditions, as indicated by our inclusion of these Terms and
21
- Conditions with the Software.
22
-
23
- ### License Grant
24
-
25
- Subject to your compliance with this License Grant and the Patents,
26
- Redistribution and Trademark clauses below, we hereby grant you the right to
27
- use, copy, modify, create derivative works, publicly perform, publicly display
28
- and redistribute the Software for any Permitted Purpose identified below.
29
-
30
- ### Permitted Purpose
31
-
32
- A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
- means making the Software available to others in a commercial product or
34
- service that:
35
-
36
- 1. substitutes for the Software;
37
-
38
- 2. substitutes for any other product or service we offer using the Software
39
- that exists as of the date we make the Software available; or
40
-
41
- 3. offers the same or substantially similar functionality as the Software.
42
-
43
- Permitted Purposes specifically include using the Software:
44
-
45
- 1. for your internal use and access;
46
-
47
- 2. for non-commercial education;
48
-
49
- 3. for non-commercial research; and
50
-
51
- 4. in connection with professional services that you provide to a licensee
52
- using the Software in accordance with these Terms and Conditions.
53
-
54
- ### Patents
55
-
56
- To the extent your use for a Permitted Purpose would necessarily infringe our
57
- patents, the license grant above includes a license under our patents. If you
58
- make a claim against any party that the Software infringes or contributes to
59
- the infringement of any patent, then your patent license to the Software ends
60
- immediately.
61
-
62
- ### Redistribution
63
-
64
- The Terms and Conditions apply to all copies, modifications and derivatives of
65
- the Software.
66
-
67
- If you redistribute any copies, modifications or derivatives of the Software,
68
- you must include a copy of or a link to these Terms and Conditions and not
69
- remove any copyright notices provided in or with the Software.
70
-
71
- ### Disclaimer
72
-
73
- THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
- IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
- PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
-
77
- IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
- SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
- EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
-
81
- ### Trademarks
82
-
83
- Except for displaying the License Details and identifying us as the origin of
84
- the Software, you have no right under these Terms and Conditions to use our
85
- trademarks, trade names, service marks or product names.
86
-
87
- ## Grant of Future License
88
-
89
- We hereby irrevocably grant you an additional license to use the Software under
90
- the Apache License, Version 2.0 that is effective on the second anniversary of
91
- the date we make the Software available. On or after that date, you may use the
92
- Software under the Apache License, Version 2.0, in which case the following
93
- will apply:
94
-
95
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
- this file except in compliance with the License.
97
-
98
- You may obtain a copy of the License at
99
-
100
- http://www.apache.org/licenses/LICENSE-2.0
101
-
102
- Unless required by applicable law or agreed to in writing, software distributed
103
- under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
- CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
- specific language governing permissions and limitations under the License.