@tangle-network/agent-interface 5.7.0 → 5.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +11 -2
  2. package/dist/agent-candidate-code-schema.d.ts +24 -24
  3. package/dist/agent-candidate-execution-plan-schema.d.ts +245 -245
  4. package/dist/agent-candidate-lineage-schema.d.ts +2 -2
  5. package/dist/agent-candidate-outcome-schema.d.ts +56 -56
  6. package/dist/agent-candidate-profile-schema.d.ts +22 -22
  7. package/dist/agent-candidate-promotion-schema.d.ts +1824 -1824
  8. package/dist/agent-candidate-receipt-schema.d.ts +201 -201
  9. package/dist/agent-candidate-schema-common.d.ts +3 -3
  10. package/dist/agent-candidate-schema.d.ts +36 -36
  11. package/dist/agent-candidate-task-schema.d.ts +16 -16
  12. package/dist/agent-execution-preparation-receipt.d.ts +81 -81
  13. package/dist/agent-improvement-measurement-schema.d.ts +25 -25
  14. package/dist/agent-profile-improvement-schema.d.ts +75 -75
  15. package/dist/agent-profile.d.ts +10 -28
  16. package/dist/agent-workspace-lease.d.ts +4 -4
  17. package/dist/environment-interactive-control.d.ts +473 -473
  18. package/dist/environment-interactive-start.d.ts +38 -29
  19. package/dist/environment-observation.d.ts +32 -32
  20. package/dist/environment-profile-capabilities.d.ts +1 -1
  21. package/dist/environment-runtime.d.ts +171 -144
  22. package/dist/harness-capabilities.d.ts +17 -18
  23. package/dist/harness-capabilities.js +41 -44
  24. package/dist/harness.d.ts +13 -11
  25. package/dist/harness.js +5 -0
  26. package/dist/interaction-envelope.d.ts +26 -26
  27. package/dist/interaction-fields.d.ts +22 -22
  28. package/dist/interaction-permissions.d.ts +2 -2
  29. package/dist/learning-state.d.ts +143 -143
  30. package/dist/portable-context-base.d.ts +1 -1
  31. package/dist/portable-context-commitments.d.ts +8 -8
  32. package/dist/portable-context-continuation.d.ts +4 -4
  33. package/dist/portable-context-plan-request.d.ts +1 -1
  34. package/dist/portable-context-plan-wire.d.ts +2 -2
  35. package/dist/portable-context-plan.d.ts +5 -5
  36. package/dist/portable-context-shared.d.ts +1 -1
  37. package/dist/portable-context-transfer.d.ts +43 -34
  38. package/dist/profile-schema.d.ts +78 -60
  39. package/dist/profile-schema.js +7 -3
  40. package/dist/proxy-secrets.d.ts +12 -12
  41. package/dist/runtime-control.d.ts +5 -5
  42. package/dist/workspace-cleanup.d.ts +3 -3
  43. package/dist/workspace-fork.d.ts +4 -4
  44. package/package.json +5 -5
@@ -1,40 +1,49 @@
1
1
  import { REASONING_EFFORTS, } from "./agent-profile.js";
2
- /**
3
- * The unified harness capability layer — the single source of truth for:
4
- * 1. harness ↔ model compatibility (which models a harness can run),
5
- * 2. reasoning-effort support (which thinking levels a harness/model expresses), and
6
- * 3. system-prompt intents (whether a harness can replace its own prompt, add to it, or neither).
7
- *
8
- * All are facets of the same question — "what can this (harness, model) pair actually do" — and
9
- * apply to BOTH harness-backed systems (CLIs that speak a vendor wire, like claude-code, codex and kimi-code) AND
10
- * router-backed systems (opencode, cli-base: any model the router serves). Lifted here so the
11
- * cli-bridge backends, the sandbox UI pickers, and the router all read one truth instead of each
12
- * hand-rolling a divergent copy.
13
- *
14
- * Grounded in the native CLI controls (Codex is `minimal..ultra`, Kimi is binary on/off, Claude is
15
- * `low..max`, cli-base has no agent) — NOT a guessed matrix. The
16
- * per-MODEL reasoning capability (does this specific model reason at all) is dynamic catalog data the
17
- * caller supplies.
18
- */
2
+ import { resolveHarnessType } from "./harness.js";
3
+ /** Canonical harness/model, effort and prompt controls. Model-specific capability comes from the serving catalog. */
19
4
  /** low → high. `none` = thinking off; `ultracode` = max (claude-code mode). */
