@volter/supercode-interchange 0.1.21 → 0.1.23
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/discovery.mjs +18 -6
- 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 +16 -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/previews.mjs +25 -3
- 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
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// The OpenClaw codec's job projection, after complete home validation.
|
|
2
|
+
import { nativeInteger, parseNativeJson, setNativeInteger, stringifyNativeJsonMember } from './native-json.mjs';
|
|
3
|
+
import { hermesIsoEpoch } from './hermes-fire-links.mjs';
|
|
4
|
+
|
|
5
|
+
const object = value => value != null && typeof value === 'object' && !Array.isArray(value);
|
|
6
|
+
const string = value => typeof value === 'string' ? value : null;
|
|
7
|
+
const text = (row, key) => typeof row?.[key] === 'string' ? row[key] || null : typeof row?.[key] === 'number' ? stringifyNativeJsonMember(row, key) : null;
|
|
8
|
+
const jsonObject = value => { try { const parsed = typeof value === 'string' ? parseNativeJson(value) : null; return object(parsed) ? parsed : {}; } catch { return {}; } };
|
|
9
|
+
const first = (...entries) => entries.find(([row, key]) => row != null && Object.hasOwn(row, key));
|
|
10
|
+
const value = entry => entry?.[0]?.[entry[1]];
|
|
11
|
+
const float = value => typeof value === 'number' ? value : typeof value === 'string' && /^[+-]?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/u.test(value) ? Number(value) : typeof value === 'string' && /^[+-]?(?:inf|infinity|nan)$/iu.test(value) ? /nan/iu.test(value) ? NaN : value.startsWith('-') ? -Infinity : Infinity : null;
|
|
12
|
+
const low = -(1n << 63n), high = (1n << 63n) - 1n;
|
|
13
|
+
const cast = n => Number.isNaN(n) ? 0n : n <= Number(low) ? low : n >= Number(high) ? high : BigInt(Math.trunc(n));
|
|
14
|
+
const ms = (row, key) => nativeInteger(row, key, { signed: true }) ?? (float(row?.[key]) == null ? null : cast(float(row[key])));
|
|
15
|
+
const floor = (a, b) => a < 0n ? (a - b + 1n) / b : a / b;
|
|
16
|
+
function moment(ms) {
|
|
17
|
+
if (ms == null) return null;
|
|
18
|
+
const seconds = floor(ms, 1000n), days = floor(seconds, 86400n), sod = seconds - days * 86400n;
|
|
19
|
+
const z = days + 719468n, era = floor(z, 146097n), doe = z - era * 146097n;
|
|
20
|
+
const yoe = (doe - doe / 1460n + doe / 36524n - doe / 146096n) / 365n;
|
|
21
|
+
let y = yoe + era * 400n;
|
|
22
|
+
const doy = doe - (365n * yoe + yoe / 4n - yoe / 100n), mp = (5n * doy + 2n) / 153n;
|
|
23
|
+
const d = doy - (153n * mp + 2n) / 5n + 1n, m = mp < 10n ? mp + 3n : mp - 9n;
|
|
24
|
+
y += m <= 2n ? 1n : 0n;
|
|
25
|
+
const pad = (n, width = 2) => n < 0n ? `-${String(-n).padStart(width - 1, '0')}` : String(n).padStart(width, '0');
|
|
26
|
+
return `${pad(y, 4)}-${pad(m)}-${pad(d)}T${pad(sod / 3600n)}:${pad(sod % 3600n / 60n)}:${pad(sod % 60n)}Z`;
|
|
27
|
+
}
|
|
28
|
+
function origin(key) {
|
|
29
|
+
if (typeof key !== 'string') return null;
|
|
30
|
+
const parts = key.split(':');
|
|
31
|
+
if (parts[0] === 'agent' && parts.length >= 3) {
|
|
32
|
+
if (parts[2] === 'main') return { platform: 'main', chat_id: 'main', thread_id: null };
|
|
33
|
+
if (parts.length < 5) return null;
|
|
34
|
+
return { platform: parts[2], chat_id: parts[4], thread_id: ['thread', 'topic'].includes(parts[5]) && parts[6] ? parts[6] : null };
|
|
35
|
+
}
|
|
36
|
+
if (parts.length < 2) return null;
|
|
37
|
+
if (parts[0] === 'cron') return { platform: 'cron', chat_id: parts.slice(1).join(':'), thread_id: null };
|
|
38
|
+
if (parts[0] === 'hook') return { platform: 'webhook', chat_id: parts[1], thread_id: null };
|
|
39
|
+
if (parts[0] === 'acp-bridge') return { platform: 'acp', chat_id: parts.slice(1).join(':'), thread_id: null };
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
function target(delivery, row) {
|
|
43
|
+
const d = key => delivery?.[key] == null ? undefined : [delivery, key], r = key => row[key] == null ? undefined : [row, key];
|
|
44
|
+
const mode = string(value(d('mode') ?? d('kind') ?? d('type') ?? r('delivery_mode')));
|
|
45
|
+
const channel = string(value(d('channel') ?? r('delivery_channel')));
|
|
46
|
+
if (mode === 'none') return { kind: 'local' };
|
|
47
|
+
if (['last', 'origin'].includes(channel)) return { kind: 'origin' };
|
|
48
|
+
if (channel == null) return { kind: 'local' };
|
|
49
|
+
const to = d('to') ?? r('delivery_to'), thread = d('threadId') ?? d('thread_id') ?? r('delivery_thread_id');
|
|
50
|
+
return { kind: 'explicit', platform: channel, chat_id: to ? text(...to) : null, thread_id: thread ? text(...thread) : null };
|
|
51
|
+
}
|
|
52
|
+
function decode(row) {
|
|
53
|
+
const record = jsonObject(row.job_json), state = jsonObject(row.state_json), rawSchedule = object(record.schedule) ? record.schedule : {};
|
|
54
|
+
const schedule = rawSchedule.kind === 'every' && typeof rawSchedule.everyMs === 'number' ? { kind: 'interval', minutes: rawSchedule.everyMs / 60000 }
|
|
55
|
+
: rawSchedule.kind === 'cron' && typeof rawSchedule.expr === 'string' ? { kind: 'cron', expr: rawSchedule.expr }
|
|
56
|
+
: rawSchedule.kind === 'at' && typeof rawSchedule.at === 'string' ? { kind: 'once', run_at: rawSchedule.at } : { kind: 'cron', expr: '' };
|
|
57
|
+
const payload = object(record.payload) ? record.payload : {};
|
|
58
|
+
const delivery = object(record.delivery) ? record.delivery : Object.fromEntries([['delivery_mode', 'mode'], ['delivery_channel', 'channel'], ['delivery_to', 'to'], ['delivery_thread_id', 'threadId'], ['delivery_account_id', 'accountId']].flatMap(([column, key]) => row[column] != null && row[column] !== '' ? [[key, row[column]]] : []));
|
|
59
|
+
const omitted = new Set(['id', 'name', 'enabled', 'schedule', 'payload', 'delivery', 'sessionTarget', 'createdAtMs', 'state']);
|
|
60
|
+
const raw = Object.fromEntries(Object.keys(record).filter(key => !omitted.has(key)).map(key => [key, record[key]]));
|
|
61
|
+
if (Object.keys(payload).length) raw.__payload = payload;
|
|
62
|
+
if (object(record.delivery) || Object.keys(delivery).length) raw.__delivery = delivery;
|
|
63
|
+
const enabled = row.enabled == null ? true : typeof row.enabled === 'boolean' ? row.enabled : typeof row.enabled === 'number' ? row.enabled !== 0 : row.enabled !== '';
|
|
64
|
+
return { id: text(row, 'job_id') ?? '', raw, schedule, prompt: ['message', 'text', 'command', 'script'].map(key => string(payload[key])).find(v => v != null) ?? null,
|
|
65
|
+
deliver: target(delivery, row), origin: origin(row.owner_session_key), enabled,
|
|
66
|
+
session_target: string(record.sessionTarget) ?? string(row.session_target), next_run_at: moment(ms(row, 'next_run_at_ms') ?? ms(state, 'nextRunAtMs')),
|
|
67
|
+
last_run_at: moment(ms(row, 'last_run_at_ms') ?? ms(state, 'lastRunAtMs')), last_status: string(row.last_run_status), created_at: moment(ms(row, 'created_at_ms') ?? ms(record, 'createdAtMs')) };
|
|
68
|
+
}
|
|
69
|
+
function legacy(record) {
|
|
70
|
+
const modern = { ...record }, row = { job_id: ['id', 'job_id', 'jobId'].map(key => string(record[key])).find(v => v != null) ?? '' };
|
|
71
|
+
let schedule = object(modern.schedule) && Object.hasOwn(modern.schedule, 'kind') ? modern.schedule : typeof modern.schedule === 'string' ? { kind: 'cron', expr: modern.schedule } : null;
|
|
72
|
+
schedule ??= text(modern, 'cron') == null ? null : { kind: 'cron', expr: text(modern, 'cron') };
|
|
73
|
+
if (schedule == null && typeof modern.everyMinutes === 'number') { schedule = { kind: 'every' }; setNativeInteger(schedule, 'everyMs', cast(modern.everyMinutes * 60000)); }
|
|
74
|
+
if (schedule == null && typeof modern.everyMs === 'number') { schedule = { kind: 'every' }; setNativeInteger(schedule, 'everyMs', cast(modern.everyMs)); }
|
|
75
|
+
const at = first([modern, 'runAt'], [modern, 'run_at']);
|
|
76
|
+
if (schedule == null && at && text(...at) != null) schedule = { kind: 'at', at: text(...at) };
|
|
77
|
+
for (const key of ['cron', 'everyMinutes', 'everyMs', 'runAt', 'run_at']) delete modern[key];
|
|
78
|
+
if (schedule) modern.schedule = schedule;
|
|
79
|
+
if (typeof modern.delivery === 'string') modern.delivery = { mode: modern.delivery };
|
|
80
|
+
else if (object(modern.delivery)) {
|
|
81
|
+
modern.delivery = { ...modern.delivery };
|
|
82
|
+
if (!Object.hasOwn(modern.delivery, 'mode')) {
|
|
83
|
+
const field = first([modern.delivery, 'kind'], [modern.delivery, 'type']);
|
|
84
|
+
if (field) { modern.delivery.mode = value(field); delete modern.delivery[field[1]]; }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
for (const key of ['name', 'enabled']) if (Object.hasOwn(modern, key)) row[key] = modern[key];
|
|
88
|
+
const oldMs = (record, key) => typeof record[key] === 'number' ? nativeInteger(record, key, { signed: true }) : typeof record[key] === 'string' ? (() => { const n = hermesIsoEpoch(record[key]); return n == null ? null : cast(n * 1000); })() : null;
|
|
89
|
+
for (const [old, column] of [['nextRunAt', 'next_run_at_ms'], ['next_run_at', 'next_run_at_ms'], ['lastRunAt', 'last_run_at_ms'], ['last_run_at', 'last_run_at_ms']]) if (Object.hasOwn(modern, old)) {
|
|
90
|
+
const at = oldMs(record, old); delete modern[old]; if (at != null) setNativeInteger(row, column, at);
|
|
91
|
+
}
|
|
92
|
+
const status = first([modern, 'lastStatus'], [modern, 'last_status']);
|
|
93
|
+
if (status) { row.last_run_status = value(status); delete modern[status[1]]; }
|
|
94
|
+
const created = first([modern, 'createdAt'], [modern, 'created_at']);
|
|
95
|
+
if (created) { const at = oldMs(record, created[1]); delete modern[created[1]]; if (at != null) setNativeInteger(modern, 'createdAtMs', at); }
|
|
96
|
+
// Re-emit original unmapped member tokens; spreading a native JSON object
|
|
97
|
+
// alone would turn integral REAL and large integer residue into new values.
|
|
98
|
+
const members = Object.keys(modern).map(key => `${JSON.stringify(key)}:${Object.hasOwn(record, key) && modern[key] === record[key] ? stringifyNativeJsonMember(record, key) : stringifyNativeJsonMember(modern, key)}`);
|
|
99
|
+
row.job_json = `{${members.join(',')}}`;
|
|
100
|
+
return decode(row);
|
|
101
|
+
}
|
|
102
|
+
export function openclawJobs(loaded) {
|
|
103
|
+
const profiles = new Map(loaded.profiles.map(name => [name, new Map()]));
|
|
104
|
+
const owner = agent => { const name = agent === loaded.defaultAgent ? 'default' : agent; return profiles.has(name) ? name : 'default'; };
|
|
105
|
+
for (const row of loaded.jobs) {
|
|
106
|
+
const record = jsonObject(row.job_json), field = first([record, 'agentId'], [row, 'agent_id'], [row, 'owner_agent_id']), name = owner(string(value(field)) ?? loaded.defaultAgent);
|
|
107
|
+
const job = decode(row); profiles.get(name).set(job.id, job);
|
|
108
|
+
}
|
|
109
|
+
let records; try { const v = parseNativeJson(loaded.legacy ?? 'null'); records = Array.isArray(v) ? v : Array.isArray(v?.jobs) ? v.jobs : []; } catch { records = []; }
|
|
110
|
+
for (const record of records) {
|
|
111
|
+
const id = ['id', 'job_id', 'jobId'].map(key => string(record?.[key])).find(v => v != null);
|
|
112
|
+
if (!id || [...profiles.values()].some(jobs => jobs.has(id))) continue;
|
|
113
|
+
const field = first([record, 'agentId'], [record, 'agent_id']), name = owner(string(value(field)) ?? loaded.defaultAgent);
|
|
114
|
+
profiles.get(name).set(id, legacy(record));
|
|
115
|
+
}
|
|
116
|
+
return profiles;
|
|
117
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
// The validity dependencies of from_openclaw, projected to profile metadata.
|
|
2
|
+
// Row decoders there are infallible; every fallible source read is still made.
|
|
3
|
+
// No home, transcript, queue or configuration is written or exported.
|
|
4
|
+
import { readFileSync, readdirSync, lstatSync, statSync } from 'node:fs';
|
|
5
|
+
import { childPath } from './session-spend-files.mjs';
|
|
6
|
+
import { profilePathJoin } from './profile-paths.mjs';
|
|
7
|
+
import { parseNativeJson } from './native-json.mjs';
|
|
8
|
+
import { openclawTriggerRecords } from './trigger-records.mjs';
|
|
9
|
+
import { openclawChannelRecords } from './channel-records.mjs';
|
|
10
|
+
import { nativeTrim } from './text.mjs';
|
|
11
|
+
import { hermesTableExists, readHermesRows } from './hermes-read-store.mjs';
|
|
12
|
+
|
|
13
|
+
const object = value => value != null && typeof value === 'object' && !Array.isArray(value);
|
|
14
|
+
const string = value => typeof value === 'string' ? value : null;
|
|
15
|
+
const utf8 = new TextDecoder('utf-8', { fatal: true, ignoreBOM: true });
|
|
16
|
+
const directory = path => { try { return statSync(path).isDirectory(); } catch { return false; } };
|
|
17
|
+
const file = path => { try { return statSync(path).isFile(); } catch { return false; } };
|
|
18
|
+
const whitespace = char => char != null && /^[\u0009-\u000d\u0020\u0085\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$/u.test(char);
|
|
19
|
+
|
|
20
|
+
// Match the native codec's small JSON5 scanner, including its accepted
|
|
21
|
+
// single-quoted strings and ASCII keys; this is not a broader JSON5 parser.
|
|
22
|
+
function stripJson5(text) {
|
|
23
|
+
const chars = [...text]; let out = '', quoted = false, escaped = false;
|
|
24
|
+
for (let at = 0; at < chars.length; at++) {
|
|
25
|
+
const ch = chars[at];
|
|
26
|
+
if (!quoted && ch === "'") {
|
|
27
|
+
out += '"'; let escape = false;
|
|
28
|
+
while (++at < chars.length) {
|
|
29
|
+
const next = chars[at];
|
|
30
|
+
if (escape) { if (next !== "'") out += '\\'; out += next; escape = false; }
|
|
31
|
+
else if (next === '\\') escape = true;
|
|
32
|
+
else if (next === "'") break;
|
|
33
|
+
else out += next === '"' ? '\\"' : next;
|
|
34
|
+
}
|
|
35
|
+
out += '"'; continue;
|
|
36
|
+
}
|
|
37
|
+
if (!quoted && /^[A-Za-z_$]$/u.test(ch)) {
|
|
38
|
+
let identifier = ch, gap = '';
|
|
39
|
+
while (at + 1 < chars.length && /^[A-Za-z0-9_$]$/u.test(chars[at + 1])) identifier += chars[++at];
|
|
40
|
+
while (whitespace(chars[at + 1])) gap += chars[++at];
|
|
41
|
+
out += ['{', ','].includes(nativeTrim(out).at(-1)) && chars[at + 1] === ':' ? JSON.stringify(identifier) : identifier;
|
|
42
|
+
out += gap; continue;
|
|
43
|
+
}
|
|
44
|
+
if (quoted) {
|
|
45
|
+
out += ch;
|
|
46
|
+
if (escaped) escaped = false; else if (ch === '\\') escaped = true; else if (ch === '"') quoted = false;
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (ch === '"') { quoted = true; out += ch; }
|
|
50
|
+
else if (ch === '/' && chars[at + 1] === '/') { while (++at < chars.length) if (chars[at] === '\n') { out += '\n'; break; } }
|
|
51
|
+
else if (ch === '/' && chars[at + 1] === '*') {
|
|
52
|
+
at++; let previous = '\0';
|
|
53
|
+
while (++at < chars.length) { if (previous === '*' && chars[at] === '/') break; previous = chars[at]; }
|
|
54
|
+
out += ' ';
|
|
55
|
+
} else out += ch;
|
|
56
|
+
}
|
|
57
|
+
const scanned = [...out]; let cleaned = ''; quoted = false; escaped = false;
|
|
58
|
+
for (let at = 0; at < scanned.length; at++) {
|
|
59
|
+
const ch = scanned[at];
|
|
60
|
+
if (quoted) {
|
|
61
|
+
cleaned += ch;
|
|
62
|
+
if (escaped) escaped = false; else if (ch === '\\') escaped = true; else if (ch === '"') quoted = false;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (ch === '"') quoted = true;
|
|
66
|
+
if (ch === ',') { let next = at + 1; while (whitespace(scanned[next])) next++; if (['}', ']'].includes(scanned[next])) continue; }
|
|
67
|
+
cleaned += ch;
|
|
68
|
+
}
|
|
69
|
+
return cleaned;
|
|
70
|
+
}
|
|
71
|
+
function agentEntries(config) {
|
|
72
|
+
if (Array.isArray(config.agents?.list)) return config.agents.list.flatMap(entry => {
|
|
73
|
+
const id = string(Object.hasOwn(entry ?? {}, 'id') ? entry.id : entry?.agentId);
|
|
74
|
+
return id ? [[id, entry]] : [];
|
|
75
|
+
});
|
|
76
|
+
if (object(config.agents?.entries)) return Object.keys(config.agents.entries).sort((a, b) => Buffer.compare(Buffer.from(a), Buffer.from(b))).map(id => [id, config.agents.entries[id]]);
|
|
77
|
+
return [];
|
|
78
|
+
}
|
|
79
|
+
const model = value => string(value) ?? string(value?.primary);
|
|
80
|
+
function inventory(root) {
|
|
81
|
+
const walk = dir => {
|
|
82
|
+
const entries = readdirSync(dir, { encoding: 'buffer' }); entries.sort(Buffer.compare);
|
|
83
|
+
for (const entry of entries) {
|
|
84
|
+
if (['node_modules', '.git'].includes(entry.toString('utf8'))) continue;
|
|
85
|
+
const path = childPath(dir, entry); let info; try { info = lstatSync(path); } catch { continue; }
|
|
86
|
+
if (info.isDirectory()) walk(path);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
walk(root);
|
|
90
|
+
}
|
|
91
|
+
function readOpenclawHome(root) {
|
|
92
|
+
if (!directory(root)) throw new Error('not a directory');
|
|
93
|
+
const configPath = childPath(root, 'openclaw.json'), present = file(configPath);
|
|
94
|
+
const config = present ? parseNativeJson(stripJson5(utf8.decode(readFileSync(configPath)))) : Object.create(null);
|
|
95
|
+
if (!object(config)) throw new Error('expected a JSON5 object');
|
|
96
|
+
let declared = agentEntries(config);
|
|
97
|
+
const defaultAgent = declared.find(([, entry]) => entry?.default === true)?.[0] ?? declared[0]?.[0] ?? 'main';
|
|
98
|
+
if (!declared.length) declared = [[defaultAgent, {}]];
|
|
99
|
+
const profiles = new Map();
|
|
100
|
+
for (const [id, entry] of declared) {
|
|
101
|
+
const name = id === defaultAgent ? 'default' : id, dir = profilePathJoin(childPath(root, 'agents'), id);
|
|
102
|
+
// These reads are tolerant of unread/malformed transcript or persona text,
|
|
103
|
+
// but read_dir on a selected sessions directory is a codec refusal.
|
|
104
|
+
try { utf8.decode(readFileSync(childPath(dir, 'AGENTS.md'))); } catch { /* no persona */ }
|
|
105
|
+
const sessions = childPath(dir, 'sessions');
|
|
106
|
+
if (directory(sessions)) for (const leaf of readdirSync(sessions, { encoding: 'buffer' }).sort(Buffer.compare)) {
|
|
107
|
+
const name = leaf.toString('utf8'); if (!name.endsWith('.jsonl') || name.endsWith('.trajectory.jsonl')) continue;
|
|
108
|
+
try { utf8.decode(readFileSync(childPath(sessions, leaf))); } catch { /* an unread transcript adds no binding */ }
|
|
109
|
+
}
|
|
110
|
+
profiles.set(name, { id, model: model(entry?.model) ?? model(config.agents?.defaults?.model) });
|
|
111
|
+
}
|
|
112
|
+
const store = childPath(root, 'state/openclaw.sqlite');
|
|
113
|
+
const rows = new Map();
|
|
114
|
+
for (const [table, order] of [
|
|
115
|
+
['cron_jobs', 'sort_order, created_at_ms, job_id'], ['cron_run_logs', 'ts, seq'],
|
|
116
|
+
['delivery_queue_entries', 'enqueued_at, id'], ['current_conversation_bindings', 'bound_at, binding_key'], ['schema_meta', 'meta_key'],
|
|
117
|
+
]) if (hermesTableExists(store, table)) rows.set(table, readHermesRows(store, `select * from ${table} order by ${order}`) ?? []);
|
|
118
|
+
// Legacy jobs' decoder never refuses malformed JSON or malformed rows.
|
|
119
|
+
let legacy = null;
|
|
120
|
+
try { legacy = utf8.decode(readFileSync(childPath(root, 'cron/jobs.json'))); } catch { /* no legacy rows */ }
|
|
121
|
+
inventory(root);
|
|
122
|
+
const byAgent = new Map([...profiles.entries()].sort(([a], [b]) => Buffer.compare(Buffer.from(a), Buffer.from(b))).map(([, profile]) => [profile.id, profile]));
|
|
123
|
+
const routes = new Map();
|
|
124
|
+
if (Array.isArray(config.bindings)) for (const binding of config.bindings) if (object(binding) && typeof binding.agentId === 'string') routes.set(binding.agentId, (routes.get(binding.agentId) ?? 0n) + 1n);
|
|
125
|
+
return { defaultAgent, byAgent, profiles, rows, legacy, routes: present ? routes : null,
|
|
126
|
+
bindings: Array.isArray(config.bindings) ? config.bindings : [], triggerRecords: openclawTriggerRecords(config, profiles, defaultAgent), channelRecords: openclawChannelRecords(config) };
|
|
127
|
+
}
|
|
128
|
+
export function readOpenclawProfileHome(root) {
|
|
129
|
+
const { defaultAgent, byAgent, routes } = readOpenclawHome(root);
|
|
130
|
+
return { defaultAgent, byAgent, routes };
|
|
131
|
+
}
|
|
132
|
+
export function readOpenclawRunHome(root) {
|
|
133
|
+
const { defaultAgent, profiles, rows, legacy } = readOpenclawHome(root);
|
|
134
|
+
return { defaultAgent, profiles: [...profiles.keys()], jobs: rows.get('cron_jobs') ?? [],
|
|
135
|
+
fires: rows.get('cron_run_logs') ?? [], legacy };
|
|
136
|
+
}
|
|
137
|
+
export function readOpenclawTriggerHome(root) { return readOpenclawHome(root).triggerRecords; }
|
|
138
|
+
export function readOpenclawChannelHome(root) { return readOpenclawHome(root).channelRecords; }
|
|
139
|
+
export function readOpenclawRouteHome(root) {
|
|
140
|
+
const { defaultAgent, profiles, bindings } = readOpenclawHome(root);
|
|
141
|
+
return { defaultAgent, profiles, bindings };
|
|
142
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// Serde record admission used by the read-only folder projection. This does
|
|
2
|
+
// not run a workflow, validate relationships, or write an agent layer.
|
|
3
|
+
import { nativeInteger, nativeDuplicateObjectKeys, parseNativeJson, stringifyNativeJsonMember } from './native-json.mjs';
|
|
4
|
+
|
|
5
|
+
const fail = () => { throw new Error('invalid orchestrator record'); };
|
|
6
|
+
const object = value => value != null && typeof value === 'object' && !Array.isArray(value);
|
|
7
|
+
const string = value => { if (typeof value !== 'string') fail(); };
|
|
8
|
+
const optional = validator => (value, parent, key) => { if (value != null) validator(value, parent, key); };
|
|
9
|
+
const any = () => {};
|
|
10
|
+
const unsigned = (value, parent, key) => { if (nativeInteger(parent, key) == null) fail(); };
|
|
11
|
+
const number = value => { if (typeof value !== 'number') fail(); };
|
|
12
|
+
const enumeration = words => value => {
|
|
13
|
+
if (words.includes(value)) return;
|
|
14
|
+
if (!object(value) || Object.keys(value).length !== 1 || !words.includes(Object.keys(value)[0]) || value[Object.keys(value)[0]] !== null) fail();
|
|
15
|
+
};
|
|
16
|
+
const list = validator => value => { if (!Array.isArray(value)) fail(); value.forEach((item, at) => validator(item, value, String(at))); };
|
|
17
|
+
const map = validator => value => { if (!object(value)) fail(); for (const key of Object.keys(value)) validator(value[key], value, key); };
|
|
18
|
+
let directRead = false;
|
|
19
|
+
function record(fields, required = [], strict = false, direct = false) {
|
|
20
|
+
return value => {
|
|
21
|
+
if (Array.isArray(value)) {
|
|
22
|
+
if (value.length > fields.length) fail();
|
|
23
|
+
value = parseNativeJson(`{${value.map((_, at) => `${JSON.stringify(fields[at][0])}:${stringifyNativeJsonMember(value, String(at))}`).join(',')}}`);
|
|
24
|
+
}
|
|
25
|
+
if (!object(value)) fail();
|
|
26
|
+
const known = new Set(fields.map(([key]) => key));
|
|
27
|
+
if (strict && Object.keys(value).some(key => !known.has(key))) fail();
|
|
28
|
+
if ((direct || directRead) && nativeDuplicateObjectKeys(value).some(key => known.has(key))) fail();
|
|
29
|
+
for (const key of required) if (!Object.hasOwn(value, key)) fail();
|
|
30
|
+
for (const [key, validator] of fields) if (Object.hasOwn(value, key)) validator(value[key], value, key);
|
|
31
|
+
return value;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function tagged(variants) {
|
|
35
|
+
return value => {
|
|
36
|
+
if (!object(value) || !Object.hasOwn(variants, value.kind) || directRead && nativeDuplicateObjectKeys(value).includes('kind')) fail();
|
|
37
|
+
variants[value.kind](value);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const strings = names => names.map(name => [name, string]);
|
|
41
|
+
const optionStrings = names => names.map(name => [name, optional(string)]);
|
|
42
|
+
const surface = record(optionStrings(['key', 'platform', 'kind', 'chat_id', 'thread_id', 'participant_id']));
|
|
43
|
+
function surfaceRecord(value) {
|
|
44
|
+
const out = surface(value);
|
|
45
|
+
if (Object.hasOwn(out, 'kind') && Object.hasOwn(out, 'chat_type')) fail();
|
|
46
|
+
if (Object.hasOwn(out, 'chat_type')) optional(string)(out.chat_type);
|
|
47
|
+
if (directRead && nativeDuplicateObjectKeys(out).includes('chat_type')) fail();
|
|
48
|
+
return out;
|
|
49
|
+
}
|
|
50
|
+
const cost = record([['amount', number], ['currency', string], ['source', optional(string)]], ['amount', 'currency']);
|
|
51
|
+
const usage = record([
|
|
52
|
+
...strings(['at', 'model']), ['input_tokens', unsigned], ['output_tokens', unsigned],
|
|
53
|
+
['cache_read_tokens', optional(unsigned)], ['cache_write_tokens', optional(unsigned)], ['cost', optional(cost)],
|
|
54
|
+
], ['at', 'model', 'input_tokens', 'output_tokens']);
|
|
55
|
+
const participant = record([
|
|
56
|
+
['principal', string], ['role', enumeration(['to', 'cc'])], ['since', string], ['until', optional(string)],
|
|
57
|
+
], ['principal', 'role', 'since']);
|
|
58
|
+
const speaker = tagged({
|
|
59
|
+
addressed: record([['default', optional(string)]]), all: record([]),
|
|
60
|
+
round_robin: record([['order', list(string)]], ['order']),
|
|
61
|
+
selector: record([['selector', string]], ['selector']), floor: record([]),
|
|
62
|
+
});
|
|
63
|
+
const history = tagged({ platform: record([]), mailbox: record([['thread', string]], ['thread']), transcript: record([['session', string]], ['session']) });
|
|
64
|
+
const agent = record([...strings(['name', 'profile']), ...optionStrings(['label', 'parent', 'sponsor']), ['residue', map(any)]], ['name', 'profile'], false, true);
|
|
65
|
+
const conversation = record([
|
|
66
|
+
['id', string], ['kind', enumeration(['thread', 'private'])], ['surface', optional(surfaceRecord)],
|
|
67
|
+
['participants', list(participant)], ['speaker', speaker], ['history', history], ...optionStrings(['holder', 'last_speaker']),
|
|
68
|
+
], ['id', 'kind'], false, true);
|
|
69
|
+
const transfer = record([
|
|
70
|
+
...strings(['conversation', 'from', 'to', 'by', 'reason']), ['history', enumeration(['full', 'filtered', 'none'])],
|
|
71
|
+
['filter', any], ['state', enumeration(['pending', 'done', 'refused'])], ['at', string], ['error', optional(string)],
|
|
72
|
+
], ['conversation', 'from', 'to', 'by', 'reason', 'history', 'state', 'at'], false, true);
|
|
73
|
+
const handoff = record([
|
|
74
|
+
...strings(['session', 'to', 'by']), ['state', enumeration(['pending', 'done', 'failed'])], ['error', optional(string)], ['at', string],
|
|
75
|
+
], ['session', 'to', 'by', 'state', 'at'], false, true);
|
|
76
|
+
const agentLayer = record([
|
|
77
|
+
['agents', map(agent)], ['conversations', map(conversation)], ['transfers', list(transfer)], ['handoffs', list(handoff)],
|
|
78
|
+
['usage', map(record([['agent', optional(string)], ['usage', list(usage)]], [], false, true))],
|
|
79
|
+
], [], true, true);
|
|
80
|
+
|
|
81
|
+
export function validateOrchestratorAgentLayer(text) {
|
|
82
|
+
directRead = true;
|
|
83
|
+
try { agentLayer(parseNativeJson(text)); } finally { directRead = false; }
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const binding = record([
|
|
87
|
+
['key', surfaceRecord], ['profile', optional(string)], ['conversation', optional(string)], ['agent', optional(string)],
|
|
88
|
+
['worker', record([['harness', string], ...optionStrings(['session_id', 'locator'])], ['harness'])],
|
|
89
|
+
['trigger', enumeration(['human', 'channel', 'cron', 'heartbeat', 'webhook', 'parent', 'api', 'task', 'unknown'])],
|
|
90
|
+
['recurrence', optional(record([['job_id', string], ['kind', string]], ['job_id']))],
|
|
91
|
+
['handoff', optional(record([['to', optional(string)], ['state', string], ['error', optional(string)]], ['state']))],
|
|
92
|
+
...optionStrings(['started_at', 'last_activity_at', 'ended_at']),
|
|
93
|
+
['end_reason', optional(enumeration(['idle', 'daily', 'reset', 'new', 'handoff', 'transfer', 'left', 'error']))], ['residue', map(any)],
|
|
94
|
+
], ['key', 'worker']);
|
|
95
|
+
export function orchestratorRoutingSlot(row) {
|
|
96
|
+
try {
|
|
97
|
+
if (typeof row.entry_json !== 'string') return null;
|
|
98
|
+
const entry = parseNativeJson(row.entry_json);
|
|
99
|
+
const sc = entry?.metadata?.supercode;
|
|
100
|
+
let key;
|
|
101
|
+
if (sc !== undefined) {
|
|
102
|
+
const value = binding(sc?.binding); key = surfaceRecord(value.key);
|
|
103
|
+
if (typeof sc.slot === 'string') return sc.slot;
|
|
104
|
+
} else {
|
|
105
|
+
if (typeof entry?.session_key !== 'string') return null;
|
|
106
|
+
const parts = entry.session_key.split(':');
|
|
107
|
+
if (parts.length < 4 || parts[0] !== 'agent') return null;
|
|
108
|
+
key = { platform: parts[2], kind: parts[3], chat_id: parts[4], thread_id: parts[5], participant_id: parts[6] };
|
|
109
|
+
}
|
|
110
|
+
return [key.platform, key.kind ?? key.chat_type, key.chat_id, key.thread_id, key.participant_id].map(value => value ?? '').join('|');
|
|
111
|
+
} catch { return null; }
|
|
112
|
+
}
|
package/orchestrator-store.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { realpathSync } from 'node:fs';
|
|
2
|
-
import { dirname, join } from 'node:path';
|
|
2
|
+
import { dirname, join, toNamespacedPath } from 'node:path';
|
|
3
3
|
import { readStore, statement, text, integer, unsigned, jsonColumn } from './sqlite-reader.mjs';
|
|
4
4
|
import { finalizeNouns } from './metadata.mjs';
|
|
5
5
|
|
|
@@ -10,15 +10,18 @@ const object = (value) => value != null && typeof value === 'object' && !Array.i
|
|
|
10
10
|
const nonempty = (value) => typeof value === 'string' && value !== '' ? value : null;
|
|
11
11
|
const columns = "json_extract(g.entry_json, '$.metadata.supercode.binding') AS binding, CAST(strftime('%s', json_extract(g.entry_json, '$.metadata.supercode.binding.last_activity_at')) AS INTEGER) AS epoch";
|
|
12
12
|
|
|
13
|
-
function routingScope(path) {
|
|
13
|
+
function routingScope(path, surfaceOnly) {
|
|
14
14
|
const sessions = join(dirname(path), 'sessions');
|
|
15
|
-
try {
|
|
15
|
+
try {
|
|
16
|
+
const resolved = realpathSync.native(sessions);
|
|
17
|
+
return surfaceOnly && process.platform === 'win32' ? toNamespacedPath(resolved) : resolved;
|
|
18
|
+
} catch { return sessions; }
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
/** Binding's required records and native enum fields are validated before
|
|
19
22
|
* projection. A malformed routing binding is omitted, as by the native codec;
|
|
20
23
|
* its routing key/change position still belongs to the source snapshot. */
|
|
21
|
-
function bindingDescriptor(path, profile, raw, epoch) {
|
|
24
|
+
function bindingDescriptor(path, profile, raw, epoch, surfaceOnly) {
|
|
22
25
|
const binding = jsonColumn(raw);
|
|
23
26
|
if (!object(binding) || !object(binding.key) || !object(binding.worker) || typeof binding.worker.harness !== 'string') return null;
|
|
24
27
|
if (['key', 'platform', 'kind', 'chat_type', 'chat_id', 'thread_id', 'participant_id'].some((field) => !optionalText(binding.key[field]))) return null;
|
|
@@ -45,7 +48,11 @@ function bindingDescriptor(path, profile, raw, epoch) {
|
|
|
45
48
|
let title = `${binding.worker.harness} ${id ?? '(no worker session yet)'}`;
|
|
46
49
|
if (binding.end_reason != null && binding.ended_at != null) title += ` (ended: ${binding.end_reason})`;
|
|
47
50
|
const state = binding.handoff?.state, destination = binding.handoff?.to, error = binding.handoff?.error;
|
|
48
|
-
|
|
51
|
+
// A channel count needs the native binding validity and surface, but does
|
|
52
|
+
// not publish an epoch. Keep integer validation without rounding or using
|
|
53
|
+
// the metadata index's narrower Number range in that projection.
|
|
54
|
+
const seconds = epoch == null ? null : integer(epoch);
|
|
55
|
+
const at = surfaceOnly || seconds == null ? null : unsigned(seconds < 0n ? 0n : seconds);
|
|
49
56
|
if (at != null && !Number.isSafeInteger(at * 1000)) throw new Error(`${path} has an activity epoch outside the exact Node wire range`);
|
|
50
57
|
return finalizeNouns({ locator: { harness: 'orchestrator', session_id: id ?? '', storage: { kind: 'file', path: locator ?? path } },
|
|
51
58
|
cwd: null, title, updated_at_ms: at == null ? null : at * 1000, model: null, message_count: null,
|
|
@@ -55,11 +62,11 @@ function bindingDescriptor(path, profile, raw, epoch) {
|
|
|
55
62
|
|
|
56
63
|
/** Routing keys are the source-row keys; several bindings may address the
|
|
57
64
|
* same worker id. Do not discard them by deduplicating native session ids. */
|
|
58
|
-
export async function readOrchestratorStore(path, profile, { after, metrics = {} } = {}) {
|
|
65
|
+
export async function readOrchestratorStore(path, profile, { after, metrics = {}, surfaceOnly = false } = {}) {
|
|
59
66
|
return readStore(path, (db) => {
|
|
60
67
|
const hasChanges = db.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='supercode_routing_changes'").get() != null;
|
|
61
68
|
const sequence = hasChanges ? integer(statement(db, 'SELECT COALESCE(MAX(seq),0) AS seq FROM supercode_routing_changes').get().seq) : 0n;
|
|
62
|
-
const scope = routingScope(path);
|
|
69
|
+
const scope = routingScope(path, surfaceOnly);
|
|
63
70
|
let values, incremental = after != null && hasChanges;
|
|
64
71
|
if (incremental) {
|
|
65
72
|
const cursor = BigInt(after);
|
|
@@ -71,8 +78,13 @@ export async function readOrchestratorStore(path, profile, { after, metrics = {}
|
|
|
71
78
|
values = statement(db, `SELECT g.session_key, 0 AS deleted, ${columns} FROM gateway_routing g
|
|
72
79
|
WHERE g.scope=? AND json_extract(g.entry_json, '$.metadata.supercode') IS NOT NULL`).all(scope);
|
|
73
80
|
}
|
|
74
|
-
const rows = values.map((value) =>
|
|
75
|
-
|
|
81
|
+
const rows = values.map((value) => {
|
|
82
|
+
// The native full catalog query validates both columns before decoding
|
|
83
|
+
// the binding. A bad SQL type refuses the store, even on an invalid row.
|
|
84
|
+
if (surfaceOnly) { text(value.binding, true); integer(value.epoch, true); }
|
|
85
|
+
return { key: text(value.session_key),
|
|
86
|
+
descriptor: integer(value.deleted) !== 0n ? null : bindingDescriptor(path, profile, value.binding, value.epoch, surfaceOnly) };
|
|
87
|
+
});
|
|
76
88
|
metrics.store_sessions_read = (metrics.store_sessions_read ?? 0) + values.length;
|
|
77
89
|
return { rows, cursor: String(sequence), incremental, has_changes: hasChanges };
|
|
78
90
|
}, metrics);
|
package/package.json
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-interchange",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Harness metadata, lossless transcript codecs and session projections for Supercode",
|
|
6
6
|
"license": "MIT OR Apache-2.0",
|
|
7
7
|
"exports": {
|
|
8
|
+
"./session-convert": {
|
|
9
|
+
"types": "./session-convert.d.ts",
|
|
10
|
+
"import": "./session-convert.mjs"
|
|
11
|
+
},
|
|
12
|
+
"./session-write": {
|
|
13
|
+
"types": "./session-write.d.ts",
|
|
14
|
+
"import": "./session-write.mjs"
|
|
15
|
+
},
|
|
16
|
+
"./corpus-audit": {
|
|
17
|
+
"types": "./corpus-audit.d.ts",
|
|
18
|
+
"import": "./corpus-audit.mjs"
|
|
19
|
+
},
|
|
20
|
+
"./parity-report": {
|
|
21
|
+
"types": "./parity-report.d.ts",
|
|
22
|
+
"import": "./parity-report.mjs"
|
|
23
|
+
},
|
|
24
|
+
"./ontology-contracts": {
|
|
25
|
+
"types": "./ontology-contracts.d.ts",
|
|
26
|
+
"import": "./ontology-contracts.mjs"
|
|
27
|
+
},
|
|
8
28
|
".": {
|
|
9
29
|
"types": "./index.d.ts",
|
|
10
30
|
"import": "./index.mjs"
|
|
@@ -21,23 +41,58 @@
|
|
|
21
41
|
"types": "./session-read.d.ts",
|
|
22
42
|
"import": "./session-read.mjs"
|
|
23
43
|
},
|
|
44
|
+
"./session-machine-tree": {
|
|
45
|
+
"types": "./session-machine-tree.d.ts",
|
|
46
|
+
"import": "./session-machine-tree.mjs"
|
|
47
|
+
},
|
|
48
|
+
"./hermes-activity-home": {
|
|
49
|
+
"types": "./hermes-read-home.d.ts",
|
|
50
|
+
"import": "./hermes-read-home.mjs"
|
|
51
|
+
},
|
|
52
|
+
"./session-activity": {
|
|
53
|
+
"types": "./session-activity.d.ts",
|
|
54
|
+
"import": "./session-activity.mjs"
|
|
55
|
+
},
|
|
56
|
+
"./session-codex-activity": {
|
|
57
|
+
"types": "./session-codex-activity.d.ts",
|
|
58
|
+
"import": "./session-codex-activity.mjs"
|
|
59
|
+
},
|
|
24
60
|
"./session-claude-runtime": {
|
|
25
61
|
"types": "./session-claude-runtime.d.ts",
|
|
26
62
|
"import": "./session-claude-runtime.mjs"
|
|
63
|
+
},
|
|
64
|
+
"./session-inspect": {
|
|
65
|
+
"types": "./session-inspect.d.ts",
|
|
66
|
+
"import": "./session-inspect.mjs"
|
|
67
|
+
},
|
|
68
|
+
"./inspection-schemas": {
|
|
69
|
+
"types": "./inspection-schemas.d.ts",
|
|
70
|
+
"import": "./inspection-schemas.mjs"
|
|
27
71
|
}
|
|
28
72
|
},
|
|
29
73
|
"files": [
|
|
30
74
|
"*.mjs",
|
|
31
75
|
"*.d.ts",
|
|
76
|
+
"support-registry.json",
|
|
77
|
+
"parity-ledger.json",
|
|
78
|
+
"parity-orchestration.json",
|
|
79
|
+
"ontology-schemas.json",
|
|
80
|
+
"ontology-operations.json",
|
|
81
|
+
"session-emission-version.json",
|
|
32
82
|
"README.md",
|
|
83
|
+
"LICENSE-diffy-MIT",
|
|
33
84
|
"LICENSE-MIT",
|
|
34
|
-
"LICENSE-APACHE"
|
|
85
|
+
"LICENSE-APACHE",
|
|
86
|
+
"inspection-config-fields.json",
|
|
87
|
+
"inspection-builtin-tools.json"
|
|
35
88
|
],
|
|
36
89
|
"engines": {
|
|
37
90
|
"node": ">=22.15.0"
|
|
38
91
|
},
|
|
39
92
|
"dependencies": {
|
|
40
93
|
"@noble/hashes": "2.4.0",
|
|
41
|
-
"saxes": "6.0.0"
|
|
94
|
+
"saxes": "6.0.0",
|
|
95
|
+
"smol-toml": "1.9.1",
|
|
96
|
+
"yaml": "2.9.0"
|
|
42
97
|
}
|
|
43
98
|
}
|