pi-fabric 0.92.13 → 0.92.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +2 -0
  2. package/dist/agents/service-provider.d.ts.map +1 -1
  3. package/dist/agents/service-types.d.ts +3 -1
  4. package/dist/agents/service-types.d.ts.map +1 -1
  5. package/dist/agents/service.d.ts +2 -0
  6. package/dist/agents/service.d.ts.map +1 -1
  7. package/dist/agents.js +8 -2
  8. package/dist/agents.js.map +2 -2
  9. package/dist/audit/projection.d.ts.map +1 -1
  10. package/dist/chunks/{chunk-OAXSWVOB.js → chunk-2PZWDVJB.js} +7 -1
  11. package/dist/chunks/chunk-2PZWDVJB.js.map +7 -0
  12. package/dist/chunks/chunk-3MEHEH6B.js +41 -0
  13. package/dist/chunks/chunk-3MEHEH6B.js.map +7 -0
  14. package/dist/chunks/{chunk-BSGA3KSB.js → chunk-3WIGAX56.js} +2 -2
  15. package/dist/chunks/{chunk-FRONVGLX.js → chunk-7A6NVHB5.js} +2 -2
  16. package/dist/chunks/{chunk-T3UYWHLT.js → chunk-D5WKZONW.js} +10 -289
  17. package/dist/chunks/chunk-D5WKZONW.js.map +7 -0
  18. package/dist/chunks/chunk-G4LADAYY.js +287 -0
  19. package/dist/chunks/chunk-G4LADAYY.js.map +7 -0
  20. package/dist/chunks/{chunk-CQLOEDQZ.js → chunk-IWH6PCMK.js} +2 -2
  21. package/dist/chunks/chunk-LUX7VAM2.js +373 -0
  22. package/dist/chunks/chunk-LUX7VAM2.js.map +7 -0
  23. package/dist/chunks/{chunk-KNBPIZF7.js → chunk-MGDLRV2R.js} +2 -2
  24. package/dist/chunks/{chunk-WBDM7CH4.js → chunk-N5GUXC6F.js} +4 -4
  25. package/dist/chunks/{chunk-WBDM7CH4.js.map → chunk-N5GUXC6F.js.map} +2 -2
  26. package/dist/chunks/{chunk-WTGFGQ2K.js → chunk-NIUOPHLB.js} +5 -373
  27. package/dist/chunks/chunk-NIUOPHLB.js.map +7 -0
  28. package/dist/chunks/chunk-OX7BU3RX.js +590 -0
  29. package/dist/chunks/chunk-OX7BU3RX.js.map +7 -0
  30. package/dist/chunks/{chunk-UNN5OJQB.js → chunk-P7UQ5TWL.js} +3 -3
  31. package/dist/chunks/chunk-PSNXUZMY.js +218 -0
  32. package/dist/chunks/chunk-PSNXUZMY.js.map +7 -0
  33. package/dist/chunks/{chunk-RLFQHZ7K.js → chunk-QLJ5P7HV.js} +2 -2
  34. package/dist/chunks/{chunk-6ELA5OWI.js → chunk-RNOPHITP.js} +7 -5
  35. package/dist/chunks/{chunk-6ELA5OWI.js.map → chunk-RNOPHITP.js.map} +1 -1
  36. package/dist/chunks/chunk-T3A5GNCW.js +19 -0
  37. package/dist/chunks/chunk-T3A5GNCW.js.map +7 -0
  38. package/dist/chunks/chunk-TPLMVELH.js +118 -0
  39. package/dist/chunks/chunk-TPLMVELH.js.map +7 -0
  40. package/dist/chunks/{chunk-HUCNOAKK.js → chunk-U4NSXDRO.js} +2 -2
  41. package/dist/chunks/{chunk-EZ7YLET5.js → chunk-UDFDF7IY.js} +10 -4
  42. package/dist/chunks/chunk-UDFDF7IY.js.map +7 -0
  43. package/dist/chunks/{chunk-6GT4YJT2.js → chunk-UQ4LTUH4.js} +4 -4
  44. package/dist/chunks/{chunk-QJUDWDPL.js → chunk-VHEO26TE.js} +24 -204
  45. package/dist/chunks/chunk-VHEO26TE.js.map +7 -0
  46. package/dist/chunks/{chunk-DLYYHK6Z.js → chunk-VQMPHVLC.js} +6 -6
  47. package/dist/chunks/{chunk-R4AZTYXC.js → chunk-WMS5SDKD.js} +3 -3
  48. package/dist/chunks/{chunk-VJJFD42F.js → chunk-XT4346N7.js} +2 -2
  49. package/dist/chunks/{chunk-YVPUATQT.js → chunk-Y7KNRAFL.js} +36 -15
  50. package/dist/chunks/chunk-Y7KNRAFL.js.map +7 -0
  51. package/dist/chunks/{chunk-4VVD63BA.js → chunk-YSXGVO2N.js} +2 -1
  52. package/dist/chunks/{chunk-4VVD63BA.js.map → chunk-YSXGVO2N.js.map} +2 -2
  53. package/dist/chunks/{chunk-X45GMLON.js → chunk-ZDNGXLEC.js} +2 -2
  54. package/dist/chunks/{chunk-FN6Q4R4M.js → chunk-ZG3ELJHX.js} +47 -1
  55. package/dist/chunks/chunk-ZG3ELJHX.js.map +7 -0
  56. package/dist/compaction/hook.js +5 -4
  57. package/dist/components/provider-component.d.ts +1 -1
  58. package/dist/components/provider-component.d.ts.map +1 -1
  59. package/dist/config.d.ts +3 -1
  60. package/dist/config.d.ts.map +1 -1
  61. package/dist/core/action-registry.js +4 -2
  62. package/dist/entropy/index.js +7 -6
  63. package/dist/fabric-runtime-state.d.ts.map +1 -1
  64. package/dist/fabric-runtime-state.js +96 -43
  65. package/dist/fabric-runtime-state.js.map +2 -2
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +47 -36
  68. package/dist/index.js.map +2 -2
  69. package/dist/jev/auth.d.ts +5 -0
  70. package/dist/jev/auth.d.ts.map +1 -0
  71. package/dist/jev/browser.d.ts +37 -0
  72. package/dist/jev/browser.d.ts.map +1 -0
  73. package/dist/jev/browser.js +13 -0
  74. package/dist/jev/browser.js.map +7 -0
  75. package/dist/jev/client.d.ts +29 -0
  76. package/dist/jev/client.d.ts.map +1 -0
  77. package/dist/jev/config.d.ts +17 -0
  78. package/dist/jev/config.d.ts.map +1 -0
  79. package/dist/jev/guest-types.d.ts +2 -0
  80. package/dist/jev/guest-types.d.ts.map +1 -0
  81. package/dist/jev/manager.d.ts +32 -0
  82. package/dist/jev/manager.d.ts.map +1 -0
  83. package/dist/jev/types.d.ts +95 -0
  84. package/dist/jev/types.d.ts.map +1 -0
  85. package/dist/jev/validation.d.ts +8 -0
  86. package/dist/jev/validation.d.ts.map +1 -0
  87. package/dist/jev.d.ts +8 -0
  88. package/dist/jev.d.ts.map +1 -0
  89. package/dist/jev.js +39 -0
  90. package/dist/jev.js.map +7 -0
  91. package/dist/memory/discovery.js +5 -4
  92. package/dist/memory/normalize.js +4 -3
  93. package/dist/memory/search.js +5 -4
  94. package/dist/memory.js +7 -6
  95. package/dist/memory.js.map +1 -1
  96. package/dist/providers/agents-actions.d.ts.map +1 -1
  97. package/dist/providers/agents-provider.d.ts.map +1 -1
  98. package/dist/providers/jev-provider.d.ts +55 -0
  99. package/dist/providers/jev-provider.d.ts.map +1 -0
  100. package/dist/providers/jev-provider.js +21 -0
  101. package/dist/providers/jev-provider.js.map +7 -0
  102. package/dist/providers/memory-provider.js +7 -6
  103. package/dist/residency/host.js +10 -8
  104. package/dist/residency/pi-entry.js +10 -8
  105. package/dist/residency/pi-entry.js.map +1 -1
  106. package/dist/runtime/core-override-guest-types.js +2 -2
  107. package/dist/runtime/guest-types.d.ts +1 -1
  108. package/dist/runtime/guest-types.d.ts.map +1 -1
  109. package/dist/runtime/guest-types.js +1 -1
  110. package/dist/runtime/kernel.d.ts +3 -0
  111. package/dist/runtime/kernel.d.ts.map +1 -1
  112. package/dist/runtime/monty-runtime.js +3 -2
  113. package/dist/runtime/monty-runtime.js.map +1 -1
  114. package/dist/runtime/node-process-runtime.js +3 -3
  115. package/dist/runtime/orchestration.d.ts.map +1 -1
  116. package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
  117. package/dist/runtime/quickjs-runtime.js +2 -2
  118. package/dist/runtime/type-checker.d.ts +1 -1
  119. package/dist/runtime/type-checker.d.ts.map +1 -1
  120. package/dist/runtime/type-checker.js +1 -1
  121. package/dist/runtime/typescript-kernel.d.ts +1 -1
  122. package/dist/runtime/typescript-kernel.d.ts.map +1 -1
  123. package/dist/runtime/typescript-kernel.js +10 -10
  124. package/dist/runtime/typescript-kernel.js.map +2 -2
  125. package/dist/runtime-state-builtins.d.ts.map +1 -1
  126. package/dist/ui/dashboard.js +1 -1
  127. package/dist/ui/fabric-render.d.ts.map +1 -1
  128. package/dist/ui/settings.js +3 -2
  129. package/dist/ui/settings.js.map +1 -1
  130. package/docs/agents.md +2 -0
  131. package/docs/components.md +1 -0
  132. package/docs/configuration.md +6 -0
  133. package/docs/jev.md +212 -0
  134. package/docs/skills.md +3 -2
  135. package/package.json +8 -2
  136. package/skillsets/python/fabric-exec/SKILL.md +10 -0
  137. package/skillsets/python/fabric-exec/references/agents.md +2 -0
  138. package/skillsets/python/fabric-guide/SKILL.md +3 -2
  139. package/skillsets/python/fabric-jev/SKILL.md +107 -0
  140. package/skillsets/typescript/fabric-exec/SKILL.md +15 -0
  141. package/skillsets/typescript/fabric-exec/references/agents.md +2 -0
  142. package/skillsets/typescript/fabric-guide/SKILL.md +3 -2
  143. package/skillsets/typescript/fabric-jev/SKILL.md +107 -0
  144. package/dist/chunks/chunk-EZ7YLET5.js.map +0 -7
  145. package/dist/chunks/chunk-FN6Q4R4M.js.map +0 -7
  146. package/dist/chunks/chunk-OAXSWVOB.js.map +0 -7
  147. package/dist/chunks/chunk-QJUDWDPL.js.map +0 -7
  148. package/dist/chunks/chunk-T3UYWHLT.js.map +0 -7
  149. package/dist/chunks/chunk-WTGFGQ2K.js.map +0 -7
  150. package/dist/chunks/chunk-YVPUATQT.js.map +0 -7
  151. /package/dist/chunks/{chunk-BSGA3KSB.js.map → chunk-3WIGAX56.js.map} +0 -0
  152. /package/dist/chunks/{chunk-FRONVGLX.js.map → chunk-7A6NVHB5.js.map} +0 -0
  153. /package/dist/chunks/{chunk-CQLOEDQZ.js.map → chunk-IWH6PCMK.js.map} +0 -0
  154. /package/dist/chunks/{chunk-KNBPIZF7.js.map → chunk-MGDLRV2R.js.map} +0 -0
  155. /package/dist/chunks/{chunk-UNN5OJQB.js.map → chunk-P7UQ5TWL.js.map} +0 -0
  156. /package/dist/chunks/{chunk-RLFQHZ7K.js.map → chunk-QLJ5P7HV.js.map} +0 -0
  157. /package/dist/chunks/{chunk-HUCNOAKK.js.map → chunk-U4NSXDRO.js.map} +0 -0
  158. /package/dist/chunks/{chunk-6GT4YJT2.js.map → chunk-UQ4LTUH4.js.map} +0 -0
  159. /package/dist/chunks/{chunk-DLYYHK6Z.js.map → chunk-VQMPHVLC.js.map} +0 -0
  160. /package/dist/chunks/{chunk-R4AZTYXC.js.map → chunk-WMS5SDKD.js.map} +0 -0
  161. /package/dist/chunks/{chunk-VJJFD42F.js.map → chunk-XT4346N7.js.map} +0 -0
  162. /package/dist/chunks/{chunk-X45GMLON.js.map → chunk-ZDNGXLEC.js.map} +0 -0
