@wrongstack/core 0.313.1 → 0.316.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/dist/chronicle/index.js +31 -31
- package/dist/chronicle/legacy-journal-import.d.ts +0 -6
- package/dist/chronicle/metrics-ingest.d.ts +14 -0
- package/dist/chronicle/metrics-schema.d.ts +10 -1
- package/dist/chronicle/metrics-store.d.ts +20 -2
- package/dist/chronicle/project-server.js +39 -31
- package/dist/chronicle/sink.d.ts +13 -0
- package/dist/chronicle/sqlite-journal.d.ts +20 -2
- package/dist/{chunk-WOEZV3Q4.js → chunk-25LSLC3G.js} +2 -1
- package/dist/{chunk-AI4LLQ2U.js → chunk-27QIURLN.js} +229 -12
- package/dist/{chunk-I45KAW2N.js → chunk-3AGWVSS7.js} +38 -450
- package/dist/chunk-3BDV7RL3.js +211 -0
- package/dist/{chunk-NFAYHPRH.js → chunk-3ECENVHL.js} +10 -8
- package/dist/{chunk-FW5LDDMJ.js → chunk-45WI72ZB.js} +1576 -1156
- package/dist/{chunk-AT4V4XGI.js → chunk-4BMVPOHO.js} +539 -313
- package/dist/{chunk-YBUJCZ57.js → chunk-4I7HGVVA.js} +17 -5
- package/dist/{chunk-JVGPR3TS.js → chunk-4LCZVJVF.js} +7 -55
- package/dist/{chunk-4ZHTKJHM.js → chunk-4SJNS7OB.js} +36 -2
- package/dist/{chunk-AD7ZFZCS.js → chunk-5BMIE7QG.js} +3 -3
- package/dist/{chunk-IQ35HMQL.js → chunk-5YPSXQXM.js} +71 -24
- package/dist/chunk-6FHWXLPT.js +10 -0
- package/dist/{chunk-FIV4IJL7.js → chunk-6H5GEOET.js} +163 -20
- package/dist/{chunk-VB3H5WWB.js → chunk-6NWEVFEL.js} +2 -2
- package/dist/{chunk-E6I5RXVK.js → chunk-AYW5YINX.js} +2 -2
- package/dist/{chunk-DEIQMBD2.js → chunk-B7F4WVP4.js} +2 -2
- package/dist/{chunk-XQ2XGIBF.js → chunk-BPBKKBUK.js} +6 -7
- package/dist/{chunk-K4YUNKU7.js → chunk-BYD345OX.js} +2 -2
- package/dist/{chunk-LZDDLNCZ.js → chunk-C27KDLOX.js} +4 -4
- package/dist/{chunk-6AKOTGLM.js → chunk-CU546ESW.js} +7 -7
- package/dist/{chunk-ZZ4V3WIZ.js → chunk-DLHHXUAM.js} +10 -1
- package/dist/{chunk-BAKVJLEV.js → chunk-DOTHQSJ2.js} +28 -16
- package/dist/{chunk-KBZGE6LN.js → chunk-DYLPMV4Q.js} +4 -3
- package/dist/{chunk-52RTVH4M.js → chunk-F3JWNST7.js} +2 -2
- package/dist/{chunk-WEBMSQP2.js → chunk-FC2ZGRF3.js} +21 -4
- package/dist/{chunk-FHAMQS7Q.js → chunk-FCBTO76Z.js} +76 -146
- package/dist/{chunk-4LJJYBAU.js → chunk-FHZVFYSL.js} +9 -1
- package/dist/{chunk-W4A6QA3D.js → chunk-FWNLEZYG.js} +4 -3
- package/dist/{chunk-OJZEX73F.js → chunk-GDQ7CZRQ.js} +5 -1
- package/dist/{chunk-QVOVMXJR.js → chunk-GJJGJB2R.js} +32 -9
- package/dist/{chunk-4XV6IR37.js → chunk-HI3JGZR2.js} +7 -6
- package/dist/{chunk-FSWCWSTS.js → chunk-HMLIGAU7.js} +26 -26
- package/dist/{chunk-PFXFQQRT.js → chunk-HXKZ7OBQ.js} +7 -43
- package/dist/{chunk-2FQL4PDC.js → chunk-I7DALG7J.js} +5 -5
- package/dist/{chunk-GM54GJBU.js → chunk-IRUTEHCE.js} +3 -3
- package/dist/{chunk-TYW2GI5I.js → chunk-J2WRWR37.js} +40 -13
- package/dist/{chunk-ZEHUCJHY.js → chunk-JFPJ6LLQ.js} +2 -2
- package/dist/chunk-JMULFFLN.js +9 -0
- package/dist/{chunk-RD6DEE36.js → chunk-JO4MGB6Z.js} +94 -8
- package/dist/{chunk-5DSMEVA4.js → chunk-K6BXGITA.js} +7 -7
- package/dist/{chunk-O74MJHXU.js → chunk-KZMSZV32.js} +2 -2
- package/dist/{chunk-GFJOMSHG.js → chunk-LA7CLDRW.js} +6 -2
- package/dist/{chunk-M2WF6AXG.js → chunk-LSMMOS2Z.js} +7 -3
- package/dist/{chunk-ASX6AW36.js → chunk-LXWCMQNJ.js} +3 -3
- package/dist/{chunk-WZO23AWO.js → chunk-M27LIEKV.js} +72 -22
- package/dist/{chunk-JTHKOYWU.js → chunk-MJPHJRAL.js} +15 -15
- package/dist/{chunk-G5AAKEEZ.js → chunk-MTL4O5YR.js} +5 -5
- package/dist/chunk-NHJ75HXY.js +1 -0
- package/dist/{chunk-ZYU2YOJ6.js → chunk-NIOAGFPB.js} +29 -15
- package/dist/{chunk-Y2GE5TSI.js → chunk-NS52ISWS.js} +2 -2
- package/dist/{chunk-UIWONWVG.js → chunk-NSOFPKGT.js} +541 -148
- package/dist/{chunk-RCQYT2I4.js → chunk-NVIZG63R.js} +2 -2
- package/dist/{chunk-EPC3GZD4.js → chunk-OOYZPOXM.js} +2 -2
- package/dist/{chunk-7ZHZE5EO.js → chunk-OSGLYW5J.js} +2 -2
- package/dist/{chunk-CE4ZOCOI.js → chunk-PFCMSSUF.js} +9 -9
- package/dist/{chunk-GFXZTHNI.js → chunk-PGRVXIMY.js} +5 -5
- package/dist/{chunk-JJPMWPB6.js → chunk-PISBFBJN.js} +6 -6
- package/dist/chunk-POOOIWE5.js +9 -0
- package/dist/{chunk-5RP3QTRL.js → chunk-PQNS3U7Z.js} +20 -3
- package/dist/{chunk-3E244UDA.js → chunk-QSTSJOCK.js} +52 -6
- package/dist/{chunk-YUPMXOGP.js → chunk-RFQMOKWK.js} +3 -3
- package/dist/chunk-RTOTNK3P.js +484 -0
- package/dist/{chunk-SN2DQRL6.js → chunk-RXKSDUAU.js} +7 -7
- package/dist/{chunk-T3KGZBU5.js → chunk-S45JPKQN.js} +189 -43
- package/dist/{chunk-YNCVSFGF.js → chunk-SAFHACFA.js} +4 -1
- package/dist/{chunk-KI4L2DUL.js → chunk-TCCHINEF.js} +114 -19
- package/dist/{chunk-AWNQ6ED6.js → chunk-THEGTRAG.js} +7 -2
- package/dist/{chunk-2KKODIQU.js → chunk-TR4LQE7L.js} +15 -15
- package/dist/{chunk-GPQ3NJPR.js → chunk-TWJMGXCI.js} +3 -3
- package/dist/{chunk-H72H4XDU.js → chunk-U45AXT5D.js} +9 -9
- package/dist/{chunk-62V2AFVG.js → chunk-U4FWBSO3.js} +160 -73
- package/dist/{chunk-A455ATZB.js → chunk-UBGDX6FI.js} +8 -1
- package/dist/chunk-UJILKYES.js +75 -0
- package/dist/{chunk-KSJ5UTP7.js → chunk-ULMAQV3T.js} +84 -4
- package/dist/{chunk-CB2HFKTP.js → chunk-VVBP6KGT.js} +1 -1
- package/dist/{chunk-RPOA7IAE.js → chunk-W5VITDM2.js} +43 -25
- package/dist/{chunk-QRTG4XTI.js → chunk-WAHQVNWT.js} +7 -1
- package/dist/{chunk-SQP64RCS.js → chunk-WGGYRBXH.js} +3019 -2976
- package/dist/{chunk-K3G6JBUC.js → chunk-WLYKU45P.js} +679 -141
- package/dist/chunk-WP7BVANJ.js +53 -0
- package/dist/{chunk-GAZEWQEZ.js → chunk-XF4VUMKW.js} +2 -2
- package/dist/{chunk-PAAWLLZX.js → chunk-Y5YXDM7D.js} +2 -2
- package/dist/{chunk-65RDIOR2.js → chunk-YOPAUVU4.js} +162 -44
- package/dist/{chunk-FFSX2QDQ.js → chunk-YPT4A46F.js} +3 -3
- package/dist/chunk-YWXT3JNM.js +425 -0
- package/dist/{chunk-EFEHDQGY.js → chunk-ZHZ2Y2DH.js} +64 -10
- package/dist/{chunk-CQQL4ZOQ.js → chunk-ZT7JNIGX.js} +4 -3
- package/dist/coordination/agent-monitor.d.ts +9 -1
- package/dist/coordination/agent-subagent-runner.d.ts +1 -1
- package/dist/coordination/agents/agent-prompts.d.ts +8 -0
- package/dist/coordination/agents/index.d.ts +33 -1
- package/dist/coordination/agents/index.js +52 -22
- package/dist/coordination/agents/phase3-wave1-platform.d.ts +1 -3
- package/dist/coordination/agents/phase3-wave2-meta.d.ts +1 -3
- package/dist/coordination/agents/phase8-wave3-products.d.ts +1 -3
- package/dist/coordination/agents/phase9-wave4-platform-meta.d.ts +1 -3
- package/dist/coordination/agents/project-agent-identity.d.ts +11 -11
- package/dist/coordination/agents/types.d.ts +13 -2
- package/dist/coordination/brain-monitor.d.ts +30 -7
- package/dist/coordination/collab-debug.d.ts +1 -1
- package/dist/coordination/collab-pause.d.ts +1 -1
- package/dist/coordination/delegate-tool.d.ts +7 -5
- package/dist/coordination/director-kanban-queue-helpers.d.ts +1 -0
- package/dist/coordination/director-options.d.ts +7 -0
- package/dist/coordination/director-spawn-model.d.ts +17 -0
- package/dist/coordination/director-tools.d.ts +2 -2
- package/dist/coordination/director.d.ts +12 -0
- package/dist/coordination/dispatcher.d.ts +8 -0
- package/dist/coordination/fleet-bus.d.ts +35 -4
- package/dist/coordination/fleet-supervisor.d.ts +10 -2
- package/dist/coordination/fleet.d.ts +16 -7
- package/dist/coordination/index.d.ts +4 -0
- package/dist/coordination/index.js +86 -49
- package/dist/coordination/kanban-dispatch-port.d.ts +2 -2
- package/dist/coordination/mailbox-http-router.d.ts +4 -3
- package/dist/coordination/mailbox-http-validation.d.ts +1 -1
- package/dist/coordination/mailbox-project-server.js +15 -15
- package/dist/coordination/mailbox-types.d.ts +24 -6
- package/dist/coordination/model-tier-leader.d.ts +122 -0
- package/dist/coordination/model-tier.d.ts +122 -0
- package/dist/coordination/multi-agent-coordinator.d.ts +24 -0
- package/dist/coordination/origin-session.d.ts +16 -0
- package/dist/coordination/provider-status-tracker.d.ts +37 -5
- package/dist/coordination/session-note-hub.d.ts +44 -0
- package/dist/coordination/session-note-tool.d.ts +10 -0
- package/dist/core/agent.d.ts +1 -1
- package/dist/core/context.d.ts +22 -3
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +130 -38
- package/dist/core/request-conversation-binding.d.ts +37 -0
- package/dist/core/session-notes.d.ts +25 -0
- package/dist/core/system-prompt-builder.d.ts +11 -2
- package/dist/core/system-prompt-variants.d.ts +78 -0
- package/dist/design/index.js +3 -3
- package/dist/execution/auto-compaction-middleware.d.ts +11 -0
- package/dist/execution/autonomy-brain.d.ts +2 -1
- package/dist/execution/autonomy-prompt-contributor.d.ts +7 -2
- package/dist/execution/compaction-core.d.ts +4 -4
- package/dist/execution/eternal-autonomy.d.ts +1 -1
- package/dist/execution/index.js +138 -129
- package/dist/execution/model-runtime.d.ts +0 -7
- package/dist/execution/parallel-eternal-engine.d.ts +7 -7
- package/dist/extension/index.js +3 -3
- package/dist/goal/index.js +6 -6
- package/dist/hooks/index.js +3 -3
- package/dist/hq/index.js +14 -12
- package/dist/hq/persistence/event-log.d.ts +0 -1
- package/dist/hq/persistence.d.ts +4 -4
- package/dist/hq/publisher.d.ts +2 -0
- package/dist/index.d.ts +14 -11
- package/dist/index.js +728 -635
- package/dist/infrastructure/index.d.ts +4 -4
- package/dist/infrastructure/index.js +281 -260
- package/dist/infrastructure/token-counter.d.ts +9 -0
- package/dist/kernel/events/agent-events.d.ts +77 -3
- package/dist/kernel/events/brain-events.d.ts +12 -0
- package/dist/kernel/events/provider-events.d.ts +7 -1
- package/dist/kernel/events/session-events.d.ts +14 -0
- package/dist/kernel/events/tool-events.d.ts +13 -0
- package/dist/kernel/index.js +4 -4
- package/dist/mailbox-attach.d.ts +1 -1
- package/dist/models/index.js +10 -9
- package/dist/observability/event-bridge.d.ts +25 -5
- package/dist/observability/index.d.ts +9 -8
- package/dist/observability/index.js +459 -351
- package/dist/observability/tool-usage-source.d.ts +65 -0
- package/dist/plugin/index.d.ts +5 -0
- package/dist/plugin/index.js +66 -50
- package/dist/plugins/auto-review-plugin.d.ts +3 -2
- package/dist/plugins/review-finding-commands.d.ts +0 -8
- package/dist/{review-finding-store-DKAV3AS6.js → plugins/review-finding-store.js} +7 -6
- package/dist/plugins/review-finding-types.js +19 -0
- package/dist/plugins/review-report-integration.js +21 -0
- package/dist/{review-report-store-OWY3EC3N.js → plugins/review-report-store.js} +7 -6
- package/dist/plugins/review-report-types.js +13 -0
- package/dist/prompts/index.js +5 -5
- package/dist/registry/index.js +3 -3
- package/dist/registry/tool-registry.d.ts +59 -9
- package/dist/{registry-R23UBE7H.js → registry-7N4O3E7W.js} +5 -5
- package/dist/security/capabilities.d.ts +6 -0
- package/dist/security/file-permissions.d.ts +1 -1
- package/dist/security/index.js +47 -33
- package/dist/security/permission-policy.d.ts +12 -1
- package/dist/security/secret-scrubber.d.ts +15 -0
- package/dist/session-catalog/index.d.ts +1 -0
- package/dist/session-catalog/index.js +19 -14
- package/dist/session-catalog/project-server.js +30 -13
- package/dist/session-catalog/protocol.d.ts +32 -1
- package/dist/session-catalog/registry.d.ts +17 -1
- package/dist/session-catalog/session-agents.d.ts +56 -0
- package/dist/session-catalog/store-rebuild.d.ts +14 -0
- package/dist/session-catalog/store-schema.d.ts +26 -0
- package/dist/session-catalog/store.d.ts +27 -1
- package/dist/session-note-attach.d.ts +9 -0
- package/dist/skills/index.js +5 -5
- package/dist/statusline/index.d.ts +43 -0
- package/dist/statusline/index.js +102 -0
- package/dist/storage/board-store-port.d.ts +2 -2
- package/dist/storage/config-loader/in-project-policy.d.ts +29 -0
- package/dist/storage/config-loader.d.ts +3 -2
- package/dist/storage/file-session-writer.d.ts +4 -2
- package/dist/storage/goal-coordination.d.ts +6 -1
- package/dist/storage/goal-kanban.d.ts +4 -1
- package/dist/storage/index.d.ts +12 -4
- package/dist/storage/index.js +76 -61
- package/dist/storage/input-history-store.d.ts +2 -4
- package/dist/storage/memory-curator.d.ts +133 -0
- package/dist/storage/session-agent-attribution.d.ts +39 -0
- package/dist/storage/session-doctor.d.ts +109 -0
- package/dist/storage/session-event-bridge.d.ts +5 -7
- package/dist/storage/session-outcome.d.ts +42 -0
- package/dist/storage/session-recovery.d.ts +55 -0
- package/dist/storage/session-store/load-session-data.d.ts +11 -0
- package/dist/storage/session-store/prune-helpers.d.ts +1 -1
- package/dist/storage/session-store/resume-session.d.ts +0 -2
- package/dist/storage/session-store/types.d.ts +8 -0
- package/dist/storage/session-store.d.ts +3 -3
- package/dist/storage/session-summary-tracker.d.ts +8 -1
- package/dist/storage/session-write-buffer.d.ts +18 -0
- package/dist/storage/session-writer-truncate.d.ts +2 -0
- package/dist/tasking/index.js +2 -2
- package/dist/tools/fallback-manage-tools.d.ts +6 -4
- package/dist/tools/index.js +21 -21
- package/dist/tools/model-tier-set-tool.d.ts +66 -0
- package/dist/types/agent-bridge.d.ts +2 -1
- package/dist/types/config/mcp-features.d.ts +7 -0
- package/dist/types/config/model-tiers.d.ts +148 -0
- package/dist/types/config/root.d.ts +9 -0
- package/dist/types/config/tools.d.ts +73 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/context.d.ts +2 -0
- package/dist/types/default-config.d.ts +6 -0
- package/dist/types/errors.d.ts +2 -1
- package/dist/types/index.d.ts +11 -9
- package/dist/types/index.js +25 -15
- package/dist/types/multi-agent.d.ts +43 -0
- package/dist/types/plugin.d.ts +1 -1
- package/dist/types/provider.d.ts +15 -0
- package/dist/types/runtime-capability-manifest.d.ts +1 -1
- package/dist/types/secret-scrubber.d.ts +15 -0
- package/dist/types/session-markers.d.ts +37 -10
- package/dist/types/session-markers.js +1 -1
- package/dist/types/session-timeline.d.ts +197 -0
- package/dist/types/session-timeline.js +12 -0
- package/dist/types/session.d.ts +172 -11
- package/dist/types/system-prompt.d.ts +27 -0
- package/dist/utils/config-backup.d.ts +9 -1
- package/dist/utils/heap-watchdog.js +2 -2
- package/dist/utils/index.js +50 -48
- package/dist/utils/message-invariants.d.ts +4 -1
- package/dist/utils/regex-guard.d.ts +1 -1
- package/dist/utils/socket-path.d.ts +1 -1
- package/dist/utils/token-estimate.d.ts +6 -2
- package/dist/utils/wstack-paths.d.ts +2 -0
- package/dist/wiring/proxy-rewrite.d.ts +28 -0
- package/dist/wiring/proxy-rewrite.js +7 -1
- package/dist/worktree/index.js +2 -2
- package/instructions/agents/explore-companion.md +45 -18
- package/instructions/agents/memory-curator.md +34 -22
- package/instructions/coordination/director-preamble.md +12 -7
- package/instructions/coordination/subagent-baseline.md +26 -5
- package/instructions/leader-after-task.md +4 -1
- package/instructions/llm/chimera-review.md +30 -9
- package/instructions/llm/memory-curator.md +31 -0
- package/instructions/sections/tool/delegation-compact.md +2 -0
- package/instructions/sections/tool/delegation-full.md +5 -1
- package/instructions/sections/tool/mailbox-compact.md +5 -1
- package/instructions/sections/tool/mailbox-full.md +3 -0
- package/instructions/sections/tool/session-note-compact.md +3 -0
- package/instructions/sections/tool/session-note-full.md +15 -0
- package/instructions/system-lite.md +9 -4
- package/instructions/system-pro.md +66 -143
- package/instructions/system.md +73 -175
- package/package.json +32 -4
- package/dist/chunk-2BUUIMQB.js +0 -225
- package/dist/chunk-FAYRX2AD.js +0 -13
- package/dist/chunk-H5E77KUJ.js +0 -15
- package/dist/chunk-M7BS2K6U.js +0 -1
- package/dist/coordination/agents.d.ts +0 -8
- package/dist/coordination/transport.d.ts +0 -2
- package/dist/storage/session-writer/session-writer-summary-tracker.d.ts +0 -28
package/dist/tools/index.js
CHANGED
|
@@ -20,37 +20,37 @@ import {
|
|
|
20
20
|
createOneShotLLMTool,
|
|
21
21
|
createPluginManagerTool,
|
|
22
22
|
validateProviderBaseUrl
|
|
23
|
-
} from "../chunk-
|
|
24
|
-
import "../chunk-
|
|
23
|
+
} from "../chunk-6H5GEOET.js";
|
|
24
|
+
import "../chunk-JFPJ6LLQ.js";
|
|
25
25
|
import "../chunk-FXQLIX3K.js";
|
|
26
26
|
import "../chunk-3XPVB7BA.js";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-RTOTNK3P.js";
|
|
28
|
+
import "../chunk-PFCMSSUF.js";
|
|
29
|
+
import "../chunk-FCBTO76Z.js";
|
|
30
|
+
import "../chunk-YPT4A46F.js";
|
|
31
|
+
import "../chunk-B7F4WVP4.js";
|
|
32
|
+
import "../chunk-5S437PRC.js";
|
|
33
|
+
import "../chunk-U45AXT5D.js";
|
|
34
|
+
import "../chunk-4SJNS7OB.js";
|
|
35
|
+
import "../chunk-Y5YXDM7D.js";
|
|
33
36
|
import "../chunk-HA4ZYA6T.js";
|
|
34
|
-
import "../chunk-A455ATZB.js";
|
|
35
37
|
import "../chunk-WQQON3SV.js";
|
|
36
38
|
import "../chunk-2YU4WVBW.js";
|
|
37
|
-
import "../chunk-
|
|
39
|
+
import "../chunk-QSTSJOCK.js";
|
|
40
|
+
import "../chunk-UBGDX6FI.js";
|
|
41
|
+
import "../chunk-ZHZ2Y2DH.js";
|
|
42
|
+
import "../chunk-HMLIGAU7.js";
|
|
43
|
+
import "../chunk-OSGLYW5J.js";
|
|
44
|
+
import "../chunk-THEGTRAG.js";
|
|
45
|
+
import "../chunk-SAFHACFA.js";
|
|
38
46
|
import "../chunk-RJIZEJ42.js";
|
|
39
47
|
import "../chunk-XBDP4QPW.js";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-FFSX2QDQ.js";
|
|
42
|
-
import "../chunk-DEIQMBD2.js";
|
|
43
|
-
import "../chunk-5S437PRC.js";
|
|
44
|
-
import "../chunk-EFEHDQGY.js";
|
|
45
|
-
import "../chunk-AWNQ6ED6.js";
|
|
46
|
-
import "../chunk-FSWCWSTS.js";
|
|
47
|
-
import "../chunk-7ZHZE5EO.js";
|
|
48
|
-
import "../chunk-YNCVSFGF.js";
|
|
48
|
+
import "../chunk-3ECENVHL.js";
|
|
49
49
|
import "../chunk-B4AMLZPB.js";
|
|
50
|
+
import "../chunk-PFZO3C6H.js";
|
|
50
51
|
import "../chunk-O37BQ65S.js";
|
|
51
|
-
import "../chunk-
|
|
52
|
+
import "../chunk-25LSLC3G.js";
|
|
52
53
|
import "../chunk-TBRL2RCC.js";
|
|
53
|
-
import "../chunk-PFZO3C6H.js";
|
|
54
54
|
export {
|
|
55
55
|
AGENT_MODEL_ASSIGN_TOOL_NAME,
|
|
56
56
|
COUNCIL_TOOL_NAME,
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `leader_tier_set` — the leader's own view of, and handle on, the model-tier
|
|
3
|
+
* layer.
|
|
4
|
+
*
|
|
5
|
+
* This is the surface behind "this model is too expensive for what I'm doing,
|
|
6
|
+
* drop me to the cheap tier". Every request runs through
|
|
7
|
+
* {@link evaluateLeaderTierSwitch}, so the leader cannot outrun the user's
|
|
8
|
+
* guard rails: it may not switch more often than `dwellTurns`, may not
|
|
9
|
+
* downgrade into a context window it no longer fits, may not climb past
|
|
10
|
+
* `maxTier`, and may not take a downgrade whose saving does not cover the
|
|
11
|
+
* prompt-cache re-warm it causes.
|
|
12
|
+
*
|
|
13
|
+
* Authority is the user's, via `modelTiers.leader.mode`:
|
|
14
|
+
* 'off' — the action is refused outright.
|
|
15
|
+
* 'propose' — DEFAULT. The tool returns the verdict and emits a proposal for
|
|
16
|
+
* a human to accept; the model is NOT changed.
|
|
17
|
+
* 'auto' — the tool applies the switch through the same
|
|
18
|
+
* `switchProviderAndModel` path `leader_model_set` uses, so the
|
|
19
|
+
* live provider instance, context caps and auto-compaction
|
|
20
|
+
* denominator all follow.
|
|
21
|
+
*/
|
|
22
|
+
import type { TierModelEconomics } from '../coordination/model-tier-leader.js';
|
|
23
|
+
import type { Tool } from '../types/tool.js';
|
|
24
|
+
import type { FallbackManageToolOptions } from './fallback-manage-tool-options.js';
|
|
25
|
+
export declare const LEADER_TIER_SET_TOOL_NAME = "leader_tier_set";
|
|
26
|
+
/** Proposal payload handed to the host when the policy says "ask a human". */
|
|
27
|
+
export interface LeaderTierProposal {
|
|
28
|
+
fromTier: string | undefined;
|
|
29
|
+
toTier: string;
|
|
30
|
+
target: {
|
|
31
|
+
provider: string;
|
|
32
|
+
model: string;
|
|
33
|
+
};
|
|
34
|
+
reason: string;
|
|
35
|
+
projectedSavingsUsd: number;
|
|
36
|
+
reWarmCostUsd: number;
|
|
37
|
+
}
|
|
38
|
+
export interface ModelTierSetToolOptions extends FallbackManageToolOptions {
|
|
39
|
+
/** Tier the leader is currently running at, when the host tracks one. */
|
|
40
|
+
getCurrentTier?: (() => string | undefined) | undefined;
|
|
41
|
+
/** Current conversation size in tokens — the quantity a switch re-reads. */
|
|
42
|
+
getContextTokens?: (() => number | undefined) | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Turns since the last tier switch. Hosts that do not track this should
|
|
45
|
+
* return a large number so the dwell guard does not block the first switch.
|
|
46
|
+
*/
|
|
47
|
+
getTurnsSinceTierSwitch?: (() => number | undefined) | undefined;
|
|
48
|
+
/** Published per-1M-token prices and window for a provider/model pair. */
|
|
49
|
+
getModelEconomics?: ((providerId: string, modelId: string) => Promise<TierModelEconomics | undefined>) | undefined;
|
|
50
|
+
/** Record that the leader is now on `tier` (resets the dwell counter). */
|
|
51
|
+
onTierSwitched?: ((tier: string) => void) | undefined;
|
|
52
|
+
/** Surface a proposal to the user. Called only in 'propose' mode. */
|
|
53
|
+
onTierProposed?: ((proposal: LeaderTierProposal) => void | Promise<void>) | undefined;
|
|
54
|
+
}
|
|
55
|
+
interface Input {
|
|
56
|
+
action: 'show' | 'set';
|
|
57
|
+
tier?: string | undefined;
|
|
58
|
+
reason?: string | undefined;
|
|
59
|
+
}
|
|
60
|
+
interface Output {
|
|
61
|
+
status: 'ok' | 'error' | 'proposed';
|
|
62
|
+
message: string;
|
|
63
|
+
}
|
|
64
|
+
export declare function createModelTierSetTool(opts: ModelTierSetToolOptions): Tool<Input, Output>;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=model-tier-set-tool.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type BridgeMessageType = 'task' | 'result' | 'progress' | 'error' | 'heartbeat' | 'stop' | 'delegate' | 'budget_threshold';
|
|
2
2
|
export interface BudgetThresholdPayload {
|
|
3
3
|
kind: 'iterations' | 'tool_calls' | 'tokens' | 'cost';
|
|
4
4
|
used: number;
|
|
@@ -39,4 +39,5 @@ export interface BridgeTransport {
|
|
|
39
39
|
subscribe(agentId: string, handler: (msg: BridgeMessage) => void | Promise<void>): () => void;
|
|
40
40
|
close(agentId: string): Promise<void>;
|
|
41
41
|
}
|
|
42
|
+
export {};
|
|
42
43
|
//# sourceMappingURL=agent-bridge.d.ts.map
|
|
@@ -135,6 +135,13 @@ export interface FeaturesConfig {
|
|
|
135
135
|
* Enabled by default when `memory` is on; set to false to opt out.
|
|
136
136
|
*/
|
|
137
137
|
memoryConsolidation?: boolean | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* Automatically audit and curate existing candidate memories after completed runs.
|
|
140
|
+
* Resolves contradictions, merges redundancies, splits multi-fact entries,
|
|
141
|
+
* and updates importance/confidence based on files modified in the session.
|
|
142
|
+
* Enabled by default when `memory` is on; set to false to opt out.
|
|
143
|
+
*/
|
|
144
|
+
memoryCurator?: boolean | undefined;
|
|
138
145
|
/** Fetch the models.dev catalog at startup. When false, the provider
|
|
139
146
|
* must declare its `family` explicitly in `providers[<id>]`. */
|
|
140
147
|
modelsRegistry: boolean;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model tier configuration — the deterministic "how expensive should this job
|
|
3
|
+
* be?" layer.
|
|
4
|
+
*
|
|
5
|
+
* A tier is deliberately NOT a new model-selection engine. It is a thin,
|
|
6
|
+
* named composite over primitives that already exist:
|
|
7
|
+
*
|
|
8
|
+
* tier = fallbackProfile (which models, in what order)
|
|
9
|
+
* + budget (maxCostUsd / maxIterations / maxToolCalls / timeout)
|
|
10
|
+
* + modelRuntime (reasoning effort, cache ttl, generation params)
|
|
11
|
+
*
|
|
12
|
+
* `FallbackProfileManager` already turns a profile name into a health-filtered
|
|
13
|
+
* `provider/model` chain, and `resolveModelTargetFromEntry` already treats
|
|
14
|
+
* `chain[0]` as the primary and the rest as the failover list. The tier layer
|
|
15
|
+
* only adds a *name* for "budget vs standard vs premium" and a deterministic
|
|
16
|
+
* map from task shape → that name, so callers (the leader, the Kanban
|
|
17
|
+
* dispatcher, the spawn path) can say "run this cheaply" without knowing any
|
|
18
|
+
* model id.
|
|
19
|
+
*
|
|
20
|
+
* The tier vocabulary intentionally reuses `ModelProfile.costTier`
|
|
21
|
+
* ('budget' | 'standard' | 'premium') from `models/model-intelligence.ts` so
|
|
22
|
+
* the codebase has ONE set of words for model expense, not two.
|
|
23
|
+
*/
|
|
24
|
+
import type { ModelRuntimeConfig } from './runtime.js';
|
|
25
|
+
/**
|
|
26
|
+
* Built-in tier ids. Matches `ModelProfile.costTier` exactly. Users may define
|
|
27
|
+
* additional named levels; these three are the ones the built-in routing
|
|
28
|
+
* defaults and the UI surfaces know by name.
|
|
29
|
+
*/
|
|
30
|
+
export declare const BUILTIN_MODEL_TIER_IDS: readonly ['budget', 'standard', 'premium'];
|
|
31
|
+
export type BuiltinModelTierId = (typeof BUILTIN_MODEL_TIER_IDS)[number];
|
|
32
|
+
/** A tier id — one of the built-ins, or any user-defined level name. */
|
|
33
|
+
export type ModelTierId = BuiltinModelTierId | (string & {});
|
|
34
|
+
/**
|
|
35
|
+
* One configured level. Every field is optional so a level can be as thin as
|
|
36
|
+
* `{ fallbackProfile: 'cheap' }` — unset budget fields fall through to the
|
|
37
|
+
* role/roster defaults rather than clamping them.
|
|
38
|
+
*/
|
|
39
|
+
export interface ModelTierLevel {
|
|
40
|
+
/**
|
|
41
|
+
* Named chain from {@link Config.fallbackProfiles}. `chain[0]` becomes the
|
|
42
|
+
* primary model for anything routed to this tier; the remainder becomes the
|
|
43
|
+
* failover chain. This is the field that actually picks the model.
|
|
44
|
+
*/
|
|
45
|
+
fallbackProfile?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Explicit provider override. Normally left unset — the profile's first
|
|
48
|
+
* entry already carries a provider. Set only to pin a tier to one provider
|
|
49
|
+
* while letting the profile choose the model.
|
|
50
|
+
*/
|
|
51
|
+
provider?: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Explicit model override. When set, this wins over the profile's primary
|
|
54
|
+
* and the profile is used for failover only. Mirrors `ModelMatrixEntry`.
|
|
55
|
+
*/
|
|
56
|
+
model?: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Per-tier runtime overrides — the natural home for "budget tier thinks
|
|
59
|
+
* less, premium tier thinks harder". Applied to subagents matched by this
|
|
60
|
+
* tier, and to the leader when a leader tier switch is applied.
|
|
61
|
+
*/
|
|
62
|
+
modelRuntime?: ModelRuntimeConfig | undefined;
|
|
63
|
+
/** Max estimated USD spend for a subagent spawned at this tier. */
|
|
64
|
+
maxCostUsd?: number | undefined;
|
|
65
|
+
/** Max LLM iterations for a subagent spawned at this tier. */
|
|
66
|
+
maxIterations?: number | undefined;
|
|
67
|
+
/** Max tool invocations for a subagent spawned at this tier. */
|
|
68
|
+
maxToolCalls?: number | undefined;
|
|
69
|
+
/** Max total (input + output) tokens for a subagent spawned at this tier. */
|
|
70
|
+
maxTokens?: number | undefined;
|
|
71
|
+
/** Wall-clock budget in ms for a subagent spawned at this tier. */
|
|
72
|
+
timeoutMs?: number | undefined;
|
|
73
|
+
/** Human-facing note shown in the TUI/WebUI tier editors. */
|
|
74
|
+
description?: string | undefined;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* How the leader is allowed to change its OWN tier mid-session.
|
|
78
|
+
*
|
|
79
|
+
* - 'off' — the leader never changes its own tier. Tiers still route
|
|
80
|
+
* subagent spawns and Kanban dispatch.
|
|
81
|
+
* - 'propose' — the leader emits `model.tier_proposed`; a human accepts or
|
|
82
|
+
* rejects in the TUI/WebUI. Default.
|
|
83
|
+
* - 'auto' — the leader applies the switch itself once every guard below
|
|
84
|
+
* passes, and only emits a notification.
|
|
85
|
+
*
|
|
86
|
+
* DEFAULT IS 'propose', and that matters: the autonomy invariant is that the
|
|
87
|
+
* system never widens its own authority. 'auto' is a thing the USER turns on.
|
|
88
|
+
*/
|
|
89
|
+
export type ModelTierLeaderMode = 'off' | 'propose' | 'auto';
|
|
90
|
+
/**
|
|
91
|
+
* Guard rails for leader self-switching. These exist because a tier switch is
|
|
92
|
+
* NOT free: it invalidates the provider prompt cache, and a downgrade can move
|
|
93
|
+
* the session onto a model with a smaller context window.
|
|
94
|
+
*/
|
|
95
|
+
export interface ModelTierLeaderConfig {
|
|
96
|
+
/** Authority level for leader self-switching. Default 'propose'. */
|
|
97
|
+
mode?: ModelTierLeaderMode | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Minimum turns the leader must dwell on a tier before another switch is
|
|
100
|
+
* eligible. Hysteresis: without it, a request that oscillates around a
|
|
101
|
+
* routing threshold busts the prompt cache on every single turn. Mirrors the
|
|
102
|
+
* proven `stickyFallbackTurns` guard in the fallback extension. Default 6.
|
|
103
|
+
*/
|
|
104
|
+
dwellTurns?: number | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Minimum projected USD saving, over the dwell window, required to justify a
|
|
107
|
+
* downgrade. The projection is compared against the cost of re-warming the
|
|
108
|
+
* prompt cache on the target model. A switch that does not pay for itself is
|
|
109
|
+
* refused. Default 0.10.
|
|
110
|
+
*/
|
|
111
|
+
minSavingsUsd?: number | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Refuse a switch when current context occupancy exceeds this fraction of
|
|
114
|
+
* the TARGET model's context window. Prevents a downgrade from stranding the
|
|
115
|
+
* session over the smaller model's limit. Default 0.8.
|
|
116
|
+
*/
|
|
117
|
+
maxContextFillForSwitch?: number | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* Ceiling the leader may never exceed on its own. When set, an upgrade
|
|
120
|
+
* proposal above this tier is refused even in 'auto' mode — the user keeps
|
|
121
|
+
* the authority to spend at the top tier.
|
|
122
|
+
*/
|
|
123
|
+
maxTier?: ModelTierId | undefined;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Deterministic routing table: which tier a piece of work runs at.
|
|
127
|
+
*
|
|
128
|
+
* Keys are matched by the same precedence the model matrix already uses —
|
|
129
|
+
* exact roster role, then the role's phase, then the `*` default — so the two
|
|
130
|
+
* tables read the same way and a reader only has to learn one rule.
|
|
131
|
+
*/
|
|
132
|
+
export type ModelTierRouting = Record<string, ModelTierId>;
|
|
133
|
+
export interface ModelTiersConfig {
|
|
134
|
+
/**
|
|
135
|
+
* Master switch. OFF by default: tier resolution changes which model serves
|
|
136
|
+
* a spawn, so it is opt-in exactly like `model-router`.
|
|
137
|
+
*/
|
|
138
|
+
enabled?: boolean | undefined;
|
|
139
|
+
/** Tier used when nothing in {@link routing} matches. Default 'standard'. */
|
|
140
|
+
default?: ModelTierId | undefined;
|
|
141
|
+
/** The configured levels, keyed by tier id. */
|
|
142
|
+
levels?: Record<string, ModelTierLevel> | undefined;
|
|
143
|
+
/** role / phase / `*` → tier id. */
|
|
144
|
+
routing?: ModelTierRouting | undefined;
|
|
145
|
+
/** Leader self-switching authority and guard rails. */
|
|
146
|
+
leader?: ModelTierLeaderConfig | undefined;
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=model-tiers.d.ts.map
|
|
@@ -2,6 +2,7 @@ import type { ConfiguredHook, HookEvent } from '../hooks.js';
|
|
|
2
2
|
import type { AutonomyConfig, ChronicleConfig, IndexingConfig, LaunchConfig, SessionLoggingConfig, SyncConfig } from './autonomy.js';
|
|
3
3
|
import type { AdaptiveConcurrencyConfig, CircuitBreakerRuntimeConfig, ContextConfig } from './context.js';
|
|
4
4
|
import type { FeaturesConfig, LogConfig, MCPServerConfig, PluginConfig, PluginManagerConfig, SageConfig } from './mcp-features.js';
|
|
5
|
+
import type { ModelTiersConfig } from './model-tiers.js';
|
|
5
6
|
import type { CustomModelDefinition, ModelMatrixEntry, ProviderConfig } from './providers.js';
|
|
6
7
|
import type { CloudSyncConfig, HqClientConfig, ModelRuntimeConfig, SystemPromptConfig } from './runtime.js';
|
|
7
8
|
import type { BrainConfig, FleetConfig, SkillsConfig } from './skills-fleet-brain.js';
|
|
@@ -240,6 +241,14 @@ export interface Config {
|
|
|
240
241
|
* single request-pipeline middleware, gated by the active model's
|
|
241
242
|
* capabilities. See `ModelRuntimeConfig`.
|
|
242
243
|
*/
|
|
244
|
+
/**
|
|
245
|
+
* Deterministic model-tier layer: named levels (budget / standard /
|
|
246
|
+
* premium) that bind a fallback profile, a budget, and runtime overrides
|
|
247
|
+
* under one name, plus a role/phase routing table. Used by the subagent
|
|
248
|
+
* spawn path, `delegate`/`spawn_subagent`, Kanban dispatch, and the
|
|
249
|
+
* leader's own self-switch policy. Opt-in via `modelTiers.enabled`.
|
|
250
|
+
*/
|
|
251
|
+
modelTiers?: ModelTiersConfig | undefined;
|
|
243
252
|
modelRuntime?: ModelRuntimeConfig | undefined;
|
|
244
253
|
/** System identity prompt selection, used by CLI/REPL/TUI/WebUI consistently. */
|
|
245
254
|
systemPrompt?: SystemPromptConfig | undefined;
|
|
@@ -26,6 +26,30 @@ export interface ToolsConfig {
|
|
|
26
26
|
* `/tool enable-all`.
|
|
27
27
|
*/
|
|
28
28
|
disabledTools?: string[] | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Per-tool audit-trail metadata for `disabledTools`. Parallel to
|
|
31
|
+
* `disabledTools` (which is `string[]` for backward compatibility) so a
|
|
32
|
+
* `user` disable and an `auto-thinned` disable can be distinguished on
|
|
33
|
+
* the next boot. Missing entries default to `user`.
|
|
34
|
+
*
|
|
35
|
+
* Owners of this config should not hand-write this object — the
|
|
36
|
+
* `/tool autothin apply` and `undo` commands are the source of truth.
|
|
37
|
+
*/
|
|
38
|
+
disabledToolMeta?: Record<string, DisabledToolMeta> | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Stats-driven tool auto-thinning. Off by default. When enabled, the
|
|
41
|
+
* host either applies candidates on every boot (`applyOnBoot: true`) or
|
|
42
|
+
* surfaces them only via `/tool autothin candidates` (the default).
|
|
43
|
+
*
|
|
44
|
+
* The candidate set comes from the Chronicle `tool_daily` rollup when
|
|
45
|
+
* available, and falls back to the in-process event-bridge Map. The
|
|
46
|
+
* default window is 30 days, default threshold is 3 invocations.
|
|
47
|
+
*
|
|
48
|
+
* SECURITY: this is operator-owned; the in-project policy denies the
|
|
49
|
+
* whole `tools.autoThin` subtree (same posture as `tools.exec.allow`)
|
|
50
|
+
* so a repo-committed config cannot disable a tool the operator wants.
|
|
51
|
+
*/
|
|
52
|
+
autoThin?: AutoThinConfig | undefined;
|
|
29
53
|
/**
|
|
30
54
|
* When true (default), the agent automatically extends its iteration
|
|
31
55
|
* limit by 100 when hit. Set to false to require user confirmation.
|
|
@@ -312,4 +336,53 @@ export type ToolDescriptionModeConfig = Record<string, ToolDescriptionMode | und
|
|
|
312
336
|
*/
|
|
313
337
|
export type ToolResultRenderMode = 'extend' | 'simple';
|
|
314
338
|
export type ToolResultRenderModeConfig = Record<string, ToolResultRenderMode | undefined>;
|
|
339
|
+
/** Per-tool audit-trail entry for `ToolsConfig.disabledToolMeta`. */
|
|
340
|
+
export interface DisabledToolMeta {
|
|
341
|
+
/** `user` for a manual `/tool disable`, `auto-thinned` for the stats pipeline. */
|
|
342
|
+
reason: 'user' | 'auto-thinned';
|
|
343
|
+
/** Epoch ms when the disable was recorded. */
|
|
344
|
+
at: number;
|
|
345
|
+
/** Free-form caller label, e.g. `'boot-time auto-thin'`, `'manual apply'`. */
|
|
346
|
+
caller?: string;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Stats-driven tool auto-thinning (`tools.autoThin`).
|
|
350
|
+
*
|
|
351
|
+
* The pipeline runs `underusedTools()` against the Chronicle rollup (or the
|
|
352
|
+
* in-process event-bridge Map when Chronicle is unavailable), filters with
|
|
353
|
+
* the policy in {@link filterUnderused}, and disables the survivors via
|
|
354
|
+
* `ToolRegistry.thinUnderused()`. The decision is recorded in
|
|
355
|
+
* `disabledToolMeta` so it survives restarts; `/tool autothin undo` re-enables
|
|
356
|
+
* the auto-thinned subset.
|
|
357
|
+
*/
|
|
358
|
+
export interface AutoThinConfig {
|
|
359
|
+
/**
|
|
360
|
+
* Master switch. When false, no auto-thinning runs and `/tool autothin
|
|
361
|
+
* candidates` is a no-op. Default: false.
|
|
362
|
+
*/
|
|
363
|
+
enabled?: boolean | undefined;
|
|
364
|
+
/**
|
|
365
|
+
* Window in calendar days. Tools not invoked in this window AND with
|
|
366
|
+
* `invocations <= minInvocations` in the window are candidates. Default: 30.
|
|
367
|
+
*/
|
|
368
|
+
idleDays?: number | undefined;
|
|
369
|
+
/**
|
|
370
|
+
* Upper bound on invocations within the window. Default: 3.
|
|
371
|
+
*/
|
|
372
|
+
minInvocations?: number | undefined;
|
|
373
|
+
/**
|
|
374
|
+
* Optional allow-list of tool names the auto-thinning pipeline must
|
|
375
|
+
* NEVER disable, regardless of stats. Use this for tools the user
|
|
376
|
+
* expects to be available even if Chronicle shows zero invocations
|
|
377
|
+
* (e.g. an emergency `bash` escape hatch).
|
|
378
|
+
*/
|
|
379
|
+
neverAutoThin?: string[] | undefined;
|
|
380
|
+
/**
|
|
381
|
+
* When true, the host runs the auto-thinning pipeline on every boot.
|
|
382
|
+
* When false, the user must run `/tool autothin apply` explicitly. The
|
|
383
|
+
* dry-run command `/tool autothin candidates` is always available
|
|
384
|
+
* regardless of this flag. Default: false.
|
|
385
|
+
*/
|
|
386
|
+
applyOnBoot?: boolean | undefined;
|
|
387
|
+
}
|
|
315
388
|
//# sourceMappingURL=tools.d.ts.map
|
package/dist/types/config.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './config/runtime.js';
|
|
|
3
3
|
export * from './config/context.js';
|
|
4
4
|
export * from './config/tools.js';
|
|
5
5
|
export * from './config/providers.js';
|
|
6
|
+
export * from './config/model-tiers.js';
|
|
6
7
|
export * from './config/mcp-features.js';
|
|
7
8
|
export * from './config/autonomy.js';
|
|
8
9
|
export * from './config/skills-fleet-brain.js';
|
package/dist/types/context.d.ts
CHANGED
|
@@ -156,9 +156,11 @@ export interface AgentContext extends RunEnv {
|
|
|
156
156
|
event: SessionEvent;
|
|
157
157
|
bytes: number;
|
|
158
158
|
writer: SessionWriter;
|
|
159
|
+
attempts?: number;
|
|
159
160
|
}>;
|
|
160
161
|
_conversationJournalBytes: number;
|
|
161
162
|
_conversationJournalDrain: Promise<void> | null;
|
|
163
|
+
_conversationJournalLastError: Error | null;
|
|
162
164
|
/** Wait until every exact conversation event queued so far is in the writer buffer. */
|
|
163
165
|
flushConversationJournal(): Promise<void>;
|
|
164
166
|
conversationJournalBytes(event: SessionEvent): number;
|
|
@@ -22,6 +22,12 @@ export declare const DEFAULT_TOOLS_CONFIG: Readonly<{
|
|
|
22
22
|
windowSize: number;
|
|
23
23
|
callRepeatThreshold: number;
|
|
24
24
|
}>;
|
|
25
|
+
autoThin: Readonly<{
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
idleDays: number;
|
|
28
|
+
minInvocations: number;
|
|
29
|
+
applyOnBoot: boolean;
|
|
30
|
+
}>;
|
|
25
31
|
}>;
|
|
26
32
|
/** Default context config — mirrors CONFIG_BEHAVIOR_DEFAULTS.context. */
|
|
27
33
|
export declare const DEFAULT_CONTEXT_CONFIG: Readonly<{
|
package/dist/types/errors.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export declare const ERROR_CODES: {
|
|
|
44
44
|
readonly SESSION_NOT_FOUND: 'SESSION_NOT_FOUND';
|
|
45
45
|
readonly SESSION_CORRUPTED: 'SESSION_CORRUPTED';
|
|
46
46
|
readonly SESSION_WRITE_FAILED: 'SESSION_WRITE_FAILED';
|
|
47
|
+
readonly SESSION_ID_REQUIRED: 'SESSION_ID_REQUIRED';
|
|
47
48
|
readonly CONTAINER_TOKEN_ALREADY_BOUND: 'CONTAINER_TOKEN_ALREADY_BOUND';
|
|
48
49
|
readonly CONTAINER_TOKEN_NOT_BOUND: 'CONTAINER_TOKEN_NOT_BOUND';
|
|
49
50
|
readonly CONTAINER_CIRCULAR_DEPENDENCY: 'CONTAINER_CIRCULAR_DEPENDENCY';
|
|
@@ -175,7 +176,7 @@ export declare class SessionError extends WrongStackError {
|
|
|
175
176
|
readonly sessionId?: string | undefined;
|
|
176
177
|
constructor(opts: {
|
|
177
178
|
message: string;
|
|
178
|
-
code: Extract<ErrorCode, 'SESSION_NOT_FOUND' | 'SESSION_CORRUPTED' | 'SESSION_WRITE_FAILED'>;
|
|
179
|
+
code: Extract<ErrorCode, 'SESSION_NOT_FOUND' | 'SESSION_CORRUPTED' | 'SESSION_WRITE_FAILED' | 'SESSION_ID_REQUIRED'>;
|
|
179
180
|
sessionId?: string | undefined;
|
|
180
181
|
context?: Record<string, unknown> | undefined;
|
|
181
182
|
cause?: unknown | undefined;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ export type { AutonomyStage } from './autonomy.js';
|
|
|
3
3
|
export type { ContentBlock, ImageBlock, TextBlock, ThinkingBlock, ToolResultBlock, ToolUseBlock, } from './blocks.js';
|
|
4
4
|
export { isImageBlock, isTextBlock, isToolResultBlock, isToolUseBlock } from './blocks.js';
|
|
5
5
|
export type { Compactor, CompactReport } from './compactor.js';
|
|
6
|
-
export type { AdaptiveConcurrencyConfig, AgentLearningConfig, AutonomyConfig, BrainConfig, BrainCouncilConfig, BrainCouncilVoterConfig, BrainModelEntry, CircuitBreakerRuntimeConfig, ConcreteTokenSavingTier, Config, ConfigLoader, ConfigStore, ContextConfig, CouncilPersonaDefinition, CouncilToolConfig, CouncilToolProfileDefinition, CustomModelDefinition, ExecDangerConfig, ExecToolConfig, FeaturesConfig, FleetChatVerbosity, FleetConfig, FleetSupervisorConfig, GitBehaviorConfig, HqClientConfig, IndexingConfig, InputHistoryConfig, LaunchConfig, LaunchMenuChoice, LogConfig, LoopDetectionConfig, MCPHealthConfig, MCPHealthThresholds, MCPServerConfig, ModelMatrixEntry, ModelRuntimeCacheConfig, ModelRuntimeConfig, ModelRuntimeParametersConfig, ModelRuntimeReasoningConfig, NextStepsToolConfig, PluginConfig, PluginManagerConfig, ProviderApiKey, ProviderConfig, SageConfig, SessionLoggingConfig, SkillsConfig, SyncCategory, SyncConfig, ThemePresetId, TokenSavingTier, ToolDescriptionMode, ToolDescriptionModeConfig, ToolResultRenderMode, ToolResultRenderModeConfig, ToolsConfig, } from './config.js';
|
|
7
|
-
export { DEFAULT_TUI_THINKING_WORD, FLEET_CHAT_VERBOSITY_VALUES, MAX_TUI_THINKING_WORD_LENGTH, MAX_WRONGPROXY_URL_LENGTH, normalizeTokenSavingTier, normalizeTuiThinkingWord, resolveFleetChatVerbosity, resolveTokenSavingTier, THEME_PRESET_IDS, } from './config.js';
|
|
8
|
-
export type { CompletedWorkEvidence, CompletedWorkSource, ContextEvidenceState,
|
|
6
|
+
export type { AdaptiveConcurrencyConfig, AgentLearningConfig, AutonomyConfig, AutoThinConfig, BrainConfig, BrainCouncilConfig, BrainCouncilVoterConfig, BrainModelEntry, CircuitBreakerRuntimeConfig, ConcreteTokenSavingTier, Config, ConfigLoader, ConfigStore, ContextConfig, CouncilPersonaDefinition, CouncilToolConfig, CouncilToolProfileDefinition, CustomModelDefinition, DisabledToolMeta, ExecDangerConfig, ExecToolConfig, FeaturesConfig, FleetChatVerbosity, FleetConfig, FleetSupervisorConfig, GitBehaviorConfig, HqClientConfig, IndexingConfig, InputHistoryConfig, LaunchConfig, LaunchMenuChoice, LogConfig, LoopDetectionConfig, MCPHealthConfig, MCPHealthThresholds, MCPServerConfig, ModelMatrixEntry, ModelRuntimeCacheConfig, ModelRuntimeConfig, ModelRuntimeParametersConfig, ModelRuntimeReasoningConfig, NextStepsToolConfig, PluginConfig, PluginManagerConfig, ProviderApiKey, ProviderConfig, SageConfig, SessionLoggingConfig, SkillsConfig, SyncCategory, ModelTierId, ModelTierLeaderConfig, ModelTierLeaderMode, ModelTierLevel, ModelTierRouting, ModelTiersConfig, SyncConfig, ThemePresetId, TokenSavingTier, ToolDescriptionMode, ToolDescriptionModeConfig, ToolResultRenderMode, ToolResultRenderModeConfig, ToolsConfig, } from './config.js';
|
|
7
|
+
export { BUILTIN_MODEL_TIER_IDS, DEFAULT_TUI_THINKING_WORD, FLEET_CHAT_VERBOSITY_VALUES, MAX_TUI_THINKING_WORD_LENGTH, MAX_WRONGPROXY_URL_LENGTH, normalizeTokenSavingTier, normalizeTuiThinkingWord, resolveFleetChatVerbosity, resolveTokenSavingTier, THEME_PRESET_IDS, } from './config.js';
|
|
8
|
+
export type { CompletedWorkEvidence, CompletedWorkSource, ContextEvidenceState, ToolOutputMetadata, } from './context-evidence.js';
|
|
9
9
|
export type { ContextSnapshot, ContextWindowAggressiveOn, ContextWindowConfigLike, ContextWindowMode, ContextWindowModeId, ContextWindowModeSelectionId, ContextWindowPolicy, ContextWindowThresholds, DeprecatedContextWindowModeId, } from './context-window.js';
|
|
10
10
|
export { CONTEXT_WINDOW_MODE_PINNED_META_KEY, CONTEXT_WINDOW_MODES, DEFAULT_CONTEXT_WINDOW_MODE_ID, DEPRECATED_CONTEXT_WINDOW_MODE_ALIASES, formatContextWindowModeList, getContextWindowMode, isContextWindowModeId, isContextWindowModeSelectionId, isDeprecatedContextWindowModeId, LARGE_WINDOW_DEEP_MODE_THRESHOLD, listContextWindowModes, normalizeContextWindowModeId, resolveContextWindowPolicy, } from './context-window.js';
|
|
11
11
|
export type { CouncilDistinctness, CouncilLLMCaller, CouncilModelTarget, CouncilOption, CouncilPersona, CouncilProfileConfig, CouncilQuestion, CouncilResolutionMethod, CouncilResult, CouncilSeatConfig, CouncilUsage, CouncilVoteResult, CouncilVoteStatus, ResolvedCouncilProfile, ResolvedCouncilSeat, } from './council.js';
|
|
@@ -31,20 +31,22 @@ export type { DirectoryPolicy, DirectoryRule, PermissionDecision, PermissionPoli
|
|
|
31
31
|
export type { MCPRegistryView, MetricsSinkView, Notifier, Plugin, PluginAPI, PluginCapabilities, PluginConfigFieldLifecycle, PluginConfigFieldMetadata, PluginConfigFields, PluginCouncilOptions, PluginDependency, PluginLLM, PluginLLMOptions, PluginLLMResult, PluginPipelines, PluginRuntime, ProviderFactory, ProviderRegistryView, SessionWriterView, SlashCommandRegistryView, ToolRegistryView, } from './plugin.js';
|
|
32
32
|
export type { BuiltinPromptCategory, PromptCategory, PromptCategoryCount, PromptEntry, PromptLoader, PromptManifest, PromptManifestRef, PromptSearchOptions, PromptSource, PromptVariable, } from './prompt.js';
|
|
33
33
|
export { BUILTIN_PROMPT_CATEGORIES, isBuiltinCategory, PROMPT_CATEGORY_LABELS } from './prompt.js';
|
|
34
|
-
export type { InstalledPromptEntry,
|
|
34
|
+
export type { InstalledPromptEntry, PromptManifestData, PromptRegistryManifest, PromptRegistryRef, RegistryDiff, } from './prompt-registry.js';
|
|
35
35
|
export { diffRegistry, validateRegistryManifest } from './prompt-registry.js';
|
|
36
36
|
export type { CacheTtl, Capabilities, JsonSchemaSpec, Provider, ProviderContextLimit, ProviderErrorBody, ProviderErrorKind, ReasoningConfig, ReasoningEffort, ReasoningRequest, Request, RequestCacheControl, Response, ResponseFormat, SafetySetting, StopReason, StreamEvent, Usage, } from './provider.js';
|
|
37
|
-
export { classifyProviderError, effectiveInputTokens, freshInputTokens, isContextOverflowShaped, isFallbackWorthy, isReasoningEffort, isRetryableKind, ProviderError, promptCacheHitRatio, REASONING_EFFORT_LEVELS, StreamHangError, } from './provider.js';
|
|
37
|
+
export { classifyProviderError, effectiveInputTokens, freshInputTokens, isContextOverflowShaped, isFallbackWorthy, isReasoningEffort, isRetryableKind, ProviderError, promptCacheHitRatio, REASONING_EFFORT_LEVELS, StreamHangError, totalUsageTokens, } from './provider.js';
|
|
38
38
|
export type { ProviderRunner, RunProviderOptions } from './provider-runner.js';
|
|
39
39
|
export type { Renderer } from './renderer.js';
|
|
40
40
|
export type { SecretScrubber } from './secret-scrubber.js';
|
|
41
41
|
export type { RotatableSecretVault, SecretVault } from './secret-vault.js';
|
|
42
|
-
export type { FileSnapshot, ForkedSession, ResumedSession, ResumeFileStatus, ResumeFileValidationEntry, ResumeValidation, SessionData, SessionEvent, SessionForkOptions, SessionMetadata, SessionStore, SessionSummary, SessionWriter, WorkspaceCheckpointRef, WorkspaceMaterializationResult, } from './session.js';
|
|
43
|
-
export type { SessionMarker, SessionMarkerLevel } from './session-markers.js';
|
|
42
|
+
export type { FileSnapshot, ForkedSession, ResumedSession, ResumeFileStatus, ResumeFileValidationEntry, ResumeValidation, SessionData, SessionEvent, SessionForkOptions, SessionLoadProgress, SessionMetadata, SessionStore, SessionSummary, SessionWriter, WorkspaceCheckpointRef, WorkspaceMaterializationResult, } from './session.js';
|
|
43
|
+
export type { SessionMarker, SessionMarkerDetail, SessionMarkerLevel, } from './session-markers.js';
|
|
44
44
|
export { CHAT_MARKER_SOURCES, isSystemInjectedMessage, projectSessionMarkers, SESSION_MARKER_EVENT_TYPES, SYSTEM_INJECTION_PREFIXES, sessionEventToMarker, } from './session-markers.js';
|
|
45
|
+
export type { ProjectSessionTimelineInput, SessionTimelineAssistantEntry, SessionTimelineEntry, SessionTimelineImage, SessionTimelineMarkerEntry, SessionTimelineSystemEntry, SessionTimelineThinkingEntry, SessionTimelineToolEntry, SessionTimelineUserEntry, SessionToolMeta, TextBlockMode, ThinkingPlacement, } from './session-timeline.js';
|
|
46
|
+
export { projectSessionTimeline, projectSessionToolMeta } from './session-timeline.js';
|
|
45
47
|
export type { DefaultSessionReaderOptions, SessionEventType, SessionExportOptions, SessionQuery, SessionReader, SessionSearchHit, SessionSearchQuery, SessionSummaryLite, } from './session-reader.js';
|
|
46
48
|
export type { CheckpointInfo, RewindResult, RewindResultExtended, SessionRewinder, } from './session-rewinder.js';
|
|
47
|
-
export type { SideEffect
|
|
49
|
+
export type { SideEffect } from './side-effect.js';
|
|
48
50
|
export type { SkillEntry, SkillLoader, SkillManifest } from './skill.js';
|
|
49
51
|
export type { SlashCommand } from './slash-command.js';
|
|
50
52
|
export type { SpecAnalysis, SpecApiEndpoint, Specification, SpecRequirement, SpecSection, SpecSectionType, SpecStatus, SpecTemplate, SpecValidationResult, } from './spec.js';
|
|
@@ -52,7 +54,7 @@ export { DEFAULT_SPEC_TEMPLATE } from './spec.js';
|
|
|
52
54
|
export type { BuildContext, ModelCapabilities, SystemPromptBuilder, SystemPromptRegions, } from './system-prompt.js';
|
|
53
55
|
export { flattenSystemPromptRegions } from './system-prompt.js';
|
|
54
56
|
export type { SystemPromptContributor } from './system-prompt-contributor.js';
|
|
55
|
-
export type { CriticalPathResult, SerializableTaskGraph,
|
|
57
|
+
export type { CriticalPathResult, SerializableTaskGraph, SerializedTaskGraph, TaskAssignment, TaskDependency, TaskEdge, TaskFilter, TaskGraph, TaskNode, TaskPriority, TaskProgress, TaskSort, TaskStatus, TaskType, } from './task-graph.js';
|
|
56
58
|
export type { CacheStats, ProviderCacheStats, TokenCounter } from './token-counter.js';
|
|
57
59
|
export type { JSONSchema, Permission, RiskTier, Tool, ToolCallContext, ToolErrorInfo, ToolFinalEvent, ToolIconId, ToolProgressEvent, ToolStreamEvent, } from './tool.js';
|
|
58
60
|
export { ToolErrorCategory } from './tool.js';
|
package/dist/types/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BUILTIN_MODEL_TIER_IDS,
|
|
2
3
|
DEFAULT_SPEC_TEMPLATE,
|
|
3
4
|
FLEET_CHAT_VERBOSITY_VALUES,
|
|
4
5
|
MALFORMED_ARG_MARKERS,
|
|
5
6
|
THEME_PRESET_IDS,
|
|
6
7
|
ToolErrorCategory,
|
|
7
8
|
resolveFleetChatVerbosity
|
|
8
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-GDQ7CZRQ.js";
|
|
9
10
|
import {
|
|
10
11
|
diffRegistry,
|
|
11
12
|
validateRegistryManifest
|
|
@@ -37,7 +38,7 @@ import {
|
|
|
37
38
|
listContextWindowModes,
|
|
38
39
|
normalizeContextWindowModeId,
|
|
39
40
|
resolveContextWindowPolicy
|
|
40
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-DLHHXUAM.js";
|
|
41
42
|
import {
|
|
42
43
|
GOVERNED_TOOL_EXECUTOR_META_KEY
|
|
43
44
|
} from "../chunk-XBDP4QPW.js";
|
|
@@ -63,19 +64,12 @@ import {
|
|
|
63
64
|
isFallbackWorthy,
|
|
64
65
|
isReasoningEffort,
|
|
65
66
|
isRetryableKind,
|
|
66
|
-
promptCacheHitRatio
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
CHAT_MARKER_SOURCES,
|
|
70
|
-
SESSION_MARKER_EVENT_TYPES,
|
|
71
|
-
SYSTEM_INJECTION_PREFIXES,
|
|
72
|
-
isSystemInjectedMessage,
|
|
73
|
-
projectSessionMarkers,
|
|
74
|
-
sessionEventToMarker
|
|
75
|
-
} from "../chunk-KSJ5UTP7.js";
|
|
67
|
+
promptCacheHitRatio,
|
|
68
|
+
totalUsageTokens
|
|
69
|
+
} from "../chunk-3ECENVHL.js";
|
|
76
70
|
import {
|
|
77
71
|
flattenSystemPromptRegions
|
|
78
|
-
} from "../chunk-
|
|
72
|
+
} from "../chunk-VVBP6KGT.js";
|
|
79
73
|
import {
|
|
80
74
|
DEFAULT_TUI_THINKING_WORD,
|
|
81
75
|
MAX_TUI_THINKING_WORD_LENGTH,
|
|
@@ -85,6 +79,7 @@ import {
|
|
|
85
79
|
resolveTokenSavingTier
|
|
86
80
|
} from "../chunk-KJ2ZTQSL.js";
|
|
87
81
|
import "../chunk-B4AMLZPB.js";
|
|
82
|
+
import "../chunk-PFZO3C6H.js";
|
|
88
83
|
import {
|
|
89
84
|
isImageBlock,
|
|
90
85
|
isTextBlock,
|
|
@@ -116,11 +111,23 @@ import {
|
|
|
116
111
|
isToolValidationError,
|
|
117
112
|
isWrongStackError,
|
|
118
113
|
toWrongStackError
|
|
119
|
-
} from "../chunk-
|
|
114
|
+
} from "../chunk-25LSLC3G.js";
|
|
120
115
|
import "../chunk-TBRL2RCC.js";
|
|
121
|
-
import
|
|
116
|
+
import {
|
|
117
|
+
projectSessionTimeline,
|
|
118
|
+
projectSessionToolMeta
|
|
119
|
+
} from "../chunk-3BDV7RL3.js";
|
|
120
|
+
import {
|
|
121
|
+
CHAT_MARKER_SOURCES,
|
|
122
|
+
SESSION_MARKER_EVENT_TYPES,
|
|
123
|
+
SYSTEM_INJECTION_PREFIXES,
|
|
124
|
+
isSystemInjectedMessage,
|
|
125
|
+
projectSessionMarkers,
|
|
126
|
+
sessionEventToMarker
|
|
127
|
+
} from "../chunk-ULMAQV3T.js";
|
|
122
128
|
export {
|
|
123
129
|
AgentError,
|
|
130
|
+
BUILTIN_MODEL_TIER_IDS,
|
|
124
131
|
BUILTIN_PROMPT_CATEGORIES,
|
|
125
132
|
CHAT_MARKER_SOURCES,
|
|
126
133
|
CONTEXT_WINDOW_MODES,
|
|
@@ -203,12 +210,15 @@ export {
|
|
|
203
210
|
normalizeTokenSavingTier,
|
|
204
211
|
normalizeTuiThinkingWord,
|
|
205
212
|
projectSessionMarkers,
|
|
213
|
+
projectSessionTimeline,
|
|
214
|
+
projectSessionToolMeta,
|
|
206
215
|
promptCacheHitRatio,
|
|
207
216
|
resolveContextWindowPolicy,
|
|
208
217
|
resolveFleetChatVerbosity,
|
|
209
218
|
resolveTokenSavingTier,
|
|
210
219
|
sessionEventToMarker,
|
|
211
220
|
toWrongStackError,
|
|
221
|
+
totalUsageTokens,
|
|
212
222
|
validateRegistryManifest
|
|
213
223
|
};
|
|
214
224
|
//# sourceMappingURL=index.js.map
|