@akai-workflow-builder/cli-sdk 0.1.6 → 0.1.8
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 +27 -1
- package/dist/ctx/build-ctx.js +1 -1
- package/dist/define-cli.d.ts.map +1 -1
- package/dist/define-cli.js +37 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/manifest/json-schema.d.ts +4 -4
- package/dist/manifest/json-schema.d.ts.map +1 -1
- package/dist/manifest/json-schema.js +42 -21
- package/dist/manifest/to-schema.d.ts.map +1 -1
- package/dist/manifest/to-schema.js +2 -1
- package/dist/manifest/types.d.ts +3 -2
- package/dist/manifest/types.d.ts.map +1 -1
- package/dist/tool.d.ts +5 -1
- package/dist/tool.d.ts.map +1 -1
- package/dist/tool.js +19 -13
- package/dist/types.d.ts +18 -11
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,32 @@ 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.1.8] - 2026-06-17
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `SecretDecl.adminManaged` — flag to mark a secret as admin-set and tenant-wide.
|
|
12
|
+
Hosts hide it from the per-user connection form and render it only in the admin
|
|
13
|
+
credentials UI; the value still ships to the worker at runtime. Omitted from the
|
|
14
|
+
manifest when falsy, avoiding manifest churn.
|
|
15
|
+
|
|
16
|
+
## [0.1.7] - 2026-06-15
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- `ctx.oauth.accessToken` — host-injected, per-session OAuth access token exposed
|
|
21
|
+
on `ToolCtx` for connection tools.
|
|
22
|
+
- `SecretDecl.injected` — flag to mark host-injected secrets (omitted from manifest
|
|
23
|
+
when falsy, avoiding manifest churn).
|
|
24
|
+
- `secret:<KEY>` dynamic egress syntax — allow connection tools to declare upstream
|
|
25
|
+
egress that substitutes OAuth/injected secrets at runtime.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- Freeze the nested `ctx.oauth` object so a handler cannot mutate
|
|
30
|
+
`ctx.oauth.accessToken`, matching the immutability of `ctx.secrets` /
|
|
31
|
+
`ctx.properties`.
|
|
32
|
+
|
|
7
33
|
## [0.1.6]
|
|
8
34
|
|
|
9
35
|
### Added
|
|
@@ -21,7 +47,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
21
47
|
|
|
22
48
|
- `ctx.oauth.accessToken` — host-injected, per-session OAuth access token exposed
|
|
23
49
|
on `ToolCtx` for connection tools. `buildCtx` accepts an `oauthAccessToken` param
|
|
24
|
-
and
|
|
50
|
+
and sets `ctx.oauth = { accessToken }` when provided. Additive and optional —
|
|
25
51
|
tools that do not read it are unaffected, and the field is absent when the host
|
|
26
52
|
supplies no token.
|
|
27
53
|
|
package/dist/ctx/build-ctx.js
CHANGED
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;AAgNxF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAmD/C"}
|
package/dist/define-cli.js
CHANGED
|
@@ -8,6 +8,7 @@ const SecretDeclShape = z.object({
|
|
|
8
8
|
required: z.boolean({ error: 'required must be a boolean' }),
|
|
9
9
|
key: z.string({ error: 'key is required' }).min(1, { error: 'key is required' }),
|
|
10
10
|
injected: z.boolean().optional(),
|
|
11
|
+
adminManaged: z.boolean().optional(),
|
|
11
12
|
});
|
|
12
13
|
const PropertyDeclShape = z.object({
|
|
13
14
|
name: z.string({ error: 'name is required' }).min(1, { error: 'name is required' }),
|
|
@@ -142,26 +143,46 @@ const CLISpecShape = z
|
|
|
142
143
|
});
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
|
-
// Dynamic egress: `{ from: 'property:KEY' }`
|
|
146
|
-
//
|
|
147
|
-
//
|
|
146
|
+
// Dynamic egress: `{ from: 'property:KEY' }` or `{ from: 'secret:KEY' }`.
|
|
147
|
+
// Property refs require KEY be declared in `properties[]` + tool's `propertyKeys`.
|
|
148
|
+
// Secret refs require KEY be declared in `secrets[]` + tool's `secretKeys`.
|
|
149
|
+
// Native tools have no network — skip.
|
|
148
150
|
const egress = t.options.network?.egress;
|
|
149
151
|
if (egress !== undefined && egress !== null && typeof egress === 'object' && !Array.isArray(egress) && 'from' in egress) {
|
|
150
152
|
const ref = egress.from;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
153
|
+
if (ref.startsWith('property:')) {
|
|
154
|
+
const key = ref.slice('property:'.length);
|
|
155
|
+
if (!declaredProperties.has(key)) {
|
|
156
|
+
ctx.addIssue({
|
|
157
|
+
code: 'custom',
|
|
158
|
+
path: ['tools', name, 'options', 'network', 'egress'],
|
|
159
|
+
message: `tool '${name}' uses dynamic egress 'property:${key}' but '${key}' is not declared in defineCLI({ properties })`,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
if (!t.options.propertyKeys.includes(key)) {
|
|
163
|
+
ctx.addIssue({
|
|
164
|
+
code: 'custom',
|
|
165
|
+
path: ['tools', name, 'options', 'network', 'egress'],
|
|
166
|
+
message: `tool '${name}' uses dynamic egress 'property:${key}' but '${key}' is not in the tool's propertyKeys (the runtime needs it on ctx.properties to resolve)`,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
158
169
|
}
|
|
159
|
-
if (
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
170
|
+
else if (ref.startsWith('secret:')) {
|
|
171
|
+
const key = ref.slice('secret:'.length);
|
|
172
|
+
if (!declaredSecrets.has(key)) {
|
|
173
|
+
ctx.addIssue({
|
|
174
|
+
code: 'custom',
|
|
175
|
+
path: ['tools', name, 'options', 'network', 'egress'],
|
|
176
|
+
message: `tool '${name}' uses dynamic egress 'secret:${key}' but '${key}' is not declared in defineCLI({ secrets })`,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
if (!t.options.secretKeys.includes(key)) {
|
|
180
|
+
ctx.addIssue({
|
|
181
|
+
code: 'custom',
|
|
182
|
+
path: ['tools', name, 'options', 'network', 'egress'],
|
|
183
|
+
message: `tool '${name}' uses dynamic egress 'secret:${key}' but '${key}' is not in the tool's secretKeys`,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
165
186
|
}
|
|
166
187
|
}
|
|
167
188
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { tool, isAkaiTool, DYNAMIC_EGRESS_PREFIX } from './tool.js';
|
|
1
|
+
export { tool, isAkaiTool, DYNAMIC_EGRESS_PREFIX, DYNAMIC_EGRESS_PREFIXES, isDynamicEgressRef } from './tool.js';
|
|
2
2
|
export { defineCLI } from './define-cli.js';
|
|
3
3
|
export { filePath, FILE_INPUT_META_KEY } from './file-input.js';
|
|
4
4
|
export { defineConnection, isAkaiConnection } from './define-connection.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts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rB,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,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,YAAY,GACb,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { tool, isAkaiTool, DYNAMIC_EGRESS_PREFIX } from './tool.js';
|
|
1
|
+
export { tool, isAkaiTool, DYNAMIC_EGRESS_PREFIX, DYNAMIC_EGRESS_PREFIXES, isDynamicEgressRef } from './tool.js';
|
|
2
2
|
export { defineCLI } from './define-cli.js';
|
|
3
3
|
export { filePath, FILE_INPUT_META_KEY } from './file-input.js';
|
|
4
4
|
export { defineConnection, isAkaiConnection } from './define-connection.js';
|
|
@@ -2,10 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
import type { ConnectionManifest } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Cross-check for dynamic-egress references. Mirrors the invariant
|
|
5
|
-
* `defineCLI()` enforces at spec time:
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* resolve the egress host from the resolved property value).
|
|
5
|
+
* `defineCLI()` enforces at spec time:
|
|
6
|
+
* - `{ from: 'property:KEY' }` requires KEY in `properties[]` + tool's `propertyKeys`.
|
|
7
|
+
* - `{ from: 'secret:KEY' }` requires KEY in `secrets[]` + tool's `secretKeys`.
|
|
9
8
|
*
|
|
10
9
|
* Validating this at the manifest layer matters for untrusted inputs
|
|
11
10
|
* (S3-fetched manifests, hand-crafted payloads) where the invariant
|
|
@@ -25,6 +24,7 @@ export declare const ConnectionManifestSchema: z.ZodObject<{
|
|
|
25
24
|
description: z.ZodString;
|
|
26
25
|
required: z.ZodBoolean;
|
|
27
26
|
injected: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
adminManaged: z.ZodOptional<z.ZodBoolean>;
|
|
28
28
|
}, z.core.$strip>>;
|
|
29
29
|
properties: z.ZodArray<z.ZodObject<{
|
|
30
30
|
key: z.ZodString;
|
|
@@ -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;AAsGrD;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2CnC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAsD,CAAC;AAExF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAE/D"}
|
|
@@ -19,6 +19,7 @@ const ManifestSecretSchema = z.object({
|
|
|
19
19
|
description: z.string(),
|
|
20
20
|
required: z.boolean(),
|
|
21
21
|
injected: z.boolean().optional(),
|
|
22
|
+
adminManaged: z.boolean().optional(),
|
|
22
23
|
});
|
|
23
24
|
const ManifestPropertySchema = z.object({
|
|
24
25
|
key: z.string(),
|
|
@@ -47,10 +48,10 @@ const ToolManifestBaseShape = {
|
|
|
47
48
|
outputSchema: JsonSchemaField,
|
|
48
49
|
};
|
|
49
50
|
// Dynamic-egress reference. Same shape the SDK accepts at spec time and
|
|
50
|
-
// emits on the wire. Format: `property:<UPPER_SNAKE_KEY>`.
|
|
51
|
+
// emits on the wire. Format: `property:<UPPER_SNAKE_KEY>` or `secret:<UPPER_SNAKE_KEY>`.
|
|
51
52
|
const DynamicEgressSchema = z.object({
|
|
52
|
-
from: z.string().regex(/^property:[A-Z][A-Z0-9_]*$/, {
|
|
53
|
-
error: 'egress.from must match "property:<KEY>" with KEY in upper-snake-case',
|
|
53
|
+
from: z.string().regex(/^(?:property|secret):[A-Z][A-Z0-9_]*$/, {
|
|
54
|
+
error: 'egress.from must match "property:<KEY>" or "secret:<KEY>" with KEY in upper-snake-case',
|
|
54
55
|
}),
|
|
55
56
|
});
|
|
56
57
|
const HttpToolManifestSchema = z.object({
|
|
@@ -91,17 +92,17 @@ const ConnectionManifestBaseSchema = z.object({
|
|
|
91
92
|
});
|
|
92
93
|
/**
|
|
93
94
|
* Cross-check for dynamic-egress references. Mirrors the invariant
|
|
94
|
-
* `defineCLI()` enforces at spec time:
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* resolve the egress host from the resolved property value).
|
|
95
|
+
* `defineCLI()` enforces at spec time:
|
|
96
|
+
* - `{ from: 'property:KEY' }` requires KEY in `properties[]` + tool's `propertyKeys`.
|
|
97
|
+
* - `{ from: 'secret:KEY' }` requires KEY in `secrets[]` + tool's `secretKeys`.
|
|
98
98
|
*
|
|
99
99
|
* Validating this at the manifest layer matters for untrusted inputs
|
|
100
100
|
* (S3-fetched manifests, hand-crafted payloads) where the invariant
|
|
101
101
|
* may have been broken between emission and consumption.
|
|
102
102
|
*/
|
|
103
103
|
export const ConnectionManifestSchema = ConnectionManifestBaseSchema.superRefine((m, ctx) => {
|
|
104
|
-
const
|
|
104
|
+
const declaredProperties = new Set(m.properties.map((p) => p.key));
|
|
105
|
+
const declaredSecrets = new Set(m.secrets.map((s) => s.key));
|
|
105
106
|
for (let i = 0; i < m.tools.length; i++) {
|
|
106
107
|
const t = m.tools[i];
|
|
107
108
|
if (t.transport !== 'http')
|
|
@@ -109,20 +110,40 @@ export const ConnectionManifestSchema = ConnectionManifestBaseSchema.superRefine
|
|
|
109
110
|
const egress = t.egress;
|
|
110
111
|
if (Array.isArray(egress) || egress === null)
|
|
111
112
|
continue;
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
const ref = egress.from;
|
|
114
|
+
if (ref.startsWith('property:')) {
|
|
115
|
+
const key = ref.slice('property:'.length);
|
|
116
|
+
if (!declaredProperties.has(key)) {
|
|
117
|
+
ctx.addIssue({
|
|
118
|
+
code: 'custom',
|
|
119
|
+
path: ['tools', i, 'egress'],
|
|
120
|
+
message: `dynamic egress 'property:${key}' but '${key}' is not declared in manifest.properties[]`,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
if (!t.propertyKeys.includes(key)) {
|
|
124
|
+
ctx.addIssue({
|
|
125
|
+
code: 'custom',
|
|
126
|
+
path: ['tools', i, 'egress'],
|
|
127
|
+
message: `dynamic egress 'property:${key}' but '${key}' is not in tools[${i}].propertyKeys`,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
119
130
|
}
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
131
|
+
else if (ref.startsWith('secret:')) {
|
|
132
|
+
const key = ref.slice('secret:'.length);
|
|
133
|
+
if (!declaredSecrets.has(key)) {
|
|
134
|
+
ctx.addIssue({
|
|
135
|
+
code: 'custom',
|
|
136
|
+
path: ['tools', i, 'egress'],
|
|
137
|
+
message: `dynamic egress 'secret:${key}' but '${key}' is not declared in manifest.secrets[]`,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
if (!t.secretKeys.includes(key)) {
|
|
141
|
+
ctx.addIssue({
|
|
142
|
+
code: 'custom',
|
|
143
|
+
path: ['tools', i, 'egress'],
|
|
144
|
+
message: `dynamic egress 'secret:${key}' but '${key}' is not in tools[${i}].secretKeys`,
|
|
145
|
+
});
|
|
146
|
+
}
|
|
126
147
|
}
|
|
127
148
|
}
|
|
128
149
|
});
|
|
@@ -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,CAmCxD"}
|
|
@@ -33,7 +33,8 @@ export function toSchema(cli) {
|
|
|
33
33
|
name: s.name,
|
|
34
34
|
description: s.description,
|
|
35
35
|
required: s.required,
|
|
36
|
-
...(s.injected
|
|
36
|
+
...(s.injected ? { injected: true } : {}),
|
|
37
|
+
...(s.adminManaged ? { adminManaged: true } : {}),
|
|
37
38
|
})),
|
|
38
39
|
properties: cli.properties.map((p) => ({
|
|
39
40
|
key: p.key,
|
package/dist/manifest/types.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface ManifestSecret {
|
|
|
18
18
|
readonly description: string;
|
|
19
19
|
readonly required: boolean;
|
|
20
20
|
readonly injected?: boolean;
|
|
21
|
+
readonly adminManaged?: boolean;
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
* Non-sensitive tenant property — wire shape of {@link PropertyDecl}.
|
|
@@ -60,7 +61,7 @@ interface BaseToolManifest {
|
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
62
63
|
* Dynamic egress reference (mirrors {@link DynamicEgress} from the SDK types).
|
|
63
|
-
* The host runtime resolves the named property at invocation time.
|
|
64
|
+
* The host runtime resolves the named property or secret at invocation time.
|
|
64
65
|
*
|
|
65
66
|
* Kept as a separate manifest type (vs reusing `DynamicEgress` from the
|
|
66
67
|
* SDK) so the manifest layer's contract is self-contained — consumers
|
|
@@ -68,7 +69,7 @@ interface BaseToolManifest {
|
|
|
68
69
|
* understand the wire shape.
|
|
69
70
|
*/
|
|
70
71
|
export interface DynamicEgressManifest {
|
|
71
|
-
readonly from: `property:${string}`;
|
|
72
|
+
readonly from: `property:${string}` | `secret:${string}`;
|
|
72
73
|
}
|
|
73
74
|
/**
|
|
74
75
|
* HTTP-transport tool. The only variant `cli.toSchema()` emits today —
|
|
@@ -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;
|
|
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,QAA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ToolSpec } from './types.js';
|
|
3
|
-
/**
|
|
3
|
+
/** @deprecated Use {@link DYNAMIC_EGRESS_PREFIXES} or {@link isDynamicEgressRef}. Kept for backwards compatibility. */
|
|
4
4
|
export declare const DYNAMIC_EGRESS_PREFIX: "property:";
|
|
5
|
+
/** All recognised dynamic-egress ref prefixes. */
|
|
6
|
+
export declare const DYNAMIC_EGRESS_PREFIXES: readonly ["property:", "secret:"];
|
|
7
|
+
/** Returns true when `s` starts with a recognised dynamic-egress prefix. */
|
|
8
|
+
export declare function isDynamicEgressRef(s: string): boolean;
|
|
5
9
|
/**
|
|
6
10
|
* Type guard for tools produced by {@link tool}. Uses an internal `WeakSet`
|
|
7
11
|
* so a hand-crafted `{ __akaiTool: true, ... }` value does not qualify —
|
package/dist/tool.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,IAAI,MAAM,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAiB,OAAO,EAAE,QAAQ,EAAa,MAAM,YAAY,CAAC;AAG1F,
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,IAAI,MAAM,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAiB,OAAO,EAAE,QAAQ,EAAa,MAAM,YAAY,CAAC;AAG1F,uHAAuH;AACvH,eAAO,MAAM,qBAAqB,EAAG,WAAoB,CAAC;AAE1D,kDAAkD;AAClD,eAAO,MAAM,uBAAuB,mCAAmD,CAAC;AAExF,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAErD;AAcD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,UAAU,CAEtD;AA2HD,QAAA,MAAM,WAAW,gCAAe,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,IAAI,CAClB,CAAC,SAAS,OAAO,GAAG,OAAO,WAAW,EACtC,CAAC,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACzC,KAAK,CAAC,CAAC,SAAS,MAAM,GAAG,KAAK,EAC9B,KAAK,CAAC,CAAC,SAAS,MAAM,GAAG,KAAK,EAE9B,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GACzB,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAkD3E"}
|
package/dist/tool.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AkaiSpecError } from './errors.js';
|
|
3
|
-
/**
|
|
3
|
+
/** @deprecated Use {@link DYNAMIC_EGRESS_PREFIXES} or {@link isDynamicEgressRef}. Kept for backwards compatibility. */
|
|
4
4
|
export const DYNAMIC_EGRESS_PREFIX = 'property:';
|
|
5
|
+
/** All recognised dynamic-egress ref prefixes. */
|
|
6
|
+
export const DYNAMIC_EGRESS_PREFIXES = Object.freeze(['property:', 'secret:']);
|
|
7
|
+
/** Returns true when `s` starts with a recognised dynamic-egress prefix. */
|
|
8
|
+
export function isDynamicEgressRef(s) {
|
|
9
|
+
return DYNAMIC_EGRESS_PREFIXES.some((p) => s.startsWith(p));
|
|
10
|
+
}
|
|
5
11
|
// Multi-label DNS hostname: alphanumeric labels + hyphens (not leading/trailing),
|
|
6
12
|
// at least one dot, last label must start with a letter (rejects IPv4 literals
|
|
7
13
|
// like 127.0.0.1). Doesn't cover IPv6 / IDN — good enough for spec-time guidance.
|
|
@@ -32,23 +38,23 @@ const ZodSchemaShape = z.custom((val) => typeof val === 'object' &&
|
|
|
32
38
|
const Hostname = z
|
|
33
39
|
.string({ error: 'invalid egress host' })
|
|
34
40
|
.regex(HOSTNAME_RE, { error: (issue) => `invalid egress host: ${JSON.stringify(issue.input)}` });
|
|
35
|
-
// Dynamic egress: `{ from: 'property:KEY' }
|
|
36
|
-
// property declarations happen in
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
const
|
|
41
|
+
// Dynamic egress: `{ from: 'property:KEY' }` or `{ from: 'secret:KEY' }`.
|
|
42
|
+
// Cross-checks against the CLI's property/secret declarations happen in
|
|
43
|
+
// `defineCLI()`; here we only validate shape. Keys are upper-snake-case
|
|
44
|
+
// (e.g. `JIRA_BASE_URL`, `ZENDESK_SUBDOMAIN`, `SUPPORT_APP_URL`).
|
|
45
|
+
const EGRESS_REF_RE = /^(?:property|secret):[A-Z][A-Z0-9_]*$/;
|
|
40
46
|
const DynamicEgressShape = z.object({
|
|
41
47
|
from: z
|
|
42
|
-
.string({ error: 'egress.from must be a string like "property:<KEY>"' })
|
|
43
|
-
.regex(
|
|
44
|
-
error: (issue) => `invalid dynamic egress reference ${JSON.stringify(issue.input)}: expected 'property:<KEY>' where KEY is upper-snake-case`,
|
|
48
|
+
.string({ error: 'egress.from must be a string like "property:<KEY>" or "secret:<KEY>"' })
|
|
49
|
+
.regex(EGRESS_REF_RE, {
|
|
50
|
+
error: (issue) => `invalid dynamic egress reference ${JSON.stringify(issue.input)}: expected 'property:<KEY>' or 'secret:<KEY>' where KEY is upper-snake-case`,
|
|
45
51
|
}),
|
|
46
|
-
}, { error: 'must be { from: "property:<KEY>" }' });
|
|
52
|
+
}, { error: 'must be { from: "property:<KEY>" } or { from: "secret:<KEY>" }' });
|
|
47
53
|
const Egress = z.union([
|
|
48
54
|
Hostname,
|
|
49
55
|
z.array(Hostname).min(1, { error: 'must declare at least one host' }),
|
|
50
56
|
DynamicEgressShape,
|
|
51
|
-
], { error: 'must be a hostname, array of hostnames, or { from: "property:<KEY>" }' });
|
|
57
|
+
], { error: 'must be a hostname, array of hostnames, or { from: "property:<KEY>" } / { from: "secret:<KEY>" }' });
|
|
52
58
|
const SecretKey = z.string({ error: 'invalid secret key' }).min(1, { error: 'invalid secret key' });
|
|
53
59
|
const PropertyKey = z.string({ error: 'invalid property key' }).min(1, { error: 'invalid property key' });
|
|
54
60
|
const NetworkOptionsShape = z.object({ egress: Egress });
|
|
@@ -192,8 +198,8 @@ export function tool(spec) {
|
|
|
192
198
|
network: {
|
|
193
199
|
egress: normalizeEgress(
|
|
194
200
|
// Zod's inferred type widens `from` to `string`; the spec is
|
|
195
|
-
// validated by `
|
|
196
|
-
// the `property:${string}` template-literal contract.
|
|
201
|
+
// validated by `EGRESS_REF_RE` so the runtime value matches
|
|
202
|
+
// the `property:${string} | secret:${string}` template-literal contract.
|
|
197
203
|
network.egress),
|
|
198
204
|
},
|
|
199
205
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface SecretDecl {
|
|
|
7
7
|
readonly required: boolean;
|
|
8
8
|
readonly key: string;
|
|
9
9
|
readonly injected?: boolean;
|
|
10
|
+
readonly adminManaged?: boolean;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* A non-sensitive tenant property declared at the CLI level. Use this for
|
|
@@ -25,15 +26,20 @@ export interface PropertyDecl {
|
|
|
25
26
|
}
|
|
26
27
|
/**
|
|
27
28
|
* Dynamic egress reference — resolved at runtime by the host (DT service)
|
|
28
|
-
* from the named property. Used for multi-tenant connectors (Jira,
|
|
29
|
-
* Looker self-hosted, GHES, Salesforce) where the host varies per tenant.
|
|
29
|
+
* from the named property or secret. Used for multi-tenant connectors (Jira,
|
|
30
|
+
* Zendesk, Looker self-hosted, GHES, Salesforce) where the host varies per tenant.
|
|
30
31
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
32
|
+
* Two forms are accepted:
|
|
33
|
+
* - `property:<KEY>` — KEY matches an entry in the CLI's `properties[].key`;
|
|
34
|
+
* `defineCLI()` cross-checks KEY is declared in `properties[]` and the
|
|
35
|
+
* tool lists it in `options.propertyKeys`.
|
|
36
|
+
* - `secret:<KEY>` — KEY matches an entry in the CLI's `secrets[].key`;
|
|
37
|
+
* `defineCLI()` cross-checks KEY is declared in `secrets[]` and the tool
|
|
38
|
+
* lists it in `options.secretKeys`. Prefer this for per-tenant host URLs
|
|
39
|
+
* that are forwarded through the worker `/tools/execute` envelope as secrets.
|
|
34
40
|
*/
|
|
35
41
|
export interface DynamicEgress {
|
|
36
|
-
readonly from: `property:${string}`;
|
|
42
|
+
readonly from: `property:${string}` | `secret:${string}`;
|
|
37
43
|
}
|
|
38
44
|
/**
|
|
39
45
|
* Network-egress allowlist for a tool. Either a static list of hostnames
|
|
@@ -124,9 +130,9 @@ export interface ToolCtx<S extends string = string, P extends string = string> {
|
|
|
124
130
|
*/
|
|
125
131
|
writeFile: (name: string, data: Buffer | Uint8Array | string) => Promise<void>;
|
|
126
132
|
/** OAuth access token for this tool's connection, auto-wired by the host. */
|
|
127
|
-
oauth?: {
|
|
133
|
+
oauth?: Readonly<{
|
|
128
134
|
accessToken: string;
|
|
129
|
-
}
|
|
135
|
+
}>;
|
|
130
136
|
}
|
|
131
137
|
/** A built tool. Opaque to consumers, introspectable by the SDK. */
|
|
132
138
|
export interface ToolDef<TInput = unknown, TOutput = unknown, TSecrets extends string = string, TProperties extends string = string> {
|
|
@@ -198,9 +204,10 @@ export interface CLIDef {
|
|
|
198
204
|
* runtime, so authors must explicitly decide. Mark `true` for reads, `false`
|
|
199
205
|
* for writes (writes pause for user approval).
|
|
200
206
|
* - `egress` accepts a single host string, array shorthand, or a
|
|
201
|
-
* {@link DynamicEgress} reference (`{ from: 'property:KEY' }`
|
|
202
|
-
*
|
|
203
|
-
* the
|
|
207
|
+
* {@link DynamicEgress} reference (`{ from: 'property:KEY' }` or
|
|
208
|
+
* `{ from: 'secret:KEY' }`) for tenant-URL connectors. Dynamic egress
|
|
209
|
+
* requires the referenced key be declared in the CLI's `properties[]` /
|
|
210
|
+
* `secrets[]` AND included in this tool's `propertyKeys` / `secretKeys`.
|
|
204
211
|
* - `transport` defaults to `'http'`. Set to `'native'` for in-process
|
|
205
212
|
* handlers (no network); then `options.network` becomes optional and
|
|
206
213
|
* `ctx.fetch` throws if called.
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,uEAAuE;AACvE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,uEAAuE;AACvE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC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