@@ -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};\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\";\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}},\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 const thinking = isFabricThinking(args.thinking) ? args.thinking : undefined;\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.sch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AAK,cAAc,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;AAAA,IACtD,GAAI,OAAO,KAAK,cAAc,YAAY,EAAE,WAAW,KAAK,UAAU,IAAI,CAAC;AAAA,IAC3E,GAAI,QAAQ,aAAa,SAAS,OAAO,KAAK,QAAQ,WAAW,EAAE,KAAK,KAAK,IAAI,IAAI,CAAC;AAAA,IACtF,GAAI,OAAO,KAAK,aAAa,YAAY,EAAE,UAAU,KAAK,SAAS,IAAI,CAAC;AAAA,IACxE,GAAI,KAAK,cAAc,aAAa,KAAK,cAAc,YACnD,EAAE,WAAW,KAAK,UAAU,IAC5B,CAAC;AAAA,IACL,GAAI,OAAO,KAAK,WAAW,YAAY,KAAK,WAAW,QAAQ,CAAC,MAAM,QAAQ,KAAK,MAAM,IACrF,EAAE,QAAQ,KAAK,OAAkC,IACjD,CAAC;AAAA,EACP;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,41 @@
1
+ // src/jev/config.ts
2
+ var DEFAULT_JEV_CONFIG = {
3
+ enabled: true,
4
+ model: "jev-latest",
5
+ credentialCommand: [],
6
+ requestTimeoutMs: 15e3,
7
+ maxRequestBytes: 131072,
8
+ maxConcurrentRuns: 4,
9
+ maxRetainedRuns: 64,
10
+ maxDurationMs: 9e5,
11
+ maxEvaluations: 1e3,
12
+ maxToolCalls: 1e4,
13
+ maxTokens: 1e6
14
+ };
15
+ function normalizeJevConfig(value) {
16
+ const input = value && typeof value === "object" && !Array.isArray(value) ? value : {};
17
+ const integer = (key, max, min = 1) => {
18
+ const v = input[key];
19
+ return typeof v === "number" && Number.isFinite(v) ? Math.max(min, Math.min(max, Math.floor(v))) : DEFAULT_JEV_CONFIG[key];
20
+ };
21
+ const command = input.credentialCommand;
22
+ return {
23
+ enabled: typeof input.enabled === "boolean" ? input.enabled : true,
24
+ model: typeof input.model === "string" && /^[a-zA-Z0-9._-]{1,128}$/.test(input.model) ? input.model : DEFAULT_JEV_CONFIG.model,
25
+ credentialCommand: Array.isArray(command) && command.length <= 16 && command.every((v) => typeof v === "string" && v.length > 0 && v.length <= 4096 && !v.includes("\0")) ? [...command] : [],
26
+ requestTimeoutMs: integer("requestTimeoutMs", 12e4, 100),
27
+ maxRequestBytes: integer("maxRequestBytes", 1048576, 1024),
28
+ maxConcurrentRuns: integer("maxConcurrentRuns", 16),
29
+ maxRetainedRuns: integer("maxRetainedRuns", 256),
30
+ maxDurationMs: integer("maxDurationMs", 864e5, 100),
31
+ maxEvaluations: integer("maxEvaluations", 1e5),
32
+ maxToolCalls: integer("maxToolCalls", 1e6),
33
+ maxTokens: integer("maxTokens", 1e8)
34
+ };
35
+ }
36
+
37
+ export {
38
+ DEFAULT_JEV_CONFIG,
39
+ normalizeJevConfig
40
+ };
41
+ //# sourceMappingURL=chunk-3MEHEH6B.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/jev/config.ts"],
4
+ "sourcesContent": ["export interface FabricJevConfig {\n enabled: boolean;\n model: string;\n /** Trusted host configuration only; argv, never a shell expression. */\n credentialCommand: string[];\n requestTimeoutMs: number;\n maxRequestBytes: number;\n maxConcurrentRuns: number;\n maxRetainedRuns: number;\n maxDurationMs: number;\n maxEvaluations: number;\n maxToolCalls: number;\n maxTokens: number;\n}\nexport const DEFAULT_JEV_CONFIG: FabricJevConfig = {\n enabled: true,\n model: \"jev-latest\",\n credentialCommand: [],\n requestTimeoutMs: 15_000,\n maxRequestBytes: 131_072,\n maxConcurrentRuns: 4,\n maxRetainedRuns: 64,\n maxDurationMs: 900_000,\n maxEvaluations: 1_000,\n maxToolCalls: 10_000,\n maxTokens: 1_000_000,\n};\nexport function normalizeJevConfig(value: unknown): FabricJevConfig {\n const input = value && typeof value === \"object\" && !Array.isArray(value)\n ? value as Record<string, unknown> : {};\n const integer = (key: keyof FabricJevConfig, max: number, min = 1): number => {\n const v = input[key];\n return typeof v === \"number\" && Number.isFinite(v)\n ? Math.max(min, Math.min(max, Math.floor(v))) : DEFAULT_JEV_CONFIG[key] as number;\n };\n const command = input.credentialCommand;\n return {\n enabled: typeof input.enabled === \"boolean\" ? input.enabled : true,\n model: typeof input.model === \"string\" && /^[a-zA-Z0-9._-]{1,128}$/.test(input.model)\n ? input.model : DEFAULT_JEV_CONFIG.model,\n credentialCommand: Array.isArray(command) && command.length <= 16 &&\n command.every(v => typeof v === \"string\" && v.length > 0 && v.length <= 4096 && !v.includes(\"\\0\"))\n ? [...command] as string[] : [],\n requestTimeoutMs: integer(\"requestTimeoutMs\", 120_000, 100),\n maxRequestBytes: integer(\"maxRequestBytes\", 1_048_576, 1024),\n maxConcurrentRuns: integer(\"maxConcurrentRuns\", 16),\n maxRetainedRuns: integer(\"maxRetainedRuns\", 256),\n maxDurationMs: integer(\"maxDurationMs\", 86_400_000, 100),\n maxEvaluations: integer(\"maxEvaluations\", 100_000),\n maxToolCalls: integer(\"maxToolCalls\", 1_000_000),\n maxTokens: integer(\"maxTokens\", 100_000_000),\n };\n}\n"],
5
+ "mappings": ";AAcO,IAAM,qBAAsC;AAAA,EACjD,SAAS;AAAA,EACT,OAAO;AAAA,EACP,mBAAmB,CAAC;AAAA,EACpB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,WAAW;AACb;AACO,SAAS,mBAAmB,OAAiC;AAClE,QAAM,QAAQ,SAAS,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IACpE,QAAmC,CAAC;AACxC,QAAM,UAAU,CAAC,KAA4B,KAAa,MAAM,MAAc;AAC5E,UAAM,IAAI,MAAM,GAAG;AACnB,WAAO,OAAO,MAAM,YAAY,OAAO,SAAS,CAAC,IAC7C,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,mBAAmB,GAAG;AAAA,EAC1E;AACA,QAAM,UAAU,MAAM;AACtB,SAAO;AAAA,IACL,SAAS,OAAO,MAAM,YAAY,YAAY,MAAM,UAAU;AAAA,IAC9D,OAAO,OAAO,MAAM,UAAU,YAAY,0BAA0B,KAAK,MAAM,KAAK,IAChF,MAAM,QAAQ,mBAAmB;AAAA,IACrC,mBAAmB,MAAM,QAAQ,OAAO,KAAK,QAAQ,UAAU,MAC7D,QAAQ,MAAM,OAAK,OAAO,MAAM,YAAY,EAAE,SAAS,KAAK,EAAE,UAAU,QAAQ,CAAC,EAAE,SAAS,IAAI,CAAC,IAC/F,CAAC,GAAG,OAAO,IAAgB,CAAC;AAAA,IAChC,kBAAkB,QAAQ,oBAAoB,MAAS,GAAG;AAAA,IAC1D,iBAAiB,QAAQ,mBAAmB,SAAW,IAAI;AAAA,IAC3D,mBAAmB,QAAQ,qBAAqB,EAAE;AAAA,IAClD,iBAAiB,QAAQ,mBAAmB,GAAG;AAAA,IAC/C,eAAe,QAAQ,iBAAiB,OAAY,GAAG;AAAA,IACvD,gBAAgB,QAAQ,kBAAkB,GAAO;AAAA,IACjD,cAAc,QAAQ,gBAAgB,GAAS;AAAA,IAC/C,WAAW,QAAQ,aAAa,GAAW;AAAA,EAC7C;AACF;",
6
+ "names": []
7
+ }
@@ -6,7 +6,7 @@ import {
6
6
  MAX_NORMAL_FORM_PLANS,
7
7
  isNormalFormPlan,
8
8
  provesNormalFormPlan
9
- } from "./chunk-T3UYWHLT.js";
9
+ } from "./chunk-G4LADAYY.js";
10
10
  import {
11
11
  stableJsonHash
12
12
  } from "./chunk-3YZUQESG.js";