20
5
  export const reasoningLadder = REASONING_EFFORTS;
6
+ export class SeatSpecError extends Error {
7
+ code;
8
+ constructor(code, message) {
9
+ super(message);
10
+ this.code = code;
11
+ this.name = "SeatSpecError";
12
+ }
13
+ }
14
+ /** Parse harness/model[@effort] without credentials, account selection or model substitution. */
15
+ export function parseSeatSpec(value) {
16
+ const match = /^([^/\s@]+)\/([^/\s@][^\s@]*)(?:@([^\s@]+))?$/u.exec(value);
17
+ if (!match || /[\u0000-\u001f\u007f]/u.test(value) || match[2].split("/").some((part) => !part))
18
+ throw new SeatSpecError("SEAT_SYNTAX", "Expected harness/model[@effort]");
19
+ const [, name, model, effort] = match;
20
+ const harness = resolveHarnessType(name);
21
+ if (!harness)
22
+ throw new SeatSpecError("UNKNOWN_HARNESS", `Unknown harness '${name}'`);
23
+ if (effort !== undefined && !REASONING_EFFORTS.includes(effort))
24
+ throw new SeatSpecError("SEAT_SYNTAX", `Unknown reasoning effort '${effort}'; use ${REASONING_EFFORTS.join(", ")}`);
25
+ const reasoningEffort = effort;
26
+ if (reasoningEffort !== undefined && (!harnessHonorsEffort(harness) || !harnessReasoningEfforts(harness).includes(reasoningEffort)))
27
+ throw new SeatSpecError("SEAT_EFFORT_UNSUPPORTED", `Harness ${harness} cannot honor reasoning effort '${reasoningEffort}'`);
28
+ const support = harnessModelSupport(harness, model, { reasoningEffort });
29
+ if (!support.supported)
30
+ throw new SeatSpecError("MODEL_PROVIDER_MISMATCH", support.message);
31
+ return { harness, model, provider: support.provider, ...(reasoningEffort === undefined ? {} : { reasoningEffort }) };
32
+ }
33
+ /** Preserve the authored model and distinguish inherited effort from explicit none. */
34
+ export function formatSeatSpec(seat) {
35
+ const value = `${seat.harness}/${seat.model}${seat.reasoningEffort === undefined ? "" : `@${seat.reasoningEffort}`}`;
36
+ parseSeatSpec(value);
37
+ return value;
38
+ }
21
39
  // ── Harness ↔ model compatibility ────────────────────────────────────────────
22
40
  /**
23
- * Provider prefixes a harness is vendor-locked to (canonical-id prefix, e.g. `moonshot`). A harness
24
- * with no entry is router-backed: it runs any model, except the measured exclusions in
25
- * {@link harnessModelExclusions}.
26
- *
27
- * `claude-code` and `codex` are deliberately absent. Their CLIs speak a vendor wire (Anthropic
28
- * Messages, OpenAI Responses), but the Tangle Router passes only that vendor's own models through
29
- * natively and translates every other model on those wires to chat completions (text, images and
30
- * function tools, streamed or not; hosted tools are dropped), so both run any router-served model.
31
- * A caller's own vendor key or login still serves that vendor's models alone, which this table does
32
- * not see. Which harness a vendor's model adopts when the caller names none is
33
- * {@link vendorHarness}, a separate fact.
34
- *
35
- * `nanoclaw` is deliberately absent despite the "claw" name: its runner routes every provider through
36
- * the Tangle router (canonical model id straight to the gateway), so it is router-backed like
37
- * `opencode` — not Anthropic-locked.
41
+ * Vendor locks, before the measured {@link harnessModelExclusions}. Absent means router-backed.
42
+ * Claude Code and Codex run any Router model: their native vendor wire passes through for vendor
43
+ * models and translates others to chat completions (including images/tools; hosted tools drop).
44
+ * A caller's vendor key/login remains vendor-limited; this table does not know credentials.
45
+ * NanoClaw also routes every provider through the Router, so it has no Anthropic lock.
46
+ * {@link vendorHarness} chooses a default harness; it is not a provider restriction.
38
47
  */
