@wrongstack/core 0.313.1 → 0.316.2
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 +33 -5
- 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
|
@@ -35,6 +35,12 @@ var ToolCapabilities = {
|
|
|
35
35
|
NET_OUTBOUND: "net.outbound",
|
|
36
36
|
/** Can mutate in-memory session todos only. */
|
|
37
37
|
SESSION_TODO: "session.todo",
|
|
38
|
+
/**
|
|
39
|
+
* Can post an ephemeral same-session note to the leader or a peer
|
|
40
|
+
* (`session_note` / `session.note`). In-process only — not the durable
|
|
41
|
+
* cross-session mailbox (`coordination.mail`).
|
|
42
|
+
*/
|
|
43
|
+
SESSION_NOTE: "session.note",
|
|
38
44
|
/** Can park after-task `<nextsteps>` suggestions for the current turn. */
|
|
39
45
|
SESSION_NEXTSTEPS: "session.nextsteps",
|
|
40
46
|
/** Can mutate in-memory session mode only. */
|
|
@@ -87,6 +93,7 @@ var WIDE_SUBAGENT_CAPABILITIES = [
|
|
|
87
93
|
ToolCapabilities.FS_WRITE,
|
|
88
94
|
ToolCapabilities.NET_OUTBOUND,
|
|
89
95
|
ToolCapabilities.SESSION_TODO,
|
|
96
|
+
ToolCapabilities.SESSION_NOTE,
|
|
90
97
|
ToolCapabilities.TOOL_META,
|
|
91
98
|
ToolCapabilities.MEMORY_READ,
|
|
92
99
|
ToolCapabilities.SHELL_ARBITRARY,
|
|
@@ -137,4 +144,4 @@ export {
|
|
|
137
144
|
hasCapability,
|
|
138
145
|
getDangerousCapabilities
|
|
139
146
|
};
|
|
140
|
-
//# sourceMappingURL=chunk-
|
|
147
|
+
//# sourceMappingURL=chunk-UBGDX6FI.js.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// src/plugins/review-finding-types.ts
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
var FindingNotFoundError = class extends Error {
|
|
4
|
+
findingId;
|
|
5
|
+
constructor(findingId) {
|
|
6
|
+
super(`Finding not found: ${findingId}`);
|
|
7
|
+
this.name = "FindingNotFoundError";
|
|
8
|
+
this.findingId = findingId;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
var InvalidTransitionError = class extends Error {
|
|
12
|
+
from;
|
|
13
|
+
to;
|
|
14
|
+
constructor(from, to, reason) {
|
|
15
|
+
const msg = reason ?? `Invalid transition from "${from}" to "${to}"`;
|
|
16
|
+
super(msg);
|
|
17
|
+
this.name = "InvalidTransitionError";
|
|
18
|
+
this.from = from;
|
|
19
|
+
this.to = to;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var FindingStoreLockError = class extends Error {
|
|
23
|
+
path;
|
|
24
|
+
constructor(path, cause) {
|
|
25
|
+
super(`Could not acquire finding store lock: ${path}${cause ? ` (${cause})` : ""}`);
|
|
26
|
+
this.name = "FindingStoreLockError";
|
|
27
|
+
this.path = path;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
function normalizeFingerprintTitle(title) {
|
|
31
|
+
return title.trim().toLowerCase().replace(/[^\w\s]/g, "").replace(/\s+/g, " ").trim();
|
|
32
|
+
}
|
|
33
|
+
function computeFindingFingerprint(file, line, title) {
|
|
34
|
+
const normalizedTitle = normalizeFingerprintTitle(title);
|
|
35
|
+
const normalizedFile = file.replace(/\\/g, "/").trim().toLowerCase();
|
|
36
|
+
const lineStr = line != null && line >= 0 ? String(line) : "0";
|
|
37
|
+
const hash = createHash("sha256");
|
|
38
|
+
hash.update(`${normalizedFile}:${lineStr}:${normalizedTitle}`);
|
|
39
|
+
return hash.digest("hex");
|
|
40
|
+
}
|
|
41
|
+
var TRANSITION_MATRIX = {
|
|
42
|
+
active: /* @__PURE__ */ new Set(["triaged", "ignored", "resolved"]),
|
|
43
|
+
triaged: /* @__PURE__ */ new Set(["in_progress", "ignored", "resolved"]),
|
|
44
|
+
in_progress: /* @__PURE__ */ new Set(["resolved", "active"]),
|
|
45
|
+
ignored: /* @__PURE__ */ new Set(["active"]),
|
|
46
|
+
resolved: /* @__PURE__ */ new Set(["active"])
|
|
47
|
+
};
|
|
48
|
+
function validateTransition(from, to) {
|
|
49
|
+
if (from === to) return;
|
|
50
|
+
const allowed = TRANSITION_MATRIX[from];
|
|
51
|
+
if (!allowed?.has(to)) {
|
|
52
|
+
throw new InvalidTransitionError(from, to);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function validateResolution(status, outcome) {
|
|
56
|
+
if (status !== "resolved") return;
|
|
57
|
+
if (!outcome) {
|
|
58
|
+
throw new InvalidTransitionError(
|
|
59
|
+
"active",
|
|
60
|
+
"resolved",
|
|
61
|
+
'A resolution outcome is required when transitioning to "resolved"'
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
FindingNotFoundError,
|
|
68
|
+
InvalidTransitionError,
|
|
69
|
+
FindingStoreLockError,
|
|
70
|
+
normalizeFingerprintTitle,
|
|
71
|
+
computeFindingFingerprint,
|
|
72
|
+
validateTransition,
|
|
73
|
+
validateResolution
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=chunk-UJILKYES.js.map
|
|
@@ -6,15 +6,29 @@ var SESSION_MARKER_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
|
6
6
|
"skill_activated",
|
|
7
7
|
"skill_deactivated",
|
|
8
8
|
"agent_spawned",
|
|
9
|
+
"agent_session_linked",
|
|
9
10
|
"agent_stopped",
|
|
10
11
|
"agent_error",
|
|
12
|
+
"delegate_started",
|
|
13
|
+
"delegate_completed",
|
|
14
|
+
"loop_detected",
|
|
15
|
+
"model_switched",
|
|
11
16
|
"error",
|
|
12
17
|
"provider_retry",
|
|
13
18
|
"provider_error",
|
|
14
19
|
"message_truncated"
|
|
15
20
|
]);
|
|
21
|
+
var CHAT_EXCLUDED_MARKER_SOURCES = /* @__PURE__ */ new Set([
|
|
22
|
+
"checkpoint",
|
|
23
|
+
"agent_spawned",
|
|
24
|
+
"agent_session_linked",
|
|
25
|
+
"agent_stopped",
|
|
26
|
+
"agent_error",
|
|
27
|
+
"delegate_started",
|
|
28
|
+
"delegate_completed"
|
|
29
|
+
]);
|
|
16
30
|
var CHAT_MARKER_SOURCES = new Set(
|
|
17
|
-
[...SESSION_MARKER_EVENT_TYPES].filter((type) => type
|
|
31
|
+
[...SESSION_MARKER_EVENT_TYPES].filter((type) => !CHAT_EXCLUDED_MARKER_SOURCES.has(type))
|
|
18
32
|
);
|
|
19
33
|
function sessionEventToMarker(ev) {
|
|
20
34
|
switch (ev.type) {
|
|
@@ -68,6 +82,17 @@ function sessionEventToMarker(ev) {
|
|
|
68
82
|
text: `spawned as ${ev.role}`,
|
|
69
83
|
agentId: ev.agentId
|
|
70
84
|
};
|
|
85
|
+
case "agent_session_linked":
|
|
86
|
+
return {
|
|
87
|
+
ts: ev.ts,
|
|
88
|
+
source: ev.type,
|
|
89
|
+
level: "info",
|
|
90
|
+
// The transcript path is the point of the marker: it is how a reader
|
|
91
|
+
// of a resumed session gets from "this agent ran" to what it actually
|
|
92
|
+
// did. Falls back to the journal id when the writer had no file.
|
|
93
|
+
text: `transcript \u2192 ${ev.transcriptPath ?? ev.agentSessionId}`,
|
|
94
|
+
agentId: ev.agentId
|
|
95
|
+
};
|
|
71
96
|
case "agent_stopped":
|
|
72
97
|
return {
|
|
73
98
|
ts: ev.ts,
|
|
@@ -76,6 +101,56 @@ function sessionEventToMarker(ev) {
|
|
|
76
101
|
text: "stopped",
|
|
77
102
|
agentId: ev.agentId
|
|
78
103
|
};
|
|
104
|
+
case "delegate_started":
|
|
105
|
+
return {
|
|
106
|
+
ts: ev.ts,
|
|
107
|
+
source: ev.type,
|
|
108
|
+
level: "info",
|
|
109
|
+
text: `\u{1F91D} delegating \u2192 ${ev.target}: ${ev.task.length > 100 ? `${ev.task.slice(0, 99)}\u2026` : ev.task}`,
|
|
110
|
+
agentId: ev.subagentId,
|
|
111
|
+
detail: { kind: "delegate_started", target: ev.target, task: ev.task }
|
|
112
|
+
};
|
|
113
|
+
case "delegate_completed": {
|
|
114
|
+
const cost = ev.costUsd && ev.costUsd > 0 ? ` \xB7 $${ev.costUsd.toFixed(4)}` : "";
|
|
115
|
+
return {
|
|
116
|
+
ts: ev.ts,
|
|
117
|
+
source: ev.type,
|
|
118
|
+
level: ev.ok ? "info" : "error",
|
|
119
|
+
text: `${ev.ok ? "\u2705" : "\u274C"} ${ev.summary}${cost}`,
|
|
120
|
+
agentId: ev.subagentId,
|
|
121
|
+
detail: {
|
|
122
|
+
kind: "delegate_completed",
|
|
123
|
+
target: ev.target,
|
|
124
|
+
task: ev.task,
|
|
125
|
+
ok: ev.ok,
|
|
126
|
+
status: ev.status,
|
|
127
|
+
summary: ev.summary,
|
|
128
|
+
durationMs: ev.durationMs,
|
|
129
|
+
iterations: ev.iterations,
|
|
130
|
+
toolCalls: ev.toolCalls,
|
|
131
|
+
costUsd: ev.costUsd
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
case "loop_detected": {
|
|
136
|
+
const what = ev.kind === "message" ? "the same reply" : ev.tools ? `\`${ev.tools}\`` : "the same step";
|
|
137
|
+
return {
|
|
138
|
+
ts: ev.ts,
|
|
139
|
+
source: ev.type,
|
|
140
|
+
level: "warn",
|
|
141
|
+
text: ev.action === "steer" ? `\u{1F501} Loop detected \u2014 ${what} repeated ${ev.repeatCount}\xD7 ; the run was steered.` : `\u{1F501} Loop detected \u2014 ${what} repeated ${ev.repeatCount}\xD7 ; the run was stopped.`
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
case "model_switched": {
|
|
145
|
+
const to = `${ev.to.providerId}/${ev.to.model}`;
|
|
146
|
+
const from = ev.from ? `${ev.from.providerId}/${ev.from.model} \u2192 ` : "";
|
|
147
|
+
return {
|
|
148
|
+
ts: ev.ts,
|
|
149
|
+
source: ev.type,
|
|
150
|
+
level: ev.reason === "fallback" ? "warn" : "info",
|
|
151
|
+
text: ev.reason === "fallback" ? `\u26A0 fallback${ev.status ? ` (HTTP ${ev.status})` : ""}: ${from}${to}` : `model: ${from}${to}`
|
|
152
|
+
};
|
|
153
|
+
}
|
|
79
154
|
case "agent_error":
|
|
80
155
|
return {
|
|
81
156
|
ts: ev.ts,
|
|
@@ -132,8 +207,13 @@ var SYSTEM_INJECTION_PREFIXES = [
|
|
|
132
207
|
"[QUEUED MESSAGES \u2014",
|
|
133
208
|
"[FLEET PULSE]",
|
|
134
209
|
"[loop-detector]",
|
|
135
|
-
|
|
136
|
-
|
|
210
|
+
// Written by `compaction-elision.ts` in place of the tool history it
|
|
211
|
+
// elided — a note addressed to the MODEL about what it can no longer see.
|
|
212
|
+
// It was replaying as the first line of the transcript, so every resumed
|
|
213
|
+
// session opened with a machine-readable inventory of its own compaction
|
|
214
|
+
// instead of the user's first prompt.
|
|
215
|
+
"[tool_history_digest:",
|
|
216
|
+
"[session.resume] Request targeted session"
|
|
137
217
|
];
|
|
138
218
|
function isSystemInjectedMessage(text) {
|
|
139
219
|
const trimmed = text.trimStart();
|
|
@@ -151,4 +231,4 @@ export {
|
|
|
151
231
|
SYSTEM_INJECTION_PREFIXES,
|
|
152
232
|
isSystemInjectedMessage
|
|
153
233
|
};
|
|
154
|
-
//# sourceMappingURL=chunk-
|
|
234
|
+
//# sourceMappingURL=chunk-ULMAQV3T.js.map
|
|
@@ -62,36 +62,54 @@ function stripCodeFences(s) {
|
|
|
62
62
|
}
|
|
63
63
|
function escapeControlCharsInStrings(s) {
|
|
64
64
|
let inString = false;
|
|
65
|
+
let escaped = false;
|
|
65
66
|
let out = "";
|
|
66
67
|
for (let i = 0; i < s.length; i++) {
|
|
67
68
|
const c = s.charAt(i);
|
|
68
|
-
if (
|
|
69
|
-
|
|
69
|
+
if (inString) {
|
|
70
|
+
if (escaped) {
|
|
71
|
+
escaped = false;
|
|
72
|
+
out += c;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (c === "\\") {
|
|
76
|
+
escaped = true;
|
|
77
|
+
out += c;
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
if (c === '"') {
|
|
81
|
+
inString = false;
|
|
82
|
+
out += c;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const code = c.charCodeAt(0);
|
|
86
|
+
if (code < 32) {
|
|
87
|
+
switch (c) {
|
|
88
|
+
case "\n":
|
|
89
|
+
out += "\\n";
|
|
90
|
+
break;
|
|
91
|
+
case "\r":
|
|
92
|
+
out += "\\r";
|
|
93
|
+
break;
|
|
94
|
+
case " ":
|
|
95
|
+
out += "\\t";
|
|
96
|
+
break;
|
|
97
|
+
case "\b":
|
|
98
|
+
out += "\\b";
|
|
99
|
+
break;
|
|
100
|
+
case "\f":
|
|
101
|
+
out += "\\f";
|
|
102
|
+
break;
|
|
103
|
+
default:
|
|
104
|
+
out += `\\u${code.toString(16).padStart(4, "0")}`;
|
|
105
|
+
}
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
70
108
|
out += c;
|
|
71
109
|
continue;
|
|
72
110
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
switch (c) {
|
|
76
|
-
case "\n":
|
|
77
|
-
out += "\\n";
|
|
78
|
-
break;
|
|
79
|
-
case "\r":
|
|
80
|
-
out += "\\r";
|
|
81
|
-
break;
|
|
82
|
-
case " ":
|
|
83
|
-
out += "\\t";
|
|
84
|
-
break;
|
|
85
|
-
case "\b":
|
|
86
|
-
out += "\\b";
|
|
87
|
-
break;
|
|
88
|
-
case "\f":
|
|
89
|
-
out += "\\f";
|
|
90
|
-
break;
|
|
91
|
-
default:
|
|
92
|
-
out += `\\u${code.toString(16).padStart(4, "0")}`;
|
|
93
|
-
}
|
|
94
|
-
continue;
|
|
111
|
+
if (c === '"') {
|
|
112
|
+
inString = true;
|
|
95
113
|
}
|
|
96
114
|
out += c;
|
|
97
115
|
}
|
|
@@ -147,4 +165,4 @@ export {
|
|
|
147
165
|
sanitizeJsonString,
|
|
148
166
|
stripCodeFences
|
|
149
167
|
};
|
|
150
|
-
//# sourceMappingURL=chunk-
|
|
168
|
+
//# sourceMappingURL=chunk-W5VITDM2.js.map
|
|
@@ -53,6 +53,12 @@ function compileGlob(pattern, commandSubject = false) {
|
|
|
53
53
|
re += question;
|
|
54
54
|
i++;
|
|
55
55
|
} else if (c === "[") {
|
|
56
|
+
const closeIndex = pattern.indexOf("]", i + 1);
|
|
57
|
+
if (closeIndex === -1) {
|
|
58
|
+
re += "\\[";
|
|
59
|
+
i++;
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
56
62
|
let cls = "[";
|
|
57
63
|
i++;
|
|
58
64
|
if (pattern[i] === "!" || pattern[i] === "^") {
|
|
@@ -185,4 +191,4 @@ export {
|
|
|
185
191
|
isPathSubjectKey,
|
|
186
192
|
subjectForToolInput
|
|
187
193
|
};
|
|
188
|
-
//# sourceMappingURL=chunk-
|
|
194
|
+
//# sourceMappingURL=chunk-WAHQVNWT.js.map
|