@cortexkit/opencode-magic-context 0.42.4 → 0.42.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/config/index.d.ts +9 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +1 -0
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-jyj54gbe.js → conflict-warning-hook-aktepwpz.js} +3 -3
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
- package/dist/features/magic-context/context-authority.d.ts +28 -1
- package/dist/features/magic-context/context-authority.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/curate-category-rotation.d.ts +26 -0
- package/dist/features/magic-context/dreamer/curate-category-rotation.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/open-opencode-db.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/storage-task-schedule.d.ts +7 -5
- package/dist/features/magic-context/dreamer/storage-task-schedule.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-gates.d.ts +1 -0
- package/dist/features/magic-context/dreamer/task-gates.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-prompts.d.ts +3 -0
- package/dist/features/magic-context/dreamer/task-prompts.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-registry.d.ts +6 -0
- package/dist/features/magic-context/dreamer/task-registry.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts +5 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-local.d.ts +12 -0
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding.d.ts +1 -1
- package/dist/features/magic-context/memory/embedding.d.ts.map +1 -1
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/migrations.d.ts +12 -0
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts +1 -0
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/session-project-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts +1 -1
- package/dist/features/magic-context/tool-owner-backfill.d.ts.map +1 -1
- package/dist/hooks/auto-update-checker/index.d.ts.map +1 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts +0 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -1
- package/dist/hooks/magic-context/channel2-delivery.d.ts +8 -0
- package/dist/hooks/magic-context/channel2-delivery.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts +12 -0
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +4 -4
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-state-sync.d.ts +3 -0
- package/dist/hooks/magic-context/module-state-sync.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-transport.d.ts +24 -2
- package/dist/hooks/magic-context/module-transport.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-wire.d.ts +1 -1
- package/dist/hooks/magic-context/module-wire.d.ts.map +1 -1
- package/dist/hooks/magic-context/producer-window-guard.d.ts +31 -1
- package/dist/hooks/magic-context/producer-window-guard.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts +6 -0
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts +8 -0
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-formatting.d.ts +6 -0
- package/dist/hooks/magic-context/read-session-formatting.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +30 -0
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-refusal-recovery.d.ts +28 -0
- package/dist/hooks/magic-context/rust-refusal-recovery.d.ts.map +1 -0
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +7 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-bkg2fdj1.js → index-4wwr6cz0.js} +3 -0
- package/dist/{index-jkrqhc7y.js → index-a9ssj59b.js} +94 -15
- package/dist/{index-faay035c.js → index-djp6rwz6.js} +484 -57
- package/dist/{index-p474rw9p.js → index-ngjmj6xx.js} +1 -1
- package/dist/{index-d8mgqezq.js → index-s61hh7gv.js} +50 -17
- package/dist/{index-1ar7b3e9.js → index-znraa0kv.js} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1667 -380
- package/dist/plugin/embedding-bootstrap.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/memory-id-translation.d.ts +23 -0
- package/dist/plugin/memory-id-translation.d.ts.map +1 -0
- package/dist/plugin/rust-tool-backends.d.ts +1 -1
- package/dist/plugin/rust-tool-backends.d.ts.map +1 -1
- package/dist/{recomp-orchestrator-c4sa354a.js → recomp-orchestrator-0xx1364v.js} +4 -4
- package/dist/{send-session-notification-xnypkxpx.js → send-session-notification-jbxknvar.js} +2 -2
- package/dist/shared/auto-update-provenance.d.ts +9 -0
- package/dist/shared/auto-update-provenance.d.ts.map +1 -0
- package/dist/shared/conflict-detector.d.ts +5 -1
- package/dist/shared/conflict-detector.d.ts.map +1 -1
- package/dist/shared/opencode-db-path.d.ts +31 -2
- package/dist/shared/opencode-db-path.d.ts.map +1 -1
- package/dist/shared/prompt-surface-runtime.d.ts +3 -3
- package/dist/shared/prompt-surface-runtime.d.ts.map +1 -1
- package/dist/{storage-meta-session-x3j0q9qy.js → storage-meta-session-z818pn1e.js} +2 -2
- package/dist/{task-config-ys0arma5.js → task-config-cv8k9y8r.js} +1 -1
- package/dist/tools/ctx-expand/mode.d.ts +31 -0
- package/dist/tools/ctx-expand/mode.d.ts.map +1 -0
- package/dist/tools/ctx-expand/tools.d.ts.map +1 -1
- package/dist/tools/ctx-memory/tools.d.ts.map +1 -1
- package/dist/tools/ctx-note/constants.d.ts +1 -1
- package/dist/tools/ctx-note/constants.d.ts.map +1 -1
- package/dist/tools/ctx-note/tools.d.ts.map +1 -1
- package/dist/tools/ctx-note/types.d.ts +1 -1
- package/dist/tools/ctx-note/types.d.ts.map +1 -1
- package/dist/tools/ctx-reduce/constants.d.ts +1 -1
- package/dist/tools/ctx-reduce/constants.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/tools/light-descriptions.d.ts +2 -2
- package/dist/tools/light-descriptions.d.ts.map +1 -1
- package/dist/v2/hidden-completion.d.ts +69 -13
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts +13 -1
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/hidden-child.d.ts +31 -0
- package/dist/v2/hooks/hidden-child.d.ts.map +1 -0
- package/dist/v2/hooks/store.d.ts.map +1 -1
- package/dist/v2/hooks/types.d.ts +99 -19
- package/dist/v2/hooks/types.d.ts.map +1 -1
- package/dist/v2/server.d.ts +19 -0
- package/dist/v2/server.d.ts.map +1 -1
- package/dist/v2/server.js +2311 -2724
- package/dist/v2/store-reader.d.ts +11 -5
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/tui/index.d.ts +10 -0
- package/dist/v2/tui/index.d.ts.map +1 -0
- package/dist/v2/tui/types.d.ts +80 -0
- package/dist/v2/tui/types.d.ts.map +1 -0
- package/package.json +5 -4
- package/src/agents/magic-context-prompt.ts +1 -1
- package/src/config/index.ts +31 -1
- package/src/config/protected-tokens.test.ts +40 -0
- package/src/config/schema/magic-context.ts +8 -3
- package/src/features/magic-context/dreamer/task-registry.ts +10 -0
- package/src/shared/auto-update-provenance.ts +42 -0
- package/src/shared/conflict-detector.test.ts +53 -0
- package/src/shared/conflict-detector.ts +88 -19
- package/src/shared/models-dev-cache.test.ts +25 -0
- package/src/shared/opencode-db-path.test.ts +96 -0
- package/src/shared/opencode-db-path.ts +146 -15
- package/src/shared/prompt-surface-a1-golden.md +12 -16
- package/src/shared/prompt-surface-runtime.test.ts +20 -0
- package/src/shared/prompt-surface-runtime.ts +7 -5
- package/src/tui/entry.mjs +11 -1
- package/src/v2/tui/host-contract.test.ts +202 -0
- package/src/v2/tui/index.ts +270 -0
- package/src/v2/tui/types.ts +67 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedding-bootstrap.d.ts","sourceRoot":"","sources":["../../src/plugin/embedding-bootstrap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"embedding-bootstrap.d.ts","sourceRoot":"","sources":["../../src/plugin/embedding-bootstrap.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjD,wBAAsB,4CAA4C,CAC9D,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,QAAQ,GACb,OAAO,CAAC,IAAI,CAAC,CAgCf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-session-hooks.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/create-session-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAK7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAGnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,KAAK,EAAE,oBAAoB,EA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A2B,CAAC;iBAA2B,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;iBAA2D,CAAC;;oBAA4D,CAAC;uBAAiC,CAAC;yBAAoC,CAAC;;;;;;0BAA4gqE,CAAC;;;;;;;;;;;;;;EAzCn/wE;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAChD,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;IACvC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,oBAAoB,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACjE;;;;;;;;;;qBAgC6jI,CAAC;iBAA2B,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;;;;;;;;;;;qBAA78B,CAAC;mBAA6B,CAAC;iBAA2B,CAAC;iBAA2B,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;iBAA2D,CAAC;;oBAA4D,CAAC;uBAAiC,CAAC;yBAAoC,CAAC;;;;;;0BAA4gqE,CAAC;;;;;;;;;;;;;;GADn/wE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Database } from "../shared/sqlite";
|
|
2
|
+
export interface ModuleMemoryOperation {
|
|
3
|
+
action: string;
|
|
4
|
+
module_id?: number;
|
|
5
|
+
canonical_module_id?: number;
|
|
6
|
+
superseded_module_ids?: number[];
|
|
7
|
+
category?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function unmappedMemoryIdMessage(id: number): string;
|
|
10
|
+
export declare function translateHostMemoryIds(db: Database, hostIds: readonly number[]): {
|
|
11
|
+
moduleIds: number[];
|
|
12
|
+
} | {
|
|
13
|
+
error: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function moduleMemoryOperation(response: unknown, depth?: number): ModuleMemoryOperation | null;
|
|
16
|
+
export declare function translateModuleMemoryMutationReply(args: {
|
|
17
|
+
db: Database;
|
|
18
|
+
moduleProject: string;
|
|
19
|
+
response: unknown;
|
|
20
|
+
requestedHostIds: readonly number[];
|
|
21
|
+
requestedCategory?: string;
|
|
22
|
+
}): string | null;
|
|
23
|
+
//# sourceMappingURL=memory-id-translation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-id-translation.d.ts","sourceRoot":"","sources":["../../src/plugin/memory-id-translation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,qBAAqB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,sBAAsB,CAClC,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,SAAS,MAAM,EAAE,GAC3B;IAAE,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAQ7C;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,SAAI,GAAG,qBAAqB,GAAG,IAAI,CAkBhG;AAED,wBAAgB,kCAAkC,CAAC,IAAI,EAAE;IACrD,EAAE,EAAE,QAAQ,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,GAAG,MAAM,GAAG,IAAI,CAiChB"}
|
|
@@ -18,7 +18,7 @@ export interface RustNoteToolRequest {
|
|
|
18
18
|
filter?: "all" | "active" | "pending" | "ready" | "dismissed";
|
|
19
19
|
limit?: number;
|
|
20
20
|
offset?: number;
|
|
21
|
-
|
|
21
|
+
/** Exactly one id for update, one to fifty for dismiss. */
|
|
22
22
|
noteIds?: number[];
|
|
23
23
|
}
|
|
24
24
|
export interface RustMemoryToolRequest {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rust-tool-backends.d.ts","sourceRoot":"","sources":["../../src/plugin/rust-tool-backends.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,OAAO,CAAC;AACvD,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAChC,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;IACjD,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,
|
|
1
|
+
{"version":3,"file":"rust-tool-backends.d.ts","sour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3
3
|
setRecompTerminal2,
|
|
4
4
|
runManagedRecomp2,
|
|
5
5
|
runManagedUpgrade2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-djp6rwz6.js";
|
|
7
7
|
import"./index-f9gem5cr.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-znraa0kv.js";
|
|
9
9
|
import"./index-sd3egckz.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
import"./index-ngjmj6xx.js";
|
|
11
|
+
import"./index-a9ssj59b.js";
|
|
12
12
|
import"./index-jdxxq8cz.js";
|
|
13
13
|
import"./index-qp20p2py.js";
|
|
14
14
|
export {
|
package/dist/{send-session-notification-xnypkxpx.js → send-session-notification-jbxknvar.js}
RENAMED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
clearIgnoredMessages2,
|
|
6
6
|
observeIgnoredNotificationEvent2,
|
|
7
7
|
sendStatusNotification2
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
} from "./index-ngjmj6xx.js";
|
|
9
|
+
import"./index-a9ssj59b.js";
|
|
10
10
|
import"./index-qp20p2py.js";
|
|
11
11
|
export {
|
|
12
12
|
clearIgnoredMessages2 as clearIgnoredMessages,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const AUTO_UPDATE_CHECK_STATE_FILENAME = "last-update-check.json";
|
|
2
|
+
export interface AutoUpdateCheckState {
|
|
3
|
+
lastCheckedMs?: number;
|
|
4
|
+
updaterPinnedSpec?: string;
|
|
5
|
+
updaterPinnedAt?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function readAutoUpdateCheckState(path: string): AutoUpdateCheckState | null;
|
|
8
|
+
export declare function isUpdaterPinnedSpec(state: AutoUpdateCheckState | null, configuredSpec: string): boolean;
|
|
9
|
+
//# sourceMappingURL=auto-update-provenance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-update-provenance.d.ts","sourceRoot":"","sources":["../../src/shared/auto-update-provenance.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gCAAgC,2BAA2B,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAoBlF;AAED,wBAAgB,mBAAmB,CAC/B,KAAK,EAAE,oBAAoB,GAAG,IAAI,EAClC,cAAc,EAAE,MAAM,GACvB,OAAO,CAMT"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { OpenCodeHostGeneration } from "./opencode-db-path";
|
|
1
2
|
export interface ConflictResult {
|
|
2
3
|
/** Whether any blocking conflict was found */
|
|
3
4
|
hasConflict: boolean;
|
|
@@ -34,6 +35,8 @@ export interface ConflictResult {
|
|
|
34
35
|
export interface ResolvedCompaction {
|
|
35
36
|
auto: boolean;
|
|
36
37
|
prune: boolean;
|
|
38
|
+
keepTokens?: number;
|
|
39
|
+
buffer?: number;
|
|
37
40
|
}
|
|
38
41
|
/**
|
|
39
42
|
* Options for {@link detectConflicts}.
|
|
@@ -63,6 +66,7 @@ export interface ResolvedCompaction {
|
|
|
63
66
|
export interface DetectConflictsOptions {
|
|
64
67
|
compactionEnabled?: boolean;
|
|
65
68
|
resolvedCompaction?: ResolvedCompaction;
|
|
69
|
+
hostGeneration?: OpenCodeHostGeneration;
|
|
66
70
|
}
|
|
67
71
|
/**
|
|
68
72
|
* Detect all conflicts that would prevent magic-context from working correctly.
|
|
@@ -119,7 +123,7 @@ export interface OpencodeConfigClientLike {
|
|
|
119
123
|
* Returns `null` when the fetch fails, times out (bounded to `timeoutMs` so
|
|
120
124
|
* boot never hangs), or serves no explicit compaction block.
|
|
121
125
|
*/
|
|
122
|
-
export declare function resolveCompactionForBoot(client: OpencodeConfigClientLike, timeoutMs?: number): Promise<ResolvedCompaction | null>;
|
|
126
|
+
export declare function resolveCompactionForBoot(client: OpencodeConfigClientLike, timeoutMs?: number, hostGeneration?: OpenCodeHostGeneration): Promise<ResolvedCompaction | null>;
|
|
123
127
|
/**
|
|
124
128
|
* Canonical npm package names that represent the conflicting plugin.
|
|
125
129
|
* Matched against the npm-style segment of each plugin entry, so:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conflict-detector.d.ts","sourceRoot":"","sources":["../../src/shared/conflict-detector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conflict-detector.d.ts","sourceRoot":"","sources":["../../src/shared/conflict-detector.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAyBjE,MAAM,WAAW,cAAc;IAC3B,8CAA8C;IAC9C,WAAW,EAAE,OAAO,CAAC;IACrB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,2DAA2D;IAC3D,SAAS,EAAE;QACP,cAAc,EAAE,OAAO,CAAC;QACxB,eAAe,EAAE,OAAO,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC;QACnB,uBAAuB,EAAE,OAAO,CAAC;QACjC,uBAAuB,EAAE,OAAO,CAAC;QACjC,oBAAoB,EAAE,OAAO,CAAC;KACjC,CAAC;IACF;;;;;;OAMG;IACH,gBAAgB,EAAE;QACd,IAAI,EAAE,OAAO,CAAC;QACd,KAAK,EAAE,OAAO,CAAC;KAClB,CAAC;CACL;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,sBAAsB;IACnC,i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" | "v2";
|
|
3
|
+
export type OpenCodeStoreGeneration = OpenCodeHostGeneration | "unknown";
|
|
4
|
+
export interface ResolveOpenCodeDbPathOptions {
|
|
5
|
+
dataHome?: string;
|
|
6
|
+
channel?: string;
|
|
7
|
+
env?: NodeJS.ProcessEnv;
|
|
8
|
+
}
|
|
9
|
+
export declare function openCodeHostGenerationFromVersion(version: string | null | undefined): OpenCodeHostGeneration;
|
|
10
|
+
export interface OpenCodeStoreSchemaDatabase {
|
|
11
|
+
prepare(sql: string): {
|
|
12
|
+
all(...params: unknown[]): unknown[];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
2
15
|
export interface OpenCodeDbPathResolution {
|
|
3
16
|
path: string;
|
|
4
17
|
source: OpenCodeDbPathSource;
|
|
@@ -7,8 +20,24 @@ export interface OpenCodeDbPathResolution {
|
|
|
7
20
|
export interface OpenCodeDbReadFailure extends OpenCodeDbPathResolution {
|
|
8
21
|
message: string;
|
|
9
22
|
}
|
|
10
|
-
/**
|
|
11
|
-
export declare function
|
|
23
|
+
/** Match OpenCode 2's filename table and strip path separators from custom channels. */
|
|
24
|
+
export declare function sourceOpenCodeDatabaseFilename(hostGeneration: OpenCodeHostGeneration, channel: string, env?: NodeJS.ProcessEnv): string;
|
|
25
|
+
/**
|
|
26
|
+
* Resolve the store for one host generation. The default is the historical v1
|
|
27
|
+
* resolver, including candidate discovery and all existing diagnostic text.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveOpenCodeDbPath(hostGeneration?: OpenCodeHostGeneration, options?: ResolveOpenCodeDbPathOptions): OpenCodeDbPathResolution;
|
|
30
|
+
/**
|
|
31
|
+
* Detect the persisted host schema.
|
|
32
|
+
*
|
|
33
|
+
* `session_message` does NOT identify v2: OpenCode 1.18.x ships that table beside `message`
|
|
34
|
+
* and `part` (verified against a live 1.18.30 store, pinned in this module's tests). Only the
|
|
35
|
+
* ABSENCE of the v1 message tables identifies a v2 store, so a v1 host is never mistaken for
|
|
36
|
+
* a v2 one. A store carrying neither is a host that has not written its schema yet.
|
|
37
|
+
*/
|
|
38
|
+
export declare function detectOpenCodeStoreGeneration(db: OpenCodeStoreSchemaDatabase, schema?: "main" | "oc_backfill"): OpenCodeStoreGeneration;
|
|
39
|
+
/** Refuse before a generation-specific query can read the other host's schema. */
|
|
40
|
+
export declare function assertOpenCodeStoreGeneration(db: OpenCodeStoreSchemaDatabase, expected: OpenCodeHostGeneration, path: string, schema?: "main" | "oc_backfill"): void;
|
|
12
41
|
export declare function openCodeDbPathExists(resolution?: OpenCodeDbPathResolution): boolean;
|
|
13
42
|
export declare function getOpenCodeDbProbeDescriptions(resolution?: OpenCodeDbPathResolution): string[];
|
|
14
43
|
export declare function formatOpenCodeDbMissingBanner(resolution?: OpenCodeDbPathResolution): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode-db-path.d.ts","sourceRoot":"","sources":["../../src/shared/opencode-db-path.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"opencode-db-path.d.ts","sourceRoot":"","sources":["../../src/shared/opencode-db-path.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,CAAC;AACxF,MAAM,MAAM,sBAAsB,GAAG,IAAI,GAAG,IAAI,CAAC;AACjD,MAAM,MAAM,uBAAuB,GAAG,sBAAsB,GAAG,SAAS,CAAC;AAEzE,MAAM,WAAW,4BAA4B;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CAC3B;AAED,wBAAgB,iCAAiC,CAC7C,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,sBAAsB,CAGxB;AAED,MAAM,WAAW,2BAA2B;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AC/D,MAAM,CAER;AAED,wBAAgB,qCAAqC,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAE5F;AAED,wBAAgB,2BAA2B,CACvC,UAAU,EAAE,wBAAwB,EACpC,KAAK,EAAE,OAAO,GACf,qBAAqB,CAIvB;AAED,wBAAgB,0BAA0B,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAE9D;AAED,wBAAgB,wBAAwB,IAAI,qBAAqB,GAAG,IAAI,CAEvE;AAED,wBAAgB,6BAA6B,CACzC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,wBAAwB,GACrC,OAAO,CAKT;AAED,yEAAyE;AACzE,wBAAgB,kCAAkC,IAAI,IAAI,CAIzD"}
|
|
@@ -10,9 +10,9 @@ export declare const ACTIVE_TOOL_IDS: readonly ["ctx_reduce", "ctx_expand", "ctx
|
|
|
10
10
|
export declare const PROMPT_SURFACE_TOOL_IDS: readonly ["ctx_reduce", "ctx_expand", "ctx_note", "ctx_memory", "ctx_search"];
|
|
11
11
|
export type PromptSurfaceToolId = (typeof ACTIVE_TOOL_IDS)[number];
|
|
12
12
|
export declare const LIGHT_TOOL_DESCRIPTIONS: {
|
|
13
|
-
readonly ctx_reduce: "
|
|
13
|
+
readonly ctx_reduce: "Marking QUEUES content for release. It stays fully visible to you until it is actually released, which may be the next turn or many turns later. Newest tags stay protected until they age out. Release leaves a placeholder; recover only by rerunning the source or recovery tool. Mark only finished material. Mark analyzed, redundant, saved, or confirmatory outputs; keep user messages, unresolved errors, unextracted evidence, and exact wording. NEVER blanket-mark a large range: review every tag first.";
|
|
14
14
|
readonly ctx_expand: "For ctx_expand users, recover compacted conversation by passing a session-history heading's inclusive start/end ordinals. Results are raw [N] U:/A: transcript capped near 15K tokens; oversized ranges return the head and a continuation. Use verbose=true to list each message ordinal, part previews, and tool-output sizes; use message=N for one complete stored message and its tool exchanges. NEVER expand ranges after the last compartment because that live tail is already visible.";
|
|
15
|
-
readonly ctx_note: "For ctx_note: write saves, read lists, update changes, dismiss retires
|
|
15
|
+
readonly ctx_note: "For ctx_note: write saves, read lists, update changes one note (note_ids=[N]), dismiss retires 1–50 (note_ids); surface_condition makes a smart note. Smart-note conditions must be externally verifiable via GitHub, disk, git, or web—not this conversation or future actions.";
|
|
16
16
|
readonly ctx_memory: "For ctx_memory users, write one standalone durable fact with category and content; update one ID, archive one or more IDs, merge two or more IDs, or get one to twenty numeric IDs. get reads memories in every status; list remains dreamer-only, so primary agents must NEVER assume bulk-list access.";
|
|
17
17
|
readonly ctx_search: "For ctx_search users, retrieve only hidden recall: memories not in <project-memory>, compacted messages outside the live tail, commits, and notes; phrase query as a question carrying exact terms. Omit sources for broad search; select memory, message, git_commit, or note, or pass memory IDs directly. Hits expand through ctx_expand.";
|
|
18
18
|
};
|
|
@@ -32,7 +32,7 @@ export interface PromptSurfaceRegistrationSelection {
|
|
|
32
32
|
descriptionFor: (toolId: string, fullDescription: string) => string;
|
|
33
33
|
}
|
|
34
34
|
export interface PromptSurfaceRuntime {
|
|
35
|
-
resolveRegistration: (config: PromptSurfaceConfig | undefined) => PromptSurfaceRegistrationSelection;
|
|
35
|
+
resolveRegistration: (config: PromptSurfaceConfig | undefined, modelKey?: string) => PromptSurfaceRegistrationSelection;
|
|
36
36
|
resolveGuidance: (config: PromptSurfaceConfig | undefined, modelKey: string | undefined) => PromptSurfaceGuidanceSelection;
|
|
37
37
|
}
|
|
38
38
|
export interface CreatePromptSurfaceRuntimeOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-surface-runtime.d.ts","sourceRoot":"","sources":["../../src/shared/prompt-surface-runtime.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAG3C,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EAE3B,MAAM,kBAAkB,CAAC;AAK1B;;;;GAIG;AACH,eAAO,MAAM,eAAe,+EAMlB,CAAC;AAEX,gFAAgF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retryPendingRustSessionCleanupsForProject2,
|
|
8
8
|
clearSession2
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
} from "./index-znraa0kv.js";
|
|
10
|
+
import"./index-a9ssj59b.js";
|
|
11
11
|
import"./index-qp20p2py.js";
|
|
12
12
|
export {
|
|
13
13
|
advanceToolReclaimWatermark2 as advanceToolReclaimWatermark,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mode selection for ctx_expand when a required-all tool surface fills every
|
|
3
|
+
* declared property with a schema-valid placeholder (`0`, `false`).
|
|
4
|
+
*
|
|
5
|
+
* A named range wins over `message`, so a range call that also carries
|
|
6
|
+
* `message=0` still expands the range. The pair `start=end=0` is that numeric
|
|
7
|
+
* filler, not a named range, so a message call that also carries `start=0`,
|
|
8
|
+
* `end=0` still recovers the message. A lone `{start:0,end:0}` on the
|
|
9
|
+
* non-negative (Claude Code) domain stays a real one-message range: `0` is a
|
|
10
|
+
* valid ordinal there, and no message field is competing.
|
|
11
|
+
*/
|
|
12
|
+
export type CtxExpandOrdinalDomain = "positive" | "non-negative";
|
|
13
|
+
export type CtxExpandMode = {
|
|
14
|
+
kind: "message";
|
|
15
|
+
message: number;
|
|
16
|
+
} | {
|
|
17
|
+
kind: "range";
|
|
18
|
+
start: number;
|
|
19
|
+
end: number;
|
|
20
|
+
verbose: boolean;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "error";
|
|
23
|
+
message: string;
|
|
24
|
+
};
|
|
25
|
+
export declare function resolveCtxExpandMode(args: {
|
|
26
|
+
start?: unknown;
|
|
27
|
+
end?: unknown;
|
|
28
|
+
message?: unknown;
|
|
29
|
+
verbose?: unknown;
|
|
30
|
+
}, domain: CtxExpandOrdinalDomain): CtxExpandMode;
|
|
31
|
+
//# sourceMappingURL=mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mode.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-expand/mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,cAAc,CAAC;AAEjE,MAAM,MAAM,aAAa,GACnB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAsBzC,wBAAgB,oBAAoB,CAChC,IAAI,EAAE;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,EACD,MAAM,EAAE,sBAAsB,GAC/B,aAAa,CA0Bf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-expand/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-expand/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAQ5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,eAAe,CAAC;CACvB;AA0HD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAI5F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-memory/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-memory/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AA4DhE,OAAO,EAKH,KAAK,iBAAiB,EACzB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAskCrE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAI5F"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CTX_NOTE_DESCRIPTION = "Working notes for this session \u2014 reminders, follow-ups, and things to revisit later.\n\nUse a note when something matters LATER but not in the next few steps: \"revisit the retry logic after the release\", \"user wants the dashboard polish batched\", \"flaky test to investigate when touching CI\". Don't use notes for active work (use todos) or durable project knowledge (use ctx_memory). Notes resurface at work boundaries and when read.\n\nActions:\n- write: save a note (content). Add surface_condition to make it a smart note (below).\n- read: list notes, newest first. Default: latest active session notes + ready smart notes; page older ones with limit/offset, or inspect other states with filter.\n- update: change
|
|
1
|
+
export declare const CTX_NOTE_DESCRIPTION = "Working notes for this session \u2014 reminders, follow-ups, and things to revisit later.\n\nUse a note when something matters LATER but not in the next few steps: \"revisit the retry logic after the release\", \"user wants the dashboard polish batched\", \"flaky test to investigate when touching CI\". Don't use notes for active work (use todos) or durable project knowledge (use ctx_memory). Notes resurface at work boundaries and when read.\n\nActions:\n- write: save a note (content). Add surface_condition to make it a smart note (below).\n- read: list notes, newest first. Default: latest active session notes + ready smart notes; page older ones with limit/offset, or inspect other states with filter.\n- update: change one note (note_ids=[N]). dismiss: retire 1\u201350 notes (note_ids=[...]).\n\nSmart notes: pass surface_condition and the note stays hidden until a background checker confirms the condition \u2014 using ONLY externally verifiable signals (GitHub state via gh, files on disk, git history, web pages). It cannot see this conversation, so the condition must be checkable from outside:\n\u2713 \"When PR #42 in cortexkit/magic-context is merged\"\n\u2713 \"When the latest release tag is >= v0.22.0\"\n\u2713 \"When packages/plugin/src/foo.ts contains a function named bar\"\n\u2717 \"When the user mentions X\" / \"when we revisit Y\" / \"after we finish this refactor\" \u2014 no external signal; write a regular note instead.\n\nExample: ctx_note(action=\"write\", content=\"Re-run the perf benchmark once the boundary rework ships\", surface_condition=\"When the latest release tag is >= v0.23.0\")";
|
|
2
2
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-note/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-note/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,+lDAeoI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-note/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AAsBhE,OAAO,KAAK,EAAuB,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAM7F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAMpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,QAAQ,CAAC;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC/D,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACvC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-note/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AAsBhE,OAAO,KAAK,EAAuB,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAM7F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAMpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,QAAQ,CAAC;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC/D,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACvC;AAggBD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAIxF"}
|
|
@@ -9,7 +9,7 @@ export interface CtxNoteArgs extends ImitatedReducedArgs {
|
|
|
9
9
|
limit?: number;
|
|
10
10
|
/** Skip this many newest notes for read — pages older ones (default 0). */
|
|
11
11
|
offset?: number;
|
|
12
|
-
|
|
12
|
+
/** Exactly one id for update, one to fifty for dismiss; ignored by write and read. */
|
|
13
13
|
note_ids?: number[];
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-note/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;AAErF,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACpD,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-note/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;AAErF,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACpD,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CTX_REDUCE_DESCRIPTION = "Mark spent tagged content as discardable to reclaim context space. This is NOT an immediate delete. Use \u00A7N\u00A7 identifiers visible in the conversation. The `drop` param accepts ranges: \"3-5\", \"1,2,9\", \"1-5,8\".\n\nHow it works:\n- Marking QUEUES content for release. It stays fully visible to you until
|
|
1
|
+
export declare const CTX_REDUCE_DESCRIPTION = "Mark spent tagged content as discardable to reclaim context space. This is NOT an immediate delete. Use \u00A7N\u00A7 identifiers visible in the conversation. The `drop` param accepts ranges: \"3-5\", \"1,2,9\", \"1-5,8\".\n\nHow it works:\n- Marking QUEUES content for release. It stays fully visible to you until it is actually released, which may be the next turn or many turns later. Mark spent outputs as soon as you finish with them; don't hoard the call for the end of the turn.\n- The newest tags are protected: marking one just queues it until it ages out of the recent window, so marking recent output is harmless.\n- When content is finally released it becomes a short placeholder, and re-running the tool is the only way to get it back. So mark only what you are genuinely DONE with \u2014 the test is \"have I extracted what I need from this?\", not \"is it safe / do I have time before it drops?\".\n\nMark discardable once processed: large outputs you've summarized, repeated or redundant dumps, data written to disk, status/log output that only confirmed an expected state.\nKeep: user messages, unresolved errors, raw evidence you haven't extracted yet, and outputs whose exact wording may matter later.\nNever blanket-mark large ranges (e.g. \"1-50\") \u2014 review what each tag holds first.";
|
|
2
2
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-reduce/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-reduce/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,myCASoD,CAAC"}
|
|
@@ -7,7 +7,7 @@ export type CtxSearchSource = "memory" | "message" | "git_commit" | "primer" | "
|
|
|
7
7
|
export interface CtxSearchArgs extends ImitatedReducedArgs {
|
|
8
8
|
query?: string;
|
|
9
9
|
limit?: number;
|
|
10
|
-
/** Restrict search to specific sources. Omit
|
|
10
|
+
/** Restrict search to specific sources. Omit or pass [] to search all. */
|
|
11
11
|
sources?: CtxSearchSource[];
|
|
12
12
|
}
|
|
13
13
|
export interface CtxSearchToolDeps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-search/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;iEAEiE;AACjE,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEtF,MAAM,WAAW,aAAc,SAAQ,mBAAmB;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-search/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;iEAEiE;AACjE,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEtF,MAAM,WAAW,aAAc,SAAQ,mBAAmB;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,QAAQ,CAAC;IACb,uBAAuB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7E;;;;;OAKG;IACH,kBAAkB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC9D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,8EAA8E;IAC9E,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,KAAK,CAAC;QACxC,OAAO,EAAE,MAAM,CAAC;QAChB,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,OAAO,EAAE,CAAC;KACpB,CAAC,CAAC;CACN"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const CTX_REDUCE_LIGHT_DESCRIPTION = "
|
|
1
|
+
export declare const CTX_REDUCE_LIGHT_DESCRIPTION = "Marking QUEUES content for release. It stays fully visible to you until it is actually released, which may be the next turn or many turns later. Newest tags stay protected until they age out. Release leaves a placeholder; recover only by rerunning the source or recovery tool. Mark only finished material. Mark analyzed, redundant, saved, or confirmatory outputs; keep user messages, unresolved errors, unextracted evidence, and exact wording. NEVER blanket-mark a large range: review every tag first.";
|
|
2
2
|
export declare const CTX_EXPAND_LIGHT_DESCRIPTION = "For ctx_expand users, recover compacted conversation by passing a session-history heading's inclusive start/end ordinals. Results are raw [N] U:/A: transcript capped near 15K tokens; oversized ranges return the head and a continuation. Use verbose=true to list each message ordinal, part previews, and tool-output sizes; use message=N for one complete stored message and its tool exchanges. NEVER expand ranges after the last compartment because that live tail is already visible.";
|
|
3
|
-
export declare const CTX_NOTE_LIGHT_DESCRIPTION = "For ctx_note: write saves, read lists, update changes, dismiss retires
|
|
3
|
+
export declare const CTX_NOTE_LIGHT_DESCRIPTION = "For ctx_note: write saves, read lists, update changes one note (note_ids=[N]), dismiss retires 1\u201350 (note_ids); surface_condition makes a smart note. Smart-note conditions must be externally verifiable via GitHub, disk, git, or web\u2014not this conversation or future actions.";
|
|
4
4
|
export declare const CTX_MEMORY_LIGHT_DESCRIPTION = "For ctx_memory users, write one standalone durable fact with category and content; update one ID, archive one or more IDs, merge two or more IDs, or get one to twenty numeric IDs. get reads memories in every status; list remains dreamer-only, so primary agents must NEVER assume bulk-list access.";
|
|
5
5
|
export declare const CTX_SEARCH_LIGHT_DESCRIPTION = "For ctx_search users, retrieve only hidden recall: memories not in <project-memory>, compacted messages outside the live tail, commits, and notes; phrase query as a question carrying exact terms. Omit sources for broad search; select memory, message, git_commit, or note, or pass memory IDs directly. Hits expand through ctx_expand.";
|
|
6
6
|
//# sourceMappingURL=light-descriptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light-descriptions.d.ts","sourceRoot":"","sources":["../../src/tools/light-descriptions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"light-descriptions.d.ts","sourceRoot":"","sources":["../../src/tools/light-descriptions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,0fAA0f,CAAC;AAEpiB,eAAO,MAAM,4BAA4B,qeAAqe,CAAC;AAE/gB,eAAO,MAAM,0BAA0B,+RAAqR,CAAC;AAE7T,eAAO,MAAM,4BAA4B,6SAA6S,CAAC;AAEvV,eAAO,MAAM,4BAA4B,iVAAiV,CAAC"}
|
|
@@ -1,20 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { HiddenCompletionExecutor } from "../hooks/magic-context/compartment-runner-types";
|
|
2
|
+
import type { Database } from "../shared/sqlite";
|
|
3
|
+
import { type HiddenChildHook } from "./hooks/hidden-child";
|
|
4
|
+
import type { StoreRow } from "./store-reader";
|
|
5
|
+
type HiddenChildRole = "historian" | "dreamer";
|
|
6
|
+
export interface HiddenChildHost {
|
|
7
|
+
create(input: {
|
|
8
|
+
title: string;
|
|
9
|
+
agent: string;
|
|
10
|
+
model: {
|
|
11
|
+
providerID: string;
|
|
12
|
+
id: string;
|
|
13
|
+
variant?: string;
|
|
14
|
+
};
|
|
15
|
+
location: {
|
|
16
|
+
directory: string;
|
|
17
|
+
};
|
|
18
|
+
metadata: {
|
|
19
|
+
magic_context: "hidden-run";
|
|
20
|
+
role: HiddenChildRole;
|
|
21
|
+
};
|
|
22
|
+
}): Promise<{
|
|
23
|
+
id: string;
|
|
24
|
+
}>;
|
|
25
|
+
get(input: {
|
|
6
26
|
sessionID: string;
|
|
7
|
-
prompt: string;
|
|
8
|
-
}, options?: {
|
|
9
|
-
signal?: AbortSignal;
|
|
10
27
|
}): Promise<{
|
|
28
|
+
model?: {
|
|
29
|
+
providerID: string;
|
|
30
|
+
id: string;
|
|
31
|
+
variant?: string;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
switchModel(input: {
|
|
35
|
+
sessionID: string;
|
|
36
|
+
model: {
|
|
37
|
+
providerID: string;
|
|
38
|
+
id: string;
|
|
39
|
+
variant?: string;
|
|
40
|
+
};
|
|
41
|
+
}): Promise<void>;
|
|
42
|
+
prompt(input: {
|
|
43
|
+
sessionID: string;
|
|
11
44
|
text: string;
|
|
45
|
+
}): Promise<unknown>;
|
|
46
|
+
wait(input: {
|
|
47
|
+
sessionID: string;
|
|
48
|
+
}): Promise<void>;
|
|
49
|
+
interrupt(input: {
|
|
50
|
+
sessionID: string;
|
|
51
|
+
}): Promise<{
|
|
52
|
+
interrupted: boolean;
|
|
12
53
|
}>;
|
|
54
|
+
update(input: {
|
|
55
|
+
sessionID: string;
|
|
56
|
+
title: string;
|
|
57
|
+
}): Promise<void>;
|
|
58
|
+
}
|
|
59
|
+
export interface HiddenChildRows {
|
|
60
|
+
latestSequence(sessionID: string): number;
|
|
61
|
+
latestAssistant(sessionID: string): StoreRow<"assistant"> | undefined;
|
|
62
|
+
}
|
|
63
|
+
export interface V2HiddenCompletionOptions {
|
|
64
|
+
db: Database;
|
|
65
|
+
projectIdentity: string;
|
|
66
|
+
hook: HiddenChildHook;
|
|
67
|
+
openReader: () => HiddenChildRows & {
|
|
68
|
+
close?: () => void;
|
|
69
|
+
};
|
|
70
|
+
ensureAgent?(): Promise<void>;
|
|
71
|
+
generation?: string;
|
|
13
72
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
modelID: string;
|
|
17
|
-
};
|
|
18
|
-
export declare function createV2HiddenCompletionExecutor(host: GenerateHost, currentModel: (sessionID: string) => Model | null | Promise<Model | null>): Promise<HiddenCompletionExecutor>;
|
|
73
|
+
export declare function hiddenChildrenMetaKey(projectIdentity: string): string;
|
|
74
|
+
export declare function createV2HiddenCompletionExecutor(host: HiddenChildHost, options: V2HiddenCompletionOptions): Promise<HiddenCompletionExecutor>;
|
|
19
75
|
export {};
|
|
20
76
|
//# sourceMappingURL=hidden-completion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hidden-completion.d.ts","sourceRoot":"","sources":["../../src/v2/hidden-completion.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"hidden-completion.d.ts","sourceRoot":"","sources":["../../src/v2/hidden-completion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,wBAAwB,EAG3B,MAAM,iDAAiD,CAAC;AAKzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAIH,KAAK,eAAe,EACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAQ/C,KAAK,eAAe,GAAG,WAAW,GAAG,SAAS,CAAC;AAuB/C,MAAM,WAAW,eAAe;IAC5B,MAAM,CAAC,KAAK,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE;YAAE,UAAU,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,CAAA;SAAE,C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AAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1C,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;CACzE;AAED,MAAM,WAAW,yBAAyB;IACtC,EAAE,EAAE,QAAQ,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE,MAAM,eAAe,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAC3D,WAAW,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAeD,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAErE;AAmSD,wBAAsB,gCAAgC,CAClD,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,yBAAyB,GACnC,OAAO,CAAC,wBAAwB,CAAC,CAkRnC"}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { type TransformDeps } from "../../hooks/magic-context/transform";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PromptSurfaceConfig } from "../../shared/prompt-surface";
|
|
3
|
+
import { type PromptSurfaceRuntime } from "../../shared/prompt-surface-runtime";
|
|
4
|
+
import type { SessionContext, V2Context } from "./types";
|
|
3
5
|
export declare function createHostSeams(context: V2Context, read: TransformDeps["hostRawMessages"] & {}, liveModels: NonNullable<TransformDeps["liveModelBySession"]>): Required<Pick<TransformDeps, "hostRawMessages" | "hostProtectedTailBoundary" | "hostModelFallback" | "hostRefuse">>;
|
|
6
|
+
/** Accept both a raw model array and the 2.0.5 `{ data }` list payload. */
|
|
7
|
+
export declare function catalogModels(listed: unknown): Array<{
|
|
8
|
+
id: string;
|
|
9
|
+
providerID: string;
|
|
10
|
+
limit: {
|
|
11
|
+
context: number;
|
|
12
|
+
};
|
|
13
|
+
}>;
|
|
14
|
+
/** Rewrite Magic Context ctx_* tool descriptions for this draft's model. */
|
|
15
|
+
export declare function applyV2PromptSurfaceTools(draft: SessionContext, runtime: PromptSurfaceRuntime, config: PromptSurfaceConfig | undefined): void;
|
|
4
16
|
export declare function registerContext(context: V2Context): Promise<{
|
|
5
17
|
dispose(): Promise<void>;
|
|
6
18
|
} | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/context.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/context.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAK1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAGH,KAAK,oBAAoB,EAC5B,MAAM,qCAAqC,CAAC;AAa7C,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzD,wBAAgB,eAAe,CAC3B,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAAG,EAAE,EAC3C,UAAU,EAAE,WAAW,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC,GAC7D,QAAQ,CACP,IAAI,CACA,aAAa,EACb,iBAAiB,GAAG,2BAA2B,GAAG,mBAAmB,GAAG,YAAY,CACvF,CACJ,CAaA;AAyBD,2EAA2E;AAC3E,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,CAAC;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9B,CAAC,CAkBD;AAED,4EAA4E;AAC5E,wBAAgB,yBAAyB,CACrC,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,oBAAoB,EAC7B,MAAM,EAAE,mBAAmB,GAAG,SAAS,GACxC,IAAI,CASN;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,SAAS;;eAwavD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type HiddenRunIdentity } from "../../hooks/magic-context/compartment-runner-types";
|
|
2
|
+
import type { PromptArgs } from "../../shared/model-suggestion-retry";
|
|
3
|
+
import type { SessionContext, V2AgentDomain } from "./types";
|
|
4
|
+
export declare const HIDDEN_HISTORIAN_AGENT = "historian";
|
|
5
|
+
export declare const HIDDEN_DREAMER_AGENT = "dreamer-classifier";
|
|
6
|
+
export declare function registerHiddenChildAgents(agent: Pick<V2AgentDomain, "transform">): Promise<void>;
|
|
7
|
+
export interface HiddenChildAttempt {
|
|
8
|
+
childSessionId: string;
|
|
9
|
+
identity: HiddenRunIdentity;
|
|
10
|
+
request: PromptArgs;
|
|
11
|
+
shaped: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Last user text on a context draft. 2.0.5 may use a string body, extra parts, or input_text. */
|
|
14
|
+
export declare function newestUserText(draft: SessionContext): string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Owns the fail-closed bridge between a child prompt marker and the exact
|
|
17
|
+
* calibrated request. Hidden children are visible root sessions in OpenCode 2,
|
|
18
|
+
* so a user-selected or otherwise unregistered prompt must never inherit the
|
|
19
|
+
* child's privileged internal identity.
|
|
20
|
+
*/
|
|
21
|
+
export declare class HiddenChildHook {
|
|
22
|
+
private readonly childIDs;
|
|
23
|
+
private readonly attempts;
|
|
24
|
+
registerChild(sessionID: string): void;
|
|
25
|
+
registerAttempt(marker: string, attempt: HiddenChildAttempt): void;
|
|
26
|
+
releaseAttempt(marker: string): void;
|
|
27
|
+
owns(sessionID: string): boolean;
|
|
28
|
+
/** Returns false only for an ordinary user session that this bridge does not own. */
|
|
29
|
+
apply(draft: SessionContext): boolean;
|
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+1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAKhD;gGACgG;AAChG,wBAAgB,WAAW,CACvB,IAAI,EAAE,SAAS,QAAQ,EAAE,EACzB,OAAO,GAAE,SAAS,QAAQ,EAAS,GACpC,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAKhD;gGACgG;AAChG,wBAAgB,WAAW,CACvB,IAAI,EAAE,SAAS,QAAQ,EAAE,EACzB,OAAO,GAAE,SAAS,QAAQ,EAAS,GACpC,UAAU,EAAE,CAkCd"}
|