@e4779/pi-fabric 0.117.2-fork.30 → 0.131.0-fork.32
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 +12 -5
- package/THIRD_PARTY_NOTICES.md +6 -14
- package/dist/activity/store.d.ts +2 -1
- package/dist/activity/store.d.ts.map +1 -1
- package/dist/actors/binding-store.d.ts +13 -0
- package/dist/actors/binding-store.d.ts.map +1 -1
- package/dist/actors/directory.d.ts.map +1 -1
- package/dist/actors/global-registry.d.ts +8 -0
- package/dist/actors/global-registry.d.ts.map +1 -1
- package/dist/actors/host-event-payload.d.ts +14 -0
- package/dist/actors/host-event-payload.d.ts.map +1 -1
- package/dist/actors/manager.d.ts +4 -3
- package/dist/actors/manager.d.ts.map +1 -1
- package/dist/actors/mesh-monitor.d.ts +2 -0
- package/dist/actors/mesh-monitor.d.ts.map +1 -1
- package/dist/actors/name-policy.d.ts +3 -0
- package/dist/actors/name-policy.d.ts.map +1 -0
- package/dist/actors/registry-store.d.ts +14 -5
- package/dist/actors/registry-store.d.ts.map +1 -1
- package/dist/actors/store-read.d.ts +16 -0
- package/dist/actors/store-read.d.ts.map +1 -0
- package/dist/agents/agent-files.d.ts +80 -0
- package/dist/agents/agent-files.d.ts.map +1 -0
- package/dist/agents/agent-files.js +327 -0
- package/dist/agents/agent-files.js.map +7 -0
- package/dist/agents/child-skills.d.ts +60 -0
- package/dist/agents/child-skills.d.ts.map +1 -0
- package/dist/agents/child-skills.js +94 -0
- package/dist/agents/child-skills.js.map +7 -0
- package/dist/agents/clone-first-worktree.d.ts +6 -0
- package/dist/agents/clone-first-worktree.d.ts.map +1 -1
- package/dist/agents/cow-clone.d.ts.map +1 -1
- package/dist/agents/handoff.d.ts +12 -2
- package/dist/agents/handoff.d.ts.map +1 -1
- package/dist/agents/herdr-status.d.ts +26 -0
- package/dist/agents/herdr-status.d.ts.map +1 -0
- package/dist/agents/herdr-status.js +161 -0
- package/dist/agents/herdr-status.js.map +7 -0
- package/dist/agents/hosted-run.d.ts +20 -4
- package/dist/agents/hosted-run.d.ts.map +1 -1
- package/dist/agents/manager.d.ts +18 -2
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/model-pin-guard.d.ts +27 -0
- package/dist/agents/model-pin-guard.d.ts.map +1 -0
- package/dist/agents/model-pin-guard.js +86 -0
- package/dist/agents/model-pin-guard.js.map +7 -0
- package/dist/agents/model-pin.d.ts +25 -0
- package/dist/agents/model-pin.d.ts.map +1 -0
- package/dist/agents/provider-bridge.d.ts +7 -6
- package/dist/agents/provider-bridge.d.ts.map +1 -1
- package/dist/agents/provider-bridge.js +33 -5
- package/dist/agents/provider-bridge.js.map +3 -3
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/result.d.ts.map +1 -1
- package/dist/agents/result.js +1 -1
- package/dist/agents/runner-notice.d.ts.map +1 -1
- package/dist/agents/runner-protocol.d.ts +8 -0
- package/dist/agents/runner-protocol.d.ts.map +1 -1
- package/dist/agents/service-schema.d.ts.map +1 -1
- package/dist/agents/transports/herdr-socket.d.ts +12 -0
- package/dist/agents/transports/herdr-socket.d.ts.map +1 -0
- package/dist/agents/transports/herdr-transport.d.ts.map +1 -1
- package/dist/agents/types.d.ts +51 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/worker-recovery.d.ts +75 -0
- package/dist/agents/worker-recovery.d.ts.map +1 -0
- package/dist/agents/worktree-manager.d.ts.map +1 -1
- package/dist/agents.js +12 -11
- package/dist/agents.js.map +2 -2
- package/dist/audit/details.d.ts +36 -1
- package/dist/audit/details.d.ts.map +1 -1
- package/dist/audit/projection.d.ts.map +1 -1
- package/dist/audit/trace-schema.d.ts +50 -0
- package/dist/audit/trace-schema.d.ts.map +1 -0
- package/dist/audit/trace.d.ts +2 -48
- package/dist/audit/trace.d.ts.map +1 -1
- package/dist/chunks/chunk-2RWNVCFD.js +483 -0
- package/dist/chunks/chunk-2RWNVCFD.js.map +7 -0
- package/dist/chunks/chunk-2SCMGO2Z.js +16 -0
- package/dist/chunks/chunk-2SCMGO2Z.js.map +7 -0
- package/dist/chunks/chunk-35EEGOH3.js +324 -0
- package/dist/chunks/chunk-35EEGOH3.js.map +7 -0
- package/dist/chunks/{chunk-3FJUP3GV.js → chunk-36XQFTEN.js} +2 -2
- package/dist/chunks/{chunk-UTOBAZ5T.js → chunk-37NIOSVU.js} +1 -1
- package/dist/chunks/chunk-37NIOSVU.js.map +7 -0
- package/dist/chunks/chunk-3IJEQBFS.js +25 -0
- package/dist/chunks/chunk-3IJEQBFS.js.map +7 -0
- package/dist/chunks/{chunk-EHQQ4KCX.js → chunk-3MOY6WIB.js} +84 -19
- package/dist/chunks/chunk-3MOY6WIB.js.map +7 -0
- package/dist/chunks/chunk-3PKZSIRA.js +1312 -0
- package/dist/chunks/chunk-3PKZSIRA.js.map +7 -0
- package/dist/chunks/chunk-3VK6UGAN.js +64 -0
- package/dist/chunks/chunk-3VK6UGAN.js.map +7 -0
- package/dist/chunks/{chunk-ROTCDDOV.js → chunk-3XT5WHSG.js} +59 -119
- package/dist/chunks/chunk-3XT5WHSG.js.map +7 -0
- package/dist/chunks/{chunk-FIDUHKMM.js → chunk-4BYS4ZLY.js} +16 -16
- package/dist/chunks/chunk-4BYS4ZLY.js.map +7 -0
- package/dist/chunks/{chunk-K7J2ABAZ.js → chunk-4KX6BIPL.js} +91 -31
- package/dist/chunks/chunk-4KX6BIPL.js.map +7 -0
- package/dist/chunks/{chunk-UOM37PE4.js → chunk-4PBW54I2.js} +162 -92
- package/dist/chunks/chunk-4PBW54I2.js.map +7 -0
- package/dist/chunks/{chunk-ZEXCKK4K.js → chunk-4WKD3YM3.js} +3 -3
- package/dist/chunks/{chunk-PK4NIJEV.js → chunk-4XMXFHAR.js} +62 -3
- package/dist/chunks/chunk-4XMXFHAR.js.map +7 -0
- package/dist/chunks/{chunk-4EW7GVUR.js → chunk-56NMRVTV.js} +589 -377
- package/dist/chunks/chunk-56NMRVTV.js.map +7 -0
- package/dist/chunks/{chunk-GIK2WNAK.js → chunk-5BOTHX47.js} +109 -20
- package/dist/chunks/chunk-5BOTHX47.js.map +7 -0
- package/dist/chunks/chunk-5QJFDKPN.js +179 -0
- package/dist/chunks/chunk-5QJFDKPN.js.map +7 -0
- package/dist/chunks/{chunk-P7CBPPHY.js → chunk-6GWDGTHC.js} +5 -5
- package/dist/chunks/{chunk-P7CBPPHY.js.map → chunk-6GWDGTHC.js.map} +1 -1
- package/dist/chunks/chunk-6HO2IUQ5.js +104 -0
- package/dist/chunks/chunk-6HO2IUQ5.js.map +7 -0
- package/dist/chunks/chunk-6OGYPHNQ.js +62 -0
- package/dist/chunks/chunk-6OGYPHNQ.js.map +7 -0
- package/dist/chunks/{chunk-GO32KSEZ.js → chunk-7CIES6X2.js} +84 -9
- package/dist/chunks/chunk-7CIES6X2.js.map +7 -0
- package/dist/chunks/{chunk-G4TLWHRS.js → chunk-7N7IC3Z2.js} +4 -3
- package/dist/chunks/{chunk-G4TLWHRS.js.map → chunk-7N7IC3Z2.js.map} +2 -2
- package/dist/chunks/{chunk-5XBYFSI5.js → chunk-7YNE4NB2.js} +2 -2
- package/dist/chunks/{chunk-NTC2MCB6.js → chunk-B5L3X3ID.js} +1 -1
- package/dist/chunks/{chunk-NTC2MCB6.js.map → chunk-B5L3X3ID.js.map} +1 -1
- package/dist/chunks/chunk-BIBRWZWQ.js +325 -0
- package/dist/chunks/chunk-BIBRWZWQ.js.map +7 -0
- package/dist/chunks/{chunk-K6QXUGS5.js → chunk-BMAEZNZ5.js} +2 -1
- package/dist/chunks/{chunk-FSB2VIRZ.js → chunk-CBIV747V.js} +14 -3
- package/dist/chunks/chunk-CBIV747V.js.map +7 -0
- package/dist/chunks/{chunk-CCHZXF6K.js → chunk-CXYJJ3HZ.js} +3 -3
- package/dist/chunks/{chunk-R2XQ6AHT.js → chunk-DGERP4VL.js} +22 -10
- package/dist/chunks/chunk-DGERP4VL.js.map +7 -0
- package/dist/chunks/chunk-F2LGSRIN.js +38 -0
- package/dist/chunks/chunk-F2LGSRIN.js.map +7 -0
- package/dist/chunks/chunk-F6A6MQ6G.js +609 -0
- package/dist/chunks/chunk-F6A6MQ6G.js.map +7 -0
- package/dist/chunks/{chunk-IR3PIHJM.js → chunk-FK73YJKV.js} +67 -2
- package/dist/chunks/chunk-FK73YJKV.js.map +7 -0
- package/dist/chunks/{chunk-VYQV5JRT.js → chunk-GJVKEHDL.js} +2 -2
- package/dist/chunks/chunk-GJVKEHDL.js.map +7 -0
- package/dist/chunks/{chunk-TIIIHPHF.js → chunk-GS67KDMV.js} +2 -2
- package/dist/chunks/{chunk-D5NYNIST.js → chunk-H57KPL3V.js} +5 -5
- package/dist/chunks/{chunk-KVYNGDGC.js → chunk-HFDJWLMS.js} +6 -6
- package/dist/chunks/{chunk-KVYNGDGC.js.map → chunk-HFDJWLMS.js.map} +1 -1
- package/dist/chunks/{chunk-INRXG4J5.js → chunk-HGD75NZY.js} +2 -2
- package/dist/chunks/{chunk-CRRUW26I.js → chunk-HRDMBGMY.js} +12 -12
- package/dist/chunks/{chunk-CRRUW26I.js.map → chunk-HRDMBGMY.js.map} +2 -2
- package/dist/chunks/{chunk-MLLYR3Y6.js → chunk-HSEZPCL5.js} +19 -78
- package/dist/chunks/chunk-HSEZPCL5.js.map +7 -0
- package/dist/chunks/{chunk-LNASO4VT.js → chunk-IOGDTIGN.js} +44 -19
- package/dist/chunks/chunk-IOGDTIGN.js.map +7 -0
- package/dist/chunks/chunk-JMUUNW2H.js +65 -0
- package/dist/chunks/chunk-JMUUNW2H.js.map +7 -0
- package/dist/chunks/{chunk-UXIBKMUM.js → chunk-KIFOEBYJ.js} +4 -4
- package/dist/chunks/{chunk-SPCJXN4K.js → chunk-LKYLD5SN.js} +298 -65
- package/dist/chunks/chunk-LKYLD5SN.js.map +7 -0
- package/dist/chunks/{chunk-FUY6XVRX.js → chunk-MPMEK3IQ.js} +2 -2
- package/dist/chunks/{chunk-HP5P7NBO.js → chunk-MSDL7U6Q.js} +4 -4
- package/dist/chunks/chunk-N7ZAK2PB.js +132 -0
- package/dist/chunks/chunk-N7ZAK2PB.js.map +7 -0
- package/dist/chunks/{chunk-VSDUSNIA.js → chunk-NBIYYMKS.js} +8 -2
- package/dist/chunks/chunk-NBIYYMKS.js.map +7 -0
- package/dist/chunks/chunk-NENQZCGW.js +45 -0
- package/dist/chunks/chunk-NENQZCGW.js.map +7 -0
- package/dist/chunks/chunk-NJHJKINP.js +47 -0
- package/dist/chunks/chunk-NJHJKINP.js.map +7 -0
- package/dist/chunks/{chunk-U366I5K2.js → chunk-NQ7IWEIF.js} +18 -6
- package/dist/chunks/chunk-NQ7IWEIF.js.map +7 -0
- package/dist/chunks/{chunk-ZQMBS5SH.js → chunk-OJ4HAALD.js} +15 -12
- package/dist/chunks/chunk-OJ4HAALD.js.map +7 -0
- package/dist/chunks/chunk-OZCJU3PZ.js +33 -0
- package/dist/chunks/chunk-OZCJU3PZ.js.map +7 -0
- package/dist/chunks/chunk-P3DCXKL3.js +40 -0
- package/dist/chunks/chunk-P3DCXKL3.js.map +7 -0
- package/dist/chunks/chunk-P7YSPKTM.js +294 -0
- package/dist/chunks/chunk-P7YSPKTM.js.map +7 -0
- package/dist/chunks/chunk-PQVUMJ5J.js +223 -0
- package/dist/chunks/chunk-PQVUMJ5J.js.map +7 -0
- package/dist/chunks/chunk-PUBHBEYO.js +84 -0
- package/dist/chunks/chunk-PUBHBEYO.js.map +7 -0
- package/dist/chunks/{chunk-P4KH4S4S.js → chunk-QGTD3LAZ.js} +5 -20
- package/dist/chunks/chunk-QGTD3LAZ.js.map +7 -0
- package/dist/chunks/{chunk-TIJ3YQXX.js → chunk-QOEOKW2X.js} +2 -2
- package/dist/chunks/{chunk-TIJ3YQXX.js.map → chunk-QOEOKW2X.js.map} +1 -1
- package/dist/chunks/{chunk-QT4W5YVB.js → chunk-RAA3FAYZ.js} +2 -2
- package/dist/chunks/{chunk-WJJXODAB.js → chunk-RLKRZXSX.js} +8 -1
- package/dist/chunks/{chunk-WJJXODAB.js.map → chunk-RLKRZXSX.js.map} +2 -2
- package/dist/chunks/chunk-RWKQ5SRW.js +129 -0
- package/dist/chunks/chunk-RWKQ5SRW.js.map +7 -0
- package/dist/chunks/chunk-SW25R47N.js +71 -0
- package/dist/chunks/chunk-SW25R47N.js.map +7 -0
- package/dist/chunks/{chunk-EFETPXU2.js → chunk-TJZYM2SP.js} +118 -237
- package/dist/chunks/chunk-TJZYM2SP.js.map +7 -0
- package/dist/chunks/{chunk-53N2I4QA.js → chunk-TXCNZCZP.js} +2 -2
- package/dist/chunks/chunk-UD7LFV43.js +28 -0
- package/dist/chunks/chunk-UD7LFV43.js.map +7 -0
- package/dist/chunks/{chunk-ASSLHWZS.js → chunk-UFMYN5TA.js} +2 -2
- package/dist/chunks/{chunk-7QKKLBHJ.js → chunk-UPMWLOKL.js} +10 -1
- package/dist/chunks/{chunk-7QKKLBHJ.js.map → chunk-UPMWLOKL.js.map} +2 -2
- package/dist/chunks/chunk-V4OW2ULC.js +422 -0
- package/dist/chunks/chunk-V4OW2ULC.js.map +7 -0
- package/dist/chunks/{chunk-FE6NOAO7.js → chunk-VNWQIGQL.js} +1820 -649
- package/dist/chunks/chunk-VNWQIGQL.js.map +7 -0
- package/dist/chunks/{chunk-PYFJW3HC.js → chunk-W5FEHVZA.js} +2 -16
- package/dist/chunks/{chunk-PYFJW3HC.js.map → chunk-W5FEHVZA.js.map} +3 -3
- package/dist/chunks/{chunk-XCEEQ5AB.js → chunk-WGMCNCP6.js} +1567 -1564
- package/dist/chunks/chunk-WGMCNCP6.js.map +7 -0
- package/dist/chunks/chunk-WKFRGICG.js +101 -0
- package/dist/chunks/chunk-WKFRGICG.js.map +7 -0
- package/dist/chunks/{chunk-3UGN25XS.js → chunk-WWTGWGH7.js} +80 -1662
- package/dist/chunks/chunk-WWTGWGH7.js.map +7 -0
- package/dist/chunks/{chunk-5UBRGTVN.js → chunk-X7QETPBC.js} +31 -15
- package/dist/chunks/chunk-X7QETPBC.js.map +7 -0
- package/dist/chunks/{chunk-LEU5CDSL.js → chunk-XFOSUGLU.js} +5 -5
- package/dist/chunks/{chunk-MZUC6LLH.js → chunk-XMYG2TKR.js} +4 -4
- package/dist/chunks/{chunk-MZUC6LLH.js.map → chunk-XMYG2TKR.js.map} +1 -1
- package/dist/chunks/chunk-YC65P7ZO.js +57 -0
- package/dist/chunks/chunk-YC65P7ZO.js.map +7 -0
- package/dist/chunks/{chunk-EKODKR6Y.js → chunk-YHFWMAQ5.js} +1 -24
- package/dist/chunks/chunk-YHFWMAQ5.js.map +7 -0
- package/dist/chunks/{chunk-C7Z6F3SO.js → chunk-ZFWICFNJ.js} +27 -20
- package/dist/chunks/{chunk-C7Z6F3SO.js.map → chunk-ZFWICFNJ.js.map} +2 -2
- package/dist/cli/decisions.d.ts.map +1 -1
- package/dist/cli/decisions.js +15 -3
- package/dist/cli/decisions.js.map +2 -2
- package/dist/cli/mesh.js +4 -3
- package/dist/cli/mesh.js.map +1 -1
- package/dist/commands/fabric-handler.d.ts +7 -0
- package/dist/commands/fabric-handler.d.ts.map +1 -0
- package/dist/commands/fabric-handler.js +916 -0
- package/dist/commands/fabric-handler.js.map +7 -0
- package/dist/commands/fabric.d.ts +11 -1
- package/dist/commands/fabric.d.ts.map +1 -1
- package/dist/compaction/claim-events.d.ts +61 -0
- package/dist/compaction/claim-events.d.ts.map +1 -0
- package/dist/compaction/claim-events.js +210 -0
- package/dist/compaction/claim-events.js.map +7 -0
- package/dist/compaction/claim.d.ts +51 -0
- package/dist/compaction/claim.d.ts.map +1 -0
- package/dist/compaction/hook.d.ts +28 -2
- package/dist/compaction/hook.d.ts.map +1 -1
- package/dist/compaction/hook.js +12 -7
- package/dist/compaction/owner.js +9 -8
- package/dist/compaction/trace-events.d.ts +1 -1
- package/dist/compaction/trace-events.d.ts.map +1 -1
- package/dist/components/configuration.js +6 -6
- package/dist/components/effect-scope.d.ts.map +1 -1
- package/dist/config.d.ts +39 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-arguments.d.ts.map +1 -1
- package/dist/core/action-policy-hooks.d.ts +69 -0
- package/dist/core/action-policy-hooks.d.ts.map +1 -0
- package/dist/core/action-registry.d.ts +31 -10
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +12 -9
- package/dist/core/approval-controller.d.ts +23 -3
- package/dist/core/approval-controller.d.ts.map +1 -1
- package/dist/core/atomic-write.d.ts +164 -0
- package/dist/core/atomic-write.d.ts.map +1 -1
- package/dist/core/child-tool-allowlist.d.ts +17 -1
- package/dist/core/child-tool-allowlist.d.ts.map +1 -1
- package/dist/core/compact-controller.d.ts +34 -0
- package/dist/core/compact-controller.d.ts.map +1 -1
- package/dist/core/core-override-guidance.d.ts +3 -1
- package/dist/core/core-override-guidance.d.ts.map +1 -1
- package/dist/core/file-lock.d.ts.map +1 -1
- package/dist/core/foreground-tools.d.ts +4 -1
- package/dist/core/foreground-tools.d.ts.map +1 -1
- package/dist/core/host-policy.d.ts +43 -0
- package/dist/core/host-policy.d.ts.map +1 -0
- package/dist/core/host-sdk-runtime.d.ts.map +1 -1
- package/dist/core/host-sdk.d.ts.map +1 -1
- package/dist/core/host-sdk.js +1 -1
- package/dist/core/managed-host-guidance.d.ts +5 -0
- package/dist/core/managed-host-guidance.d.ts.map +1 -0
- package/dist/core/model-aliases.d.ts +22 -0
- package/dist/core/model-aliases.d.ts.map +1 -0
- package/dist/core/model-resolution.d.ts +41 -20
- package/dist/core/model-resolution.d.ts.map +1 -1
- package/dist/core/native-tool-result.d.ts +1 -0
- package/dist/core/native-tool-result.d.ts.map +1 -1
- package/dist/core/program-tasks.d.ts +52 -0
- package/dist/core/program-tasks.d.ts.map +1 -0
- package/dist/core/prompt-guidance.d.ts +5 -0
- package/dist/core/prompt-guidance.d.ts.map +1 -0
- package/dist/core/prompt-guidance.js +159 -0
- package/dist/core/prompt-guidance.js.map +7 -0
- package/dist/core/provider-operations.d.ts.map +1 -1
- package/dist/core/provider-operations.js +60 -108
- package/dist/core/provider-operations.js.map +3 -3
- package/dist/core/shell-inbox.d.ts.map +1 -1
- package/dist/core/shell-jobs.d.ts +7 -5
- package/dist/core/shell-jobs.d.ts.map +1 -1
- package/dist/core/shell-timing.d.ts.map +1 -1
- package/dist/core/skill-prompt.d.ts +1 -1
- package/dist/core/skill-prompt.d.ts.map +1 -1
- package/dist/core/skill-references.d.ts +1 -1
- package/dist/core/skill-references.d.ts.map +1 -1
- package/dist/core/system-guidance.d.ts.map +1 -1
- package/dist/core/tool-result-proxy.d.ts.map +1 -1
- package/dist/decisions/command.d.ts +2 -1
- package/dist/decisions/command.d.ts.map +1 -1
- package/dist/decisions/command.js +40 -12
- package/dist/decisions/command.js.map +2 -2
- package/dist/decisions/events.d.ts +12 -0
- package/dist/decisions/events.d.ts.map +1 -0
- package/dist/decisions/events.js +130 -0
- package/dist/decisions/events.js.map +7 -0
- package/dist/decisions/host.d.ts +31 -3
- package/dist/decisions/host.d.ts.map +1 -1
- package/dist/decisions/render.d.ts +44 -0
- package/dist/decisions/render.d.ts.map +1 -0
- package/dist/decisions/store.d.ts +8 -0
- package/dist/decisions/store.d.ts.map +1 -1
- package/dist/durable/agent.d.ts +8 -0
- package/dist/durable/agent.d.ts.map +1 -1
- package/dist/durable/extension-load-error.d.ts +8 -0
- package/dist/durable/extension-load-error.d.ts.map +1 -0
- package/dist/durable/session.d.ts +1 -0
- package/dist/durable/session.d.ts.map +1 -1
- package/dist/durable/worker-host.d.ts +10 -1
- package/dist/durable/worker-host.d.ts.map +1 -1
- package/dist/durable/worker-host.js +10 -1181
- package/dist/durable/worker-host.js.map +4 -4
- package/dist/durable/worker-options.d.ts +3 -0
- package/dist/durable/worker-options.d.ts.map +1 -1
- package/dist/durable/worker-role-seed.d.ts +82 -0
- package/dist/durable/worker-role-seed.d.ts.map +1 -0
- package/dist/durable/worker.js +43 -4
- package/dist/durable/worker.js.map +2 -2
- package/dist/durable-controls.d.ts.map +1 -1
- package/dist/durable-extension-wasm.d.ts +8 -0
- package/dist/durable-extension-wasm.d.ts.map +1 -0
- package/dist/durable-extension-wasm.js +32 -0
- package/dist/durable-extension-wasm.js.map +7 -0
- package/dist/durable-extension.d.ts +94 -0
- package/dist/durable-extension.d.ts.map +1 -0
- package/dist/durable-extension.js +649 -0
- package/dist/durable-extension.js.map +7 -0
- package/dist/durable-host.d.ts +8 -0
- package/dist/durable-host.d.ts.map +1 -0
- package/dist/durable-host.js +20 -0
- package/dist/durable-host.js.map +7 -0
- package/dist/durable-journal.d.ts +94 -0
- package/dist/durable-journal.d.ts.map +1 -0
- package/dist/durable.d.ts.map +1 -1
- package/dist/durable.js +10 -8
- package/dist/durable.js.map +2 -2
- package/dist/entropy/index.js +12 -10
- package/dist/entropy/pool-store.d.ts.map +1 -1
- package/dist/execution-service.d.ts +14 -0
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/extension-bootstrap.d.ts.map +1 -1
- package/dist/extension-bootstrap.js +28 -27
- package/dist/extension-bootstrap.js.map +2 -2
- package/dist/extension-copy.d.ts +21 -0
- package/dist/extension-copy.d.ts.map +1 -0
- package/dist/extension-copy.js +90 -0
- package/dist/extension-copy.js.map +7 -0
- package/dist/extension.d.ts +1 -1
- package/dist/extension.d.ts.map +1 -1
- package/dist/fabric-exec-arguments.d.ts.map +1 -1
- package/dist/fabric-exec-tool.d.ts +2 -1
- package/dist/fabric-exec-tool.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts +19 -0
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +2125 -786
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/fabric-state.d.ts +44 -1
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +88 -53
- package/dist/index.js.map +2 -2
- package/dist/jev/client.js +2 -2
- package/dist/jev/manager.d.ts +3 -0
- package/dist/jev/manager.d.ts.map +1 -1
- package/dist/jev/observation.d.ts +1 -1
- package/dist/jev/observation.js +6 -6
- package/dist/jev-fabric/bridge.d.ts.map +1 -1
- package/dist/jev.js +11 -12
- package/dist/managed-host.d.ts +13 -0
- package/dist/managed-host.d.ts.map +1 -1
- package/dist/memory/digest.js +2 -2
- package/dist/memory/discovery.js +6 -7
- package/dist/memory/file-worker.js +10 -11
- package/dist/memory/file-worker.js.map +1 -1
- package/dist/memory/normalize.js +5 -6
- package/dist/memory/search.js +7 -8
- package/dist/memory/worker-provider.js +11 -12
- package/dist/memory.js +11 -12
- package/dist/memory.js.map +1 -1
- package/dist/mesh/grants.d.ts +3 -3
- package/dist/mesh/grants.d.ts.map +1 -1
- package/dist/mesh/store.d.ts +8 -0
- package/dist/mesh/store.d.ts.map +1 -1
- package/dist/native-codemode.d.ts.map +1 -1
- package/dist/native-tool-catalog.d.ts.map +1 -1
- package/dist/native-tool-catalog.js +12 -3
- package/dist/native-tool-catalog.js.map +2 -2
- package/dist/programs/host.d.ts +18 -6
- package/dist/programs/host.d.ts.map +1 -1
- package/dist/programs/host.js +71 -47
- package/dist/programs/host.js.map +2 -2
- package/dist/programs/source.d.ts +11 -0
- package/dist/programs/source.d.ts.map +1 -1
- package/dist/programs/store.d.ts.map +1 -1
- package/dist/protocol.d.ts +504 -8
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +41 -11
- package/dist/provider-globals.d.ts +13 -0
- package/dist/provider-globals.d.ts.map +1 -0
- package/dist/providers/agents-actions.d.ts.map +1 -1
- package/dist/providers/agents-provider.d.ts +3 -0
- package/dist/providers/agents-provider.d.ts.map +1 -1
- package/dist/providers/captured-tools-provider.d.ts +5 -0
- package/dist/providers/captured-tools-provider.d.ts.map +1 -1
- package/dist/providers/compact-provider.d.ts +4 -1
- package/dist/providers/compact-provider.d.ts.map +1 -1
- package/dist/providers/components-provider.d.ts.map +1 -1
- package/dist/providers/decisions-provider.d.ts +9 -1
- package/dist/providers/decisions-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.d.ts +1 -1
- package/dist/providers/jev-provider.js +11 -12
- package/dist/providers/memory-provider.js +10 -11
- package/dist/providers/pi-tools-provider.d.ts +14 -0
- package/dist/providers/pi-tools-provider.d.ts.map +1 -1
- package/dist/providers/programs-provider.d.ts.map +1 -1
- package/dist/providers/sessions-provider.d.ts +7 -0
- package/dist/providers/sessions-provider.d.ts.map +1 -1
- package/dist/repeat-guard.d.ts +7 -6
- package/dist/repeat-guard.d.ts.map +1 -1
- package/dist/residency/actor-client.js +3 -3
- package/dist/residency/client.d.ts +15 -0
- package/dist/residency/client.d.ts.map +1 -1
- package/dist/residency/host.d.ts.map +1 -1
- package/dist/residency/host.js +34 -23
- package/dist/residency/launcher.js +1 -1
- package/dist/residency/pi-entry.js +34 -23
- package/dist/residency/pi-entry.js.map +1 -1
- package/dist/residency/protocol.d.ts +2 -0
- package/dist/residency/protocol.d.ts.map +1 -1
- package/dist/runners.js +11 -1
- package/dist/runners.js.map +2 -2
- package/dist/runtime/core-override-guest-types.js +2 -2
- package/dist/runtime/cpython-child-source.d.ts.map +1 -1
- package/dist/runtime/cpython-runtime.d.ts.map +1 -1
- package/dist/runtime/cpython-runtime.js +51 -21
- package/dist/runtime/cpython-runtime.js.map +2 -2
- package/dist/runtime/deadline-pause.d.ts +2 -0
- package/dist/runtime/deadline-pause.d.ts.map +1 -1
- package/dist/runtime/dynamic-guest-types.d.ts.map +1 -1
- package/dist/runtime/dynamic-guest-types.js +2 -1
- package/dist/runtime/exec-journal.d.ts +73 -0
- package/dist/runtime/exec-journal.d.ts.map +1 -0
- package/dist/runtime/exec-journal.js +335 -0
- package/dist/runtime/exec-journal.js.map +7 -0
- package/dist/runtime/guest-types.d.ts +3 -2
- package/dist/runtime/guest-types.d.ts.map +1 -1
- package/dist/runtime/guest-types.js +1 -1
- package/dist/runtime/journal-shim.d.ts +3 -0
- package/dist/runtime/journal-shim.d.ts.map +1 -0
- package/dist/runtime/kernel.d.ts +95 -1
- package/dist/runtime/kernel.d.ts.map +1 -1
- package/dist/runtime/monty-bridge.d.ts +6 -2
- package/dist/runtime/monty-bridge.d.ts.map +1 -1
- package/dist/runtime/monty-runtime.d.ts.map +1 -1
- package/dist/runtime/monty-runtime.js +27 -15
- package/dist/runtime/monty-runtime.js.map +2 -2
- package/dist/runtime/native-codemode-guest.d.ts.map +1 -1
- package/dist/runtime/node-process-runtime.d.ts.map +1 -1
- package/dist/runtime/node-process-runtime.js +7 -5
- package/dist/runtime/quickjs-runtime.d.ts +7 -1
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +5 -4
- package/dist/runtime/sha256.d.ts +4 -0
- package/dist/runtime/sha256.d.ts.map +1 -0
- package/dist/runtime/transpile.d.ts +8 -0
- package/dist/runtime/transpile.d.ts.map +1 -0
- package/dist/runtime/type-checker.d.ts +1 -7
- package/dist/runtime/type-checker.d.ts.map +1 -1
- package/dist/runtime/type-checker.js +4 -2
- package/dist/runtime/typescript-kernel.js +13 -10
- package/dist/runtime/typescript-kernel.js.map +1 -1
- package/dist/runtime-state-builtins.d.ts.map +1 -1
- package/dist/speculation/scanner.js +1 -1
- package/dist/speculation/store.d.ts +7 -16
- package/dist/speculation/store.d.ts.map +1 -1
- package/dist/speculation/types.d.ts +1 -0
- package/dist/speculation/types.d.ts.map +1 -1
- package/dist/storage/retention.d.ts.map +1 -1
- package/dist/topology/participant-directory.d.ts +26 -1
- package/dist/topology/participant-directory.d.ts.map +1 -1
- package/dist/topology/peer-presence.d.ts.map +1 -1
- package/dist/topology/peer-settle.js +11 -0
- package/dist/topology/peer-settle.js.map +7 -0
- package/dist/topology/session-label-settings.d.ts +13 -0
- package/dist/topology/session-label-settings.d.ts.map +1 -0
- package/dist/topology/session-label.d.ts +60 -0
- package/dist/topology/session-label.d.ts.map +1 -0
- package/dist/topology/types.d.ts +27 -0
- package/dist/topology/types.d.ts.map +1 -1
- package/dist/type-error-guidance.js +1 -1
- package/dist/ui/controller.d.ts +1 -0
- package/dist/ui/controller.d.ts.map +1 -1
- package/dist/ui/conversation-chrome.d.ts.map +1 -1
- package/dist/ui/conversation-chrome.js +3 -2
- package/dist/ui/conversation-commands.d.ts +1 -1
- package/dist/ui/conversation-commands.d.ts.map +1 -1
- package/dist/ui/conversation-native-reader.js +2 -2
- package/dist/ui/conversation-selection.d.ts +4 -1
- package/dist/ui/conversation-selection.d.ts.map +1 -1
- package/dist/ui/conversation-targets.d.ts.map +1 -1
- package/dist/ui/conversation-targets.js +2 -2
- package/dist/ui/conversation.d.ts +25 -24
- package/dist/ui/conversation.d.ts.map +1 -1
- package/dist/ui/conversation.js +170 -339
- package/dist/ui/conversation.js.map +2 -2
- package/dist/ui/core-tool-render.d.ts +1 -0
- package/dist/ui/core-tool-render.d.ts.map +1 -1
- package/dist/ui/dashboard.d.ts.map +1 -1
- package/dist/ui/dashboard.js +17 -13
- package/dist/ui/dashboard.js.map +2 -2
- package/dist/ui/fabric-render.d.ts +6 -0
- package/dist/ui/fabric-render.d.ts.map +1 -1
- package/dist/ui/footer-dock.d.ts +48 -0
- package/dist/ui/footer-dock.d.ts.map +1 -0
- package/dist/ui/format.d.ts +7 -0
- package/dist/ui/format.d.ts.map +1 -1
- package/dist/ui/settings-sections-lifecycle.d.ts.map +1 -1
- package/dist/ui/settings-sections-presentation.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.js +59 -18
- package/dist/ui/settings.js.map +2 -2
- package/dist/ui/shell-hang-keys.d.ts +8 -1
- package/dist/ui/shell-hang-keys.d.ts.map +1 -1
- package/dist/ui/shell-tasks.d.ts +2 -2
- package/dist/ui/shell-tasks.d.ts.map +1 -1
- package/dist/ui/shell-tasks.js +27 -94
- package/dist/ui/shell-tasks.js.map +2 -2
- package/dist/ui/snapshot.d.ts.map +1 -1
- package/dist/ui/terminal-title.d.ts +41 -0
- package/dist/ui/terminal-title.d.ts.map +1 -0
- package/dist/ui/types.d.ts +4 -0
- package/dist/ui/types.d.ts.map +1 -1
- package/dist/ui/widget-keys.d.ts +5 -0
- package/dist/ui/widget-keys.d.ts.map +1 -0
- package/dist/ui/widget.d.ts +34 -16
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/ui/word-diff/line-emphasis.js +1603 -0
- package/dist/ui/word-diff/line-emphasis.js.map +7 -0
- package/dist/util.d.ts +2 -0
- package/dist/util.d.ts.map +1 -1
- package/dist/verified/authority.d.ts +2 -2
- package/dist/verified/authority.d.ts.map +1 -1
- package/dist/verified/budget.d.ts +4 -0
- package/dist/verified/budget.d.ts.map +1 -0
- package/dist/verified/generated/actor-name.d.ts +4 -0
- package/dist/verified/generated/actor-name.js +17 -0
- package/dist/verified/generated/authority.d.ts +4 -0
- package/dist/verified/generated/authority.js +28 -0
- package/dist/verified/generated/budget.d.ts +4 -0
- package/dist/verified/generated/budget.js +17 -0
- package/dist/verified/generated/compaction.d.ts +4 -0
- package/dist/verified/generated/compaction.js +19 -0
- package/dist/verified/generated/grants.d.ts +4 -0
- package/dist/verified/generated/grants.js +17 -0
- package/dist/verified/generated/lifecycle.d.ts +4 -0
- package/dist/verified/generated/lifecycle.js +50 -0
- package/dist/verified/generated/manifest.json +137 -48
- package/dist/verified/generated/policy.d.ts +17 -0
- package/dist/verified/generated/policy.js +211 -0
- package/dist/verified/generated/provider.d.ts +4 -0
- package/dist/verified/generated/provider.js +18 -0
- package/dist/verified/generated/resources.d.ts +6 -0
- package/dist/verified/generated/resources.js +73 -0
- package/dist/verified/generated/speculation.d.ts +6 -0
- package/dist/verified/generated/speculation.js +48 -0
- package/dist/verified/generated/storage.d.ts +4 -0
- package/dist/verified/generated/storage.js +18 -0
- package/dist/verified/grants.d.ts +22 -0
- package/dist/verified/grants.d.ts.map +1 -0
- package/dist/verified/lifecycle.d.ts +31 -0
- package/dist/verified/lifecycle.d.ts.map +1 -0
- package/dist/verified/machine.d.ts +18 -0
- package/dist/verified/machine.d.ts.map +1 -0
- package/dist/verified/memory.d.ts +1 -1
- package/dist/verified/memory.d.ts.map +1 -1
- package/dist/verified/nat.d.ts +1 -1
- package/dist/verified/nat.d.ts.map +1 -1
- package/dist/verified/policy.d.ts +17 -5
- package/dist/verified/policy.d.ts.map +1 -1
- package/dist/verified/provider.d.ts +22 -0
- package/dist/verified/provider.d.ts.map +1 -0
- package/dist/verified/resources.d.ts +21 -7
- package/dist/verified/resources.d.ts.map +1 -1
- package/dist/verified/speculation.d.ts +36 -0
- package/dist/verified/speculation.d.ts.map +1 -0
- package/dist/verified/storage.d.ts.map +1 -1
- package/dist/worker/missing-install.d.ts +8 -0
- package/dist/worker/missing-install.d.ts.map +1 -0
- package/dist/worker/options.d.ts.map +1 -1
- package/dist/worker/options.js +25 -0
- package/dist/worker/options.js.map +2 -2
- package/dist/worker/prompt-lifecycle.d.ts +16 -0
- package/dist/worker/prompt-lifecycle.d.ts.map +1 -0
- package/dist/worker/prompt-lifecycle.js +90 -0
- package/dist/worker/prompt-lifecycle.js.map +7 -0
- package/dist/worker/questions.d.ts +15 -3
- package/dist/worker/questions.d.ts.map +1 -1
- package/dist/worker/questions.js +53 -8
- package/dist/worker/questions.js.map +2 -2
- package/dist/worker/recovery-watchdog.d.ts +22 -0
- package/dist/worker/recovery-watchdog.d.ts.map +1 -1
- package/dist/worker/recovery-watchdog.js +116 -1
- package/dist/worker/recovery-watchdog.js.map +2 -2
- package/dist/worker/result.js +1 -1
- package/dist/worker/result.js.map +2 -2
- package/dist/worker.js +131 -21
- package/dist/worker.js.map +2 -2
- package/docs/actor-name-policy-handoff.md +5 -0
- package/docs/agents.md +164 -17
- package/docs/architecture.md +5 -1
- package/docs/audit-trace.md +2 -1
- package/docs/background-tasks.md +102 -16
- package/docs/codemode-parity.md +2 -2
- package/docs/compaction.md +21 -5
- package/docs/components.md +1 -1
- package/docs/configuration.md +111 -66
- package/docs/decisions.md +92 -10
- package/docs/durable-extension.md +121 -0
- package/docs/durable-pi.md +306 -6
- package/docs/extractive-history.md +3 -1
- package/docs/interface.md +20 -17
- package/docs/jev.md +1 -1
- package/docs/kernels.md +1 -1
- package/{node_modules/pi-coralbricks-provider/LICENSE → docs/licenses/gdp-wired-mit.txt} +1 -1
- package/docs/managed-host-migration.md +50 -0
- package/docs/programmatic-compaction.md +216 -6
- package/docs/programs.md +23 -1
- package/docs/prompt-cache.md +4 -2
- package/docs/provider-capabilities.md +15 -14
- package/docs/providers.md +99 -3
- package/docs/shell-composition.md +15 -0
- package/docs/short-lock-protocol.md +90 -0
- package/docs/skills.md +5 -1
- package/docs/speculation.md +6 -0
- package/docs/verified-kernels.md +309 -220
- package/package.json +45 -24
- package/proofs/actor-name.ts +27 -0
- package/proofs/authority.ts +62 -0
- package/proofs/budget.ts +24 -0
- package/proofs/compaction.ts +51 -0
- package/proofs/grants.ts +39 -0
- package/proofs/index.ts +40 -0
- package/proofs/kernel.ts +44 -0
- package/proofs/lifecycle.ts +128 -0
- package/proofs/policy.ts +195 -0
- package/proofs/provider.ts +52 -0
- package/proofs/resources.ts +160 -0
- package/proofs/speculation.ts +69 -0
- package/proofs/storage.ts +66 -0
- package/scripts/verified-kernels.ts +141 -0
- package/skillsets/python/fabric-council/SKILL.md +92 -20
- package/skillsets/python/fabric-exec/SKILL.md +2 -2
- package/skillsets/python/fabric-exec/references/agents.md +10 -4
- package/skillsets/python/fabric-fusion/SKILL.md +1 -1
- package/skillsets/python/fabric-guide/SKILL.md +1 -1
- package/skillsets/typescript/fabric-council/SKILL.md +109 -22
- package/skillsets/typescript/fabric-exec/SKILL.md +7 -7
- package/skillsets/typescript/fabric-exec/references/agents.md +12 -3
- package/skillsets/typescript/fabric-fusion/SKILL.md +1 -1
- package/skillsets/typescript/fabric-guide/SKILL.md +1 -1
- package/LAWS.bend +0 -502
- package/PROOF.bend +0 -452
- package/dist/chunks/chunk-3UGN25XS.js.map +0 -7
- package/dist/chunks/chunk-4EW7GVUR.js.map +0 -7
- package/dist/chunks/chunk-5UBRGTVN.js.map +0 -7
- package/dist/chunks/chunk-BN7F52EG.js +0 -525
- package/dist/chunks/chunk-BN7F52EG.js.map +0 -7
- package/dist/chunks/chunk-DK35W6U7.js +0 -259
- package/dist/chunks/chunk-DK35W6U7.js.map +0 -7
- package/dist/chunks/chunk-EFETPXU2.js.map +0 -7
- package/dist/chunks/chunk-EHQQ4KCX.js.map +0 -7
- package/dist/chunks/chunk-EKODKR6Y.js.map +0 -7
- package/dist/chunks/chunk-FE6NOAO7.js.map +0 -7
- package/dist/chunks/chunk-FIDUHKMM.js.map +0 -7
- package/dist/chunks/chunk-FSB2VIRZ.js.map +0 -7
- package/dist/chunks/chunk-GIK2WNAK.js.map +0 -7
- package/dist/chunks/chunk-GO32KSEZ.js.map +0 -7
- package/dist/chunks/chunk-IR3PIHJM.js.map +0 -7
- package/dist/chunks/chunk-ITVLKXCI.js +0 -266
- package/dist/chunks/chunk-ITVLKXCI.js.map +0 -7
- package/dist/chunks/chunk-K7J2ABAZ.js.map +0 -7
- package/dist/chunks/chunk-KJZAOENY.js +0 -212
- package/dist/chunks/chunk-KJZAOENY.js.map +0 -7
- package/dist/chunks/chunk-LNASO4VT.js.map +0 -7
- package/dist/chunks/chunk-MLLYR3Y6.js.map +0 -7
- package/dist/chunks/chunk-P4KH4S4S.js.map +0 -7
- package/dist/chunks/chunk-PK4NIJEV.js.map +0 -7
- package/dist/chunks/chunk-Q2JQ3RYZ.js +0 -99
- package/dist/chunks/chunk-Q2JQ3RYZ.js.map +0 -7
- package/dist/chunks/chunk-R2XQ6AHT.js.map +0 -7
- package/dist/chunks/chunk-ROTCDDOV.js.map +0 -7
- package/dist/chunks/chunk-SPCJXN4K.js.map +0 -7
- package/dist/chunks/chunk-U366I5K2.js.map +0 -7
- package/dist/chunks/chunk-UKMQK5VP.js +0 -231
- package/dist/chunks/chunk-UKMQK5VP.js.map +0 -7
- package/dist/chunks/chunk-UOM37PE4.js.map +0 -7
- package/dist/chunks/chunk-UTOBAZ5T.js.map +0 -7
- package/dist/chunks/chunk-VSDUSNIA.js.map +0 -7
- package/dist/chunks/chunk-VTK2FEH7.js +0 -229
- package/dist/chunks/chunk-VTK2FEH7.js.map +0 -7
- package/dist/chunks/chunk-VYQV5JRT.js.map +0 -7
- package/dist/chunks/chunk-XCEEQ5AB.js.map +0 -7
- package/dist/chunks/chunk-ZLNJDTCN.js +0 -226
- package/dist/chunks/chunk-ZLNJDTCN.js.map +0 -7
- package/dist/chunks/chunk-ZQMBS5SH.js.map +0 -7
- package/dist/ui/conversation-shortcut.d.ts +0 -3
- package/dist/ui/conversation-shortcut.d.ts.map +0 -1
- package/dist/ui/widget-activity.d.ts +0 -21
- package/dist/ui/widget-activity.d.ts.map +0 -1
- package/dist/verified/generated/authority-kernel.d.ts +0 -10
- package/dist/verified/generated/authority-kernel.js +0 -127
- package/dist/verified/generated/kernel.d.ts +0 -31
- package/dist/verified/generated/kernel.js +0 -389
- package/dist/verified/generated/lifecycle-kernel.d.ts +0 -7
- package/dist/verified/generated/lifecycle-kernel.js +0 -164
- package/dist/verified/generated/provider-kernel.d.ts +0 -9
- package/dist/verified/generated/provider-kernel.js +0 -87
- package/dist/verified/generated/storage-kernel.d.ts +0 -11
- package/dist/verified/generated/storage-kernel.js +0 -107
- package/docs/licenses/bend-apache-2.0.txt +0 -202
- package/node_modules/pi-coralbricks-provider/README.md +0 -306
- package/node_modules/pi-coralbricks-provider/auth.ts +0 -30
- package/node_modules/pi-coralbricks-provider/custom-models.json +0 -1
- package/node_modules/pi-coralbricks-provider/deprecated-models.json +0 -1
- package/node_modules/pi-coralbricks-provider/guard.ts +0 -155
- package/node_modules/pi-coralbricks-provider/index.ts +0 -662
- package/node_modules/pi-coralbricks-provider/models.json +0 -88
- package/node_modules/pi-coralbricks-provider/package.json +0 -74
- package/node_modules/pi-coralbricks-provider/park.ts +0 -122
- package/node_modules/pi-coralbricks-provider/patch.json +0 -34
- package/node_modules/pi-coralbricks-provider/scripts/update-models.js +0 -658
- package/node_modules/pi-coralbricks-provider/settings.ts +0 -143
- package/node_modules/pi-coralbricks-provider/sync-policy.ts +0 -309
- package/proofs/abi.json +0 -308
- package/proofs/authority-abi.json +0 -7
- package/proofs/authority-kernel.bend +0 -23
- package/proofs/authority-proof.bend +0 -74
- package/proofs/authority-spec.bend +0 -30
- package/proofs/authority-state.bend +0 -43
- package/proofs/authority-types.d.ts +0 -3
- package/proofs/kernel.bend +0 -139
- package/proofs/lifecycle-abi.json +0 -3
- package/proofs/lifecycle-kernel.bend +0 -11
- package/proofs/lifecycle-proof.bend +0 -249
- package/proofs/lifecycle-spec.bend +0 -261
- package/proofs/lifecycle-types.d.ts +0 -4
- package/proofs/lifecycle.bend +0 -119
- package/proofs/provider-abi.json +0 -4
- package/proofs/provider-kernel.bend +0 -14
- package/proofs/provider-plans.bend +0 -28
- package/proofs/provider-spec.bend +0 -14
- package/proofs/provider-types.d.ts +0 -5
- package/proofs/resource-proof.bend +0 -633
- package/proofs/resource-spec.bend +0 -133
- package/proofs/resources.bend +0 -160
- package/proofs/state-kernel.bend +0 -17
- package/proofs/state-plans.bend +0 -40
- package/proofs/state-proof.bend +0 -42
- package/proofs/state-spec.bend +0 -26
- package/proofs/storage-abi.json +0 -3
- package/proofs/storage-kernel.bend +0 -11
- package/proofs/storage-plans.bend +0 -100
- package/proofs/storage-proof.bend +0 -176
- package/proofs/storage-spec.bend +0 -70
- package/proofs/storage-types.d.ts +0 -8
- package/proofs/types.d.ts +0 -7
- package/scripts/test-verified-kernels.mjs +0 -107
- package/scripts/verified-kernels.mjs +0 -176
- /package/dist/chunks/{chunk-3FJUP3GV.js.map → chunk-36XQFTEN.js.map} +0 -0
- /package/dist/chunks/{chunk-ZEXCKK4K.js.map → chunk-4WKD3YM3.js.map} +0 -0
- /package/dist/chunks/{chunk-5XBYFSI5.js.map → chunk-7YNE4NB2.js.map} +0 -0
- /package/dist/chunks/{chunk-K6QXUGS5.js.map → chunk-BMAEZNZ5.js.map} +0 -0
- /package/dist/chunks/{chunk-CCHZXF6K.js.map → chunk-CXYJJ3HZ.js.map} +0 -0
- /package/dist/chunks/{chunk-TIIIHPHF.js.map → chunk-GS67KDMV.js.map} +0 -0
- /package/dist/chunks/{chunk-D5NYNIST.js.map → chunk-H57KPL3V.js.map} +0 -0
- /package/dist/chunks/{chunk-INRXG4J5.js.map → chunk-HGD75NZY.js.map} +0 -0
- /package/dist/chunks/{chunk-UXIBKMUM.js.map → chunk-KIFOEBYJ.js.map} +0 -0
- /package/dist/chunks/{chunk-FUY6XVRX.js.map → chunk-MPMEK3IQ.js.map} +0 -0
- /package/dist/chunks/{chunk-HP5P7NBO.js.map → chunk-MSDL7U6Q.js.map} +0 -0
- /package/dist/chunks/{chunk-QT4W5YVB.js.map → chunk-RAA3FAYZ.js.map} +0 -0
- /package/dist/chunks/{chunk-53N2I4QA.js.map → chunk-TXCNZCZP.js.map} +0 -0
- /package/dist/chunks/{chunk-ASSLHWZS.js.map → chunk-UFMYN5TA.js.map} +0 -0
- /package/dist/chunks/{chunk-LEU5CDSL.js.map → chunk-XFOSUGLU.js.map} +0 -0
package/dist/ui/conversation.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
KittyViewport,
|
|
3
|
-
isKittyImageLine
|
|
4
|
-
} from "../chunks/chunk-2Y24ML7H.js";
|
|
5
1
|
import {
|
|
6
2
|
defaultConversationTarget
|
|
7
|
-
} from "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-NBIYYMKS.js";
|
|
8
4
|
import {
|
|
9
5
|
conversationFooter
|
|
10
|
-
} from "../chunks/chunk-
|
|
6
|
+
} from "../chunks/chunk-DGERP4VL.js";
|
|
11
7
|
import {
|
|
12
8
|
getConversationHost
|
|
13
9
|
} from "../chunks/chunk-UGYCAG6O.js";
|
|
10
|
+
import {
|
|
11
|
+
KittyViewport,
|
|
12
|
+
isKittyImageLine
|
|
13
|
+
} from "../chunks/chunk-2Y24ML7H.js";
|
|
14
14
|
import {
|
|
15
15
|
highlightCode
|
|
16
16
|
} from "../chunks/chunk-QNMQJNXE.js";
|
|
17
17
|
import {
|
|
18
18
|
isActiveStatus
|
|
19
|
-
} from "../chunks/chunk-
|
|
19
|
+
} from "../chunks/chunk-37NIOSVU.js";
|
|
20
20
|
import {
|
|
21
|
+
borderBadge,
|
|
21
22
|
safeText
|
|
22
|
-
} from "../chunks/chunk-
|
|
23
|
+
} from "../chunks/chunk-FK73YJKV.js";
|
|
23
24
|
import {
|
|
24
25
|
terminalSafe,
|
|
25
26
|
unwrapActorEnvelopeText
|
|
@@ -29,9 +30,7 @@ import "../chunks/chunk-OKOHRXGF.js";
|
|
|
29
30
|
// src/ui/conversation.ts
|
|
30
31
|
import {
|
|
31
32
|
CURSOR_MARKER,
|
|
32
|
-
fuzzyFilter,
|
|
33
33
|
getKeybindings as getKeybindings3,
|
|
34
|
-
Input,
|
|
35
34
|
Key as Key2,
|
|
36
35
|
Text,
|
|
37
36
|
matchesKey as matchesKey2,
|
|
@@ -671,24 +670,64 @@ var safeRender = (component, width, fallback) => {
|
|
|
671
670
|
// src/ui/conversation-selection.ts
|
|
672
671
|
import { sliceByColumn, stripTerminalSequences, visibleWidth as visibleWidth2 } from "@earendil-works/pi-tui";
|
|
673
672
|
var graphemes = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
673
|
+
var words = new Intl.Segmenter(void 0, { granularity: "word" });
|
|
674
|
+
var wordJoiners = /* @__PURE__ */ new Set(["/", "-"]);
|
|
674
675
|
var ConversationTextSelection = class {
|
|
675
676
|
source;
|
|
676
677
|
anchor;
|
|
677
678
|
focus;
|
|
679
|
+
initialRange;
|
|
680
|
+
granularity = "character";
|
|
678
681
|
dragging = false;
|
|
679
682
|
clear() {
|
|
680
683
|
this.source = void 0;
|
|
681
684
|
this.anchor = this.focus = void 0;
|
|
685
|
+
this.initialRange = void 0;
|
|
686
|
+
this.granularity = "character";
|
|
682
687
|
this.dragging = false;
|
|
683
688
|
}
|
|
684
|
-
start(source, row, col) {
|
|
689
|
+
start(source, row, col, clickCount = 1) {
|
|
685
690
|
this.source = source;
|
|
686
|
-
|
|
687
|
-
this.
|
|
691
|
+
const point = this.point(row, col);
|
|
692
|
+
this.granularity = clickCount === 2 ? "word" : clickCount === 3 ? "line" : "character";
|
|
693
|
+
this.initialRange = this.range(point);
|
|
694
|
+
this.anchor = this.initialRange?.start ?? point;
|
|
695
|
+
this.focus = this.initialRange?.end ?? point;
|
|
688
696
|
this.dragging = true;
|
|
689
697
|
}
|
|
690
698
|
move(row, col) {
|
|
691
|
-
if (this.dragging)
|
|
699
|
+
if (!this.dragging) return;
|
|
700
|
+
const point = this.point(row, col);
|
|
701
|
+
const range = this.range(point);
|
|
702
|
+
if (!this.initialRange || !range) {
|
|
703
|
+
this.focus = point;
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
const before = range.start.row < this.initialRange.start.row || range.start.row === this.initialRange.start.row && range.start.col < this.initialRange.start.col;
|
|
707
|
+
this.anchor = before ? this.initialRange.end : this.initialRange.start;
|
|
708
|
+
this.focus = before ? range.start : range.end;
|
|
709
|
+
}
|
|
710
|
+
range(point) {
|
|
711
|
+
if (this.granularity === "character") return void 0;
|
|
712
|
+
const line = stripTerminalSequences(this.source?.[point.row] ?? "");
|
|
713
|
+
if (this.granularity === "line") return {
|
|
714
|
+
start: { row: point.row, col: 0 },
|
|
715
|
+
end: { row: point.row, col: visibleWidth2(line) }
|
|
716
|
+
};
|
|
717
|
+
let col = 0;
|
|
718
|
+
const segments = Array.from(words.segment(line), ({ segment, isWordLike }) => {
|
|
719
|
+
const start = col;
|
|
720
|
+
col += visibleWidth2(segment);
|
|
721
|
+
const joiner = wordJoiners.has(segment);
|
|
722
|
+
return { start, end: col, selectable: isWordLike === true || joiner, joiner };
|
|
723
|
+
});
|
|
724
|
+
let index = segments.findIndex((segment) => point.col >= segment.start && point.col < segment.end);
|
|
725
|
+
if (index < 0) return void 0;
|
|
726
|
+
let endIndex = index;
|
|
727
|
+
const joins = (left, right) => left.selectable && right.selectable && (left.joiner || right.joiner);
|
|
728
|
+
while (index > 0 && joins(segments[index - 1], segments[index])) index--;
|
|
729
|
+
while (endIndex + 1 < segments.length && joins(segments[endIndex], segments[endIndex + 1])) endIndex++;
|
|
730
|
+
return { start: { row: point.row, col: segments[index].start }, end: { row: point.row, col: segments[endIndex].end } };
|
|
692
731
|
}
|
|
693
732
|
finish(row, col) {
|
|
694
733
|
this.move(row, col);
|
|
@@ -918,12 +957,11 @@ var CONVERSATION_COMMANDS = [
|
|
|
918
957
|
{ value: "/copy", label: "/copy", description: "Copy the last assistant response" },
|
|
919
958
|
{ value: "/copy selection", label: "/copy selection", description: "Copy selected transcript text" },
|
|
920
959
|
{ value: "/latest", label: "/latest", description: "Clear selection and follow latest output" },
|
|
921
|
-
{ value: "/agents", label: "/agents", description: "Choose a conversation" },
|
|
922
960
|
{ value: "/back", label: "/back", description: "Return to Main" },
|
|
923
961
|
{ value: "/stop", label: "/stop", description: "Confirm stopping this participant" },
|
|
924
962
|
{ value: "/help", label: "/help", description: "Show preview commands" }
|
|
925
963
|
];
|
|
926
|
-
var CONVERSATION_COMMAND_HELP = "Commands: /copy [selection] \xB7 /latest \xB7 /
|
|
964
|
+
var CONVERSATION_COMMAND_HELP = "Commands: /copy [selection] \xB7 /latest \xB7 /back \xB7 /stop \xB7 /help";
|
|
927
965
|
function conversationCommandCompletion(enabled) {
|
|
928
966
|
return {
|
|
929
967
|
triggerCharacters: ["/"],
|
|
@@ -1829,11 +1867,10 @@ var FabricConversationView = class {
|
|
|
1829
1867
|
editor;
|
|
1830
1868
|
suspendedEditor;
|
|
1831
1869
|
editorEpoch = -1;
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
mode = "conversation";
|
|
1870
|
+
/** The agent list below the footer; ↓ in an empty editor moves into it. */
|
|
1871
|
+
list;
|
|
1872
|
+
listFocused = false;
|
|
1873
|
+
listTop = 0;
|
|
1837
1874
|
currentId;
|
|
1838
1875
|
feedback;
|
|
1839
1876
|
commandNotification;
|
|
@@ -1853,12 +1890,16 @@ var FabricConversationView = class {
|
|
|
1853
1890
|
main;
|
|
1854
1891
|
observationKey = "";
|
|
1855
1892
|
observedTranscript;
|
|
1856
|
-
pickerKey = "";
|
|
1857
1893
|
working;
|
|
1858
1894
|
workingTargetId;
|
|
1859
1895
|
textSelection = new ConversationTextSelection();
|
|
1860
1896
|
selectionWidth = 0;
|
|
1861
1897
|
selectionWasFollowing = false;
|
|
1898
|
+
selectionLatestRow = 0;
|
|
1899
|
+
lastLatestRow = 0;
|
|
1900
|
+
selectionRegion = "body";
|
|
1901
|
+
lastFooter = [];
|
|
1902
|
+
lastSelectionPress;
|
|
1862
1903
|
bodyTop = 0;
|
|
1863
1904
|
bodyHeight = 0;
|
|
1864
1905
|
copyVersion = 0;
|
|
@@ -1876,6 +1917,17 @@ var FabricConversationView = class {
|
|
|
1876
1917
|
});
|
|
1877
1918
|
this.editor = this.createEditor();
|
|
1878
1919
|
this.editorEpoch = this.state.epoch;
|
|
1920
|
+
this.list = options.participants?.({
|
|
1921
|
+
open: (row) => {
|
|
1922
|
+
this.releaseList();
|
|
1923
|
+
if (row.kind === "shell") this.options.openTasks?.(row.id);
|
|
1924
|
+
else this.selectTarget(row.id);
|
|
1925
|
+
},
|
|
1926
|
+
release: (forward) => this.releaseList(forward),
|
|
1927
|
+
requestRender: () => this.tui.requestRender(),
|
|
1928
|
+
viewing: () => this.currentId,
|
|
1929
|
+
...this.main ? { mainId: this.main.id } : {}
|
|
1930
|
+
});
|
|
1879
1931
|
const nonMain = this.nonMainTargets();
|
|
1880
1932
|
const requested = options.initialTargetId ?? defaultConversationTarget(nonMain, options.state.selectedId)?.id;
|
|
1881
1933
|
const requestedTarget = requested ? this.targetById(requested) : void 0;
|
|
@@ -1896,9 +1948,9 @@ var FabricConversationView = class {
|
|
|
1896
1948
|
});
|
|
1897
1949
|
editor.setWorkingStatusIndicator(this.working);
|
|
1898
1950
|
editor.topBorderBadge = (width) => this.targetBadge(width);
|
|
1899
|
-
editor.focused = this.focusState && this.
|
|
1951
|
+
editor.focused = this.focusState && !this.listFocused;
|
|
1900
1952
|
if (!withHistory) return editor;
|
|
1901
|
-
editor.setAutocompleteProvider(conversationCommandCompletion(() => !this.disposed && this.editor === editor &&
|
|
1953
|
+
editor.setAutocompleteProvider(conversationCommandCompletion(() => !this.disposed && this.editor === editor && !this.state.queues.get(this.currentId ?? "")?.editingActive));
|
|
1902
1954
|
editor.onSubmit = (text) => {
|
|
1903
1955
|
if (this.disposed || this.editor !== editor) return;
|
|
1904
1956
|
editor.setText(text);
|
|
@@ -1958,7 +2010,7 @@ var FabricConversationView = class {
|
|
|
1958
2010
|
this.releaseEditor(this.editor);
|
|
1959
2011
|
this.editor = this.suspendedEditor;
|
|
1960
2012
|
this.suspendedEditor = void 0;
|
|
1961
|
-
this.editor.focused = this.focusState && this.
|
|
2013
|
+
this.editor.focused = this.focusState && !this.listFocused;
|
|
1962
2014
|
this.attachWorkingIndicator();
|
|
1963
2015
|
restoredText = this.currentId ? this.state.view(this.currentId).draft : text;
|
|
1964
2016
|
}
|
|
@@ -1969,12 +2021,8 @@ var FabricConversationView = class {
|
|
|
1969
2021
|
}
|
|
1970
2022
|
set focused(value) {
|
|
1971
2023
|
this.focusState = value;
|
|
1972
|
-
if (this.
|
|
1973
|
-
|
|
1974
|
-
if (this.editor) this.editor.focused = false;
|
|
1975
|
-
return;
|
|
1976
|
-
}
|
|
1977
|
-
if (this.editor) this.editor.focused = value;
|
|
2024
|
+
if (this.list) this.list.focused = value && this.listFocused;
|
|
2025
|
+
if (this.editor) this.editor.focused = value && !this.listFocused;
|
|
1978
2026
|
}
|
|
1979
2027
|
/** Re-focus a target while the view is open; selecting Main closes to the native session. */
|
|
1980
2028
|
selectTarget(id) {
|
|
@@ -2006,8 +2054,8 @@ var FabricConversationView = class {
|
|
|
2006
2054
|
});
|
|
2007
2055
|
return;
|
|
2008
2056
|
}
|
|
2009
|
-
if (this.
|
|
2010
|
-
this.
|
|
2057
|
+
if (this.listFocused && this.list) {
|
|
2058
|
+
this.list.handleInput(data);
|
|
2011
2059
|
this.tui.requestRender();
|
|
2012
2060
|
return;
|
|
2013
2061
|
}
|
|
@@ -2018,12 +2066,22 @@ var FabricConversationView = class {
|
|
|
2018
2066
|
if (this.disposed) return void 0;
|
|
2019
2067
|
this.ensureEditorEpoch();
|
|
2020
2068
|
this.updateTargets();
|
|
2021
|
-
if (this.
|
|
2069
|
+
if (this.list && !this.textSelection.dragging && (event.type === "move" || event.y >= this.listTop)) {
|
|
2070
|
+
const result = this.list.handleMouse({ ...event, y: event.y - this.listTop });
|
|
2071
|
+
if (event.y >= this.listTop) {
|
|
2072
|
+
if (result?.focus) this.focusList(false);
|
|
2073
|
+
this.tui.requestRender();
|
|
2074
|
+
return { handled: true };
|
|
2075
|
+
}
|
|
2076
|
+
if (result?.render) this.tui.requestRender();
|
|
2077
|
+
if (event.type === "move") return { handled: true };
|
|
2078
|
+
}
|
|
2079
|
+
if (!this.textSelection.dragging && this.latest.hit(event)) {
|
|
2022
2080
|
this.followLatest();
|
|
2023
2081
|
this.tui.requestRender();
|
|
2024
2082
|
return { handled: true };
|
|
2025
2083
|
}
|
|
2026
|
-
if (this.
|
|
2084
|
+
if (this.currentId && !this.textSelection.dragging && this.scrollbar.handleMouse(event, (position) => {
|
|
2027
2085
|
const entry2 = this.state.view(this.currentId);
|
|
2028
2086
|
this.textSelection.clear();
|
|
2029
2087
|
entry2.pageAnchor = void 0;
|
|
@@ -2036,29 +2094,37 @@ var FabricConversationView = class {
|
|
|
2036
2094
|
return { handled: true, capture: true };
|
|
2037
2095
|
}
|
|
2038
2096
|
if (event.type === "wheel") {
|
|
2039
|
-
|
|
2040
|
-
this.refreshPicker();
|
|
2041
|
-
this.movePickerSelection((event.wheelDelta ?? 0) < 0 ? -1 : 1);
|
|
2042
|
-
} else this.scrollBy(event.wheelDelta ?? 0);
|
|
2097
|
+
this.scrollBy(event.wheelDelta ?? 0);
|
|
2043
2098
|
this.tui.requestRender();
|
|
2044
2099
|
return { handled: true };
|
|
2045
2100
|
}
|
|
2046
|
-
if (
|
|
2101
|
+
if (!this.currentId) return { handled: true };
|
|
2047
2102
|
const entry = this.state.view(this.currentId);
|
|
2048
2103
|
const inBody = event.y >= this.bodyTop && event.y < this.bodyTop + this.bodyHeight;
|
|
2049
|
-
const
|
|
2050
|
-
|
|
2104
|
+
const footerTop = this.editorTop + this.editorHeight;
|
|
2105
|
+
const inFooter = event.y >= footerTop && event.y < footerTop + this.lastFooter.length;
|
|
2106
|
+
const region = this.textSelection.dragging ? this.selectionRegion : inFooter ? "footer" : "body";
|
|
2107
|
+
const row = region === "footer" ? Math.max(0, Math.min(this.lastFooter.length - 1, event.y - footerTop)) : entry.scroll + Math.max(0, Math.min(this.bodyHeight - 1, event.y - this.bodyTop));
|
|
2108
|
+
if (event.type === "press" && event.button === "left" && (inBody || inFooter)) {
|
|
2109
|
+
this.selectionRegion = region;
|
|
2051
2110
|
this.selectionWasFollowing = entry.following;
|
|
2052
|
-
|
|
2053
|
-
|
|
2111
|
+
this.selectionLatestRow = this.lastLatestRow;
|
|
2112
|
+
if (region === "body") entry.following = false;
|
|
2113
|
+
const previous = this.lastSelectionPress;
|
|
2114
|
+
const now = Date.now();
|
|
2115
|
+
const count = previous?.target === this.currentId && previous.region === region && previous.row === row && Math.abs(previous.col - event.x) <= 1 && now - previous.at < 500 ? previous.count % 3 + 1 : 1;
|
|
2116
|
+
this.lastSelectionPress = { target: this.currentId, region, row, col: event.x, at: now, count };
|
|
2117
|
+
this.textSelection.start(region === "footer" ? this.lastFooter : this.lastBody, row, event.x, count);
|
|
2054
2118
|
this.tui.requestRender();
|
|
2055
2119
|
return { handled: true, capture: true };
|
|
2056
2120
|
}
|
|
2057
2121
|
if (this.textSelection.dragging && (event.type === "drag" || event.type === "release")) {
|
|
2058
|
-
if (event.type === "drag")
|
|
2059
|
-
|
|
2122
|
+
if (event.type === "drag") {
|
|
2123
|
+
this.lastSelectionPress = void 0;
|
|
2124
|
+
this.textSelection.move(row, event.x);
|
|
2125
|
+
} else {
|
|
2060
2126
|
this.textSelection.finish(row, event.x);
|
|
2061
|
-
if (!this.textSelection.active && this.selectionWasFollowing) entry.following = true;
|
|
2127
|
+
if (this.selectionRegion === "body" && !this.textSelection.active && this.selectionWasFollowing) entry.following = true;
|
|
2062
2128
|
if (this.textSelection.active && (this.options.appearance?.copyOnSelect ?? true)) this.copySelection();
|
|
2063
2129
|
}
|
|
2064
2130
|
this.tui.requestRender();
|
|
@@ -2082,13 +2148,13 @@ var FabricConversationView = class {
|
|
|
2082
2148
|
this.markCurrentTargetSeen();
|
|
2083
2149
|
this.reconcileEditor();
|
|
2084
2150
|
const target = this.currentTarget();
|
|
2085
|
-
const queue = this.
|
|
2151
|
+
const queue = this.currentQueue();
|
|
2086
2152
|
this.observe();
|
|
2087
2153
|
const contentWidth = this.scrollbar.contentWidth(width);
|
|
2088
|
-
const liveTranscriptLines = this.
|
|
2089
|
-
const transcriptLines = this.textSelection.source ?? liveTranscriptLines;
|
|
2154
|
+
const liveTranscriptLines = this.transcriptLines(contentWidth);
|
|
2155
|
+
const transcriptLines = (this.selectionRegion === "body" ? this.textSelection.source : void 0) ?? liveTranscriptLines;
|
|
2090
2156
|
let queueLines = queue?.render(width) ?? [];
|
|
2091
|
-
let editorLines =
|
|
2157
|
+
let editorLines = !(queue?.editingActive && queue.mode === "extension") ? this.renderEditorLines(width) : [];
|
|
2092
2158
|
const editorBudget = Math.min(editorLines.length, Math.max(1, rows - (rows >= 6 ? 3 : 0)));
|
|
2093
2159
|
let editorShowsTopBorder = editorLines.length > 0;
|
|
2094
2160
|
if (editorLines.length > editorBudget) {
|
|
@@ -2098,20 +2164,18 @@ var FabricConversationView = class {
|
|
|
2098
2164
|
editorLines = editorLines.slice(start, start + editorBudget);
|
|
2099
2165
|
}
|
|
2100
2166
|
let remaining = rows - editorLines.length;
|
|
2101
|
-
const
|
|
2167
|
+
const liveFooter = conversationFooter(target, this.theme, width).slice(0, Math.max(0, remaining - 1));
|
|
2168
|
+
this.lastFooter = this.selectionRegion === "footer" && this.textSelection.source ? this.textSelection.source.slice(0, liveFooter.length) : liveFooter;
|
|
2169
|
+
const footer = this.selectionRegion === "footer" && this.textSelection.active ? this.lastFooter.map((line, row) => this.textSelection.highlight(line, row, this.theme)) : this.lastFooter;
|
|
2102
2170
|
remaining -= footer.length;
|
|
2171
|
+
const list = (this.list?.render(width) ?? []).slice(0, Math.max(0, remaining - 3));
|
|
2172
|
+
remaining -= list.length;
|
|
2103
2173
|
const head = [];
|
|
2104
|
-
if (remaining > 0 && this.mode === "picker") {
|
|
2105
|
-
head.push(this.breadcrumbLine(width));
|
|
2106
|
-
remaining--;
|
|
2107
|
-
}
|
|
2108
2174
|
const feedback = this.currentFeedbackLine(width);
|
|
2109
2175
|
if (feedback !== void 0 && remaining > 1) {
|
|
2110
2176
|
head.push(feedback);
|
|
2111
2177
|
remaining--;
|
|
2112
2178
|
}
|
|
2113
|
-
const hints = this.mode === "conversation" && remaining > 2 ? [this.hintsLine(width)] : [];
|
|
2114
|
-
remaining -= hints.length;
|
|
2115
2179
|
const queueBudget = Math.max(0, remaining - 1);
|
|
2116
2180
|
if (queueLines.length > queueBudget) {
|
|
2117
2181
|
const cursor = queueLines.findIndex((line) => line.includes(CURSOR_MARKER));
|
|
@@ -2119,25 +2183,34 @@ var FabricConversationView = class {
|
|
|
2119
2183
|
queueLines = queueLines.slice(start, start + queueBudget);
|
|
2120
2184
|
}
|
|
2121
2185
|
remaining -= queueLines.length;
|
|
2122
|
-
this.editorTop = rows - editorLines.length - footer.length -
|
|
2186
|
+
this.editorTop = rows - editorLines.length - footer.length - list.length;
|
|
2187
|
+
this.listTop = rows - list.length;
|
|
2123
2188
|
this.editorHeight = editorLines.length;
|
|
2124
|
-
const window = remaining > 0
|
|
2125
|
-
|
|
2126
|
-
this.bodyTop = head.length;
|
|
2189
|
+
const window = remaining > 0 ? this.windowBody(transcriptLines, remaining, this.transcriptTail(contentWidth, remaining, editorShowsTopBorder)) : void 0;
|
|
2190
|
+
let body = window?.lines ?? [];
|
|
2127
2191
|
const scroll = this.currentId ? this.state.view(this.currentId).scroll : 0;
|
|
2128
|
-
this.bodyHeight =
|
|
2129
|
-
|
|
2130
|
-
if (this.textSelection.active) {
|
|
2192
|
+
this.bodyHeight = Math.max(0, Math.min(remaining, this.lastBody.length - scroll));
|
|
2193
|
+
let imageRows = window?.imageRows;
|
|
2194
|
+
if (this.selectionRegion === "body" && this.textSelection.active) {
|
|
2131
2195
|
for (let row = 0; row < this.bodyHeight; row++) {
|
|
2132
2196
|
if (!imageRows?.has(row)) body[row] = this.textSelection.highlight(body[row], scroll + row, this.theme);
|
|
2133
2197
|
}
|
|
2134
2198
|
}
|
|
2199
|
+
const following = this.currentId ? this.state.view(this.currentId).following : true;
|
|
2200
|
+
const latestRow = this.selectionRegion === "body" && this.textSelection.source ? this.selectionLatestRow : !following || !!this.observedTranscript?.hasNewer ? 1 : 0;
|
|
2201
|
+
this.lastLatestRow = latestRow;
|
|
2202
|
+
const pad = Math.max(0, remaining - body.length - latestRow);
|
|
2203
|
+
if (pad > 0) {
|
|
2204
|
+
body = [...Array.from({ length: pad }, () => ""), ...body];
|
|
2205
|
+
if (imageRows) imageRows = new Set([...imageRows].map((row) => row + pad));
|
|
2206
|
+
}
|
|
2135
2207
|
while (body.length < remaining) body.push("");
|
|
2136
|
-
|
|
2208
|
+
this.bodyTop = head.length + pad;
|
|
2209
|
+
if (remaining > 0) {
|
|
2137
2210
|
const entry = this.currentId ? this.state.view(this.currentId) : void 0;
|
|
2138
2211
|
this.scrollbar.sync(
|
|
2139
2212
|
width,
|
|
2140
|
-
|
|
2213
|
+
head.length,
|
|
2141
2214
|
remaining,
|
|
2142
2215
|
this.lastBodyLength,
|
|
2143
2216
|
scroll,
|
|
@@ -2150,13 +2223,13 @@ var FabricConversationView = class {
|
|
|
2150
2223
|
this.latest.paint(
|
|
2151
2224
|
body,
|
|
2152
2225
|
width,
|
|
2153
|
-
|
|
2154
|
-
!imageRows?.has(body.length - 1) && !!entry &&
|
|
2226
|
+
head.length,
|
|
2227
|
+
!imageRows?.has(body.length - 1) && !!entry && latestRow > 0,
|
|
2155
2228
|
this.scrollbar.visible,
|
|
2156
2229
|
this.theme
|
|
2157
2230
|
);
|
|
2158
2231
|
} else this.scrollbar.reset();
|
|
2159
|
-
return [...head, ...body.slice(0, remaining), ...queueLines, ...editorLines, ...footer, ...
|
|
2232
|
+
return [...head, ...body.slice(0, remaining), ...queueLines, ...editorLines, ...footer, ...list].slice(0, rows).map((line) => isKittyImageLine(line) || visibleWidth5(line) <= width ? line : truncateToWidth4(line, width, ""));
|
|
2160
2233
|
}
|
|
2161
2234
|
/** Observe files without rendering native history; true means a visible change
|
|
2162
2235
|
* or a live animation still needs the normal TUI render path. */
|
|
@@ -2164,16 +2237,15 @@ var FabricConversationView = class {
|
|
|
2164
2237
|
if (this.disposed) return false;
|
|
2165
2238
|
this.updateTargets();
|
|
2166
2239
|
const changed = this.observe();
|
|
2167
|
-
return changed || this.
|
|
2240
|
+
return changed || this.selectedTargetIsWorking();
|
|
2168
2241
|
}
|
|
2169
2242
|
observe() {
|
|
2170
2243
|
const entry = this.currentId ? this.state.view(this.currentId) : void 0;
|
|
2171
|
-
const transcript = this.
|
|
2244
|
+
const transcript = this.currentTarget() && this.currentId && entry ? this.options.transcript(this.currentId, entry.following) : void 0;
|
|
2172
2245
|
if (transcript && this.currentId) this.state.queues.sync(this.currentId, transcript);
|
|
2173
2246
|
const key = JSON.stringify([
|
|
2174
2247
|
this.targetsKey,
|
|
2175
2248
|
this.currentId,
|
|
2176
|
-
this.mode,
|
|
2177
2249
|
entry?.draft,
|
|
2178
2250
|
this.feedback && Date.now() - this.feedback.at <= FEEDBACK_TTL_MS ? this.feedback : void 0,
|
|
2179
2251
|
transcript && [
|
|
@@ -2205,7 +2277,7 @@ var FabricConversationView = class {
|
|
|
2205
2277
|
return isActiveStatus(target.status);
|
|
2206
2278
|
}
|
|
2207
2279
|
syncWorkingIndicator() {
|
|
2208
|
-
const active = !this.disposed && this.
|
|
2280
|
+
const active = !this.disposed && this.currentId && this.selectedTargetIsWorking();
|
|
2209
2281
|
if (!active) {
|
|
2210
2282
|
this.stopWorkingIndicator();
|
|
2211
2283
|
return;
|
|
@@ -2216,7 +2288,7 @@ var FabricConversationView = class {
|
|
|
2216
2288
|
this.workingTargetId = id;
|
|
2217
2289
|
const color = (text) => this.editor?.borderColor(text) ?? this.theme.fg("borderMuted", text);
|
|
2218
2290
|
this.working = new BorderWorkingIndicator({ requestRender: () => {
|
|
2219
|
-
if (!this.disposed && this.
|
|
2291
|
+
if (!this.disposed && this.currentId === id) this.tui.requestRender();
|
|
2220
2292
|
} }, color, "Working");
|
|
2221
2293
|
this.attachWorkingIndicator();
|
|
2222
2294
|
}
|
|
@@ -2238,7 +2310,7 @@ var FabricConversationView = class {
|
|
|
2238
2310
|
this.commandNotification?.pendingResult?.invalidate();
|
|
2239
2311
|
this.renderer.invalidate();
|
|
2240
2312
|
this.editor?.invalidate();
|
|
2241
|
-
this.
|
|
2313
|
+
this.list?.invalidate();
|
|
2242
2314
|
}
|
|
2243
2315
|
dispose() {
|
|
2244
2316
|
if (this.currentId) this.state.queues.detach(this.currentId);
|
|
@@ -2253,7 +2325,6 @@ var FabricConversationView = class {
|
|
|
2253
2325
|
this.releaseEditor(this.suspendedEditor);
|
|
2254
2326
|
this.suspendedEditor = void 0;
|
|
2255
2327
|
this.editor = void 0;
|
|
2256
|
-
this.pickerInput = void 0;
|
|
2257
2328
|
this.observedTranscript = void 0;
|
|
2258
2329
|
this.lastBody = [];
|
|
2259
2330
|
this.renderer.dispose();
|
|
@@ -2267,7 +2338,7 @@ var FabricConversationView = class {
|
|
|
2267
2338
|
* that landed while a previous view instance was disposed). */
|
|
2268
2339
|
reconcileEditor() {
|
|
2269
2340
|
this.ensureEditorEpoch();
|
|
2270
|
-
if (
|
|
2341
|
+
if (!this.editor || !this.currentId) return;
|
|
2271
2342
|
if (this.state.queues.get(this.currentId)?.editingActive) return;
|
|
2272
2343
|
if (this.state.hasPendingSend(this.currentId, this.editor.getText())) return;
|
|
2273
2344
|
const draft = this.state.view(this.currentId).draft;
|
|
@@ -2310,7 +2381,6 @@ var FabricConversationView = class {
|
|
|
2310
2381
|
const entry = this.state.view(id);
|
|
2311
2382
|
entry.lastSeenUpdatedAt = target.updatedAt ?? Date.now();
|
|
2312
2383
|
this.stopConfirmId = void 0;
|
|
2313
|
-
this.closePicker();
|
|
2314
2384
|
this.feedback = void 0;
|
|
2315
2385
|
this.editor?.setText(entry.draft);
|
|
2316
2386
|
if (requestRender) this.tui.requestRender();
|
|
@@ -2335,18 +2405,12 @@ var FabricConversationView = class {
|
|
|
2335
2405
|
this.nonMain = targets.filter((target) => !isMainTarget(target));
|
|
2336
2406
|
this.main = targets.find(isMainTarget);
|
|
2337
2407
|
}
|
|
2338
|
-
currentTargets() {
|
|
2339
|
-
return this.targets;
|
|
2340
|
-
}
|
|
2341
2408
|
nonMainTargets() {
|
|
2342
2409
|
return this.nonMain;
|
|
2343
2410
|
}
|
|
2344
2411
|
currentTarget() {
|
|
2345
2412
|
return this.currentId ? this.targetById(this.currentId) : void 0;
|
|
2346
2413
|
}
|
|
2347
|
-
mainTarget() {
|
|
2348
|
-
return this.main;
|
|
2349
|
-
}
|
|
2350
2414
|
targetById(id) {
|
|
2351
2415
|
return this.targetsById.get(id);
|
|
2352
2416
|
}
|
|
@@ -2368,12 +2432,6 @@ var FabricConversationView = class {
|
|
|
2368
2432
|
if (keys.length > 0) return global.matches(data, binding);
|
|
2369
2433
|
return fallbackKeys.some((key) => matchesKey2(data, key));
|
|
2370
2434
|
}
|
|
2371
|
-
bindingHint(binding, fallbackLabel) {
|
|
2372
|
-
const manager = this.options.keybindings ?? getKeybindings3();
|
|
2373
|
-
const keys = manager.getKeys(binding);
|
|
2374
|
-
if (keys.length > 0) return keys.join("/");
|
|
2375
|
-
return this.options.keybindings ? "unbound" : fallbackLabel;
|
|
2376
|
-
}
|
|
2377
2435
|
handleConversationInput(data) {
|
|
2378
2436
|
const editor = this.editor;
|
|
2379
2437
|
if (!editor) return;
|
|
@@ -2427,32 +2485,8 @@ var FabricConversationView = class {
|
|
|
2427
2485
|
this.options.close();
|
|
2428
2486
|
return;
|
|
2429
2487
|
}
|
|
2430
|
-
if (matchesKey2(data, Key2.
|
|
2431
|
-
this.
|
|
2432
|
-
return;
|
|
2433
|
-
}
|
|
2434
|
-
if (matchesKey2(data, "ctrl+tab")) {
|
|
2435
|
-
this.cycleTarget(1);
|
|
2436
|
-
return;
|
|
2437
|
-
}
|
|
2438
|
-
if (matchesKey2(data, "shift+ctrl+tab")) {
|
|
2439
|
-
this.cycleTarget(-1);
|
|
2440
|
-
return;
|
|
2441
|
-
}
|
|
2442
|
-
if (matchesKey2(data, "ctrl+shift+left")) {
|
|
2443
|
-
this.navigateParent();
|
|
2444
|
-
return;
|
|
2445
|
-
}
|
|
2446
|
-
if (matchesKey2(data, "ctrl+shift+right")) {
|
|
2447
|
-
this.navigateFirstChild();
|
|
2448
|
-
return;
|
|
2449
|
-
}
|
|
2450
|
-
if (matchesKey2(data, "alt+left") && editor.getText().length === 0) {
|
|
2451
|
-
this.navigateParent();
|
|
2452
|
-
return;
|
|
2453
|
-
}
|
|
2454
|
-
if (matchesKey2(data, "alt+right") && editor.getText().length === 0) {
|
|
2455
|
-
this.navigateFirstChild();
|
|
2488
|
+
if (matchesKey2(data, Key2.down) && editor.getText().length === 0 && this.list?.hasRows()) {
|
|
2489
|
+
this.focusList(true);
|
|
2456
2490
|
return;
|
|
2457
2491
|
}
|
|
2458
2492
|
const viewportKeys = getKeybindings3();
|
|
@@ -2520,7 +2554,7 @@ var FabricConversationView = class {
|
|
|
2520
2554
|
this.notificationScope++;
|
|
2521
2555
|
}
|
|
2522
2556
|
notifyCommand(message, kind = "info", options = {}) {
|
|
2523
|
-
if (this.disposed ||
|
|
2557
|
+
if (this.disposed || !this.currentId || !this.currentTarget()) return;
|
|
2524
2558
|
this.feedback = void 0;
|
|
2525
2559
|
const text = safeText(message).slice(0, 4096);
|
|
2526
2560
|
this.commandNotification = {
|
|
@@ -2629,10 +2663,6 @@ var FabricConversationView = class {
|
|
|
2629
2663
|
this.options.close();
|
|
2630
2664
|
return;
|
|
2631
2665
|
}
|
|
2632
|
-
if (command === "/agents") {
|
|
2633
|
-
this.openPicker();
|
|
2634
|
-
return;
|
|
2635
|
-
}
|
|
2636
2666
|
if (command === "/stop") {
|
|
2637
2667
|
if (!target.canStop) {
|
|
2638
2668
|
this.notifyCommand(`Stop unavailable for ${target.name}: the selected target cannot be stopped from here.`, "error");
|
|
@@ -2731,29 +2761,22 @@ var FabricConversationView = class {
|
|
|
2731
2761
|
if (current()) this.notifyCommand(`Stop failed for ${target.name}: ${errorText2(error)}`, "error");
|
|
2732
2762
|
});
|
|
2733
2763
|
}
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
if (!
|
|
2737
|
-
|
|
2738
|
-
if (
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
}
|
|
2742
|
-
this.options.close();
|
|
2764
|
+
/** Move keyboard focus into the agent list; `keyboard` selects the agent on screen. */
|
|
2765
|
+
focusList(keyboard) {
|
|
2766
|
+
if (!this.list) return;
|
|
2767
|
+
this.listFocused = true;
|
|
2768
|
+
if (keyboard) this.list.selectDefault();
|
|
2769
|
+
this.list.focused = this.focusState;
|
|
2770
|
+
if (this.editor) this.editor.focused = false;
|
|
2743
2771
|
}
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
if (!
|
|
2747
|
-
|
|
2748
|
-
if (
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
if (targets.length === 0) return;
|
|
2753
|
-
const index = targets.findIndex((target) => target.id === this.currentId);
|
|
2754
|
-
const nextIndex = index < 0 ? 0 : (index + direction + targets.length) % targets.length;
|
|
2755
|
-
const next = targets[nextIndex];
|
|
2756
|
-
if (next) this.applySelection(next.id, true);
|
|
2772
|
+
/** Give focus back to the editor; `forward` is a key the list did not use. */
|
|
2773
|
+
releaseList(forward) {
|
|
2774
|
+
if (!this.listFocused) return;
|
|
2775
|
+
this.listFocused = false;
|
|
2776
|
+
if (this.list) this.list.focused = false;
|
|
2777
|
+
if (this.editor) this.editor.focused = this.focusState;
|
|
2778
|
+
if (forward !== void 0) this.handleConversationInput(forward);
|
|
2779
|
+
this.tui.requestRender();
|
|
2757
2780
|
}
|
|
2758
2781
|
scrollBy(delta) {
|
|
2759
2782
|
if (!this.currentId || !Number.isFinite(delta) || delta === 0) return;
|
|
@@ -2804,159 +2827,22 @@ var FabricConversationView = class {
|
|
|
2804
2827
|
entry.pageAnchor = void 0;
|
|
2805
2828
|
entry.anchorLength = void 0;
|
|
2806
2829
|
}
|
|
2807
|
-
|
|
2808
|
-
this.latest.clear();
|
|
2809
|
-
this.scrollbar.reset();
|
|
2810
|
-
this.clearCommandNotification();
|
|
2811
|
-
this.copyVersion++;
|
|
2812
|
-
this.textSelection.clear();
|
|
2813
|
-
this.stopWorkingIndicator();
|
|
2814
|
-
this.mode = "picker";
|
|
2815
|
-
this.pickerInput = new Input({ prompt: "search targets: " });
|
|
2816
|
-
this.pickerInput.focused = this.focusState;
|
|
2817
|
-
this.pickerInput.onSubmit = () => this.pickSelected();
|
|
2818
|
-
if (this.editor) this.editor.focused = false;
|
|
2819
|
-
this.pickerSelectedId = this.currentId ?? this.nonMainTargets()[0]?.id;
|
|
2820
|
-
this.pickerOrder = [...this.targetsById.values()].map((target) => ({ target, active: isMainTarget(target) || !target.stale && isActiveStatus(target.status) })).sort((left, right) => Number(right.active) - Number(left.active) || (right.target.updatedAt ?? 0) - (left.target.updatedAt ?? 0)).map(({ target, active }) => ({ id: target.id, active }));
|
|
2821
|
-
this.pickerKey = "";
|
|
2822
|
-
this.refreshPicker();
|
|
2823
|
-
}
|
|
2824
|
-
closePicker() {
|
|
2825
|
-
this.mode = "conversation";
|
|
2826
|
-
this.pickerInput = void 0;
|
|
2827
|
-
this.pickerRows = [];
|
|
2828
|
-
this.pickerOrder = [];
|
|
2829
|
-
this.pickerKey = "";
|
|
2830
|
-
this.pickerSelectedId = void 0;
|
|
2831
|
-
if (this.editor) this.editor.focused = this.focusState;
|
|
2832
|
-
}
|
|
2833
|
-
refreshPicker() {
|
|
2834
|
-
const search = this.pickerInput?.getValue() ?? "";
|
|
2835
|
-
const key = JSON.stringify([this.targetsKey, search]);
|
|
2836
|
-
if (key === this.pickerKey) return;
|
|
2837
|
-
this.pickerKey = key;
|
|
2838
|
-
const rows = this.pickerOrder.flatMap(({ id, active }) => {
|
|
2839
|
-
const target = this.targetById(id);
|
|
2840
|
-
return target ? [{ target, active }] : [];
|
|
2841
|
-
});
|
|
2842
|
-
const matches = search.trim() ? new Set(fuzzyFilter(rows, search, (row) => `${row.target.kind} ${row.target.name} ${row.target.id}`).map((row) => row.target.id)) : void 0;
|
|
2843
|
-
const filtered = matches ? rows.filter((row) => matches.has(row.target.id)) : rows;
|
|
2844
|
-
this.pickerRows = filtered;
|
|
2845
|
-
if (!filtered.some((row) => row.target.id === this.pickerSelectedId)) {
|
|
2846
|
-
this.pickerSelectedId = filtered[0]?.target.id;
|
|
2847
|
-
}
|
|
2848
|
-
}
|
|
2849
|
-
pickerSelectedIndex() {
|
|
2850
|
-
const index = this.pickerRows.findIndex((row) => row.target.id === this.pickerSelectedId);
|
|
2851
|
-
return index >= 0 ? index : 0;
|
|
2852
|
-
}
|
|
2853
|
-
movePickerSelection(direction) {
|
|
2854
|
-
if (this.pickerRows.length === 0) return;
|
|
2855
|
-
const index = this.pickerSelectedIndex();
|
|
2856
|
-
const next = (index + direction + this.pickerRows.length) % this.pickerRows.length;
|
|
2857
|
-
this.pickerSelectedId = this.pickerRows[next]?.target.id;
|
|
2858
|
-
}
|
|
2859
|
-
pickSelected() {
|
|
2860
|
-
const row = this.pickerRows.find((candidate) => candidate.target.id === this.pickerSelectedId) ?? this.pickerRows[0];
|
|
2861
|
-
if (!row) {
|
|
2862
|
-
this.closePicker();
|
|
2863
|
-
return;
|
|
2864
|
-
}
|
|
2865
|
-
if (isMainTarget(row.target)) {
|
|
2866
|
-
this.options.close();
|
|
2867
|
-
return;
|
|
2868
|
-
}
|
|
2869
|
-
this.applySelection(row.target.id, true);
|
|
2870
|
-
}
|
|
2871
|
-
handlePickerInput(data) {
|
|
2872
|
-
this.refreshPicker();
|
|
2873
|
-
const input = this.pickerInput;
|
|
2874
|
-
if (!input) {
|
|
2875
|
-
this.closePicker();
|
|
2876
|
-
return;
|
|
2877
|
-
}
|
|
2878
|
-
if (matchesKey2(data, Key2.escape)) {
|
|
2879
|
-
this.closePicker();
|
|
2880
|
-
return;
|
|
2881
|
-
}
|
|
2882
|
-
if (matchesKey2(data, Key2.up)) {
|
|
2883
|
-
this.movePickerSelection(-1);
|
|
2884
|
-
return;
|
|
2885
|
-
}
|
|
2886
|
-
if (matchesKey2(data, Key2.down)) {
|
|
2887
|
-
this.movePickerSelection(1);
|
|
2888
|
-
return;
|
|
2889
|
-
}
|
|
2890
|
-
if (matchesKey2(data, Key2.enter)) {
|
|
2891
|
-
this.pickSelected();
|
|
2892
|
-
return;
|
|
2893
|
-
}
|
|
2894
|
-
input.handleInput(data);
|
|
2895
|
-
this.refreshPicker();
|
|
2896
|
-
}
|
|
2897
|
-
isUnread(target) {
|
|
2898
|
-
if (target.updatedAt === void 0 || target.id === this.currentId) return false;
|
|
2899
|
-
const seen = this.state.peek(target.id)?.lastSeenUpdatedAt ?? 0;
|
|
2900
|
-
return target.updatedAt > seen;
|
|
2901
|
-
}
|
|
2830
|
+
/** The participant's own name on the editor border; lineage stays in the agent list below. */
|
|
2902
2831
|
targetBadge(width) {
|
|
2903
2832
|
const target = this.currentTarget();
|
|
2904
2833
|
const labelWidth = Math.max(0, width - 2);
|
|
2905
2834
|
const access = target?.readOnlyReason ? " \xB7 read-only" : "";
|
|
2906
2835
|
const name = target ? isMainTarget(target) ? "Main" : safeText(target.name) || safeText(target.id) : "Fabric";
|
|
2907
2836
|
const suffix = visibleWidth5(access) + 1 <= labelWidth ? access : "";
|
|
2908
|
-
const
|
|
2909
|
-
|
|
2910
|
-
return this.theme.bg("selectedBg", ` ${label} `);
|
|
2911
|
-
}
|
|
2912
|
-
breadcrumbLine(width) {
|
|
2913
|
-
const chain = [];
|
|
2914
|
-
let cursor = this.currentTarget();
|
|
2915
|
-
const guard = /* @__PURE__ */ new Set();
|
|
2916
|
-
while (cursor && !guard.has(cursor.id)) {
|
|
2917
|
-
guard.add(cursor.id);
|
|
2918
|
-
chain.unshift(cursor);
|
|
2919
|
-
cursor = cursor.parentId ? this.targetById(cursor.parentId) : void 0;
|
|
2920
|
-
}
|
|
2921
|
-
if (chain.length === 0) {
|
|
2922
|
-
const main = this.mainTarget();
|
|
2923
|
-
if (main) chain.push(main);
|
|
2924
|
-
}
|
|
2925
|
-
if (chain.length === 0) return truncateToWidth4(this.theme.fg("dim", "Fabric"), width, "");
|
|
2926
|
-
const last = chain[chain.length - 1];
|
|
2927
|
-
const parts = chain.map((target, index) => {
|
|
2928
|
-
const isCurrent = target.id === this.currentId;
|
|
2929
|
-
const name = isMainTarget(target) ? "Main" : safeText(target.name) || target.id;
|
|
2930
|
-
const styled = isCurrent ? this.theme.fg("accent", name) : this.theme.fg("muted", name);
|
|
2931
|
-
return last && index === chain.length - 1 && this.isUnread(last) ? `${styled} \u25CF` : styled;
|
|
2932
|
-
});
|
|
2933
|
-
return truncateToWidth4(parts.join(this.theme.fg("dim", " > ")), width, "");
|
|
2837
|
+
const label = truncateToWidth4(name, Math.max(0, labelWidth - visibleWidth5(suffix)), "\u2026") + suffix;
|
|
2838
|
+
return borderBadge(this.editor?.borderColor("\u2500") ?? "", label);
|
|
2934
2839
|
}
|
|
2935
2840
|
currentFeedbackLine(width) {
|
|
2936
|
-
if (this.mode === "picker") return void 0;
|
|
2937
2841
|
if (!this.feedback) return void 0;
|
|
2938
2842
|
if (Date.now() - this.feedback.at > FEEDBACK_TTL_MS) return void 0;
|
|
2939
2843
|
const color = this.feedback.kind === "error" ? "error" : "accent";
|
|
2940
2844
|
return truncateToWidth4(this.theme.fg(color, this.feedback.text), width, "");
|
|
2941
2845
|
}
|
|
2942
|
-
hintsLine(width) {
|
|
2943
|
-
const followUpKeys = this.bindingHint("app.message.followUp", "alt+enter");
|
|
2944
|
-
const toolsKeys = this.bindingHint("app.tools.expand", "ctrl+o");
|
|
2945
|
-
const hints = this.stopConfirmId !== void 0 ? [this.theme.fg("warning", safeText("enter confirms stop \xB7 esc cancels"))] : [
|
|
2946
|
-
this.theme.fg("dim", "enter"),
|
|
2947
|
-
"steer",
|
|
2948
|
-
this.theme.fg("dim", followUpKeys),
|
|
2949
|
-
"follow-up",
|
|
2950
|
-
this.theme.fg("dim", "ctrl+n"),
|
|
2951
|
-
"targets",
|
|
2952
|
-
this.theme.fg("dim", "pgup/pgdn"),
|
|
2953
|
-
"scroll \xB7 drag select \xB7 /help",
|
|
2954
|
-
this.theme.fg("dim", "esc"),
|
|
2955
|
-
"close"
|
|
2956
|
-
];
|
|
2957
|
-
const full = [...hints, this.theme.fg("dim", toolsKeys), "tools"].join(" ");
|
|
2958
|
-
return truncateToWidth4(full, width, "");
|
|
2959
|
-
}
|
|
2960
2846
|
renderEditorLines(innerWidth) {
|
|
2961
2847
|
const editor = this.editor;
|
|
2962
2848
|
if (!editor) return [];
|
|
@@ -3044,61 +2930,6 @@ var FabricConversationView = class {
|
|
|
3044
2930
|
if (end > body.length) frame.lines.push(...tail.slice(Math.max(0, start - body.length), end - body.length));
|
|
3045
2931
|
return frame;
|
|
3046
2932
|
}
|
|
3047
|
-
pickerLines(innerWidth, budget) {
|
|
3048
|
-
this.refreshPicker();
|
|
3049
|
-
const lines = [this.theme.fg("accent", "Targets \xB7 enter select \xB7 esc cancel")];
|
|
3050
|
-
const input = this.pickerInput;
|
|
3051
|
-
if (input) {
|
|
3052
|
-
for (const line of input.render(innerWidth)) lines.push(line);
|
|
3053
|
-
}
|
|
3054
|
-
const rows = this.pickerRows;
|
|
3055
|
-
const selectedIndex = this.pickerSelectedIndex();
|
|
3056
|
-
const entries = [];
|
|
3057
|
-
let selectedLine = 0;
|
|
3058
|
-
let previousGroup;
|
|
3059
|
-
for (const row of rows) {
|
|
3060
|
-
if (row.active !== previousGroup) entries.push(row.active ? "Active" : "Inactive");
|
|
3061
|
-
previousGroup = row.active;
|
|
3062
|
-
if (row.target.id === this.pickerSelectedId) selectedLine = entries.length;
|
|
3063
|
-
entries.push(row);
|
|
3064
|
-
}
|
|
3065
|
-
const listBudget = Math.max(1, budget - lines.length - 1);
|
|
3066
|
-
let startIndex = Math.max(
|
|
3067
|
-
0,
|
|
3068
|
-
Math.min(selectedLine - Math.floor(listBudget / 2), entries.length - listBudget)
|
|
3069
|
-
);
|
|
3070
|
-
if (listBudget > 1 && typeof entries[startIndex] !== "string") {
|
|
3071
|
-
startIndex = Math.max(startIndex, selectedLine - listBudget + 2);
|
|
3072
|
-
}
|
|
3073
|
-
const first = entries[startIndex];
|
|
3074
|
-
const stickyHeader = listBudget > 1 && first !== void 0 && typeof first !== "string";
|
|
3075
|
-
if (stickyHeader) lines.push(this.theme.fg("muted", first.active ? " Active" : " Inactive"));
|
|
3076
|
-
const endIndex = Math.min(startIndex + listBudget - Number(stickyHeader), entries.length);
|
|
3077
|
-
if (rows.length === 0) lines.push(this.theme.fg("muted", " no matching targets"));
|
|
3078
|
-
for (let i = startIndex; i < endIndex; i++) {
|
|
3079
|
-
const row = entries[i];
|
|
3080
|
-
if (row === void 0) continue;
|
|
3081
|
-
if (typeof row === "string") {
|
|
3082
|
-
lines.push(this.theme.fg("muted", ` ${row}`));
|
|
3083
|
-
continue;
|
|
3084
|
-
}
|
|
3085
|
-
const selected = row.target.id === this.pickerSelectedId;
|
|
3086
|
-
const marker = selected ? this.theme.fg("accent", "\u2192 ") : " ";
|
|
3087
|
-
const unread = this.isUnread(row.target) ? this.theme.fg("accent", " \u25CF") : "";
|
|
3088
|
-
const label = isMainTarget(row.target) ? "Main (native session)" : `${safeText(row.target.name)} ${this.theme.fg("muted", `(${row.target.kind} \xB7 ${row.target.status})`)}`;
|
|
3089
|
-
lines.push(
|
|
3090
|
-
truncateToWidth4(
|
|
3091
|
-
` ${marker}${selected ? this.theme.fg("accent", label) : label}${unread}`,
|
|
3092
|
-
innerWidth,
|
|
3093
|
-
""
|
|
3094
|
-
)
|
|
3095
|
-
);
|
|
3096
|
-
}
|
|
3097
|
-
if (entries.length > listBudget) {
|
|
3098
|
-
lines.push(this.theme.fg("muted", ` (${selectedIndex + 1}/${rows.length})`));
|
|
3099
|
-
}
|
|
3100
|
-
return lines.slice(0, budget);
|
|
3101
|
-
}
|
|
3102
2933
|
};
|
|
3103
2934
|
export {
|
|
3104
2935
|
FabricConversationState,
|