@akai-workflow-builder/cli-sdk 0.1.0 → 0.1.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"build-ctx.d.ts","sourceRoot":"","sources":["../../src/ctx/build-ctx.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAc,MAAM,EAAiB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG1F;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6GAA6G;IAC7G,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,sGAAsG;IACtG,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AA4CD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAsDxD"}
1
+ {"version":3,"file":"build-ctx.d.ts","sourceRoot":"","sources":["../../src/ctx/build-ctx.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAc,MAAM,EAAiB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG1F;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6GAA6G;IAC7G,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,sGAAsG;IACtG,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AA4CD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAoDxD"}
@@ -71,11 +71,9 @@ export function buildCtx(params) {
71
71
  ...(params.extraSafePathRoots ?? []),
72
72
  ]);
73
73
  const readFile = createReadFile({ safePath, signal: params.signal });
74
- // `ctx.writeFile` is wired only when the host provisioned an output channel
75
- // (outputDir). Tools declaring `options.producesFiles` get a real writer;
76
- // everything else gets a throwing stub so an undeclared write surfaces
77
- // clearly instead of leaking files onto a stray path.
78
- const writeFile = params.outputDir !== undefined
74
+ // Real writer only when the tool opted in (producesFiles) AND the host gave
75
+ // an outputDir enforces the opt-in at the SDK boundary; else a throwing stub.
76
+ const writeFile = tool.options.producesFiles === true && params.outputDir !== undefined
79
77
  ? createWriteFile({ outputDir: params.outputDir })
80
78
  : unavailableWriteFile();
