@wrongstack/core 0.287.0 → 0.291.0
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/agent-status-tracker.d.ts +13 -0
- package/dist/agent-status-tracker.d.ts.map +1 -1
- package/dist/boot.d.ts.map +1 -1
- package/dist/chronicle/context.d.ts +13 -0
- package/dist/chronicle/context.d.ts.map +1 -0
- package/dist/chronicle/decision-adapter.d.ts +13 -0
- package/dist/chronicle/decision-adapter.d.ts.map +1 -0
- package/dist/chronicle/domain-adapter.d.ts +13 -0
- package/dist/chronicle/domain-adapter.d.ts.map +1 -0
- package/dist/chronicle/file-observer.d.ts +20 -0
- package/dist/chronicle/file-observer.d.ts.map +1 -0
- package/dist/chronicle/health-monitor.d.ts +11 -0
- package/dist/chronicle/health-monitor.d.ts.map +1 -0
- package/dist/chronicle/identity.d.ts +18 -0
- package/dist/chronicle/identity.d.ts.map +1 -0
- package/dist/chronicle/index.d.ts +16 -0
- package/dist/chronicle/index.d.ts.map +1 -0
- package/dist/chronicle/index.js +2555 -0
- package/dist/chronicle/index.js.map +7 -0
- package/dist/chronicle/journal.d.ts +81 -0
- package/dist/chronicle/journal.d.ts.map +1 -0
- package/dist/chronicle/process-adapter.d.ts +14 -0
- package/dist/chronicle/process-adapter.d.ts.map +1 -0
- package/dist/chronicle/prompt-manifest.d.ts +34 -0
- package/dist/chronicle/prompt-manifest.d.ts.map +1 -0
- package/dist/chronicle/provider-adapter.d.ts +13 -0
- package/dist/chronicle/provider-adapter.d.ts.map +1 -0
- package/dist/chronicle/query.d.ts +108 -0
- package/dist/chronicle/query.d.ts.map +1 -0
- package/dist/chronicle/rollup-adapter.d.ts +14 -0
- package/dist/chronicle/rollup-adapter.d.ts.map +1 -0
- package/dist/chronicle/stream-adapter.d.ts +13 -0
- package/dist/chronicle/stream-adapter.d.ts.map +1 -0
- package/dist/chronicle/tool-adapter.d.ts +15 -0
- package/dist/chronicle/tool-adapter.d.ts.map +1 -0
- package/dist/chronicle/types.d.ts +82 -0
- package/dist/chronicle/types.d.ts.map +1 -0
- package/dist/coordination/agent-monitor.d.ts +40 -0
- package/dist/coordination/agent-monitor.d.ts.map +1 -1
- package/dist/coordination/agent-subagent-runner.d.ts +7 -1
- package/dist/coordination/agent-subagent-runner.d.ts.map +1 -1
- package/dist/coordination/agents/phase6-domain.d.ts.map +1 -1
- package/dist/coordination/autonomous-coordinator.d.ts +2 -0
- package/dist/coordination/autonomous-coordinator.d.ts.map +1 -1
- package/dist/coordination/brain-monitor.d.ts +1 -1
- package/dist/coordination/brain.d.ts +3 -2
- package/dist/coordination/brain.d.ts.map +1 -1
- package/dist/coordination/collab-debug.d.ts +0 -9
- package/dist/coordination/collab-debug.d.ts.map +1 -1
- package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -1
- package/dist/coordination/dep-watcher.d.ts +2 -1
- package/dist/coordination/dep-watcher.d.ts.map +1 -1
- package/dist/coordination/director/director-collab.d.ts +1 -1
- package/dist/coordination/director/director-collab.d.ts.map +1 -1
- package/dist/coordination/director-tools.d.ts.map +1 -1
- package/dist/coordination/director.d.ts +10 -1
- package/dist/coordination/director.d.ts.map +1 -1
- package/dist/coordination/file-author-tracker.d.ts.map +1 -1
- package/dist/coordination/fleet-bus.d.ts.map +1 -1
- package/dist/coordination/fleet-event-validation.d.ts +0 -7
- package/dist/coordination/fleet-event-validation.d.ts.map +1 -1
- package/dist/coordination/fleet-spawn.d.ts.map +1 -1
- package/dist/coordination/fleet-supervisor.d.ts +1 -1
- package/dist/coordination/fleet-supervisor.d.ts.map +1 -1
- package/dist/coordination/fleet.d.ts +0 -44
- package/dist/coordination/fleet.d.ts.map +1 -1
- package/dist/coordination/global-mailbox.d.ts +7 -1
- package/dist/coordination/global-mailbox.d.ts.map +1 -1
- package/dist/coordination/index.d.ts +5 -3
- package/dist/coordination/index.d.ts.map +1 -1
- package/dist/coordination/index.js +2426 -299
- package/dist/coordination/index.js.map +4 -4
- package/dist/coordination/knowledge-graph.d.ts +2 -1
- package/dist/coordination/knowledge-graph.d.ts.map +1 -1
- package/dist/coordination/large-answer-store.d.ts +0 -6
- package/dist/coordination/large-answer-store.d.ts.map +1 -1
- package/dist/coordination/mail-tools.d.ts +2 -2
- package/dist/coordination/mail-tools.d.ts.map +1 -1
- package/dist/coordination/mailbox-hooks.d.ts +2 -0
- package/dist/coordination/mailbox-hooks.d.ts.map +1 -1
- package/dist/coordination/mailbox-http-router.d.ts +43 -0
- package/dist/coordination/mailbox-http-router.d.ts.map +1 -0
- package/dist/coordination/mailbox-message-codec.d.ts +35 -0
- package/dist/coordination/mailbox-message-codec.d.ts.map +1 -1
- package/dist/coordination/mailbox-tool.d.ts +1 -1
- package/dist/coordination/mailbox-tool.d.ts.map +1 -1
- package/dist/coordination/mailbox-types.d.ts +170 -10
- package/dist/coordination/mailbox-types.d.ts.map +1 -1
- package/dist/coordination/mailbox.d.ts +1 -1
- package/dist/coordination/mailbox.d.ts.map +1 -1
- package/dist/coordination/package-author-tracker.d.ts.map +1 -1
- package/dist/coordination/provider-status-tracker.d.ts +236 -0
- package/dist/coordination/provider-status-tracker.d.ts.map +1 -0
- package/dist/coordination/subagent-budget.d.ts +2 -1
- package/dist/coordination/subagent-budget.d.ts.map +1 -1
- package/dist/core/agent-loop.d.ts +8 -3
- package/dist/core/agent-loop.d.ts.map +1 -1
- package/dist/core/agent-response.d.ts +5 -4
- package/dist/core/agent-response.d.ts.map +1 -1
- package/dist/core/agent-tools.d.ts +1 -1
- package/dist/core/agent-tools.d.ts.map +1 -1
- package/dist/core/agent.d.ts +4 -2
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/context.d.ts +55 -1
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/fallback-model.d.ts +14 -8
- package/dist/core/fallback-model.d.ts.map +1 -1
- package/dist/core/fallback-profile-manager.d.ts +118 -0
- package/dist/core/fallback-profile-manager.d.ts.map +1 -0
- package/dist/core/fleet-pulse.d.ts +2 -1
- package/dist/core/fleet-pulse.d.ts.map +1 -1
- package/dist/core/iteration-limit.d.ts +2 -1
- package/dist/core/iteration-limit.d.ts.map +1 -1
- package/dist/core/mailbox-loop.d.ts +16 -1
- package/dist/core/mailbox-loop.d.ts.map +1 -1
- package/dist/core/model-availability-calendar.d.ts +27 -0
- package/dist/core/model-availability-calendar.d.ts.map +1 -0
- package/dist/core/provider-runner.d.ts.map +1 -1
- package/dist/core/system-prompt-builder.d.ts +2 -1
- package/dist/core/system-prompt-builder.d.ts.map +1 -1
- package/dist/defaults/index.js +1920 -598
- package/dist/defaults/index.js.map +4 -4
- package/dist/execution/auto-compaction-middleware.d.ts +3 -2
- package/dist/execution/auto-compaction-middleware.d.ts.map +1 -1
- package/dist/execution/compaction-core.d.ts.map +1 -1
- package/dist/execution/council-brain.d.ts +28 -49
- package/dist/execution/council-brain.d.ts.map +1 -1
- package/dist/execution/council-orchestrator.d.ts +30 -0
- package/dist/execution/council-orchestrator.d.ts.map +1 -1
- package/dist/execution/enhance-recovery.d.ts +8 -0
- package/dist/execution/enhance-recovery.d.ts.map +1 -1
- package/dist/execution/error-handler.d.ts +2 -2
- package/dist/execution/error-handler.d.ts.map +1 -1
- package/dist/execution/eternal-autonomy.d.ts.map +1 -1
- package/dist/execution/index.js +2600 -1903
- package/dist/execution/index.js.map +4 -4
- package/dist/execution/intelligent-compactor.d.ts +0 -16
- package/dist/execution/intelligent-compactor.d.ts.map +1 -1
- package/dist/execution/model-runtime.d.ts.map +1 -1
- package/dist/execution/one-shot-llm.d.ts +9 -1
- package/dist/execution/one-shot-llm.d.ts.map +1 -1
- package/dist/execution/prompt-enhancer.d.ts +36 -0
- package/dist/execution/prompt-enhancer.d.ts.map +1 -1
- package/dist/execution/prompt-enhancer.js +158 -10
- package/dist/execution/prompt-enhancer.js.map +2 -2
- package/dist/execution/retry-policy.d.ts +0 -13
- package/dist/execution/retry-policy.d.ts.map +1 -1
- package/dist/execution/skill-loader.d.ts.map +1 -1
- package/dist/execution/tool-executor.d.ts.map +1 -1
- package/dist/goal/checkpoint.d.ts.map +1 -0
- package/dist/{autophase/auto-phase-planner.d.ts → goal/goal-planner.d.ts} +8 -8
- package/dist/goal/goal-planner.d.ts.map +1 -0
- package/dist/{autophase/auto-phase-runner.d.ts → goal/goal-runner.d.ts} +10 -10
- package/dist/goal/goal-runner.d.ts.map +1 -0
- package/dist/{autophase → goal}/index.d.ts +3 -3
- package/dist/goal/index.d.ts.map +1 -0
- package/dist/goal/phase-graph-builder.d.ts.map +1 -0
- package/dist/{autophase → goal}/phase-orchestrator.d.ts +2 -2
- package/dist/goal/phase-orchestrator.d.ts.map +1 -0
- package/dist/goal/phase-store.d.ts.map +1 -0
- package/dist/{autophase → goal}/types.d.ts +2 -2
- package/dist/goal/types.d.ts.map +1 -0
- package/dist/hq/auth-store.d.ts.map +1 -1
- package/dist/hq/commands.d.ts +2 -1
- package/dist/hq/commands.d.ts.map +1 -1
- package/dist/hq/exposure.d.ts +66 -0
- package/dist/hq/exposure.d.ts.map +1 -0
- package/dist/hq/index.d.ts +1 -0
- package/dist/hq/index.d.ts.map +1 -1
- package/dist/hq/index.js +190 -21
- package/dist/hq/index.js.map +4 -4
- package/dist/hq/mailbox-mapper.d.ts +13 -1
- package/dist/hq/mailbox-mapper.d.ts.map +1 -1
- package/dist/hq/protocol/browser.d.ts +9 -1
- package/dist/hq/protocol/browser.d.ts.map +1 -1
- package/dist/hq/protocol/client.d.ts +2 -2
- package/dist/hq/protocol/client.d.ts.map +1 -1
- package/dist/hq/protocol/core.d.ts.map +1 -1
- package/dist/hq/protocol/mailbox.d.ts +6 -0
- package/dist/hq/protocol/mailbox.d.ts.map +1 -1
- package/dist/hq/protocol/session.d.ts +4 -0
- package/dist/hq/protocol/session.d.ts.map +1 -1
- package/dist/hq/publisher.d.ts.map +1 -1
- package/dist/index.d.ts +34 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30287 -22214
- package/dist/index.js.map +4 -4
- package/dist/infrastructure/index.js +60 -5
- package/dist/infrastructure/index.js.map +2 -2
- package/dist/kernel/events/agent-events.d.ts +33 -1
- package/dist/kernel/events/agent-events.d.ts.map +1 -1
- package/dist/kernel/events/file-events.d.ts +65 -0
- package/dist/kernel/events/file-events.d.ts.map +1 -0
- package/dist/kernel/events/memory-events.d.ts +36 -0
- package/dist/kernel/events/memory-events.d.ts.map +1 -1
- package/dist/kernel/events/network-events.d.ts +60 -0
- package/dist/kernel/events/network-events.d.ts.map +1 -0
- package/dist/kernel/events/process-events.d.ts +44 -0
- package/dist/kernel/events/process-events.d.ts.map +1 -0
- package/dist/kernel/events/provider-events.d.ts +89 -0
- package/dist/kernel/events/provider-events.d.ts.map +1 -1
- package/dist/kernel/events/tool-events.d.ts +10 -0
- package/dist/kernel/events/tool-events.d.ts.map +1 -1
- package/dist/kernel/events/worktree-events.d.ts +1 -1
- package/dist/kernel/events.d.ts +14 -1
- package/dist/kernel/events.d.ts.map +1 -1
- package/dist/kernel/index.js +2 -1
- package/dist/kernel/index.js.map +2 -2
- package/dist/kernel/tokens.d.ts +3 -1
- package/dist/kernel/tokens.d.ts.map +1 -1
- package/dist/mailbox-attach.d.ts.map +1 -1
- package/dist/models/index.js.map +2 -2
- package/dist/observability/index.d.ts +3 -0
- package/dist/observability/index.d.ts.map +1 -1
- package/dist/observability/index.js +278 -0
- package/dist/observability/index.js.map +4 -4
- package/dist/observability/network-telemetry.d.ts +15 -0
- package/dist/observability/network-telemetry.d.ts.map +1 -0
- package/dist/observability/process-telemetry.d.ts +18 -0
- package/dist/observability/process-telemetry.d.ts.map +1 -0
- package/dist/observability/redact-command.d.ts +20 -0
- package/dist/observability/redact-command.d.ts.map +1 -0
- package/dist/plugins/auto-review-plugin.d.ts +56 -3
- package/dist/plugins/auto-review-plugin.d.ts.map +1 -1
- package/dist/plugins/chimera-plugin.d.ts +164 -5
- package/dist/plugins/chimera-plugin.d.ts.map +1 -1
- package/dist/plugins/review-context-builder.d.ts +52 -0
- package/dist/plugins/review-context-builder.d.ts.map +1 -0
- package/dist/security/index.d.ts +1 -0
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +186 -9
- package/dist/security/index.js.map +4 -4
- package/dist/security/kanban-boundary.d.ts +10 -0
- package/dist/security/kanban-boundary.d.ts.map +1 -0
- package/dist/security/permission-policy.d.ts +1 -0
- package/dist/security/permission-policy.d.ts.map +1 -1
- package/dist/session-registry.d.ts +80 -0
- package/dist/session-registry.d.ts.map +1 -1
- package/dist/skills/index.js.map +2 -2
- package/dist/storage/config-loader.d.ts +7 -0
- package/dist/storage/config-loader.d.ts.map +1 -1
- package/dist/storage/file-session-writer.d.ts +20 -7
- package/dist/storage/file-session-writer.d.ts.map +1 -1
- package/dist/storage/goal-coordination.d.ts +40 -0
- package/dist/storage/goal-coordination.d.ts.map +1 -0
- package/dist/storage/goal-store.d.ts +9 -5
- package/dist/storage/goal-store.d.ts.map +1 -1
- package/dist/storage/index.d.ts +4 -2
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +1066 -226
- package/dist/storage/index.js.map +4 -4
- package/dist/storage/memory-consolidator.d.ts +49 -4
- package/dist/storage/memory-consolidator.d.ts.map +1 -1
- package/dist/storage/memory-graph-backend.d.ts +11 -0
- package/dist/storage/memory-graph-backend.d.ts.map +1 -1
- package/dist/storage/provider-config-watcher.d.ts +19 -0
- package/dist/storage/provider-config-watcher.d.ts.map +1 -1
- package/dist/storage/session-event-bridge.d.ts +2 -2
- package/dist/storage/session-event-bridge.d.ts.map +1 -1
- package/dist/storage/session-resume-validation.d.ts +10 -0
- package/dist/storage/session-resume-validation.d.ts.map +1 -1
- package/dist/storage/session-rewind-apply.d.ts +53 -0
- package/dist/storage/session-rewind-apply.d.ts.map +1 -0
- package/dist/storage/session-rewinder.d.ts.map +1 -1
- package/dist/storage/session-store.d.ts.map +1 -1
- package/dist/tasking/index.js.map +1 -1
- package/dist/tasking/task-store.d.ts +1 -1
- package/dist/tools/council-tool.d.ts +3 -0
- package/dist/tools/council-tool.d.ts.map +1 -1
- package/dist/tools/fallback-manage-tools.d.ts +82 -0
- package/dist/tools/fallback-manage-tools.d.ts.map +1 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +3423 -192
- package/dist/tools/index.js.map +4 -4
- package/dist/tools/one-shot-llm-tool.d.ts +2 -0
- package/dist/tools/one-shot-llm-tool.d.ts.map +1 -1
- package/dist/types/config.d.ts +76 -7
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/file-event-record.d.ts +68 -0
- package/dist/types/file-event-record.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +13 -8
- package/dist/types/index.js.map +3 -3
- package/dist/types/memory.d.ts +12 -0
- package/dist/types/memory.d.ts.map +1 -1
- package/dist/types/multi-agent.d.ts +12 -1
- package/dist/types/multi-agent.d.ts.map +1 -1
- package/dist/types/one-shot-llm.d.ts +16 -7
- package/dist/types/one-shot-llm.d.ts.map +1 -1
- package/dist/types/provider.d.ts +1 -1
- package/dist/types/provider.d.ts.map +1 -1
- package/dist/types/session.d.ts +68 -2
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/tool-executor.d.ts +2 -0
- package/dist/types/tool-executor.d.ts.map +1 -1
- package/dist/types/tool.d.ts +5 -0
- package/dist/types/tool.d.ts.map +1 -1
- package/dist/utils/atomic-write.d.ts.map +1 -1
- package/dist/utils/index.d.ts +10 -10
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +497 -254
- package/dist/utils/index.js.map +4 -4
- package/dist/utils/message-invariants.d.ts +9 -0
- package/dist/utils/message-invariants.d.ts.map +1 -1
- package/dist/utils/safe-json.d.ts +1 -1
- package/dist/utils/safe-json.d.ts.map +1 -1
- package/dist/utils/term.d.ts +279 -0
- package/dist/utils/term.d.ts.map +1 -1
- package/dist/utils/tool-wire-compact.d.ts +9 -0
- package/dist/utils/tool-wire-compact.d.ts.map +1 -1
- package/dist/utils/wstack-paths.d.ts +12 -2
- package/dist/utils/wstack-paths.d.ts.map +1 -1
- package/dist/worktree/worktree-manager.d.ts +1 -1
- package/dist/worktree/worktree-manager.d.ts.map +1 -1
- package/instructions/agents/ios.md +113 -0
- package/instructions/agents/search.md +1 -1
- package/instructions/llm/chimera-review.md +66 -9
- package/instructions/llm/memory-consolidator.md +4 -12
- package/instructions/llm/prompt-enhancer.md +3 -1
- package/instructions/sections/tool/common-patterns.md +3 -3
- package/instructions/system.md +40 -5
- package/package.json +7 -3
- package/skills/auto-review/SKILL.md +176 -0
- package/skills/mnemosyne/SKILL.md +156 -0
- package/skills/mnemosyne/instructions/agent-prompt.md +200 -0
- package/dist/autophase/auto-phase-planner.d.ts.map +0 -1
- package/dist/autophase/auto-phase-runner.d.ts.map +0 -1
- package/dist/autophase/checkpoint.d.ts.map +0 -1
- package/dist/autophase/index.d.ts.map +0 -1
- package/dist/autophase/phase-graph-builder.d.ts.map +0 -1
- package/dist/autophase/phase-orchestrator.d.ts.map +0 -1
- package/dist/autophase/phase-store.d.ts.map +0 -1
- package/dist/autophase/types.d.ts.map +0 -1
- /package/dist/{autophase → goal}/checkpoint.d.ts +0 -0
- /package/dist/{autophase → goal}/phase-graph-builder.d.ts +0 -0
- /package/dist/{autophase → goal}/phase-store.d.ts +0 -0
- /package/instructions/{autophase → goal}/phase-planner.md +0 -0
|
@@ -93,6 +93,13 @@ export declare class DefaultConfigLoader implements ConfigLoader {
|
|
|
93
93
|
skipIdentityValidation?: boolean;
|
|
94
94
|
}): Promise<Config>;
|
|
95
95
|
private ensureGlobalDefaults;
|
|
96
|
+
/**
|
|
97
|
+
* Ensure a profile config file exists at the given path.
|
|
98
|
+
* On first boot: migrate content from the old flat global config, or seed
|
|
99
|
+
* with behavior defaults. Subsequent boots: fill any missing keys from
|
|
100
|
+
* BEHAVIOR_DEFAULTS (keeping user settings intact).
|
|
101
|
+
*/
|
|
102
|
+
private ensureProfileConfig;
|
|
96
103
|
/**
|
|
97
104
|
* Persist a sync config to ~/.wrongstack/sync.json, with the token encrypted
|
|
98
105
|
* by the vault (if provided). The file is isolated from the main config
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/storage/config-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EACL,KAAK,MAAM,EACX,KAAK,YAAY,EAEjB,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAc5B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAK5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AA4O5D,KAAK,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG;IACrC,SAAS,CAAC,EAAE,MAAM,CAChB,MAAM,EACN;QAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CACzF,CAAC;IACF,2EAA2E;IAC3E,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;CACtC,CAAC;
|
|
1
|
+
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/storage/config-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EACL,KAAK,MAAM,EACX,KAAK,YAAY,EAEjB,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAc5B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAK5D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AAG,SAAS,CAAC;CAC7B;AAOD,qBAAa,mBAAoB,YAAW,YAAY;IACtD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAc;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAU;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA0B;IAChD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAiB;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;IAC9C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA2C;IAErE,YAAY,IAAI,EAAE,mBAAmB,EAQpC;IAED;;;;OAIG;IACH,OAAO,CAAC,OAAO;IAQT,IAAI,CACR,IAAI,GAAE;QACJ,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;QACvC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;KAC7B,GACL,OAAO,CAAC,MAAM,CAAC,CAgJjB;YAEa,oBAAoB;IA6FlC;;;;;OAKG;YACW,mBAAmB;IAoFjC;;;;OAIG;IACG,iBAAiB,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAkCtD;IAED;;;;;OAKG;IACG,cAAc,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAgEjD;YAEa,QAAQ;IA+EtB,OAAO,CAAC,gBAAgB;IA4DxB,OAAO,CAAC,gBAAgB;CAgBzB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as fsp from 'node:fs/promises';
|
|
2
2
|
import type { EventBus } from '../kernel/events.js';
|
|
3
|
-
import type { FileSnapshot, SessionEvent, SessionMetadata, SessionSummary, SessionWriter } from '../types/session.js';
|
|
4
3
|
import type { SecretScrubber } from '../types/secret-scrubber.js';
|
|
4
|
+
import type { FileSnapshot, SessionEvent, SessionMetadata, SessionSummary, SessionWriter } from '../types/session.js';
|
|
5
5
|
import type { SessionCheckpointCas } from './session-checkpoint-cas.js';
|
|
6
6
|
/**
|
|
7
7
|
* Append-mode JSONL session writer with batched writes, write serialization,
|
|
@@ -59,10 +59,9 @@ export declare class FileSessionWriter implements SessionWriter {
|
|
|
59
59
|
/**
|
|
60
60
|
* Scrub secrets out of conversation-turn events before they are observed
|
|
61
61
|
* for the summary, written to the JSONL log, or surfaced on resume. Only
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* also strips transient token-cache fields even when no scrubber is set.
|
|
62
|
+
* Conversation events carry free-form user/model text. Snapshot and exact
|
|
63
|
+
* message-journal normalization also strips transient token-cache fields
|
|
64
|
+
* even when no scrubber is set.
|
|
66
65
|
*/
|
|
67
66
|
private scrubEvent;
|
|
68
67
|
private pendingFileSnapshots;
|
|
@@ -102,7 +101,7 @@ export declare class FileSessionWriter implements SessionWriter {
|
|
|
102
101
|
secretScrubber?: SecretScrubber | undefined;
|
|
103
102
|
checkpointCas?: SessionCheckpointCas | undefined;
|
|
104
103
|
/** Called on close() with the finalized summary for index/sidecar writes. */
|
|
105
|
-
onClose?: ((
|
|
104
|
+
onClose?: ((summary: SessionSummary) => void | Promise<void>) | undefined;
|
|
106
105
|
}, traceId?: string | undefined);
|
|
107
106
|
get pendingToolUses(): string[];
|
|
108
107
|
private writeSessionStartLazy;
|
|
@@ -137,6 +136,20 @@ export declare class FileSessionWriter implements SessionWriter {
|
|
|
137
136
|
*/
|
|
138
137
|
private flushBuffer;
|
|
139
138
|
private flushBufferOnce;
|
|
139
|
+
/**
|
|
140
|
+
* Rebuild every accumulated summary counter by replaying the JSONL as it now
|
|
141
|
+
* stands on disk.
|
|
142
|
+
*
|
|
143
|
+
* Only truncation needs this: the counters are fed by `observeForSummary` as
|
|
144
|
+
* events go by and cannot un-count. Reading the whole file is fine here —
|
|
145
|
+
* rewind is a rare, explicitly user-driven operation, and the alternative
|
|
146
|
+
* (reversing each counter per discarded event) has to stay in lockstep with
|
|
147
|
+
* observeForSummary forever.
|
|
148
|
+
*
|
|
149
|
+
* `title` is deliberately re-derived too: the first surviving user_input may
|
|
150
|
+
* differ once earlier prompts are gone.
|
|
151
|
+
*/
|
|
152
|
+
private recomputeSummaryFromDisk;
|
|
140
153
|
private observeForSummary;
|
|
141
154
|
close(): Promise<void>;
|
|
142
155
|
private doClose;
|
|
@@ -148,7 +161,7 @@ export declare class FileSessionWriter implements SessionWriter {
|
|
|
148
161
|
* so post-checkpoint content is never read or parsed — O(1) memory instead
|
|
149
162
|
* of O(N) JSON.parse calls over the full file.
|
|
150
163
|
*/
|
|
151
|
-
truncateToCheckpoint(targetPromptIndex: number): Promise<number>;
|
|
164
|
+
truncateToCheckpoint(targetPromptIndex: number, revertedFiles?: readonly string[]): Promise<number>;
|
|
152
165
|
clearSession(): Promise<void>;
|
|
153
166
|
/**
|
|
154
167
|
* Write an in-flight marker. The agent loop should call
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-session-writer.d.ts","sourceRoot":"","sources":["../../src/storage/file-session-writer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,cAAc,EACd,aAAa,EAEd,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"file-session-writer.d.ts","sourceRoot":"","sources":["../../src/storage/file-session-writer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EACV,YAAY,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AM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuC/E;IAEK,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAOjF;IAED;;;;;OAKG;IACG,oBAAoB,CACxB,iBAAiB,EAAE,MAAM,EACzB,aAAa,GAAE,SAAS,MAAM,EAAO,GACpC,OAAO,CAAC,MAAM,CAAC,CA8OjB;IAEK,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CA4BlC;IAED;;;;;OAKG;IACG,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAcxD;IAED;;;;;;OAMG;IACG,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAelF;CACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { BrainArbiter } from '../coordination/brain.js';
|
|
2
|
+
import type { EventBus } from '../kernel/events.js';
|
|
3
|
+
import { type GoalFile } from './goal-store.js';
|
|
4
|
+
export interface CompletedGoalDeliverable {
|
|
5
|
+
index: number;
|
|
6
|
+
text: string;
|
|
7
|
+
}
|
|
8
|
+
export interface GoalCoordinationResult {
|
|
9
|
+
goal: GoalFile;
|
|
10
|
+
completed: CompletedGoalDeliverable[];
|
|
11
|
+
kanbanUpdatedTaskIds: string[];
|
|
12
|
+
reached: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface CoordinateGoalIterationOptions {
|
|
15
|
+
projectRoot: string;
|
|
16
|
+
goalPath: string;
|
|
17
|
+
finalText: string;
|
|
18
|
+
brain?: BrainArbiter | undefined;
|
|
19
|
+
sessionId?: string | undefined;
|
|
20
|
+
events?: EventBus | undefined;
|
|
21
|
+
now?: (() => Date) | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parse optional `[DONE: index]` / `[DONE: text-prefix]` markers emitted by an
|
|
25
|
+
* autonomy iteration. Numeric indices are human-facing and therefore 1-based;
|
|
26
|
+
* `0` is accepted as an explicit first-item alias for backwards compatibility.
|
|
27
|
+
*/
|
|
28
|
+
export declare function parseCompletedGoalDeliverables(finalText: string, deliverables: readonly string[]): CompletedGoalDeliverable[];
|
|
29
|
+
export declare function isGoalDeliverableComplete(value: string): boolean;
|
|
30
|
+
export declare function stripGoalDeliverableMarker(value: string): string;
|
|
31
|
+
/** Mark newly completed deliverables and recompute progress from the checklist. */
|
|
32
|
+
export declare function applyGoalDeliverableCompletions(goal: GoalFile, completed: readonly CompletedGoalDeliverable[]): GoalFile;
|
|
33
|
+
export declare function recomputeGoalProgress(goal: GoalFile): GoalFile;
|
|
34
|
+
/**
|
|
35
|
+
* Close the marker → Kanban → progress → Brain loop and persist the resulting
|
|
36
|
+
* goal state. Brain is called exactly once, and only when every deliverable is
|
|
37
|
+
* complete. A missing/negative Brain leaves the goal active at 100%.
|
|
38
|
+
*/
|
|
39
|
+
export declare function coordinateGoalIteration(options: CoordinateGoalIterationOptions): Promise<GoalCoordinationResult | null>;
|
|
40
|
+
//# sourceMappingURL=goal-coordination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goal-coordination.d.ts","sourceRoot":"","sources":["../../src/storage/goal-coordination.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAKL,KAAK,QAAQ,EACd,MAAM,iBAAiB,CAAC;AAUzB,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,wBAAwB,EAAE,CAAC;IACtC,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,8BAA8B;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9B,GAAG,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,SAAS,MAAM,EAAE,GAC9B,wBAAwB,EAAE,CAuB5B;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED,mFAAmF;AACnF,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,SAAS,wBAAwB,EAAE,GAC7C,QAAQ,CAkBV;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAM9D;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CA4ExC"}
|
|
@@ -13,8 +13,8 @@ export interface JournalEntry {
|
|
|
13
13
|
at: string;
|
|
14
14
|
/** Sequential iteration counter (1-based, monotonically increasing). */
|
|
15
15
|
iteration: number;
|
|
16
|
-
/** Source that produced the action ('todo' | 'git' | 'brainstorm' | 'resume' | 'manual' | 'parallel'). */
|
|
17
|
-
source: 'todo' | 'git' | 'brainstorm' | 'resume' | 'manual' | 'parallel';
|
|
16
|
+
/** Source that produced the action ('todo' | 'git' | 'brainstorm' | 'resume' | 'manual' | 'parallel' | 'deliverable'). */
|
|
17
|
+
source: 'todo' | 'git' | 'brainstorm' | 'resume' | 'manual' | 'parallel' | 'deliverable';
|
|
18
18
|
/** Short one-line description of what the iteration set out to do. */
|
|
19
19
|
task: string;
|
|
20
20
|
/** Outcome status. */
|
|
@@ -67,10 +67,14 @@ export interface GoalFile {
|
|
|
67
67
|
iterations: number;
|
|
68
68
|
/** Engine lifecycle state — 'running' means another process owns this goal. */
|
|
69
69
|
engineState: 'idle' | 'running' | 'stopped';
|
|
70
|
-
/**
|
|
71
|
-
* Mission-level lifecycle.
|
|
72
|
-
*/
|
|
70
|
+
/** Mission-level lifecycle. */
|
|
73
71
|
goalState?: 'active' | 'paused' | 'completed' | 'abandoned' | undefined;
|
|
72
|
+
/** Goal-linked Kanban board id. Optional for pre-Kanban goal files. */
|
|
73
|
+
kanbanBoardId?: string | undefined;
|
|
74
|
+
/** ISO timestamp recorded after Brain verifies that every deliverable is reached. */
|
|
75
|
+
reachedAt?: string | undefined;
|
|
76
|
+
/** Durable human-readable reach verdict; currently the literal `goal reached`. */
|
|
77
|
+
reachedNote?: string | undefined;
|
|
74
78
|
/**
|
|
75
79
|
* Per-todo attempt counter.
|
|
76
80
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goal-store.d.ts","sourceRoot":"","sources":["../../src/storage/goal-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAOpD;;;;;;;;GAQG;AAEH,MAAM,WAAW,YAAY;IAC3B,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,
|
|
1
|
+
{"version":3,"file":"goal-store.d.ts","sourceRoot":"","sources":["../../src/storage/goal-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CA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.js';
|
|
|
5
5
|
export { DefaultAttachmentStore, type AttachmentStoreOptions, } from './attachment-store.js';
|
|
6
6
|
export { FileMemoryBackend, type FileMemoryBackendOptions, type MemoryBackend, parseEntries, } from './memory-backend.js';
|
|
7
7
|
export { GraphMemoryBackend, type GraphMemoryBackendOptions, } from './memory-graph-backend.js';
|
|
8
|
-
export { SessionMemoryConsolidator, type MemoryConsolidatorOptions, type ConsolidationOp, } from './memory-consolidator.js';
|
|
8
|
+
export { SessionMemoryConsolidator, type MemoryConsolidatorOptions, type ConsolidationOp, type ConsolidatorSuperMemory, } from './memory-consolidator.js';
|
|
9
9
|
export { DefaultConfigStore } from './config-store.js';
|
|
10
|
-
export { watchProviderConfig, type ProviderConfigSnapshot, type WatchProviderConfigOptions, } from './provider-config-watcher.js';
|
|
10
|
+
export { readProviderSnapshot, watchProviderConfig, type ProviderConfigSnapshot, type WatchProviderConfigOptions, } from './provider-config-watcher.js';
|
|
11
11
|
export { DefaultConfigLoader, type ConfigLoaderOptions, type ConfigSource, } from './config-loader.js';
|
|
12
12
|
export { runConfigMigrations, ConfigMigrationError, DEFAULT_CONFIG_MIGRATIONS, type ConfigMigration, type MigrationContext, type MigrationResult, } from './config-migration.js';
|
|
13
13
|
export { RecoveryLock, type RecoveryLockOptions, type AbandonedSession, } from './recovery-lock.js';
|
|
@@ -22,6 +22,7 @@ export { SessionRegistry, getSessionRegistry, hasSessionRegistry, type SessionRe
|
|
|
22
22
|
export { AgentStatusTracker, type AgentStatusTrackerOptions, } from '../agent-status-tracker.js';
|
|
23
23
|
export { FleetNotifier, type FleetNotifierOptions, } from '../fleet-notifier.js';
|
|
24
24
|
export { DefaultSessionRewinder, type SessionRewinderOptions, } from './session-rewinder.js';
|
|
25
|
+
export { applyRewindToConversation, type ApplyRewindOptions, type ApplyRewindResult, type RewindableConversation, } from './session-rewind-apply.js';
|
|
25
26
|
export { attachTodosCheckpoint, loadTodosCheckpoint, saveTodosCheckpoint, type TodosCheckpointFile, } from './todos-checkpoint.js';
|
|
26
27
|
export { loadCompletedWorkCheckpoint, saveCompletedWorkCheckpoint, type CompletedWorkCheckpointFile, } from './completed-work-checkpoint.js';
|
|
27
28
|
export { attachPlanCheckpoint, loadPlan, savePlan, emptyPlan, addPlanItem, removePlanItem, setPlanItemStatus, clearPlan, formatPlan, deriveTodosFromPlanItem, mutatePlan, type PlanItem, type PlanFile, } from './plan-store.js';
|
|
@@ -30,6 +31,7 @@ export { loadTasks, saveTasks, emptyTaskFile, mutateTasks, type TaskFile, } from
|
|
|
30
31
|
export { DirectorStateCheckpoint, loadDirectorState, type DirectorStateSnapshot, type DirectorTaskState, type DirectorSubagentState, } from './director-state.js';
|
|
31
32
|
export { loadGoal, saveGoal, emptyGoal, appendJournal, formatGoal, setProgress, recordProgress, parseProgressFromText, goalFilePath, summarizeUsage, MAX_JOURNAL_ENTRIES, MAX_PROGRESS_HISTORY, type GoalFile, type JournalEntry, type ProgressSnapshot, } from './goal-store.js';
|
|
32
33
|
export { createGoalKanbanBoard, findGoalKanbanBoard, deleteGoalKanbanBoard, findGoalBoardByTag, formatGoalKanbanPreview, formatGoalEvent, formatGoalAutonomyChoice, parseAutonomyChoice, type GoalFileWithKanban, } from './goal-kanban.js';
|
|
34
|
+
export { applyGoalDeliverableCompletions, coordinateGoalIteration, isGoalDeliverableComplete, parseCompletedGoalDeliverables, recomputeGoalProgress, stripGoalDeliverableMarker, type CompletedGoalDeliverable, type CoordinateGoalIterationOptions, type GoalCoordinationResult, } from './goal-coordination.js';
|
|
33
35
|
export { DefaultPromptStore, migratePromptEntry, promptChecksum, type PromptStore, type PromptEntry, } from './prompt-store.js';
|
|
34
36
|
export { PromptUsageStore, type PromptUsage } from './prompt-usage-store.js';
|
|
35
37
|
export { InputHistoryStore, INPUT_HISTORY_DEFAULT_MAX, } from './input-history-store.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,KAAK,mBAAmB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,GACjC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,UAAU,EACV,KAAK,kBAAkB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,GAC/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,KAAK,mBAAmB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,GACjC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,UAAU,EACV,KAAK,kBAAkB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,GAC/B,MAAM,2BA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