@e4779/pi-fabric 0.131.4-fork.33 → 0.138.1-fork.1
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 +8 -0
- package/dist/actors/context.d.ts.map +1 -1
- package/dist/agents/clone-first-worktree.d.ts +2 -0
- package/dist/agents/clone-first-worktree.d.ts.map +1 -1
- package/dist/agents/completion-inbox.d.ts +2 -1
- package/dist/agents/completion-inbox.d.ts.map +1 -1
- package/dist/agents/handoff.d.ts.map +1 -1
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/worktree-manager.d.ts +4 -1
- package/dist/agents/worktree-manager.d.ts.map +1 -1
- package/dist/agents/worktree-paths.d.ts +8 -3
- package/dist/agents/worktree-paths.d.ts.map +1 -1
- package/dist/agents.js +6 -1
- package/dist/agents.js.map +1 -1
- package/dist/async-settlement.d.ts +1 -1
- package/dist/async-settlement.d.ts.map +1 -1
- package/dist/audit/details.d.ts.map +1 -1
- package/dist/capture/catalog.d.ts +2 -0
- package/dist/capture/catalog.d.ts.map +1 -1
- package/dist/capture/interceptor.d.ts.map +1 -1
- package/dist/chunks/{chunk-7N7IC3Z2.js → chunk-2CD7HLVP.js} +3 -84
- package/dist/chunks/chunk-2CD7HLVP.js.map +7 -0
- package/dist/chunks/{chunk-7YNE4NB2.js → chunk-2MELFQCQ.js} +2 -2
- package/dist/chunks/{chunk-HSEZPCL5.js → chunk-2OC4YJOL.js} +3 -3
- package/dist/chunks/{chunk-TXCNZCZP.js → chunk-2QJ4MNS6.js} +2 -2
- package/dist/chunks/{chunk-F6A6MQ6G.js → chunk-2WPTD6BI.js} +11 -15
- package/dist/chunks/chunk-2WPTD6BI.js.map +7 -0
- package/dist/chunks/{chunk-QOEOKW2X.js → chunk-3QH6JAE3.js} +2 -2
- package/dist/chunks/chunk-4U47NCP2.js +88 -0
- package/dist/chunks/chunk-4U47NCP2.js.map +7 -0
- package/dist/chunks/{chunk-OJ4HAALD.js → chunk-5VZEAAHD.js} +10 -9
- package/dist/chunks/chunk-5VZEAAHD.js.map +7 -0
- package/dist/chunks/{chunk-LKYLD5SN.js → chunk-6HM4TX7L.js} +10 -8
- package/dist/chunks/chunk-6HM4TX7L.js.map +7 -0
- package/dist/chunks/{chunk-L6H46CPY.js → chunk-6NNL5LOG.js} +2 -2
- package/dist/chunks/{chunk-7TB7NXSL.js → chunk-7CIQQOOD.js} +11 -3
- package/dist/chunks/{chunk-7TB7NXSL.js.map → chunk-7CIQQOOD.js.map} +2 -2
- package/dist/chunks/{chunk-RWKQ5SRW.js → chunk-7ZFPVOV2.js} +2 -2
- package/dist/chunks/{chunk-PUBHBEYO.js → chunk-B2FIGOPI.js} +2 -2
- package/dist/chunks/{chunk-HRDMBGMY.js → chunk-BLT66VHH.js} +331 -22
- package/dist/chunks/chunk-BLT66VHH.js.map +7 -0
- package/dist/chunks/{chunk-4WKD3YM3.js → chunk-C3UPHOJW.js} +3 -3
- package/dist/chunks/{chunk-G2DZJ5LK.js → chunk-CB72SLHB.js} +451 -134
- package/dist/chunks/chunk-CB72SLHB.js.map +7 -0
- package/dist/chunks/{chunk-B5L3X3ID.js → chunk-CCJ6PUZJ.js} +1 -1
- package/dist/chunks/{chunk-B5L3X3ID.js.map → chunk-CCJ6PUZJ.js.map} +1 -1
- package/dist/chunks/{chunk-FK73YJKV.js → chunk-DWM63MAJ.js} +21 -9
- package/dist/chunks/chunk-DWM63MAJ.js.map +7 -0
- package/dist/chunks/{chunk-56NMRVTV.js → chunk-FFJ7TV66.js} +32 -29
- package/dist/chunks/chunk-FFJ7TV66.js.map +7 -0
- package/dist/chunks/{chunk-LRSZFYUC.js → chunk-FUMALXYQ.js} +15 -15
- package/dist/chunks/chunk-FUMALXYQ.js.map +7 -0
- package/dist/chunks/{chunk-TJZYM2SP.js → chunk-G3RQ3HUK.js} +8 -3
- package/dist/chunks/{chunk-TJZYM2SP.js.map → chunk-G3RQ3HUK.js.map} +2 -2
- package/dist/chunks/{chunk-RAA3FAYZ.js → chunk-GNPTDN6K.js} +2 -2
- package/dist/chunks/{chunk-XFOSUGLU.js → chunk-JCGEW5OQ.js} +5 -5
- package/dist/chunks/{chunk-CXYJJ3HZ.js → chunk-LJ2MG6U2.js} +3 -3
- package/dist/chunks/{chunk-3MOY6WIB.js → chunk-LRBDEAKB.js} +3 -3
- package/dist/chunks/{chunk-2RWNVCFD.js → chunk-MPFBOVOD.js} +1 -1
- package/dist/chunks/{chunk-2RWNVCFD.js.map → chunk-MPFBOVOD.js.map} +1 -1
- package/dist/chunks/{chunk-NQ7IWEIF.js → chunk-MQGRQMVM.js} +2 -2
- package/dist/chunks/{chunk-3VK6UGAN.js → chunk-O5SHIUIL.js} +6 -1
- package/dist/chunks/chunk-O5SHIUIL.js.map +7 -0
- package/dist/chunks/{chunk-U6Y6TKJL.js → chunk-OK2EKY3M.js} +15 -11
- package/dist/chunks/chunk-OK2EKY3M.js.map +7 -0
- package/dist/chunks/{chunk-DGUXJSYA.js → chunk-OR44GYXD.js} +70 -3
- package/dist/chunks/chunk-OR44GYXD.js.map +7 -0
- package/dist/chunks/{chunk-DGERP4VL.js → chunk-P4TALNLX.js} +11 -10
- package/dist/chunks/chunk-P4TALNLX.js.map +7 -0
- package/dist/chunks/{chunk-4BYS4ZLY.js → chunk-PHGPOSCP.js} +267 -71
- package/dist/chunks/chunk-PHGPOSCP.js.map +7 -0
- package/dist/chunks/{chunk-3XT5WHSG.js → chunk-QAGEWWCJ.js} +260 -59
- package/dist/chunks/chunk-QAGEWWCJ.js.map +7 -0
- package/dist/chunks/{chunk-WKFRGICG.js → chunk-RBYRHS24.js} +2 -2
- package/dist/chunks/{chunk-ZHROHNEE.js → chunk-RFNYH7S7.js} +8 -8
- package/dist/chunks/{chunk-VGRUWTMG.js → chunk-RPZJVLML.js} +472 -466
- package/dist/chunks/chunk-RPZJVLML.js.map +7 -0
- package/dist/chunks/{chunk-H57KPL3V.js → chunk-S2JWFXW5.js} +2 -2
- package/dist/chunks/{chunk-LZ2ZXOCU.js → chunk-SSB2JN3I.js} +168 -5
- package/dist/chunks/chunk-SSB2JN3I.js.map +7 -0
- package/dist/chunks/{chunk-RKJPBTBB.js → chunk-SVQ7ZHEQ.js} +33 -16
- package/dist/chunks/chunk-SVQ7ZHEQ.js.map +7 -0
- package/dist/chunks/{chunk-MPMEK3IQ.js → chunk-TV5NCPPS.js} +6 -5
- package/dist/chunks/chunk-TV5NCPPS.js.map +7 -0
- package/dist/chunks/{chunk-XOBLUZMB.js → chunk-UIVMSMSQ.js} +10 -1
- package/dist/chunks/chunk-UIVMSMSQ.js.map +7 -0
- package/dist/chunks/{chunk-QGTD3LAZ.js → chunk-UYS5VZUU.js} +9 -3
- package/dist/chunks/chunk-UYS5VZUU.js.map +7 -0
- package/dist/chunks/{chunk-HRVYXRWZ.js → chunk-V5RZK45W.js} +37 -3
- package/dist/chunks/chunk-V5RZK45W.js.map +7 -0
- package/dist/chunks/{chunk-KIFOEBYJ.js → chunk-VEXCD3RA.js} +2 -2
- package/dist/chunks/{chunk-GS67KDMV.js → chunk-VN7AE3EY.js} +2 -2
- package/dist/chunks/{chunk-HFDJWLMS.js → chunk-WFGJUVTH.js} +106 -65
- package/dist/chunks/chunk-WFGJUVTH.js.map +7 -0
- package/dist/chunks/chunk-WMULZZER.js +196 -0
- package/dist/chunks/chunk-WMULZZER.js.map +7 -0
- package/dist/chunks/{chunk-QNMQJNXE.js → chunk-X4HDI7RT.js} +14 -4
- package/dist/chunks/chunk-X4HDI7RT.js.map +7 -0
- package/dist/chunks/{chunk-MX53BRAC.js → chunk-XBAOTA4U.js} +2 -2
- package/dist/chunks/{chunk-MSDL7U6Q.js → chunk-XQCNVH3Y.js} +4 -4
- package/dist/chunks/{chunk-4PBW54I2.js → chunk-YC6NV7FK.js} +88 -54
- package/dist/chunks/chunk-YC6NV7FK.js.map +7 -0
- package/dist/chunks/{chunk-6GWDGTHC.js → chunk-YLO62DWD.js} +4 -4
- package/dist/cli/decisions.js +2 -2
- package/dist/cli/mesh.js +3 -3
- package/dist/commands/fabric-handler.d.ts.map +1 -1
- package/dist/commands/fabric-handler.js +18 -4
- package/dist/commands/fabric-handler.js.map +2 -2
- package/dist/commands/fabric.d.ts.map +1 -1
- package/dist/compaction/branch-summary.d.ts.map +1 -1
- package/dist/compaction/claim-events.js +9 -9
- package/dist/compaction/hook.d.ts.map +1 -1
- package/dist/compaction/hook.js +6 -6
- package/dist/compaction/normalize.d.ts +9 -0
- package/dist/compaction/normalize.d.ts.map +1 -1
- package/dist/compaction/owner.js +7 -7
- package/dist/compaction/projections.d.ts +18 -2
- package/dist/compaction/projections.d.ts.map +1 -1
- package/dist/compaction/qa.d.ts +3 -2
- package/dist/compaction/qa.d.ts.map +1 -1
- package/dist/compaction/render.d.ts +3 -0
- package/dist/compaction/render.d.ts.map +1 -1
- package/dist/compaction/threshold.d.ts.map +1 -1
- package/dist/compaction/user-activity.d.ts +31 -0
- package/dist/compaction/user-activity.d.ts.map +1 -0
- package/dist/components/configuration.js +4 -4
- package/dist/config.d.ts +13 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-registry.d.ts +1 -1
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +10 -9
- package/dist/core/approval-controller.d.ts +3 -0
- package/dist/core/approval-controller.d.ts.map +1 -1
- package/dist/core/atomic-write.d.ts +1 -0
- package/dist/core/atomic-write.d.ts.map +1 -1
- package/dist/core/attached-monitors.d.ts +39 -0
- package/dist/core/attached-monitors.d.ts.map +1 -0
- package/dist/core/control-abort.d.ts +3 -0
- package/dist/core/control-abort.d.ts.map +1 -0
- package/dist/core/crash-guard.d.ts +15 -0
- package/dist/core/crash-guard.d.ts.map +1 -0
- package/dist/core/execution-guidelines.d.ts +6 -0
- package/dist/core/execution-guidelines.d.ts.map +1 -0
- package/dist/core/guidance-delivery.d.ts +19 -0
- package/dist/core/guidance-delivery.d.ts.map +1 -0
- package/dist/core/lifecycle-settlement.d.ts +9 -0
- package/dist/core/lifecycle-settlement.d.ts.map +1 -0
- package/dist/core/observation-actions.d.ts +9 -0
- package/dist/core/observation-actions.d.ts.map +1 -0
- package/dist/core/pasted-images.d.ts +12 -0
- package/dist/core/pasted-images.d.ts.map +1 -0
- package/dist/core/pasted-images.js +139 -0
- package/dist/core/pasted-images.js.map +7 -0
- package/dist/core/permission-queue.d.ts +32 -0
- package/dist/core/permission-queue.d.ts.map +1 -0
- package/dist/core/permission-queue.js +104 -0
- package/dist/core/permission-queue.js.map +7 -0
- package/dist/core/prompt-guidance.d.ts +1 -0
- package/dist/core/prompt-guidance.d.ts.map +1 -1
- package/dist/core/prompt-guidance.js +52 -3
- package/dist/core/prompt-guidance.js.map +3 -3
- package/dist/core/provider-operations.js +1 -1
- package/dist/core/shell-inbox.d.ts +1 -1
- package/dist/core/shell-inbox.d.ts.map +1 -1
- package/dist/core/shell-jobs.d.ts +28 -1
- package/dist/core/shell-jobs.d.ts.map +1 -1
- package/dist/core/shell-monitor.d.ts +1 -0
- package/dist/core/shell-monitor.d.ts.map +1 -1
- package/dist/durable/worker.js +0 -42
- package/dist/durable/worker.js.map +3 -3
- package/dist/durable-extension.d.ts +2 -2
- package/dist/durable-extension.d.ts.map +1 -1
- package/dist/durable-extension.js +215 -1
- package/dist/durable-extension.js.map +3 -3
- package/dist/entropy/index.d.ts +2 -0
- package/dist/entropy/index.d.ts.map +1 -1
- package/dist/entropy/index.js +23 -13
- package/dist/entropy/pool-store.d.ts +8 -1
- package/dist/entropy/pool-store.d.ts.map +1 -1
- package/dist/entropy/pool-worker.d.ts +18 -0
- package/dist/entropy/pool-worker.d.ts.map +1 -0
- package/dist/entropy/pool-writer.d.ts +23 -0
- package/dist/entropy/pool-writer.d.ts.map +1 -0
- package/dist/entropy/pool.d.ts +11 -0
- package/dist/entropy/pool.d.ts.map +1 -1
- package/dist/entropy/sessions.d.ts +5 -0
- package/dist/entropy/sessions.d.ts.map +1 -1
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/extension-bootstrap.d.ts.map +1 -1
- package/dist/extension-bootstrap.js +19 -19
- package/dist/extension.d.ts.map +1 -1
- package/dist/fabric-exec-tool.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +534 -261
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/index.js +40 -30
- package/dist/index.js.map +1 -1
- package/dist/jev/client.js +2 -2
- package/dist/jev/observation.js +7 -6
- package/dist/jev.js +12 -11
- package/dist/main-agent.d.ts.map +1 -1
- package/dist/managed-host.d.ts +4 -0
- package/dist/managed-host.d.ts.map +1 -1
- package/dist/memory/discovery.js +6 -6
- package/dist/memory/expand-service.d.ts.map +1 -1
- package/dist/memory/file-worker.js +9 -8
- package/dist/memory/file-worker.js.map +1 -1
- package/dist/memory/history-paging.d.ts +9 -0
- package/dist/memory/history-paging.d.ts.map +1 -0
- package/dist/memory/history-paging.js +164 -0
- package/dist/memory/history-paging.js.map +7 -0
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/normalize.js +5 -5
- package/dist/memory/outline-service.d.ts +7 -0
- package/dist/memory/outline-service.d.ts.map +1 -0
- package/dist/memory/request-cache.d.ts +3 -1
- package/dist/memory/request-cache.d.ts.map +1 -1
- package/dist/memory/request-context.d.ts +1 -0
- package/dist/memory/request-context.d.ts.map +1 -1
- package/dist/memory/request-limits.d.ts +2 -0
- package/dist/memory/request-limits.d.ts.map +1 -1
- package/dist/memory/search.js +7 -6
- package/dist/memory/worker-provider.d.ts.map +1 -1
- package/dist/memory/worker-provider.js +10 -9
- package/dist/memory.d.ts +16 -1
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +64 -12
- package/dist/memory.js.map +1 -1
- package/dist/mesh/store.d.ts +2 -1
- package/dist/mesh/store.d.ts.map +1 -1
- package/dist/programs/host.js +2 -2
- package/dist/protocol.d.ts +5 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -1
- package/dist/providers/agents-actions.d.ts.map +1 -1
- package/dist/providers/agents-message-router.d.ts +1 -0
- package/dist/providers/agents-message-router.d.ts.map +1 -1
- package/dist/providers/agents-provider.d.ts +2 -0
- package/dist/providers/agents-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.js +12 -11
- package/dist/providers/memory-provider.d.ts +4 -0
- package/dist/providers/memory-provider.d.ts.map +1 -1
- package/dist/providers/memory-provider.js +9 -8
- package/dist/providers/pi-read-operations.d.ts +24 -0
- package/dist/providers/pi-read-operations.d.ts.map +1 -0
- package/dist/providers/pi-tools-provider.d.ts +7 -0
- package/dist/providers/pi-tools-provider.d.ts.map +1 -1
- package/dist/providers/sessions-provider.d.ts +1 -1
- package/dist/providers/sessions-provider.d.ts.map +1 -1
- package/dist/providers/tasks-provider.d.ts +3 -1
- package/dist/providers/tasks-provider.d.ts.map +1 -1
- package/dist/residency/actor-client.js +3 -3
- package/dist/residency/client.d.ts.map +1 -1
- package/dist/residency/host.d.ts.map +1 -1
- package/dist/residency/host.js +17 -16
- package/dist/residency/launcher.js +1 -1
- package/dist/residency/pi-entry.js +17 -16
- 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/runtime/core-override-guest-types.js +2 -2
- package/dist/runtime/cpython-runtime.d.ts.map +1 -1
- package/dist/runtime/cpython-runtime.js +7 -6
- 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.d.ts.map +1 -1
- package/dist/runtime/monty-runtime.js +7 -6
- 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 +6 -6
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +4 -4
- package/dist/runtime/type-checker.d.ts.map +1 -1
- package/dist/runtime/type-checker.js +1 -1
- package/dist/runtime/typescript-kernel.js +10 -10
- package/dist/runtime-state-builtins.d.ts +2 -0
- package/dist/runtime-state-builtins.d.ts.map +1 -1
- package/dist/schema/policy.d.ts.map +1 -1
- package/dist/speculation/eligibility.d.ts.map +1 -1
- package/dist/speculation/store.d.ts.map +1 -1
- package/dist/topology/participant-directory.d.ts +1 -0
- package/dist/topology/participant-directory.d.ts.map +1 -1
- package/dist/topology/peer-presence.d.ts.map +1 -1
- package/dist/topology/provider-participants.d.ts +1 -0
- package/dist/topology/provider-participants.d.ts.map +1 -1
- package/dist/type-error-guidance.js +1 -1
- package/dist/ui/code-preview-shell.d.ts +1 -0
- package/dist/ui/code-preview-shell.d.ts.map +1 -1
- 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 +2 -2
- package/dist/ui/conversation-feedback.d.ts +8 -0
- package/dist/ui/conversation-feedback.d.ts.map +1 -0
- package/dist/ui/conversation-latest.d.ts.map +1 -1
- package/dist/ui/conversation-native-reader.d.ts.map +1 -1
- package/dist/ui/conversation-native-reader.js +3 -3
- package/dist/ui/conversation-native-reader.js.map +2 -2
- package/dist/ui/conversation-render.d.ts.map +1 -1
- package/dist/ui/conversation.d.ts +1 -0
- package/dist/ui/conversation.d.ts.map +1 -1
- package/dist/ui/conversation.js +139 -86
- package/dist/ui/conversation.js.map +4 -4
- package/dist/ui/core-tool-render.d.ts.map +1 -1
- package/dist/ui/dashboard-fabric-graph.d.ts.map +1 -1
- package/dist/ui/dashboard.js +47 -48
- package/dist/ui/dashboard.js.map +3 -3
- package/dist/ui/fabric-render.d.ts.map +1 -1
- package/dist/ui/format.d.ts.map +1 -1
- package/dist/ui/highlight.d.ts.map +1 -1
- package/dist/ui/permissions.d.ts +18 -0
- package/dist/ui/permissions.d.ts.map +1 -0
- package/dist/ui/permissions.js +178 -0
- package/dist/ui/permissions.js.map +7 -0
- package/dist/ui/row-balance.d.ts +1 -1
- package/dist/ui/row-balance.d.ts.map +1 -1
- package/dist/ui/settings-sections-execution.d.ts.map +1 -1
- package/dist/ui/settings-values.d.ts.map +1 -1
- package/dist/ui/settings.js +37 -31
- package/dist/ui/settings.js.map +2 -2
- package/dist/ui/shell-hang-keys.d.ts.map +1 -1
- package/dist/ui/shell-tasks.d.ts.map +1 -1
- package/dist/ui/shell-tasks.js +28 -11
- package/dist/ui/shell-tasks.js.map +2 -2
- package/dist/ui/structured.d.ts.map +1 -1
- package/dist/ui/tool-display.d.ts +18 -2
- package/dist/ui/tool-display.d.ts.map +1 -1
- package/dist/ui/truncate.d.ts +3 -0
- package/dist/ui/truncate.d.ts.map +1 -0
- package/dist/ui/widget.d.ts +7 -2
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/verified/context.d.ts +35 -0
- package/dist/verified/context.d.ts.map +1 -0
- package/dist/verified/execution.d.ts +7 -0
- package/dist/verified/execution.d.ts.map +1 -0
- package/dist/verified/generated/context.d.ts +6 -0
- package/dist/verified/generated/context.js +51 -0
- package/dist/verified/generated/execution.d.ts +5 -0
- package/dist/verified/generated/execution.js +32 -0
- package/dist/verified/generated/manifest.json +34 -3
- package/dist/verified/generated/prompt-guidance.d.ts +4 -0
- package/dist/verified/generated/prompt-guidance.js +17 -0
- package/dist/worker/recovery-watchdog.d.ts +7 -0
- package/dist/worker/recovery-watchdog.d.ts.map +1 -1
- package/dist/worker/recovery-watchdog.js +66 -4
- package/dist/worker/recovery-watchdog.js.map +2 -2
- package/dist/worker.js +22 -3
- package/dist/worker.js.map +2 -2
- package/docs/agents.md +37 -4
- package/docs/architecture.md +13 -0
- package/docs/background-tasks.md +81 -5
- package/docs/benchmarks/cli-resume-2026-11-09.json +1260 -0
- package/docs/benchmarks/interactivity-2026-11-09.json +2280 -0
- package/docs/benchmarks/resume-latency-2026-11-09.json +12105 -0
- package/docs/benchmarks/resume-startup-fix-2026-11-09.json +5452 -0
- package/docs/benchmarks/session-memory-2026-11-09.json +1320 -0
- package/docs/benchmarks/session-memory-fix-2026-11-09.json +280 -0
- package/docs/compaction.md +59 -23
- package/docs/configuration.md +53 -11
- package/docs/entropy.md +4 -1
- package/docs/history-paging.md +99 -0
- package/docs/interactivity-investigation.md +109 -0
- package/docs/interface.md +2 -2
- package/docs/jev.md +1 -1
- package/docs/memory-recall.md +42 -1
- package/docs/providers.md +24 -1
- package/docs/resume-latency-investigation.md +249 -0
- package/docs/session-memory-investigation.md +223 -0
- package/docs/verified-kernels.md +56 -0
- package/package.json +211 -211
- package/proofs/context.ts +139 -0
- package/proofs/execution.ts +48 -0
- package/proofs/index.ts +6 -0
- package/proofs/prompt-guidance.ts +38 -0
- package/scripts/verified-kernels.ts +1 -1
- package/skillsets/python/fabric-council/SKILL.md +31 -21
- package/skillsets/python/fabric-exec/SKILL.md +1 -1
- package/skillsets/python/fabric-exec/references/agents.md +2 -0
- package/skillsets/python/fabric-guide/SKILL.md +1 -0
- package/skillsets/python/fabric-memory/SKILL.md +82 -0
- package/skillsets/typescript/fabric-council/SKILL.md +26 -17
- package/skillsets/typescript/fabric-exec/SKILL.md +3 -2
- package/skillsets/typescript/fabric-exec/references/agents.md +1 -0
- package/skillsets/typescript/fabric-guide/SKILL.md +1 -0
- package/skillsets/typescript/fabric-memory/SKILL.md +87 -0
- package/dist/chunks/chunk-3VK6UGAN.js.map +0 -7
- package/dist/chunks/chunk-3XT5WHSG.js.map +0 -7
- package/dist/chunks/chunk-4BYS4ZLY.js.map +0 -7
- package/dist/chunks/chunk-4PBW54I2.js.map +0 -7
- package/dist/chunks/chunk-56NMRVTV.js.map +0 -7
- package/dist/chunks/chunk-7N7IC3Z2.js.map +0 -7
- package/dist/chunks/chunk-DGERP4VL.js.map +0 -7
- package/dist/chunks/chunk-DGUXJSYA.js.map +0 -7
- package/dist/chunks/chunk-F6A6MQ6G.js.map +0 -7
- package/dist/chunks/chunk-FK73YJKV.js.map +0 -7
- package/dist/chunks/chunk-G2DZJ5LK.js.map +0 -7
- package/dist/chunks/chunk-HFDJWLMS.js.map +0 -7
- package/dist/chunks/chunk-HRDMBGMY.js.map +0 -7
- package/dist/chunks/chunk-HRVYXRWZ.js.map +0 -7
- package/dist/chunks/chunk-LKYLD5SN.js.map +0 -7
- package/dist/chunks/chunk-LRSZFYUC.js.map +0 -7
- package/dist/chunks/chunk-LZ2ZXOCU.js.map +0 -7
- package/dist/chunks/chunk-MPMEK3IQ.js.map +0 -7
- package/dist/chunks/chunk-OJ4HAALD.js.map +0 -7
- package/dist/chunks/chunk-QGTD3LAZ.js.map +0 -7
- package/dist/chunks/chunk-QNMQJNXE.js.map +0 -7
- package/dist/chunks/chunk-RKJPBTBB.js.map +0 -7
- package/dist/chunks/chunk-U6Y6TKJL.js.map +0 -7
- package/dist/chunks/chunk-VGRUWTMG.js.map +0 -7
- package/dist/chunks/chunk-XOBLUZMB.js.map +0 -7
- package/dist/durable/openai-sse-patch.d.ts +0 -21
- package/dist/durable/openai-sse-patch.d.ts.map +0 -1
- /package/dist/chunks/{chunk-7YNE4NB2.js.map → chunk-2MELFQCQ.js.map} +0 -0
- /package/dist/chunks/{chunk-HSEZPCL5.js.map → chunk-2OC4YJOL.js.map} +0 -0
- /package/dist/chunks/{chunk-TXCNZCZP.js.map → chunk-2QJ4MNS6.js.map} +0 -0
- /package/dist/chunks/{chunk-QOEOKW2X.js.map → chunk-3QH6JAE3.js.map} +0 -0
- /package/dist/chunks/{chunk-L6H46CPY.js.map → chunk-6NNL5LOG.js.map} +0 -0
- /package/dist/chunks/{chunk-RWKQ5SRW.js.map → chunk-7ZFPVOV2.js.map} +0 -0
- /package/dist/chunks/{chunk-PUBHBEYO.js.map → chunk-B2FIGOPI.js.map} +0 -0
- /package/dist/chunks/{chunk-4WKD3YM3.js.map → chunk-C3UPHOJW.js.map} +0 -0
- /package/dist/chunks/{chunk-RAA3FAYZ.js.map → chunk-GNPTDN6K.js.map} +0 -0
- /package/dist/chunks/{chunk-XFOSUGLU.js.map → chunk-JCGEW5OQ.js.map} +0 -0
- /package/dist/chunks/{chunk-CXYJJ3HZ.js.map → chunk-LJ2MG6U2.js.map} +0 -0
- /package/dist/chunks/{chunk-3MOY6WIB.js.map → chunk-LRBDEAKB.js.map} +0 -0
- /package/dist/chunks/{chunk-NQ7IWEIF.js.map → chunk-MQGRQMVM.js.map} +0 -0
- /package/dist/chunks/{chunk-WKFRGICG.js.map → chunk-RBYRHS24.js.map} +0 -0
- /package/dist/chunks/{chunk-ZHROHNEE.js.map → chunk-RFNYH7S7.js.map} +0 -0
- /package/dist/chunks/{chunk-H57KPL3V.js.map → chunk-S2JWFXW5.js.map} +0 -0
- /package/dist/chunks/{chunk-KIFOEBYJ.js.map → chunk-VEXCD3RA.js.map} +0 -0
- /package/dist/chunks/{chunk-GS67KDMV.js.map → chunk-VN7AE3EY.js.map} +0 -0
- /package/dist/chunks/{chunk-MX53BRAC.js.map → chunk-XBAOTA4U.js.map} +0 -0
- /package/dist/chunks/{chunk-MSDL7U6Q.js.map → chunk-XQCNVH3Y.js.map} +0 -0
- /package/dist/chunks/{chunk-6GWDGTHC.js.map → chunk-YLO62DWD.js.map} +0 -0
package/dist/ui/conversation.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
KittyViewport,
|
|
3
|
+
isKittyImageLine
|
|
4
|
+
} from "../chunks/chunk-2Y24ML7H.js";
|
|
1
5
|
import {
|
|
2
6
|
defaultConversationTarget
|
|
3
7
|
} from "../chunks/chunk-NBIYYMKS.js";
|
|
4
8
|
import {
|
|
5
9
|
conversationFooter
|
|
6
|
-
} from "../chunks/chunk-
|
|
10
|
+
} from "../chunks/chunk-P4TALNLX.js";
|
|
7
11
|
import {
|
|
8
12
|
getConversationHost
|
|
9
13
|
} from "../chunks/chunk-UGYCAG6O.js";
|
|
10
|
-
import {
|
|
11
|
-
KittyViewport,
|
|
12
|
-
isKittyImageLine
|
|
13
|
-
} from "../chunks/chunk-2Y24ML7H.js";
|
|
14
14
|
import {
|
|
15
15
|
highlightCode
|
|
16
|
-
} from "../chunks/chunk-
|
|
16
|
+
} from "../chunks/chunk-X4HDI7RT.js";
|
|
17
|
+
import {
|
|
18
|
+
borderBadge,
|
|
19
|
+
safeText,
|
|
20
|
+
truncateStyledText
|
|
21
|
+
} from "../chunks/chunk-DWM63MAJ.js";
|
|
17
22
|
import {
|
|
18
23
|
isActiveStatus
|
|
19
24
|
} from "../chunks/chunk-37NIOSVU.js";
|
|
20
|
-
import {
|
|
21
|
-
borderBadge,
|
|
22
|
-
safeText
|
|
23
|
-
} from "../chunks/chunk-FK73YJKV.js";
|
|
24
25
|
import {
|
|
25
26
|
terminalSafe,
|
|
26
27
|
unwrapActorEnvelopeText
|
|
@@ -32,9 +33,8 @@ import {
|
|
|
32
33
|
CURSOR_MARKER,
|
|
33
34
|
getKeybindings as getKeybindings3,
|
|
34
35
|
Key as Key2,
|
|
35
|
-
Text,
|
|
36
|
+
Text as Text2,
|
|
36
37
|
matchesKey as matchesKey2,
|
|
37
|
-
truncateToWidth as truncateToWidth4,
|
|
38
38
|
visibleWidth as visibleWidth5
|
|
39
39
|
} from "@earendil-works/pi-tui";
|
|
40
40
|
|
|
@@ -105,7 +105,39 @@ var BorderStatusEditor = class extends Editor {
|
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
// src/ui/conversation-render.ts
|
|
108
|
-
import { wrapTextWithAnsi } from "@earendil-works/pi-tui";
|
|
108
|
+
import { Text, wrapTextWithAnsi } from "@earendil-works/pi-tui";
|
|
109
|
+
|
|
110
|
+
// src/ui/conversation-feedback.ts
|
|
111
|
+
import { stripVTControlCharacters } from "node:util";
|
|
112
|
+
var preview = (text, limit) => {
|
|
113
|
+
const clean = stripVTControlCharacters(text).replace(/[\u0000-\u001f\u007f-\u009f\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/g, " ").replace(/\s+/g, " ").trim();
|
|
114
|
+
return clean.length > limit ? `${clean.slice(0, limit - 1)}\u2026` : clean;
|
|
115
|
+
};
|
|
116
|
+
var formatAgentFeedback = (sender, text) => `Agent ${preview(sender, 80) || "unknown"}: ${preview(text, 240)}`;
|
|
117
|
+
var record = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
118
|
+
function conversationFeedback(message) {
|
|
119
|
+
const details = record(message.details);
|
|
120
|
+
if (message.customType === "pi-fabric-actor") {
|
|
121
|
+
const actor = record(details?.actor);
|
|
122
|
+
const feedback = record(details?.message);
|
|
123
|
+
return typeof actor?.name === "string" && typeof feedback?.text === "string" ? formatAgentFeedback(actor.name, feedback.text) : void 0;
|
|
124
|
+
}
|
|
125
|
+
if (message.customType !== "pi-fabric-agent-message") return void 0;
|
|
126
|
+
const from = record(details?.from);
|
|
127
|
+
const sender = typeof from?.name === "string" && from.name ? from.name : from?.id;
|
|
128
|
+
if (typeof sender !== "string") return void 0;
|
|
129
|
+
const content = message.content;
|
|
130
|
+
const closing = "\n</fabric-agent-message>";
|
|
131
|
+
if (!content.startsWith("<fabric-agent-message ") || !content.endsWith(closing)) return void 0;
|
|
132
|
+
const start = content.indexOf("\n") + 1;
|
|
133
|
+
if (start === 0) return void 0;
|
|
134
|
+
const data = content.indexOf("\n<data>", start);
|
|
135
|
+
const end = data < 0 ? content.length - closing.length : data;
|
|
136
|
+
const text = content.slice(start, end).replace(/&(amp|lt|gt);/g, (_entity, name) => name === "amp" ? "&" : name === "lt" ? "<" : ">");
|
|
137
|
+
return formatAgentFeedback(sender, text);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// src/ui/conversation-render.ts
|
|
109
141
|
var DEFAULT_IMAGE_WIDTH_CELLS = 60;
|
|
110
142
|
var stableKey = (value) => {
|
|
111
143
|
if (value === void 0) return "undefined";
|
|
@@ -369,7 +401,12 @@ var FabricConversationTranscriptRenderer = class {
|
|
|
369
401
|
this.renderBashExecution(message, width, options, lines);
|
|
370
402
|
return;
|
|
371
403
|
case "custom":
|
|
372
|
-
if (!message.display)
|
|
404
|
+
if (!message.display) {
|
|
405
|
+
if (message.customType !== "pi-fabric-agent-message" && message.customType !== "pi-fabric-actor") return;
|
|
406
|
+
const feedback = conversationFeedback({ ...message, content: customText(message) });
|
|
407
|
+
if (feedback !== void 0) lines.push(...new Text(this.theme.fg("dim", feedback), 1, 0).render(width));
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
373
410
|
this.pushSpacer(lines);
|
|
374
411
|
this.renderCustomMessage(message, width, options, lines);
|
|
375
412
|
return;
|
|
@@ -391,9 +428,9 @@ var FabricConversationTranscriptRenderer = class {
|
|
|
391
428
|
this.pushSpacer(lines);
|
|
392
429
|
const skillBlock = getConversationHost().parseSkillBlock(text);
|
|
393
430
|
if (skillBlock) {
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
lines.push(...safeRender(
|
|
431
|
+
const record2 = this.messageRecord(this.messageKey(message), () => new (getConversationHost()).SkillInvocationMessageComponent(skillBlock, this.markdownTheme(options)));
|
|
432
|
+
record2.component.setExpanded(options.toolsExpanded);
|
|
433
|
+
lines.push(...safeRender(record2.component, width, () => this.plainTextFallback(text, width)));
|
|
397
434
|
if (skillBlock.userMessage) {
|
|
398
435
|
this.pushSpacer(lines);
|
|
399
436
|
lines.push(...this.userComponentLines(skillBlock.userMessage, width, options));
|
|
@@ -412,13 +449,13 @@ var FabricConversationTranscriptRenderer = class {
|
|
|
412
449
|
return safeRender(component, width, () => this.plainTextFallback(text, width));
|
|
413
450
|
}
|
|
414
451
|
renderAssistantContent(message, key, streaming, width, options, lines) {
|
|
415
|
-
const
|
|
416
|
-
if (
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
452
|
+
const record2 = this.assistantRecord(key, options);
|
|
453
|
+
if (record2.message !== message || record2.streaming !== streaming) {
|
|
454
|
+
record2.component.updateContent(message, streaming);
|
|
455
|
+
record2.message = message;
|
|
456
|
+
record2.streaming = streaming;
|
|
420
457
|
}
|
|
421
|
-
lines.push(...safeRender(
|
|
458
|
+
lines.push(...safeRender(record2.component, width, () => this.plainTextFallback(assistantText(message), width)));
|
|
422
459
|
}
|
|
423
460
|
reconcileTool(id, name, callArgs, result, tool, error, options) {
|
|
424
461
|
const key = `${this.currentTargetId}\0${id}`;
|
|
@@ -428,17 +465,17 @@ var FabricConversationTranscriptRenderer = class {
|
|
|
428
465
|
const isError = result?.isError ?? tool?.isError ?? !!error;
|
|
429
466
|
const started = tool ? tool.executionStarted ?? true : false;
|
|
430
467
|
const argsComplete = !!result || !!tool?.result || !!tool?.argsComplete;
|
|
431
|
-
let
|
|
432
|
-
const images =
|
|
468
|
+
let record2 = this.toolComponents.get(key);
|
|
469
|
+
const images = record2?.result === value ? void 0 : value?.content?.filter(
|
|
433
470
|
(block) => !!block && typeof block === "object" && block.type === "image"
|
|
434
471
|
);
|
|
435
|
-
const imageKey =
|
|
436
|
-
if (
|
|
472
|
+
const imageKey = record2 && record2.result === value ? record2.imageKey : stableKey(images?.length ? images : void 0);
|
|
473
|
+
if (record2 && (record2.name !== name || record2.imageKey !== imageKey || !record2.isPartial && isPartial || record2.argsComplete && !argsComplete || record2.started && !started && !result)) {
|
|
437
474
|
this.releaseTool(key);
|
|
438
|
-
|
|
475
|
+
record2 = void 0;
|
|
439
476
|
}
|
|
440
477
|
let row = this.toolRows.get(key);
|
|
441
|
-
if (!
|
|
478
|
+
if (!record2) {
|
|
442
479
|
const token = {};
|
|
443
480
|
this.toolTokens.set(key, token);
|
|
444
481
|
const definition = this.definitionFor(name, key, token);
|
|
@@ -466,7 +503,7 @@ var FabricConversationTranscriptRenderer = class {
|
|
|
466
503
|
options.target.cwd ?? process.cwd()
|
|
467
504
|
);
|
|
468
505
|
if (options.toolsExpanded) component2.setExpanded(true);
|
|
469
|
-
|
|
506
|
+
record2 = {
|
|
470
507
|
component: component2,
|
|
471
508
|
name,
|
|
472
509
|
dynamicRenderer: !!definition?.renderCall || !!definition?.renderResult,
|
|
@@ -482,7 +519,7 @@ var FabricConversationTranscriptRenderer = class {
|
|
|
482
519
|
isError: false,
|
|
483
520
|
error: void 0
|
|
484
521
|
};
|
|
485
|
-
this.toolComponents.set(key,
|
|
522
|
+
this.toolComponents.set(key, record2);
|
|
486
523
|
row = {
|
|
487
524
|
spacer: false,
|
|
488
525
|
dynamic: !!definition?.renderCall || !!definition?.renderResult || isPartial || imageKey !== "undefined",
|
|
@@ -490,26 +527,26 @@ var FabricConversationTranscriptRenderer = class {
|
|
|
490
527
|
};
|
|
491
528
|
this.toolRows.set(key, row);
|
|
492
529
|
}
|
|
493
|
-
const { component } =
|
|
530
|
+
const { component } = record2;
|
|
494
531
|
let changed = false;
|
|
495
|
-
if (
|
|
532
|
+
if (record2.args !== args) {
|
|
496
533
|
component.updateArgs(args);
|
|
497
534
|
changed = true;
|
|
498
|
-
|
|
499
|
-
|
|
535
|
+
record2.args = args;
|
|
536
|
+
record2.argsKey = String(Number(record2.argsKey) + 1);
|
|
500
537
|
}
|
|
501
|
-
if (started && !
|
|
502
|
-
|
|
538
|
+
if (started && !record2.started) {
|
|
539
|
+
record2.started = true;
|
|
503
540
|
component.markExecutionStarted();
|
|
504
541
|
changed = true;
|
|
505
542
|
}
|
|
506
|
-
if (argsComplete && !
|
|
507
|
-
|
|
543
|
+
if (argsComplete && !record2.argsComplete) {
|
|
544
|
+
record2.argsComplete = true;
|
|
508
545
|
component.setArgsComplete();
|
|
509
546
|
changed = true;
|
|
510
547
|
}
|
|
511
|
-
if (
|
|
512
|
-
const resultKey = String(Number(
|
|
548
|
+
if (record2.result !== value || record2.isPartial !== isPartial || record2.isError !== isError || record2.error !== error) {
|
|
549
|
+
const resultKey = String(Number(record2.resultKey ?? 0) + 1);
|
|
513
550
|
if (value !== void 0 || error !== void 0) {
|
|
514
551
|
component.updateResult({
|
|
515
552
|
content: error && !value ? [{ type: "text", text: error }] : value?.content ?? [],
|
|
@@ -518,14 +555,14 @@ var FabricConversationTranscriptRenderer = class {
|
|
|
518
555
|
}, isPartial);
|
|
519
556
|
changed = true;
|
|
520
557
|
}
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
}
|
|
528
|
-
row.dynamic =
|
|
558
|
+
record2.result = value;
|
|
559
|
+
record2.resultKey = resultKey;
|
|
560
|
+
record2.partialKey = isPartial ? resultKey : void 0;
|
|
561
|
+
record2.isPartial = isPartial;
|
|
562
|
+
record2.isError = isError;
|
|
563
|
+
record2.error = error;
|
|
564
|
+
}
|
|
565
|
+
row.dynamic = record2.dynamicRenderer || isPartial || imageKey !== "undefined";
|
|
529
566
|
if (changed) row.lines = void 0;
|
|
530
567
|
return row;
|
|
531
568
|
}
|
|
@@ -537,30 +574,30 @@ var FabricConversationTranscriptRenderer = class {
|
|
|
537
574
|
}
|
|
538
575
|
renderBashExecution(message, width, options, lines) {
|
|
539
576
|
const key = this.messageKey(message);
|
|
540
|
-
const
|
|
577
|
+
const record2 = this.messageRecord(key, () => {
|
|
541
578
|
const component = new (getConversationHost()).BashExecutionComponent(message.command, this.tui, message.excludeFromContext);
|
|
542
579
|
component.appendOutput(terminalSafe(message.output ?? "", false));
|
|
543
580
|
const truncation = message.truncated ? { truncated: true } : void 0;
|
|
544
581
|
component.setComplete(message.exitCode, message.cancelled, truncation, message.fullOutputPath);
|
|
545
582
|
return component;
|
|
546
583
|
});
|
|
547
|
-
|
|
548
|
-
lines.push(...safeRender(
|
|
584
|
+
record2.component.setExpanded(options.toolsExpanded);
|
|
585
|
+
lines.push(...safeRender(record2.component, width, () => this.plainTextFallback(message.command, width)));
|
|
549
586
|
}
|
|
550
587
|
renderCustomMessage(message, width, options, lines) {
|
|
551
|
-
const
|
|
588
|
+
const record2 = this.messageRecord(this.messageKey(message), () => new (getConversationHost()).CustomMessageComponent(
|
|
552
589
|
message,
|
|
553
590
|
this.rendererOptions.getMessageRenderer?.(message.customType),
|
|
554
591
|
this.markdownTheme(options),
|
|
555
592
|
options.outputPad ?? 1
|
|
556
593
|
));
|
|
557
|
-
|
|
558
|
-
lines.push(...safeRender(
|
|
594
|
+
record2.component.setExpanded(options.toolsExpanded);
|
|
595
|
+
lines.push(...safeRender(record2.component, width, () => this.plainTextFallback(customText(message), width)));
|
|
559
596
|
}
|
|
560
597
|
renderBoxedMessage(key, message, create, width, options, lines) {
|
|
561
|
-
const
|
|
562
|
-
|
|
563
|
-
lines.push(...safeRender(
|
|
598
|
+
const record2 = this.messageRecord(key, () => new create(message, this.markdownTheme(options)));
|
|
599
|
+
record2.component.setExpanded(options.toolsExpanded);
|
|
600
|
+
lines.push(...safeRender(record2.component, width, () => this.plainTextFallback(message.summary, width)));
|
|
564
601
|
}
|
|
565
602
|
/**
|
|
566
603
|
* Registered definition with wrapped renderer callbacks: the render context
|
|
@@ -596,9 +633,9 @@ var FabricConversationTranscriptRenderer = class {
|
|
|
596
633
|
assistantRecord(key, options) {
|
|
597
634
|
const cacheKey = key;
|
|
598
635
|
const hideThinking = options.hideThinking ?? false;
|
|
599
|
-
let
|
|
600
|
-
if (!
|
|
601
|
-
|
|
636
|
+
let record2 = this.assistantComponents.get(cacheKey);
|
|
637
|
+
if (!record2 || record2.hideThinking !== hideThinking) {
|
|
638
|
+
record2 = {
|
|
602
639
|
hideThinking,
|
|
603
640
|
component: new (getConversationHost()).AssistantMessageComponent(
|
|
604
641
|
void 0,
|
|
@@ -609,18 +646,18 @@ var FabricConversationTranscriptRenderer = class {
|
|
|
609
646
|
this.rendererOptions.markdownTransformers
|
|
610
647
|
)
|
|
611
648
|
};
|
|
612
|
-
this.assistantComponents.set(cacheKey,
|
|
649
|
+
this.assistantComponents.set(cacheKey, record2);
|
|
613
650
|
}
|
|
614
|
-
return
|
|
651
|
+
return record2;
|
|
615
652
|
}
|
|
616
653
|
messageRecord(key, create) {
|
|
617
654
|
const cacheKey = key;
|
|
618
|
-
let
|
|
619
|
-
if (!
|
|
620
|
-
|
|
621
|
-
this.messageComponents.set(cacheKey,
|
|
655
|
+
let record2 = this.messageComponents.get(cacheKey);
|
|
656
|
+
if (!record2) {
|
|
657
|
+
record2 = { component: create() };
|
|
658
|
+
this.messageComponents.set(cacheKey, record2);
|
|
622
659
|
}
|
|
623
|
-
return
|
|
660
|
+
return record2;
|
|
624
661
|
}
|
|
625
662
|
releaseRendererStates(key) {
|
|
626
663
|
for (const state of this.rendererStates.get(key) ?? []) {
|
|
@@ -900,7 +937,7 @@ function activeBackground(prefix) {
|
|
|
900
937
|
}
|
|
901
938
|
|
|
902
939
|
// src/ui/conversation-latest.ts
|
|
903
|
-
import { compositeTuiLine as compositeTuiLine2, getKeybindings,
|
|
940
|
+
import { compositeTuiLine as compositeTuiLine2, getKeybindings, visibleWidth as visibleWidth4 } from "@earendil-works/pi-tui";
|
|
904
941
|
var ConversationLatest = class {
|
|
905
942
|
rect;
|
|
906
943
|
clear() {
|
|
@@ -919,12 +956,12 @@ var ConversationLatest = class {
|
|
|
919
956
|
const display = process.platform === "darwin" && part.toLowerCase() === "alt" ? "option" : part;
|
|
920
957
|
return display.charAt(0).toUpperCase() + display.slice(1);
|
|
921
958
|
}).join("+")).join("/");
|
|
922
|
-
const label =
|
|
959
|
+
const label = truncateStyledText(theme.bg("selectedBg", theme.fg(
|
|
923
960
|
"text",
|
|
924
961
|
` \u2193 Jump to latest message${shortcut ? ` \xB7 ${shortcut}` : ""} `
|
|
925
962
|
)), width, "");
|
|
926
963
|
const column = Math.floor((width - visibleWidth4(label)) / 2);
|
|
927
|
-
const text =
|
|
964
|
+
const text = truncateStyledText(label, Math.max(0, width - (scrollbarVisible ? 1 : 0) - column), "");
|
|
928
965
|
const textWidth = visibleWidth4(text);
|
|
929
966
|
if (textWidth === 0) return;
|
|
930
967
|
lines[row] = compositeTuiLine2(lines[row] ?? "", text, column, textWidth, width);
|
|
@@ -996,8 +1033,7 @@ import { createHash } from "node:crypto";
|
|
|
996
1033
|
import {
|
|
997
1034
|
Key,
|
|
998
1035
|
getKeybindings as getKeybindings2,
|
|
999
|
-
matchesKey
|
|
1000
|
-
truncateToWidth as truncateToWidth3
|
|
1036
|
+
matchesKey
|
|
1001
1037
|
} from "@earendil-works/pi-tui";
|
|
1002
1038
|
var QUEUE_STEER_CONVERSATION_QUEUE_REQUEST_EVENT = "queue-steer:conversation-queue:request:v1";
|
|
1003
1039
|
var DEQUEUE_FALLBACK = "alt+up";
|
|
@@ -1460,10 +1496,10 @@ function createConversationQueue(options) {
|
|
|
1460
1496
|
theme
|
|
1461
1497
|
);
|
|
1462
1498
|
const lines2 = widget.render(width);
|
|
1463
|
-
if (dispatched.length > 0) lines2.push(theme.fg("dim",
|
|
1499
|
+
if (dispatched.length > 0) lines2.push(theme.fg("dim", truncateStyledText("Sent rows await child delivery; they cannot be edited locally.", width, "")));
|
|
1464
1500
|
return lines2;
|
|
1465
1501
|
}
|
|
1466
|
-
const lines = [
|
|
1502
|
+
const lines = [];
|
|
1467
1503
|
const innerWidth = Math.max(0, width - 2);
|
|
1468
1504
|
const dequeueHint = (options.keybindings ?? getKeybindings2()).getKeys("app.message.dequeue").join("/") || DEQUEUE_FALLBACK;
|
|
1469
1505
|
for (const row of rows) {
|
|
@@ -1472,11 +1508,11 @@ function createConversationQueue(options) {
|
|
|
1472
1508
|
const note = row.removed ? " \xB7 removed on save" : row.paused ? " \xB7 paused" : "";
|
|
1473
1509
|
const color = row.state === "dispatched" ? "dim" : bridge ? bridge.laneColor(row.lane) : "dim";
|
|
1474
1510
|
lines.push(
|
|
1475
|
-
` ${theme.fg(color,
|
|
1511
|
+
` ${theme.fg(color, truncateStyledText(`${marker}${label}: ${row.text.replace(/\n/g, " ")}${note}`, innerWidth, "\u2026"))} `
|
|
1476
1512
|
);
|
|
1477
1513
|
}
|
|
1478
1514
|
const hint = queue.length > 0 ? `\u21B3 ${dequeueHint} to edit queued messages` : "\u21B3 Waiting for child delivery";
|
|
1479
|
-
lines.push(` ${theme.fg("dim",
|
|
1515
|
+
lines.push(` ${theme.fg("dim", truncateStyledText(hint, innerWidth, "\u2026"))} `);
|
|
1480
1516
|
return lines;
|
|
1481
1517
|
},
|
|
1482
1518
|
handleInput(data) {
|
|
@@ -1871,6 +1907,7 @@ var FabricConversationView = class {
|
|
|
1871
1907
|
list;
|
|
1872
1908
|
listFocused = false;
|
|
1873
1909
|
listTop = 0;
|
|
1910
|
+
rawMousePress;
|
|
1874
1911
|
currentId;
|
|
1875
1912
|
feedback;
|
|
1876
1913
|
commandNotification;
|
|
@@ -2038,8 +2075,8 @@ var FabricConversationView = class {
|
|
|
2038
2075
|
const button = Number(mouse[1]);
|
|
2039
2076
|
const wheel = (button & 64) !== 0;
|
|
2040
2077
|
const release = mouse[4] === "m" || !wheel && (button & 3) === 3 && !(button & 32);
|
|
2041
|
-
|
|
2042
|
-
type: wheel ? "wheel" : release ? "release" : button & 32 ? "drag" : "press",
|
|
2078
|
+
const event = {
|
|
2079
|
+
type: wheel ? "wheel" : release ? "release" : button & 32 ? (button & 3) === 3 ? "move" : "drag" : "press",
|
|
2043
2080
|
button: wheel ? "none" : (button & 3) === 0 ? "left" : (button & 3) === 1 ? "middle" : (button & 3) === 2 ? "right" : "none",
|
|
2044
2081
|
...wheel ? { wheelDelta: (button & 1) === 0 ? -3 : 3 } : {},
|
|
2045
2082
|
x: Number(mouse[2]) - 1,
|
|
@@ -2051,9 +2088,17 @@ var FabricConversationView = class {
|
|
|
2051
2088
|
shift: !!(button & 4),
|
|
2052
2089
|
alt: !!(button & 8),
|
|
2053
2090
|
ctrl: !!(button & 16)
|
|
2054
|
-
}
|
|
2091
|
+
};
|
|
2092
|
+
const pressed = this.rawMousePress;
|
|
2093
|
+
if (event.type === "press") this.rawMousePress = { x: event.x, y: event.y, button: event.button };
|
|
2094
|
+
else if (event.type !== "move") this.rawMousePress = void 0;
|
|
2095
|
+
this.handleMouse(event);
|
|
2096
|
+
if (event.type === "release" && pressed?.button === "left" && (event.button === "left" || event.button === "none") && pressed.x === event.x && pressed.y === event.y) {
|
|
2097
|
+
this.handleMouse({ ...event, type: "click", button: "left" });
|
|
2098
|
+
}
|
|
2055
2099
|
return;
|
|
2056
2100
|
}
|
|
2101
|
+
this.rawMousePress = void 0;
|
|
2057
2102
|
if (this.listFocused && this.list) {
|
|
2058
2103
|
this.list.handleInput(data);
|
|
2059
2104
|
this.tui.requestRender();
|
|
@@ -2176,6 +2221,10 @@ var FabricConversationView = class {
|
|
|
2176
2221
|
head.push(feedback);
|
|
2177
2222
|
remaining--;
|
|
2178
2223
|
}
|
|
2224
|
+
const editorGap = editorShowsTopBorder && remaining > 1 ? [""] : [];
|
|
2225
|
+
remaining -= editorGap.length;
|
|
2226
|
+
const queueGap = queueLines.length > 0 && queueLines.length + 2 <= remaining ? [""] : [];
|
|
2227
|
+
remaining -= queueGap.length;
|
|
2179
2228
|
const queueBudget = Math.max(0, remaining - 1);
|
|
2180
2229
|
if (queueLines.length > queueBudget) {
|
|
2181
2230
|
const cursor = queueLines.findIndex((line) => line.includes(CURSOR_MARKER));
|
|
@@ -2229,7 +2278,7 @@ var FabricConversationView = class {
|
|
|
2229
2278
|
this.theme
|
|
2230
2279
|
);
|
|
2231
2280
|
} else this.scrollbar.reset();
|
|
2232
|
-
return [...head, ...body.slice(0, remaining), ...queueLines, ...editorLines, ...footer, ...list].slice(0, rows).map((line) => isKittyImageLine(line) || visibleWidth5(line) <= width ? line :
|
|
2281
|
+
return [...head, ...body.slice(0, remaining), ...queueGap, ...queueLines, ...editorGap, ...editorLines, ...footer, ...list].slice(0, rows).map((line) => isKittyImageLine(line) || visibleWidth5(line) <= width ? line : truncateStyledText(line, width, ""));
|
|
2233
2282
|
}
|
|
2234
2283
|
/** Observe files without rendering native history; true means a visible change
|
|
2235
2284
|
* or a live animation still needs the normal TUI render path. */
|
|
@@ -2237,6 +2286,10 @@ var FabricConversationView = class {
|
|
|
2237
2286
|
if (this.disposed) return false;
|
|
2238
2287
|
this.updateTargets();
|
|
2239
2288
|
const changed = this.observe();
|
|
2289
|
+
if (this.currentId && this.state.view(this.currentId).following && this.observedTranscript?.hasMore && !this.observedTranscript.hasNewer && this.lastBody.length > 0 && this.lastBody.length < this.lastBodyBudget && this.options.loadOlder(this.currentId)) {
|
|
2290
|
+
this.observe();
|
|
2291
|
+
return true;
|
|
2292
|
+
}
|
|
2240
2293
|
return changed || this.selectedTargetIsWorking();
|
|
2241
2294
|
}
|
|
2242
2295
|
observe() {
|
|
@@ -2558,13 +2611,13 @@ var FabricConversationView = class {
|
|
|
2558
2611
|
this.feedback = void 0;
|
|
2559
2612
|
const text = safeText(message).slice(0, 4096);
|
|
2560
2613
|
this.commandNotification = {
|
|
2561
|
-
component: new
|
|
2614
|
+
component: new Text2(
|
|
2562
2615
|
this.theme.fg(kind === "error" ? "error" : "dim", kind === "error" ? `Error: ${text}` : text),
|
|
2563
2616
|
kind === "error" ? this.options.appearance?.outputPad ?? 1 : 1,
|
|
2564
2617
|
0
|
|
2565
2618
|
),
|
|
2566
2619
|
epoch: this.state.epoch,
|
|
2567
|
-
...options.reserve !== void 0 ? { pendingResult: new
|
|
2620
|
+
...options.reserve !== void 0 ? { pendingResult: new Text2(this.theme.fg("dim", safeText(options.reserve).slice(0, 4096)), 1, 0) } : {}
|
|
2568
2621
|
};
|
|
2569
2622
|
if (options.reveal !== false) {
|
|
2570
2623
|
const entry = this.state.view(this.currentId);
|
|
@@ -2834,14 +2887,14 @@ var FabricConversationView = class {
|
|
|
2834
2887
|
const access = target?.readOnlyReason ? " \xB7 read-only" : "";
|
|
2835
2888
|
const name = target ? isMainTarget(target) ? "Main" : safeText(target.name) || safeText(target.id) : "Fabric";
|
|
2836
2889
|
const suffix = visibleWidth5(access) + 1 <= labelWidth ? access : "";
|
|
2837
|
-
const label =
|
|
2890
|
+
const label = truncateStyledText(name, Math.max(0, labelWidth - visibleWidth5(suffix)), "\u2026") + suffix;
|
|
2838
2891
|
return borderBadge(this.editor?.borderColor("\u2500") ?? "", label);
|
|
2839
2892
|
}
|
|
2840
2893
|
currentFeedbackLine(width) {
|
|
2841
2894
|
if (!this.feedback) return void 0;
|
|
2842
2895
|
if (Date.now() - this.feedback.at > FEEDBACK_TTL_MS) return void 0;
|
|
2843
2896
|
const color = this.feedback.kind === "error" ? "error" : "accent";
|
|
2844
|
-
return
|
|
2897
|
+
return truncateStyledText(this.theme.fg(color, this.feedback.text), width, "");
|
|
2845
2898
|
}
|
|
2846
2899
|
renderEditorLines(innerWidth) {
|
|
2847
2900
|
const editor = this.editor;
|
|
@@ -2905,7 +2958,7 @@ var FabricConversationView = class {
|
|
|
2905
2958
|
while (tail.length < reserved) tail.push("");
|
|
2906
2959
|
}
|
|
2907
2960
|
if (!editorVisible && !this.observedTranscript?.hasNewer) tail.push(...this.working?.render(width) ?? []);
|
|
2908
|
-
if (budget > 1) tail.push("");
|
|
2961
|
+
if (budget > 1 && (!editorVisible || this.observedTranscript?.hasNewer)) tail.push("");
|
|
2909
2962
|
return tail;
|
|
2910
2963
|
}
|
|
2911
2964
|
windowBody(body, budget, tail) {
|