39
48
  const harnessProviderLock = {
40
49
  "kimi-code": ["moonshot"],
@@ -256,19 +265,7 @@ export function snapHarnessToModel(harness, modelId) {
256
265
  * emits `--thinking`, represented here by `high`.
257
266
  */
258
267
  const harnessReasoningEffortsOverride = {
259
- codex: ["none", "minimal", "low", "medium", "high", "xhigh", "ultracode"],
260
268
  "claude-code": ["low", "medium", "high", "xhigh", "ultracode"],
261
- pi: ["none", "minimal", "low", "medium", "high", "xhigh", "ultracode"],
262
- prime: ["none", "minimal", "low", "medium", "high", "xhigh", "ultracode"],
263
- openclaw: [
264
- "none",
265
- "minimal",
266
- "low",
267
- "medium",
268
- "high",
269
- "xhigh",
270
- "ultracode",
271
- ],
272
269
  "kimi-code": ["none", "high"],
273
270
  };
274
271
  /**
package/dist/harness.d.ts CHANGED
@@ -12,22 +12,24 @@ import { z } from "zod";
12
12
  * assert protocol, model, profile-control or native-resume compatibility.
13
13
  */
14
14
  export declare const harnessTypeSchema: z.ZodEnum<{
15
- acp: "acp";
16
- amp: "amp";
17
15
  "claude-code": "claude-code";
18
- "cli-base": "cli-base";
19
- codex: "codex";
20
- cursor: "cursor";
21
- "factory-droids": "factory-droids";
22
- forge: "forge";
23
- gemini: "gemini";
24
- hermes: "hermes";
25
- "kimi-code": "kimi-code";
26
16
  nanoclaw: "nanoclaw";
27
- openclaw: "openclaw";
17
+ codex: "codex";
28
18
  opencode: "opencode";
19
+ "kimi-code": "kimi-code";
29
20
  pi: "pi";
30
21
  prime: "prime";
22
+ gemini: "gemini";
23
+ hermes: "hermes";
24
+ openclaw: "openclaw";
25
+ amp: "amp";
26
+ "factory-droids": "factory-droids";
27
+ forge: "forge";
28
+ cursor: "cursor";
29
+ acp: "acp";
30
+ "cli-base": "cli-base";
31
31
  }>;
32
32
  /** One declaration owns runtime validation and the compile-time vocabulary. */
33
33
  export type HarnessType = z.infer<typeof harnessTypeSchema>;
34
+ /** Command spellings resolve to canonical identities; authored profile schemas stay strict. */
35
+ export declare function resolveHarnessType(value: string): HarnessType | null;
package/dist/harness.js CHANGED
@@ -29,3 +29,8 @@ export const harnessTypeSchema = z.enum([
29
29
  "acp",
30
30
  "cli-base",
31
31
  ]);
32
+ /** Command spellings resolve to canonical identities; authored profile schemas stay strict. */
33
+ export function resolveHarnessType(value) {
34
+ const parsed = harnessTypeSchema.safeParse(value === "claude" ? "claude-code" : value === "kimi" ? "kimi-code" : value);
35
+ return parsed.success ? parsed.data : null;
36
+ }
@@ -21,8 +21,8 @@ export declare const InteractionSubjectSchema: z.ZodDiscriminatedUnion<[z.ZodObj
21
21
  }, z.core.$strict>], "type">;
22
22
  export type InteractionSubject = z.infer<typeof InteractionSubjectSchema>;
23
23
  export declare const InteractionOutcomeSchema: z.ZodEnum<{
24
- accepted: "accepted";
25
24
  cancelled: "cancelled";
25
+ accepted: "accepted";
26
26
  declined: "declined";
27
27
  }>;
28
28
  export type InteractionOutcome = z.infer<typeof InteractionOutcomeSchema>;
@@ -37,22 +37,22 @@ export declare const InteractionRequestBindingSchema: z.ZodObject<{
37
37
  export type InteractionRequestBinding = z.infer<typeof InteractionRequestBindingSchema>;
38
38
  /** Exact execution coordinates shared by every interaction from one provider turn. */
39
39
  export declare const InteractionExecutionBindingSchema: z.ZodObject<{
40
- runId: z.ZodString;
41
40
  provider: z.ZodString;
41
+ executionId: z.ZodString;
42
+ runId: z.ZodString;
42
43
  environmentId: z.ZodString;
43
44
  sessionId: z.ZodString;
44
- executionId: z.ZodString;
45
45
  }, z.core.$strict>;
46
46
  export type InteractionExecutionBinding = z.infer<typeof InteractionExecutionBindingSchema>;
47
47
  /** Binding carried by a response command and acknowledgement. */
48
48
  export declare const InteractionBindingSchema: z.ZodObject<{
49
+ requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
49
50
  runId: z.ZodString;
50
51
  provider: z.ZodString;
51
52
  environmentId: z.ZodString;
52
53
  sessionId: z.ZodString;
53
54
  executionId: z.ZodString;
54
55
  interactionId: z.ZodString;
55
- requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
56
56
  }, z.core.$strict>;
57
57
  export type InteractionBinding = z.infer<typeof InteractionBindingSchema>;
58
58
  export interface InteractionRequestMaterial {
@@ -74,6 +74,7 @@ export interface InteractionRequest extends InteractionRequestMaterial {
74
74
  }
75
75
  export declare function interactionRequestDigest(request: InteractionRequestMaterial): Sha256Digest;
76
76
  export declare const InteractionRequestSchema: z.ZodObject<{
77
+ requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
77
78
  id: z.ZodString;
78
79
  kind: z.ZodString;
79
80
  title: z.ZodString;
@@ -95,32 +96,29 @@ export declare const InteractionRequestSchema: z.ZodObject<{
95
96
  }, z.core.$strict>], "type">>;
96
97
  answerSpec: z.ZodObject<{
97
98
  fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
98
- name: z.ZodString;
99
- label: z.ZodString;
100
- required: z.ZodOptional<z.ZodBoolean>;
101
99
  type: z.ZodLiteral<"text">;
102
100
  multiline: z.ZodOptional<z.ZodBoolean>;
103
101
  placeholder: z.ZodOptional<z.ZodString>;
104
102
  maxLength: z.ZodOptional<z.ZodNumber>;
105
103
  default: z.ZodOptional<z.ZodString>;
106
- }, z.core.$strict>, z.ZodObject<{
107
104
  name: z.ZodString;
108
105
  label: z.ZodString;
109
106
  required: z.ZodOptional<z.ZodBoolean>;
107
+ }, z.core.$strict>, z.ZodObject<{
110
108
  type: z.ZodLiteral<"number">;
111
109
  min: z.ZodOptional<z.ZodNumber>;
112
110
  max: z.ZodOptional<z.ZodNumber>;
113
111
  default: z.ZodOptional<z.ZodNumber>;
114
- }, z.core.$strict>, z.ZodObject<{
115
112
  name: z.ZodString;
116
113
  label: z.ZodString;
117
114
  required: z.ZodOptional<z.ZodBoolean>;
115
+ }, z.core.$strict>, z.ZodObject<{
118
116
  type: z.ZodLiteral<"boolean">;
119
117
  default: z.ZodOptional<z.ZodBoolean>;
120
- }, z.core.$strict>, z.ZodObject<{
121
118
  name: z.ZodString;
122
119
  label: z.ZodString;
123
120
  required: z.ZodOptional<z.ZodBoolean>;
121
+ }, z.core.$strict>, z.ZodObject<{
124
122
  type: z.ZodLiteral<"select">;
125
123
  options: z.ZodArray<z.ZodObject<{
126
124
  value: z.ZodString;
@@ -130,23 +128,26 @@ export declare const InteractionRequestSchema: z.ZodObject<{
130
128
  multi: z.ZodOptional<z.ZodBoolean>;
131
129
  allowCustom: z.ZodOptional<z.ZodBoolean>;
132
130
  default: z.ZodOptional<z.ZodArray<z.ZodString>>;
133
- }, z.core.$strict>, z.ZodObject<{
134
131
  name: z.ZodString;
135
132
  label: z.ZodString;
136
133
  required: z.ZodOptional<z.ZodBoolean>;
134
+ }, z.core.$strict>, z.ZodObject<{
137
135
  type: z.ZodLiteral<"secret">;
138
136
  placeholder: z.ZodOptional<z.ZodString>;
139
137
  maxLength: z.ZodOptional<z.ZodNumber>;
138
+ name: z.ZodString;
139
+ label: z.ZodString;
140
+ required: z.ZodOptional<z.ZodBoolean>;
140
141
  }, z.core.$strict>], "type">>;
141
142
  }, z.core.$strict>;
142
143
  responseScopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
143
144
  interaction: "interaction";
144
- persistent: "persistent";
145
145
  session: "session";
146
+ persistent: "persistent";
146
147
  }>>>;
147
148
  allowedOutcomes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
148
- accepted: "accepted";
149
149
  cancelled: "cancelled";
150
+ accepted: "accepted";
150
151
  declined: "declined";
151
152
  }>>>;
152
153
  default: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -173,7 +174,6 @@ export declare const InteractionRequestSchema: z.ZodObject<{
173
174
  executionId: z.ZodString;
174
175
  interactionId: z.ZodString;
175
176
  }, z.core.$strict>;
176
- requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
177
177
  }, z.core.$strict>;