@@ -641,4 +641,4 @@ export {
641
641
  saveCompiledSurface,
642
642
  saveCompiledSurfaceAsync
643
643
  };
644
- //# sourceMappingURL=chunk-BSGA3KSB.js.map
644
+ //# sourceMappingURL=chunk-3WIGAX56.js.map
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  DEFAULT_MEMORY_INDEX_PRIVACY,
11
11
  normalizeSession
12
- } from "./chunk-VJJFD42F.js";
12
+ } from "./chunk-XT4346N7.js";
13
13
 
14
14
  // src/memory/index.ts
15
15
  import crypto2 from "node:crypto";
@@ -1239,4 +1239,4 @@ export {
1239
1239
  searchMemoryIndex,
1240
1240
  searchShards
1241
1241
  };
1242
- //# sourceMappingURL=chunk-FRONVGLX.js.map
1242
+ //# sourceMappingURL=chunk-7A6NVHB5.js.map
@@ -1,273 +1,9 @@
1
+ import {
2
+ isNormalFormWitness
3
+ } from "./chunk-G4LADAYY.js";
1
4
  import {
2
5
  isPiShellRef
3
6
  } from "./chunk-YU62DDKK.js";
4
- import {
5
- stableJsonHash
6
- } from "./chunk-3YZUQESG.js";
7
-
8
- // src/entropy/fingerprint.ts
9
- var SIGNATURE_MAX_KEYS = 32;
10
- var SIGNATURE_MAX_DEPTH = 3;
11
- var ENUM_SATURATION_BITS = 6;
12
- var isPlainRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
13
- var roundMetric = (value) => {
14
- const rounded = Math.round(value * 1e6) / 1e6;
15
- return rounded === 0 ? 0 : rounded;
16
- };
17
- var compareCodeUnits = (left, right) => left < right ? -1 : left > right ? 1 : 0;
18
- var typeTag = (value, depth) => {
19
- if (value === null) return "null";
20
- if (Array.isArray(value)) return "arr";
21
- switch (typeof value) {
22
- case "string":
23
- return "str";
24
- case "number":
25
- return "num";
26
- case "boolean":
27
- return "bool";
28
- case "object": {
29
- if (depth >= SIGNATURE_MAX_DEPTH) return "obj";
30
- try {
31
- const record = value;
32
- const keys = Object.keys(record).sort();
33
- const head = keys.slice(0, SIGNATURE_MAX_KEYS).map((key) => `${key}:${typeTag(record[key], depth + 1)}`);
34
- if (keys.length > SIGNATURE_MAX_KEYS) {
35
- head.push(`\u2026+${keys.length - SIGNATURE_MAX_KEYS}`);
36
- }
37
- return `{${head.join(",")}}`;
38
- } catch {
39
- return "obj";
40
- }
41
- }
42
- default:
43
- return "other";
44
- }
45
- };
46
- var shapeSignature = (args) => {
47
- const keys = Object.keys(args).sort();
48
- const head = keys.slice(0, SIGNATURE_MAX_KEYS).map((key) => `${key}:${typeTag(args[key], 1)}`);
49
- if (keys.length > SIGNATURE_MAX_KEYS) {
50
- head.push(`\u2026+${keys.length - SIGNATURE_MAX_KEYS}`);
51
- }
52
- return `(${head.join(",")})`;
53
- };
54
- var signatureDistance = (left, right) => {
55
- if (left === right) return 0;
56
- const bound = Math.max(left.length, right.length);
57
- if (bound === 0) return 0;
58
- let previous = [];
59
- for (let index = 0; index <= right.length; index++) {
60
- previous.push(index);
61
- }
62
- for (let index = 1; index <= left.length; index++) {
63
- const current = [index];
64
- for (let inner = 1; inner <= right.length; inner++) {
65
- const substitution = previous[inner - 1] + (left[index - 1] === right[inner - 1] ? 0 : 1);
66
- const insertion = current[inner - 1] + 1;
67
- const deletion = previous[inner] + 1;
68
- current.push(Math.min(substitution, insertion, deletion));
69
- }
70
- previous = current;
71
- }
72
- return roundMetric(previous[right.length] / bound);
73
- };
74
- var shannonEntropyBits = (counts) => {
75
- const total = counts.reduce((sum, value) => sum + value, 0);
76
- if (total <= 0) return 0;
77
- let bits = 0;
78
- for (const count of counts) {
79
- if (count <= 0) continue;
80
- const probability = count / total;
81
- bits += probability * Math.log2(probability);
82
- }
83
- return roundMetric(-bits);
84
- };
85
- var schemaFreedom = (schema, depth) => {
86
- if (depth > SIGNATURE_MAX_DEPTH) return 0.5;
87
- if (!isPlainRecord(schema)) return 0.5;
88
- const union = Array.isArray(schema.anyOf) ? schema.anyOf : Array.isArray(schema.oneOf) ? schema.oneOf : void 0;
89
- if (union) {
90
- const scores = union.map((branch) => schemaFreedom(branch, depth + 1));
91
- const widest = scores.length > 0 ? Math.max(...scores) : 0;
92
- return roundMetric(widest + 0.1 * Math.max(0, union.length - 1));
93
- }
94
- if (Array.isArray(schema.enum)) {
95
- return roundMetric(
96
- Math.min(1, Math.log2(Math.max(1, schema.enum.length)) / ENUM_SATURATION_BITS)
97
- );
98
- }
99
- if ("const" in schema) return 0;
100
- const type = schema.type;
101
- if (typeof type !== "string") return 0.75;
102
- if (type === "boolean") return 0.1;
103
- if (type === "number" || type === "integer") return 0.5;
104
- if (type === "string") return 1;
105
- if (type === "array") return roundMetric(0.5 + 0.5 * schemaFreedom(schema.items, depth + 1));
106
- if (type === "object") {
107
- const properties = schema.properties;
108
- if (!isPlainRecord(properties)) return 1;
109
- const keys = Object.keys(properties).sort();
110
- if (keys.length === 0) return 1;
111
- const required = Array.isArray(schema.required) ? schema.required.filter((entry) => typeof entry === "string") : [];
112
- let score = 0;
113
- for (const key of keys) {
114
- score += schemaFreedom(properties[key], depth + 1);
115
- if (!required.includes(key)) score += 0.25;
116
- }
117
- if (schema.additionalProperties !== false) score += 0.5;
118
- return roundMetric(score);
119
- }
120
- return 0.75;
121
- };
122
- var staticFreedomFromSchema = (schema) => schemaFreedom(schema, 0);
123
- var trendFromScores = (scores) => {
124
- const count = scores.length;
125
- const first = count > 0 ? scores[0] : void 0;
126
- const last = count > 0 ? scores[count - 1] : void 0;
127
- let slope = 0;
128
- if (count >= 2) {
129
- const meanX = (count - 1) / 2;
130
- const meanY = scores.reduce((sum, value) => sum + value, 0) / count;
131
- let numerator = 0;
132
- let denominator = 0;
133
- for (let index = 0; index < count; index++) {
134
- numerator += (index - meanX) * (scores[index] - meanY);
135
- denominator += (index - meanX) ** 2;
136
- }
137
- slope = denominator > 0 ? numerator / denominator : 0;
138
- }
139
- return {
140
- count,
141
- ...first !== void 0 ? { first: roundMetric(first) } : {},
142
- ...last !== void 0 ? { last: roundMetric(last) } : {},
143
- slopePerStep: roundMetric(slope)
144
- };
145
- };
146
-
147
- // src/entropy/normal-form.ts
148
- import { Value } from "typebox/value";
149
- var normalFormEvidenceSummary = (traces) => {
150
- const summary = { normalizedCalls: 0, rulesApplied: 0, succeeded: 0, subsequentFailures: 0 };
151
- for (const trace of traces) for (const operation of trace.operations) {
152
- if (!operation.normalization || !isNormalFormWitness(operation.normalization)) continue;
153
- summary.normalizedCalls++;
154
- summary.rulesApplied += operation.normalization.rules.length;
155
- if (operation.outcome === "succeeded") summary.succeeded++;
156
- else summary.subsequentFailures++;
157
- }
158
- return summary;
159
- };
160
- var NORMAL_FORM_VERSION = 1;
161
- var MAX_NORMAL_FORM_RULES = 128;
162
- var MAX_NORMAL_FORM_PLANS = 1e3;
163
- var RULE_KINDS = ["key-form", "enum-form", "numeric-string", "optional-null"];
164
- var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
165
- var safeKey = (key) => key.length <= 128 && !["__proto__", "prototype", "constructor"].includes(key);
166
- var form = (value) => /^[a-zA-Z][a-zA-Z0-9 _-]*$/.test(value) ? value.toLowerCase().replace(/[ _-]/g, "") : void 0;
167
- var accepts = (schema, args) => {
168
- try {
169
- return isRecord(schema) && Value.Check(schema, args);
170
- } catch {
171
- return false;
172
- }
173
- };
174
- var uniqueForms = (values) => {
175
- const groups = /* @__PURE__ */ new Map();
176
- for (const value of values) {
177
- const key = form(value);
178
- if (!key) continue;
179
- const group = groups.get(key) ?? [];
180
- group.push(value);
181
- groups.set(key, group);
182
- }
183
- return new Map([...groups].filter(([, group]) => group.length === 1).map(([key, group]) => [key, group[0]]));
184
- };
185
- var deriveNormalFormPlan = (ref, schema) => {
186
- if (!ref || ref.length > 1024 || !isRecord(schema) || schema.type !== "object" || schema.additionalProperties !== false || !isRecord(schema.properties) || ["patternProperties", "oneOf", "anyOf", "allOf", "$ref", "if", "not"].some((key) => Object.hasOwn(schema, key))) return void 0;
187
- const keys = Object.keys(schema.properties).sort();
188
- if (keys.length > MAX_NORMAL_FORM_RULES || !keys.every(safeKey)) return void 0;
189
- const required = new Set(Array.isArray(schema.required) ? schema.required : []);
190
- const forms = new Set(uniqueForms(keys).values());
191
- const rules = [];
192
- for (const key of keys) {
193
- const property = schema.properties[key];
194
- if (!isRecord(property)) continue;
195
- if (forms.has(key)) rules.push({ kind: "key-form", key });
196
- if (!required.has(key) && !accepts(property, null)) rules.push({ kind: "optional-null", key });
197
- if (property.type === "number" || property.type === "integer") rules.push({ kind: "numeric-string", key });
198
- if (property.type === "string" && Array.isArray(property.enum) && property.enum.every((value) => typeof value === "string") && uniqueForms(property.enum).size > 0) rules.push({ kind: "enum-form", key });
199
- }
200
- if (rules.length === 0) return void 0;
201
- return { version: NORMAL_FORM_VERSION, ref, baseSchemaDigest: stableJsonHash(schema), rules: rules.slice(0, MAX_NORMAL_FORM_RULES) };
202
- };
203
- var isRule = (value) => isRecord(value) && Object.keys(value).length === 2 && typeof value.key === "string" && safeKey(value.key) && RULE_KINDS.includes(value.kind);
204
- var isDigest = (value) => typeof value === "string" && /^[a-f0-9]{64}$/.test(value);
205
- var isNormalFormPlan = (value) => isRecord(value) && Object.keys(value).length === 4 && value.version === NORMAL_FORM_VERSION && typeof value.ref === "string" && value.ref.length > 0 && value.ref.length <= 1024 && isDigest(value.baseSchemaDigest) && Array.isArray(value.rules) && value.rules.length > 0 && value.rules.length <= MAX_NORMAL_FORM_RULES && value.rules.every(isRule);
206
- var isNormalFormWitness = (value) => isRecord(value) && Object.keys(value).length === 5 && value.version === NORMAL_FORM_VERSION && isDigest(value.baseSchemaDigest) && isDigest(value.beforeShape) && isDigest(value.afterShape) && Array.isArray(value.rules) && value.rules.length > 0 && value.rules.length <= MAX_NORMAL_FORM_RULES && value.rules.every(isRule);
207
- var provesNormalFormPlan = (plan, schema) => {
208
- if (!isNormalFormPlan(plan)) return false;
209
- try {
210
- const derived = deriveNormalFormPlan(plan.ref, schema);
211
- return derived !== void 0 && stableJsonHash(derived) === stableJsonHash(plan);
212
- } catch {
213
- return false;
214
- }
215
- };
216
- var applyNormalFormPlan = (ref, schema, args, plan) => {
217
- const unchanged = { args };
218
- if (!plan || plan.ref !== ref || accepts(schema, args) || !provesNormalFormPlan(plan, schema)) return unchanged;
219
- const properties = schema.properties;
220
- const candidate = { ...args };
221
- const applied = [];
222
- const keyRules = plan.rules.filter((rule) => rule.kind === "key-form");
223
- const forms = uniqueForms(keyRules.map((rule) => rule.key));
224
- const targets = /* @__PURE__ */ new Set();
225
- for (const key of Object.keys(args).sort()) {
226
- if (Object.hasOwn(properties, key)) continue;
227
- const normalized = form(key);
228
- const target = normalized ? forms.get(normalized) : void 0;
229
- if (!target) continue;
230
- if (Object.hasOwn(args, target) || targets.has(target)) return unchanged;
231
- targets.add(target);
232
- Object.defineProperty(candidate, target, { value: args[key], enumerable: true, configurable: true, writable: true });
233
- delete candidate[key];
234
- applied.push({ kind: "key-form", key: target });
235
- }
236
- for (const rule of plan.rules) {
237
- if (rule.kind === "key-form" || !Object.hasOwn(candidate, rule.key)) continue;
238
- const value = candidate[rule.key];
239
- const property = properties[rule.key];
240
- if (accepts(property, value)) continue;
241
- if (rule.kind === "optional-null" && (value === null || value === void 0)) {
242
- delete candidate[rule.key];
243
- applied.push(rule);
244
- } else if (rule.kind === "numeric-string" && typeof value === "string") {
245
- const number = Number(value);
246
- if (Number.isFinite(number) && String(number) === value && accepts(property, number)) {
247
- candidate[rule.key] = number;
248
- applied.push(rule);
249
- }
250
- } else if (rule.kind === "enum-form" && typeof value === "string") {
251
- const normalized = form(value);
252
- const target = normalized ? uniqueForms(property.enum).get(normalized) : void 0;
253
- if (target !== void 0 && accepts(property, target)) {
254
- candidate[rule.key] = target;
255
- applied.push(rule);
256
- }
257
- }
258
- }
259
- if (applied.length === 0 || !accepts(schema, candidate)) return unchanged;
260
- return {
261
- args: candidate,
262
- witness: {
263
- version: NORMAL_FORM_VERSION,
264
- baseSchemaDigest: plan.baseSchemaDigest,
265
- beforeShape: stableJsonHash(shapeSignature(args)),
266
- afterShape: stableJsonHash(shapeSignature(candidate)),
267
- rules: applied
268
- }
269
- };
270
- };
271
7
 
