@e4779/pi-fabric 0.92.24-fork.4 → 0.92.28-fork.5
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/dist/actors/host-event-payload.d.ts.map +1 -1
- package/dist/agents/request.d.ts +4 -0
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents.js +2 -1
- package/dist/agents.js.map +1 -1
- package/dist/chunks/{chunk-VYXFSUWU.js → chunk-77PDIBK2.js} +12 -1
- package/dist/chunks/{chunk-VYXFSUWU.js.map → chunk-77PDIBK2.js.map} +2 -2
- package/dist/chunks/chunk-7TX532EG.js +134 -0
- package/dist/chunks/chunk-7TX532EG.js.map +7 -0
- package/dist/chunks/chunk-BJOJX2UW.js +59 -0
- package/dist/chunks/chunk-BJOJX2UW.js.map +7 -0
- package/dist/chunks/{chunk-2PZWDVJB.js → chunk-BYOGRJME.js} +13 -4
- package/dist/chunks/chunk-BYOGRJME.js.map +7 -0
- package/dist/chunks/{chunk-RERA6YWA.js → chunk-CIODQX77.js} +12 -4
- package/dist/chunks/chunk-CIODQX77.js.map +7 -0
- package/dist/chunks/{chunk-ZMIJ6AT4.js → chunk-D6YSBP3R.js} +2 -2
- package/dist/chunks/{chunk-WVH324VF.js → chunk-FAMBJFFF.js} +1 -1
- package/dist/chunks/{chunk-WVH324VF.js.map → chunk-FAMBJFFF.js.map} +1 -1
- package/dist/chunks/{chunk-VWSXAEX6.js → chunk-G7UJLM33.js} +6 -198
- package/dist/chunks/chunk-G7UJLM33.js.map +7 -0
- package/dist/chunks/chunk-JNMTTJMQ.js +50 -0
- package/dist/chunks/chunk-JNMTTJMQ.js.map +7 -0
- package/dist/chunks/{chunk-KFZYTGF5.js → chunk-JOEFBOFN.js} +7 -3
- package/dist/chunks/chunk-JOEFBOFN.js.map +7 -0
- package/dist/chunks/chunk-KI277YNS.js +218 -0
- package/dist/chunks/chunk-KI277YNS.js.map +7 -0
- package/dist/chunks/{chunk-Y7KNRAFL.js → chunk-M3ZNZ6EZ.js} +28 -3
- package/dist/chunks/chunk-M3ZNZ6EZ.js.map +7 -0
- package/dist/chunks/{chunk-QX3TUAWO.js → chunk-M7W57BRC.js} +2 -2
- package/dist/chunks/{chunk-4SSMGBF4.js → chunk-QLV2IZ3F.js} +6 -7
- package/dist/chunks/chunk-QLV2IZ3F.js.map +7 -0
- package/dist/chunks/{chunk-7OH6DD3S.js → chunk-RAEGNBRA.js} +2 -2
- package/dist/chunks/{chunk-BOTRGFQQ.js → chunk-RWDKJ24D.js} +26 -19
- package/dist/chunks/chunk-RWDKJ24D.js.map +7 -0
- package/dist/chunks/{chunk-3CPWRPCE.js → chunk-RZKN534S.js} +2 -2
- package/dist/chunks/{chunk-3ZX76BVU.js → chunk-ULLIZPBH.js} +7 -7
- package/dist/chunks/{chunk-32BNQ75J.js → chunk-WG24VI7K.js} +56 -2
- package/dist/chunks/{chunk-32BNQ75J.js.map → chunk-WG24VI7K.js.map} +2 -2
- package/dist/chunks/{chunk-4JETKRFE.js → chunk-ZHJNWM6A.js} +2 -2
- package/dist/components/configuration.d.ts +42 -0
- package/dist/components/configuration.d.ts.map +1 -0
- package/dist/components/configuration.js +18 -0
- package/dist/components/configuration.js.map +7 -0
- package/dist/components/control.d.ts +76 -0
- package/dist/components/control.d.ts.map +1 -0
- package/dist/components/loader.d.ts +12 -0
- package/dist/components/loader.d.ts.map +1 -1
- package/dist/components/supervisor.d.ts.map +1 -1
- package/dist/components/types.d.ts +2 -0
- package/dist/components/types.d.ts.map +1 -1
- package/dist/components/validation.d.ts +6 -0
- package/dist/components/validation.d.ts.map +1 -0
- package/dist/config.d.ts +4 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-registry.d.ts +1 -0
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +2 -2
- package/dist/core/media-sanitize.d.ts +45 -0
- package/dist/core/media-sanitize.d.ts.map +1 -0
- package/dist/core/model-resolution.d.ts +20 -3
- package/dist/core/model-resolution.d.ts.map +1 -1
- package/dist/execution-service.d.ts +3 -1
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/fabric-exec-tool.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +398 -47
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/index.js +64 -17
- package/dist/index.js.map +2 -2
- package/dist/jev/browser.d.ts.map +1 -1
- package/dist/jev/browser.js +1 -1
- package/dist/jev/observation.js +3 -2
- package/dist/jev.js +5 -4
- package/dist/output-budget.d.ts.map +1 -1
- package/dist/protocol.d.ts +1 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -1
- package/dist/providers/agents-actions.d.ts.map +1 -1
- package/dist/providers/captured-tools-provider.d.ts.map +1 -1
- package/dist/providers/components-provider.d.ts +5 -3
- package/dist/providers/components-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.js +4 -3
- package/dist/residency/actor-client.d.ts +2 -2
- package/dist/residency/actor-client.d.ts.map +1 -1
- package/dist/residency/actor-client.js +2 -2
- package/dist/residency/client.d.ts.map +1 -1
- package/dist/residency/host.js +5 -4
- package/dist/residency/pi-entry.js +5 -4
- package/dist/residency/pi-entry.js.map +1 -1
- package/dist/residency/protocol.d.ts +11 -2
- package/dist/residency/protocol.d.ts.map +1 -1
- package/dist/runtime/core-override-guest-types.js +2 -2
- package/dist/runtime/guest-types.d.ts +1 -1
- package/dist/runtime/guest-types.d.ts.map +1 -1
- package/dist/runtime/guest-types.js +1 -1
- package/dist/runtime/monty-runtime.js +2 -1
- package/dist/runtime/monty-runtime.js.map +1 -1
- package/dist/runtime/node-process-runtime.d.ts.map +1 -1
- package/dist/runtime/node-process-runtime.js +2 -2
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +1 -1
- package/dist/runtime/typescript-kernel.js +7 -7
- package/dist/schema/policy.d.ts.map +1 -1
- package/dist/ui/controller.d.ts.map +1 -1
- package/dist/ui/settings.js +2 -1
- package/dist/ui/settings.js.map +1 -1
- package/dist/ui/widget.d.ts +12 -1
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/worker.js +11 -3
- package/dist/worker.js.map +2 -2
- package/docs/architecture.md +1 -1
- package/docs/components.md +30 -1
- package/docs/configuration.md +5 -3
- package/docs/jev.md +66 -1
- package/package.json +1 -1
- package/skillsets/typescript/fabric-exec/SKILL.md +5 -1
- package/skillsets/typescript/fabric-exec/references/agents.md +2 -0
- package/dist/chunks/chunk-2PZWDVJB.js.map +0 -7
- package/dist/chunks/chunk-4SSMGBF4.js.map +0 -7
- package/dist/chunks/chunk-BOTRGFQQ.js.map +0 -7
- package/dist/chunks/chunk-KFZYTGF5.js.map +0 -7
- package/dist/chunks/chunk-RERA6YWA.js.map +0 -7
- package/dist/chunks/chunk-TSRKCXNI.js +0 -17
- package/dist/chunks/chunk-TSRKCXNI.js.map +0 -7
- package/dist/chunks/chunk-VWSXAEX6.js.map +0 -7
- package/dist/chunks/chunk-Y7KNRAFL.js.map +0 -7
- /package/dist/chunks/{chunk-ZMIJ6AT4.js.map → chunk-D6YSBP3R.js.map} +0 -0
- /package/dist/chunks/{chunk-QX3TUAWO.js.map → chunk-M7W57BRC.js.map} +0 -0
- /package/dist/chunks/{chunk-7OH6DD3S.js.map → chunk-RAEGNBRA.js.map} +0 -0
- /package/dist/chunks/{chunk-3CPWRPCE.js.map → chunk-RZKN534S.js.map} +0 -0
- /package/dist/chunks/{chunk-3ZX76BVU.js.map → chunk-ULLIZPBH.js.map} +0 -0
- /package/dist/chunks/{chunk-4JETKRFE.js.map → chunk-ZHJNWM6A.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/core/media-sanitize.ts"],
|
|
4
|
+
"sourcesContent": ["import { createHash } from \"node:crypto\";\nimport type { ImageContent } from \"@earendil-works/pi-ai\";\n\n/**\n * Media sanitization for every channel that serializes guest or provider data\n * into text: fabric_exec logs, results, and error text, worker event lines, and\n * actor host-event payloads.\n *\n * Raw image bytes stay available out of band (see the images side channel), so a\n * multimodal model can still receive them while text channels receive a\n * descriptor. The rule used to be implemented only for actor host events, so a\n * guest that printed or returned a nested pi.read image could push hundreds of\n * KB of base64 into one serialized line and break the run.\n */\n\n/** Descriptor that replaces an image payload in a text channel. */\nexport interface FabricSanitizedMediaDescriptor {\n type: \"image\";\n mediaIndex: number;\n mimeType: string;\n redacted: true;\n}\n\nexport interface SanitizedFabricMedia {\n value: unknown;\n /** Raw payloads, indexed by mediaIndex in the descriptors. */\n images: ImageContent[];\n media: FabricSanitizedMediaDescriptor[];\n}\n\n/** A run of base64-alphabet characters long enough to be a binary payload. */\nconst BASE64_RUN = /[A-Za-z0-9+/=_-]{1024,}/g;\n\nconst BASE64_ALPHABET = /^[A-Za-z0-9+/=_\\r\\n-]+$/;\n\nconst omittedMarker = (length: number): string =>\n \"[omitted base64: \" + String(length) + \" chars]\";\n\nconst isPlainObject = (value: object): boolean => {\n const prototype = Object.getPrototypeOf(value) as object | null;\n return prototype === Object.prototype || prototype === null;\n};\n\n/** True when an entire string is a base64 payload (or a base64 data URL). */\nexport const looksLikeBase64 = (value: string): boolean => {\n if (value.startsWith(\"data:\") && value.includes(\";base64,\")) return true;\n if (value.length < 1_024 || value.length % 4 !== 0) return false;\n return BASE64_ALPHABET.test(value);\n};\n\n/** True for the Pi multimodal block shape {type: \"image\", data, mimeType}. */\nexport const isImageContent = (value: unknown): value is ImageContent =>\n typeof value === \"object\" &&\n value !== null &&\n !Array.isArray(value) &&\n (value as { type?: unknown }).type === \"image\" &&\n typeof (value as { data?: unknown }).data === \"string\" &&\n typeof (value as { mimeType?: unknown }).mimeType === \"string\";\n\n/**\n * Replace base64 runs inside free text with a bounded marker. Short strings are\n * returned untouched, so the hot event-line path pays only a length check.\n */\nexport const sanitizeFabricMediaText = (text: string): string => {\n if (text.length < 1_024) return text;\n return text.replace(BASE64_RUN, (run) => omittedMarker(run.length));\n};\n\n/**\n * Recursively replace image payloads and long base64 strings in a value.\n *\n * Images are deduplicated by content hash and hoisted into the images side\n * channel, and their text representation becomes a descriptor. Non-plain objects\n * and repeated references are returned unchanged: rebuilding them would drop\n * class identity, which matters because fabric_exec inspects result values for\n * control fields such as terminate.\n */\nexport const sanitizeFabricMediaValue = (value: unknown): SanitizedFabricMedia => {\n const images: ImageContent[] = [];\n const media: FabricSanitizedMediaDescriptor[] = [];\n const indexes = new Map<string, number>();\n const seen = new WeakSet<object>();\n\n const walk = (node: unknown): unknown => {\n if (typeof node === \"string\") {\n if (looksLikeBase64(node)) return omittedMarker(node.length);\n return sanitizeFabricMediaText(node);\n }\n if (node === null || typeof node !== \"object\") return node;\n if (isImageContent(node)) {\n const sha256 = createHash(\"sha256\")\n .update(node.mimeType)\n .update(\"\\0\")\n .update(node.data)\n .digest(\"hex\");\n let mediaIndex = indexes.get(sha256);\n if (mediaIndex === undefined) {\n mediaIndex = images.length;\n indexes.set(sha256, mediaIndex);\n images.push({ type: \"image\", data: node.data, mimeType: node.mimeType });\n media.push({ type: \"image\", mediaIndex, mimeType: node.mimeType, redacted: true });\n }\n return { type: \"image\", mediaIndex, mimeType: node.mimeType, redacted: true };\n }\n if (seen.has(node)) return node;\n seen.add(node);\n if (Array.isArray(node)) return node.map(walk);\n if (!isPlainObject(node)) return node;\n const rebuilt: Record<string, unknown> = {};\n for (const [key, nested] of Object.entries(node)) rebuilt[key] = walk(nested);\n return rebuilt;\n };\n\n return { value: walk(value), images, media };\n};\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,kBAAkB;AA+B3B,IAAM,aAAa;AAEnB,IAAM,kBAAkB;AAExB,IAAM,gBAAgB,CAAC,WACrB,sBAAsB,OAAO,MAAM,IAAI;AAEzC,IAAM,gBAAgB,CAAC,UAA2B;AAChD,QAAM,YAAY,OAAO,eAAe,KAAK;AAC7C,SAAO,cAAc,OAA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cAAM,KAAK,EAAE,MAAM,SAAS,YAAY,UAAU,KAAK,UAAU,UAAU,KAAK,CAAC;AAAA,MACnF;AACA,aAAO,EAAE,MAAM,SAAS,YAAY,UAAU,KAAK,UAAU,UAAU,KAAK;AAAA,IAC9E;AACA,QAAI,KAAK,IAAI,IAAI,EAAG,QAAO;AAC3B,SAAK,IAAI,IAAI;AACb,QAAI,MAAM,QAAQ,IAAI,EAAG,QAAO,KAAK,IAAI,IAAI;AAC7C,QAAI,CAAC,cAAc,IAAI,EAAG,QAAO;AACjC,UAAM,UAAmC,CAAC;AAC1C,eAAW,CAAC,KAAK,MAAM,KAAK,OAAO,QAAQ,IAAI,EAAG,SAAQ,GAAG,IAAI,KAAK,MAAM;AAC5E,WAAO;AAAA,EACT;AAEA,SAAO,EAAE,OAAO,KAAK,KAAK,GAAG,QAAQ,MAAM;AAC7C;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
FABRIC_ACTOR_HOST_EVENTS
|
|
6
6
|
} from "./chunk-OTCASLY2.js";
|
|
7
|
+
import {
|
|
8
|
+
aliasThinking
|
|
9
|
+
} from "./chunk-KI277YNS.js";
|
|
7
10
|
import {
|
|
8
11
|
isFabricThinking
|
|
9
12
|
} from "./chunk-MGWQOKBV.js";
|
|
@@ -55,7 +58,11 @@ var runProperties = {
|
|
|
55
58
|
description: "Filesystem execution directory for leaf or recursive Pi runs; relative paths resolve from the caller cwd. Does not change project/mesh ownership or grant target project trust."
|
|
56
59
|
},
|
|
57
60
|
worktree: { type: "boolean" },
|
|
58
|
-
schema: { type: "object", description: "Optional JSON Schema for validated structured output" }
|
|
61
|
+
schema: { type: "object", description: "Optional JSON Schema for validated structured output" },
|
|
62
|
+
systemPrompt: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "Optional extra system prompt body for this child run. Pi runners merge it below component guidance and forward it via --system-prompt; Claude runners receive it via --append-system-prompt. Useful for reliability-focused prompt rules on models with weak behavioral defaults."
|
|
65
|
+
}
|
|
59
66
|
};
|
|
60
67
|
var runSchema = {
|
|
61
68
|
type: "object",
|
|
@@ -702,7 +709,8 @@ var checkedKernel = (value) => {
|
|
|
702
709
|
};
|
|
703
710
|
var normalizeAgentRunRequest = (args, defaults, options = {}) => {
|
|
704
711
|
const transport = args.transport === "auto" || args.transport === "process" || args.transport === "tmux" || args.transport === "screen" || args.transport === "localterm" || args.transport === "herdr" ? args.transport : void 0;
|
|
705
|
-
const
|
|
712
|
+
const requestedModel = typeof args.model === "string" ? args.model : typeof defaults.model === "string" ? defaults.model : void 0;
|
|
713
|
+
const thinking = isFabricThinking(args.thinking) ? args.thinking : aliasThinking(defaults.models?.aliases, requestedModel ?? "");
|
|
706
714
|
const tools = stringArray(args.tools);
|
|
707
715
|
const timeoutMs = typeof args.timeoutMs === "number" && Number.isFinite(args.timeoutMs) && args.timeoutMs > defaults.timeoutMs ? args.timeoutMs : void 0;
|
|
708
716
|
const runner = args.runner === "pi" || args.runner === "claude" || args.runner === "veda" ? args.runner : defaults.runner;
|
|
@@ -727,7 +735,8 @@ var normalizeAgentRunRequest = (args, defaults, options = {}) => {
|
|
|
727
735
|
...options.allowCwd !== false && typeof args.cwd === "string" ? { cwd: args.cwd } : {},
|
|
728
736
|
...typeof args.worktree === "boolean" ? { worktree: args.worktree } : {},
|
|
729
737
|
...args.residency === "session" || args.residency === "durable" ? { residency: args.residency } : {},
|
|
730
|
-
...typeof args.schema === "object" && args.schema !== null && !Array.isArray(args.schema) ? { schema: args.schema } : {}
|
|
738
|
+
...typeof args.schema === "object" && args.schema !== null && !Array.isArray(args.schema) ? { schema: args.schema } : {},
|
|
739
|
+
...typeof args.systemPrompt === "string" && args.systemPrompt.trim() ? { systemPrompt: args.systemPrompt } : {}
|
|
731
740
|
};
|
|
732
741
|
};
|
|
733
742
|
|
|
@@ -735,4 +744,4 @@ export {
|
|
|
735
744
|
AGENTS_ACTION_DESCRIPTORS,
|
|
736
745
|
normalizeAgentRunRequest
|
|
737
746
|
};
|
|
738
|
-
//# sourceMappingURL=chunk-
|
|
747
|
+
//# sourceMappingURL=chunk-BYOGRJME.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/providers/agents-actions.ts", "../../src/agents/request.ts"],
|
|
4
|
+
"sourcesContent": ["import { FABRIC_ACTOR_HOST_EVENTS } from \"../actors/types.js\";\nimport {\n MAX_COMPACTION_INSTRUCTIONS_CHARS,\n MAX_PRESERVE_ITEM_CHARS,\n MAX_PRESERVE_ITEMS,\n} from \"../compaction/instructions.js\";\nimport { FABRIC_LIFECYCLE_EVENTS } from \"../lifecycle/types.js\";\nimport type { FabricActionDescriptor } from \"../protocol.js\";\n\nconst runProperties = {\n task: { type: \"string\", description: \"A self-contained task for the child agent\" },\n name: { type: \"string\" },\n runner: {\n type: \"string\",\n enum: [\"pi\", \"claude\", \"veda\"],\n description: \"Execution harness. Defaults to agents.runner.\",\n },\n kernel: {\n type: \"string\",\n enum: [\"typescript\", \"python\", \"inherit\"],\n description: \"Fabric execution language. Omitted/inherit uses the caller executor.kernel; concrete choices require Pi with extensions enabled. Python uses the configured backend; CPython is native execution.\",\n },\n transport: {\n type: \"string\",\n enum: [\"auto\", \"process\", \"tmux\", \"screen\", \"localterm\", \"herdr\"],\n },\n model: {\n type: \"string\",\n description:\n \"Pi provider/id, a configured models.aliases name, or a search term resolved to the closest authenticated model (recency from pi-model-sort breaks ties); Claude runtime value or Veda backend model/alias are forwarded verbatim.\",\n },\n persona: {\n type: \"string\",\n description: \"Veda persona name for this run, such as frontend, reviewer, worker, or a custom persona.\",\n },\n thinking: {\n type: \"string\",\n enum: [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n },\n tools: { type: \"array\", items: { type: \"string\" } },\n timeoutMs: {\n type: \"number\",\n description:\n \"Optional longer wall-clock limit in milliseconds. Omit to use agents.timeoutMs (60 minutes by default); values below the configured default are ignored.\",\n },\n extensions: { type: \"boolean\" },\n recursive: { type: \"boolean\" },\n cwd: {\n type: \"string\",\n description: \"Filesystem execution directory for leaf or recursive Pi runs; relative paths resolve from the caller cwd. Does not change project/mesh ownership or grant target project trust.\",\n },\n worktree: { type: \"boolean\" },\n schema: { type: \"object\", description: \"Optional JSON Schema for validated structured output\" },\n systemPrompt: {\n type: \"string\",\n description: \"Optional extra system prompt body for this child run. Pi runners merge it below component guidance and forward it via --system-prompt; Claude runners receive it via --append-system-prompt. Useful for reliability-focused prompt rules on models with weak behavioral defaults.\",\n },\n};\n\nconst runSchema = {\n type: \"object\",\n properties: runProperties,\n required: [\"task\"],\n additionalProperties: false,\n};\n\nconst residencySchema = {\n type: \"string\",\n enum: [\"session\", \"durable\"],\n description: \"session stops with the current Pi host; durable transfers execution to Fabric's hidden resident host.\",\n};\n\nconst actorBindingScopeSchema = {\n type: \"string\",\n enum: [\"session\", \"project\"],\n description: \"session (default) changes only this Pi session; project pins the shared actor default and requires ownership.\",\n};\n\nconst actorInvocationProperties = {\n id: { type: \"string\" },\n message: { type: \"string\" },\n data: {},\n model: {\n ...runProperties.model,\n description: \"Optional model pinned only for this actor activation.\",\n },\n thinking: runProperties.thinking,\n};\n\nconst spawnSchema = {\n ...runSchema,\n properties: { ...runProperties, residency: residencySchema },\n};\n\nconst handoffCompactionSchema = {\n anyOf: [\n { type: \"boolean\" },\n {\n type: \"object\",\n properties: {\n instructions: {\n type: \"string\",\n maxLength: MAX_COMPACTION_INSTRUCTIONS_CHARS,\n description: \"Custom compaction instructions for the inherited trajectory\",\n },\n preserve: {\n type: \"array\",\n items: { type: \"string\", maxLength: MAX_PRESERVE_ITEM_CHARS },\n maxItems: MAX_PRESERVE_ITEMS,\n description: \"Explicit bounded facts the trajectory summary must preserve\",\n },\n },\n additionalProperties: false,\n },\n ],\n description:\n \"Compact the inherited trajectory with Fabric's deterministic compactor before the executor resumes it. `true` applies the default summary; an object customizes instructions and bounded preserve facts. Omitted keeps the full raw trajectory.\",\n};\n\nconst handoffSchema = {\n type: \"object\",\n properties: {\n task: {\n type: \"string\",\n description: \"Optional instructions for the executor in addition to the inherited trajectory\",\n },\n name: runProperties.name,\n kernel: runProperties.kernel,\n transport: runProperties.transport,\n model: {\n ...runProperties.model,\n description: \"Explicit Pi provider/id target that will continue the inherited trajectory\",\n },\n thinking: runProperties.thinking,\n tools: runProperties.tools,\n timeoutMs: runProperties.timeoutMs,\n extensions: runProperties.extensions,\n recursive: runProperties.recursive,\n schema: runProperties.schema,\n compact: handoffCompactionSchema,\n },\n required: [\"model\"],\n additionalProperties: false,\n};\n\nconst idSchema = {\n type: \"object\",\n properties: { id: { type: \"string\" } },\n required: [\"id\"],\n additionalProperties: false,\n};\n\nconst lifecycleEventSchema = {\n type: \"string\",\n enum: [...FABRIC_LIFECYCLE_EVENTS],\n};\n\nexport const AGENTS_ACTION_DESCRIPTORS: FabricActionDescriptor[] = [\n {\n name: \"run\",\n description: \"Run a child agent through Pi or Claude Code and wait for its final result\",\n inputSchema: runSchema,\n risk: \"agent\",\n },\n {\n name: \"handoff\",\n description:\n \"Schedule a Pi trajectory handoff after the current outer fabric_exec result, then wait for implementation at that boundary\",\n inputSchema: handoffSchema,\n risk: \"agent\",\n },\n {\n name: \"spawn\",\n description:\n \"Start a child agent through Pi or Claude Code and return a handle immediately. Detached runs send Main a follow-up on terminal completion when agents.notifyOnComplete is enabled; use wait when this Fabric program needs the result and status only for progress inspection.\",\n inputSchema: spawnSchema,\n risk: \"agent\",\n },\n {\n name: \"wait\",\n description: \"Wait for a previously spawned child agent\",\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"join\",\n description: \"Alias for agents.wait: wait for a previously spawned child agent with the same progress and completion-notification behavior\",\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"status\",\n description: \"Get the latest status of any known project participant\",\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"list\",\n description: \"List agent participants locally, across the current lineage, or across the project\",\n inputSchema: {\n type: \"object\",\n properties: { scope: { type: \"string\", enum: [\"local\", \"lineage\", \"project\"] } },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"members\",\n description: \"List the unified project topology of roots, agents, and actors\",\n inputSchema: {\n type: \"object\",\n properties: {\n scope: { type: \"string\", enum: [\"local\", \"lineage\", \"project\"] },\n kinds: {\n type: \"array\",\n items: { type: \"string\", enum: [\"root\", \"agent\", \"actor\"] },\n },\n includeStale: { type: \"boolean\" },\n },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"self\",\n description: \"Return this caller's intrinsic participant identity in the unified topology\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"main\",\n description:\n \"Return the root user-facing Main Pi agent target. The stable alias main is also accepted by agents.steer and agents.followUp.\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"sessions\",\n description: \"List all live root Pi session agents in the project, including the current lineage root and peers, with symmetric participant identities.\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"peers\",\n description: \"List other live root Pi sessions sharing this project mesh. The dashboard-owning session remains Main; these targets are named peers.\",\n inputSchema: { type: \"object\", properties: {}, additionalProperties: false },\n risk: \"read\",\n },\n {\n name: \"subscribe\",\n description:\n \"Create a durable source-qualified participant lifecycle subscription. Events are delivered to Main by default or to another participant through steer/follow-up routing.\",\n inputSchema: {\n type: \"object\",\n properties: {\n from: { type: \"string\", description: \"Exact source participant id; main means this lineage root\" },\n events: { type: \"array\", minItems: 1, items: lifecycleEventSchema },\n to: { type: \"string\", description: \"Target participant id; defaults to main\" },\n delivery: { type: \"string\", enum: [\"steer\", \"followUp\"] },\n triggerTurn: { type: \"boolean\" },\n once: { type: \"boolean\" },\n },\n required: [\"from\", \"events\", \"delivery\", \"triggerTurn\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"subscriptions\",\n description: \"List durable participant lifecycle subscriptions, optionally filtered by source or target\",\n inputSchema: {\n type: \"object\",\n properties: { from: { type: \"string\" }, to: { type: \"string\" } },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"unsubscribe\",\n description: \"Remove a participant lifecycle subscription\",\n inputSchema: idSchema,\n risk: \"agent\",\n },\n {\n name: \"models\",\n description:\n \"List models exposed by the selected runner. Claude models are enumerated from the installed Claude Code runtime, not hard-coded.\",\n inputSchema: {\n type: \"object\",\n properties: {\n runner: { type: \"string\", enum: [\"pi\", \"claude\", \"veda\"] },\n refresh: { type: \"boolean\" },\n },\n additionalProperties: false,\n },\n risk: \"execute\",\n },\n {\n name: \"switchModel\",\n description:\n \"Switch Main's live Pi session model in place. The model selector accepts an exact provider/id, a configured models.aliases name (alias chains try each target in order until one is authenticated), an exact model id, or a search term; inexact terms resolve to the closest match, preferring recently used models (via pi-model-sort usage, when present).\",\n inputSchema: {\n type: \"object\",\n properties: {\n model: {\n type: \"string\",\n description: \"provider/id, alias name, or search term\",\n },\n provider: { type: \"string\" },\n },\n required: [\"model\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"stop\",\n description: \"Stop a local or remotely owned agent or actor that advertises the stop capability\",\n inputSchema: idSchema,\n risk: \"agent\",\n },\n {\n name: \"cleanup\",\n description: \"Remove a completed agent's run files and optional Git worktree\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n deleteBranch: { type: \"boolean\" },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"write\",\n },\n {\n name: \"create\",\n description:\n 'Create a persistent actor with independently selected session or project storage. Use scope \"global\" to save a reusable project-independent template instead of a live actor.',\n inputSchema: {\n type: \"object\",\n properties: {\n name: { type: \"string\" },\n instructions: { type: \"string\" },\n events: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: [...FABRIC_ACTOR_HOST_EVENTS],\n },\n },\n topics: { type: \"array\", items: { type: \"string\" } },\n delivery: {\n type: \"string\",\n enum: [\"mailbox\", \"steer\", \"followUp\", \"nextTurn\"],\n },\n responseMode: { type: \"string\", enum: [\"text\", \"directive\"] },\n triggerTurn: { type: \"boolean\" },\n coalesce: { type: \"boolean\" },\n residency: residencySchema,\n runner: runProperties.runner,\n kernel: runProperties.kernel,\n model: runProperties.model,\n thinking: runProperties.thinking,\n tools: runProperties.tools,\n transport: runProperties.transport,\n timeoutMs: runProperties.timeoutMs,\n extensions: runProperties.extensions,\n requires: {\n type: \"array\",\n maxItems: 128,\n description: \"Exact Fabric provider.action refs committed before every actor run. Object entries may be optional.\",\n items: {\n oneOf: [\n { type: \"string\", minLength: 3, maxLength: 256 },\n {\n type: \"object\",\n properties: {\n ref: { type: \"string\", minLength: 3, maxLength: 256 },\n optional: { type: \"boolean\" },\n },\n required: [\"ref\"],\n additionalProperties: false,\n },\n ],\n },\n },\n validWhile: {\n type: \"object\",\n properties: { version: { const: 1 }, source: { type: \"string\" } },\n required: [\"version\", \"source\"],\n additionalProperties: false,\n },\n scope: {\n type: \"string\",\n enum: [\"session\", \"project\", \"global\"],\n description: \"session isolates the actor to the root Pi session; project shares it across sessions; global creates a non-live template.\",\n },\n },\n required: [\"name\", \"instructions\"],\n oneOf: [\n {\n properties: {\n delivery: { const: \"mailbox\" },\n triggerTurn: { const: false },\n },\n },\n {\n properties: {\n delivery: { const: \"nextTurn\" },\n triggerTurn: { const: false },\n },\n required: [\"delivery\"],\n },\n {\n properties: { delivery: { enum: [\"steer\", \"followUp\"] } },\n required: [\"delivery\", \"triggerTurn\"],\n },\n ],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"ask\",\n description: \"Send a message to a persistent actor through its live owner and wait for its next response. Optional model/thinking values apply only to this activation.\",\n inputSchema: {\n type: \"object\",\n properties: actorInvocationProperties,\n required: [\"id\", \"message\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"tell\",\n description: \"Queue a message through a persistent actor's live owner without waiting. Optional model/thinking values apply only to this activation.\",\n inputSchema: {\n type: \"object\",\n properties: actorInvocationProperties,\n required: [\"id\", \"message\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"steer\",\n description:\n \"Steer Main, a running one-shot agent between turns, or a persistent actor through its mailbox. The stable id alias main targets the root user-facing Pi session. Non-local targets route over the project mesh.\",\n inputSchema: {\n type: \"object\",\n properties: { id: { type: \"string\" }, message: { type: \"string\" }, data: {} },\n required: [\"id\", \"message\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"followUp\",\n description:\n \"Queue a follow-up for Main or a running one-shot agent, or enqueue a persistent actor mailbox message. The stable id alias main targets the root user-facing Pi session. Non-local targets route over the project mesh.\",\n inputSchema: {\n type: \"object\",\n properties: { id: { type: \"string\" }, message: { type: \"string\" }, data: {} },\n required: [\"id\", \"message\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setSteeringMode\",\n description:\n \"Set how queued steer messages are delivered to a running one-shot agent: all at once after the current turn, or one per turn (default). Local agent only.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n mode: { type: \"string\", enum: [\"all\", \"one-at-a-time\"] },\n },\n required: [\"id\", \"mode\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setFollowUpMode\",\n description:\n \"Set how queued follow-up messages are delivered to a one-shot agent: all when it finishes, or one per completion (default). Local agent only.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n mode: { type: \"string\", enum: [\"all\", \"one-at-a-time\"] },\n },\n required: [\"id\", \"mode\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"compact\",\n description:\n \"Request an advisory compaction of a running Pi-runner child agent's context at its next safe boundary (between its own turns), preserving the child's accumulated context. Rejected for Claude-runner children. The child pi core applies the compaction; Fabric only forwards the intent.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n instructions: {\n type: \"string\",\n description: \"Optional custom compaction instructions forwarded to the child pi\",\n },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"actorStatus\",\n description: \"Read one persistent actor's status\",\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"actors\",\n description:\n 'List persistent actors. Default scope \"project\" lists live actors in this Fabric session; scope \"global\" lists project-independent templates in the global registry.',\n inputSchema: {\n type: \"object\",\n properties: { scope: { type: \"string\", enum: [\"project\", \"global\"] } },\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"messages\",\n description: \"Read a persistent actor's bounded inbox and outbox history\",\n inputSchema: {\n type: \"object\",\n properties: { id: { type: \"string\" }, limit: { type: \"number\", minimum: 1 } },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"read\",\n },\n {\n name: \"setModel\",\n description:\n \"Change or clear a persistent actor model binding. Session scope is the default; project scope explicitly pins the shared definition default.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n model: { type: \"string\" },\n scope: actorBindingScopeSchema,\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setThinking\",\n description:\n \"Change or clear a persistent actor reasoning-effort binding. Session scope is the default; project scope explicitly pins the shared definition default.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n thinking: runProperties.thinking,\n scope: actorBindingScopeSchema,\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setTools\",\n description:\n \"Replace a persistent actor's tool allowlist. Takes effect on its next queued message; an empty list disables optional tools.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n tools: runProperties.tools,\n scope: { type: \"string\", enum: [\"project\", \"global\"] },\n },\n required: [\"id\", \"tools\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setEvents\",\n description: \"Replace a persistent actor's session-bound Pi and synthetic tool_error event subscriptions\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n events: {\n type: \"array\",\n items: {\n type: \"string\",\n enum: [...FABRIC_ACTOR_HOST_EVENTS],\n },\n },\n },\n required: [\"id\", \"events\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setDeliveryPolicy\",\n description:\n \"Replace a project actor or global template delivery policy. steer/followUp require an explicit triggerTurn choice; mailbox/nextTurn require false.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n delivery: {\n type: \"string\",\n enum: [\"mailbox\", \"steer\", \"followUp\", \"nextTurn\"],\n },\n triggerTurn: { type: \"boolean\" },\n scope: { type: \"string\", enum: [\"project\", \"global\"] },\n },\n required: [\"id\", \"delivery\", \"triggerTurn\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"clearMessages\",\n description: \"Clear a persistent actor's recorded message history\",\n inputSchema: idSchema,\n risk: \"write\",\n },\n {\n name: \"remove\",\n description:\n 'Stop and remove a persistent actor. Default scope \"project\" removes a live project actor; scope \"global\" removes a project-independent template from the global registry.',\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n scope: { type: \"string\", enum: [\"project\", \"global\"] },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"setInstructions\",\n description:\n 'Replace an actor\\'s default instruction (its persona / system-prompt body). Default scope \"project\" edits a live project actor; scope \"global\" edits a project-independent template. Takes effect on the actor\\'s next queued message.',\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n instructions: { type: \"string\" },\n scope: { type: \"string\", enum: [\"project\", \"global\"] },\n },\n required: [\"id\", \"instructions\"],\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"import\",\n description:\n \"Import a project-independent template from the global registry into the current project as a fresh live actor with no inherited history (no messages, session, or run logs). Identify the template by id or name; optionally rename the imported actor with \\\"as\\\" to avoid colliding with a live actor.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\", description: \"Template id or name (one of id/name required)\" },\n name: { type: \"string\", description: \"Template name (one of id/name required)\" },\n as: { type: \"string\", description: \"Optional new name for the imported live actor\" },\n },\n additionalProperties: false,\n },\n risk: \"agent\",\n },\n {\n name: \"export\",\n description:\n \"Export a live project actor's definition to the global registry as a project-independent template, without any history (no messages, session, or run logs). Throws on a name collision unless overwrite is true.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\" },\n overwrite: { type: \"boolean\" },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"write\",\n },\n {\n name: \"log\",\n description:\n \"Read an actor or agent run's LLM/agent log: the actor's session transcript (session.jsonl) and/or a retained run's event stream (events.jsonl: tool calls, model responses, usage). Actors retain their last runs so logs survive after success.\",\n inputSchema: {\n type: \"object\",\n properties: {\n id: { type: \"string\", description: \"Actor ID/name or agent run ID\" },\n type: {\n type: \"string\",\n enum: [\"session\", \"run\", \"all\"],\n description:\n \"session = actor session transcript (default for actors); run = last retained run's events; all = both\",\n },\n lines: { type: \"number\", minimum: 1, description: \"Page line limit (default 200)\" },\n before: {\n type: \"number\",\n minimum: 0,\n description: \"Exclusive line cursor returned by a previous page to load older entries\",\n },\n runId: { type: \"string\", description: \"Specific retained run (default: actor's last run)\" },\n },\n required: [\"id\"],\n additionalProperties: false,\n },\n risk: \"read\",\n },\n];\n", "import type { AgentRunRequest } from \"./types.js\";\nimport { isFabricThinking } from \"../thinking.js\";\nimport { aliasThinking, type FabricModelAliases } from \"../core/model-resolution.js\";\n\nconst stringArray = (value: unknown): string[] | undefined => Array.isArray(value) ? value.filter((entry): entry is string => typeof entry === \"string\") : undefined;\nconst checkedKernel = (value: unknown): AgentRunRequest[\"kernel\"] => {\n if (value === undefined || value === \"inherit\" || value === \"typescript\" || value === \"python\") return value;\n throw new Error(`Invalid Fabric agent kernel: ${String(value)}`);\n};\n\nexport const normalizeAgentRunRequest = (\n args: Record<string, unknown>,\n defaults: {runner: NonNullable<AgentRunRequest[\"runner\"]>; model?: string; timeoutMs: number; inheritedModel?: {provider: string; id: string}; models?: {aliases?: FabricModelAliases}},\n options: {allowCwd?: boolean} = {},\n): AgentRunRequest => {\n const transport =\n args.transport === \"auto\" ||\n args.transport === \"process\" ||\n args.transport === \"tmux\" ||\n args.transport === \"screen\" ||\n args.transport === \"localterm\" ||\n args.transport === \"herdr\"\n ? args.transport\n : undefined;\n // An explicit call or actor level always wins; otherwise an alias can carry\n // the intended effort for the model it selects (e.g. a \"cheap\" alias that is\n // both cheaper and shallower), and the global agents.thinking default applies\n // last, inside the manager.\n const requestedModel =\n typeof args.model === \"string\"\n ? args.model\n : typeof defaults.model === \"string\"\n ? defaults.model\n : undefined;\n const thinking = isFabricThinking(args.thinking)\n ? args.thinking\n : aliasThinking(defaults.models?.aliases, requestedModel ?? \"\");\n const tools = stringArray(args.tools);\n const timeoutMs = typeof args.timeoutMs === \"number\" && Number.isFinite(args.timeoutMs) && args.timeoutMs > defaults.timeoutMs ? args.timeoutMs : undefined;\n const runner =\n args.runner === \"pi\" || args.runner === \"claude\" || args.runner === \"veda\"\n ? args.runner\n : defaults.runner;\n const inheritedModel =\n runner === \"pi\" && !defaults.model && defaults.inheritedModel\n ? `${defaults.inheritedModel.provider}/${defaults.inheritedModel.id}`\n : undefined;\n const kernel = checkedKernel(args.kernel);\n if (args.recursive === true && args.extensions === false) {\n throw new Error(\"Recursive Fabric requires extensions enabled; omit recursive or extensions: false\");\n }\n return {\n task: String(args.task),\n runner,\n ...(kernel !== undefined ? { kernel } : {}),\n ...(typeof args.name === \"string\" ? { name: args.name } : {}),\n ...(transport ? { transport } : {}),\n ...(typeof args.model === \"string\"\n ? { model: args.model }\n : inheritedModel\n ? { model: inheritedModel }\n : {}),\n ...(typeof args.persona === \"string\" && args.persona.trim()\n ? { persona: args.persona.trim() }\n : {}),\n ...(thinking ? { thinking } : {}),\n ...(tools ? { tools } : {}),\n ...(timeoutMs !== undefined ? { timeoutMs } : {}),\n ...(typeof args.extensions === \"boolean\"\n ? { extensions: args.extensions }\n : args.recursive === true ? { extensions: true } : {}),\n ...(typeof args.recursive === \"boolean\" ? { recursive: args.recursive } : {}),\n ...(options.allowCwd !== false && typeof args.cwd === \"string\" ? { cwd: args.cwd } : {}),\n ...(typeof args.worktree === \"boolean\" ? { worktree: args.worktree } : {}),\n ...(args.residency === \"session\" || args.residency === \"durable\"\n ? { residency: args.residency }\n : {}),\n ...(typeof args.schema === \"object\" && args.schema !== null && !Array.isArray(args.schema)\n ? { schema: args.schema as Record<string, unknown> }\n : {}),\n ...(typeof args.systemPrompt === \"string\" && args.systemPrompt.trim()\n ? { systemPrompt: args.systemPrompt }\n : {}),\n };\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AASA,IAAM,gBAAgB;AAAA,EACpB,MAAM,EAAE,MAAM,UAAU,aAAa,4CAA4C;AAAA,EACjF,MAAM,EAAE,MAAM,SAAS;AAAA,EACvB,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM,CAAC,MAAM,UAAU,MAAM;AAAA,IAC7B,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM,CAAC,cAAc,UAAU,SAAS;AAAA,IACxC,aAAa;AAAA,EACf;AAAA,EACA,WAAW;AAAA,IACT,MAAM;AAAA,IACN,MAAM,CAAC,QAAQ,WAAW,QAAQ,UAAU,aAAa,OAAO;AAAA,EAClE;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,IACN,aACE;AAAA,EACJ;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,IACN,MAAM,CAAC,OAAO,WAAW,OAAO,UAAU,QAAQ,SAAS,KAAK;AAAA,EAClE;AAAA,EACA,OAAO,EAAE,MAAM,SAAS,OAAO,EAAE,MAAM,SAAS,EAAE;AAAA,EAClD,WAAW;AAA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a,IAClC,CAAC;AAAA,EACP;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createGuestStackMap,
|
|
3
3
|
guestSetupSource,
|
|
4
4
|
remapGuestErrorText
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-M3ZNZ6EZ.js";
|
|
6
6
|
import {
|
|
7
7
|
transpileFabricCodeWithSourceMap
|
|
8
8
|
} from "./chunk-N5GUXC6F.js";
|
|
@@ -178,6 +178,14 @@ var NodeProcessRuntime = class {
|
|
|
178
178
|
error: "Process memory limit must be a positive safe integer"
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
+
if (!Number.isFinite(options.timeoutMs) || options.timeoutMs < 1) {
|
|
182
|
+
return {
|
|
183
|
+
value: void 0,
|
|
184
|
+
logs: [],
|
|
185
|
+
terminationReason: "runtime_error",
|
|
186
|
+
error: "Process timeout must be positive"
|
|
187
|
+
};
|
|
188
|
+
}
|
|
181
189
|
const runtimeOptions = this.#interpreter === "bun" ? { requireBun: true } : { requireNode: true };
|
|
182
190
|
const interpreterPath = this.#interpreter === "bun" ? await resolveScriptRuntime(runtimeOptions) : resolveScriptRuntimeSync(runtimeOptions);
|
|
183
191
|
const child = spawn(
|
|
@@ -228,11 +236,11 @@ var NodeProcessRuntime = class {
|
|
|
228
236
|
resolve(result);
|
|
229
237
|
};
|
|
230
238
|
const scheduleDeadline = () => {
|
|
231
|
-
|
|
239
|
+
clearTimeout(deadline);
|
|
232
240
|
deadline = setTimeout(() => {
|
|
233
241
|
const error = `Execution timed out after ${effectiveTimeoutMs}ms`;
|
|
234
242
|
finish({ value: void 0, logs: [], terminationReason: "timed_out", error });
|
|
235
|
-
}, Math.max(0, deadlineAt - Date.now()));
|
|
243
|
+
}, Math.min(2147483647, Math.max(0, deadlineAt - Date.now())));
|
|
236
244
|
deadline.unref?.();
|
|
237
245
|
};
|
|
238
246
|
const extendDeadline = (ref, args) => {
|
|
@@ -356,4 +364,4 @@ export {
|
|
|
356
364
|
NodeProcessRuntime,
|
|
357
365
|
BunProcessRuntime
|
|
358
366
|
};
|
|
359
|
-
//# sourceMappingURL=chunk-
|
|
367
|
+
//# sourceMappingURL=chunk-CIODQX77.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/runtime/node-process-runtime.ts", "../../src/runtime/node-process-child-source.ts"],
|
|
4
|
+
"sourcesContent": ["import { spawn, type ChildProcess } from \"node:child_process\";\nimport { runAbortable, settleWithin } from \"../async-settlement.js\";\nimport { piBashExitMetadata } from \"../core/pi-bash-error.js\";\nimport { isPiShellRef } from \"../core/pi-tools.js\";\nimport { guestSetupSource } from \"./quickjs-runtime.js\";\nimport type { FabricHostCall, FabricSandboxOptions, FabricSandboxResult } from \"./kernel.js\";\nimport { NODE_PROCESS_CHILD_SOURCE } from \"./node-process-child-source.js\";\nimport { createGuestStackMap, remapGuestErrorText } from \"./guest-stack-map.js\";\nimport { transpileFabricCodeWithSourceMap } from \"./type-checker.js\";\nimport {\n resolveScriptRuntime,\n resolveScriptRuntimeSync,\n} from \"../agents/transports/process-utils.js\";\n\ninterface ChildCallMessage {\n type: \"call\";\n id: number;\n ref: string;\n args: Record<string, unknown>;\n}\n\ninterface ChildResultMessage {\n type: \"result\";\n result: FabricSandboxResult;\n}\n\ntype ChildMessage = ChildCallMessage | ChildResultMessage;\n\nconst HOST_TASK_SETTLE_GRACE_MS = 250;\n\nconst send = (child: ChildProcess, message: any): void => {\n if (!child.connected) return;\n child.send(message, () => undefined);\n};\n\nexport class NodeProcessRuntime {\n readonly #interpreter: \"node\" | \"bun\";\n\n constructor(interpreter: \"node\" | \"bun\" = \"node\") {\n this.#interpreter = interpreter;\n }\n\n async execute(\n code: string,\n hostCall: FabricHostCall,\n options: FabricSandboxOptions,\n ): Promise<FabricSandboxResult> {\n if (options.signal?.aborted) {\n return {\n value: undefined,\n logs: [],\n terminationReason: \"aborted\",\n error: \"Execution cancelled\",\n };\n }\n if (!Number.isSafeInteger(options.memoryLimitBytes) || options.memoryLimitBytes < 1) {\n return {\n value: undefined,\n logs: [],\n terminationReason: \"runtime_error\",\n error: \"Process memory limit must be a positive safe integer\",\n };\n }\n if (!Number.isFinite(options.timeoutMs) || options.timeoutMs < 1) {\n return {\n value: undefined,\n logs: [],\n terminationReason: \"runtime_error\",\n error: \"Process timeout must be positive\",\n };\n }\n\n // Bun evaluates --eval input as ESM and ignores V8 heap flags, so the\n // Bun child gets the guest source bare; Node needs the module + heap flags.\n // Bun resolution stays async: Pi may legitimately run under Node while bun\n // is only available on PATH, and the sync variant does no PATH lookup.\n const runtimeOptions = this.#interpreter === \"bun\" ? { requireBun: true } : { requireNode: true };\n const interpreterPath = this.#interpreter === \"bun\"\n ? await resolveScriptRuntime(runtimeOptions)\n : resolveScriptRuntimeSync(runtimeOptions);\n const child = spawn(\n interpreterPath,\n this.#interpreter === \"bun\"\n ? [\"--eval\", NODE_PROCESS_CHILD_SOURCE]\n : [\n // Guest import() through importModuleDynamically needs the vm\n // modules flag; Bun's vm ignores the option (see __fabricImport).\n \"--experimental-vm-modules\",\n `--max-old-space-size=${Math.max(16, Math.floor(options.memoryLimitBytes / (1024 * 1024)))}`,\n \"--input-type=module\",\n \"--eval\",\n NODE_PROCESS_CHILD_SOURCE,\n ],\n { stdio: [\"ignore\", \"ignore\", \"ignore\", \"ipc\"] },\n );\n // Bun resolution is async, so the signal may have aborted while resolving.\n if (options.signal?.aborted) {\n return {\n value: undefined,\n logs: [],\n terminationReason: \"aborted\",\n error: \"Execution cancelled\",\n };\n }\n const hostAbortController = new AbortController();\n const startedAt = Date.now();\n let effectiveTimeoutMs = options.timeoutMs;\n let deadlineAt = startedAt + effectiveTimeoutMs;\n let deadline: NodeJS.Timeout | undefined;\n let abortHandler: (() => void) | undefined;\n let settled = false;\n let finishing = false;\n const hostTasks = new Set<Promise<void>>();\n\n const guestBundle = options.transpiledCode === undefined\n ? transpileFabricCodeWithSourceMap(code)\n : { code: options.transpiledCode, sourceMap: options.transpiledSourceMap };\n const guestStackMap = createGuestStackMap(guestBundle.sourceMap);\n const guestLineCount = guestBundle.code.split(\"\\n\").length;\n\n return new Promise<FabricSandboxResult>((resolve) => {\n const finish = (result: FabricSandboxResult): void => {\n if (settled) return;\n settled = true;\n if (deadline) clearTimeout(deadline);\n if (abortHandler) options.signal?.removeEventListener(\"abort\", abortHandler);\n if (!hostAbortController.signal.aborted && hostTasks.size > 0) {\n hostAbortController.abort(new Error(result.error ?? \"Process execution stopped\"));\n }\n child.removeAllListeners();\n if (child.connected) child.disconnect();\n if (child.exitCode === null && child.signalCode === null) child.kill(\"SIGKILL\");\n resolve(result);\n };\n const scheduleDeadline = (): void => {\n clearTimeout(deadline);\n deadline = setTimeout(() => {\n const error = `Execution timed out after ${effectiveTimeoutMs}ms`;\n finish({ value: undefined, logs: [], terminationReason: \"timed_out\", error });\n }, Math.min(2_147_483_647, Math.max(0, deadlineAt - Date.now())));\n deadline.unref?.();\n };\n const extendDeadline = (ref: string, args: Record<string, unknown>): void => {\n const requested = options.minimumTimeoutMsForHostCall?.(ref, args);\n if (typeof requested !== \"number\" || !Number.isFinite(requested)) return;\n const nextDeadlineAt = Date.now() + Math.max(1, Math.floor(requested));\n if (nextDeadlineAt <= deadlineAt) return;\n deadlineAt = nextDeadlineAt;\n effectiveTimeoutMs = deadlineAt - startedAt;\n scheduleDeadline();\n };\n\n abortHandler = () => {\n finish({\n value: undefined,\n logs: [],\n terminationReason: \"aborted\",\n error: \"Execution cancelled\",\n });\n };\n options.signal?.addEventListener(\"abort\", abortHandler, { once: true });\n\n child.on(\"message\", (raw: unknown) => {\n if (settled || finishing || typeof raw !== \"object\" || raw === null) return;\n const message = raw as ChildMessage;\n if (message.type === \"result\") {\n finishing = true;\n if (deadline) clearTimeout(deadline);\n if (message.result.terminationReason !== \"completed\" && !hostAbortController.signal.aborted) {\n hostAbortController.abort(new Error(message.result.error ?? \"Process execution stopped\"));\n }\n void (async () => {\n const completed = await settleWithin(hostTasks, HOST_TASK_SETTLE_GRACE_MS);\n if (!completed && !hostAbortController.signal.aborted) {\n hostAbortController.abort(\n new Error(\"Fabric guest execution ended before its host calls settled\"),\n );\n await settleWithin(hostTasks, HOST_TASK_SETTLE_GRACE_MS);\n }\n finish(\n message.result.error === undefined\n ? message.result\n : {\n ...message.result,\n error: remapGuestErrorText(message.result.error, guestStackMap, guestLineCount),\n },\n );\n })();\n return;\n }\n if (message.type !== \"call\") return;\n extendDeadline(message.ref, message.args);\n if (message.ref === \"fabric.$timer\") {\n const ms = Math.max(0, Number(message.args?.ms ?? 0));\n let timer: NodeJS.Timeout | undefined;\n const timerTask = new Promise<void>((resolveTask) => {\n timer = setTimeout(() => {\n if (!settled && !finishing) {\n send(child, { type: \"response\", id: message.id, ok: true, value: undefined });\n }\n resolveTask();\n }, ms);\n timer!.unref?.();\n });\n hostTasks.add(timerTask);\n void timerTask.finally(() => {\n hostTasks.delete(timerTask);\n if (timer) clearTimeout(timer);\n });\n return;\n }\n const task = runAbortable(hostAbortController.signal, () =>\n hostCall(message.ref, message.args, hostAbortController.signal),\n ).then(\n (value) => send(child, { type: \"response\", id: message.id, ok: true, value }),\n (error) =>\n send(child, {\n type: \"response\",\n id: message.id,\n ok: false,\n error: error instanceof Error ? error.message : String(error),\n bashExit: isPiShellRef(message.ref) ? piBashExitMetadata(error) : undefined,\n }),\n );\n hostTasks.add(task);\n void task.finally(() => hostTasks.delete(task));\n });\n child.once(\"error\", (error) => {\n finish({\n value: undefined,\n logs: [],\n terminationReason: \"runtime_error\",\n error: `Process executor failed: ${error.message}`,\n });\n });\n child.once(\"exit\", (exitCode, signal) => {\n if (settled) return;\n const detail = signal ? `signal ${signal}` : `exit code ${exitCode ?? \"unknown\"}`;\n finish({\n value: undefined,\n logs: [],\n terminationReason: \"runtime_error\",\n error: `Process executor exited before returning a result (${detail}); it may have exceeded its memory limit`,\n });\n });\n\n scheduleDeadline();\n send(child, {\n type: \"execute\",\n setup: guestSetupSource(options.piToolCanonicalFields),\n code: guestBundle.code,\n strings: options.strings ?? {},\n tokenBudget: options.tokenBudget,\n maxLogChars: options.maxLogChars ?? 100_000,\n });\n });\n }\n}\n\nexport class BunProcessRuntime extends NodeProcessRuntime {\n constructor() {\n super(\"bun\");\n }\n}\n", "export const NODE_PROCESS_CHILD_SOURCE = String.raw`\nimport vm from \"node:vm\";\n\nconst pending = new Map();\nlet nextCallId = 0;\n\nconst send = (message) => {\n if (process.connected) process.send?.(message);\n};\n\nconst formatValue = (value) => {\n if (typeof value === \"string\") return value;\n if (value instanceof Error) return value.stack ?? value.message;\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n};\n\nconst jsonCompatible = (value) => {\n if (value === undefined) return undefined;\n const serialized = JSON.stringify(value);\n return serialized === undefined ? undefined : JSON.parse(serialized);\n};\n\nconst run = async (message) => {\n const logs = [];\n let logChars = 0;\n let logsTruncated = false;\n const hostCall = (ref, args) => {\n const id = nextCallId++;\n return new Promise((resolve, reject) => {\n pending.set(id, { resolve, reject });\n send({\n type: \"call\",\n id,\n ref: String(ref),\n args:\n typeof args === \"object\" && args !== null && !Array.isArray(args)\n ? args\n : {},\n });\n });\n };\n const print = (...values) => {\n if (logsTruncated) return;\n const line = values.map(formatValue).join(\" \");\n const remaining = message.maxLogChars - logChars;\n if (line.length > remaining) {\n if (remaining > 0) logs.push(line.slice(0, remaining));\n logs.push(\"[Pi Fabric log output truncated]\");\n logsTruncated = true;\n return;\n }\n logs.push(line);\n logChars += line.length;\n };\n\n // Bun module namespace for the guest. The child resolves the specifier in\n // its own module context; under the node runtime it fails and the binding\n // stays undefined. Namespace objects come from this realm, so instanceof\n // against guest-realm classes fails (same caveat as other sandbox bridges).\n const __bun = await import(\"bun\").catch(() => undefined);\n const sandbox = {\n __fabricHostCall: hostCall,\n __fabricTokenBudget: message.tokenBudget ?? Number.POSITIVE_INFINITY,\n // Native-module bridge for guests whose vm lacks the dynamic-import\n // callback. Bun >= 1.4 honors importModuleDynamically on runInContext\n // (natural import() works there), so this is mostly a fallback and an\n // explicit escape hatch. Cross-realm caveat: namespaces come from this\n // realm, so instanceof against guest-realm classes fails.\n __fabricImport: (specifier) => import(specifier),\n // Resolved above; undefined under the node runtime.\n __bun,\n print,\n \u03C0: jsonCompatible(message.strings),\n };\n const context = vm.createContext(sandbox, {\n name: \"pi-fabric-node-process\",\n codeGeneration: { strings: true, wasm: false },\n });\n\n try {\n vm.runInContext(message.setup, context, { filename: \"pi-fabric-setup.js\" });\n const promise = vm.runInContext(message.code + \"\\n__piFabricMain()\", context, {\n filename: \"pi-fabric-guest.js\",\n // Node requires --experimental-vm-modules (set at spawn). Bun >= 1.4\n // honors this option on runInContext (unlike on createContext), so\n // natural guest import() works there; __fabricImport is a fallback.\n importModuleDynamically: (specifier) => import(specifier),\n });\n const value = jsonCompatible(await promise);\n send({ type: \"result\", result: { value, logs, terminationReason: \"completed\" } });\n } catch (error) {\n send({\n type: \"result\",\n result: {\n logs,\n terminationReason: \"runtime_error\",\n error: error?.stack ?? error?.message ?? String(error),\n },\n });\n }\n};\n\nprocess.on(\"message\", (message) => {\n if (typeof message !== \"object\" || message === null) return;\n if (message.type === \"execute\") {\n void run(message);\n return;\n }\n if (message.type !== \"response\") return;\n const operation = pending.get(message.id);\n if (!operation) return;\n pending.delete(message.id);\n if (message.ok) operation.resolve(message.value);\n else {\n const error = new Error(message.error ?? \"Host call failed\");\n if (message.bashExit) error.__fabricBashExit = message.bashExit;\n operation.reject(error);\n }\n});\n`;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,aAAgC;;;ACAlC,IAAM,4BAA4B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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qBAAqB;AAAA,QACrD,MAAM,YAAY;AAAA,QAClB,SAAS,QAAQ,WAAW,CAAC;AAAA,QAC7B,aAAa,QAAQ;AAAA,QACrB,aAAa,QAAQ,eAAe;AAAA,MACtC,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;AAEO,IAAM,oBAAN,cAAgC,mBAAmB;AAAA,EACxD,cAAc;AACZ,UAAM,KAAK;AAAA,EACb;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
prepareFabricActorHostPayload
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QLV2IZ3F.js";
|
|
4
4
|
import {
|
|
5
5
|
object
|
|
6
6
|
} from "./chunk-Z63R5GVN.js";
|
|
@@ -283,4 +283,4 @@ export {
|
|
|
283
283
|
JevObservationHost,
|
|
284
284
|
JevSubscription
|
|
285
285
|
};
|
|
286
|
-
//# sourceMappingURL=chunk-
|
|
286
|
+
//# sourceMappingURL=chunk-D6YSBP3R.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/protocol.ts"],
|
|
4
|
-
"sourcesContent": ["import type { ExtensionContext } from \"@earendil-works/pi-coding-agent\";\n\nexport const FABRIC_PROVIDER_REGISTER_EVENT = \"pi-fabric:provider:register:v1\";\nexport const FABRIC_PROVIDER_DISCOVER_EVENT = \"pi-fabric:provider:discover:v1\";\nexport const FABRIC_COMPONENT_REGISTER_EVENT = \"pi-fabric:component:register:v1\";\nexport const FABRIC_COMPONENT_DISCOVER_EVENT = \"pi-fabric:component:discover:v1\";\nexport const FABRIC_PREWALK_REQUEST_EVENT = \"pi-fabric:prewalk:request:v1\";\n\nexport type FabricPrewalkRequestResultV1 =\n | { ok: true }\n | { ok: false; error: string };\n\n/** Host-local request used by queue extensions that need an acknowledged prewalk arm. */\nexport interface FabricPrewalkRequestV1 {\n version: 1;\n context: ExtensionContext;\n claim: () => boolean;\n respond: (result: FabricPrewalkRequestResultV1) => void;\n}\n\nexport const readFabricPrewalkRequestV1 = (\n value: unknown,\n): FabricPrewalkRequestV1 | undefined => {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return undefined;\n const record = value as Record<string, unknown>;\n if (\n record.version !== 1 ||\n typeof record.context !== \"object\" ||\n record.context === null ||\n typeof record.claim !== \"function\" ||\n typeof record.respond !== \"function\"\n ) {\n return undefined;\n }\n return value as FabricPrewalkRequestV1;\n};\n\nexport const FABRIC_PEER_CARDS_EVENT = \"pi-fabric:peers:cards:v1\";\nexport const FABRIC_PEER_AWAIT_SETTLE_EVENT = \"pi-fabric:peer:await-settle:v1\";\n\n/** One root peer session on the project mesh, for pickers and status lines. */\nexport interface FabricPeerCardV1 {\n id: string;\n /** Linear-style project label (e.g. \"PQS-2\") minted by the owning host. */\n label: string;\n status: \"idle\" | \"running\";\n model?: string;\n cwd?: string;\n startedAt: number;\n updatedAt: number;\n pendingMessages: boolean;\n}\n\nexport type FabricPeerCardsResultV1 =\n | { ok: true; cards: FabricPeerCardV1[] }\n | { ok: false; error: string };\n\n/** Host-local request used by queue extensions to enumerate live peer sessions. */\nexport interface FabricPeerCardsRequestV1 {\n version: 1;\n context: ExtensionContext;\n claim: () => boolean;\n respond: (result: FabricPeerCardsResultV1) => void;\n}\n\nexport const readFabricPeerCardsRequestV1 = (\n value: unknown,\n): FabricPeerCardsRequestV1 | undefined => {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return undefined;\n const record = value as Record<string, unknown>;\n if (\n record.version !== 1 ||\n typeof record.context !== \"object\" ||\n record.context === null ||\n typeof record.claim !== \"function\" ||\n typeof record.respond !== \"function\"\n ) {\n return undefined;\n }\n return value as FabricPeerCardsRequestV1;\n};\n\nexport interface FabricPeerSettleProgressV1 {\n waiting: Array<{ label: string; status: \"idle\" | \"running\" }>;\n}\n\nexport type FabricPeerAwaitSettleResultV1 =\n | { ok: true }\n | { ok: false; error: string };\n\n/**\n * Host-local request used by queue extensions to hold dispatch until peer\n * sessions settle. A peer counts as settled once it has been quiet\n * (status-wide) for settledForMs; peers that vanish from the mesh count as\n * settled since they can no longer conflict. Selector matches a peer label\n * (case-insensitive) or exact participant id; omitted waits on all peers.\n */\nexport interface FabricPeerAwaitSettleRequestV1 {\n version: 1;\n context: ExtensionContext;\n selector?: string;\n settledForMs?: number;\n signal?: AbortSignal;\n update?: (progress: FabricPeerSettleProgressV1) => void;\n claim: () => boolean;\n respond: (result: FabricPeerAwaitSettleResultV1) => void;\n}\n\nexport const readFabricPeerAwaitSettleRequestV1 = (\n value: unknown,\n): FabricPeerAwaitSettleRequestV1 | undefined => {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return undefined;\n const record = value as Record<string, unknown>;\n const signal = record.signal as AbortSignal | undefined;\n if (\n record.version !== 1 ||\n typeof record.context !== \"object\" ||\n record.context === null ||\n typeof record.claim !== \"function\" ||\n typeof record.respond !== \"function\" ||\n (record.selector !== undefined && typeof record.selector !== \"string\") ||\n (record.settledForMs !== undefined && typeof record.settledForMs !== \"number\") ||\n (signal !== undefined && typeof signal.aborted !== \"boolean\") ||\n (record.update !== undefined && typeof record.update !== \"function\")\n ) {\n return undefined;\n }\n return value as FabricPeerAwaitSettleRequestV1;\n};\n\n/** Identifies host-side tool lifecycle events replayed for a nested Fabric call. */\nexport const FABRIC_NESTED_TOOL_CALL_ID_PREFIX = \"fabric_\";\n\n/** Discriminant for the transient details envelope on a proxied provider result. */\nexport const FABRIC_TOOL_RESULT_PROXY_KIND = \"pi-fabric.tool-result-proxy.v1\";\n\n/**\n * Host-only middleware details for non-Pi Fabric providers. `result` is the\n * exact value before maxNestedResultChars is enforced and is not persisted as\n * a separate Pi tool-result message.\n */\nexport interface FabricToolResultProxyDetailsV1 {\n kind: typeof FABRIC_TOOL_RESULT_PROXY_KIND;\n ref: string;\n result: unknown;\n}\n\nexport const readFabricToolResultProxyDetailsV1 = (\n value: unknown,\n): FabricToolResultProxyDetailsV1 | undefined => {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return undefined;\n const record = value as Record<string, unknown>;\n if (\n record.kind !== FABRIC_TOOL_RESULT_PROXY_KIND ||\n typeof record.ref !== \"string\" ||\n !Object.prototype.hasOwnProperty.call(record, \"result\")\n ) {\n return undefined;\n }\n return record as unknown as FabricToolResultProxyDetailsV1;\n};\n\nexport type FabricRisk = \"read\" | \"write\" | \"execute\" | \"network\" | \"agent\";\nexport type FabricEffectKind = \"none\" | \"scoped\" | \"transactional\" | \"emission\";\nexport type FabricEffectOrdering = \"commutative\" | \"ordered\" | \"unknown\";\n\nexport interface FabricActionEffect {\n kind: FabricEffectKind;\n resources?: string[];\n ordering?: FabricEffectOrdering;\n}\n\n/** MCP tool annotations (Model Context Protocol ToolAnnotations), cached when a runtime surfaces them. */\nexport interface FabricToolAnnotations {\n readOnlyHint?: boolean;\n idempotentHint?: boolean;\n destructiveHint?: boolean;\n openWorldHint?: boolean;\n}\nexport type FabricActivityEntityKind =\n | \"agent\"\n | \"actor\"\n | \"tool\"\n | \"extension\"\n | \"mcp\"\n | \"mesh\"\n | \"task\"\n | \"custom\";\n\nexport type FabricInvocationActivityUpdate =\n | { type: \"progress\"; message: string }\n | { type: \"entity\"; id: string; kind: FabricActivityEntityKind; name?: string }\n | { type: \"metrics\"; tokens?: number; toolCalls?: number; cost?: number };\n\nexport interface FabricMediaBlock {\n type: \"image\";\n data: string;\n mimeType: string;\n}\n\nexport interface FabricActionDescriptor {\n name: string;\n description: string;\n inputSchema: Record<string, unknown>;\n outputSchema?: Record<string, unknown>;\n risk: FabricRisk;\n namespace?: string;\n effect?: FabricActionEffect;\n annotations?: FabricToolAnnotations;\n}\n\nexport interface FabricCapabilityActionHead {\n key: string;\n parentKey: string;\n ref: string;\n name: string;\n description: string;\n descriptorHash: string;\n risk: FabricRisk;\n namespace?: string;\n effect?: FabricActionEffect;\n}\n\nexport interface FabricCapabilityProviderHead {\n key: string;\n parentKey: string;\n name: string;\n description: string;\n descriptorHash: string;\n actions: FabricCapabilityActionHead[];\n}\n\nexport interface FabricCapabilityBindingView {\n ref: string;\n provider: string;\n providerBindingId: string;\n generation: number;\n descriptorHash: string;\n}\n\nexport interface FabricCommittedCapabilityView {\n id: string;\n /** Runtime-local digest including provider binding generations. */\n digest: string;\n /** Portable digest of exact refs and descriptor semantics across runtimes. */\n semanticDigest: string;\n bindings: Record<string, FabricCapabilityBindingView>;\n}\n\nexport interface FabricCapabilityResolution {\n satisfied: boolean;\n missing: string[];\n optionalMissing: string[];\n view?: FabricCommittedCapabilityView;\n}\n\nexport interface FabricCapabilityCatalog {\n kind: \"pi-fabric.capability-catalog\";\n version: 1;\n root: {\n key: \"capability:fabric\";\n name: \"Fabric capabilities\";\n description: string;\n descriptorHash: string;\n };\n providers: FabricCapabilityProviderHead[];\n totalActions: number;\n indexedActions: number;\n complete: boolean;\n reasons: string[];\n}\n\nexport interface FabricProviderListRequest {\n namespace?: string;\n query?: string;\n limit?: number;\n}\n\n/** One named action whose arguments should be typed in guest declarations. */\nexport interface FabricNamedActionTypeSource {\n name: string;\n inputSchema: Record<string, unknown>;\n}\n\n/** One MCP server plus the tools to type for `mcp.<server>.*` guest calls. */\nexport interface FabricMcpServerTypeSource {\n server: string;\n tools: FabricNamedActionTypeSource[];\n}\n\nexport type {\n FabricKernel,\n FabricKernelRuntime,\n FabricHostCall,\n FabricSandboxOptions,\n FabricSandboxResult,\n FabricSandboxTerminationReason,\n} from \"./runtime/kernel.js\";\nexport type { FabricPythonRuntime } from \"./config.js\";\n\n/**\n * Live descriptor snapshot the registry hands to the guest declaration\n * builder so dynamic surfaces (mcp, extensions) get argument checking before\n * the sandbox runs. Empty/absent sections keep the loose static declarations.\n */\nexport interface FabricGuestTypeSources {\n mcpServers?: FabricMcpServerTypeSource[];\n extensionTools?: FabricNamedActionTypeSource[];\n}\n\n/**\n * Pre-rendered `declare const` blocks replacing the loose mcp/extensions\n * declaration lines. Values are full replacement text (helpers + declare).\n */\nexport interface FabricDynamicGuestDeclarations {\n mcp?: string;\n extensions?: string;\n}\n\nexport interface FabricInvocationContext {\n cwd: string;\n signal: AbortSignal | undefined;\n parentToolCallId: string;\n nestedToolCallId: string;\n extensionContext: ExtensionContext;\n update(message: string): void;\n activity?(update: FabricInvocationActivityUpdate): void;\n /** Host-supplied inside fabric_exec so agents.handoff schedules the outer-call boundary. */\n deferHandoff?(args: Record<string, unknown>): Record<string, unknown>;\n // Out-of-band image content blocks a provider (currently only pi.read of an\n // image file) wants attached to the call audit, so the single-call render can\n // re-attach them to the fabric_exec result content for pi core's kitty image\n // preview. Bypasses the result char bound that would truncate the base64.\n // `note` is the read tool's own text output (e.g. \"Read image file [image/png]\"),\n // captured after any tool_result patch so a handoff that strips pi's\n // non-vision note has run; used as the single-call body + content text so the\n // preview shows the clean note instead of the swapped description.\n attachMedia?(blocks: FabricMediaBlock[], note?: string): void;\n // Providers call this after mutable tool_call middleware has run so live and\n // durable audit surfaces reflect the arguments actually passed to the tool.\n updateArguments?(args: Record<string, unknown>): void;\n // Ephemeral renderer-only metadata. It is exposed to live Fabric previews but\n // never projected into the durable execution trace.\n attachPreview?(preview: unknown): void;\n capabilityView?: FabricCommittedCapabilityView;\n /** Advisory for ordinary calls; strict components reject concurrent conflicting effects. */\n effectPolicy?: \"advisory\" | \"strict\";\n}\n\nexport interface FabricScopedProviderResult {\n value: unknown;\n dispose(): void | Promise<void>;\n}\n\nexport interface FabricProvider {\n name: string;\n description: string;\n list(\n request: FabricProviderListRequest,\n context: FabricInvocationContext,\n ): Promise<FabricActionDescriptor[]>;\n describe(\n actionName: string,\n context: FabricInvocationContext,\n ): Promise<FabricActionDescriptor | undefined>;\n prepareArguments?(\n actionName: string,\n args: Record<string, unknown>,\n context: FabricInvocationContext,\n ): Record<string, unknown> | Promise<Record<string, unknown>>;\n invoke(\n actionName: string,\n args: Record<string, unknown>,\n context: FabricInvocationContext,\n ): Promise<unknown>;\n acquire?(\n actionName: string,\n args: Record<string, unknown>,\n context: FabricInvocationContext,\n ): Promise<FabricScopedProviderResult>;\n invocationEnded?(parentToolCallId: string): Promise<void>;\n subscribeCatalog?(listener: () => void): () => void;\n close?(): Promise<void>;\n}\n\nexport interface FabricProviderRegistration {\n version: 1;\n provider: FabricProvider;\n overwrite?: boolean;\n}\n\nexport interface FabricProviderDiscovery {\n version: 1;\n register(provider: FabricProvider, options?: { overwrite?: boolean }): void;\n}\n\nexport type {\n FabricCapabilityRequirement,\n FabricComponentChildOptions,\n FabricComponentContext,\n FabricComponentDefinition,\n FabricComponentDiscovery,\n FabricComponentDisposer,\n FabricComponentEffect,\n FabricComponentEffectConflict,\n FabricComponentEffectInfo,\n FabricComponentEffectOptions,\n FabricComponentEffectRegistration,\n FabricComponentEntry,\n FabricComponentGraph,\n FabricComponentGuarantee,\n FabricComponentHandle,\n FabricComponentInfo,\n FabricComponentProviderLease,\n FabricModelGuidance,\n FabricModelGuidanceInfo,\n FabricModelGuidancePlacement,\n FabricModelGuidanceTarget,\n FabricComponentProvision,\n FabricComponentRegistration,\n FabricComponentState,\n FabricComponentStopOptions,\n} from \"./components/types.js\";\n\nexport {\n FABRIC_EXECUTION_GUIDANCE_SLOT,\n MAX_FABRIC_MODEL_GUIDANCE_CONTENT_CHARS,\n MAX_FABRIC_MODEL_GUIDANCE_PER_COMPONENT,\n MAX_FABRIC_MODEL_GUIDANCE_REGISTRATIONS,\n MAX_FABRIC_MODEL_GUIDANCE_SNAPSHOT_CHARS,\n MAX_FABRIC_MODEL_GUIDANCE_TOTAL_CHARS,\n} from \"./components/model-guidance.js\";\n"],
|
|
4
|
+
"sourcesContent": ["import type { ExtensionContext } from \"@earendil-works/pi-coding-agent\";\n\nexport const FABRIC_PROVIDER_REGISTER_EVENT = \"pi-fabric:provider:register:v1\";\nexport const FABRIC_PROVIDER_DISCOVER_EVENT = \"pi-fabric:provider:discover:v1\";\nexport const FABRIC_COMPONENT_REGISTER_EVENT = \"pi-fabric:component:register:v1\";\nexport const FABRIC_COMPONENT_DISCOVER_EVENT = \"pi-fabric:component:discover:v1\";\nexport const FABRIC_PREWALK_REQUEST_EVENT = \"pi-fabric:prewalk:request:v1\";\n\nexport type FabricPrewalkRequestResultV1 =\n | { ok: true }\n | { ok: false; error: string };\n\n/** Host-local request used by queue extensions that need an acknowledged prewalk arm. */\nexport interface FabricPrewalkRequestV1 {\n version: 1;\n context: ExtensionContext;\n claim: () => boolean;\n respond: (result: FabricPrewalkRequestResultV1) => void;\n}\n\nexport const readFabricPrewalkRequestV1 = (\n value: unknown,\n): FabricPrewalkRequestV1 | undefined => {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return undefined;\n const record = value as Record<string, unknown>;\n if (\n record.version !== 1 ||\n typeof record.context !== \"object\" ||\n record.context === null ||\n typeof record.claim !== \"function\" ||\n typeof record.respond !== \"function\"\n ) {\n return undefined;\n }\n return value as FabricPrewalkRequestV1;\n};\n\nexport const FABRIC_PEER_CARDS_EVENT = \"pi-fabric:peers:cards:v1\";\nexport const FABRIC_PEER_AWAIT_SETTLE_EVENT = \"pi-fabric:peer:await-settle:v1\";\n\n/** One root peer session on the project mesh, for pickers and status lines. */\nexport interface FabricPeerCardV1 {\n id: string;\n /** Linear-style project label (e.g. \"PQS-2\") minted by the owning host. */\n label: string;\n status: \"idle\" | \"running\";\n model?: string;\n cwd?: string;\n startedAt: number;\n updatedAt: number;\n pendingMessages: boolean;\n}\n\nexport type FabricPeerCardsResultV1 =\n | { ok: true; cards: FabricPeerCardV1[] }\n | { ok: false; error: string };\n\n/** Host-local request used by queue extensions to enumerate live peer sessions. */\nexport interface FabricPeerCardsRequestV1 {\n version: 1;\n context: ExtensionContext;\n claim: () => boolean;\n respond: (result: FabricPeerCardsResultV1) => void;\n}\n\nexport const readFabricPeerCardsRequestV1 = (\n value: unknown,\n): FabricPeerCardsRequestV1 | undefined => {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return undefined;\n const record = value as Record<string, unknown>;\n if (\n record.version !== 1 ||\n typeof record.context !== \"object\" ||\n record.context === null ||\n typeof record.claim !== \"function\" ||\n typeof record.respond !== \"function\"\n ) {\n return undefined;\n }\n return value as FabricPeerCardsRequestV1;\n};\n\nexport interface FabricPeerSettleProgressV1 {\n waiting: Array<{ label: string; status: \"idle\" | \"running\" }>;\n}\n\nexport type FabricPeerAwaitSettleResultV1 =\n | { ok: true }\n | { ok: false; error: string };\n\n/**\n * Host-local request used by queue extensions to hold dispatch until peer\n * sessions settle. A peer counts as settled once it has been quiet\n * (status-wide) for settledForMs; peers that vanish from the mesh count as\n * settled since they can no longer conflict. Selector matches a peer label\n * (case-insensitive) or exact participant id; omitted waits on all peers.\n */\nexport interface FabricPeerAwaitSettleRequestV1 {\n version: 1;\n context: ExtensionContext;\n selector?: string;\n settledForMs?: number;\n signal?: AbortSignal;\n update?: (progress: FabricPeerSettleProgressV1) => void;\n claim: () => boolean;\n respond: (result: FabricPeerAwaitSettleResultV1) => void;\n}\n\nexport const readFabricPeerAwaitSettleRequestV1 = (\n value: unknown,\n): FabricPeerAwaitSettleRequestV1 | undefined => {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return undefined;\n const record = value as Record<string, unknown>;\n const signal = record.signal as AbortSignal | undefined;\n if (\n record.version !== 1 ||\n typeof record.context !== \"object\" ||\n record.context === null ||\n typeof record.claim !== \"function\" ||\n typeof record.respond !== \"function\" ||\n (record.selector !== undefined && typeof record.selector !== \"string\") ||\n (record.settledForMs !== undefined && typeof record.settledForMs !== \"number\") ||\n (signal !== undefined && typeof signal.aborted !== \"boolean\") ||\n (record.update !== undefined && typeof record.update !== \"function\")\n ) {\n return undefined;\n }\n return value as FabricPeerAwaitSettleRequestV1;\n};\n\n/** Identifies host-side tool lifecycle events replayed for a nested Fabric call. */\nexport const FABRIC_NESTED_TOOL_CALL_ID_PREFIX = \"fabric_\";\n\n/** Discriminant for the transient details envelope on a proxied provider result. */\nexport const FABRIC_TOOL_RESULT_PROXY_KIND = \"pi-fabric.tool-result-proxy.v1\";\n\n/**\n * Host-only middleware details for non-Pi Fabric providers. `result` is the\n * exact value before maxNestedResultChars is enforced and is not persisted as\n * a separate Pi tool-result message.\n */\nexport interface FabricToolResultProxyDetailsV1 {\n kind: typeof FABRIC_TOOL_RESULT_PROXY_KIND;\n ref: string;\n result: unknown;\n}\n\nexport const readFabricToolResultProxyDetailsV1 = (\n value: unknown,\n): FabricToolResultProxyDetailsV1 | undefined => {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return undefined;\n const record = value as Record<string, unknown>;\n if (\n record.kind !== FABRIC_TOOL_RESULT_PROXY_KIND ||\n typeof record.ref !== \"string\" ||\n !Object.prototype.hasOwnProperty.call(record, \"result\")\n ) {\n return undefined;\n }\n return record as unknown as FabricToolResultProxyDetailsV1;\n};\n\nexport type FabricRisk = \"read\" | \"write\" | \"execute\" | \"network\" | \"agent\";\nexport type FabricEffectKind = \"none\" | \"scoped\" | \"transactional\" | \"emission\";\nexport type FabricEffectOrdering = \"commutative\" | \"ordered\" | \"unknown\";\n\nexport interface FabricActionEffect {\n kind: FabricEffectKind;\n resources?: string[];\n ordering?: FabricEffectOrdering;\n}\n\n/** MCP tool annotations (Model Context Protocol ToolAnnotations), cached when a runtime surfaces them. */\nexport interface FabricToolAnnotations {\n readOnlyHint?: boolean;\n idempotentHint?: boolean;\n destructiveHint?: boolean;\n openWorldHint?: boolean;\n}\nexport type FabricActivityEntityKind =\n | \"agent\"\n | \"actor\"\n | \"tool\"\n | \"extension\"\n | \"mcp\"\n | \"mesh\"\n | \"task\"\n | \"custom\";\n\nexport type FabricInvocationActivityUpdate =\n | { type: \"progress\"; message: string }\n | { type: \"entity\"; id: string; kind: FabricActivityEntityKind; name?: string }\n | { type: \"metrics\"; tokens?: number; toolCalls?: number; cost?: number };\n\nexport interface FabricMediaBlock {\n type: \"image\";\n data: string;\n mimeType: string;\n}\n\nexport interface FabricActionDescriptor {\n name: string;\n description: string;\n inputSchema: Record<string, unknown>;\n outputSchema?: Record<string, unknown>;\n risk: FabricRisk;\n namespace?: string;\n effect?: FabricActionEffect;\n annotations?: FabricToolAnnotations;\n}\n\nexport interface FabricCapabilityActionHead {\n key: string;\n parentKey: string;\n ref: string;\n name: string;\n description: string;\n descriptorHash: string;\n risk: FabricRisk;\n namespace?: string;\n effect?: FabricActionEffect;\n}\n\nexport interface FabricCapabilityProviderHead {\n key: string;\n parentKey: string;\n name: string;\n description: string;\n descriptorHash: string;\n actions: FabricCapabilityActionHead[];\n}\n\nexport interface FabricCapabilityBindingView {\n ref: string;\n provider: string;\n providerBindingId: string;\n generation: number;\n descriptorHash: string;\n}\n\nexport interface FabricCommittedCapabilityView {\n id: string;\n /** Runtime-local digest including provider binding generations. */\n digest: string;\n /** Portable digest of exact refs and descriptor semantics across runtimes. */\n semanticDigest: string;\n bindings: Record<string, FabricCapabilityBindingView>;\n}\n\nexport interface FabricCapabilityResolution {\n satisfied: boolean;\n missing: string[];\n optionalMissing: string[];\n view?: FabricCommittedCapabilityView;\n}\n\nexport interface FabricCapabilityCatalog {\n kind: \"pi-fabric.capability-catalog\";\n version: 1;\n root: {\n key: \"capability:fabric\";\n name: \"Fabric capabilities\";\n description: string;\n descriptorHash: string;\n };\n providers: FabricCapabilityProviderHead[];\n totalActions: number;\n indexedActions: number;\n complete: boolean;\n reasons: string[];\n}\n\nexport interface FabricProviderListRequest {\n namespace?: string;\n query?: string;\n limit?: number;\n}\n\n/** One named action whose arguments should be typed in guest declarations. */\nexport interface FabricNamedActionTypeSource {\n name: string;\n inputSchema: Record<string, unknown>;\n}\n\n/** One MCP server plus the tools to type for `mcp.<server>.*` guest calls. */\nexport interface FabricMcpServerTypeSource {\n server: string;\n tools: FabricNamedActionTypeSource[];\n}\n\nexport type {\n FabricKernel,\n FabricKernelRuntime,\n FabricHostCall,\n FabricSandboxOptions,\n FabricSandboxResult,\n FabricSandboxTerminationReason,\n} from \"./runtime/kernel.js\";\nexport type { FabricPythonRuntime } from \"./config.js\";\n\n/**\n * Live descriptor snapshot the registry hands to the guest declaration\n * builder so dynamic surfaces (mcp, extensions) get argument checking before\n * the sandbox runs. Empty/absent sections keep the loose static declarations.\n */\nexport interface FabricGuestTypeSources {\n mcpServers?: FabricMcpServerTypeSource[];\n extensionTools?: FabricNamedActionTypeSource[];\n}\n\n/**\n * Pre-rendered `declare const` blocks replacing the loose mcp/extensions\n * declaration lines. Values are full replacement text (helpers + declare).\n */\nexport interface FabricDynamicGuestDeclarations {\n mcp?: string;\n extensions?: string;\n}\n\nexport interface FabricInvocationContext {\n cwd: string;\n signal: AbortSignal | undefined;\n parentToolCallId: string;\n nestedToolCallId: string;\n extensionContext: ExtensionContext;\n update(message: string): void;\n activity?(update: FabricInvocationActivityUpdate): void;\n /** Host-supplied inside fabric_exec so agents.handoff schedules the outer-call boundary. */\n deferHandoff?(args: Record<string, unknown>): Record<string, unknown>;\n // Out-of-band image content blocks a provider (currently only pi.read of an\n // image file) wants attached to the call audit, so the single-call render can\n // re-attach them to the fabric_exec result content for pi core's kitty image\n // preview. Bypasses the result char bound that would truncate the base64.\n // `note` is the read tool's own text output (e.g. \"Read image file [image/png]\"),\n // captured after any tool_result patch so a handoff that strips pi's\n // non-vision note has run; used as the single-call body + content text so the\n // preview shows the clean note instead of the swapped description.\n attachMedia?(blocks: FabricMediaBlock[], note?: string): void;\n // Providers call this after mutable tool_call middleware has run so live and\n // durable audit surfaces reflect the arguments actually passed to the tool.\n updateArguments?(args: Record<string, unknown>): void;\n // Ephemeral renderer-only metadata. It is exposed to live Fabric previews but\n // never projected into the durable execution trace.\n attachPreview?(preview: unknown): void;\n capabilityView?: FabricCommittedCapabilityView;\n /** Advisory for ordinary calls; strict components reject concurrent conflicting effects. */\n effectPolicy?: \"advisory\" | \"strict\";\n}\n\nexport interface FabricScopedProviderResult {\n value: unknown;\n dispose(): void | Promise<void>;\n}\n\nexport interface FabricProvider {\n name: string;\n description: string;\n list(\n request: FabricProviderListRequest,\n context: FabricInvocationContext,\n ): Promise<FabricActionDescriptor[]>;\n describe(\n actionName: string,\n context: FabricInvocationContext,\n ): Promise<FabricActionDescriptor | undefined>;\n prepareArguments?(\n actionName: string,\n args: Record<string, unknown>,\n context: FabricInvocationContext,\n ): Record<string, unknown> | Promise<Record<string, unknown>>;\n invoke(\n actionName: string,\n args: Record<string, unknown>,\n context: FabricInvocationContext,\n ): Promise<unknown>;\n acquire?(\n actionName: string,\n args: Record<string, unknown>,\n context: FabricInvocationContext,\n ): Promise<FabricScopedProviderResult>;\n invocationEnded?(parentToolCallId: string): Promise<void>;\n subscribeCatalog?(listener: () => void): () => void;\n close?(): Promise<void>;\n}\n\nexport interface FabricProviderRegistration {\n version: 1;\n provider: FabricProvider;\n overwrite?: boolean;\n}\n\nexport interface FabricProviderDiscovery {\n version: 1;\n register(provider: FabricProvider, options?: { overwrite?: boolean }): void;\n}\n\nexport type {\n ComponentChangeRequest as FabricComponentChangeRequest,\n ComponentChangePlan as FabricComponentChangePlan,\n} from \"./components/control.js\";\n\nexport type {\n FabricCapabilityRequirement,\n FabricComponentChildOptions,\n FabricComponentContext,\n FabricComponentDefinition,\n FabricComponentDiscovery,\n FabricComponentDisposer,\n FabricComponentEffect,\n FabricComponentEffectConflict,\n FabricComponentEffectInfo,\n FabricComponentEffectOptions,\n FabricComponentEffectRegistration,\n FabricComponentEntry,\n FabricComponentGraph,\n FabricComponentGuarantee,\n FabricComponentHandle,\n FabricComponentInfo,\n FabricComponentProviderLease,\n FabricModelGuidance,\n FabricModelGuidanceInfo,\n FabricModelGuidancePlacement,\n FabricModelGuidanceTarget,\n FabricComponentProvision,\n FabricComponentRegistration,\n FabricComponentState,\n FabricComponentStopOptions,\n} from \"./components/types.js\";\n\nexport {\n FABRIC_EXECUTION_GUIDANCE_SLOT,\n MAX_FABRIC_MODEL_GUIDANCE_CONTENT_CHARS,\n MAX_FABRIC_MODEL_GUIDANCE_PER_COMPONENT,\n MAX_FABRIC_MODEL_GUIDANCE_REGISTRATIONS,\n MAX_FABRIC_MODEL_GUIDAN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