178
178
  export declare const InteractionResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
179
179
  id: z.ZodString;
@@ -199,13 +199,13 @@ export declare function interactionResponseCommandDigest(material: InteractionRe
199
199
  export declare const InteractionResponseCommandSchema: z.ZodObject<{
200
200
  operationId: z.ZodString;
201
201
  binding: z.ZodObject<{
202
+ requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
202
203
  runId: z.ZodString;
203
204
  provider: z.ZodString;
204
205
  environmentId: z.ZodString;
205
206
  sessionId: z.ZodString;
206
207
  executionId: z.ZodString;
207
208
  interactionId: z.ZodString;
208
- requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
209
209
  }, z.core.$strict>;
210
210
  commandDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
211
211
  response: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -224,42 +224,42 @@ export declare const InteractionResponseCommandSchema: z.ZodObject<{
224
224
  }, z.core.$strict>;
225
225
  export type InteractionResponseCommand = z.infer<typeof InteractionResponseCommandSchema>;
226
226
  export declare const InteractionAcknowledgementStatusSchema: z.ZodEnum<{
227
+ cancelled: "cancelled";
228
+ expired: "expired";
227
229
  accepted: "accepted";
228
- already_resolved_different: "already_resolved_different";
229
230
  already_resolved_same: "already_resolved_same";
231
+ already_resolved_different: "already_resolved_different";
232
+ unknown_interaction: "unknown_interaction";
233
+ unknown_run: "unknown_run";
230
234
  binding_mismatch: "binding_mismatch";
231
- cancelled: "cancelled";
232
- expired: "expired";
233
235
  invalid_response: "invalid_response";
234
236
  transport_failure: "transport_failure";
235
- unknown_interaction: "unknown_interaction";
236
- unknown_run: "unknown_run";
237
237
  }>;
238
238
  export type InteractionAcknowledgementStatus = z.infer<typeof InteractionAcknowledgementStatusSchema>;
239
239
  /** Durable result of one interaction response operation. */
240
240
  export declare const InteractionAcknowledgementSchema: z.ZodObject<{
241
241
  operationId: z.ZodString;
242
242
  binding: z.ZodObject<{
243
+ requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
243
244
  runId: z.ZodString;
244
245
  provider: z.ZodString;
245
246
  environmentId: z.ZodString;
246
247
  sessionId: z.ZodString;
247
248
  executionId: z.ZodString;
248
249
  interactionId: z.ZodString;
249
- requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
250
250
  }, z.core.$strict>;
251
251
  commandDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
252
252
  status: z.ZodEnum<{
253
+ cancelled: "cancelled";
254
+ expired: "expired";
253
255
  accepted: "accepted";
254
- already_resolved_different: "already_resolved_different";
255
256
  already_resolved_same: "already_resolved_same";
257
+ already_resolved_different: "already_resolved_different";
258
+ unknown_interaction: "unknown_interaction";
259
+ unknown_run: "unknown_run";
256
260
  binding_mismatch: "binding_mismatch";
257
- cancelled: "cancelled";
258
- expired: "expired";
259
261
  invalid_response: "invalid_response";
260
262
  transport_failure: "transport_failure";
261
- unknown_interaction: "unknown_interaction";
262
- unknown_run: "unknown_run";
263
263
  }>;
264
264
  message: z.ZodOptional<z.ZodString>;
265
265
  retryable: z.ZodOptional<z.ZodBoolean>;
@@ -8,32 +8,29 @@ import { z } from "zod";
8
8
  export declare const RESERVED_INTERACTION_FIELD_NAMES: ReadonlySet<string>;
9
9
  export declare const InteractionFieldNameSchema: z.ZodString;
10
10
  export declare const InteractionFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
11
- name: z.ZodString;
12
- label: z.ZodString;
13
- required: z.ZodOptional<z.ZodBoolean>;
14
11
  type: z.ZodLiteral<"text">;
15
12
  multiline: z.ZodOptional<z.ZodBoolean>;
16
13
  placeholder: z.ZodOptional<z.ZodString>;
17
14
  maxLength: z.ZodOptional<z.ZodNumber>;
18
15
  default: z.ZodOptional<z.ZodString>;
19
- }, z.core.$strict>, z.ZodObject<{
20
16
  name: z.ZodString;
21
17
  label: z.ZodString;
22
18
  required: z.ZodOptional<z.ZodBoolean>;
19
+ }, z.core.$strict>, z.ZodObject<{
23
20
  type: z.ZodLiteral<"number">;
24
21
  min: z.ZodOptional<z.ZodNumber>;
25
22
  max: z.ZodOptional<z.ZodNumber>;
26
23
  default: z.ZodOptional<z.ZodNumber>;
27
- }, z.core.$strict>, z.ZodObject<{
28
24
  name: z.ZodString;
29
25
  label: z.ZodString;
30
26
  required: z.ZodOptional<z.ZodBoolean>;
27
+ }, z.core.$strict>, z.ZodObject<{
31
28
  type: z.ZodLiteral<"boolean">;
32
29
  default: z.ZodOptional<z.ZodBoolean>;
33
- }, z.core.$strict>, z.ZodObject<{
34
30
  name: z.ZodString;
35
31
  label: z.ZodString;
36
32
  required: z.ZodOptional<z.ZodBoolean>;
33
+ }, z.core.$strict>, z.ZodObject<{
37
34
  type: z.ZodLiteral<"select">;
38
35
  options: z.ZodArray<z.ZodObject<{
39
36
  value: z.ZodString;
@@ -43,43 +40,43 @@ export declare const InteractionFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
43
40
  multi: z.ZodOptional<z.ZodBoolean>;
44
41
  allowCustom: z.ZodOptional<z.ZodBoolean>;
45
42
  default: z.ZodOptional<z.ZodArray<z.ZodString>>;
46
- }, z.core.$strict>, z.ZodObject<{
47
43
  name: z.ZodString;
48
44
  label: z.ZodString;
49
45
  required: z.ZodOptional<z.ZodBoolean>;
46
+ }, z.core.$strict>, z.ZodObject<{
50
47
  type: z.ZodLiteral<"secret">;
51
48
  placeholder: z.ZodOptional<z.ZodString>;
52
49
  maxLength: z.ZodOptional<z.ZodNumber>;
50
+ name: z.ZodString;
51
+ label: z.ZodString;
52
+ required: z.ZodOptional<z.ZodBoolean>;
53
53
  }, z.core.$strict>], "type">;
54
54
  export type InteractionField = z.infer<typeof InteractionFieldSchema>;
55
55
  export declare const InteractionAnswerSpecSchema: z.ZodObject<{
56
56
  fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
57
- name: z.ZodString;
58
- label: z.ZodString;
59
- required: z.ZodOptional<z.ZodBoolean>;
60
57
  type: z.ZodLiteral<"text">;
61
58
  multiline: z.ZodOptional<z.ZodBoolean>;
62
59
  placeholder: z.ZodOptional<z.ZodString>;
63
60
  maxLength: z.ZodOptional<z.ZodNumber>;
64
61
  default: z.ZodOptional<z.ZodString>;
65
- }, z.core.$strict>, z.ZodObject<{
66
62
  name: z.ZodString;
67
63
  label: z.ZodString;
68
64
  required: z.ZodOptional<z.ZodBoolean>;
65
+ }, z.core.$strict>, z.ZodObject<{
69
66
  type: z.ZodLiteral<"number">;
70
67
  min: z.ZodOptional<z.ZodNumber>;
71
68
  max: z.ZodOptional<z.ZodNumber>;
72
69
  default: z.ZodOptional<z.ZodNumber>;
73
- }, z.core.$strict>, z.ZodObject<{
74
70
  name: z.ZodString;
75
71
  label: z.ZodString;
76
72
  required: z.ZodOptional<z.ZodBoolean>;
73
+ }, z.core.$strict>, z.ZodObject<{
77
74
  type: z.ZodLiteral<"boolean">;
78
75
  default: z.ZodOptional<z.ZodBoolean>;
79
- }, z.core.$strict>, z.ZodObject<{
80
76
  name: z.ZodString;
81
77
  label: z.ZodString;
82
78
  required: z.ZodOptional<z.ZodBoolean>;
79
+ }, z.core.$strict>, z.ZodObject<{
83
80
  type: z.ZodLiteral<"select">;
84
81
  options: z.ZodArray<z.ZodObject<{
85
82
  value: z.ZodString;
@@ -89,44 +86,47 @@ export declare const InteractionAnswerSpecSchema: z.ZodObject<{
89
86
  multi: z.ZodOptional<z.ZodBoolean>;
90
87
  allowCustom: z.ZodOptional<z.ZodBoolean>;
91
88
  default: z.ZodOptional<z.ZodArray<z.ZodString>>;
92
- }, z.core.$strict>, z.ZodObject<{
93
89
  name: z.ZodString;
94
90
  label: z.ZodString;
95
91
  required: z.ZodOptional<z.ZodBoolean>;
92
+ }, z.core.$strict>, z.ZodObject<{
96
93
  type: z.ZodLiteral<"secret">;
97
94
  placeholder: z.ZodOptional<z.ZodString>;
98
95
  maxLength: z.ZodOptional<z.ZodNumber>;
96
+ name: z.ZodString;
97
+ label: z.ZodString;
98
+ required: z.ZodOptional<z.ZodBoolean>;
99
99
  }, z.core.$strict>], "type">>;
100
100
  }, z.core.$strict>;
101
101
  export type InteractionAnswerSpec = z.infer<typeof InteractionAnswerSpecSchema>;
102
102
  export declare const InteractionFieldTypeSchema: z.ZodEnum<{
103
- boolean: "boolean";
104
103
  number: "number";
105
- secret: "secret";
106
- select: "select";
104
+ boolean: "boolean";
107
105
  text: "text";
106
+ select: "select";
107
+ secret: "secret";
108
108
  }>;
109
109
  /** Scope at which an accepted answer may be reused by an explicit policy. */
110
110
  export declare const InteractionResponseScopeSchema: z.ZodEnum<{
111
111
  interaction: "interaction";
112
- persistent: "persistent";
113
112
  session: "session";
113
+ persistent: "persistent";
114
114
  }>;
115
115
  export type InteractionResponseScope = z.infer<typeof InteractionResponseScopeSchema>;
116
116
  /** Negotiated interaction behavior. Absence means interactions are unsupported. */
117
117
  export declare const InteractionCapabilitiesSchema: z.ZodObject<{
118
118
  kinds: z.ZodArray<z.ZodString>;
119
119
  answerFieldTypes: z.ZodArray<z.ZodEnum<{
120
- boolean: "boolean";
121
120
  number: "number";
122
- secret: "secret";
123
- select: "select";
121
+ boolean: "boolean";
124
122
  text: "text";
123
+ select: "select";
124
+ secret: "secret";
125
125
  }>>;
126
126
  responseScopes: z.ZodArray<z.ZodEnum<{
127
127
  interaction: "interaction";
128
- persistent: "persistent";
129
128
  session: "session";
129
+ persistent: "persistent";
130
130
  }>>;
131
131
  secretAnswers: z.ZodBoolean;
132
132
  concurrentRequests: z.ZodBoolean;
@@ -24,10 +24,10 @@ export declare const PERMISSION_GRANT_FIELD = "grant";
24
24
  export declare const PERMISSION_FEEDBACK_FIELD = "feedback";
25
25
  /** Graduated permission decision — the value of the `grant` field. */
26
26
  export declare const PermissionGrantSchema: z.ZodEnum<{
27
- allow_always: "allow_always";
27
+ deny: "deny";
28
28
  allow_once: "allow_once";
29
29
  allow_session: "allow_session";
30
- deny: "deny";
30
+ allow_always: "allow_always";
31
31
  }>;
32
32
  export type PermissionGrant = z.infer<typeof PermissionGrantSchema>;
33
33
  /** Build a permission answer spec that cannot offer a broader reusable grant. */