@anchrd/intel-contract 0.18.0 → 0.19.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.
@@ -899,6 +899,21 @@ export declare const FlowPublishCall: z.ZodObject<{
899
899
  available: z.ZodBoolean;
900
900
  }, z.core.$strict>;
901
901
  export type FlowPublishCall = z.infer<typeof FlowPublishCall>;
902
+ /**
903
+ * What a tool step will be allowed to reach once this version is published (#517).
904
+ *
905
+ * ⚠️ It is in the preview because publishing FREEZES it: from that moment the step's surface is
906
+ * pinned, and a function the provider adds later is not inherited. An author who cannot see the
907
+ * surface before confirming is asked to freeze something they were never shown.
908
+ */
909
+ export declare const FlowPublishTool: z.ZodObject<{
910
+ nodeId: z.ZodString;
911
+ nodeLabel: z.ZodString;
912
+ server: z.ZodString;
913
+ allow: z.ZodNullable<z.ZodArray<z.ZodString>>;
914
+ available: z.ZodBoolean;
915
+ }, z.core.$strict>;
916
+ export type FlowPublishTool = z.infer<typeof FlowPublishTool>;
902
917
  export declare const FlowPublishPreview: z.ZodObject<{
903
918
  flowId: z.ZodString;
904
919
  versionId: z.ZodString;
@@ -917,6 +932,13 @@ export declare const FlowPublishPreview: z.ZodObject<{
917
932
  freezes: z.ZodBoolean;
918
933
  available: z.ZodBoolean;
919
934
  }, z.core.$strict>>;
935
+ tools: z.ZodArray<z.ZodObject<{
936
+ nodeId: z.ZodString;
937
+ nodeLabel: z.ZodString;
938
+ server: z.ZodString;
939
+ allow: z.ZodNullable<z.ZodArray<z.ZodString>>;
940
+ available: z.ZodBoolean;
941
+ }, z.core.$strict>>;
920
942
  }, z.core.$strict>;
921
943
  export type FlowPublishPreview = z.infer<typeof FlowPublishPreview>;
922
944
  export declare const RelationNodeKind: z.ZodEnum<{
@@ -86,8 +86,18 @@ export const FlowNode = z.discriminatedUnion("kind", [
86
86
  * step's instruction and can only be known while the flow runs.
87
87
  *
88
88
  * `allow: null` means every function of that server. A list narrows it, and every entry has to
89
- * belong to `server` — checked below, because a name from another server would silently widen
90
- * the step past the one thing this configuration is supposed to bound.
89
+ * belong to `server` — checked below, because a name from another server would make the step ask
90
+ * for something the portal routes somewhere else entirely.
91
+ *
92
+ * ⚠️ `allow` is an INSTRUCTION to the agent, not a boundary Intel enforces (#518). Intel is a
93
+ * library: it says what is to be done, it does not execute. A flow is carried out by an agent
94
+ * that reaches the portal with its OWN token, and that agent may call the portal directly —
95
+ * Intel never sees the call. What bounds it is the agent's own portal grant, checked by the
96
+ * portal on every call; what `allow` does is tell the agent which of those functions this step
97
+ * is meant to use, the same way an instruction step tells it what to write.
98
+ *
99
+ * That is not a gap to be closed by adding a check here. Enforcing it would mean routing every
100
+ * call through Intel and making it the executor — the one thing this product is not.
91
101
  *
92
102
  * ⚠️ There is deliberately no `arguments` field any more. Arguments are produced at run time and
93
103
  * validated against the tool's own `inputSchema` from a live `tools/list`; a stored copy would be
@@ -405,10 +415,28 @@ export const FlowPublishCall = z.strictObject({
405
415
  // The callee has a published version to be called at all. `false` is what publishing will refuse.
406
416
  available: z.boolean(),
407
417
  });
418
+ /**
419
+ * What a tool step will be allowed to reach once this version is published (#517).
420
+ *
421
+ * ⚠️ It is in the preview because publishing FREEZES it: from that moment the step's surface is
422
+ * pinned, and a function the provider adds later is not inherited. An author who cannot see the
423
+ * surface before confirming is asked to freeze something they were never shown.
424
+ */
425
+ export const FlowPublishTool = z.strictObject({
426
+ nodeId: FlowNodeId,
427
+ nodeLabel: z.string().min(1).max(160),
428
+ server: ToolServerHandle,
429
+ // `null` is "every function of that server". A list is what the step narrowed itself to, and it
430
+ // is spelled out rather than counted: the whole point of the preview is that a human can read it.
431
+ allow: z.array(ToolName).nullable(),
432
+ // The server is reachable for the person publishing. `false` is what publishing will refuse.
433
+ available: z.boolean(),
434
+ });
408
435
  export const FlowPublishPreview = z.strictObject({
409
436
  flowId: IntelId,
410
437
  versionId: IntelId,
411
438
  calls: z.array(FlowPublishCall),
439
+ tools: z.array(FlowPublishTool),
412
440
  });
413
441
  // A flow has no share schema of its own. A grant sits on the folder a flow is filed in and inherits
414
442
  // down from there (ADR-0004 §2); a narrower grant beside it would destroy the subtree guarantee
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchrd/intel-contract",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {