@e4779/pi-fabric 0.92.24-fork.4 → 0.92.41-fork.6
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/README.md +2 -1
- package/dist/actors/host-event-payload.d.ts.map +1 -1
- package/dist/actors/types.d.ts +1 -1
- package/dist/actors/types.d.ts.map +1 -1
- package/dist/agents/completion-inbox.d.ts +15 -0
- package/dist/agents/completion-inbox.d.ts.map +1 -0
- package/dist/agents/handoff.d.ts.map +1 -1
- package/dist/agents/manager.d.ts +1 -0
- package/dist/agents/manager.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/thinking-transfer.d.ts.map +1 -1
- package/dist/agents/transports/process-utils.d.ts.map +1 -1
- package/dist/agents.js +3 -2
- package/dist/agents.js.map +1 -1
- package/dist/build-identity.d.ts +21 -0
- package/dist/build-identity.d.ts.map +1 -0
- package/dist/chunks/{chunk-RERA6YWA.js → chunk-2A2NWQ36.js} +13 -5
- package/dist/chunks/chunk-2A2NWQ36.js.map +7 -0
- package/dist/chunks/{chunk-OTCASLY2.js → chunk-2QAOC3BO.js} +1 -1
- package/dist/chunks/chunk-2QAOC3BO.js.map +7 -0
- package/dist/chunks/{chunk-2PZWDVJB.js → chunk-2SWRVIYJ.js} +21 -9
- package/dist/chunks/chunk-2SWRVIYJ.js.map +7 -0
- package/dist/chunks/{chunk-4JETKRFE.js → chunk-36B4AIRT.js} +2 -2
- package/dist/chunks/{chunk-KFZYTGF5.js → chunk-3TXOQ5MG.js} +60 -46
- package/dist/chunks/chunk-3TXOQ5MG.js.map +7 -0
- package/dist/chunks/{chunk-VWSXAEX6.js → chunk-4NUTVNS2.js} +44 -202
- package/dist/chunks/chunk-4NUTVNS2.js.map +7 -0
- 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-X7G62ZGH.js → chunk-7BG5COXB.js} +8 -3
- package/dist/chunks/{chunk-X7G62ZGH.js.map → chunk-7BG5COXB.js.map} +2 -2
- package/dist/chunks/{chunk-IYQ5MNCW.js → chunk-7VAZ4N43.js} +42 -24
- package/dist/chunks/chunk-7VAZ4N43.js.map +7 -0
- package/dist/chunks/chunk-A4VP7HDF.js +226 -0
- package/dist/chunks/chunk-A4VP7HDF.js.map +7 -0
- package/dist/chunks/chunk-B54Z662X.js +127 -0
- package/dist/chunks/chunk-B54Z662X.js.map +7 -0
- package/dist/chunks/{chunk-4SSMGBF4.js → chunk-CGL7QP4A.js} +58 -8
- package/dist/chunks/chunk-CGL7QP4A.js.map +7 -0
- package/dist/chunks/{chunk-32BNQ75J.js → chunk-FLKGJPCN.js} +99 -3
- package/dist/chunks/chunk-FLKGJPCN.js.map +7 -0
- package/dist/chunks/{chunk-QX3TUAWO.js → chunk-GGETIGM5.js} +487 -707
- package/dist/chunks/chunk-GGETIGM5.js.map +7 -0
- package/dist/chunks/{chunk-WVH324VF.js → chunk-IJL3QK3J.js} +3 -1
- package/dist/chunks/chunk-IJL3QK3J.js.map +7 -0
- package/dist/chunks/{chunk-3CPWRPCE.js → chunk-IK6PPFWG.js} +17 -6
- package/dist/chunks/chunk-IK6PPFWG.js.map +7 -0
- package/dist/chunks/{chunk-ZMIJ6AT4.js → chunk-IUCVOZRX.js} +3 -3
- package/dist/chunks/{chunk-3ZX76BVU.js → chunk-K6DHXXF5.js} +12 -10
- package/dist/chunks/chunk-K6DHXXF5.js.map +7 -0
- package/dist/chunks/{chunk-NPHCGLGH.js → chunk-MW5VI7IW.js} +135 -31
- package/dist/chunks/chunk-MW5VI7IW.js.map +7 -0
- package/dist/chunks/{chunk-BOTRGFQQ.js → chunk-NHMICIEU.js} +26 -19
- package/dist/chunks/chunk-NHMICIEU.js.map +7 -0
- package/dist/chunks/{chunk-Y7KNRAFL.js → chunk-PMSIZLV6.js} +29 -3
- package/dist/chunks/chunk-PMSIZLV6.js.map +7 -0
- package/dist/chunks/{chunk-7OH6DD3S.js → chunk-Q4XJ4PYL.js} +529 -168
- package/dist/chunks/chunk-Q4XJ4PYL.js.map +7 -0
- package/dist/chunks/chunk-RKRVOBVO.js +134 -0
- package/dist/chunks/chunk-RKRVOBVO.js.map +7 -0
- package/dist/chunks/{chunk-M3S7XITB.js → chunk-TGAVMUOS.js} +29 -13
- package/dist/chunks/chunk-TGAVMUOS.js.map +7 -0
- package/dist/chunks/chunk-TX6E5W7H.js +50 -0
- package/dist/chunks/chunk-TX6E5W7H.js.map +7 -0
- package/dist/chunks/{chunk-X3OD47CL.js → chunk-UR2K6WK6.js} +8 -11
- package/dist/chunks/chunk-UR2K6WK6.js.map +7 -0
- package/dist/chunks/{chunk-Z63R5GVN.js → chunk-WHBJDTCR.js} +6 -2
- package/dist/chunks/chunk-WHBJDTCR.js.map +7 -0
- package/dist/chunks/{chunk-RRGTKHXZ.js → chunk-X7XFT57O.js} +9 -140
- package/dist/chunks/{chunk-RRGTKHXZ.js.map → chunk-X7XFT57O.js.map} +4 -4
- package/dist/chunks/chunk-YV2PHCDB.js +108 -0
- package/dist/chunks/chunk-YV2PHCDB.js.map +7 -0
- package/dist/chunks/chunk-Z64PRP7A.js +156 -0
- package/dist/chunks/chunk-Z64PRP7A.js.map +7 -0
- package/dist/components/configuration.d.ts +42 -0
- package/dist/components/configuration.d.ts.map +1 -0
- package/dist/components/configuration.js +19 -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/provider-component.d.ts +1 -1
- package/dist/components/provider-component.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 +14 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-registry.d.ts +9 -0
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +6 -4
- package/dist/core/approval-controller.d.ts +5 -1
- package/dist/core/approval-controller.d.ts.map +1 -1
- package/dist/core/auto-approval-classifier.d.ts +11 -0
- package/dist/core/auto-approval-classifier.d.ts.map +1 -1
- package/dist/core/compact-controller.d.ts.map +1 -1
- package/dist/core/fabric-state-paths.d.ts +2 -0
- package/dist/core/fabric-state-paths.d.ts.map +1 -0
- package/dist/core/media-sanitize.d.ts +46 -0
- package/dist/core/media-sanitize.d.ts.map +1 -0
- package/dist/core/model-resolution.d.ts +23 -5
- package/dist/core/model-resolution.d.ts.map +1 -1
- package/dist/core/semantic-search.d.ts +56 -0
- package/dist/core/semantic-search.d.ts.map +1 -0
- package/dist/core/shell-jobs.d.ts.map +1 -1
- package/dist/core/shell-middleware.d.ts +4 -0
- package/dist/core/shell-middleware.d.ts.map +1 -0
- 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 +2 -0
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +1595 -239
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/fabric-state.d.ts +2 -0
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +284 -60
- package/dist/index.js.map +4 -4
- package/dist/jev/browser.d.ts.map +1 -1
- package/dist/jev/browser.js +1 -1
- package/dist/jev/client.d.ts +8 -2
- package/dist/jev/client.d.ts.map +1 -1
- package/dist/jev/client.js +3 -2
- package/dist/jev/config.d.ts.map +1 -1
- package/dist/jev/model-key.d.ts +9 -2
- package/dist/jev/model-key.d.ts.map +1 -1
- package/dist/jev/observation.js +4 -3
- package/dist/jev/routes.d.ts +69 -0
- package/dist/jev/routes.d.ts.map +1 -0
- package/dist/jev/validation.d.ts.map +1 -1
- package/dist/jev.d.ts +1 -0
- package/dist/jev.d.ts.map +1 -1
- package/dist/jev.js +35 -9
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +9 -2
- package/dist/mcp.js.map +2 -2
- package/dist/output-budget.d.ts.map +1 -1
- package/dist/prewalk/arm.d.ts.map +1 -1
- package/dist/prewalk/controller.d.ts +57 -6
- package/dist/prewalk/controller.d.ts.map +1 -1
- package/dist/prewalk/fs-drift.d.ts.map +1 -1
- package/dist/prewalk/handoff.d.ts +5 -25
- package/dist/prewalk/handoff.d.ts.map +1 -1
- package/dist/prewalk/messages.d.ts +24 -0
- package/dist/prewalk/messages.d.ts.map +1 -0
- package/dist/prewalk/model-switch.d.ts +3 -0
- package/dist/prewalk/model-switch.d.ts.map +1 -0
- package/dist/prewalk/plan.d.ts +46 -0
- package/dist/prewalk/plan.d.ts.map +1 -0
- package/dist/prewalk/return.d.ts +16 -0
- package/dist/prewalk/return.d.ts.map +1 -0
- package/dist/protocol.d.ts +11 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +3 -1
- package/dist/providers/agents-actions.d.ts.map +1 -1
- package/dist/providers/agents-provider.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.d.ts +2 -0
- package/dist/providers/jev-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.js +8 -7
- package/dist/providers/mcp-descriptor-cache.d.ts +2 -0
- package/dist/providers/mcp-descriptor-cache.d.ts.map +1 -1
- package/dist/providers/pi-tools-provider.d.ts.map +1 -1
- package/dist/providers/prewalk-provider.d.ts +19 -0
- package/dist/providers/prewalk-provider.d.ts.map +1 -0
- package/dist/repeat-guard.d.ts +4 -0
- package/dist/repeat-guard.d.ts.map +1 -1
- 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 +3 -0
- package/dist/residency/client.d.ts.map +1 -1
- package/dist/residency/host.d.ts.map +1 -1
- package/dist/residency/host.js +10 -8
- package/dist/residency/pi-entry.js +10 -8
- package/dist/residency/pi-entry.js.map +1 -1
- package/dist/residency/protocol.d.ts +15 -2
- package/dist/residency/protocol.d.ts.map +1 -1
- package/dist/runtime/core-override-guest-types.js +2 -2
- package/dist/runtime/cpython-runtime.d.ts +2 -0
- package/dist/runtime/cpython-runtime.d.ts.map +1 -1
- package/dist/runtime/cpython-runtime.js +7 -3
- package/dist/runtime/cpython-runtime.js.map +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 +5 -3
- package/dist/runtime/monty-runtime.js.map +2 -2
- package/dist/runtime/node-process-runtime.d.ts.map +1 -1
- package/dist/runtime/node-process-runtime.js +3 -3
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +1 -1
- package/dist/runtime/typescript-kernel.js +8 -8
- package/dist/runtime-state-builtins.d.ts.map +1 -1
- package/dist/schema/policy.d.ts.map +1 -1
- package/dist/ui/code-preview-shell.d.ts.map +1 -1
- package/dist/ui/controller.d.ts.map +1 -1
- package/dist/ui/conversation-native-reader.d.ts.map +1 -1
- package/dist/ui/conversation-native-reader.js.map +2 -2
- package/dist/ui/dashboard.js +2 -2
- package/dist/ui/settings-section-context.d.ts +1 -0
- package/dist/ui/settings-section-context.d.ts.map +1 -1
- package/dist/ui/settings-sections-agents.d.ts.map +1 -1
- package/dist/ui/settings-sections-execution.d.ts +1 -1
- package/dist/ui/settings-sections-execution.d.ts.map +1 -1
- package/dist/ui/settings-sections.d.ts +1 -0
- package/dist/ui/settings-sections.d.ts.map +1 -1
- package/dist/ui/settings-values.d.ts +1 -0
- package/dist/ui/settings-values.d.ts.map +1 -1
- package/dist/ui/settings.d.ts.map +1 -1
- package/dist/ui/settings.js +57 -17
- package/dist/ui/settings.js.map +2 -2
- package/dist/ui/spinner.d.ts +8 -1
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/widget.d.ts +12 -1
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/worker.js +1 -3
- package/dist/worker.js.map +2 -2
- package/docs/agents.md +35 -11
- package/docs/architecture.md +1 -1
- package/docs/components.md +30 -1
- package/docs/configuration.md +23 -15
- package/docs/foreman.md +65 -0
- package/docs/jev.md +77 -4
- package/docs/programmatic-compaction.md +12 -7
- package/docs/shell-middleware.md +61 -0
- package/docs/skills.md +2 -1
- package/package.json +5 -4
- package/skillsets/python/fabric-exec/SKILL.md +1 -1
- package/skillsets/python/fabric-exec/references/agents.md +1 -1
- package/skillsets/python/fabric-exec/references/mcp.md +1 -1
- package/skillsets/python/fabric-foreman/SKILL.md +249 -0
- package/skillsets/python/fabric-guide/SKILL.md +2 -1
- package/skillsets/python/fabric-jev/SKILL.md +2 -2
- package/skillsets/typescript/fabric-exec/SKILL.md +9 -3
- package/skillsets/typescript/fabric-exec/references/agents.md +5 -3
- package/skillsets/typescript/fabric-foreman/SKILL.md +240 -0
- package/skillsets/typescript/fabric-guide/SKILL.md +2 -1
- package/skillsets/typescript/fabric-jev/SKILL.md +2 -2
- package/dist/chunks/chunk-2IAVP4O2.js +0 -447
- package/dist/chunks/chunk-2IAVP4O2.js.map +0 -7
- package/dist/chunks/chunk-2PZWDVJB.js.map +0 -7
- package/dist/chunks/chunk-32BNQ75J.js.map +0 -7
- package/dist/chunks/chunk-3CPWRPCE.js.map +0 -7
- package/dist/chunks/chunk-3ZX76BVU.js.map +0 -7
- package/dist/chunks/chunk-4SSMGBF4.js.map +0 -7
- package/dist/chunks/chunk-7OH6DD3S.js.map +0 -7
- package/dist/chunks/chunk-BOTRGFQQ.js.map +0 -7
- package/dist/chunks/chunk-IYQ5MNCW.js.map +0 -7
- package/dist/chunks/chunk-KFZYTGF5.js.map +0 -7
- package/dist/chunks/chunk-M3S7XITB.js.map +0 -7
- package/dist/chunks/chunk-NPHCGLGH.js.map +0 -7
- package/dist/chunks/chunk-OTCASLY2.js.map +0 -7
- package/dist/chunks/chunk-QX3TUAWO.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-WVH324VF.js.map +0 -7
- package/dist/chunks/chunk-X3OD47CL.js.map +0 -7
- package/dist/chunks/chunk-Y7KNRAFL.js.map +0 -7
- package/dist/chunks/chunk-Z63R5GVN.js.map +0 -7
- /package/dist/chunks/{chunk-4JETKRFE.js.map → chunk-36B4AIRT.js.map} +0 -0
- /package/dist/chunks/{chunk-ZMIJ6AT4.js.map → chunk-IUCVOZRX.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/actors/types.ts"],
|
|
4
|
+
"sourcesContent": ["import type { ExtensionEvent } from \"@earendil-works/pi-coding-agent\";\nimport type { FabricAgentRunner, FabricAgentTransport, FabricPythonRuntime } from \"../config.js\";\nimport type { FabricThinking } from \"../thinking.js\";\nimport type { FabricLogLine, AgentRunRecord, AgentUsage } from \"../agents/types.js\";\nimport type { FabricCapabilityRequirement } from \"../components/types.js\";\nimport type { FabricKernel } from \"../runtime/kernel.js\";\nimport type { FabricParticipantResidency } from \"../topology/types.js\";\n\n// Pi's extension event union is closed; every member we want the actor host\n// to observe must appear in FABRIC_ACTOR_PI_HOST_EVENTS below. `project_trust`\n// uses pi's dedicated trust handler, and pi 0.86's `cache_warming_decision` is\n// a host-internal prompt-cache maintenance control event, so neither is an\n// actor observation and both are excluded here.\n//\n// pi 0.87 added two events, and neither is an actor observation yet:\n// - `agent_before_settle` is an actionable boundary that exists so a handler\n// can draft session entries and force one continuation. Fabric observes\n// lifecycle boundaries (`turn_end`, `agent_end`, `agent_settled`) and\n// republishes the ones it cares about through FABRIC_LIFECYCLE_EVENTS, which\n// has no `agent_before_settle` topic.\n// - `context_with_system` runs on the full transcript including system\n// messages and its result is sent verbatim. Exposing it to actors would let\n// them rewrite the system prompt per request, which Fabric deliberately\n// avoids to keep the cached system prefix byte-stable.\n// To observe either one as an actor event, add it to\n// FABRIC_ACTOR_PI_HOST_EVENTS below and give it a FABRIC_LIFECYCLE_EVENTS topic.\nexport type FabricActorPiHostEvent = Exclude<\n ExtensionEvent[\"type\"],\n \"project_trust\" | \"cache_warming_decision\" | \"agent_before_settle\" | \"context_with_system\"\n>;\n\nconst defineFabricActorPiHostEvents = <\n const Events extends readonly FabricActorPiHostEvent[],\n>(\n events: Exclude<FabricActorPiHostEvent, Events[number]> extends never ? Events : never,\n): Events => events;\n\nexport const FABRIC_ACTOR_PI_HOST_EVENTS = defineFabricActorPiHostEvents([\n \"resources_discover\",\n \"session_start\",\n \"session_info_changed\",\n \"session_before_switch\",\n \"session_before_fork\",\n \"session_before_compact\",\n \"session_compact\",\n \"session_compact_failed\",\n \"session_shutdown\",\n \"session_before_tree\",\n \"session_tree\",\n \"input\",\n \"before_agent_start\",\n \"agent_start\",\n \"agent_end\",\n \"agent_settled\",\n \"turn_start\",\n \"turn_end\",\n \"message_start\",\n \"message_update\",\n \"message_end\",\n \"ui_prompt_start\",\n \"ui_prompt_end\",\n \"context\",\n \"before_provider_headers\",\n \"before_provider_request\",\n \"after_provider_response\",\n \"tool_execution_start\",\n \"tool_call\",\n \"tool_execution_update\",\n \"tool_result\",\n \"tool_execution_end\",\n \"model_select\",\n \"thinking_level_select\",\n \"user_bash\",\n]);\n\nexport const FABRIC_ACTOR_HOST_EVENTS = [\n ...FABRIC_ACTOR_PI_HOST_EVENTS,\n \"tool_error\",\n] as const;\n\nexport type FabricActorHostEvent = (typeof FABRIC_ACTOR_HOST_EVENTS)[number];\n\nconst FABRIC_ACTOR_HOST_EVENT_SET: ReadonlySet<string> = new Set(FABRIC_ACTOR_HOST_EVENTS);\n\nexport const isFabricActorHostEvent = (value: unknown): value is FabricActorHostEvent =>\n typeof value === \"string\" && FABRIC_ACTOR_HOST_EVENT_SET.has(value);\n\nexport type FabricActorDelivery = \"mailbox\" | \"steer\" | \"followUp\" | \"nextTurn\";\nexport type FabricActorResponseMode = \"text\" | \"directive\";\nexport type FabricActorStatus = \"idle\" | \"queued\" | \"running\" | \"stopped\";\nexport type FabricActorBindingScope = \"session\" | \"project\";\nexport type FabricActorStorageScope = \"session\" | \"project\";\n\nexport interface FabricActorRunBinding {\n model?: string;\n thinking?: FabricThinking;\n}\n\ninterface FabricActorBindingView extends FabricActorRunBinding {\n scope: \"session\";\n sessionId: string;\n updatedAt?: number;\n}\n\ninterface FabricActorProjectDefaults extends FabricActorRunBinding {\n scope: \"project\";\n}\n\nexport interface FabricActorValidWhileSource {\n version: 1;\n source: string;\n}\n\nexport interface FabricActorValidityDecision {\n valid: boolean;\n reason?: string;\n}\n\nexport type FabricActorActivation =\n | {\n kind: \"hostEvent\";\n id: string;\n source: string;\n sequence: number;\n createdAt: number;\n event: FabricActorHostEvent;\n mainRevision: number;\n taskRevision: number;\n signal?: unknown;\n }\n | {\n kind: \"direct\";\n id: string;\n source: string;\n sequence: number;\n createdAt: number;\n }\n | {\n kind: \"mesh\";\n id: string;\n source: string;\n sequence: number;\n createdAt: number;\n topic: string;\n };\n\nexport interface FabricActorValidityFacts {\n activation: FabricActorActivation;\n current: {\n latestActivationSequence: number;\n mainRevision: number;\n taskRevision: number;\n idle: boolean;\n now: number;\n };\n}\n\nexport interface FabricActorRequest {\n /** Storage and visibility boundary. Defaults to mesh.actorScope for compatibility. */\n scope?: FabricActorStorageScope;\n name: string;\n instructions: string;\n /** Asynchronous observations of session-bound Pi events plus synthetic tool_error. */\n events?: FabricActorHostEvent[];\n topics?: string[];\n /** Defaults to mailbox. steer/followUp require an explicit triggerTurn choice. */\n delivery?: FabricActorDelivery;\n responseMode?: FabricActorResponseMode;\n /** Required for steer/followUp; must be false or omitted for mailbox/nextTurn. */\n triggerTurn?: boolean;\n coalesce?: boolean;\n /** session actors stop with their Pi host; durable actors transfer to a resident host. */\n residency?: FabricParticipantResidency;\n runner?: FabricAgentRunner;\n /** Omitted/inherit resolves at creation; the actor keeps one language for its session. */\n kernel?: FabricKernel | \"inherit\";\n /** Host-only backend snapshot for persistent/resident sessions; not a provider argument. */\n pythonRuntime?: FabricPythonRuntime;\n model?: string;\n thinking?: FabricThinking;\n tools?: string[];\n transport?: FabricAgentTransport;\n timeoutMs?: number;\n /**\n * Fabric capability for the actor. Defaults to true (today's behavior: a Pi\n * actor is recursively Fabric-equipped with the host-required fabric_exec\n * tool). Set false to disable Fabric for a Pi actor: the activation runs with\n * extensions:false and recursive:false so fabric_exec is not injected and the\n * actor cannot call agents.* or mesh.*; the host still manages its mailbox\n * and delivery (same model as a Claude actor). This does not restrict the\n * actor's ordinary tool allowlist. Fixed at creation.\n */\n extensions?: boolean;\n /** Exact Fabric actions committed before every actor run. Optional entries do not block a run. */\n requires?: readonly (string | FabricCapabilityRequirement)[];\n /** Serialized guest predicate evaluated before work and before delivery. */\n validWhile?: FabricActorValidWhileSource;\n}\n\nexport interface FabricActorInfo {\n id: string;\n scope: FabricActorStorageScope;\n name: string;\n rootId?: string;\n status: FabricActorStatus;\n runner: FabricAgentRunner;\n kernel?: FabricKernel;\n pythonRuntime?: FabricPythonRuntime;\n events: FabricActorHostEvent[];\n topics: string[];\n delivery: FabricActorDelivery;\n responseMode: FabricActorResponseMode;\n triggerTurn: boolean;\n coalesce: boolean;\n residency?: FabricParticipantResidency;\n /** Effective value for this caller after session bindings overlay project defaults. */\n model?: string;\n /** Effective value for this caller after session bindings overlay project defaults. */\n thinking?: FabricThinking;\n binding?: FabricActorBindingView;\n projectDefaults?: FabricActorProjectDefaults;\n tools?: string[];\n timeoutMs?: number;\n extensions?: boolean;\n requirements?: FabricCapabilityRequirement[];\n capabilityDigest?: string;\n missingCapabilities?: string[];\n validWhile?: FabricActorValidWhileSource;\n queued: number;\n messages: number;\n createdAt: number;\n updatedAt: number;\n lastRunId?: string;\n lastError?: string;\n sessionFile?: string;\n logDir?: string;\n}\n\nexport interface FabricActorLog {\n actorId: string;\n actorName: string;\n sessionFile: string;\n logDir: string;\n session: FabricLogLine[];\n sessionHasMore: boolean;\n sessionBefore?: number;\n run?: {\n runId: string;\n eventsFile: string;\n status?: AgentRunRecord;\n events: FabricLogLine[];\n hasMore: boolean;\n before?: number;\n };\n retainedRuns: string[];\n}\n\nexport interface FabricActorMessage {\n id: string;\n actorId: string;\n actorName: string;\n direction: \"in\" | \"out\";\n source: string;\n createdAt: number;\n text?: string;\n data?: unknown;\n action?: \"silent\" | \"message\" | \"stop\";\n runId?: string;\n usage?: AgentUsage;\n error?: string;\n stale?: boolean;\n reason?: string;\n}\n\nexport interface FabricActorDirective {\n action: \"silent\" | \"message\" | \"stop\";\n message?: string;\n data?: unknown;\n}\n\nexport interface FabricActorDeliveryRequest {\n actor: FabricActorInfo;\n message: FabricActorMessage;\n delivery: Exclude<FabricActorDelivery, \"mailbox\">;\n triggerTurn: boolean;\n}\n\n/**\n * A project-independent actor template stored in the global registry\n * (the user's agent dir, not a project mesh). It carries only the actor\n * definition (the same fields as FabricActorRequest) plus identity and\n * timestamps \u2014 never any history (messages, session transcript, or run logs).\n * Global actors are not live: they are stamped into a project via import,\n * which creates a fresh live actor with no inherited history.\n */\nexport interface GlobalActorDefinition extends FabricActorRequest {\n id: string;\n createdAt: number;\n updatedAt: number;\n // Redeclared required: the registry always materializes these (defaults\n // applied on create and load), so they are never undefined on a stored\n // template. Keeping them required avoids undefined creeping into merges and\n // spreads under exactOptionalPropertyTypes.\n events: FabricActorHostEvent[];\n topics: string[];\n delivery: FabricActorDelivery;\n responseMode: FabricActorResponseMode;\n triggerTurn: boolean;\n coalesce: boolean;\n residency?: FabricParticipantResidency;\n runner: FabricAgentRunner;\n}\n"],
|
|
5
|
+
"mappings": ";AA+BA,IAAM,gCAAgC,CAGpC,WACW;AAEN,IAAM,8BAA8B,8BAA8B;AAAA,EACvE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,IAAM,2BAA2B;AAAA,EACtC,GAAG;AAAA,EACH;AACF;AAIA,IAAM,8BAAmD,IAAI,IAAI,wBAAwB;AAElF,IAAM,yBAAyB,CAAC,UACrC,OAAO,UAAU,YAAY,4BAA4B,IAAI,KAAK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -3,7 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-AYBIR4YV.js";
|
|
4
4
|
import {
|
|
5
5
|
FABRIC_ACTOR_HOST_EVENTS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2QAOC3BO.js";
|
|
7
|
+
import {
|
|
8
|
+
aliasThinking
|
|
9
|
+
} from "./chunk-A4VP7HDF.js";
|
|
7
10
|
import {
|
|
8
11
|
isFabricThinking
|
|
9
12
|
} from "./chunk-MGWQOKBV.js";
|
|
@@ -33,7 +36,7 @@ var runProperties = {
|
|
|
33
36
|
},
|
|
34
37
|
model: {
|
|
35
38
|
type: "string",
|
|
36
|
-
description:
|
|
39
|
+
description: 'Pi provider/id copied from agents.models({ runner: "pi" }), a configured models.aliases name, or a search term resolved to the closest authenticated model (recency from pi-model-sort breaks ties). Reuse returned keys; never infer version numbers from agent names. Exact keys win; near-miss IDs resolve to the closest visible model on the same provider. Handles report the canonical model. Claude runtime value or Veda backend model/alias are forwarded verbatim.'
|
|
37
40
|
},
|
|
38
41
|
persona: {
|
|
39
42
|
type: "string",
|
|
@@ -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",
|
|
@@ -160,25 +167,28 @@ var AGENTS_ACTION_DESCRIPTORS = [
|
|
|
160
167
|
},
|
|
161
168
|
{
|
|
162
169
|
name: "spawn",
|
|
163
|
-
description: "Start a child agent through Pi or Claude Code and return a handle immediately.
|
|
170
|
+
description: "Start a child agent through Pi or Claude Code and return a handle immediately. For independent launches, await Promise.allSettled and inspect every result so one rejection does not abort pending sibling calls at program exit. Unread detached results are batched at the next safe turn boundary (or wake idle Main) when agents.notifyOnComplete is enabled. wait/join and terminal status acknowledge results and retract pending notifications. Use wait when this program needs the result; do not poll status in a loop.",
|
|
164
171
|
inputSchema: spawnSchema,
|
|
165
172
|
risk: "agent"
|
|
166
173
|
},
|
|
167
174
|
{
|
|
168
175
|
name: "wait",
|
|
169
|
-
description: "Wait for a previously spawned child agent",
|
|
176
|
+
description: "Wait for a previously spawned child agent and acknowledge its result, suppressing a duplicate completion notification",
|
|
177
|
+
effect: { kind: "emission", ordering: "commutative", resources: ["agents.completions"] },
|
|
170
178
|
inputSchema: idSchema,
|
|
171
179
|
risk: "read"
|
|
172
180
|
},
|
|
173
181
|
{
|
|
174
182
|
name: "join",
|
|
175
183
|
description: "Alias for agents.wait: wait for a previously spawned child agent with the same progress and completion-notification behavior",
|
|
184
|
+
effect: { kind: "emission", ordering: "commutative", resources: ["agents.completions"] },
|
|
176
185
|
inputSchema: idSchema,
|
|
177
186
|
risk: "read"
|
|
178
187
|
},
|
|
179
188
|
{
|
|
180
189
|
name: "status",
|
|
181
|
-
description: "Get the latest status of any known project participant",
|
|
190
|
+
description: "Get the latest status of any known project participant. A terminal child-agent result acknowledges its pending completion notification; running status does not.",
|
|
191
|
+
effect: { kind: "emission", ordering: "commutative", resources: ["agents.completions"] },
|
|
182
192
|
inputSchema: idSchema,
|
|
183
193
|
risk: "read"
|
|
184
194
|
},
|
|
@@ -702,7 +712,8 @@ var checkedKernel = (value) => {
|
|
|
702
712
|
};
|
|
703
713
|
var normalizeAgentRunRequest = (args, defaults, options = {}) => {
|
|
704
714
|
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
|
|
715
|
+
const requestedModel = typeof args.model === "string" ? args.model : typeof defaults.model === "string" ? defaults.model : void 0;
|
|
716
|
+
const thinking = isFabricThinking(args.thinking) ? args.thinking : aliasThinking(defaults.models?.aliases, requestedModel ?? "");
|
|
706
717
|
const tools = stringArray(args.tools);
|
|
707
718
|
const timeoutMs = typeof args.timeoutMs === "number" && Number.isFinite(args.timeoutMs) && args.timeoutMs > defaults.timeoutMs ? args.timeoutMs : void 0;
|
|
708
719
|
const runner = args.runner === "pi" || args.runner === "claude" || args.runner === "veda" ? args.runner : defaults.runner;
|
|
@@ -727,7 +738,8 @@ var normalizeAgentRunRequest = (args, defaults, options = {}) => {
|
|
|
727
738
|
...options.allowCwd !== false && typeof args.cwd === "string" ? { cwd: args.cwd } : {},
|
|
728
739
|
...typeof args.worktree === "boolean" ? { worktree: args.worktree } : {},
|
|
729
740
|
...args.residency === "session" || args.residency === "durable" ? { residency: args.residency } : {},
|
|
730
|
-
...typeof args.schema === "object" && args.schema !== null && !Array.isArray(args.schema) ? { schema: args.schema } : {}
|
|
741
|
+
...typeof args.schema === "object" && args.schema !== null && !Array.isArray(args.schema) ? { schema: args.schema } : {},
|
|
742
|
+
...typeof args.systemPrompt === "string" && args.systemPrompt.trim() ? { systemPrompt: args.systemPrompt } : {}
|
|
731
743
|
};
|
|
732
744
|
};
|
|
733
745
|
|
|
@@ -735,4 +747,4 @@ export {
|
|
|
735
747
|
AGENTS_ACTION_DESCRIPTORS,
|
|
736
748
|
normalizeAgentRunRequest
|
|
737
749
|
};
|
|
738
|
-
//# sourceMappingURL=chunk-
|
|
750
|
+
//# sourceMappingURL=chunk-2SWRVIYJ.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 copied from agents.models({ runner: \\\"pi\\\" }), a configured models.aliases name, or a search term resolved to the closest authenticated model (recency from pi-model-sort breaks ties). Reuse returned keys; never infer version numbers from agent names. Exact keys win; near-miss IDs resolve to the closest visible model on the same provider. Handles report the canonical model. 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. For independent launches, await Promise.allSettled and inspect every result so one rejection does not abort pending sibling calls at program exit. Unread detached results are batched at the next safe turn boundary (or wake idle Main) when agents.notifyOnComplete is enabled. wait/join and terminal status acknowledge results and retract pending notifications. Use wait when this program needs the result; do not poll status in a loop.\",\n inputSchema: spawnSchema,\n risk: \"agent\",\n },\n {\n name: \"wait\",\n description: \"Wait for a previously spawned child agent and acknowledge its result, suppressing a duplicate completion notification\",\n effect: { kind: \"emission\", ordering: \"commutative\", resources: [\"agents.completions\"] },\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 effect: { kind: \"emission\", ordering: \"commutative\", resources: [\"agents.completions\"] },\n inputSchema: idSchema,\n risk: \"read\",\n },\n {\n name: \"status\",\n description: \"Get the latest status of any known project participant. A terminal child-agent result acknowledges its pending completion notification; running status does not.\",\n effect: { kind: \"emission\", ordering: \"commutative\", resources: [\"agents.completions\"] },\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;AAAA,IACT,MAAM;AAAA,IACN,aACE;AAAA,EACJ;AAAA,EACA,YAAY,EAAE,MAAM,UAAU;AAAA,EAC9B,WAAW,EAAE,MAAM,UAAU;AAAA,EAC7B,KAAK;AAAA,IACH,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,UAAU,EAAE,MAAM,UAAU;AAAA,EAC5B,QAAQ,EAAE,MAAM,UAAU,aAAa,uDAAuD;AAAA,EAC9F,cAAc;AAAA,IACZ,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AACF;AAEA,IAAM,YAAY;A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_COMPATIBILITY_ARGUMENT_TYPE_NAMES,
|
|
3
3
|
PI_CORE_NUMERIC_FIELDS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FLKGJPCN.js";
|
|
5
5
|
import {
|
|
6
6
|
PI_CORE_TOOL_NAMES
|
|
7
7
|
} from "./chunk-YU62DDKK.js";
|
|
@@ -284,4 +284,4 @@ var buildCoreOverrideGuestDeclarations = (sources) => {
|
|
|
284
284
|
export {
|
|
285
285
|
buildCoreOverrideGuestDeclarations
|
|
286
286
|
};
|
|
287
|
-
//# sourceMappingURL=chunk-
|
|
287
|
+
//# sourceMappingURL=chunk-36B4AIRT.js.map
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-PSNXUZMY.js";
|
|
27
27
|
import {
|
|
28
28
|
FABRIC_NESTED_TOOL_CALL_ID_PREFIX
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-IJL3QK3J.js";
|
|
30
30
|
import {
|
|
31
31
|
FabricResolutionError,
|
|
32
32
|
FabricTraceSafeError,
|
|
@@ -450,6 +450,50 @@ var actionDescriptorHash = (action) => descriptorHash({
|
|
|
450
450
|
effect: action.effect
|
|
451
451
|
});
|
|
452
452
|
var discoveryTerms = (value) => [...value.normalize("NFKC").matchAll(/[\p{L}\p{N}_]+/gu)].map((match) => match[0].toLowerCase());
|
|
453
|
+
var scoreActionSearch = (query, action, providerDescription = "") => {
|
|
454
|
+
const normalizedQuery = query.normalize("NFKC").trim().toLowerCase();
|
|
455
|
+
if (!normalizedQuery) return 0;
|
|
456
|
+
const queryTerms = [...new Set(discoveryTerms(normalizedQuery))];
|
|
457
|
+
const ref = action.ref.normalize("NFKC").toLowerCase();
|
|
458
|
+
const name = action.name.normalize("NFKC").toLowerCase();
|
|
459
|
+
const description = action.description.normalize("NFKC").toLowerCase();
|
|
460
|
+
const provider = action.provider.normalize("NFKC").toLowerCase();
|
|
461
|
+
const providerBody = providerDescription.normalize("NFKC").toLowerCase();
|
|
462
|
+
const namespace = (action.namespace ?? "").normalize("NFKC").toLowerCase();
|
|
463
|
+
const schema = JSON.stringify(action.inputSchema ?? {}).normalize("NFKC").toLowerCase();
|
|
464
|
+
const tokenSets = {
|
|
465
|
+
ref: new Set(discoveryTerms(ref)),
|
|
466
|
+
name: new Set(discoveryTerms(name)),
|
|
467
|
+
description: new Set(discoveryTerms(description)),
|
|
468
|
+
provider: new Set(discoveryTerms(provider)),
|
|
469
|
+
providerBody: new Set(discoveryTerms(providerBody)),
|
|
470
|
+
namespace: new Set(discoveryTerms(namespace)),
|
|
471
|
+
schema: new Set(discoveryTerms(schema))
|
|
472
|
+
};
|
|
473
|
+
const fields = Object.values(tokenSets);
|
|
474
|
+
let score = 0;
|
|
475
|
+
if (ref === normalizedQuery) score += 1e3;
|
|
476
|
+
if (name === normalizedQuery) score += 800;
|
|
477
|
+
if (ref.startsWith(normalizedQuery)) score += 300;
|
|
478
|
+
else if (ref.includes(normalizedQuery)) score += 120;
|
|
479
|
+
if (description.includes(normalizedQuery)) score += 40;
|
|
480
|
+
if (providerBody.includes(normalizedQuery)) score += 20;
|
|
481
|
+
if (schema.includes(normalizedQuery)) score += 10;
|
|
482
|
+
let matchedTerms = 0;
|
|
483
|
+
for (const term of queryTerms) {
|
|
484
|
+
const matched = fields.some((field) => field.has(term));
|
|
485
|
+
if (!matched) continue;
|
|
486
|
+
matchedTerms += 1;
|
|
487
|
+
if (tokenSets.ref.has(term) || tokenSets.name.has(term)) score += 30;
|
|
488
|
+
if (tokenSets.provider.has(term)) score += 20;
|
|
489
|
+
if (tokenSets.description.has(term)) score += 8;
|
|
490
|
+
if (tokenSets.providerBody.has(term)) score += 4;
|
|
491
|
+
if (tokenSets.namespace.has(term)) score += 6;
|
|
492
|
+
if (tokenSets.schema.has(term)) score += 2;
|
|
493
|
+
}
|
|
494
|
+
if (queryTerms.length > 0 && matchedTerms === queryTerms.length) score += 15;
|
|
495
|
+
return score;
|
|
496
|
+
};
|
|
453
497
|
var conflictBetween = (left, right) => {
|
|
454
498
|
if (left.kind === "none" || right.kind === "none") return void 0;
|
|
455
499
|
const resources = (effect) => [...new Set((effect.resources ?? []).filter(
|
|
@@ -475,6 +519,7 @@ var ActionRegistry = class {
|
|
|
475
519
|
#providerBindings = new FabricProviderBindings();
|
|
476
520
|
#activeEffects = /* @__PURE__ */ new Map();
|
|
477
521
|
#unavailable = /* @__PURE__ */ new Map();
|
|
522
|
+
#unavailableResolver;
|
|
478
523
|
#speculation;
|
|
479
524
|
#speculationEligibility;
|
|
480
525
|
/**
|
|
@@ -509,6 +554,9 @@ var ActionRegistry = class {
|
|
|
509
554
|
has(name) {
|
|
510
555
|
return this.#providerBindings.has(name);
|
|
511
556
|
}
|
|
557
|
+
setUnavailableResolver(resolve) {
|
|
558
|
+
this.#unavailableResolver = resolve;
|
|
559
|
+
}
|
|
512
560
|
markUnavailable(name, reason) {
|
|
513
561
|
if (!providerNamePattern.test(name)) {
|
|
514
562
|
throw new Error(`Invalid Fabric provider name: ${name}`);
|
|
@@ -722,50 +770,15 @@ var ActionRegistry = class {
|
|
|
722
770
|
async search(query, context, limit = 30) {
|
|
723
771
|
const normalizedQuery = query.normalize("NFKC").trim().toLowerCase();
|
|
724
772
|
if (!normalizedQuery) return [];
|
|
725
|
-
const queryTerms = [...new Set(discoveryTerms(normalizedQuery))];
|
|
726
773
|
const listed = await this.list({ limit: 1e3 }, context);
|
|
727
|
-
return listed.map((action) => {
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
const schema = JSON.stringify(action.inputSchema).normalize("NFKC").toLowerCase();
|
|
736
|
-
const tokenSets = {
|
|
737
|
-
ref: new Set(discoveryTerms(ref)),
|
|
738
|
-
name: new Set(discoveryTerms(name)),
|
|
739
|
-
description: new Set(discoveryTerms(description)),
|
|
740
|
-
provider: new Set(discoveryTerms(provider)),
|
|
741
|
-
providerBody: new Set(discoveryTerms(providerBody)),
|
|
742
|
-
namespace: new Set(discoveryTerms(namespace)),
|
|
743
|
-
schema: new Set(discoveryTerms(schema))
|
|
744
|
-
};
|
|
745
|
-
const fields = Object.values(tokenSets);
|
|
746
|
-
let score = 0;
|
|
747
|
-
if (ref === normalizedQuery) score += 1e3;
|
|
748
|
-
if (name === normalizedQuery) score += 800;
|
|
749
|
-
if (ref.startsWith(normalizedQuery)) score += 300;
|
|
750
|
-
else if (ref.includes(normalizedQuery)) score += 120;
|
|
751
|
-
if (description.includes(normalizedQuery)) score += 40;
|
|
752
|
-
if (providerBody.includes(normalizedQuery)) score += 20;
|
|
753
|
-
if (schema.includes(normalizedQuery)) score += 10;
|
|
754
|
-
let matchedTerms = 0;
|
|
755
|
-
for (const term of queryTerms) {
|
|
756
|
-
const matched = fields.some((field) => field.has(term));
|
|
757
|
-
if (!matched) continue;
|
|
758
|
-
matchedTerms += 1;
|
|
759
|
-
if (tokenSets.ref.has(term) || tokenSets.name.has(term)) score += 30;
|
|
760
|
-
if (tokenSets.provider.has(term)) score += 20;
|
|
761
|
-
if (tokenSets.description.has(term)) score += 8;
|
|
762
|
-
if (tokenSets.providerBody.has(term)) score += 4;
|
|
763
|
-
if (tokenSets.namespace.has(term)) score += 6;
|
|
764
|
-
if (tokenSets.schema.has(term)) score += 2;
|
|
765
|
-
}
|
|
766
|
-
if (queryTerms.length > 0 && matchedTerms === queryTerms.length) score += 15;
|
|
767
|
-
return { action, score };
|
|
768
|
-
}).filter((entry) => entry.score > 0).sort(
|
|
774
|
+
return listed.map((action) => ({
|
|
775
|
+
action,
|
|
776
|
+
score: scoreActionSearch(
|
|
777
|
+
normalizedQuery,
|
|
778
|
+
action,
|
|
779
|
+
this.#providerBindings.current(action.provider)?.provider.description ?? ""
|
|
780
|
+
)
|
|
781
|
+
})).filter((entry) => entry.score > 0).sort(
|
|
769
782
|
(left, right) => right.score - left.score || left.action.ref.localeCompare(right.action.ref)
|
|
770
783
|
).slice(0, Math.max(1, Math.min(limit, 100))).map((entry) => entry.action);
|
|
771
784
|
}
|
|
@@ -1444,7 +1457,7 @@ var ActionRegistry = class {
|
|
|
1444
1457
|
#requireProvider(name) {
|
|
1445
1458
|
const provider = this.#providerBindings.current(name)?.provider;
|
|
1446
1459
|
if (provider) return provider;
|
|
1447
|
-
const unavailableReason = this.#unavailable.get(name);
|
|
1460
|
+
const unavailableReason = this.#unavailable.get(name) ?? this.#unavailableResolver?.(name);
|
|
1448
1461
|
if (unavailableReason) {
|
|
1449
1462
|
throw new FabricResolutionError(
|
|
1450
1463
|
`Fabric provider "${name}" is unavailable: ${unavailableReason}`
|
|
@@ -1461,6 +1474,7 @@ export {
|
|
|
1461
1474
|
repairActionName,
|
|
1462
1475
|
fabricActionListLimit,
|
|
1463
1476
|
NESTED_TOOL_CALL_ID_PREFIX,
|
|
1477
|
+
scoreActionSearch,
|
|
1464
1478
|
ActionRegistry
|
|
1465
1479
|
};
|
|
1466
|
-
//# sourceMappingURL=chunk-
|
|
1480
|
+
//# sourceMappingURL=chunk-3TXOQ5MG.js.map
|