@cortexkit/opencode-magic-context 0.49.87 → 0.49.90
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/{announcement-fnyxaahs.js → announcement-4ynkaf0d.js} +2 -2
- package/dist/auto-search-worker.js +3 -3
- package/dist/chunk-embedding-write-worker.js +5 -5
- package/dist/{context-gnk68pyy.js → context-cdds0gjj.js} +219 -41
- package/dist/{derive-budgets-90869322.js → derive-budgets-hzzq71rm.js} +2 -2
- package/dist/{embedding-backfill-9khxv6a9.js → embedding-backfill-qjkaee9s.js} +6 -6
- package/dist/embedding-worker.js +2 -2
- package/dist/features/magic-context/storage-db.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-carry.d.ts +4 -0
- package/dist/hooks/magic-context/compartment-runner-recomp-carry.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts +8 -2
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/history-boundary-repair.d.ts +2 -0
- package/dist/hooks/magic-context/history-boundary-repair.d.ts.map +1 -1
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts +3 -5
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
- package/dist/{index-watde7a1.js → index-2pdgy88n.js} +3 -3
- package/dist/{index-c1s40xmj.js → index-39rzef89.js} +7 -5
- package/dist/{index-c5tmzym6.js → index-5df2fw5b.js} +108 -13
- package/dist/{index-7svecf3m.js → index-5pgyqgmx.js} +1 -1
- package/dist/{index-k50xhjw1.js → index-60x5d68t.js} +1 -1
- package/dist/{index-jka4y6mv.js → index-61knrt52.js} +1 -1
- package/dist/{index-74sh122g.js → index-9d3qgwq0.js} +1 -1
- package/dist/{index-2kf73btc.js → index-cr483vx6.js} +1 -1
- package/dist/{index-5nmqgvz2.js → index-dk3hy2a2.js} +6 -6
- package/dist/{index-awyqqnd8.js → index-g0mb2kb4.js} +6 -6
- package/dist/{index-kmrv1fw3.js → index-h9hybzr5.js} +2 -2
- package/dist/{index-vyfrgwhk.js → index-jzfsnbmm.js} +2 -2
- package/dist/{index-rvf1726x.js → index-mrjat4eq.js} +75 -12
- package/dist/{index-b364vr04.js → index-n1ty0vd3.js} +22 -22
- package/dist/{index-csztadkj.js → index-q7msfgwz.js} +272 -101
- package/dist/{index-pmcvg3k1.js → index-qfcjrnpe.js} +6 -5
- package/dist/{index-3dtzyred.js → index-r4y0dczp.js} +1 -1
- package/dist/{index-bxrfq3mv.js → index-tt0vs4x5.js} +1 -1
- package/dist/{index-3x4qvp29.js → index-w51n3576.js} +1 -1
- package/dist/{index-3jgzd7nz.js → index-wmb2mcdw.js} +3 -3
- package/dist/{index-zmqx48vt.js → index-xsqw8kbd.js} +1 -1
- package/dist/{index-hdyfvdag.js → index-zxhev8ze.js} +1 -1
- package/dist/index.js +26 -26
- package/dist/migration-worker.js +4 -4
- package/dist/{project-embedding-registry-8t0gwf59.js → project-embedding-registry-m3fp1pa4.js} +5 -5
- package/dist/raw-ordinal-warmup-worker.js +2 -2
- package/dist/{recomp-orchestrator-2ztmtxt2.js → recomp-orchestrator-dgyb394j.js} +14 -14
- package/dist/{render-d6q6h9hy.js → render-d014e603.js} +6 -6
- package/dist/{search-d5aajhs3.js → search-9gceftb9.js} +11 -11
- package/dist/{search-archive-g96jn6p0.js → search-archive-gybn6q7s.js} +2 -2
- package/dist/shared/recomp-outcome.d.ts +4 -0
- package/dist/shared/recomp-outcome.d.ts.map +1 -0
- package/dist/shared/storage-permissions.d.ts +16 -2
- package/dist/shared/storage-permissions.d.ts.map +1 -1
- package/dist/shared/user-facing-codes.d.ts +4 -1
- package/dist/shared/user-facing-codes.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-b2yjw8by.js → transform-postprocess-phase-34k1zwsy.js} +15 -15
- package/dist/v2/auto-search-worker.js +3 -3
- package/dist/v2/chunk-embedding-write-worker.js +5 -5
- package/dist/v2/{context-s86114yy.js → context-satgm752.js} +218 -41
- package/dist/v2/{derive-budgets-ecjy1aqh.js → derive-budgets-hr4qqrnv.js} +3 -3
- package/dist/v2/{embedding-backfill-tazkbpyg.js → embedding-backfill-0ar1bm97.js} +6 -6
- package/dist/v2/embedding-worker.js +2 -2
- package/dist/v2/fold/native-replay.d.ts +11 -2
- package/dist/v2/fold/native-replay.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/revert-message-state.d.ts +19 -1
- package/dist/v2/hooks/revert-message-state.d.ts.map +1 -1
- package/dist/v2/migration-worker.js +4 -4
- package/dist/v2/{project-embedding-registry-ah3gsg48.js → project-embedding-registry-gx2waee8.js} +5 -5
- package/dist/v2/raw-ordinal-warmup-worker.js +2 -2
- package/dist/v2/{recomp-orchestrator-kc62xgb9.js → recomp-orchestrator-wq7gbkqa.js} +15 -15
- package/dist/v2/{render-j05per51.js → render-2dan17xc.js} +6 -6
- package/dist/v2/{search-archive-b4ptw02k.js → search-archive-89hdy0a2.js} +2 -2
- package/dist/v2/{search-kg31ad2s.js → search-nyqykx7q.js} +10 -10
- package/dist/v2/{server-ct0gs8fc.js → server-09h2vyvs.js} +2 -2
- package/dist/v2/{server-r2es6zt7.js → server-0tv6kytx.js} +108 -13
- package/dist/v2/{server-rz4snd3x.js → server-1rrmxhd1.js} +1 -1
- package/dist/v2/{server-xa8fefhw.js → server-96nm9vk4.js} +1 -1
- package/dist/v2/{server-2p0qayr1.js → server-a85j3kam.js} +1 -1
- package/dist/v2/{server-gwhj0362.js → server-add0j5n3.js} +7 -5
- package/dist/v2/{server-ff5wcfy4.js → server-b0a9h3ds.js} +2 -2
- package/dist/v2/{server-xn7zqs4j.js → server-dgjqvpgd.js} +3 -3
- package/dist/v2/{server-2r9btf0g.js → server-dtcwkdqj.js} +274 -103
- package/dist/v2/{server-axdmkvd5.js → server-f7tzvmzs.js} +1 -1
- package/dist/v2/{server-yh2z4gg2.js → server-fb5hvvfc.js} +75 -12
- package/dist/v2/{server-pbp58w5x.js → server-fn4ky6mn.js} +1 -1
- package/dist/v2/{server-3p6b0qya.js → server-gqkdfdvw.js} +1 -1
- package/dist/v2/{server-cwtehwbb.js → server-j4jjtdc5.js} +1 -1
- package/dist/v2/{server-b93f0bqh.js → server-pjk9spbf.js} +1 -1
- package/dist/v2/{server-gqrw0br5.js → server-ta4h0fch.js} +6 -6
- package/dist/v2/{server-e2k9mt86.js → server-tj65pgvg.js} +1 -1
- package/dist/v2/{server-6vnbz81n.js → server-vy0beygw.js} +1 -1
- package/dist/v2/server.js +5 -5
- package/dist/v2/{v2-archive-reader-2ayz16s4.js → v2-archive-reader-gh1jghf7.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-e20sjbdz.js → wrapup-orchestrator-2h7ayss9.js} +15 -15
- package/dist/{v2-archive-reader-x39mzvwn.js → v2-archive-reader-8158kyfd.js} +1 -1
- package/dist/{wrapup-orchestrator-h3s905vs.js → wrapup-orchestrator-ct59br0c.js} +15 -15
- package/package.json +1 -1
- package/src/shared/recomp-outcome.ts +8 -0
- package/src/shared/storage-permissions-startup.test.ts +296 -6
- package/src/shared/storage-permissions.ts +143 -18
- package/src/shared/user-facing-codes.ts +5 -2
- package/src/tui/dialogs/status-dialog.tsx +3 -0
- package/src/tui/slots/sidebar-content.tsx +6 -2
- package/src/tui-compiled/dialogs/status-dialog.tsx +12 -0
- package/src/tui-compiled/slots/sidebar-content.tsx +7 -2
package/dist/embedding-worker.js
CHANGED
|
@@ -9,7 +9,7 @@ import"./index-z4p0ry94.js";
|
|
|
9
9
|
import"./index-gqf8r04r.js";
|
|
10
10
|
import {
|
|
11
11
|
setStoragePrivatePermissionEnforcement
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-5df2fw5b.js";
|
|
13
13
|
import"./index-6nqz8hsz.js";
|
|
14
14
|
import"./index-pxnzyvjc.js";
|
|
15
15
|
import"./index-5vsk2cpp.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
resolveLocalEmbeddingWorkerRuntime,
|
|
20
20
|
getLocalEmbeddingNativeMemoryStats,
|
|
21
21
|
LocalEmbeddingProvider
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-60x5d68t.js";
|
|
23
23
|
|
|
24
24
|
// src/features/magic-context/memory/embedding-worker.ts
|
|
25
25
|
import { parentPort, workerData } from "node:worker_threads";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-db.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/storage-db.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"storage-db.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/storage-db.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,MAAM,EAQd,MAAM,SAAS,CAAC;AAUjB,OAAO,EACH,KAAK,sBAAsB,EAQ3B,KAAK,WAAW,EAGnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEH,QAAQ,EAQX,MAAM,qBAAqB,CAAC;AAe7B,OAAO,EAEH,KAAK,yBAAyB,EAEjC,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EACH,4BAA4B,EAI/B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAkB5E,OAAO,EAAE,YAAY,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,CAAC;AAc1E;;;;;GAKG;AACH,wBAAgB,6CAA6C,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAIvF;AAED,8EAA8E;AAC9E,wBAAgB,iCAAiC,CAAC,EAAE,EAAE,QAAQ,GAAG;IAC7D,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACjC,CAGA;AAmBD,MAAM,WAAW,sBAAsB;IACnC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,IAAI,CA64CN;AA4CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,IAAI,QAAQ,GAAG,IAAI,CAAC;AAChD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;AAC9D,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,QAAQ,GAAG,IAAI,CAAC;AAqG5E,oGAAoG;AACpG,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,mBAAwB,GAAG,QAAQ,GAAG,IAAI,CAEtF;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACnC,eAAe,CAAC,EAAE,MAAM,GAAG,mBAAmB,GAC/C,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAuJ1B;AAED,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,GAAG,OAAO,CAGhE;AAED,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAG9E;AAED,0FAA0F;AAC1F,wBAAsB,gCAAgC,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAWlF;AAED,qGAAqG;AACrG,wBAAgB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CA0B7C;AAED,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compartment-runner-partial-recomp.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/compartment-runner-partial-recomp.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACR,WAAW,EAEd,MAAM,kDAAkD,CAAC;
|
|
1
|
+
{"version":3,"file":"compartment-runner-partial-recomp.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/compartment-runner-partial-recomp.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACR,WAAW,EAEd,MAAM,kDAAkD,CAAC;AAyB1D,OAAO,KAAK,EAAwB,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAW9F,MAAM,WAAW,kBAAkB;IAC/B,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAChC,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,gBAAgB,EAAE,WAAW,EAAE,CAAC;CACnC;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,YAAY,EAAE,WAAW,EAAE,EAC3B,KAAK,EAAE,kBAAkB,GAC1B,mBAAmB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CA2CzC;AAED,wBAAsB,4BAA4B,CAC9C,IAAI,EAAE,qBAAqB,EAC3B,KAAK,EAAE,kBAAkB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAkcjB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Compartment, CompartmentInput } from "../../features/magic-context/compartment-storage";
|
|
2
|
+
/** Carry the saved summary payload into a replacement set at a new sequence. */
|
|
3
|
+
export declare function compartmentToInput(c: Compartment, sequence: number): CompartmentInput;
|
|
4
|
+
//# sourceMappingURL=compartment-runner-recomp-carry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compartment-runner-recomp-carry.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/compartment-runner-recomp-carry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,WAAW,EACX,gBAAgB,EACnB,MAAM,kDAAkD,CAAC;AAE1D,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAkBrF"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import { type Compartment } from "../../features/magic-context/compartment-storage";
|
|
1
2
|
import type { Database } from "../../shared/sqlite";
|
|
2
3
|
import type { CandidateCompartment, CompartmentRunnerDeps } from "./compartment-runner-types";
|
|
3
|
-
|
|
4
|
+
type CarriedRowsBySequence = ReadonlyMap<number, Pick<Compartment, "legacy" | "rebaseStatus">>;
|
|
5
|
+
export declare function promoteRecompStagingWithM0Mutation(db: Database, sessionId: string, holderId: string, carriedRows?: CarriedRowsBySequence): RecompPromotion | null;
|
|
6
|
+
type RecompPromotion = {
|
|
4
7
|
compartments: CandidateCompartment[];
|
|
5
8
|
facts: Array<{
|
|
6
9
|
category: string;
|
|
7
10
|
content: string;
|
|
8
11
|
}>;
|
|
9
|
-
|
|
12
|
+
carriedCount: number;
|
|
13
|
+
carriedThrough: number | null;
|
|
14
|
+
};
|
|
10
15
|
export declare function executeContextRecompInternal(deps: CompartmentRunnerDeps): Promise<string>;
|
|
16
|
+
export {};
|
|
11
17
|
//# sourceMappingURL=compartment-runner-recomp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compartment-runner-recomp.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/compartment-runner-recomp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compartment-runner-recomp.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/compartment-runner-recomp.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,WAAW,EAOnB,MAAM,kDAAkD,CAAC;AAuB1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAYpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAuB9F,KAAK,qBAAqB,GAAG,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC;AA8C/F,wBAAgB,kCAAkC,CAC9C,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,qBAAqB,GACpC,eAAe,GAAG,IAAI,CAGxB;AAED,KAAK,eAAe,GAAG;IACnB,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACrC,KAAK,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,CAAC;AAiMF,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,CA0tB/F"}
|
|
@@ -48,6 +48,8 @@ export declare function repairMissingHistoryBoundary(args: {
|
|
|
48
48
|
scope?: "store" | "active-branch";
|
|
49
49
|
/** Queue historian recovery in the same transaction that deletes stale summaries. */
|
|
50
50
|
onRetire?: (retired: readonly HistoryBoundary[], anchor: HistoryBoundary | null) => void;
|
|
51
|
+
/** Exact host row IDs that a committed revert proved it removed. */
|
|
52
|
+
removedByCommittedRevert?: ReadonlySet<string>;
|
|
51
53
|
}): HistoryBoundaryRepair;
|
|
52
54
|
export {};
|
|
53
55
|
//# sourceMappingURL=history-boundary-repair.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-boundary-repair.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/history-boundary-repair.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AAWpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AA0CpD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,GAAG,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
|
|
@@ -57,12 +57,10 @@ export interface ManagedRecompContext {
|
|
|
57
57
|
ensureProjectRegistered?: (directory: string, db: Database) => Promise<void>;
|
|
58
58
|
}
|
|
59
59
|
/** The runner's outcome messages are headed "## Magic Recomp — <Status>".
|
|
60
|
-
* Failed
|
|
60
|
+
* Failed, Skipped and Paused did not publish a rebuild. */
|
|
61
61
|
export declare function isRecompFailure(message: string): boolean;
|
|
62
|
-
/** A
|
|
63
|
-
*
|
|
64
|
-
* mutating state). Transient — retrying in a moment succeeds. Matches the
|
|
65
|
-
* "— Skipped" heading AND the suffix-less lease/already-running no-op text. */
|
|
62
|
+
/** A skip is a neutral no-op: history is not eligible yet, the lease is busy,
|
|
63
|
+
* or a run is already active. Match the heading and older heading-less statuses. */
|
|
66
64
|
export declare function isRecompSkip(message: string): boolean;
|
|
67
65
|
/** Strip markdown headings + blank lines from a runner outcome message, leaving
|
|
68
66
|
* the human reason for compact sidebar/status display. Fixes the dogfood
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recomp-orchestrator.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/recomp-orchestrator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"recomp-orchestrator.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/recomp-orchestrator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAwB,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,KAAK,EACR,qBAAqB,EACrB,wBAAwB,EAE3B,MAAM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
LocalEmbeddingProvider
|
|
59
|
-
} from "./index-
|
|
59
|
+
} from "./index-60x5d68t.js";
|
|
60
60
|
import {
|
|
61
61
|
embedPauseBySession,
|
|
62
62
|
activeEmbeddingSessions,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
} from "./index-2amn2s73.js";
|
|
68
68
|
import {
|
|
69
69
|
setBootQuietPeriodForTests
|
|
70
|
-
} from "./index-
|
|
70
|
+
} from "./index-5pgyqgmx.js";
|
|
71
71
|
import {
|
|
72
72
|
isEmbeddingHostBusy2
|
|
73
73
|
} from "./index-qt1qqasc.js";
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
acquireGitSweepLease,
|
|
79
79
|
renewGitSweepLease,
|
|
80
80
|
releaseGitSweepLease
|
|
81
|
-
} from "./index-
|
|
81
|
+
} from "./index-r4y0dczp.js";
|
|
82
82
|
import {
|
|
83
83
|
saveEmbeddingIfHashMatches,
|
|
84
84
|
getMemoryEmbedCoverage,
|
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
} from "./index-pxnzyvjc.js";
|
|
18
18
|
import {
|
|
19
19
|
LocalEmbeddingProvider
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-60x5d68t.js";
|
|
21
21
|
import {
|
|
22
22
|
OpenAICompatibleEmbeddingProvider,
|
|
23
23
|
embedTextForProject2
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-2pdgy88n.js";
|
|
25
25
|
import {
|
|
26
26
|
saveEmbeddingIfHashMatches
|
|
27
27
|
} from "./index-qjwpqvnf.js";
|
|
@@ -317,10 +317,12 @@ var USER_FACING_FAILURES = {
|
|
|
317
317
|
action: "Check the Magic Context log for the failing task and its error."
|
|
318
318
|
}
|
|
319
319
|
};
|
|
320
|
-
function renderUserFacingFailure(key, style = "markdown") {
|
|
320
|
+
function renderUserFacingFailure(key, style = "markdown", overrides) {
|
|
321
321
|
const failure = USER_FACING_FAILURES[key];
|
|
322
|
-
const
|
|
323
|
-
|
|
322
|
+
const sentence = overrides?.sentence ?? failure.sentence;
|
|
323
|
+
const action = overrides?.action ?? failure.action;
|
|
324
|
+
const styledAction = style === "plain" ? action.replaceAll("`", "") : action;
|
|
325
|
+
return `${sentence}${styledAction ? ` ${styledAction}` : ""} (${failure.code})`;
|
|
324
326
|
}
|
|
325
327
|
function userFacingFailureCode(key) {
|
|
326
328
|
return USER_FACING_FAILURES[key].code;
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
readdirSync,
|
|
18
18
|
readlinkSync,
|
|
19
19
|
readSync,
|
|
20
|
+
realpathSync,
|
|
20
21
|
renameSync,
|
|
21
22
|
rmdirSync,
|
|
22
23
|
rmSync,
|
|
@@ -25,6 +26,7 @@ import {
|
|
|
25
26
|
writeSync
|
|
26
27
|
} from "node:fs";
|
|
27
28
|
import { open as openAsync, writeFile as writeFileAsync } from "node:fs/promises";
|
|
29
|
+
import { homedir } from "node:os";
|
|
28
30
|
import { basename, dirname, join, resolve } from "node:path";
|
|
29
31
|
var enforcePrivateStoragePermissions = true;
|
|
30
32
|
var STORAGE_PERMISSIONS_POLICY_VERSION = 1;
|
|
@@ -33,6 +35,36 @@ var STORAGE_PERMISSIONS_MARKER_BYTES = Buffer.from(`${STORAGE_PERMISSIONS_POLICY
|
|
|
33
35
|
`);
|
|
34
36
|
var STORAGE_PERMISSIONS_MARKER_MAX_AGE_MS = 24 * 60 * 60000;
|
|
35
37
|
var LEGACY_FENCE_TEMP_MIN_AGE_MS = 10 * 60000;
|
|
38
|
+
var MAGIC_CONTEXT_STORAGE_ENTRIES = [
|
|
39
|
+
"context.db",
|
|
40
|
+
"context.db-wal",
|
|
41
|
+
"context.db-shm",
|
|
42
|
+
"context.db-journal",
|
|
43
|
+
"store.db",
|
|
44
|
+
"store.db-wal",
|
|
45
|
+
"store.db-shm",
|
|
46
|
+
"store.db-journal",
|
|
47
|
+
STORAGE_PERMISSIONS_MARKER,
|
|
48
|
+
"models",
|
|
49
|
+
"logs",
|
|
50
|
+
"backups",
|
|
51
|
+
"config-backups",
|
|
52
|
+
"lkg-recovery-fences",
|
|
53
|
+
"rpc",
|
|
54
|
+
"project-identities",
|
|
55
|
+
"heap-snapshots",
|
|
56
|
+
"host-profiler",
|
|
57
|
+
"pi-served-array-digests",
|
|
58
|
+
"pi-served-array-bodies",
|
|
59
|
+
"pi-served-tag-numbers",
|
|
60
|
+
"window-reports.jsonl",
|
|
61
|
+
"window-reports.jsonl.1",
|
|
62
|
+
/^(?:last_announced_version|last-update-check\.json|pending-plugin-update\.json|model-context-limits-(?:opencode|opencode2)\.json)(?:\.[1-9]\d*\.[a-f0-9]{12}\.tmp)?$/,
|
|
63
|
+
/^identity-merge-backup-[A-Za-z0-9]{6}$/,
|
|
64
|
+
/^context\.db\.bak-\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}-\d{3}Z$/,
|
|
65
|
+
/^context\.db\.corrupt-(?:backup|original)-\d{8}T\d{9}Z(?:-[1-9]\d{0,3})?(?:-wal|-shm)?$/,
|
|
66
|
+
/^context\.db\.recovering-\d{8}T\d{9}Z-[1-9]\d*(?:-[1-9]\d{0,3})?(?:\.(?:count-source|recover-source|(?:fresh\.)?db)(?:-wal|-shm)?|\.sql)$/
|
|
67
|
+
];
|
|
36
68
|
var storagePermissionRoots = new Set;
|
|
37
69
|
function invalidateStoragePermissionMarkers(directory) {
|
|
38
70
|
for (let current = resolve(directory);; current = dirname(current)) {
|
|
@@ -208,11 +240,77 @@ function readStoragePermissionCertificate(marker) {
|
|
|
208
240
|
closeSync(fd);
|
|
209
241
|
}
|
|
210
242
|
}
|
|
243
|
+
function inspectLinkedStorageRoot(root, rootStat) {
|
|
244
|
+
const parent = dirname(root);
|
|
245
|
+
if (root === parent)
|
|
246
|
+
return { skipped: "filesystem-root" };
|
|
247
|
+
try {
|
|
248
|
+
if (root === realpathSync(homedir()))
|
|
249
|
+
return { skipped: "home-folder" };
|
|
250
|
+
} catch (error) {
|
|
251
|
+
if (error.code !== "ENOENT")
|
|
252
|
+
throw error;
|
|
253
|
+
}
|
|
254
|
+
if (lstatSync(parent).dev !== rootStat.dev)
|
|
255
|
+
return { skipped: "mount-point" };
|
|
256
|
+
const entries = readdirSync(root);
|
|
257
|
+
const foreignEntries = entries.filter((name) => name !== ".DS_Store" && !MAGIC_CONTEXT_STORAGE_ENTRIES.some((entry) => typeof entry === "string" ? entry === name : entry.test(name))).length;
|
|
258
|
+
return foreignEntries === 0 ? { entries } : { skipped: foreignEntries };
|
|
259
|
+
}
|
|
211
260
|
function tightenStorageTreeSync(directory, dbPath = join(directory, "context.db")) {
|
|
212
261
|
if (process.platform === "win32") {
|
|
213
262
|
return { tightened: 0, failures: 0 };
|
|
214
263
|
}
|
|
215
|
-
const
|
|
264
|
+
const enforce = shouldEnforcePrivateStoragePermissions();
|
|
265
|
+
const startupPath = resolve(directory);
|
|
266
|
+
let root = startupPath;
|
|
267
|
+
let rootStat;
|
|
268
|
+
let rootLink;
|
|
269
|
+
let linkedEntries;
|
|
270
|
+
try {
|
|
271
|
+
rootStat = lstatSync(root);
|
|
272
|
+
} catch {
|
|
273
|
+
if (enforce)
|
|
274
|
+
return { tightened: 0, failures: 1 };
|
|
275
|
+
}
|
|
276
|
+
if (rootStat?.isSymbolicLink()) {
|
|
277
|
+
try {
|
|
278
|
+
root = realpathSync(startupPath);
|
|
279
|
+
rootStat = lstatSync(root);
|
|
280
|
+
if (rootStat.isDirectory() && enforce) {
|
|
281
|
+
const eligibility = inspectLinkedStorageRoot(root, rootStat);
|
|
282
|
+
if ("skipped" in eligibility) {
|
|
283
|
+
return {
|
|
284
|
+
tightened: 0,
|
|
285
|
+
failures: 0,
|
|
286
|
+
rootLink: { path: startupPath, target: root, skipped: eligibility.skipped }
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
linkedEntries = eligibility.entries;
|
|
290
|
+
}
|
|
291
|
+
} catch (error) {
|
|
292
|
+
if (!enforce)
|
|
293
|
+
return { tightened: 0, failures: 0 };
|
|
294
|
+
const failure = error.code ?? String(error);
|
|
295
|
+
return { tightened: 0, failures: 1, rootLink: { path: startupPath, failure } };
|
|
296
|
+
}
|
|
297
|
+
if (!rootStat.isDirectory()) {
|
|
298
|
+
if (!enforce)
|
|
299
|
+
return { tightened: 0, failures: 0 };
|
|
300
|
+
return {
|
|
301
|
+
tightened: 0,
|
|
302
|
+
failures: 1,
|
|
303
|
+
rootLink: {
|
|
304
|
+
path: startupPath,
|
|
305
|
+
failure: "not a directory",
|
|
306
|
+
nonDirectoryTarget: root
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
rootLink = { path: startupPath, target: root };
|
|
311
|
+
dbPath = join(root, basename(dbPath));
|
|
312
|
+
storagePermissionRoots.add(startupPath);
|
|
313
|
+
}
|
|
216
314
|
const marker = join(root, STORAGE_PERMISSIONS_MARKER);
|
|
217
315
|
let tightened = 0;
|
|
218
316
|
let failures = 0;
|
|
@@ -225,20 +323,14 @@ function tightenStorageTreeSync(directory, dbPath = join(directory, "context.db"
|
|
|
225
323
|
return false;
|
|
226
324
|
}
|
|
227
325
|
};
|
|
228
|
-
if (!
|
|
326
|
+
if (!enforce) {
|
|
229
327
|
storagePermissionRoots.add(root);
|
|
230
328
|
if (!removeMarker())
|
|
231
329
|
failures++;
|
|
232
|
-
return { tightened, failures };
|
|
330
|
+
return { tightened, failures, ...rootLink && { rootLink } };
|
|
233
331
|
}
|
|
234
|
-
|
|
235
|
-
try {
|
|
236
|
-
rootStat = lstatSync(root);
|
|
237
|
-
if (!rootStat.isDirectory())
|
|
238
|
-
return { tightened, failures: 1 };
|
|
239
|
-
} catch {
|
|
332
|
+
if (!rootStat?.isDirectory())
|
|
240
333
|
return { tightened, failures: 1 };
|
|
241
|
-
}
|
|
242
334
|
storagePermissionRoots.add(root);
|
|
243
335
|
let certificate;
|
|
244
336
|
let discardMarker = false;
|
|
@@ -318,13 +410,16 @@ function tightenStorageTreeSync(directory, dbPath = join(directory, "context.db"
|
|
|
318
410
|
return;
|
|
319
411
|
let entries;
|
|
320
412
|
try {
|
|
321
|
-
entries = readdirSync(entryPath);
|
|
413
|
+
entries = (entryPath === root ? linkedEntries : undefined) ?? readdirSync(entryPath);
|
|
322
414
|
} catch {
|
|
323
415
|
failures++;
|
|
324
416
|
return;
|
|
325
417
|
}
|
|
326
|
-
for (const entry of entries)
|
|
418
|
+
for (const entry of entries) {
|
|
419
|
+
if (entryPath === root && linkedEntries && markerRemoved && entry === STORAGE_PERMISSIONS_MARKER)
|
|
420
|
+
continue;
|
|
327
421
|
visit(join(entryPath, entry));
|
|
422
|
+
}
|
|
328
423
|
};
|
|
329
424
|
if (certificate) {
|
|
330
425
|
visit(root, false, false, rootStat);
|
|
@@ -372,7 +467,7 @@ function tightenStorageTreeSync(directory, dbPath = join(directory, "context.db"
|
|
|
372
467
|
}
|
|
373
468
|
}
|
|
374
469
|
}
|
|
375
|
-
return { tightened, failures };
|
|
470
|
+
return { tightened, failures, ...rootLink && { rootLink } };
|
|
376
471
|
}
|
|
377
472
|
|
|
378
473
|
export { setStoragePrivatePermissionEnforcement, shouldEnforcePrivateStoragePermissions, ensureStorageDirectorySync, ensurePrivateStorageDirectorySync, writeStorageFileSync, writeStorageFileAtomicSync, syncStorageDirectorySync, writeStorageFileDurableAtomicSync, copyStorageFileSync, copyStorageTreeSync, writeStorageFileAsync, writeStorageFileHandleAsync, createStorageWriteStream, createStorageFileHandleAsync, tightenStorageTreeSync };
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
enqueueShadowEmbeddingItems2,
|
|
40
40
|
getProjectEmbeddingSnapshot2,
|
|
41
41
|
embedItemsForProject2
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-2pdgy88n.js";
|
|
43
43
|
import {
|
|
44
44
|
recordEmbeddingMeasurement
|
|
45
45
|
} from "./index-2amn2s73.js";
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
sanitizeFtsQuery,
|
|
56
56
|
searchMemoriesFTS,
|
|
57
57
|
searchMemoriesFTSUnion
|
|
58
|
-
} from "./index-
|
|
58
|
+
} from "./index-39rzef89.js";
|
|
59
59
|
import {
|
|
60
60
|
ModuleMemoryAuthorityError2,
|
|
61
61
|
getMemoriesByProject2,
|
|
@@ -72,10 +72,10 @@ import {
|
|
|
72
72
|
withMemoryHintContent,
|
|
73
73
|
autoSearchRelevance,
|
|
74
74
|
recordAutoSearchLane
|
|
75
|
-
} from "./index-
|
|
75
|
+
} from "./index-zxhev8ze.js";
|
|
76
76
|
import {
|
|
77
77
|
ensureMemoryEmbeddings2
|
|
78
|
-
} from "./index-
|
|
78
|
+
} from "./index-w51n3576.js";
|
|
79
79
|
import {
|
|
80
80
|
MESSAGE_FTS_SESSION_FILTER_SQL,
|
|
81
81
|
withMessageFtsSessionFilter
|
|
@@ -89,11 +89,11 @@ import {
|
|
|
89
89
|
expandWorkspaceIdentitySetWithAliases,
|
|
90
90
|
resolveStoredPathWorkspaceIdentity,
|
|
91
91
|
sourceNameForMemory
|
|
92
|
-
} from "./index-
|
|
92
|
+
} from "./index-tt0vs4x5.js";
|
|
93
93
|
import {
|
|
94
94
|
getNotes,
|
|
95
95
|
getActivePrimers
|
|
96
|
-
} from "./index-
|
|
96
|
+
} from "./index-61knrt52.js";
|
|
97
97
|
import {
|
|
98
98
|
isKnownAutocommit
|
|
99
99
|
} from "./index-8ajstryz.js";
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
saveSourceContent,
|
|
52
52
|
replaceSourceContent,
|
|
53
53
|
getSourceContents
|
|
54
|
-
} from "./index-
|
|
54
|
+
} from "./index-h9hybzr5.js";
|
|
55
55
|
import {
|
|
56
56
|
cleanSearchText,
|
|
57
57
|
matchedSearchSnippet
|
|
@@ -261,23 +261,23 @@ import {
|
|
|
261
261
|
isSaneLimit,
|
|
262
262
|
getSdkWindowGeometry,
|
|
263
263
|
getSdkContextLimit
|
|
264
|
-
} from "./index-
|
|
264
|
+
} from "./index-xsqw8kbd.js";
|
|
265
265
|
import {
|
|
266
266
|
getProjectEmbeddingSnapshot2,
|
|
267
267
|
embedTextForProject2,
|
|
268
268
|
embedBatchForProject2
|
|
269
|
-
} from "./index-
|
|
269
|
+
} from "./index-2pdgy88n.js";
|
|
270
270
|
import {
|
|
271
271
|
isEmbeddingHostBusy2
|
|
272
272
|
} from "./index-qt1qqasc.js";
|
|
273
273
|
import {
|
|
274
274
|
userFacingFailureCode
|
|
275
|
-
} from "./index-
|
|
275
|
+
} from "./index-39rzef89.js";
|
|
276
276
|
import {
|
|
277
277
|
getMessageIndexEpoch,
|
|
278
278
|
isMessageIndexSearchable,
|
|
279
279
|
createAutoSearchDiagnostics
|
|
280
|
-
} from "./index-
|
|
280
|
+
} from "./index-zxhev8ze.js";
|
|
281
281
|
import {
|
|
282
282
|
compareOpenCodeMessagesByCanonicalOrder,
|
|
283
283
|
startCompactionMarkerCandidatePreparation,
|
|
@@ -299,7 +299,7 @@ import {
|
|
|
299
299
|
peekNoteNudgeText,
|
|
300
300
|
markNoteNudgeDelivered,
|
|
301
301
|
getActiveCompartmentRun
|
|
302
|
-
} from "./index-
|
|
302
|
+
} from "./index-q7msfgwz.js";
|
|
303
303
|
import {
|
|
304
304
|
canonicalModelIdentity,
|
|
305
305
|
piModelRefToCanonical,
|
|
@@ -75,14 +75,14 @@ import {
|
|
|
75
75
|
import {
|
|
76
76
|
layoutLkgPrefix,
|
|
77
77
|
assembleLkgPrefix
|
|
78
|
-
} from "./index-
|
|
78
|
+
} from "./index-tt0vs4x5.js";
|
|
79
79
|
import {
|
|
80
80
|
ensurePrivateStorageDirectorySync,
|
|
81
81
|
writeStorageFileSync,
|
|
82
82
|
writeStorageFileAtomicSync,
|
|
83
83
|
syncStorageDirectorySync,
|
|
84
84
|
writeStorageFileDurableAtomicSync
|
|
85
|
-
} from "./index-
|
|
85
|
+
} from "./index-5df2fw5b.js";
|
|
86
86
|
import {
|
|
87
87
|
gaDatabasePath2,
|
|
88
88
|
V2StoreReader2
|
|
@@ -140,8 +140,8 @@ async function serveV2ArchiveReads2(port, openConnections) {
|
|
|
140
140
|
import("./store-reader-nf8z86n9.js"),
|
|
141
141
|
import("./store-n4yz3n66.js"),
|
|
142
142
|
import("./read-session-chunk-xv9f0wgb.js"),
|
|
143
|
-
import("./render-
|
|
144
|
-
import("./search-archive-
|
|
143
|
+
import("./render-d014e603.js"),
|
|
144
|
+
import("./search-archive-gybn6q7s.js"),
|
|
145
145
|
import("./expand-attachments-h33jbgyz.js")
|
|
146
146
|
]);
|
|
147
147
|
const pool = new V2StoreReaderPool;
|