@akai-workflow-builder/cli-sdk 0.4.1 → 0.6.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.
- package/CHANGELOG.md +19 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +15 -3
- package/dist/define-cli.d.ts.map +1 -1
- package/dist/define-cli.js +5 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/manifest/index.d.ts +1 -1
- package/dist/manifest/index.d.ts.map +1 -1
- package/dist/manifest/json-schema.d.ts +79 -0
- package/dist/manifest/json-schema.d.ts.map +1 -1
- package/dist/manifest/json-schema.js +108 -0
- package/dist/manifest/to-schema.d.ts.map +1 -1
- package/dist/manifest/to-schema.js +2 -0
- package/dist/manifest/types.d.ts +137 -0
- package/dist/manifest/types.d.ts.map +1 -1
- package/dist/runtime/executor/index.d.ts +1 -1
- package/dist/runtime/executor/index.d.ts.map +1 -1
- package/dist/runtime/executor/index.js +16 -1
- package/dist/runtime/registry/connection-manifest.d.ts +27 -0
- package/dist/runtime/registry/connection-manifest.d.ts.map +1 -0
- package/dist/runtime/registry/connection-manifest.js +76 -0
- package/dist/runtime/registry/index.d.ts +4 -1
- package/dist/runtime/registry/index.d.ts.map +1 -1
- package/dist/runtime/registry/index.js +3 -0
- package/dist/runtime/registry/loader.d.ts +44 -0
- package/dist/runtime/registry/loader.d.ts.map +1 -1
- package/dist/runtime/registry/loader.js +329 -12
- package/dist/runtime/registry/manifest-wire.d.ts +65 -0
- package/dist/runtime/registry/manifest-wire.d.ts.map +1 -0
- package/dist/runtime/registry/manifest-wire.js +152 -0
- package/dist/runtime/registry/wire.d.ts +35 -1
- package/dist/runtime/registry/wire.d.ts.map +1 -1
- package/dist/runtime/registry/wire.js +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,25 @@ All notable changes to `@akai-workflow-builder/cli-sdk` are documented here.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
|
+
## [0.6.0](https://github.com/akai-workflow-builder/akai-cli-sdk/compare/cli-sdk-v0.5.0...cli-sdk-v0.6.0) (2026-08-21)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* embed connection in manifest so mixed packages load lazily ([28be12a](https://github.com/akai-workflow-builder/akai-cli-sdk/commit/28be12a37a5fe10f128be5b464e7fdbbb12e6a71))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* enforce embedded connection slug matches connectionSlug; fix test pointer ([509b3ab](https://github.com/akai-workflow-builder/akai-cli-sdk/commit/509b3ab209e459cb26054894ef6c659cb600f411))
|
|
18
|
+
|
|
19
|
+
## [0.5.0](https://github.com/akai-workflow-builder/akai-cli-sdk/compare/cli-sdk-v0.4.1...cli-sdk-v0.5.0) (2026-08-20)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* lazy manifest tool loading (AKAI-2408) ([5ebbebb](https://github.com/akai-workflow-builder/akai-cli-sdk/commit/5ebbebbc19615a28a323f24c226e8aa0b027b4b6))
|
|
25
|
+
|
|
7
26
|
## [0.4.1](https://github.com/akai-workflow-builder/akai-cli-sdk/compare/cli-sdk-v0.4.0...cli-sdk-v0.4.1) (2026-08-13)
|
|
8
27
|
|
|
9
28
|
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAiBzC,KAAK,UAAU,GACX;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC1D;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjC;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CAyB7D;AAED;;;;;GAKG;AACH,wBAAsB,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAiBzC,KAAK,UAAU,GACX;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC1D;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjC;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CAyB7D;AAED;;;;;GAKG;AACH,wBAAsB,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA4DlE;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,GAAG,SAAS,GACtB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;;;;;;;GAQG;AACH,wBAAsB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAclE"}
|
package/dist/cli.js
CHANGED
|
@@ -93,9 +93,21 @@ export async function loadCli(packagePath) {
|
|
|
93
93
|
throw new Error(`failed to import ${entry}: ${msg}`);
|
|
94
94
|
}
|
|
95
95
|
const def = mod.default;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
// The default export is either a single defineCLI() result or an array mixing
|
|
97
|
+
// a CLI with a defineConnection() (a package may ship both, e.g. a tenant
|
|
98
|
+
// connector that exports `[cli, connection]`). build-manifest emits ONE
|
|
99
|
+
// manifest per package, so pick the sole CLI out of the array.
|
|
100
|
+
const isCli = (x) => x !== null && typeof x === 'object' && x.__akaiCLI === true;
|
|
101
|
+
if (Array.isArray(def)) {
|
|
102
|
+
const clis = def.filter(isCli);
|
|
103
|
+
if (clis.length === 1)
|
|
104
|
+
return clis[0];
|
|
105
|
+
if (clis.length === 0) {
|
|
106
|
+
throw new Error(`${packagePath}: default export array contains no CLIDef (missing __akaiCLI brand)`);
|
|
107
|
+
}
|
|
108
|
+
throw new Error(`${packagePath}: default export array contains ${clis.length} CLIs — build-manifest expects exactly one CLI per package`);
|
|
109
|
+
}
|
|
110
|
+
if (!isCli(def)) {
|
|
99
111
|
throw new Error(`${packagePath}: default export is not a CLIDef (missing __akaiCLI brand)`);
|
|
100
112
|
}
|
|
101
113
|
return def;
|
package/dist/define-cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-cli.d.ts","sourceRoot":"","sources":["../src/define-cli.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,MAAM,EAAE,OAAO,EAA4B,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"define-cli.d.ts","sourceRoot":"","sources":["../src/define-cli.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,MAAM,EAAE,OAAO,EAA4B,MAAM,YAAY,CAAC;AAyPxF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAoD/C"}
|
package/dist/define-cli.js
CHANGED
|
@@ -9,6 +9,11 @@ const SecretDeclShape = z.object({
|
|
|
9
9
|
key: z.string({ error: 'key is required' }).min(1, { error: 'key is required' }),
|
|
10
10
|
injected: z.boolean().optional(),
|
|
11
11
|
adminManaged: z.boolean().optional(),
|
|
12
|
+
// serverOnly is part of SecretDecl and is emitted by both the branded and
|
|
13
|
+
// manifest wire projections; without it here zod strips the field at
|
|
14
|
+
// defineCLI, silently dropping a server-only credential's flag before it can
|
|
15
|
+
// reach /tools/list. Pass it through so the type, runtime, and wire agree.
|
|
16
|
+
serverOnly: z.boolean().optional(),
|
|
12
17
|
});
|
|
13
18
|
const PropertyDeclShape = z.object({
|
|
14
19
|
name: z.string({ error: 'name is required' }).min(1, { error: 'name is required' }),
|
package/dist/index.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ export type { SafePath } from './ctx/safe-path.js';
|
|
|
12
12
|
export { AkaiConnectionError, AkaiEgressError, AkaiError, AkaiInputError, AkaiPathError, AkaiPropertyError, AkaiResponseTooLargeError, AkaiSecretError, AkaiSpecError, AkaiToolError, describeError, } from './errors.js';
|
|
13
13
|
export type { ToolErrorKind } from './errors.js';
|
|
14
14
|
export { ConnectionManifestSchema, ManifestJSONSchema, SCHEMA_VERSION, toSchema, validateManifest, } from './manifest/index.js';
|
|
15
|
-
export type { ClientCertManifest, ConnectionManifest, DynamicEgressManifest, HttpToolManifest, ManifestProperty, ManifestSecret, NativeToolManifest, SchemaVersion, ToolManifest, } from './manifest/index.js';
|
|
15
|
+
export type { ClientCertManifest, ConnectionManifest, DynamicEgressManifest, HttpToolManifest, ManifestConnection, ManifestConnectionAuthKind, ManifestConnectionOAuth, ManifestJwtRefresh, ManifestOAuthAdminField, ManifestProperty, ManifestRefreshStrategy, ManifestSecret, ManifestTokenEndpointAuthMethod, NativeToolManifest, SchemaVersion, ToolManifest, } from './manifest/index.js';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE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,aAAa,EACb,iBAAiB,EACjB,yBAAyB,EACzB,eAAe,EACf,aAAa,EACb,aAAa,EACb,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,+BAA+B,EAC/B,kBAAkB,EAClB,aAAa,EACb,YAAY,GACb,MAAM,qBAAqB,CAAC"}
|
package/dist/manifest/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export { toSchema } from './to-schema.js';
|
|
|
2
2
|
export { ConnectionManifestSchema, ManifestJSONSchema, validateManifest, } from './json-schema.js';
|
|
3
3
|
export { SCHEMA_VERSION } from './constants.js';
|
|
4
4
|
export type { SchemaVersion } from './constants.js';
|
|
5
|
-
export type { ClientCertManifest, ConnectionManifest, DynamicEgressManifest, HttpToolManifest, ManifestProperty, ManifestSecret, NativeToolManifest, ToolManifest, } from './types.js';
|
|
5
|
+
export type { ClientCertManifest, ConnectionManifest, DynamicEgressManifest, HttpToolManifest, ManifestConnection, ManifestConnectionAuthKind, ManifestConnectionOAuth, ManifestJwtRefresh, ManifestOAuthAdminField, ManifestProperty, ManifestRefreshStrategy, ManifestSecret, ManifestTokenEndpointAuthMethod, NativeToolManifest, ToolManifest, } from './types.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,YAAY,GACb,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,+BAA+B,EAC/B,kBAAkB,EAClB,YAAY,GACb,MAAM,YAAY,CAAC"}
|
|
@@ -25,6 +25,7 @@ export declare const ConnectionManifestSchema: z.ZodObject<{
|
|
|
25
25
|
required: z.ZodBoolean;
|
|
26
26
|
injected: z.ZodOptional<z.ZodBoolean>;
|
|
27
27
|
adminManaged: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
serverOnly: z.ZodOptional<z.ZodBoolean>;
|
|
28
29
|
}, z.core.$strip>>;
|
|
29
30
|
properties: z.ZodArray<z.ZodObject<{
|
|
30
31
|
key: z.ZodString;
|
|
@@ -36,6 +37,84 @@ export declare const ConnectionManifestSchema: z.ZodObject<{
|
|
|
36
37
|
}, z.core.$strip>>;
|
|
37
38
|
connectionSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
39
|
vendorScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
+
override: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
connection: z.ZodOptional<z.ZodObject<{
|
|
42
|
+
slug: z.ZodString;
|
|
43
|
+
name: z.ZodString;
|
|
44
|
+
vendor: z.ZodString;
|
|
45
|
+
blurb: z.ZodString;
|
|
46
|
+
longDesc: z.ZodString;
|
|
47
|
+
instructions: z.ZodArray<z.ZodString>;
|
|
48
|
+
authKind: z.ZodEnum<{
|
|
49
|
+
apiKey: "apiKey";
|
|
50
|
+
oauth2: "oauth2";
|
|
51
|
+
none: "none";
|
|
52
|
+
}>;
|
|
53
|
+
secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
|
+
key: z.ZodString;
|
|
55
|
+
name: z.ZodString;
|
|
56
|
+
description: z.ZodString;
|
|
57
|
+
required: z.ZodBoolean;
|
|
58
|
+
injected: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
adminManaged: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
serverOnly: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
}, z.core.$strip>>>;
|
|
62
|
+
apiKeyHeader: z.ZodOptional<z.ZodString>;
|
|
63
|
+
hosts: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
production: z.ZodOptional<z.ZodString>;
|
|
65
|
+
demo: z.ZodOptional<z.ZodString>;
|
|
66
|
+
dev: z.ZodOptional<z.ZodString>;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
oauth: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
authorizeUrl: z.ZodString;
|
|
70
|
+
tokenUrl: z.ZodString;
|
|
71
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
72
|
+
pkce: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
tokenEndpointAuthMethod: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
client_secret_post: "client_secret_post";
|
|
75
|
+
client_secret_basic: "client_secret_basic";
|
|
76
|
+
}>>;
|
|
77
|
+
extraAuthorizeParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
78
|
+
refreshStrategy: z.ZodOptional<z.ZodEnum<{
|
|
79
|
+
cron: "cron";
|
|
80
|
+
jit: "jit";
|
|
81
|
+
}>>;
|
|
82
|
+
adminFields: z.ZodArray<z.ZodObject<{
|
|
83
|
+
key: z.ZodString;
|
|
84
|
+
label: z.ZodString;
|
|
85
|
+
secret: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
hasCustomConnectFlow: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
tokenResponsePath: z.ZodOptional<z.ZodString>;
|
|
89
|
+
appToken: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
tokenUrl: z.ZodString;
|
|
91
|
+
requestStyle: z.ZodOptional<z.ZodEnum<{
|
|
92
|
+
oauth2_client_credentials: "oauth2_client_credentials";
|
|
93
|
+
json: "json";
|
|
94
|
+
}>>;
|
|
95
|
+
credentialParams: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
secret: z.ZodString;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
tokenField: z.ZodOptional<z.ZodString>;
|
|
100
|
+
expiresField: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
}, z.core.$strip>>;
|
|
103
|
+
jwtRefresh: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
name: z.ZodString;
|
|
105
|
+
envs: z.ZodArray<z.ZodObject<{
|
|
106
|
+
env: z.ZodString;
|
|
107
|
+
accessKey: z.ZodString;
|
|
108
|
+
refreshKey: z.ZodString;
|
|
109
|
+
refreshUrl: z.ZodString;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
defaultAtTtlMs: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
revocationBackoffMs: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
claimTtlSeconds: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
nativeBuiltin: z.ZodOptional<z.ZodBoolean>;
|
|
116
|
+
override: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
+
}, z.core.$strip>>;
|
|
39
118
|
tools: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
40
119
|
transport: z.ZodLiteral<"http">;
|
|
41
120
|
egress: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../src/manifest/json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../src/manifest/json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AA6NrD;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiFnC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAsD,CAAC;AAExF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAE/D"}
|
|
@@ -20,6 +20,9 @@ const ManifestSecretSchema = z.object({
|
|
|
20
20
|
required: z.boolean(),
|
|
21
21
|
injected: z.boolean().optional(),
|
|
22
22
|
adminManaged: z.boolean().optional(),
|
|
23
|
+
// Server-only credential (e.g. a jwtRefresh refresh token). In the validator
|
|
24
|
+
// so validateManifest() round-trips it instead of stripping the flag.
|
|
25
|
+
serverOnly: z.boolean().optional(),
|
|
23
26
|
});
|
|
24
27
|
const ManifestPropertySchema = z.object({
|
|
25
28
|
key: z.string(),
|
|
@@ -87,6 +90,92 @@ const ToolManifestSchema = z.discriminatedUnion('transport', [
|
|
|
87
90
|
HttpToolManifestSchema,
|
|
88
91
|
NativeToolManifestSchema,
|
|
89
92
|
]);
|
|
93
|
+
// ── Embedded connection (AKAI-2408) ─────────────────────────────────────────
|
|
94
|
+
// A mixed package embeds its sibling connection in the CLI manifest so a lazy
|
|
95
|
+
// registry can register it FROM THE MANIFEST. The shape mirrors the runtime
|
|
96
|
+
// `BrandedConnection` (minus the brand) field-for-field, so validation here is
|
|
97
|
+
// what lets `readCliManifest` trust `manifest.connection` before projecting it
|
|
98
|
+
// with `manifestConnectionToWire`. A connection block that fails validation
|
|
99
|
+
// makes the WHOLE manifest fall back to eager import — the safe superset — so a
|
|
100
|
+
// malformed embed degrades to today's behavior rather than serving a broken
|
|
101
|
+
// connection. Declaring every field the wire reads also stops Zod from silently
|
|
102
|
+
// stripping one (which would drop it from the wire projection).
|
|
103
|
+
const ManifestOAuthAdminFieldSchema = z.object({
|
|
104
|
+
key: z.string(),
|
|
105
|
+
label: z.string(),
|
|
106
|
+
secret: z.boolean().optional(),
|
|
107
|
+
});
|
|
108
|
+
const ManifestConnectionOAuthSchema = z.object({
|
|
109
|
+
authorizeUrl: z.string(),
|
|
110
|
+
tokenUrl: z.string(),
|
|
111
|
+
scopes: z.array(z.string()).optional(),
|
|
112
|
+
pkce: z.boolean().optional(),
|
|
113
|
+
tokenEndpointAuthMethod: z.enum(['client_secret_post', 'client_secret_basic']).optional(),
|
|
114
|
+
extraAuthorizeParams: z.record(z.string(), z.string()).optional(),
|
|
115
|
+
refreshStrategy: z.enum(['cron', 'jit']).optional(),
|
|
116
|
+
adminFields: z.array(ManifestOAuthAdminFieldSchema),
|
|
117
|
+
hasCustomConnectFlow: z.boolean().optional(),
|
|
118
|
+
tokenResponsePath: z.string().optional(),
|
|
119
|
+
appToken: z
|
|
120
|
+
.object({
|
|
121
|
+
tokenUrl: z.string(),
|
|
122
|
+
requestStyle: z.enum(['oauth2_client_credentials', 'json']).optional(),
|
|
123
|
+
credentialParams: z.object({ id: z.string(), secret: z.string() }).optional(),
|
|
124
|
+
tokenField: z.string().optional(),
|
|
125
|
+
expiresField: z.string().optional(),
|
|
126
|
+
})
|
|
127
|
+
.optional(),
|
|
128
|
+
});
|
|
129
|
+
const ManifestJwtRefreshSchema = z.object({
|
|
130
|
+
name: z.string(),
|
|
131
|
+
envs: z.array(z.object({
|
|
132
|
+
env: z.string(),
|
|
133
|
+
accessKey: z.string(),
|
|
134
|
+
refreshKey: z.string(),
|
|
135
|
+
refreshUrl: z.string(),
|
|
136
|
+
})),
|
|
137
|
+
defaultAtTtlMs: z.number().int().positive().optional(),
|
|
138
|
+
revocationBackoffMs: z.number().int().positive().optional(),
|
|
139
|
+
claimTtlSeconds: z.number().int().positive().optional(),
|
|
140
|
+
});
|
|
141
|
+
const ManifestConnectionSchema = z
|
|
142
|
+
.object({
|
|
143
|
+
slug: z.string().regex(CONNECTION_SLUG_RE),
|
|
144
|
+
name: z.string(),
|
|
145
|
+
vendor: z.string(),
|
|
146
|
+
blurb: z.string(),
|
|
147
|
+
longDesc: z.string(),
|
|
148
|
+
instructions: z.array(z.string()),
|
|
149
|
+
authKind: z.enum(['apiKey', 'oauth2', 'none']),
|
|
150
|
+
secrets: z.array(ManifestSecretSchema).optional(),
|
|
151
|
+
apiKeyHeader: z.string().optional(),
|
|
152
|
+
hosts: z
|
|
153
|
+
.object({
|
|
154
|
+
production: z.string().optional(),
|
|
155
|
+
demo: z.string().optional(),
|
|
156
|
+
dev: z.string().optional(),
|
|
157
|
+
})
|
|
158
|
+
.optional(),
|
|
159
|
+
oauth: ManifestConnectionOAuthSchema.optional(),
|
|
160
|
+
jwtRefresh: ManifestJwtRefreshSchema.optional(),
|
|
161
|
+
nativeBuiltin: z.boolean().optional(),
|
|
162
|
+
override: z.boolean().optional(),
|
|
163
|
+
})
|
|
164
|
+
.superRefine((c, ctx) => {
|
|
165
|
+
// Mirror the defineConnection invariants so an embed that would project a
|
|
166
|
+
// nonsensical wire shape degrades to eager rather than validating: oauth is
|
|
167
|
+
// required for oauth2 and forbidden otherwise; jwtRefresh is the non-oauth2
|
|
168
|
+
// refresh mechanism (mutually exclusive with an oauth block / oauth2).
|
|
169
|
+
if (c.authKind === 'oauth2' && c.oauth === undefined) {
|
|
170
|
+
ctx.addIssue({ code: 'custom', path: ['oauth'], message: "oauth is required when authKind is 'oauth2'" });
|
|
171
|
+
}
|
|
172
|
+
if (c.authKind !== 'oauth2' && c.oauth !== undefined) {
|
|
173
|
+
ctx.addIssue({ code: 'custom', path: ['oauth'], message: `oauth must not be set when authKind is '${c.authKind}'` });
|
|
174
|
+
}
|
|
175
|
+
if (c.jwtRefresh !== undefined && (c.authKind === 'oauth2' || c.oauth !== undefined)) {
|
|
176
|
+
ctx.addIssue({ code: 'custom', path: ['jwtRefresh'], message: 'jwtRefresh must not be set alongside oauth / authKind oauth2' });
|
|
177
|
+
}
|
|
178
|
+
});
|
|
90
179
|
const ConnectionManifestBaseSchema = z.object({
|
|
91
180
|
$schemaVersion: z.literal(SCHEMA_VERSION),
|
|
92
181
|
id: z.string(),
|
|
@@ -105,6 +194,12 @@ const ConnectionManifestBaseSchema = z.object({
|
|
|
105
194
|
// crafted manifest can't smuggle an empty or malformed grouping value.
|
|
106
195
|
connectionSlug: z.string().regex(CONNECTION_SLUG_RE).nullable().optional(),
|
|
107
196
|
vendorScopes: z.array(z.string().min(1)).optional(),
|
|
197
|
+
// Cross-repo override opt-in — in the validator so validateManifest() round-
|
|
198
|
+
// trips it (a manifest-driven registry reads it for collision resolution).
|
|
199
|
+
override: z.boolean().optional(),
|
|
200
|
+
// Embedded sibling connection from a MIXED package (AKAI-2408). Optional +
|
|
201
|
+
// additive → does NOT bump SCHEMA_VERSION; a plain single-CLI manifest omits it.
|
|
202
|
+
connection: ManifestConnectionSchema.optional(),
|
|
108
203
|
tools: z.array(ToolManifestSchema),
|
|
109
204
|
});
|
|
110
205
|
/**
|
|
@@ -189,6 +284,19 @@ export const ConnectionManifestSchema = ConnectionManifestBaseSchema.superRefine
|
|
|
189
284
|
}
|
|
190
285
|
}
|
|
191
286
|
}
|
|
287
|
+
// A MIXED package embeds its sibling connection; the CLI must actually group
|
|
288
|
+
// under it (AKAI-2408). Enforce connectionSlug === connection.slug so a lazy
|
|
289
|
+
// /tools/list can't advertise an embedded connection the CLI doesn't link to
|
|
290
|
+
// (or link to a different/absent slug) — a mismatch would desync the
|
|
291
|
+
// CLI→connection grouping from the eager path. Failing validation here makes
|
|
292
|
+
// the loader safely eager-fall-back rather than serve a broken linkage.
|
|
293
|
+
if (m.connection && m.connectionSlug !== m.connection.slug) {
|
|
294
|
+
ctx.addIssue({
|
|
295
|
+
code: 'custom',
|
|
296
|
+
path: ['connection', 'slug'],
|
|
297
|
+
message: `embedded connection.slug '${m.connection.slug}' must match connectionSlug '${m.connectionSlug ?? 'null'}'`,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
192
300
|
});
|
|
193
301
|
/**
|
|
194
302
|
* Published JSON Schema (Draft 2020-12) for the Connections manifest.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-schema.d.ts","sourceRoot":"","sources":["../../src/manifest/to-schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,MAAM,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,KAAK,EACV,kBAAkB,EAInB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,
|
|
1
|
+
{"version":3,"file":"to-schema.d.ts","sourceRoot":"","sources":["../../src/manifest/to-schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,MAAM,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,KAAK,EACV,kBAAkB,EAInB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAuCxD"}
|
|
@@ -35,6 +35,7 @@ export function toSchema(cli) {
|
|
|
35
35
|
required: s.required,
|
|
36
36
|
...(s.injected ? { injected: true } : {}),
|
|
37
37
|
...(s.adminManaged ? { adminManaged: true } : {}),
|
|
38
|
+
...(s.serverOnly ? { serverOnly: true } : {}),
|
|
38
39
|
})),
|
|
39
40
|
properties: cli.properties.map((p) => ({
|
|
40
41
|
key: p.key,
|
|
@@ -46,6 +47,7 @@ export function toSchema(cli) {
|
|
|
46
47
|
})),
|
|
47
48
|
connectionSlug: cli.connectionSlug ?? null,
|
|
48
49
|
vendorScopes: [...(cli.vendorScopes ?? [])],
|
|
50
|
+
...(cli.override ? { override: true } : {}),
|
|
49
51
|
tools,
|
|
50
52
|
};
|
|
51
53
|
}
|
package/dist/manifest/types.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export interface ManifestSecret {
|
|
|
19
19
|
readonly required: boolean;
|
|
20
20
|
readonly injected?: boolean;
|
|
21
21
|
readonly adminManaged?: boolean;
|
|
22
|
+
readonly serverOnly?: boolean;
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* Non-sensitive tenant property — wire shape of {@link PropertyDecl}.
|
|
@@ -112,6 +113,123 @@ export interface NativeToolManifest extends BaseToolManifest {
|
|
|
112
113
|
readonly egress: null;
|
|
113
114
|
}
|
|
114
115
|
export type ToolManifest = HttpToolManifest | NativeToolManifest;
|
|
116
|
+
/** The auth kind a connection declares — WHAT auth, never the glue. Wire-format
|
|
117
|
+
* mirror of the runtime `ConnectionAuthKind` (kept here so the manifest layer
|
|
118
|
+
* stays self-contained — see the file header). */
|
|
119
|
+
export type ManifestConnectionAuthKind = 'apiKey' | 'oauth2' | 'none';
|
|
120
|
+
/** Client-auth method on the OAuth token exchange. Mirror of the runtime type. */
|
|
121
|
+
export type ManifestTokenEndpointAuthMethod = 'client_secret_post' | 'client_secret_basic';
|
|
122
|
+
/** How akai-app keeps the access token fresh once the connection is live. Mirror of the runtime type. */
|
|
123
|
+
export type ManifestRefreshStrategy = 'cron' | 'jit';
|
|
124
|
+
/**
|
|
125
|
+
* One OAuth-app credential an admin enters once per tenant (e.g. the client
|
|
126
|
+
* id/secret). SHAPE only — the VALUE lives in akai-app. Wire-format mirror of
|
|
127
|
+
* `BrandedOAuthAdminField`.
|
|
128
|
+
*/
|
|
129
|
+
export interface ManifestOAuthAdminField {
|
|
130
|
+
readonly key: string;
|
|
131
|
+
readonly label: string;
|
|
132
|
+
readonly secret?: boolean;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* The OAuth SHAPE a connection declares, in the pure manifest layer. Secret
|
|
136
|
+
* VALUES never appear here — they stay in akai-app keyed by slug. Field-for-field
|
|
137
|
+
* mirror of the runtime `BrandedConnectionOAuth` so
|
|
138
|
+
* {@link ManifestConnection} projects byte-identically to the branded wire path.
|
|
139
|
+
*/
|
|
140
|
+
export interface ManifestConnectionOAuth {
|
|
141
|
+
readonly authorizeUrl: string;
|
|
142
|
+
readonly tokenUrl: string;
|
|
143
|
+
/** OAuth authorize scope set; the wire serializer defaults a missing list to []. */
|
|
144
|
+
readonly scopes?: readonly string[];
|
|
145
|
+
readonly pkce?: boolean;
|
|
146
|
+
readonly tokenEndpointAuthMethod?: ManifestTokenEndpointAuthMethod;
|
|
147
|
+
readonly extraAuthorizeParams?: Record<string, string>;
|
|
148
|
+
readonly refreshStrategy?: ManifestRefreshStrategy;
|
|
149
|
+
readonly adminFields: readonly ManifestOAuthAdminField[];
|
|
150
|
+
readonly hasCustomConnectFlow?: boolean;
|
|
151
|
+
readonly tokenResponsePath?: string;
|
|
152
|
+
/** Client-credentials app-token mint spec; akai-app mints + injects it as ctx.appToken. */
|
|
153
|
+
readonly appToken?: {
|
|
154
|
+
readonly tokenUrl: string;
|
|
155
|
+
readonly requestStyle?: 'oauth2_client_credentials' | 'json';
|
|
156
|
+
readonly credentialParams?: {
|
|
157
|
+
readonly id: string;
|
|
158
|
+
readonly secret: string;
|
|
159
|
+
};
|
|
160
|
+
readonly tokenField?: string;
|
|
161
|
+
readonly expiresField?: string;
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Declarative JWT-refresh config in the pure manifest layer. Field-for-field
|
|
166
|
+
* mirror of the runtime `BrandedJwtRefresh` — token rows + endpoints + timing.
|
|
167
|
+
* No secret VALUES; the HTTP exchange stays host-side, keyed by slug.
|
|
168
|
+
*/
|
|
169
|
+
export interface ManifestJwtRefresh {
|
|
170
|
+
readonly name: string;
|
|
171
|
+
readonly envs: readonly {
|
|
172
|
+
readonly env: string;
|
|
173
|
+
readonly accessKey: string;
|
|
174
|
+
readonly refreshKey: string;
|
|
175
|
+
readonly refreshUrl: string;
|
|
176
|
+
}[];
|
|
177
|
+
readonly defaultAtTtlMs?: number;
|
|
178
|
+
readonly revocationBackoffMs?: number;
|
|
179
|
+
readonly claimTtlSeconds?: number;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* A connection embedded inside a CLI's `manifest.json` (AKAI-2408).
|
|
183
|
+
*
|
|
184
|
+
* A "mixed" package default-exports BOTH a `defineCLI()` result AND a
|
|
185
|
+
* `defineConnection()` result. Historically its `manifest.json` described only
|
|
186
|
+
* the CLI, so a manifest-driven (lazy) registry that catalogued it from the
|
|
187
|
+
* manifest would silently DROP the sibling connection (its OAuth slug/shape) —
|
|
188
|
+
* an auth-breaking regression. Rather than fall back to eager import for the
|
|
189
|
+
* whole package (the memory cost we're removing), the CLI manifest now embeds
|
|
190
|
+
* its sibling connection here so the lazy registry can register the connection
|
|
191
|
+
* FROM THE MANIFEST, byte-identically to the eager path.
|
|
192
|
+
*
|
|
193
|
+
* This is the pure, serialisable mirror of the runtime `BrandedConnection`
|
|
194
|
+
* (minus the `__akaiConnection` brand): the SHAPE needed to reconstruct a
|
|
195
|
+
* `WireConnectionEntry` (slug, authKind, secrets, oauth/jwtRefresh shape). It
|
|
196
|
+
* carries NO secret values. `override` is not emitted to `/tools/list` (the wire
|
|
197
|
+
* never carried it) but is preserved so a manifest-driven registry resolves a
|
|
198
|
+
* connection-slug collision the same way the eager loader does.
|
|
199
|
+
*
|
|
200
|
+
* Produced by `connectionToManifest()` (see runtime/registry/connection-manifest.ts)
|
|
201
|
+
* and projected to the wire by `manifestConnectionToWire()`.
|
|
202
|
+
*/
|
|
203
|
+
export interface ManifestConnection {
|
|
204
|
+
readonly slug: string;
|
|
205
|
+
readonly name: string;
|
|
206
|
+
readonly vendor: string;
|
|
207
|
+
readonly blurb: string;
|
|
208
|
+
readonly longDesc: string;
|
|
209
|
+
readonly instructions: readonly string[];
|
|
210
|
+
readonly authKind: ManifestConnectionAuthKind;
|
|
211
|
+
/** User-facing secret DECLARATIONS — key declarations only, exactly like
|
|
212
|
+
* {@link ConnectionManifest.secrets}. Secret VALUES never appear here. */
|
|
213
|
+
readonly secrets?: readonly ManifestSecret[];
|
|
214
|
+
/** Header carrying the apiKey credential (e.g. `Authorization` ⇒ `Bearer <token>`).
|
|
215
|
+
* Only meaningful for `authKind` `apiKey`. */
|
|
216
|
+
readonly apiKeyHeader?: string;
|
|
217
|
+
/** Per-environment host map for the connection's API. */
|
|
218
|
+
readonly hosts?: {
|
|
219
|
+
readonly production?: string;
|
|
220
|
+
readonly demo?: string;
|
|
221
|
+
readonly dev?: string;
|
|
222
|
+
};
|
|
223
|
+
/** Present iff `authKind` is `oauth2`. SHAPE only — never secret values. */
|
|
224
|
+
readonly oauth?: ManifestConnectionOAuth;
|
|
225
|
+
/** Declarative background JWT-refresh config for a non-OAuth connection. SHAPE only. */
|
|
226
|
+
readonly jwtRefresh?: ManifestJwtRefresh;
|
|
227
|
+
/** Governance FACT: auto-resolves without a user credential (no secrets + native transport). */
|
|
228
|
+
readonly nativeBuiltin?: boolean;
|
|
229
|
+
/** Cross-repo override opt-in — mirrors {@link ConnectionManifest.override}. Not emitted to the
|
|
230
|
+
* wire, but a manifest-driven registry reads it for connection-slug collision resolution. */
|
|
231
|
+
readonly override?: boolean;
|
|
232
|
+
}
|
|
115
233
|
export interface ConnectionManifest {
|
|
116
234
|
readonly $schemaVersion: SchemaVersion;
|
|
117
235
|
readonly id: string;
|
|
@@ -136,6 +254,25 @@ export interface ConnectionManifest {
|
|
|
136
254
|
* `toSchema()` emits `[]` when undeclared — treat absent as no scope.
|
|
137
255
|
*/
|
|
138
256
|
readonly vendorScopes?: readonly string[];
|
|
257
|
+
/**
|
|
258
|
+
* Cross-repo override opt-in — a CUSTOMER package sets this so its CLI id
|
|
259
|
+
* intentionally REPLACES a colliding baseline one. Not emitted to `/tools/list`
|
|
260
|
+
* (the wire never carried it), but a manifest-driven (lazy) registry needs it
|
|
261
|
+
* to resolve collisions the same way the eager loader does. `toSchema()` emits
|
|
262
|
+
* it only when set.
|
|
263
|
+
*/
|
|
264
|
+
readonly override?: boolean;
|
|
265
|
+
/**
|
|
266
|
+
* Sibling connection embedded from a MIXED package (AKAI-2408) — a package
|
|
267
|
+
* whose default export is `[cli, connection]`. Present only when this CLI
|
|
268
|
+
* shipped alongside a `defineConnection()` result; the lazy registry registers
|
|
269
|
+
* it FROM THE MANIFEST so a mixed package loads lazily without dropping its
|
|
270
|
+
* connection's OAuth slug/shape. Optional on the wire — a plain single-CLI
|
|
271
|
+
* manifest omits it, so consumers treat absent as "no embedded connection".
|
|
272
|
+
* `toSchema()` (CLI→manifest) never emits it; the mixed-package bundler sets it
|
|
273
|
+
* via `connectionToManifest()`.
|
|
274
|
+
*/
|
|
275
|
+
readonly connection?: ManifestConnection;
|
|
139
276
|
readonly tools: readonly ToolManifest[];
|
|
140
277
|
}
|
|
141
278
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/manifest/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAE3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAG5B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/manifest/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAE3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAG5B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAIhC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CA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AE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACjD;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;;;;OASG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;CACzC"}
|
|
@@ -2,7 +2,7 @@ import type { ToolLogger } from '../../types.js';
|
|
|
2
2
|
import { type ConvertedFile } from './image-compress.js';
|
|
3
3
|
import type { Registry } from '../registry/index.js';
|
|
4
4
|
import type { ExecuteRequestBody } from '../execute-request.js';
|
|
5
|
-
export type ExecuteErrorCode = 'unknown_tool' | 'invalid_input' | 'secret_unknown_key' | 'secret_missing' | 'property_unknown_key' | 'property_missing' | 'write_not_confirmed' | 'output_channel_missing' | 'egress_blocked' | 'response_too_large' | 'spec_error' | 'handler_error' | 'upstream_not_found' | 'upstream_forbidden' | 'upstream_auth_expired' | 'upstream_invalid_input' | 'upstream_conflict' | 'upstream_rate_limited' | 'upstream_unavailable';
|
|
5
|
+
export type ExecuteErrorCode = 'unknown_tool' | 'invalid_input' | 'secret_unknown_key' | 'secret_missing' | 'property_unknown_key' | 'property_missing' | 'write_not_confirmed' | 'output_channel_missing' | 'egress_blocked' | 'response_too_large' | 'spec_error' | 'handler_error' | 'tool_load_failed' | 'upstream_not_found' | 'upstream_forbidden' | 'upstream_auth_expired' | 'upstream_invalid_input' | 'upstream_conflict' | 'upstream_rate_limited' | 'upstream_unavailable';
|
|
6
6
|
export interface ExecuteSuccess {
|
|
7
7
|
readonly ok: true;
|
|
8
8
|
readonly result: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/executor/index.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAqC,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAKpF,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAUhE,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,eAAe,GACf,oBAAoB,GACpB,gBAAgB,GAChB,sBAAsB,GACtB,kBAAkB,GAClB,qBAAqB,GACrB,wBAAwB,GACxB,gBAAgB,GAChB,oBAAoB,GACpB,YAAY,GACZ,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/executor/index.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAqC,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAKpF,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAUhE,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,eAAe,GACf,oBAAoB,GACpB,gBAAgB,GAChB,sBAAsB,GACtB,kBAAkB,GAClB,qBAAqB,GACrB,wBAAwB,GACxB,gBAAgB,GAChB,oBAAoB,GACpB,YAAY,GACZ,eAAe,GAIf,kBAAkB,GAElB,oBAAoB,GACpB,oBAAoB,GACpB,uBAAuB,GACvB,wBAAwB,GACxB,mBAAmB,GACnB,uBAAuB,GACvB,sBAAsB,CAAC;AAE3B,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB;;;;;;;;OAQG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;QAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACzC,CAAC;CACH;AAED,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,cAAc,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAyR/E"}
|
|
@@ -29,7 +29,22 @@ import { redactSecrets } from './redact.js';
|
|
|
29
29
|
const { version: SDK_VERSION } = createRequire(import.meta.url)('../../../package.json');
|
|
30
30
|
export async function executeTool(params) {
|
|
31
31
|
const { registry, body, logger, signal, workdir, tenantId, localOutput } = params;
|
|
32
|
-
|
|
32
|
+
// resolveTool works in both eager and lazy mode: in lazy mode it imports the
|
|
33
|
+
// CLI's handler module on first use (and caches it). Eager mode is a plain map
|
|
34
|
+
// hit, same as lookupTool. The lazy import can throw (bad bundle, manifest/
|
|
35
|
+
// module drift) — catch it so a load failure returns a structured error
|
|
36
|
+
// envelope instead of escaping as an unhandled exception (the sync lookupTool
|
|
37
|
+
// it replaced could never throw).
|
|
38
|
+
let lookup;
|
|
39
|
+
try {
|
|
40
|
+
lookup = await registry.resolveTool(body.cli, body.tool);
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
return failure('tool_load_failed', `failed to load tool '${body.cli}.${body.tool}': ${err instanceof Error ? err.message : String(err)}`, {
|
|
44
|
+
cli: body.cli,
|
|
45
|
+
tool: body.tool,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
33
48
|
if (!lookup) {
|
|
34
49
|
return failure('unknown_tool', `no tool '${body.cli}.${body.tool}' in registry`, {
|
|
35
50
|
cli: body.cli,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connection → manifest serializer (AKAI-2408).
|
|
3
|
+
*
|
|
4
|
+
* The symmetric counterpart to `toSchema()` (CLI → manifest). A MIXED package
|
|
5
|
+
* default-exports BOTH a `defineCLI()` result and a `defineConnection()` result;
|
|
6
|
+
* its `manifest.json` historically described only the CLI, so a lazy registry
|
|
7
|
+
* catalogued from that manifest would silently DROP the sibling connection's
|
|
8
|
+
* OAuth slug/shape — an auth-breaking regression, which forced mixed packages to
|
|
9
|
+
* load EAGERLY (the memory cost). This serializer projects the built
|
|
10
|
+
* `BrandedConnection` into a pure {@link ManifestConnection} the mixed-package
|
|
11
|
+
* bundler embeds as `manifest.connection`, so the lazy registry can register the
|
|
12
|
+
* connection FROM THE MANIFEST — byte-identically to the eager path.
|
|
13
|
+
*
|
|
14
|
+
* The projection is a FAITHFUL structural copy (like `defineConnection` builds
|
|
15
|
+
* its def): it preserves every field — and the presence of every optional — that
|
|
16
|
+
* `toWireConnection` reads, so `manifestConnectionToWire(connectionToManifest(c))`
|
|
17
|
+
* equals `toWireConnection(c)` byte-for-byte. It carries NO secret values.
|
|
18
|
+
*
|
|
19
|
+
* Cross-repo import (the cli-service / tenant bundler):
|
|
20
|
+
* `import { connectionToManifest } from '@akai-workflow-builder/cli-sdk/runtime'`
|
|
21
|
+
*/
|
|
22
|
+
import type { ManifestConnection } from '../../manifest/types.js';
|
|
23
|
+
import type { BrandedConnection } from './types.js';
|
|
24
|
+
/** Project a built {@link BrandedConnection} to its pure, serialisable
|
|
25
|
+
* {@link ManifestConnection}. Deterministic, no I/O — safe to call at build time. */
|
|
26
|
+
export declare function connectionToManifest(conn: BrandedConnection): ManifestConnection;
|
|
27
|
+
//# sourceMappingURL=connection-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-manifest.d.ts","sourceRoot":"","sources":["../../../src/runtime/registry/connection-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EACV,kBAAkB,EAInB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,iBAAiB,EAIlB,MAAM,YAAY,CAAC;AAEpB;qFACqF;AACrF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,kBAAkB,CAiBhF"}
|