@cortexkit/pi-magic-context 0.49.70 → 0.49.72
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/auto-search-worker.js +3 -3
- package/dist/chunk-embedding-write-worker.js +1 -1
- package/dist/{embedding-backfill-3g3cm51d.js → embedding-backfill-p0qszhx7.js} +2 -2
- package/dist/{index-73fw4cd4.js → index-6gwasf0v.js} +17 -3
- package/dist/{index-sg6tdkqh.js → index-9a92hc6c.js} +1 -1
- package/dist/{index-2kb65n0s.js → index-apff8dej.js} +1 -1
- package/dist/{index-2bavnrw8.js → index-cevw58nn.js} +99 -8
- package/dist/{index-4dqwxb7k.js → index-cyzsn2hb.js} +1 -1
- package/dist/{index-bcwy4wm1.js → index-dw9x7k2b.js} +8 -8
- package/dist/{index-tcrd11cb.js → index-kqekqrzw.js} +3 -3
- package/dist/{index-d7yx4ymd.js → index-mm9y1m77.js} +1 -1
- package/dist/{index-zgj2mxrn.js → index-r4qt07th.js} +3 -3
- package/dist/index-w2snpk0j.js +65 -0
- package/dist/{index-51xr6g7s.js → index-wmkkxwvf.js} +1 -1
- package/dist/{index-e9wkbh8y.js → index-yk0ve8hn.js} +4 -3
- package/dist/index.js +169 -98
- package/dist/{message-index-bounded-fqeqp76p.js → message-index-bounded-cv87994v.js} +3 -3
- package/dist/migration-worker.js +1 -1
- package/dist/{project-embedding-registry-63wsm3a8.js → project-embedding-registry-2natnvdf.js} +1 -1
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-tjj2wzxs.js → read-session-chunk-ygwyfvtr.js} +2 -2
- package/dist/{render-793jtz3r.js → render-bsdcxgaq.js} +5 -5
- package/dist/{search-archive-gmyvkadj.js → search-archive-3hh7ycvm.js} +4 -4
- package/dist/{search-7tpgsnbs.js → search-hm8dc1e8.js} +6 -6
- package/dist/{storage-tags-wq8p5wrh.js → storage-tags-zzttnzn6.js} +1 -1
- package/dist/subagent-entry.js +11 -11
- package/dist/tag-snapshot-worker-pi.js +3 -3
- package/dist/{v2-archive-reader-99stcer0.js → v2-archive-reader-b7spmyqa.js} +1 -1
- package/package.json +1 -1
- package/dist/index-qdy49kwk.js +0 -155
package/dist/index.js
CHANGED
|
@@ -158,7 +158,7 @@ import {
|
|
|
158
158
|
registerTodoStateLifecycle,
|
|
159
159
|
syncCtxMemoryToolEnabled,
|
|
160
160
|
registerMagicContextTools
|
|
161
|
-
} from "./index-
|
|
161
|
+
} from "./index-dw9x7k2b.js";
|
|
162
162
|
import"./index-4knyh1kt.js";
|
|
163
163
|
import {
|
|
164
164
|
canonicalModelIdentity,
|
|
@@ -410,7 +410,7 @@ import {
|
|
|
410
410
|
setSessionWorkMetrics,
|
|
411
411
|
getSessionWorkMetrics,
|
|
412
412
|
resolveEpochFloorForPass
|
|
413
|
-
} from "./index-
|
|
413
|
+
} from "./index-6gwasf0v.js";
|
|
414
414
|
import {
|
|
415
415
|
textMentionsRecentCommit,
|
|
416
416
|
hasMeaningfulUserText2,
|
|
@@ -461,7 +461,7 @@ import {
|
|
|
461
461
|
openCurrentDatabase,
|
|
462
462
|
openDatabaseAsync,
|
|
463
463
|
closeDatabase
|
|
464
|
-
} from "./index-
|
|
464
|
+
} from "./index-9a92hc6c.js";
|
|
465
465
|
import {
|
|
466
466
|
LkgRecoveryFenceError,
|
|
467
467
|
clearLkgFenceProcessState,
|
|
@@ -587,7 +587,7 @@ import {
|
|
|
587
587
|
getSourceContents,
|
|
588
588
|
recordSubagentInvocation,
|
|
589
589
|
getLatestHistorianInvocationId
|
|
590
|
-
} from "./index-
|
|
590
|
+
} from "./index-kqekqrzw.js";
|
|
591
591
|
import {
|
|
592
592
|
resolveOpenCodeDbPath,
|
|
593
593
|
assertOpenCodeStoreGeneration,
|
|
@@ -653,7 +653,7 @@ import {
|
|
|
653
653
|
getRawSessionTagKeysThrough2,
|
|
654
654
|
getLegacyProtectedTailStartOrdinal2,
|
|
655
655
|
readSessionChunk2
|
|
656
|
-
} from "./index-
|
|
656
|
+
} from "./index-apff8dej.js";
|
|
657
657
|
import"./index-nvh6d3bz.js";
|
|
658
658
|
import {
|
|
659
659
|
formatSynapseLaneDescriptor
|
|
@@ -693,7 +693,7 @@ import {
|
|
|
693
693
|
clearCompressionDepthRange,
|
|
694
694
|
cleanSearchText,
|
|
695
695
|
matchedSearchSnippet
|
|
696
|
-
} from "./index-
|
|
696
|
+
} from "./index-mm9y1m77.js";
|
|
697
697
|
import {
|
|
698
698
|
rememberV1HiddenRun
|
|
699
699
|
} from "./index-6x556c2q.js";
|
|
@@ -785,10 +785,7 @@ import {
|
|
|
785
785
|
embedSessionCompartmentChunks2,
|
|
786
786
|
getEmbeddingCoverageStatus2,
|
|
787
787
|
getAutoEmbeddingSessionCoverage2
|
|
788
|
-
} from "./index-
|
|
789
|
-
import {
|
|
790
|
-
cosineSimilarity
|
|
791
|
-
} from "./index-qdy49kwk.js";
|
|
788
|
+
} from "./index-yk0ve8hn.js";
|
|
792
789
|
import {
|
|
793
790
|
USER_FACING_FAILURES,
|
|
794
791
|
renderUserFacingFailure,
|
|
@@ -800,6 +797,7 @@ import {
|
|
|
800
797
|
renderSingleStoreMigrationRequiredRefusal,
|
|
801
798
|
SingleStoreMigrationRequiredError,
|
|
802
799
|
projectNeedsSingleStoreMigration,
|
|
800
|
+
cosineSimilarity,
|
|
803
801
|
promoteSessionFactsDurable,
|
|
804
802
|
embedPromotedFacts,
|
|
805
803
|
recordMemoryMapping,
|
|
@@ -822,7 +820,8 @@ import {
|
|
|
822
820
|
scheduleClearAndReindex,
|
|
823
821
|
clearSessionTracking,
|
|
824
822
|
createAutoSearchDiagnostics
|
|
825
|
-
} from "./index-
|
|
823
|
+
} from "./index-cevw58nn.js";
|
|
824
|
+
import"./index-w2snpk0j.js";
|
|
826
825
|
import"./index-3s39a1md.js";
|
|
827
826
|
import {
|
|
828
827
|
DREAMER_PRIMER_INVESTIGATOR_ALLOWED_TOOLS,
|
|
@@ -852,11 +851,11 @@ import {
|
|
|
852
851
|
drainPiTagSnapshotSession,
|
|
853
852
|
assertPiTagSnapshotReady,
|
|
854
853
|
ensurePiTagSnapshotReady
|
|
855
|
-
} from "./index-
|
|
854
|
+
} from "./index-wmkkxwvf.js";
|
|
856
855
|
import"./index-71rg8j43.js";
|
|
857
856
|
import"./index-8d2z6503.js";
|
|
858
|
-
import"./index-
|
|
859
|
-
import"./index-
|
|
857
|
+
import"./index-r4qt07th.js";
|
|
858
|
+
import"./index-cyzsn2hb.js";
|
|
860
859
|
import {
|
|
861
860
|
__toESM
|
|
862
861
|
} from "./index-22jkk6wg.js";
|
|
@@ -3608,7 +3607,7 @@ function startHostStallProfilerSwitch() {
|
|
|
3608
3607
|
// package.json
|
|
3609
3608
|
var package_default = {
|
|
3610
3609
|
name: "@cortexkit/pi-magic-context",
|
|
3611
|
-
version: "0.49.
|
|
3610
|
+
version: "0.49.72",
|
|
3612
3611
|
type: "module",
|
|
3613
3612
|
description: "Pi and OMP coding agent extension for Magic Context — cross-session memory and context management",
|
|
3614
3613
|
main: "dist/index.js",
|
|
@@ -11543,7 +11542,7 @@ ${currentDocs?.structure ?? "(read from project)"}
|
|
|
11543
11542
|
|
|
11544
11543
|
Find claims in these sections that the diff makes wrong or incomplete. Propose one focused change per claim or section. Do not investigate unrelated areas. Read the docs and relevant source with read-only tools. These files are short maps read by every agent in every session. Describe how the system works now, never what changed or when: no change log, dates, or commit lists. One short paragraph per subsystem at most. Mechanism detail belongs in docs/architecture/; you may name a docs page for it but never move that detail into these two files. Propose a change only when code contradicts the docs or a major piece is missing. Prefer rewriting a stale sentence to adding one. Propose nothing when nothing is wrong. Keep both files within the combined budget. Never touch protected regions (<!-- mc:protected START ... --> through <!-- mc:protected END -->); preserve their bytes.
|
|
11545
11544
|
|
|
11546
|
-
Return ONLY a JSON array (or []), with each entry {"file":"ARCHITECTURE.md"|"STRUCTURE.md","action":"replace"|"add"|"remove","heading":"## Exact section heading","text":"## Full
|
|
11545
|
+
Return ONLY a JSON array (or []), with each entry {"file":"ARCHITECTURE.md"|"STRUCTURE.md","action":"replace"|"add"|"remove","heading":"## Exact section heading","text":"## Full section including heading and body (empty for remove)","reason":"one-line reason"}. A section is its heading and everything under it until the next heading of the same or a higher level outside code fences, or the end of the file. Replace, add, or remove exactly one whole section per entry, including its subsections. Additions are appended at the end of the file. Do not include entries for unmodified sections. No file writes.`;
|
|
11547
11546
|
}
|
|
11548
11547
|
function buildDreamTaskPrompt(task, args) {
|
|
11549
11548
|
switch (task) {
|
|
@@ -12648,23 +12647,35 @@ ${stat}`
|
|
|
12648
12647
|
return null;
|
|
12649
12648
|
}
|
|
12650
12649
|
}
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
`);
|
|
12650
|
+
var ATX_HEADING = /^ {0,3}(#{1,6})(?=[ \t]|$)/;
|
|
12651
|
+
function sections(lines) {
|
|
12654
12652
|
const result = [];
|
|
12655
|
-
|
|
12653
|
+
const open = [];
|
|
12654
|
+
let fence;
|
|
12656
12655
|
for (let i = 0;i < lines.length; i++) {
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
if (
|
|
12660
|
-
if (
|
|
12661
|
-
|
|
12662
|
-
|
|
12656
|
+
const heading = lines[i].replace(/\r$/, "");
|
|
12657
|
+
const marker = heading.match(/^ {0,3}(`{3,}|~{3,})(.*)$/);
|
|
12658
|
+
if (fence) {
|
|
12659
|
+
if (marker?.[1].startsWith(fence) && !marker[2].trim())
|
|
12660
|
+
fence = undefined;
|
|
12661
|
+
continue;
|
|
12663
12662
|
}
|
|
12663
|
+
if (marker && (marker[1][0] === "~" || !marker[2].includes("`"))) {
|
|
12664
|
+
fence = marker[1];
|
|
12665
|
+
continue;
|
|
12666
|
+
}
|
|
12667
|
+
const match = heading.match(ATX_HEADING);
|
|
12668
|
+
if (!match)
|
|
12669
|
+
continue;
|
|
12670
|
+
const level = match[1].length;
|
|
12671
|
+
for (let previous = open.at(-1);previous && previous.level >= level; previous = open.at(-1)) {
|
|
12672
|
+
previous.end = i;
|
|
12673
|
+
open.pop();
|
|
12674
|
+
}
|
|
12675
|
+
const section = { heading, level, start: i, end: lines.length };
|
|
12676
|
+
result.push(section);
|
|
12677
|
+
open.push(section);
|
|
12664
12678
|
}
|
|
12665
|
-
for (const section of result)
|
|
12666
|
-
section.text = lines.slice(section.start, section.end).join(`
|
|
12667
|
-
`);
|
|
12668
12679
|
return result;
|
|
12669
12680
|
}
|
|
12670
12681
|
function protectedBytes(text) {
|
|
@@ -12687,76 +12698,142 @@ function diff(name, before, after) {
|
|
|
12687
12698
|
}
|
|
12688
12699
|
}
|
|
12689
12700
|
function parseDocsProposalOutput(output) {
|
|
12690
|
-
|
|
12691
|
-
|
|
12701
|
+
let parsed;
|
|
12702
|
+
try {
|
|
12703
|
+
parsed = JSON.parse(output);
|
|
12704
|
+
} catch (error) {
|
|
12705
|
+
const match = output.match(/```json[ \t]*\r?\n([\s\S]*?)\r?\n[ \t]*```(?=\s|$)/) ?? output.match(/```json\s*([\s\S]*?)```/);
|
|
12706
|
+
if (!match)
|
|
12707
|
+
throw error;
|
|
12708
|
+
parsed = JSON.parse(match[1]);
|
|
12709
|
+
}
|
|
12692
12710
|
if (!Array.isArray(parsed))
|
|
12693
12711
|
throw new Error("proposal must be a JSON array");
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12712
|
+
return parsed;
|
|
12713
|
+
}
|
|
12714
|
+
function readChange(item) {
|
|
12715
|
+
if (!item || typeof item !== "object" || Array.isArray(item))
|
|
12716
|
+
return "expected an object";
|
|
12717
|
+
const { file, action, heading, text, reason } = item;
|
|
12718
|
+
if (file !== "ARCHITECTURE.md" && file !== "STRUCTURE.md")
|
|
12719
|
+
return "unknown proposal file";
|
|
12720
|
+
if (action !== "replace" && action !== "add" && action !== "remove")
|
|
12721
|
+
return "invalid action";
|
|
12722
|
+
if (typeof heading !== "string" || /[\r\n]/.test(heading) || !ATX_HEADING.test(heading))
|
|
12723
|
+
return "invalid section heading";
|
|
12724
|
+
if (typeof text !== "string")
|
|
12725
|
+
return "section text must be a string";
|
|
12726
|
+
if (typeof reason !== "string" || !reason.trim() || /[\r\n]/.test(reason))
|
|
12727
|
+
return "expected a one-line reason";
|
|
12728
|
+
return { file, action, heading, text, reason };
|
|
12729
|
+
}
|
|
12730
|
+
function applyChange(before, change) {
|
|
12731
|
+
const lines = before.split(`
|
|
12732
|
+
`);
|
|
12733
|
+
const existing = sections(lines);
|
|
12734
|
+
const index = existing.findIndex((item) => item.heading === change.heading);
|
|
12735
|
+
const replacement = change.action === "remove" ? [] : change.text.trimEnd().split(`
|
|
12736
|
+
`);
|
|
12737
|
+
const inserted = sections(replacement);
|
|
12738
|
+
const wholeSection = inserted[0]?.heading === change.heading && inserted[0].start === 0 && inserted[0].end === replacement.length;
|
|
12739
|
+
const expectedHeadings = existing.map((item) => item.heading);
|
|
12740
|
+
const insertedHeadings = inserted.map((item) => item.heading);
|
|
12741
|
+
let after;
|
|
12742
|
+
if (change.action === "add") {
|
|
12743
|
+
if (index !== -1 || !wholeSection)
|
|
12744
|
+
return `invalid addition ${change.heading}`;
|
|
12745
|
+
after = `${before.endsWith(`
|
|
12746
|
+
`) ? before : `${before}
|
|
12747
|
+
`}
|
|
12748
|
+
${replacement.join(`
|
|
12749
|
+
`)}
|
|
12750
|
+
`;
|
|
12751
|
+
expectedHeadings.push(...insertedHeadings);
|
|
12752
|
+
} else {
|
|
12753
|
+
if (index === -1)
|
|
12754
|
+
return `missing section ${change.heading}`;
|
|
12755
|
+
if (change.action === "replace" && !wholeSection)
|
|
12756
|
+
return `invalid replacement ${change.heading}`;
|
|
12757
|
+
const section = existing[index];
|
|
12758
|
+
const affected = existing.filter((item) => item.start >= section.start && item.start < section.end);
|
|
12759
|
+
expectedHeadings.splice(index, affected.length, ...insertedHeadings);
|
|
12760
|
+
if (change.action === "replace" && section.end === lines.length && before.endsWith(`
|
|
12761
|
+
`))
|
|
12762
|
+
replacement.push("");
|
|
12763
|
+
lines.splice(section.start, section.end - section.start, ...replacement);
|
|
12764
|
+
after = lines.join(`
|
|
12765
|
+
`);
|
|
12766
|
+
}
|
|
12767
|
+
if (JSON.stringify(protectedBytes(before)) !== JSON.stringify(protectedBytes(after)))
|
|
12768
|
+
return `protected region changed in ${change.file}`;
|
|
12769
|
+
if (JSON.stringify(sections(after.split(`
|
|
12770
|
+
`)).map((item) => item.heading)) !== JSON.stringify(expectedHeadings))
|
|
12771
|
+
return `markdown structure changed in ${change.file}`;
|
|
12772
|
+
if (after === before)
|
|
12773
|
+
return "no doc changes proposed";
|
|
12774
|
+
return { after };
|
|
12775
|
+
}
|
|
12776
|
+
function applyChanges(items, originals, overBudget) {
|
|
12777
|
+
const docs = { ...originals };
|
|
12778
|
+
const kept = [];
|
|
12779
|
+
const dropped = [];
|
|
12697
12780
|
const seen = new Set;
|
|
12698
|
-
for (const
|
|
12781
|
+
for (const [index, item] of items.entries()) {
|
|
12782
|
+
const change = overBudget.get(index) ?? readChange(item);
|
|
12783
|
+
if (typeof change === "string") {
|
|
12784
|
+
dropped.push({ index, reason: change });
|
|
12785
|
+
continue;
|
|
12786
|
+
}
|
|
12699
12787
|
const key = `${change.file}:${change.heading}`;
|
|
12700
|
-
|
|
12701
|
-
|
|
12788
|
+
const before = docs[change.file];
|
|
12789
|
+
const result = seen.has(key) ? `duplicate section change ${change.heading}` : applyChange(before, change);
|
|
12790
|
+
if (typeof result === "string") {
|
|
12791
|
+
dropped.push({ index, reason: result });
|
|
12792
|
+
continue;
|
|
12793
|
+
}
|
|
12794
|
+
kept.push({ index, change, grew: result.after.length > before.length });
|
|
12795
|
+
docs[change.file] = result.after;
|
|
12702
12796
|
seen.add(key);
|
|
12703
12797
|
}
|
|
12704
|
-
|
|
12798
|
+
const tokens = FILES.reduce((sum, file) => sum + Math.ceil(docs[file].length / 3.5), 0);
|
|
12799
|
+
return { docs, kept, dropped, tokens };
|
|
12705
12800
|
}
|
|
12706
12801
|
function validateDocsProposal(projectDir, output, budget, expected) {
|
|
12707
|
-
|
|
12802
|
+
const readDoc = (file) => {
|
|
12803
|
+
const path = join8(projectDir, file);
|
|
12804
|
+
return existsSync6(path) ? readFileSync6(path, "utf8") : "";
|
|
12805
|
+
};
|
|
12806
|
+
const originals = {
|
|
12807
|
+
"ARCHITECTURE.md": readDoc("ARCHITECTURE.md"),
|
|
12808
|
+
"STRUCTURE.md": readDoc("STRUCTURE.md")
|
|
12809
|
+
};
|
|
12810
|
+
if (Object.keys(expected).some((name) => !FILES.some((file) => file === name && hash(originals[file]) === expected[name])))
|
|
12708
12811
|
throw new Error("base drifted");
|
|
12709
|
-
const
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
`))
|
|
12722
|
-
throw new Error(`invalid addition ${change.heading}`);
|
|
12723
|
-
after += `${after.endsWith(`
|
|
12724
|
-
`) ? "" : `
|
|
12725
|
-
`}
|
|
12726
|
-
${change.text.trimEnd()}
|
|
12727
|
-
`;
|
|
12728
|
-
} else {
|
|
12729
|
-
if (!section)
|
|
12730
|
-
throw new Error(`missing section ${change.heading}`);
|
|
12731
|
-
if (change.action === "replace" && (!change.text.startsWith(`${change.heading}
|
|
12732
|
-
`) || sections(change.text).length !== 1))
|
|
12733
|
-
throw new Error(`invalid replacement ${change.heading}`);
|
|
12734
|
-
const lines = after.split(`
|
|
12735
|
-
`);
|
|
12736
|
-
lines.splice(section.start, section.end - section.start, ...change.action === "remove" ? [] : change.text.trimEnd().split(`
|
|
12737
|
-
`));
|
|
12738
|
-
after = lines.join(`
|
|
12739
|
-
`);
|
|
12740
|
-
}
|
|
12741
|
-
}
|
|
12742
|
-
if (JSON.stringify(protectedBytes(before)) !== JSON.stringify(protectedBytes(after)))
|
|
12743
|
-
throw new Error(`protected region changed in ${file}`);
|
|
12744
|
-
const originalHeadings = sections(before).map((item) => item.heading);
|
|
12745
|
-
const expectedHeadings = originalHeadings.filter((heading) => !changes.some((item) => item.file === file && item.action === "remove" && item.heading === heading)).concat(changes.filter((item) => item.file === file && item.action === "add").map((item) => item.heading));
|
|
12746
|
-
if (JSON.stringify(sections(after).map((item) => item.heading)) !== JSON.stringify(expectedHeadings))
|
|
12747
|
-
throw new Error(`markdown structure changed in ${file}`);
|
|
12748
|
-
tokens += Math.ceil(after.length / 3.5);
|
|
12749
|
-
if (after !== before)
|
|
12750
|
-
diffs += diff(file, before, after);
|
|
12812
|
+
const items = parseDocsProposalOutput(output);
|
|
12813
|
+
const overBudget = new Map;
|
|
12814
|
+
let result = applyChanges(items, originals, overBudget);
|
|
12815
|
+
while (result.tokens > budget && result.kept.length) {
|
|
12816
|
+
const reason = `over budget: ${result.tokens} > ${budget}`;
|
|
12817
|
+
const latestGrowth = [...result.kept].reverse().find((item) => item.grew);
|
|
12818
|
+
if (latestGrowth)
|
|
12819
|
+
overBudget.set(latestGrowth.index, reason);
|
|
12820
|
+
else
|
|
12821
|
+
for (const item of result.kept)
|
|
12822
|
+
overBudget.set(item.index, reason);
|
|
12823
|
+
result = applyChanges(items, originals, overBudget);
|
|
12751
12824
|
}
|
|
12752
|
-
|
|
12753
|
-
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12825
|
+
const diffs = FILES.filter((file) => originals[file] !== result.docs[file]).map((file) => diff(file, originals[file], result.docs[file])).join("");
|
|
12826
|
+
return {
|
|
12827
|
+
changes: result.kept.map((item) => item.change),
|
|
12828
|
+
dropped: result.dropped,
|
|
12829
|
+
tokens: result.tokens,
|
|
12830
|
+
diffs
|
|
12831
|
+
};
|
|
12757
12832
|
}
|
|
12758
12833
|
function writeDocsProposal(projectDir, output, budget, expected, head) {
|
|
12759
12834
|
const result = validateDocsProposal(projectDir, output, budget, expected);
|
|
12835
|
+
if (!result.diffs)
|
|
12836
|
+
return { path: null, dropped: result.dropped };
|
|
12760
12837
|
const dir = proposalDir(projectDir);
|
|
12761
12838
|
mkdirSync2(join8(dir, "superseded"), { recursive: true });
|
|
12762
12839
|
ensureCortexKitArtifactGitignore(projectDir);
|
|
@@ -12790,7 +12867,7 @@ ${result.diffs}
|
|
|
12790
12867
|
for (const old of listPendingDocsProposals(projectDir))
|
|
12791
12868
|
if (old !== path)
|
|
12792
12869
|
renameSync(old, join8(dir, "superseded", old.split("/").at(-1) ?? "proposal.md"));
|
|
12793
|
-
return path;
|
|
12870
|
+
return { path, dropped: result.dropped };
|
|
12794
12871
|
}
|
|
12795
12872
|
|
|
12796
12873
|
// ../plugin/src/agents/smart-note-compiler.ts
|
|
@@ -19399,19 +19476,13 @@ async function runAgenticTask(config, ctx, helpers) {
|
|
|
19399
19476
|
recordInvocation("completed", run.output);
|
|
19400
19477
|
if (task === "maintain-docs" && docsHashes && changes) {
|
|
19401
19478
|
try {
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
|
|
19405
|
-
|
|
19406
|
-
detail: "no corrections proposed",
|
|
19407
|
-
schedulePatch: { taskStateJson: JSON.stringify({ head: changes.head }) }
|
|
19408
|
-
};
|
|
19409
|
-
}
|
|
19410
|
-
const path = writeDocsProposal(docsDir, String(run.validated), config.docsMaxTokens ?? 12000, docsHashes, changes.head);
|
|
19411
|
-
helpers.recordRun("completed", null, { progress: `proposal: ${path}` });
|
|
19479
|
+
const { path, dropped } = writeDocsProposal(docsDir, String(run.validated), config.docsMaxTokens ?? 12000, docsHashes, changes.head);
|
|
19480
|
+
const outcome = path ? `proposal: ${path}` : "no corrections proposed";
|
|
19481
|
+
const detail = dropped.length ? `${outcome}; dropped ${dropped.map(({ index, reason }) => `entry ${index + 1}: ${reason}`).join("; ")}` : outcome;
|
|
19482
|
+
helpers.recordRun("completed", null, { progress: detail });
|
|
19412
19483
|
return {
|
|
19413
19484
|
status: "completed",
|
|
19414
|
-
detail
|
|
19485
|
+
detail,
|
|
19415
19486
|
schedulePatch: { taskStateJson: JSON.stringify({ head: changes.head }) }
|
|
19416
19487
|
};
|
|
19417
19488
|
} catch (error) {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
withIndexChunk2,
|
|
4
4
|
yieldIndexChunk2
|
|
5
5
|
} from "./index-2qtx0q6h.js";
|
|
6
|
-
import"./index-
|
|
6
|
+
import"./index-6gwasf0v.js";
|
|
7
7
|
import"./index-pefn1gt5.js";
|
|
8
8
|
import"./index-0h2mkab2.js";
|
|
9
9
|
import"./index-tm11k42a.js";
|
|
@@ -15,7 +15,7 @@ import"./index-wfqysrwq.js";
|
|
|
15
15
|
import"./index-x2n261wp.js";
|
|
16
16
|
import"./index-xjhq27z9.js";
|
|
17
17
|
import"./index-n0zjvs3h.js";
|
|
18
|
-
import"./index-
|
|
18
|
+
import"./index-apff8dej.js";
|
|
19
19
|
import"./index-6x556c2q.js";
|
|
20
20
|
import {
|
|
21
21
|
MESSAGE_INDEX_MAX_FTS_BYTES,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
markMessageIndexDirty,
|
|
25
25
|
getIndexableContent,
|
|
26
26
|
indexSingleMessage
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-mm9y1m77.js";
|
|
28
28
|
import"./index-ghp32f9m.js";
|
|
29
29
|
import"./index-1ts77n1b.js";
|
|
30
30
|
|
package/dist/migration-worker.js
CHANGED
package/dist/{project-embedding-registry-63wsm3a8.js → project-embedding-registry-2natnvdf.js}
RENAMED
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
sweepAllRegisteredProjects2,
|
|
35
35
|
_setTestProviderFactoryForProject2,
|
|
36
36
|
_resetProjectEmbeddingRegistryForTests2
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-yk0ve8hn.js";
|
|
38
38
|
import"./index-9p40dgkm.js";
|
|
39
39
|
import"./index-hgd00nas.js";
|
|
40
40
|
import"./index-yhzhdp3m.js";
|
|
@@ -19,7 +19,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
19
19
|
await main();
|
|
20
20
|
async function main() {
|
|
21
21
|
if (input.v2ArchiveReader) {
|
|
22
|
-
const { serveV2ArchiveReads } = await import("./v2-archive-reader-
|
|
22
|
+
const { serveV2ArchiveReads } = await import("./v2-archive-reader-b7spmyqa.js");
|
|
23
23
|
await serveV2ArchiveReads(port, openConnections);
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
@@ -51,7 +51,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
51
51
|
await runMessageFtsRowidMapBackfill(db);
|
|
52
52
|
reply = { kind: "fts-rowid-backfill" };
|
|
53
53
|
} else if (input.searchArchive) {
|
|
54
|
-
const { renderSearchArchive } = await import("./search-archive-
|
|
54
|
+
const { renderSearchArchive } = await import("./search-archive-3hh7ycvm.js");
|
|
55
55
|
const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-0tytrjye.js");
|
|
56
56
|
const archive = input.searchArchive;
|
|
57
57
|
let raw;
|
|
@@ -81,7 +81,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
81
81
|
const { setHarness } = await import("./harness-9872e0ym.js");
|
|
82
82
|
setHarness(input.harness ?? "opencode");
|
|
83
83
|
const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
|
|
84
|
-
import("./message-index-bounded-
|
|
84
|
+
import("./message-index-bounded-cv87994v.js"),
|
|
85
85
|
import("./sqlite-context-pragmas-gcgch6qz.js")
|
|
86
86
|
]);
|
|
87
87
|
configureContextDatabasePragmas(db);
|
|
@@ -95,7 +95,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
95
95
|
measurements: result.measurements
|
|
96
96
|
};
|
|
97
97
|
} else if (input.tagRatio !== undefined) {
|
|
98
|
-
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-
|
|
98
|
+
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-zzttnzn6.js");
|
|
99
99
|
const delta = input.tagState ? scanTagOwnerDelta(db, input.sessionId, input.tagState) : null;
|
|
100
100
|
if (delta)
|
|
101
101
|
reply = { kind: "tag-delta", delta };
|
|
@@ -38,8 +38,8 @@ import {
|
|
|
38
38
|
readSessionChunk2,
|
|
39
39
|
getRawSessionMessageIdsThrough2,
|
|
40
40
|
readRawSessionSeedTail2
|
|
41
|
-
} from "./index-
|
|
42
|
-
import"./index-
|
|
41
|
+
} from "./index-apff8dej.js";
|
|
42
|
+
import"./index-6gwasf0v.js";
|
|
43
43
|
import"./index-6x556c2q.js";
|
|
44
44
|
import"./index-vcegxfwg.js";
|
|
45
45
|
import"./index-jhmz9tgv.js";
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
renderVerboseRange2,
|
|
4
4
|
renderVerboseRangeForTool2,
|
|
5
5
|
renderItemByTag2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-kqekqrzw.js";
|
|
7
7
|
import"./index-k7a8x7ba.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-mm9y1m77.js";
|
|
9
9
|
import"./index-hgd00nas.js";
|
|
10
10
|
import"./index-nvh6d3bz.js";
|
|
11
11
|
import"./index-cxczethe.js";
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
import"./index-apff8dej.js";
|
|
13
|
+
import"./index-6gwasf0v.js";
|
|
14
14
|
import"./index-6x556c2q.js";
|
|
15
15
|
import"./index-5rcjs14a.js";
|
|
16
16
|
import"./index-vcegxfwg.js";
|
|
17
|
-
import"./index-
|
|
17
|
+
import"./index-9a92hc6c.js";
|
|
18
18
|
import"./index-fapenpch.js";
|
|
19
19
|
import"./index-gavj3e6h.js";
|
|
20
20
|
import"./index-135e8hvg.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderSearchArchive2
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
3
|
+
} from "./index-cyzsn2hb.js";
|
|
4
|
+
import"./index-r4qt07th.js";
|
|
5
5
|
import"./index-8d2z6503.js";
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
6
|
+
import"./index-apff8dej.js";
|
|
7
|
+
import"./index-6gwasf0v.js";
|
|
8
8
|
import"./index-6x556c2q.js";
|
|
9
9
|
import"./index-vcegxfwg.js";
|
|
10
10
|
import"./index-jhmz9tgv.js";
|
|
@@ -5,20 +5,20 @@ import {
|
|
|
5
5
|
resolveMemoriesByIdsForSearch2,
|
|
6
6
|
unifiedSearch2,
|
|
7
7
|
formatSearchResults2
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-cevw58nn.js";
|
|
9
9
|
import"./index-k7a8x7ba.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-mm9y1m77.js";
|
|
11
11
|
import"./index-8d2z6503.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-w2snpk0j.js";
|
|
13
13
|
import"./index-29nw7n1r.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-yk0ve8hn.js";
|
|
15
15
|
import"./index-9p40dgkm.js";
|
|
16
16
|
import"./index-hgd00nas.js";
|
|
17
17
|
import"./index-yhzhdp3m.js";
|
|
18
18
|
import"./index-79xfn84y.js";
|
|
19
19
|
import"./index-cxczethe.js";
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
20
|
+
import"./index-apff8dej.js";
|
|
21
|
+
import"./index-6gwasf0v.js";
|
|
22
22
|
import"./index-6x556c2q.js";
|
|
23
23
|
import"./index-txcs0vnj.js";
|
|
24
24
|
import"./index-5rcjs14a.js";
|
package/dist/subagent-entry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TOKEN_BUDGET_TOOL_REFUSAL
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-apff8dej.js";
|
|
4
4
|
import {
|
|
5
5
|
setHarness2
|
|
6
6
|
} from "./index-0h2mkab2.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import"./index-2qtx0q6h.js";
|
|
15
15
|
import {
|
|
16
16
|
openDatabase
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-9a92hc6c.js";
|
|
18
18
|
import"./index-fapenpch.js";
|
|
19
19
|
import"./index-3bb24eb6.js";
|
|
20
20
|
import"./index-8sqebjzk.js";
|
|
@@ -34,28 +34,28 @@ import {
|
|
|
34
34
|
resolvePiHarnessKind,
|
|
35
35
|
reportSubagentStartupError,
|
|
36
36
|
registerMagicContextTools
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-dw9x7k2b.js";
|
|
38
38
|
import"./index-vcegxfwg.js";
|
|
39
39
|
import"./index-5rcjs14a.js";
|
|
40
40
|
import"./index-cxczethe.js";
|
|
41
41
|
import"./index-txcs0vnj.js";
|
|
42
|
-
import"./index-
|
|
42
|
+
import"./index-yk0ve8hn.js";
|
|
43
43
|
import"./index-hgd00nas.js";
|
|
44
44
|
import"./index-9p40dgkm.js";
|
|
45
45
|
import"./index-79xfn84y.js";
|
|
46
46
|
import"./index-yhzhdp3m.js";
|
|
47
|
-
import"./index-
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
47
|
+
import"./index-cevw58nn.js";
|
|
48
|
+
import"./index-kqekqrzw.js";
|
|
49
|
+
import"./index-mm9y1m77.js";
|
|
50
|
+
import"./index-6gwasf0v.js";
|
|
51
51
|
import"./index-6x556c2q.js";
|
|
52
52
|
import"./index-nvh6d3bz.js";
|
|
53
53
|
import"./index-k7a8x7ba.js";
|
|
54
54
|
import"./index-8d2z6503.js";
|
|
55
|
-
import"./index-
|
|
56
|
-
import"./index-
|
|
55
|
+
import"./index-r4qt07th.js";
|
|
56
|
+
import"./index-cyzsn2hb.js";
|
|
57
|
+
import"./index-w2snpk0j.js";
|
|
57
58
|
import"./index-29nw7n1r.js";
|
|
58
|
-
import"./index-2bavnrw8.js";
|
|
59
59
|
import"./index-3s39a1md.js";
|
|
60
60
|
import"./index-1ts77n1b.js";
|
|
61
61
|
import {
|
|
@@ -8,7 +8,7 @@ import"./index-tm11k42a.js";
|
|
|
8
8
|
import {
|
|
9
9
|
LATEST_SUPPORTED_VERSION,
|
|
10
10
|
getPersistedSchemaVersion
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-9a92hc6c.js";
|
|
12
12
|
import"./index-fapenpch.js";
|
|
13
13
|
import"./index-3bb24eb6.js";
|
|
14
14
|
import"./index-8sqebjzk.js";
|
|
@@ -28,14 +28,14 @@ import"./index-pefn1gt5.js";
|
|
|
28
28
|
import {
|
|
29
29
|
normalizeTagSnapshotRow2,
|
|
30
30
|
TAG_SELECT_COLUMNS2
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-6gwasf0v.js";
|
|
32
32
|
import"./index-vcegxfwg.js";
|
|
33
33
|
import {
|
|
34
34
|
encodePiHydrationOperation,
|
|
35
35
|
projectPiPassTag,
|
|
36
36
|
PI_FALLBACK_ROW_COLUMNS,
|
|
37
37
|
PI_FALLBACK_ROW_PREDICATE
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-wmkkxwvf.js";
|
|
39
39
|
import"./index-1ts77n1b.js";
|
|
40
40
|
import {
|
|
41
41
|
serveWorkerJobs
|