@volter/supercode-interchange 0.1.22 → 0.1.24
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/LICENSE-diffy-MIT +23 -0
- package/README.md +422 -2
- package/channel-records.mjs +71 -0
- package/channel-session-counts.mjs +81 -0
- package/channels-read.mjs +90 -0
- package/corpus-audit-records.mjs +192 -0
- package/corpus-audit-render.mjs +47 -0
- package/corpus-audit-schema.mjs +89 -0
- package/corpus-audit.d.ts +16 -0
- package/corpus-audit.mjs +132 -0
- package/file-io.mjs +21 -2
- package/harness-settings.mjs +19 -0
- package/hermes-fire-links.mjs +135 -0
- package/hermes-fires.mjs +106 -0
- package/hermes-read-home.d.ts +3 -0
- package/hermes-read-home.mjs +235 -0
- package/hermes-read-store.mjs +49 -0
- package/hermes-read-validation.mjs +170 -0
- package/hermes-read-workflow.mjs +164 -0
- package/hermes-read-yaml.mjs +68 -0
- package/hermes-store.mjs +1 -1
- package/homes.mjs +2 -2
- package/index.d.ts +14 -1
- package/index.mjs +1 -1
- package/inspection-builtin-tools.json +261 -0
- package/inspection-config-fields.json +765 -0
- package/inspection-schemas.d.ts +4 -0
- package/inspection-schemas.mjs +117 -0
- package/job-notepad-read.mjs +97 -0
- package/jobs-control.mjs +250 -0
- package/jobs-read.mjs +198 -0
- package/jsonl.mjs +4 -3
- package/memory-show.mjs +187 -0
- package/metadata.mjs +45 -3
- package/native-json.mjs +46 -3
- package/ontology-contracts.d.ts +5 -0
- package/ontology-contracts.mjs +29 -0
- package/ontology-operations.json +198 -0
- package/ontology-schemas.json +7946 -0
- package/openclaw-jobs-read.mjs +117 -0
- package/openclaw-profile-home.mjs +142 -0
- package/orchestrator-read-records.mjs +112 -0
- package/orchestrator-store.mjs +21 -9
- package/package.json +59 -4
- package/parity-ledger.json +6984 -0
- package/parity-orchestration.json +5538 -0
- package/parity-report.d.ts +7 -0
- package/parity-report.mjs +46 -0
- package/preset-profiles.mjs +27 -0
- package/profile-command.mjs +32 -0
- package/profile-orchestrator-door.mjs +104 -0
- package/profile-paths.mjs +25 -0
- package/profiles-control.mjs +98 -0
- package/profiles-read.mjs +119 -0
- package/reduction-attribution.mjs +54 -0
- package/reduction-diff.mjs +165 -0
- package/reduction-log.mjs +177 -0
- package/reduction-view.mjs +145 -0
- package/retained-projection.mjs +9 -0
- package/routes-read.mjs +103 -0
- package/runs-read.mjs +224 -0
- package/session-activity.d.ts +23 -0
- package/session-activity.mjs +124 -0
- package/session-append-scan.mjs +27 -17
- package/session-branch-handoff.mjs +115 -0
- package/session-claude-graph.mjs +29 -7
- package/session-claude-index.mjs +732 -114
- package/session-claude-runtime.d.ts +28 -0
- package/session-claude-runtime.mjs +171 -6
- package/session-claude-scan-store.mjs +164 -0
- package/session-claude.mjs +9 -0
- package/session-codex-activity.d.ts +6 -0
- package/session-codex-activity.mjs +120 -0
- package/session-codex-window.mjs +24 -4
- package/session-config-scan.mjs +141 -0
- package/session-convert.d.ts +33 -0
- package/session-convert.mjs +179 -0
- package/session-emission-version.json +1 -0
- package/session-file.mjs +11 -1
- package/session-follower.mjs +17 -5
- package/session-fresh-id.mjs +15 -0
- package/session-hermes-import.mjs +61 -0
- package/session-hermes.mjs +1 -1
- package/session-import.mjs +37 -0
- package/session-inspect.d.ts +18 -0
- package/session-inspect.mjs +122 -0
- package/session-machine-tree.d.ts +33 -0
- package/session-machine-tree.mjs +274 -0
- package/session-materialize-files.mjs +78 -0
- package/session-materialize-opencode.mjs +137 -0
- package/session-materialize.mjs +186 -0
- package/session-message.mjs +85 -0
- package/session-model.d.ts +9 -0
- package/session-model.mjs +1 -0
- package/session-opencode-store.mjs +39 -3
- package/session-path.mjs +6 -3
- package/session-pi-content.mjs +7 -2
- package/session-read.d.ts +134 -2
- package/session-read.mjs +86 -9
- package/session-recorded-config.mjs +3 -2
- package/session-records.mjs +12 -6
- package/session-residue-store.mjs +90 -0
- package/session-residue.mjs +150 -0
- package/session-resume-instructions.mjs +1 -1
- package/session-saved-read.mjs +105 -0
- package/session-transfer.mjs +141 -0
- package/session-views.mjs +1 -0
- package/session-write-claude.mjs +135 -0
- package/session-write-codex.mjs +146 -0
- package/session-write-gemini.mjs +77 -0
- package/session-write-goose.mjs +99 -0
- package/session-write-grok.mjs +70 -0
- package/session-write-native.mjs +41 -0
- package/session-write-opencode.mjs +197 -0
- package/session-write-pi.mjs +130 -0
- package/session-write-residue.mjs +19 -0
- package/session-write-utils.mjs +77 -0
- package/session-write.d.ts +10 -0
- package/session-write.mjs +37 -0
- package/skill-toml.mjs +80 -0
- package/skills-control.mjs +193 -0
- package/skills-list.mjs +237 -0
- package/source-files.mjs +12 -2
- package/sqlite-reader.mjs +134 -18
- package/support-registry.json +402 -0
- package/support-report.mjs +69 -0
- package/trigger-records.mjs +77 -0
- package/triggers-read.mjs +67 -0
- package/workflow-read.mjs +165 -0
package/session-claude-graph.mjs
CHANGED
|
@@ -18,8 +18,9 @@ function compactBoundary(value) {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
/** Claude's active branch and compaction projection. Semantic reads may name
|
|
22
|
-
*
|
|
21
|
+
/** Claude's active branch and compaction projection. Semantic reads may name degraded segments, and a history read
|
|
22
|
+
* (a semantic read with `history`) keeps every segment before the latest compaction; other reads cut at the latest
|
|
23
|
+
* boundary, and stricter continuation/export reads never guess a graph. */
|
|
23
24
|
export class ClaudeReplayIndex {
|
|
24
25
|
nodes = [];
|
|
25
26
|
byUuid = new Map();
|
|
@@ -64,11 +65,11 @@ export class ClaudeReplayIndex {
|
|
|
64
65
|
});
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
selectLines(fidelity) {
|
|
68
|
+
selectLines(fidelity, { history = false } = {}) {
|
|
68
69
|
const lenient = fidelity === 'semantic', residue = [];
|
|
69
70
|
if (this.nodes.every((node) => !conversation(node))) return { lines: this.linearLines, residue };
|
|
70
71
|
if (lenient) this.#anchorDanglingParents(residue);
|
|
71
|
-
try { return { lines: this.#project(lenient, residue), residue }; }
|
|
72
|
+
try { return { lines: this.#project(lenient, residue, lenient && history), residue }; }
|
|
72
73
|
catch (error) {
|
|
73
74
|
if (!lenient) throw error;
|
|
74
75
|
residue.push(`the Claude record graph could not be projected (${error.message}); every record was stitched in transcript order instead`);
|
|
@@ -88,10 +89,13 @@ export class ClaudeReplayIndex {
|
|
|
88
89
|
residue.push(`${dangling.length} Claude record(s) reference a parentUuid absent from the transcript and were anchored as segment roots: ${listed}`);
|
|
89
90
|
}
|
|
90
91
|
|
|
91
|
-
#project(lenient, residue) {
|
|
92
|
+
#project(lenient, residue, history) {
|
|
92
93
|
const retained = this.nodes.map(() => true);
|
|
94
|
+
// Compaction cuts what the model is given, not the conversation: a history read is a view, and keeps every segment
|
|
95
|
+
// before the latest boundary in transcript order, as Claude Code's own transcript view (ctrl+o) does. Every other
|
|
96
|
+
// read starts at the latest boundary.
|
|
93
97
|
const boundary = this.nodes.findLastIndex((node) => node.compact != null);
|
|
94
|
-
if (boundary !== -1) {
|
|
98
|
+
if (boundary !== -1 && !history) {
|
|
95
99
|
const parents = lenient ? this.nodes.map((node) => node.parent) : null;
|
|
96
100
|
try { this.#applyCompaction(boundary, retained); }
|
|
97
101
|
catch (error) {
|
|
@@ -111,6 +115,12 @@ export class ClaudeReplayIndex {
|
|
|
111
115
|
while (!conversation(this.nodes[active])) {
|
|
112
116
|
if (seeking.has(active)) throw claudeReplayError('cycle while resolving active Claude leaf');
|
|
113
117
|
seeking.add(active);
|
|
118
|
+
// A history read whose newest records open a segment with no conversation yet (a compaction's boundary and its
|
|
119
|
+
// attachments, written before the summary that opens it) is read from the newest conversation record before them.
|
|
120
|
+
if (history && this.nodes[active].parent == null) {
|
|
121
|
+
const newest = this.nodes.findLastIndex((node, index) => retained[index] && !node.sidechain && conversation(node));
|
|
122
|
+
if (newest !== -1) { active = newest; break; }
|
|
123
|
+
}
|
|
114
124
|
active = this.#parentIndex(active, retained);
|
|
115
125
|
}
|
|
116
126
|
const children = new Map();
|
|
@@ -120,9 +130,20 @@ export class ClaudeReplayIndex {
|
|
|
120
130
|
children.get(node.parent).push(index);
|
|
121
131
|
});
|
|
122
132
|
const segments = [this.#projectSegment(active, retained, sidechainOnly, lenient, children)];
|
|
123
|
-
if (lenient) {
|
|
133
|
+
if (lenient && !history) {
|
|
124
134
|
for (const leaf of this.#severedLeaves(active, retained)) segments.push(this.#projectSegment(leaf, retained, sidechainOnly, lenient, children));
|
|
125
135
|
if (segments.length > 1) residue.push(`${segments.length} conversation segments were stitched in transcript order because the Claude record graph is severed`);
|
|
136
|
+
} else if (history) {
|
|
137
|
+
// The transcript's opening and each compaction start a segment of their own; any other root is a severed graph.
|
|
138
|
+
const roots = new Map(), opening = this.nodes.findIndex(conversation);
|
|
139
|
+
const openingRoot = opening === -1 ? null : this.#componentRoot(opening, retained, roots);
|
|
140
|
+
let severed = 0;
|
|
141
|
+
for (const leaf of this.#severedLeaves(active, retained)) {
|
|
142
|
+
segments.push(this.#projectSegment(leaf, retained, sidechainOnly, lenient, children));
|
|
143
|
+
const root = this.#componentRoot(leaf, retained, roots);
|
|
144
|
+
if (root !== openingRoot && this.nodes[root]?.compact == null) severed++;
|
|
145
|
+
}
|
|
146
|
+
if (severed > 0) residue.push(`${severed + 1} conversation segments were stitched in transcript order because the Claude record graph is severed`);
|
|
126
147
|
}
|
|
127
148
|
const firstLine = (segment) => segment.reduce((first, index) => Math.min(first, this.nodes[index].lineIndex), Infinity);
|
|
128
149
|
const ordered = [], placed = new Set();
|
|
@@ -149,6 +170,7 @@ export class ClaudeReplayIndex {
|
|
|
149
170
|
else if (this.segmentAnchors.has(node.parent) || sidechainOnly) cursor = null;
|
|
150
171
|
else throw claudeReplayError(`active Claude record \`${node.uuid}\` has missing parentUuid \`${node.parent}\``);
|
|
151
172
|
if (cursor != null && !retained[cursor]) {
|
|
173
|
+
// A compaction boundary is where this segment ends; the records it pruned stay pruned.
|
|
152
174
|
if (lenient) break;
|
|
153
175
|
throw claudeReplayError(`active Claude chain crosses an excluded compaction record from \`${node.uuid}\``);
|
|
154
176
|
}
|