81
79
  return Object.freeze({
@@ -9,17 +9,18 @@ export interface CreateWriteFileOptions {
9
9
  }
10
10
  /**
11
11
  * Build a `ctx.writeFile(name, data)` that stages an output file under the
12
- * invocation's output directory. `name` is a relative path that must stay
13
- * inside `outputDir`: absolute paths and `..` traversal are rejected with
14
- * `AkaiPathError`. Parent directories are created as needed. Pairs with
15
- * `options.producesFiles: true`, which tells the host to provision this
16
- * channel before invoking the tool.
12
+ * invocation's output directory. `name` must resolve inside `outputDir`;
13
+ * absolute paths, `..` escapes, and symlink traversal are rejected with
14
+ * `AkaiPathError` via the same realpath-stabilised check as `ctx.safePath`.
15
+ * Parent directories are created as needed. Pairs with `options.producesFiles`.
17
16
  */
18
17
  export declare function createWriteFile(opts: CreateWriteFileOptions): (name: string, data: Buffer | Uint8Array | string) => Promise<void>;
19
18
  /**
20
- * Stub installed on `ctx.writeFile` when the host runtime provided no output
21
- * channel (the tool did not declare `options.producesFiles`). Calling it is a
22
- * tool-author error surface it clearly rather than writing to a stray path.
19
+ * Stub installed on `ctx.writeFile` when no output channel was provisioned
20
+ * either the tool did not declare `options.producesFiles`, or it did but the
21
+ * host runtime did not supply the output staging dir. Calling it is an
22
+ * integration error — surface both causes clearly rather than writing to a
23
+ * stray path.
23
24
  */
24
25
  export declare function unavailableWriteFile(): (name: string, data: unknown) => Promise<void>;
25
26
  //# sourceMappingURL=write-file.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"write-file.d.ts","sourceRoot":"","sources":["../../src/ctx/write-file.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,sBAAsB,GAC3B,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAkBrE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAQrF"}
1
+ {"version":3,"file":"write-file.d.ts","sourceRoot":"","sources":["../../src/ctx/write-file.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,sBAAsB,GAC3B,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAyBrE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAQrF"}
@@ -1,16 +1,22 @@
1
1
  import { mkdir, writeFile as fsWriteFile } from 'node:fs/promises';
2
- import { dirname, isAbsolute, relative, resolve } from 'node:path';
2
+ import { dirname, isAbsolute, resolve } from 'node:path';
3
+ import { createSafePath } from './safe-path.js';
3
4
  import { AkaiPathError } from '../errors.js';
4
5
  /**
5
6
  * Build a `ctx.writeFile(name, data)` that stages an output file under the
6
- * invocation's output directory. `name` is a relative path that must stay
7
- * inside `outputDir`: absolute paths and `..` traversal are rejected with
8
- * `AkaiPathError`. Parent directories are created as needed. Pairs with
9
- * `options.producesFiles: true`, which tells the host to provision this
10
- * channel before invoking the tool.
7
+ * invocation's output directory. `name` must resolve inside `outputDir`;
8
+ * absolute paths, `..` escapes, and symlink traversal are rejected with
9
+ * `AkaiPathError` via the same realpath-stabilised check as `ctx.safePath`.
10
+ * Parent directories are created as needed. Pairs with `options.producesFiles`.
11
11
  */
12
12
  export function createWriteFile(opts) {
13
+ // Reject empty/whitespace outputDir: `path.resolve('')` falls back to
14
+ // `process.cwd()`, which would silently stage files into the runtime's cwd.
15
+ if (typeof opts.outputDir !== 'string' || opts.outputDir.trim() === '') {
16
+ throw new AkaiPathError('createWriteFile: outputDir must be a non-empty string');
17
+ }
13
18
  const root = resolve(opts.outputDir);
19
+ const safePath = createSafePath([root]);
14
20
  return async function writeFile(name, data) {
15
21
  if (typeof name !== 'string' || name.length === 0) {
16
22
  throw new Error('ctx.writeFile: name must be a non-empty string');
@@ -18,23 +24,26 @@ export function createWriteFile(opts) {
18
24
  if (isAbsolute(name)) {
19
25
  throw new AkaiPathError(`ctx.writeFile: name must be relative, got absolute path "${name}"`);
20
26
  }
21
- const target = resolve(root, name);
22
- const rel = relative(root, target);
23
- if (rel === '' || rel === '..' || rel.startsWith(`..`) || isAbsolute(rel)) {
24
- throw new AkaiPathError(`ctx.writeFile: name escapes the output directory: "${name}"`);
27
+ const abs = resolve(root, name);
28
+ if (abs === root) {
29
+ throw new AkaiPathError(`ctx.writeFile: name cannot reference the output directory itself: "${name}"`);
25
30
  }
31
+ // realpath-stabilises parents → a symlink can't redirect outside the root.
32
+ const target = safePath(abs);
26
33
  await mkdir(dirname(target), { recursive: true });
27
34
  const bytes = typeof data === 'string' ? Buffer.from(data, 'utf8') : data;
28
35
  await fsWriteFile(target, bytes);
29
36
  };
30
37
  }
31
38
  /**
32
- * Stub installed on `ctx.writeFile` when the host runtime provided no output
33
- * channel (the tool did not declare `options.producesFiles`). Calling it is a
34
- * tool-author error surface it clearly rather than writing to a stray path.
39
+ * Stub installed on `ctx.writeFile` when no output channel was provisioned
40
+ * either the tool did not declare `options.producesFiles`, or it did but the
41
+ * host runtime did not supply the output staging dir. Calling it is an
42
+ * integration error — surface both causes clearly rather than writing to a
43
+ * stray path.
35
44
  */
36
45
  export function unavailableWriteFile() {
37
46
  return function writeFile() {
38
- return Promise.reject(new AkaiPathError('ctx.writeFile is unavailable: declare options.producesFiles: true so the host runtime provisions an output channel'));
47
+ return Promise.reject(new AkaiPathError('ctx.writeFile is unavailable: no output channel provisioned. Declare options.producesFiles: true on the tool, and ensure the host runtime supplies an outputDir for it.'));
39
48
  };
40
49
  }
@@ -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;AA6KxF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAiD/C"}
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;AA2LxF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAmD/C"}
@@ -89,6 +89,16 @@ const CLISpecShape = z
89
89
  seen.add(p.key);
90
90
  }
91
91
  }),
92
+ connectionSlug: z
93
+ .string({ error: 'connectionSlug must be a string if provided' })
94
+ .min(1, { error: 'connectionSlug must not be empty if provided' })
95
+ .regex(CLI_ID_RE, {
96
+ error: (issue) => `invalid connectionSlug ${JSON.stringify(issue.input)}: lowercase letters/digits/hyphens/underscores only, must start with a letter`,
97
+ })
98
+ .optional(),
99
+ vendorScopes: z
100
+ .array(z.string({ error: 'vendorScopes[i] must be a string' }).min(1, { error: 'vendorScopes[i] must not be empty' }), { error: 'vendorScopes must be an array of strings if provided' })
101
+ .optional(),
92
102
  tools: z.custom(isPlainObjectMap, {
93
103
  error: 'tools must be a plain object map',
94
104
  }),
@@ -243,6 +253,8 @@ export function defineCLI(spec) {
243
253
  instructions: Object.freeze([...(v.instructions ?? [])]),
244
254
  secrets: frozenSecrets,
245
255
  properties: frozenProperties,
256
+ ...(v.connectionSlug !== undefined ? { connectionSlug: v.connectionSlug } : {}),
257
+ ...(v.vendorScopes !== undefined ? { vendorScopes: Object.freeze([...v.vendorScopes]) } : {}),
246
258
  tools: Object.freeze(toolsMap),
247
259
  };
248
260
  // Non-enumerable so it doesn't appear in Object.keys / JSON.stringify / spreads.
@@ -31,6 +31,8 @@ export declare const ConnectionManifestSchema: z.ZodObject<{
31
31
  description: z.ZodString;
32
32
  required: z.ZodBoolean;
33
33
  }, z.core.$strip>>;
34
+ connectionSlug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ vendorScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
34
36
  tools: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
35
37
  transport: z.ZodLiteral<"http">;
36
38
  egress: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
@@ -40,6 +42,7 @@ export declare const ConnectionManifestSchema: z.ZodObject<{
40
42
  name: z.ZodNullable<z.ZodString>;
41
43
  description: z.ZodNullable<z.ZodString>;
42
44
  isReadonly: z.ZodBoolean;
45
+ producesFiles: z.ZodOptional<z.ZodBoolean>;
43
46
  secretKeys: z.ZodArray<z.ZodString>;
44
47
  propertyKeys: z.ZodArray<z.ZodString>;
45
48
  inputSchema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -51,6 +54,7 @@ export declare const ConnectionManifestSchema: z.ZodObject<{
51
54
  name: z.ZodNullable<z.ZodString>;
52
55
  description: z.ZodNullable<z.ZodString>;
53
56
  isReadonly: z.ZodBoolean;
57
+ producesFiles: z.ZodOptional<z.ZodBoolean>;
54
58
  secretKeys: z.ZodArray<z.ZodString>;
55
59
  propertyKeys: z.ZodArray<z.ZodString>;
56
60
  inputSchema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -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;AAoFrD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuBnC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAsD,CAAC;AAExF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAE/D"}
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;AAoGrD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuBnC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAsD,CAAC;AAExF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAE/D"}
@@ -1,5 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  import { SCHEMA_VERSION } from './constants.js';
3
+ // Mirrors defineCLI()'s CLI_ID_RE — a connection slug uses the same shape as a
4
+ // cli id (lowercase letter, then letters/digits/hyphens/underscores).
5
+ const CONNECTION_SLUG_RE = /^[a-z][a-z0-9_-]*$/;
3
6
  /**
4
7
  * Zod schema mirroring {@link ConnectionManifest}. Source of truth for both
5
8
  * runtime validation (via {@link validateManifest}) and the published
@@ -33,6 +36,10 @@ const ToolManifestBaseShape = {
33
36
  name: z.string().nullable(),
34
37
  description: z.string().nullable(),
35
38
  isReadonly: z.boolean(),
39
+ // Optional on the wire (older manifests predate it; "Absent = false"), but
40
+ // must be in the validator so `validateManifest()` round-trips it instead of
41
+ // Zod silently stripping the host's output-channel provisioning signal.
42
+ producesFiles: z.boolean().optional(),
36
43
  secretKeys: z.array(z.string()),
37
44
  propertyKeys: z.array(z.string()),
38
45
  inputSchema: JsonSchemaField,
@@ -71,6 +78,14 @@ const ConnectionManifestBaseSchema = z.object({
71
78
  instructions: z.array(z.string()),
72
79
  secrets: z.array(ManifestSecretSchema),
73
80
  properties: z.array(ManifestPropertySchema),
81
+ // Connection-grouping fields. Optional on the wire so manifests emitted
82
+ // before they existed still validate (same "absent = default" contract as
83
+ // producesFiles). `toSchema()` emits both explicitly: connectionSlug=null and
84
+ // vendorScopes=[] when undeclared. When present, mirror the constraints
85
+ // defineCLI() enforces (slug shape, non-empty scopes) so an untrusted/hand-
86
+ // crafted manifest can't smuggle an empty or malformed grouping value.
87
+ connectionSlug: z.string().regex(CONNECTION_SLUG_RE).nullable().optional(),
88
+ vendorScopes: z.array(z.string().min(1)).optional(),
74
89
  tools: z.array(ToolManifestSchema),
75
90
  });
76
91
  /**
@@ -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,CA+BxD"}
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,CAiCxD"}
@@ -40,6 +40,8 @@ export function toSchema(cli) {
40
40
  description: p.description,
41
41
  required: p.required,
42
42
  })),
43
+ connectionSlug: cli.connectionSlug ?? null,
44
+ vendorScopes: [...(cli.vendorScopes ?? [])],
43
45
  tools,
44
46
  };
45
47
  }
@@ -49,7 +51,7 @@ function toToolManifest(id, t) {
49
51
  name: t.name ?? null,
50
52
  description: t.description ?? null,
51
53
  isReadonly: t.options.isReadonly,
52
- producesFiles: t.options.producesFiles === true,
54
+ producesFiles: t.options.producesFiles,
53
55
  secretKeys: [...t.options.secretKeys],
54
56
  propertyKeys: [...t.options.propertyKeys],
55
57
  inputSchema: tryJsonSchema(t.input),
@@ -43,7 +43,12 @@ interface BaseToolManifest {
43
43
  /** Human description, or `null` when omitted. */
44
44
  readonly description: string | null;
45
45
  readonly isReadonly: boolean;
46
- /** True when the tool emits output files via `ctx.writeFile` (host provisions an output channel). Absent = false. */
46
+ /**
47
+ * True when the tool emits output files via `ctx.writeFile` (host provisions
48
+ * an output channel). Semantic default is false; `toSchema()` emits it
49
+ * explicitly so it's usually present on the wire, but older / hand-authored
50
+ * manifests may omit it — consumers must treat absent as false.
51
+ */
47
52
  readonly producesFiles?: boolean;
48
53
  readonly secretKeys: readonly string[];
49
54
  readonly propertyKeys: readonly string[];
@@ -98,6 +103,20 @@ export interface ConnectionManifest {
98
103
  readonly instructions: readonly string[];
99
104
  readonly secrets: readonly ManifestSecret[];
100
105
  readonly properties: readonly ManifestProperty[];
106
+ /**
107
+ * Connection slug grouping CLIs that share one logical connection
108
+ * (e.g. gmail + gsheet → 'google'). `null` ⇒ the cli's `id` is the slug.
109
+ * Optional on the wire — manifests emitted before this field omit it, so
110
+ * consumers must resolve `connectionSlug ?? id`. `toSchema()` emits it
111
+ * explicitly (as `null` when undeclared).
112
+ */
113
+ readonly connectionSlug?: string | null;
114
+ /**
115
+ * OAuth scope URIs this CLI's tools need. Consumers union these across a
116
+ * connection group to build the authorize request. Optional on the wire;
117
+ * `toSchema()` emits `[]` when undeclared — treat absent as no scope.
118
+ */
119
+ readonly vendorScopes?: readonly string[];
101
120
  readonly tools: readonly ToolManifest[];
102
121
  }
103
122
  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;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,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;CAC5B;AAED;;;;;GAKG;AACH,UAAU,gBAAgB;IACxB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,iDAAiD;IACjD,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,qHAAqH;IACrH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;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AM,EAAE,CAAC;IAC1C,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;CACzC"}
package/dist/types.d.ts CHANGED
@@ -62,9 +62,10 @@ export interface ToolOptions<TSecrets extends string = string, TProperties exten
62
62
  * When true, the handler emits one or more output files via `ctx.writeFile`.
63
63
  * Host runtimes read this to provision an output channel (e.g. pre-mint an
64
64
  * upload URL) before invoking the tool, then deliver the written files back
65
- * to the caller's workdir. Defaults to false.
65
+ * to the caller's workdir. Always set post-builder — `tool()` normalizes an
66
+ * omitted input to `false`.
66
67
  */
67
- readonly producesFiles?: boolean;
68
+ readonly producesFiles: boolean;
68
69
  }
69
70
  /** Structured logger handed to tool handlers. Writes to stderr; stdout is reserved for handler output. */
70
71
  export interface ToolLogger {
@@ -116,8 +117,9 @@ export interface ToolCtx<S extends string = string, P extends string = string> {
116
117
  * workdir. `name` is a relative path under the invocation's output staging
117
118
  * area (no absolute path, no `..` segments). Use for tools that produce
118
119
  * files — downloads, exports; declare `options.producesFiles: true` so the
119
- * host provisions the output channel. Throws if the host did not provide an
120
- * output channel (i.e. the tool did not declare `producesFiles`).
120
+ * host provisions the output channel. Throws when no output channel was
121
+ * provisioned either the tool did not declare `producesFiles`, or it did
122
+ * but the host runtime did not supply the output staging dir.
121
123
  */
122
124
  writeFile: (name: string, data: Buffer | Uint8Array | string) => Promise<void>;
123
125
  }
@@ -164,6 +166,14 @@ export interface CLIDef {
164
166
  readonly instructions: ReadonlyArray<string>;
165
167
  readonly secrets: ReadonlyArray<SecretDecl>;
166
168
  readonly properties: ReadonlyArray<PropertyDecl>;
169
+ /**
170
+ * Connection slug this CLI belongs to. CLIs sharing a slug form one logical
171
+ * connection (e.g. gmail + gsheet → 'google'). Absent ⇒ the cli's own `id`
172
+ * is the slug.
173
+ */
174
+ readonly connectionSlug?: string;
175
+ /** OAuth scope URIs this CLI's tools need; the host unions them across the connection group. */
176
+ readonly vendorScopes?: readonly string[];
167
177
  readonly tools: Readonly<Record<string, AnyToolDef>>;
168
178
  /** Project this CLI to its Connections-manifest wire shape. Non-enumerable so JSON.stringify ignores it. */
169
179
  toSchema(): ConnectionManifest;
@@ -227,6 +237,15 @@ export interface CLISpec {
227
237
  secrets?: readonly SecretDecl[];
228
238
  /** Non-sensitive tenant properties (base URLs, subdomains, region). Distinct from `secrets[]`. */
229
239
  properties?: readonly PropertyDecl[];
240
+ /**
241
+ * Connection slug grouping this CLI with others that share one logical
242
+ * connection + OAuth token (e.g. gmail + gsheet → 'google'). Lowercase
243
+ * slug, same shape as `id`. Omit for single-CLI connections — the slug
244
+ * then defaults to `id`.
245
+ */
246
+ connectionSlug?: string;
247
+ /** OAuth scope URIs this CLI's tools need. The host unions these across the connection group. */
248
+ vendorScopes?: readonly string[];
230
249
  tools: Record<string, AnyToolDef>;
231
250
  }
232
251
  //# sourceMappingURL=types.d.ts.map
@@ -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;CACtB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,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;CACtB;AAED;;;;;;;;GAQG;AACH,MAAM,W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CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACnB,MAAM,EAAE,OAAO,CAAC;KACjB,KAAK,OAAO,CAAC,CAAC,SAAS,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;CAChE;AAED,sCAAsC;AACtC,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yFAAyF;IACzF,OAAO,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAChC,kGAAkG;IAClG,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IACrC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iGAAiG;IACjG,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACnC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akai-workflow-builder/cli-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Authoring SDK for atomic, agent-executable CLIs and tools.",
5
5
  "keywords": [
6
6
  "akai",