@wolfx/opencode-magic-context 0.26.0-patch.1 → 0.27.2-patch.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/agents/dreamer.d.ts +19 -0
- package/dist/agents/dreamer.d.ts.map +1 -1
- package/dist/agents/hidden-agent-registrations.d.ts +67 -0
- package/dist/agents/hidden-agent-registrations.d.ts.map +1 -0
- package/dist/agents/historian.d.ts +1 -0
- package/dist/agents/historian.d.ts.map +1 -1
- package/dist/agents/permissions.d.ts +15 -44
- package/dist/agents/permissions.d.ts.map +1 -1
- package/dist/agents/smart-note-compiler.d.ts +2 -0
- package/dist/agents/smart-note-compiler.d.ts.map +1 -0
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/migrate-config-location.d.ts +97 -0
- package/dist/config/migrate-config-location.d.ts.map +1 -0
- package/dist/config/migrate-dreamer-v2.d.ts +37 -0
- package/dist/config/migrate-dreamer-v2.d.ts.map +1 -0
- package/dist/config/migrate-experimental.d.ts.map +1 -1
- package/dist/config/project-security.d.ts +3 -0
- package/dist/config/project-security.d.ts.map +1 -1
- package/dist/config/prune-config-leaf.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +584 -60
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/features/magic-context/compaction-marker.d.ts +9 -3
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts +1 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/classify-prompt.d.ts +50 -0
- package/dist/features/magic-context/dreamer/classify-prompt.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/classify.d.ts +22 -0
- package/dist/features/magic-context/dreamer/classify.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/cron.d.ts +72 -0
- package/dist/features/magic-context/dreamer/cron.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/evaluate-smart-notes.d.ts +30 -0
- package/dist/features/magic-context/dreamer/evaluate-smart-notes.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/index.d.ts +1 -3
- package/dist/features/magic-context/dreamer/index.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/lease.d.ts +44 -6
- package/dist/features/magic-context/dreamer/lease.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/maintain-docs-protected-enforcement.d.ts +13 -0
- package/dist/features/magic-context/dreamer/maintain-docs-protected-enforcement.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/map-memories-prompt.d.ts +36 -0
- package/dist/features/magic-context/dreamer/map-memories-prompt.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/map-memories.d.ts +22 -0
- package/dist/features/magic-context/dreamer/map-memories.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/open-opencode-db.d.ts +7 -0
- package/dist/features/magic-context/dreamer/open-opencode-db.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/primer-seed.d.ts +25 -0
- package/dist/features/magic-context/dreamer/primer-seed.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/promote-primers.d.ts +21 -0
- package/dist/features/magic-context/dreamer/promote-primers.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/protected-regions.d.ts +19 -0
- package/dist/features/magic-context/dreamer/protected-regions.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/refresh-primers.d.ts +30 -0
- package/dist/features/magic-context/dreamer/refresh-primers.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/retrospective-learnings.d.ts +47 -0
- package/dist/features/magic-context/dreamer/retrospective-learnings.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/retrospective-orphan-sweep.d.ts +48 -0
- package/dist/features/magic-context/dreamer/retrospective-orphan-sweep.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/retrospective-raw-provider.d.ts +81 -0
- package/dist/features/magic-context/dreamer/retrospective-raw-provider.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/storage-dream-runs.d.ts +8 -0
- package/dist/features/magic-context/dreamer/storage-dream-runs.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/storage-task-schedule.d.ts +82 -0
- package/dist/features/magic-context/dreamer/storage-task-schedule.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/task-config.d.ts +28 -0
- package/dist/features/magic-context/dreamer/task-config.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/task-executor.d.ts +49 -0
- package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/task-gates.d.ts +29 -0
- package/dist/features/magic-context/dreamer/task-gates.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/task-prompts.d.ts +37 -6
- package/dist/features/magic-context/dreamer/task-prompts.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-registry.d.ts +48 -0
- package/dist/features/magic-context/dreamer/task-registry.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts +88 -0
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/verify-gate.d.ts +43 -0
- package/dist/features/magic-context/dreamer/verify-gate.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/verify-prompt.d.ts +41 -0
- package/dist/features/magic-context/dreamer/verify-prompt.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/verify.d.ts +43 -0
- package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -0
- package/dist/features/magic-context/git-commits/search-git-commits.d.ts +2 -0
- package/dist/features/magic-context/git-commits/search-git-commits.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/storage-git-commit-embeddings.d.ts +4 -4
- package/dist/features/magic-context/git-commits/storage-git-commit-embeddings.d.ts.map +1 -1
- package/dist/features/magic-context/index.d.ts +1 -0
- package/dist/features/magic-context/index.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-cache.d.ts +2 -2
- package/dist/features/magic-context/memory/embedding-cache.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-openai.d.ts +12 -5
- package/dist/features/magic-context/memory/embedding-openai.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding.d.ts +2 -2
- package/dist/features/magic-context/memory/embedding.d.ts.map +1 -1
- package/dist/features/magic-context/memory/index.d.ts +4 -1
- package/dist/features/magic-context/memory/index.d.ts.map +1 -1
- package/dist/features/magic-context/memory/memory-migration.d.ts +1 -0
- package/dist/features/magic-context/memory/memory-migration.d.ts.map +1 -1
- package/dist/features/magic-context/memory/promotion.d.ts +16 -4
- package/dist/features/magic-context/memory/promotion.d.ts.map +1 -1
- package/dist/features/magic-context/memory/storage-memory-embeddings.d.ts +2 -2
- package/dist/features/magic-context/memory/storage-memory-embeddings.d.ts.map +1 -1
- package/dist/features/magic-context/memory/storage-memory-verifications.d.ts +31 -0
- package/dist/features/magic-context/memory/storage-memory-verifications.d.ts.map +1 -0
- package/dist/features/magic-context/memory/storage-memory.d.ts +12 -1
- package/dist/features/magic-context/memory/storage-memory.d.ts.map +1 -1
- package/dist/features/magic-context/memory/types.d.ts +4 -0
- package/dist/features/magic-context/memory/types.d.ts.map +1 -1
- package/dist/features/magic-context/memory/verification-paths.d.ts +32 -0
- package/dist/features/magic-context/memory/verification-paths.d.ts.map +1 -0
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
- package/dist/features/magic-context/primer-clustering.d.ts +29 -0
- package/dist/features/magic-context/primer-clustering.d.ts.map +1 -0
- package/dist/features/magic-context/project-embedding-registry.d.ts +25 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts +12 -2
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/sidekick/agent.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/capabilities.d.ts +31 -0
- package/dist/features/magic-context/smart-notes/capabilities.d.ts.map +1 -0
- package/dist/features/magic-context/smart-notes/compiler-prompt.d.ts +2 -0
- package/dist/features/magic-context/smart-notes/compiler-prompt.d.ts.map +1 -0
- package/dist/features/magic-context/smart-notes/compiler.d.ts +52 -0
- package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -0
- package/dist/features/magic-context/smart-notes/index.d.ts +10 -0
- package/dist/features/magic-context/smart-notes/index.d.ts.map +1 -0
- package/dist/features/magic-context/smart-notes/runner.d.ts +18 -0
- package/dist/features/magic-context/smart-notes/runner.d.ts.map +1 -0
- package/dist/features/magic-context/smart-notes/sandbox-runner.d.ts +22 -0
- package/dist/features/magic-context/smart-notes/sandbox-runner.d.ts.map +1 -0
- package/dist/features/magic-context/smart-notes/schedule.d.ts +9 -0
- package/dist/features/magic-context/smart-notes/schedule.d.ts.map +1 -0
- package/dist/features/magic-context/smart-notes/ssrf-guard.d.ts +49 -0
- package/dist/features/magic-context/smart-notes/ssrf-guard.d.ts.map +1 -0
- package/dist/features/magic-context/smart-notes/storage.d.ts +27 -0
- package/dist/features/magic-context/smart-notes/storage.d.ts.map +1 -0
- package/dist/features/magic-context/smart-notes/types.d.ts +63 -0
- package/dist/features/magic-context/smart-notes/types.d.ts.map +1 -0
- package/dist/features/magic-context/storage-db.d.ts +5 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +8 -4
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-shared.d.ts +3 -1
- package/dist/features/magic-context/storage-meta-shared.d.ts.map +1 -1
- package/dist/features/magic-context/storage-notes.d.ts +15 -0
- package/dist/features/magic-context/storage-notes.d.ts.map +1 -1
- package/dist/features/magic-context/storage-primers.d.ts +85 -0
- package/dist/features/magic-context/storage-primers.d.ts.map +1 -0
- package/dist/features/magic-context/storage-tags.d.ts +20 -0
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/storage.d.ts +2 -1
- package/dist/features/magic-context/storage.d.ts.map +1 -1
- package/dist/features/magic-context/tagger.d.ts +6 -0
- package/dist/features/magic-context/tagger.d.ts.map +1 -1
- package/dist/features/magic-context/tool-owner-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts +10 -0
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/features/magic-context/types.d.ts +2 -0
- package/dist/features/magic-context/types.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts +5 -0
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/storage-user-memory.d.ts +18 -0
- package/dist/features/magic-context/user-memory/storage-user-memory.d.ts.map +1 -1
- package/dist/features/magic-context/v22-deferred-backfill.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-hint.d.ts.map +1 -1
- package/dist/hooks/magic-context/command-handler.d.ts +8 -15
- package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-parser.d.ts +9 -0
- package/dist/hooks/magic-context/compartment-parser.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-prompt.d.ts +4 -1
- package/dist/hooks/magic-context/compartment-prompt.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts +1 -0
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-partial-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +8 -0
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/ctx-reduce-nudge.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-resolvers.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-prompt.generated.d.ts +1 -1
- package/dist/hooks/magic-context/historian-prompt.generated.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-state-file.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook-handlers.d.ts +2 -1
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +1 -0
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +0 -3
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/send-session-notification.d.ts +2 -0
- package/dist/hooks/magic-context/send-session-notification.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-prompt-hash.d.ts +17 -0
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +8 -5
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +0 -2
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18046 -12830
- package/dist/plugin/dream-timer.d.ts +17 -9
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/plugin/embedding-bootstrap-helpers.d.ts +1 -1
- package/dist/plugin/embedding-bootstrap-helpers.d.ts.map +1 -1
- package/dist/plugin/embedding-bootstrap.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +211 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/instance-disposal.d.ts +2 -0
- package/dist/plugin/instance-disposal.d.ts.map +1 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/shared/announcement.d.ts +1 -1
- package/dist/shared/announcement.d.ts.map +1 -1
- package/dist/shared/data-path.d.ts +30 -9
- package/dist/shared/data-path.d.ts.map +1 -1
- package/dist/shared/model-suggestion-retry.d.ts +48 -2
- package/dist/shared/model-suggestion-retry.d.ts.map +1 -1
- package/dist/shared/models-dev-cache.d.ts +23 -0
- package/dist/shared/models-dev-cache.d.ts.map +1 -1
- package/dist/shared/redaction.d.ts +7 -0
- package/dist/shared/redaction.d.ts.map +1 -0
- package/dist/shared/resolve-fallbacks.d.ts +12 -0
- package/dist/shared/resolve-fallbacks.d.ts.map +1 -1
- package/dist/shared/rpc-server.d.ts.map +1 -1
- package/dist/shared/rpc-types.d.ts +2 -0
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/subagent-runner.d.ts +12 -3
- package/dist/shared/subagent-runner.d.ts.map +1 -1
- package/dist/shared/tui-config.d.ts.map +1 -1
- package/dist/tools/ctx-memory/tools.d.ts.map +1 -1
- package/dist/tools/ctx-memory/types.d.ts.map +1 -1
- package/dist/tools/ctx-memory/verification-recording.d.ts +8 -0
- package/dist/tools/ctx-memory/verification-recording.d.ts.map +1 -0
- package/dist/tools/ctx-search/tools.d.ts.map +1 -1
- package/dist/tools/ctx-search/types.d.ts +1 -1
- package/dist/tools/ctx-search/types.d.ts.map +1 -1
- package/dist/tui/data/context-db.d.ts +2 -0
- package/dist/tui/data/context-db.d.ts.map +1 -1
- package/package.json +6 -1
- package/src/shared/announcement.test.ts +20 -0
- package/src/shared/announcement.ts +32 -7
- package/src/shared/data-path.test.ts +74 -9
- package/src/shared/data-path.ts +54 -10
- package/src/shared/model-suggestion-retry.test.ts +79 -2
- package/src/shared/model-suggestion-retry.ts +181 -3
- package/src/shared/models-dev-cache.test.ts +82 -0
- package/src/shared/models-dev-cache.ts +35 -0
- package/src/shared/redaction.test.ts +84 -0
- package/src/shared/redaction.ts +264 -0
- package/src/shared/resolve-fallbacks.ts +14 -0
- package/src/shared/rpc-server.ts +24 -0
- package/src/shared/rpc-types.ts +2 -0
- package/src/shared/subagent-runner.ts +12 -3
- package/src/shared/tui-config.test.ts +106 -0
- package/src/shared/tui-config.ts +75 -40
- package/src/tui/data/context-db.ts +12 -0
- package/src/tui/index.tsx +87 -17
- package/src/tui/slots/sidebar-content.tsx +4 -0
- package/dist/features/magic-context/dreamer/queue.d.ts +0 -55
- package/dist/features/magic-context/dreamer/queue.d.ts.map +0 -1
- package/dist/features/magic-context/dreamer/runner.d.ts +0 -92
- package/dist/features/magic-context/dreamer/runner.d.ts.map +0 -1
- package/dist/features/magic-context/dreamer/scheduler.d.ts +0 -29
- package/dist/features/magic-context/dreamer/scheduler.d.ts.map +0 -1
- package/dist/features/magic-context/key-files/aft-availability.d.ts +0 -11
- package/dist/features/magic-context/key-files/aft-availability.d.ts.map +0 -1
- package/dist/features/magic-context/key-files/identify-key-files.d.ts +0 -84
- package/dist/features/magic-context/key-files/identify-key-files.d.ts.map +0 -1
- package/dist/features/magic-context/key-files/project-key-files.d.ts +0 -42
- package/dist/features/magic-context/key-files/project-key-files.d.ts.map +0 -1
- package/dist/features/magic-context/key-files/read-history.d.ts +0 -26
- package/dist/features/magic-context/key-files/read-history.d.ts.map +0 -1
- package/dist/features/magic-context/key-files/read-stats.d.ts +0 -18
- package/dist/features/magic-context/key-files/read-stats.d.ts.map +0 -1
- package/dist/features/magic-context/key-files/storage-key-files.d.ts +0 -20
- package/dist/features/magic-context/key-files/storage-key-files.d.ts.map +0 -1
- package/dist/hooks/magic-context/key-files-block.d.ts +0 -27
- package/dist/hooks/magic-context/key-files-block.d.ts.map +0 -1
package/dist/agents/dreamer.d.ts
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
1
|
export declare const DREAMER_AGENT = "dreamer";
|
|
2
|
+
export declare const DREAMER_RETROSPECTIVE_AGENT = "dreamer-retrospective";
|
|
3
|
+
export declare const DREAMER_PRIMER_INVESTIGATOR_AGENT = "dreamer-primer-investigator";
|
|
4
|
+
export declare const DREAMER_MEMORY_MAPPER_AGENT = "dreamer-memory-mapper";
|
|
5
|
+
/** Read-only tool profile shared by the memory-maintenance reader agent.
|
|
6
|
+
* No ctx_search (local-source checks only), no write/bash/ctx_memory. */
|
|
7
|
+
export declare const DREAMER_MEMORY_MAPPER_ALLOWED_TOOLS: readonly ["read", "grep", "glob", "aft_outline", "aft_zoom", "aft_search"];
|
|
8
|
+
export declare const DREAMER_CLASSIFIER_AGENT = "dreamer-classifier";
|
|
9
|
+
export declare const DREAMER_DOCS_AGENT = "dreamer-docs";
|
|
10
|
+
/** Codebase-read + doc-write tool profile for the docs maintainer. No memory
|
|
11
|
+
* tools (it edits docs, not the memory store). */
|
|
12
|
+
export declare const DREAMER_DOCS_ALLOWED_TOOLS: readonly ["read", "grep", "glob", "bash", "write", "edit", "aft_outline", "aft_zoom", "aft_search"];
|
|
13
|
+
export declare const DREAMER_REVIEWER_AGENT = "dreamer-reviewer";
|
|
14
|
+
/** Tool profile for the base `dreamer` agent, now CURATE-ONLY (memory-pool
|
|
15
|
+
* hygiene). Curate edits the memory store through ctx_memory and never reads
|
|
16
|
+
* code (a separate verify task owns memory-vs-code correctness), so it needs
|
|
17
|
+
* only ctx_memory — not the former bash/write/edit/read/aft/ctx_search/ctx_note
|
|
18
|
+
* kitchen sink. Kept on the `dreamer` id so the ctx_memory dreamer-action gate
|
|
19
|
+
* (toolContext.agent === DREAMER_AGENT) still recognizes it. */
|
|
20
|
+
export declare const DREAMER_CURATE_ALLOWED_TOOLS: readonly ["ctx_memory"];
|
|
2
21
|
//# sourceMappingURL=dreamer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dreamer.d.ts","sourceRoot":"","sources":["../../src/agents/dreamer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"dreamer.d.ts","sourceRoot":"","sources":["../../src/agents/dreamer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,2BAA2B,0BAA0B,CAAC;AAOnE,eAAO,MAAM,iCAAiC,gCAAgC,CAAC;AAQ/E,eAAO,MAAM,2BAA2B,0BAA0B,CAAC;AAEnE;0EAC0E;AAC1E,eAAO,MAAM,mCAAmC,4EAOtC,CAAC;AAMX,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAO7D,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD;mDACmD;AACnD,eAAO,MAAM,0BAA0B,qGAU7B,CAAC;AAKX,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AAEzD;;;;;iEAKiE;AACjE,eAAO,MAAM,4BAA4B,yBAA0B,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static registration data for one hidden agent. The id / allow-list / step cap
|
|
3
|
+
* are INLINE LITERALS in {@link buildHiddenAgentRegistrations} rather than
|
|
4
|
+
* cross-module `const` imports.
|
|
5
|
+
*
|
|
6
|
+
* # Why inline
|
|
7
|
+
*
|
|
8
|
+
* Belt-and-suspenders, not the load-bearing fix. The load failure was caused by
|
|
9
|
+
* exporting helpers from the entry module (see the module header) — that is what
|
|
10
|
+
* the entry-only-`default` rule fixes. Inlining the small id/tool/step values
|
|
11
|
+
* additionally removes any dependency on cross-module top-level `const` init
|
|
12
|
+
* timing, so this builder returns a complete, valid registration set the instant
|
|
13
|
+
* it is called regardless of module-evaluation order. Cheap insurance for a path
|
|
14
|
+
* that runs once per plugin-instance boot.
|
|
15
|
+
*
|
|
16
|
+
* The only value that cannot be inlined is the multi-KB generated system prompt;
|
|
17
|
+
* it stays a module `var` and is guarded at the call site (skip the agent + log
|
|
18
|
+
* if undefined, never register a broken/deny-all agent).
|
|
19
|
+
*
|
|
20
|
+
* `agent-registration-drift.test.ts` asserts the inline literals here stay
|
|
21
|
+
* byte-identical to the canonical exported constants so they can't silently
|
|
22
|
+
* diverge.
|
|
23
|
+
*/
|
|
24
|
+
export interface HiddenAgentRegistration {
|
|
25
|
+
id: string;
|
|
26
|
+
prompt: string | undefined;
|
|
27
|
+
allowedTools: readonly string[];
|
|
28
|
+
maxSteps: number;
|
|
29
|
+
overrides?: Record<string, unknown>;
|
|
30
|
+
/** Drop any user `permission` override (privacy-critical agents only). */
|
|
31
|
+
lockPermissions?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Hoisted function declaration: returns the four hidden-agent registrations with
|
|
35
|
+
* INLINE id / allow-list / step-cap literals (see {@link HiddenAgentRegistration}
|
|
36
|
+
* for why these must not come from module-level `var` consts). Prompts and
|
|
37
|
+
* computed overrides are passed in by the caller; the historian disallow filter
|
|
38
|
+
* is applied here against an inline default allow-list.
|
|
39
|
+
*/
|
|
40
|
+
export declare function buildHiddenAgentRegistrations(args: {
|
|
41
|
+
dreamerPrompt: string | undefined;
|
|
42
|
+
smartNoteCompilerPrompt?: string | undefined;
|
|
43
|
+
historianPrompt: string | undefined;
|
|
44
|
+
historianRecompPrompt?: string | undefined;
|
|
45
|
+
historianEditorPrompt: string | undefined;
|
|
46
|
+
sidekickPrompt: string | undefined;
|
|
47
|
+
dreamerOverrides?: Record<string, unknown>;
|
|
48
|
+
historianOverrides?: Record<string, unknown>;
|
|
49
|
+
sidekickOverrides?: Record<string, unknown>;
|
|
50
|
+
historianDisallowed: readonly string[];
|
|
51
|
+
}): HiddenAgentRegistration[];
|
|
52
|
+
/**
|
|
53
|
+
* Build a hidden-agent config with a deny-everything-by-default permission
|
|
54
|
+
* baseline and a hard tool-iteration ceiling. User overrides may lower
|
|
55
|
+
* `steps`/`maxSteps`, but cannot raise either above the built-in cap.
|
|
56
|
+
*/
|
|
57
|
+
export declare function buildHiddenAgentConfig(prompt: string, allowedTools: readonly string[], maxSteps: number, overrides?: Record<string, unknown>, agentLabel?: string, lockPermissions?: boolean): {
|
|
58
|
+
steps: number;
|
|
59
|
+
maxSteps: number;
|
|
60
|
+
permission: {
|
|
61
|
+
[x: string]: unknown;
|
|
62
|
+
};
|
|
63
|
+
mode: "subagent";
|
|
64
|
+
hidden: boolean;
|
|
65
|
+
prompt: string;
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=hidden-agent-registrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hidden-agent-registrations.d.ts","sourceRoot":"","sources":["../../src/agents/hidden-agent-registrations.ts"],"names":[],"mappings":"AAiCA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,uBAAuB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,0EAA0E;IAC1E,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE;IAChD,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,uBAAuB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,qBAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C,GAAG,uBAAuB,EAAE,CA0K5B;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAClC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,UAAQ;;;;;;;;;EA+D1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"historian.d.ts","sourceRoot":"","sources":["../../src/agents/historian.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,sBAAsB,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"historian.d.ts","sourceRoot":"","sources":["../../src/agents/historian.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC"}
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
* `explore`/`scout`/`general` agents and by Alfonso for its static
|
|
81
81
|
* agent profiles.
|
|
82
82
|
*/
|
|
83
|
-
export declare function buildAllowOnlyPermission(allowedTools: readonly string[]): Record<string, "deny" | "allow">;
|
|
83
|
+
export declare function buildAllowOnlyPermission(allowedTools: readonly string[] | undefined, agentLabel?: string): Record<string, "deny" | "allow">;
|
|
84
84
|
/**
|
|
85
85
|
* Tools the historian + historian-editor + compressor agents need.
|
|
86
86
|
*
|
|
@@ -103,49 +103,6 @@ export declare const HISTORIAN_ALLOWED_TOOLS: readonly ["read", "aft_outline", "
|
|
|
103
103
|
* config schema rejects them at parse time, so this is defense-in-depth).
|
|
104
104
|
*/
|
|
105
105
|
export declare function applyDisallowedTools(defaults: readonly string[], disallowed: readonly string[]): readonly string[];
|
|
106
|
-
/**
|
|
107
|
-
* Tools the dreamer agent needs. This is the broadest hidden-agent
|
|
108
|
-
* surface because dreamer's tasks legitimately require local-repo
|
|
109
|
-
* exploration plus external command execution:
|
|
110
|
-
*
|
|
111
|
-
* - `ctx_memory` / `ctx_search` / `ctx_note` — the canonical memory
|
|
112
|
-
* CRUD and retrieval path for consolidate / verify / archive /
|
|
113
|
-
* improve and smart-note dismissal.
|
|
114
|
-
* - `read` / `grep` / `glob` — the verify task prompt
|
|
115
|
-
* (`task-prompts.ts`) explicitly tells the model to grep schema
|
|
116
|
-
* files for default values, read source to confirm claimed
|
|
117
|
-
* behavior, and use glob for project structure inventory.
|
|
118
|
-
* - `bash` — required for smart-note condition evaluation (the
|
|
119
|
-
* prompt explicitly mentions `gh` / `git` / `curl` / file reads),
|
|
120
|
-
* for the verify task's `git log --oneline --since=...` step, and
|
|
121
|
-
* for the improve task's `find` / `grep` directory inventory. The
|
|
122
|
-
* live OpenCode DB shows over 100 `bash` invocations across
|
|
123
|
-
* consolidate / verify / improve / archive-stale / smart-notes
|
|
124
|
-
* dreamer child sessions, so removing it would regress real,
|
|
125
|
-
* documented dreamer behavior.
|
|
126
|
-
* - `write` / `edit` — the maintain-docs task (`task-prompts.ts`)
|
|
127
|
-
* explicitly instructs the model to "Write or update using the
|
|
128
|
-
* Write tool" to keep `ARCHITECTURE.md` / `STRUCTURE.md` at the
|
|
129
|
-
* project root synchronized. Without these tools the dreamer was
|
|
130
|
-
* forced to emit docs through `bash` heredocs/`sed` — fragile and
|
|
131
|
-
* hard to review. Granting `write` + `edit` lets it use the proper
|
|
132
|
-
* file tools (which back up + validate) instead.
|
|
133
|
-
* - `aft_search` — primary read-only code search for the verify /
|
|
134
|
-
* improve / maintain-docs tasks; finds the symbols and call sites a
|
|
135
|
-
* doc/memory rewrite must describe, more precisely than raw `grep`.
|
|
136
|
-
*
|
|
137
|
-
* Deliberately NOT allowed:
|
|
138
|
-
* - `task` — no subagent fanout from dreamer
|
|
139
|
-
* - `webfetch` / `websearch` — out of scope; smart-note URL fetches
|
|
140
|
-
* go through `bash` + `curl` instead
|
|
141
|
-
*
|
|
142
|
-
* Note: `write` / `edit` grant general file-write capability (the
|
|
143
|
-
* permission gate is tool-level, not path-level). Dreamer is a trusted
|
|
144
|
-
* hidden agent whose prompts scope writes to docs + memory; the
|
|
145
|
-
* task-prompts still say "Do not commit changes," so it edits the
|
|
146
|
-
* working tree but never commits.
|
|
147
|
-
*/
|
|
148
|
-
export declare const DREAMER_ALLOWED_TOOLS: readonly ["read", "grep", "glob", "bash", "write", "edit", "aft_outline", "aft_zoom", "aft_search", "ctx_memory", "ctx_search", "ctx_note"];
|
|
149
106
|
/**
|
|
150
107
|
* Tools the sidekick agent needs. Sidekick is a read-only memory
|
|
151
108
|
* retriever for `/ctx-aug` — it queries the project's memory store
|
|
@@ -159,5 +116,19 @@ export declare const DREAMER_ALLOWED_TOOLS: readonly ["read", "grep", "glob", "b
|
|
|
159
116
|
*
|
|
160
117
|
* Still denied: spawning subagents, edits, bash, web fetches.
|
|
161
118
|
*/
|
|
119
|
+
export declare const DREAMER_RETROSPECTIVE_ALLOWED_TOOLS: readonly ["ctx_search"];
|
|
120
|
+
/**
|
|
121
|
+
* The refresh-primers code investigator: read + navigate + search the CURRENT
|
|
122
|
+
* source to answer a primer question. NO write/edit/bash (could corrupt user
|
|
123
|
+
* source) and NO ctx_memory/ctx_note (a ctx_memory mutation bumps the project
|
|
124
|
+
* memory epoch → busts m[0], breaking the primers cache-neutral contract).
|
|
125
|
+
*/
|
|
126
|
+
export declare const DREAMER_PRIMER_INVESTIGATOR_ALLOWED_TOOLS: readonly ["read", "grep", "glob", "aft_outline", "aft_zoom", "aft_search", "ctx_search"];
|
|
127
|
+
/**
|
|
128
|
+
* The smart-note compiler consumes untrusted note text and emits code that will
|
|
129
|
+
* later run in the QuickJS sandbox. It must not have ambient tools: all I/O is
|
|
130
|
+
* performed only when the compiled check runs through the host capability API.
|
|
131
|
+
*/
|
|
132
|
+
export declare const SMART_NOTE_COMPILER_ALLOWED_TOOLS: readonly [];
|
|
162
133
|
export declare const SIDEKICK_ALLOWED_TOOLS: readonly ["ctx_search", "aft_outline", "aft_zoom"];
|
|
163
134
|
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/agents/permissions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/agents/permissions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACpC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAC3C,UAAU,CAAC,EAAE,MAAM,GACpB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAoBlC;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,uBAAuB,4DAA6D,CAAC;AAElG;;;;GAIG;AACH,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,UAAU,EAAE,SAAS,MAAM,EAAE,GAC9B,SAAS,MAAM,EAAE,CAGnB;AAQD;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,mCAAmC,yBAA0B,CAAC;AAE3E;;;;;GAKG;AACH,eAAO,MAAM,yCAAyC,0FAQ5C,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,aAAc,CAAC;AAE7D,eAAO,MAAM,sBAAsB,oDAAqD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-note-compiler.d.ts","sourceRoot":"","sources":["../../src/agents/smart-note-compiler.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,wBAAwB,CAAC"}
|
package/dist/config/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface MagicContextPluginConfig extends MagicContextConfig {
|
|
|
9
9
|
subtask?: boolean;
|
|
10
10
|
}>;
|
|
11
11
|
}
|
|
12
|
-
export type LoadOutcome = "ok" | "project-file-parse-error" | "project-file-io-error" | "schema-recovery" | "substitution-failure";
|
|
12
|
+
export type LoadOutcome = "ok" | "project-file-parse-error" | "project-file-io-error" | "legacy-config-unmigrated" | "schema-recovery" | "substitution-failure";
|
|
13
13
|
export interface LoadResultDetailed {
|
|
14
14
|
config: MagicContextPluginConfig & {
|
|
15
15
|
configWarnings?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,wBAAwB,CAAC;AAG3F,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;IAChE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CACZ,MAAM,EACN;QACI,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,OAAO,CAAC;KACrB,CACJ,CAAC;CACL;AAsCD,MAAM,MAAM,WAAW,GACjB,IAAI,GACJ,0BAA0B,GAC1B,uBAAuB,GACvB,0BAA0B,GAC1B,iBAAiB,GACjB,sBAAsB,CAAC;AAE7B,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,wBAAwB,GAAG;QAAE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACjE,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE;QACL,UAAU,EAAE,WAAW,CAAC;QACxB,aAAa,EAAE,WAAW,CAAC;KAC9B,CAAC;IACF,oBAAoB,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9F,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACnC;AAiSD,wBAAgB,gBAAgB,CAC5B,SAAS,EAAE,MAAM,GAClB,wBAAwB,GAAG;IAAE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAY1D;AAiDD,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,CAiI9E"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config-LOCATION migration: move Magic Context config from the per-harness
|
|
3
|
+
* legacy locations to one shared CortexKit location, mirroring AFT's proven
|
|
4
|
+
* move-and-marker design (NOT copy-in-place, which is a silent stale-edit trap).
|
|
5
|
+
*
|
|
6
|
+
* Legacy (read by old builds):
|
|
7
|
+
* user: ~/.config/opencode/magic-context.{jsonc,json}
|
|
8
|
+
* ~/.pi/agent/magic-context.{jsonc,json}
|
|
9
|
+
* project: <root>/magic-context.{jsonc,json} (bare root)
|
|
10
|
+
* <root>/.opencode/magic-context.{jsonc,json}
|
|
11
|
+
* <root>/.pi/magic-context.{jsonc,json}
|
|
12
|
+
*
|
|
13
|
+
* Target (the only thing new builds read — HARD CUTOVER, harness-agnostic):
|
|
14
|
+
* user: ~/.config/cortexkit/magic-context.jsonc
|
|
15
|
+
* project: <root>/.cortexkit/magic-context.jsonc
|
|
16
|
+
*
|
|
17
|
+
* The migrator runs at plugin init before the loader. Idempotency comes from
|
|
18
|
+
* the legacy file being renamed away (not from a sentinel): once a source is
|
|
19
|
+
* moved aside to `<name>.MOVED_READPLEASE`, later runs find no legacy source
|
|
20
|
+
* and no-op. The marker is a pure human breadcrumb — the loader never reads it.
|
|
21
|
+
*
|
|
22
|
+
* NB: this is config-LOCATION migration. It is unrelated to the schema/key
|
|
23
|
+
* migrations (migrate-dreamer-v2, migrate-experimental) that rewrite keys
|
|
24
|
+
* INSIDE an already-located config file.
|
|
25
|
+
*/
|
|
26
|
+
export interface LegacyConfigSource {
|
|
27
|
+
path: string;
|
|
28
|
+
label: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ConfigMigrationLogger {
|
|
31
|
+
warn?: (msg: string) => void;
|
|
32
|
+
info?: (msg: string) => void;
|
|
33
|
+
log?: (msg: string) => void;
|
|
34
|
+
}
|
|
35
|
+
export interface ConfigFileMigrationOptions {
|
|
36
|
+
scope: "user" | "project";
|
|
37
|
+
targetPath: string;
|
|
38
|
+
legacySources: readonly LegacyConfigSource[];
|
|
39
|
+
logger?: ConfigMigrationLogger;
|
|
40
|
+
}
|
|
41
|
+
export interface ConfigFileMigrationResult {
|
|
42
|
+
migrated: boolean;
|
|
43
|
+
conflict: boolean;
|
|
44
|
+
sourcePath?: string;
|
|
45
|
+
targetPath: string;
|
|
46
|
+
warnings: string[];
|
|
47
|
+
}
|
|
48
|
+
/** `~/.config/cortexkit/magic-context` (no extension — for detectConfigFile). */
|
|
49
|
+
export declare function cortexKitUserConfigBasePath(): string;
|
|
50
|
+
/** `<root>/.cortexkit/magic-context` (no extension — for detectConfigFile). */
|
|
51
|
+
export declare function cortexKitProjectConfigBasePath(directory: string): string;
|
|
52
|
+
/** The migration target: always normalized to `.jsonc`. */
|
|
53
|
+
export declare function resolveCortexKitUserConfigPath(): string;
|
|
54
|
+
/** The migration target: always normalized to `.jsonc`. */
|
|
55
|
+
export declare function resolveCortexKitProjectConfigPath(directory: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* The legacy config locations to migrate FROM, by scope. Each base produces a
|
|
58
|
+
* `.jsonc` and a `.json` candidate; whichever exists migrates, target is always
|
|
59
|
+
* `.jsonc`. The bare-root project source (`<root>/magic-context.*`) is unique to
|
|
60
|
+
* Magic Context (AFT never had it) — omitting it would orphan repo-root configs.
|
|
61
|
+
*
|
|
62
|
+
* Project sources are filtered against the user-scope path set: when a session's
|
|
63
|
+
* project directory IS the user config home (e.g. opencode opened in
|
|
64
|
+
* `~/.config/cortexkit`), the bare-root project source `<root>/magic-context.jsonc`
|
|
65
|
+
* resolves to the USER config path. Without this guard the project migration
|
|
66
|
+
* would "migrate" the user's own config into `<root>/.cortexkit/` and rename the
|
|
67
|
+
* original aside, leaving the user on schema defaults (the config-eats-itself
|
|
68
|
+
* bug). A project migration must never touch a user-scope file.
|
|
69
|
+
*/
|
|
70
|
+
export declare function resolveLegacyConfigSources(directory: string): {
|
|
71
|
+
user: LegacyConfigSource[];
|
|
72
|
+
project: LegacyConfigSource[];
|
|
73
|
+
};
|
|
74
|
+
export type ConfigHarness = "opencode" | "pi";
|
|
75
|
+
/**
|
|
76
|
+
* Legacy sources owned by ONE harness, most-specific first. Used by the loaders
|
|
77
|
+
* as a NON-DESTRUCTIVE read fallback: when the shared CortexKit base is absent
|
|
78
|
+
* (migration not yet run, or refused because OpenCode and Pi legacy configs
|
|
79
|
+
* differ), the running harness reads its OWN legacy config rather than silently
|
|
80
|
+
* falling back to schema defaults — which would re-enable features the legacy
|
|
81
|
+
* config disabled. Each harness reads only its own files, so a differing pair
|
|
82
|
+
* stays correct per-harness until the user consolidates. The bare project-root
|
|
83
|
+
* `<root>/magic-context.*` was OpenCode-only historically.
|
|
84
|
+
*/
|
|
85
|
+
export declare function resolveLegacyConfigSourcesForHarness(directory: string, harness: ConfigHarness): {
|
|
86
|
+
user: LegacyConfigSource[];
|
|
87
|
+
project: LegacyConfigSource[];
|
|
88
|
+
};
|
|
89
|
+
export declare function migrateConfigFile(opts: ConfigFileMigrationOptions): ConfigFileMigrationResult;
|
|
90
|
+
/**
|
|
91
|
+
* Run both the user-scope and project-scope config-location migrations for a
|
|
92
|
+
* project directory. Idempotent and cheap when nothing to migrate (a few
|
|
93
|
+
* existsSync calls). Call once at plugin init, before loading config. Returns
|
|
94
|
+
* any warnings (conflicts / partial failures) for the host to surface + log.
|
|
95
|
+
*/
|
|
96
|
+
export declare function migrateMagicContextConfigLocations(directory: string, logger?: ConfigMigrationLogger): string[];
|
|
97
|
+
//# sourceMappingURL=migrate-config-location.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-config-location.d.ts","sourceRoot":"","sources":["../../src/config/migrate-config-location.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IAClC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,0BAA0B;IACvC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC7C,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAClC;AAED,MAAM,WAAW,yBAAyB;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB;AAoBD,iFAAiF;AACjF,wBAAgB,2BAA2B,IAAI,MAAM,CAEpD;AAED,+EAA+E;AAC/E,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,2DAA2D;AAC3D,wBAAgB,8BAA8B,IAAI,MAAM,CAEvD;AAED,2DAA2D;AAC3D,wBAAgB,iCAAiC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE3E;AA4BD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG;IAC3D,IAAI,EAAE,kBAAkB,EAAE,CAAC;IAC3B,OAAO,EAAE,kBAAkB,EAAE,CAAC;CACjC,CAsBA;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,IAAI,CAAC;AAE9C;;;;;;;;;GASG;AACH,wBAAgB,oCAAoC,CAChD,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,aAAa,GACvB;IAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;IAAC,OAAO,EAAE,kBAAkB,EAAE,CAAA;CAAE,CA0B/D;AAmSD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,0BAA0B,GAAG,yBAAyB,CA0F7F;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAC9C,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,qBAAqB,GAC/B,MAAM,EAAE,CA6BV"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-memory migration of the legacy v1 dreamer config shape to the Dreamer v2
|
|
3
|
+
* per-task shape (shared OpenCode + Pi; runs on every config load, like
|
|
4
|
+
* migrate-experimental). Doctor performs the on-disk equivalent.
|
|
5
|
+
*
|
|
6
|
+
* v1 shape (any subset):
|
|
7
|
+
* dreamer: {
|
|
8
|
+
* schedule: "02:00-06:00", // a TIME WINDOW
|
|
9
|
+
* tasks: ["consolidate","verify"], // an ARRAY of agentic task names
|
|
10
|
+
* task_timeout_minutes: 20,
|
|
11
|
+
* max_runtime_minutes: 120,
|
|
12
|
+
* user_memories: { enabled, promotion_threshold },
|
|
13
|
+
* pin_key_files: { enabled, token_budget, min_reads },
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* v2 shape:
|
|
17
|
+
* dreamer: {
|
|
18
|
+
* tasks: { <task>: { schedule: "<cron>"|"", model?, timeout_minutes?, ... } }
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* Rules (see dreamer-v2-AB-spec.md):
|
|
22
|
+
* - Base cron derived from the WINDOW START: "02:00-06:00" → "0 2 * * *".
|
|
23
|
+
* - Legacy `tasks` array PRESENT → it is the user's deliberate selection: each
|
|
24
|
+
* LISTED agentic task gets the base cron; each OMITTED canonical task gets ""
|
|
25
|
+
* (disabled). Built-in defaults are used ONLY when `tasks` is absent.
|
|
26
|
+
* - user_memories.enabled false → review-user-memories "" ; true → base cron
|
|
27
|
+
* (promotion_threshold carried). A legacy pin_key_files block is dropped
|
|
28
|
+
* (key-files pinning moved out of Magic Context).
|
|
29
|
+
* - classify-memories is NEW in v2 and defaults ON daily at 06:00, unless the
|
|
30
|
+
* whole dreamer block is disabled.
|
|
31
|
+
* - evaluate-smart-notes → base cron (it always ran on pending notes).
|
|
32
|
+
* - task_timeout_minutes → each task's timeout_minutes default; max_runtime_minutes dropped.
|
|
33
|
+
* - Object-shaped A+B configs carrying retired memory task keys are folded into
|
|
34
|
+
* verify + curate before schema parsing strips unknown keys.
|
|
35
|
+
*/
|
|
36
|
+
export declare function migrateDreamerV2(rawConfig: Record<string, unknown>, warnings: string[]): Record<string, unknown>;
|
|
37
|
+
//# sourceMappingURL=migrate-dreamer-v2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-dreamer-v2.d.ts","sourceRoot":"","sources":["../../src/config/migrate-dreamer-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAsGH,wBAAgB,gBAAgB,CAC5B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,QAAQ,EAAE,MAAM,EAAE,GACnB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoMzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-experimental.d.ts","sourceRoot":"","sources":["../../src/config/migrate-experimental.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,yBAAyB,CACrC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,QAAQ,EAAE,MAAM,EAAE,GACnB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"migrate-experimental.d.ts","sourceRoot":"","sources":["../../src/config/migrate-experimental.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,yBAAyB,CACrC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,QAAQ,EAAE,MAAM,EAAE,GACnB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoIzB"}
|
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
* process). A cloned repo could set a huge value to exhaust host memory /
|
|
23
23
|
* address space — a resource-exhaustion vector with no legitimate per-repo
|
|
24
24
|
* use. Honor user-level config only.
|
|
25
|
+
* - `embedding.endpoint` / `embedding.provider` — a repo must not choose
|
|
26
|
+
* where private memory/search/commit text is embedded. User-level config is
|
|
27
|
+
* the trust boundary for embedding destinations.
|
|
25
28
|
* - hidden-agent `prompt`/`permission`/`tools` — a repo must not reprogram or
|
|
26
29
|
* re-permission the historian/dreamer/sidekick.
|
|
27
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-security.d.ts","sourceRoot":"","sources":["../../src/config/project-security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"project-security.d.ts","sourceRoot":"","sources":["../../src/config/project-security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAkCH;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAsD5F;AA2BD,wBAAgB,mCAAmC,CAC/C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,MAAM,EAAE,CAsCV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prune-config-leaf.d.ts","sourceRoot":"","sources":["../../src/config/prune-config-leaf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,YAAY,EAAE,SAAS,WAAW,EAAE,GACrC;IAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"prune-config-leaf.d.ts","sourceRoot":"","sources":["../../src/config/prune-config-leaf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,YAAY,EAAE,SAAS,WAAW,EAAE,GACrC;IAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAqC5D"}
|