272
8
  // src/audit/projection.ts
273
9
  var emptyProjection = (args) => ({
@@ -356,6 +92,7 @@ var projected = (args, build) => {
356
92
  };
357
93
  var idOnlyAgentActions = /* @__PURE__ */ new Set([
358
94
  "agents.wait",
95
+ "agents.join",
359
96
  "agents.status",
360
97
  "agents.stop",
361
98
  "agents.cleanup",
@@ -983,7 +720,7 @@ var executionOutcomeFromError = (error, signal) => {
983
720
  if (signal?.aborted) return "aborted";
984
721
  return error === void 0 ? "succeeded" : "failed";
985
722
  };
986
- var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
723
+ var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
987
724
  var hasOnlyKeys = (value, keys) => Object.keys(value).every((key) => keys.includes(key));
988
725
  var outcomes = /* @__PURE__ */ new Set(["succeeded", "failed", "aborted", "timed_out"]);
989
726
  var stages = /* @__PURE__ */ new Set(["resolve", "prepare", "validate", "approve", "invoke", "guard"]);
@@ -997,10 +734,10 @@ var isJsonValue = (value, ancestors = /* @__PURE__ */ new Set(), depth = 0) => {
997
734
  return valid;
998
735
  };
999
736
  var isFabricExecutionTraceOperationV1Unchecked = (value) => {
1000
- if (!isRecord2(value)) return false;
737
+ if (!isRecord(value)) return false;
1001
738
  if (!hasOnlyKeys(value, ["type", "sequence", "ref", "provider", "action", "args", "outcome", "normalization", "failureStage", "error", "result", "resultTruncated"])) return false;
1002
739
  if (value.type !== "call" || !Number.isSafeInteger(value.sequence) || value.sequence < 0) return false;
1003
- if (typeof value.ref !== "string" || !isRecord2(value.args) || !isJsonValue(value.args)) return false;
740
+ if (typeof value.ref !== "string" || !isRecord(value.args) || !isJsonValue(value.args)) return false;
1004
741
  if (!outcomes.has(value.outcome)) return false;
1005
742
  if (value.provider !== void 0 && typeof value.provider !== "string") return false;
1006
743
  if (value.action !== void 0 && typeof value.action !== "string") return false;
@@ -1018,13 +755,13 @@ var isFabricExecutionTraceOperationV1 = (value) => {
1018
755
  }
1019
756
  };
1020
757
  var isFabricExecutionTraceV1Unchecked = (value) => {
1021
- if (!isRecord2(value)) return false;
758
+ if (!isRecord(value)) return false;
1022
759
  if (!hasOnlyKeys(value, ["kind", "version", "outcome", "phases", "operations", "counts", "error"])) return false;
1023
760
  if (value.kind !== FABRIC_EXECUTION_TRACE_KIND || value.version !== FABRIC_EXECUTION_TRACE_VERSION) return false;
1024
761
  if (!outcomes.has(value.outcome)) return false;
1025
762
  if (!Array.isArray(value.phases) || !value.phases.every((phase) => typeof phase === "string")) return false;
1026
763
  if (!Array.isArray(value.operations) || !value.operations.every(isFabricExecutionTraceOperationV1)) return false;
1027
- if (!isRecord2(value.counts) || !hasOnlyKeys(value.counts, ["droppedValues", "truncatedValues", "redactedValues", "droppedOperations"])) return false;
764
+ if (!isRecord(value.counts) || !hasOnlyKeys(value.counts, ["droppedValues", "truncatedValues", "redactedValues", "droppedOperations"])) return false;
1028
765
  const counts = value.counts;
1029
766
  if (!["droppedValues", "truncatedValues", "redactedValues", "droppedOperations"].every((key) => Number.isSafeInteger(counts[key]) && counts[key] >= 0)) return false;
1030
767
  if (value.error !== void 0 && typeof value.error !== "string") return false;
@@ -1043,22 +780,6 @@ var isFabricExecutionTraceV1 = (value) => {
1043
780
  var readFabricExecutionTraceV1 = (value) => isFabricExecutionTraceV1(value) ? value : void 0;
1044
781
 
1045
782
  export {
1046
- roundMetric,
1047
- compareCodeUnits,
1048
- shapeSignature,
1049
- signatureDistance,
1050
- shannonEntropyBits,
1051
- staticFreedomFromSchema,
1052
- trendFromScores,
1053
- normalFormEvidenceSummary,
1054
- NORMAL_FORM_VERSION,
1055
- MAX_NORMAL_FORM_RULES,
1056
- MAX_NORMAL_FORM_PLANS,
1057
- deriveNormalFormPlan,
1058
- isNormalFormPlan,
1059
- isNormalFormWitness,
1060
- provesNormalFormPlan,
1061
- applyNormalFormPlan,
1062
783
  projectFabricAuditArgs,
1063
784
  projectFabricAuditResult,
1064
785
  FABRIC_EXECUTION_TRACE_KIND,
@@ -1073,4 +794,4 @@ export {
1073
794
  isFabricExecutionTraceV1,
1074
795
  readFabricExecutionTraceV1
1075
796
  };
1076
- //# sourceMappingURL=chunk-T3UYWHLT.js.map
797
+ //# sourceMappingURL=chunk-D5WKZONW.js.map