@cchistory/lite 0.8.3 → 0.9.0
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/INSTALL.md +1 -1
- package/apps/lite-cli/dist/version.d.ts +1 -1
- package/apps/lite-cli/dist/version.js +1 -1
- package/apps/lite-tui/dist/render.d.ts +1 -1
- package/apps/lite-tui/dist/version.d.ts +1 -1
- package/apps/lite-tui/dist/version.js +1 -1
- package/node_modules/@cchistory/canonical/dist/query.js +1 -1
- package/node_modules/@cchistory/canonical/dist/query.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/tool-call-summary.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/tool-call-summary.js +10 -2
- package/node_modules/@cchistory/canonical/dist/tool-call-summary.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-anomalies.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-anomalies.js +2 -0
- package/node_modules/@cchistory/canonical/dist/usage-anomalies.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-call-evaluation.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-call-evaluation.js +4 -1
- package/node_modules/@cchistory/canonical/dist/usage-call-evaluation.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-trace.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-trace.js +3 -1
- package/node_modules/@cchistory/canonical/dist/usage-trace.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-trace.test.js +73 -0
- package/node_modules/@cchistory/canonical/dist/usage-trace.test.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage.d.ts +1 -0
- package/node_modules/@cchistory/canonical/dist/usage.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage.js +23 -17
- package/node_modules/@cchistory/canonical/dist/usage.js.map +1 -1
- package/node_modules/@cchistory/canonical/package.json +1 -1
- package/node_modules/@cchistory/domain/dist/index.d.ts +3 -1
- package/node_modules/@cchistory/domain/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/domain/dist/index.js.map +1 -1
- package/node_modules/@cchistory/domain/dist/index.test.js +10 -1
- package/node_modules/@cchistory/domain/dist/index.test.js.map +1 -1
- package/node_modules/@cchistory/domain/dist/token-evidence.d.ts.map +1 -1
- package/node_modules/@cchistory/domain/dist/token-evidence.js +3 -1
- package/node_modules/@cchistory/domain/dist/token-evidence.js.map +1 -1
- package/node_modules/@cchistory/domain/package.json +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.d.ts +2 -0
- package/node_modules/@cchistory/live-runtime/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.js +1 -0
- package/node_modules/@cchistory/live-runtime/dist/index.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.test.js +266 -38
- package/node_modules/@cchistory/live-runtime/dist/index.test.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/package.json +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/conversation-seeds.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.js +60 -4
- package/node_modules/@cchistory/source-adapters/dist/core/discovery.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.js +198 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/probe.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/probe.js +85 -5
- package/node_modules/@cchistory/source-adapters/dist/core/probe.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/registry.test.js +17 -1
- package/node_modules/@cchistory/source-adapters/dist/core/registry.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.js +44 -0
- package/node_modules/@cchistory/source-adapters/dist/core/session-grouping.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.js +12 -0
- package/node_modules/@cchistory/source-adapters/dist/core/source-identity.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/index.test.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/index.test.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/index.test.js +4 -0
- package/node_modules/@cchistory/source-adapters/dist/index.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.js +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/cursor-agent.test.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/reader.d.ts +28 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/reader.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/reader.js +443 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/reader.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/runtime.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/runtime.js +370 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.d.ts +3 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.js +78 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.test.js +313 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.js +14 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/runtime.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/runtime.js +306 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/sqlite.d.ts +8 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/sqlite.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/sqlite.js +499 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes/sqlite.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.d.ts +9 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.js +53 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.test.js +314 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/hermes.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/oh-my-pi.d.ts +9 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/oh-my-pi.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/oh-my-pi.js +84 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/oh-my-pi.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite-records.d.ts +50 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite-records.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite-records.js +291 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite-records.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite.d.ts +8 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite.js +321 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode/sqlite.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode-sqlite.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode-sqlite.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode-sqlite.test.js +245 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode-sqlite.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.js +30 -7
- package/node_modules/@cchistory/source-adapters/dist/platforms/opencode.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/reader.d.ts +44 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/reader.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/reader.js +533 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/reader.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/runtime.d.ts +4 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/runtime.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/runtime.js +375 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family/runtime.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family.test.d.ts +2 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family.test.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family.test.js +346 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi-family.test.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi.d.ts +8 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi.d.ts.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi.js +60 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/pi.js.map +1 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/registry.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/registry.js +8 -0
- package/node_modules/@cchistory/source-adapters/dist/platforms/registry.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.d.ts +3 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.js +5 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/types.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/package.json +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DeepSeek Harness event interpreter.
|
|
3
|
+
*
|
|
4
|
+
* Every durable row is one session event. Only surface-producing events become
|
|
5
|
+
* conversation atoms; lifecycle, routing, approval, job and telemetry events
|
|
6
|
+
* are interpreted as evidence-only. Assistant messages carry the per-call
|
|
7
|
+
* token accounting, so usage stays at call granularity instead of being folded
|
|
8
|
+
* into a session total.
|
|
9
|
+
*/
|
|
10
|
+
/** Events that carry no conversation text and are expected to be skipped. */
|
|
11
|
+
const EVIDENCE_ONLY_EVENT_TYPES = new Set([
|
|
12
|
+
"agent-preset/selected",
|
|
13
|
+
"agent/inbox/spliced",
|
|
14
|
+
"approval/asked",
|
|
15
|
+
"approval/decided",
|
|
16
|
+
"approval/policy",
|
|
17
|
+
"assistant/attempt",
|
|
18
|
+
"command/done",
|
|
19
|
+
"command/run",
|
|
20
|
+
"compaction/end",
|
|
21
|
+
"compaction/prune",
|
|
22
|
+
"compaction/start",
|
|
23
|
+
"deliverables/presented",
|
|
24
|
+
"developer/message",
|
|
25
|
+
"feedback/message-delete",
|
|
26
|
+
"feedback/message-put",
|
|
27
|
+
"feedback/record",
|
|
28
|
+
"goal/change",
|
|
29
|
+
"hook/invoked",
|
|
30
|
+
"hook/result",
|
|
31
|
+
"image/offload",
|
|
32
|
+
"job/registered",
|
|
33
|
+
"job/settled",
|
|
34
|
+
"llm/retry",
|
|
35
|
+
"llm/retry-started",
|
|
36
|
+
"permission/preset",
|
|
37
|
+
"plan/mode",
|
|
38
|
+
"sandbox/mode",
|
|
39
|
+
"schedule/change",
|
|
40
|
+
"session-log-deepseek/delivery-accepted",
|
|
41
|
+
"session/end-seed",
|
|
42
|
+
"session/title-llm-request",
|
|
43
|
+
"step/end",
|
|
44
|
+
"step/start",
|
|
45
|
+
"subagent/descriptor",
|
|
46
|
+
"subagent/model-selection-policy",
|
|
47
|
+
"system/message",
|
|
48
|
+
"team/member",
|
|
49
|
+
"team/message/delivered",
|
|
50
|
+
"team/message/queued",
|
|
51
|
+
"team/mode",
|
|
52
|
+
"team/task",
|
|
53
|
+
"todo/write",
|
|
54
|
+
"tool-workflow/agent-end",
|
|
55
|
+
"tool-workflow/agent-start",
|
|
56
|
+
"tool-workflow/run-end",
|
|
57
|
+
"tool-workflow/run-start",
|
|
58
|
+
"tool/ptc-dispatch",
|
|
59
|
+
"tool/ptc-dispatch-start",
|
|
60
|
+
"turn/end",
|
|
61
|
+
"turn/start",
|
|
62
|
+
"web/deepseek-search-llm-request",
|
|
63
|
+
"workspace/changes",
|
|
64
|
+
]);
|
|
65
|
+
/** User-message sources that are harness-injected context, not human prompts. */
|
|
66
|
+
const INJECTED_USER_SOURCE_KINDS = new Set([
|
|
67
|
+
"agent-instructions",
|
|
68
|
+
"compaction",
|
|
69
|
+
"cron",
|
|
70
|
+
"goal-continuation",
|
|
71
|
+
"notification",
|
|
72
|
+
"runtime-context",
|
|
73
|
+
"skill-catalog",
|
|
74
|
+
"subagent-result",
|
|
75
|
+
"time-context",
|
|
76
|
+
"tool-jobs",
|
|
77
|
+
]);
|
|
78
|
+
export function parseDeepSeekHarnessRecord(context, record, parsed, draft, helpers) {
|
|
79
|
+
const fragments = [];
|
|
80
|
+
const lossAudits = [];
|
|
81
|
+
const recordType = helpers.asString(parsed.type) ?? "unknown";
|
|
82
|
+
const data = helpers.isObject(parsed.data) ? parsed.data : undefined;
|
|
83
|
+
const timeKey = helpers.epochMillisToIso(helpers.asNumber(parsed.time)) ??
|
|
84
|
+
record.observed_at ??
|
|
85
|
+
helpers.nowIso();
|
|
86
|
+
const push = (fragmentKind, payload) => {
|
|
87
|
+
fragments.push(helpers.createFragment(context, record, fragments.length, fragmentKind, timeKey, payload));
|
|
88
|
+
};
|
|
89
|
+
const loss = (detail, diagnosticCode, severity = "info") => {
|
|
90
|
+
lossAudits.push(helpers.createRecordLossAudit(context, record, "unknown_fragment", detail, {
|
|
91
|
+
diagnosticCode,
|
|
92
|
+
severity,
|
|
93
|
+
}));
|
|
94
|
+
};
|
|
95
|
+
if (recordType === "session") {
|
|
96
|
+
push("session_meta", parsed);
|
|
97
|
+
return { fragments, lossAudits };
|
|
98
|
+
}
|
|
99
|
+
if (recordType === "user/message") {
|
|
100
|
+
if (data) {
|
|
101
|
+
appendUserMessage(helpers, data, push, loss);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
loss("DeepSeek Harness user message record has no data body.", "dsh_user_message_missing");
|
|
105
|
+
}
|
|
106
|
+
return { fragments, lossAudits };
|
|
107
|
+
}
|
|
108
|
+
if (recordType === "assistant/message") {
|
|
109
|
+
if (data) {
|
|
110
|
+
appendAssistantMessage(context, helpers, record, data, draft, timeKey, fragments, push, loss);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
loss("DeepSeek Harness assistant message record has no data body.", "dsh_assistant_message_missing");
|
|
114
|
+
}
|
|
115
|
+
return { fragments, lossAudits };
|
|
116
|
+
}
|
|
117
|
+
if (recordType === "tool/call") {
|
|
118
|
+
if (data) {
|
|
119
|
+
const rawArguments = helpers.asString(data.arguments);
|
|
120
|
+
push("tool_call", {
|
|
121
|
+
call_id: helpers.asString(data.callId),
|
|
122
|
+
tool_name: helpers.asString(data.name) ?? "tool",
|
|
123
|
+
input: parseToolInput(rawArguments, helpers),
|
|
124
|
+
source_event_type: recordType,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
loss("DeepSeek Harness tool call record has no data body.", "dsh_tool_call_missing");
|
|
129
|
+
}
|
|
130
|
+
return { fragments, lossAudits };
|
|
131
|
+
}
|
|
132
|
+
if (recordType === "tool/result") {
|
|
133
|
+
if (data) {
|
|
134
|
+
appendToolResult(helpers, data, push, loss);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
loss("DeepSeek Harness tool result record has no data body.", "dsh_tool_result_missing");
|
|
138
|
+
}
|
|
139
|
+
return { fragments, lossAudits };
|
|
140
|
+
}
|
|
141
|
+
if (recordType === "session/title") {
|
|
142
|
+
const title = data ? helpers.asString(data.title) : undefined;
|
|
143
|
+
if (title) {
|
|
144
|
+
draft.title = title;
|
|
145
|
+
push("title_signal", { title, title_source: helpers.asString(data?.source) });
|
|
146
|
+
}
|
|
147
|
+
return { fragments, lossAudits };
|
|
148
|
+
}
|
|
149
|
+
if (recordType === "request/context" || recordType === "model/selection") {
|
|
150
|
+
if (data) {
|
|
151
|
+
appendModelSignal(helpers, data, draft, push);
|
|
152
|
+
}
|
|
153
|
+
return { fragments, lossAudits };
|
|
154
|
+
}
|
|
155
|
+
if (recordType === "request/header") {
|
|
156
|
+
const header = data && helpers.isObject(data.header) ? data.header : undefined;
|
|
157
|
+
const config = header && helpers.isObject(header.config) ? header.config : undefined;
|
|
158
|
+
if (config) {
|
|
159
|
+
appendModelSignal(helpers, config, draft, push);
|
|
160
|
+
}
|
|
161
|
+
return { fragments, lossAudits };
|
|
162
|
+
}
|
|
163
|
+
if (recordType === "working-directory/change") {
|
|
164
|
+
const nextDirectory = data
|
|
165
|
+
? helpers.asString(data.cwd) ?? helpers.asString(data.path) ?? helpers.asString(data.directory)
|
|
166
|
+
: undefined;
|
|
167
|
+
const normalized = nextDirectory ? helpers.normalizeWorkspacePath(nextDirectory) : undefined;
|
|
168
|
+
if (normalized) {
|
|
169
|
+
draft.working_directory = normalized;
|
|
170
|
+
push("workspace_signal", { path: normalized });
|
|
171
|
+
}
|
|
172
|
+
return { fragments, lossAudits };
|
|
173
|
+
}
|
|
174
|
+
if (recordType === "compaction/summary") {
|
|
175
|
+
// Compaction is a separate model call whose usage belongs to this session.
|
|
176
|
+
// The summary text itself is re-published through the surface replacement
|
|
177
|
+
// event, so it is not duplicated here.
|
|
178
|
+
const usage = data ? helpers.extractTokenUsage(data.usage) : undefined;
|
|
179
|
+
if (usage) {
|
|
180
|
+
fragments.push(helpers.createTokenUsageFragment(context, record, fragments.length, timeKey, { ...usage, model: data ? helpers.asString(data.model) ?? usage.model : usage.model }, undefined, {
|
|
181
|
+
scope: "call",
|
|
182
|
+
independent_usage_event_id: record.id,
|
|
183
|
+
source_event_type: recordType,
|
|
184
|
+
call_kind: "compaction",
|
|
185
|
+
}));
|
|
186
|
+
}
|
|
187
|
+
return { fragments, lossAudits };
|
|
188
|
+
}
|
|
189
|
+
if (recordType === "subagent/catalog") {
|
|
190
|
+
const childId = data ? helpers.asString(data.childId) : undefined;
|
|
191
|
+
if (childId) {
|
|
192
|
+
const label = data ? helpers.asString(data.name) ?? helpers.asString(data.label) : undefined;
|
|
193
|
+
push("session_relation", {
|
|
194
|
+
parent_uuid: draft.source_session_id,
|
|
195
|
+
child_session_id: childId,
|
|
196
|
+
agent_id: label,
|
|
197
|
+
relation_source: "subagent_catalog",
|
|
198
|
+
child_created_at: data ? helpers.epochMillisToIso(helpers.asNumber(data.childCreatedAt)) : undefined,
|
|
199
|
+
child_mode: data ? helpers.asString(data.mode) : undefined,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
return { fragments, lossAudits };
|
|
203
|
+
}
|
|
204
|
+
if (EVIDENCE_ONLY_EVENT_TYPES.has(recordType)) {
|
|
205
|
+
return { fragments, lossAudits };
|
|
206
|
+
}
|
|
207
|
+
push("unknown", parsed);
|
|
208
|
+
lossAudits.push(helpers.createRecordLossAudit(context, record, "unknown_fragment", `Unhandled DeepSeek Harness event type: ${recordType}`, { diagnosticCode: "dsh_unhandled_event_type", severity: "warning" }));
|
|
209
|
+
return { fragments, lossAudits };
|
|
210
|
+
}
|
|
211
|
+
function appendUserMessage(helpers, data, push, loss) {
|
|
212
|
+
const source = helpers.isObject(data.source) ? data.source : undefined;
|
|
213
|
+
const sourceKind = helpers.asString(source?.kind);
|
|
214
|
+
const isHumanPrompt = sourceKind === "user";
|
|
215
|
+
const isInjected = sourceKind !== undefined && INJECTED_USER_SOURCE_KINDS.has(sourceKind);
|
|
216
|
+
const originKind = sourceKind === undefined || isHumanPrompt ? "user_authored" : "injected_user_shaped";
|
|
217
|
+
const displayPolicy = sourceKind === undefined || isHumanPrompt ? "show" : "collapse";
|
|
218
|
+
const messageId = helpers.asString(data.id);
|
|
219
|
+
if (sourceKind !== undefined && !isHumanPrompt && !isInjected) {
|
|
220
|
+
loss(`DeepSeek Harness user message source kind "${sourceKind}" is not catalogued; kept as injected user-shaped context.`, "dsh_user_message_source_unknown");
|
|
221
|
+
}
|
|
222
|
+
let textFragments = 0;
|
|
223
|
+
for (const item of helpers.asArray(data.content)) {
|
|
224
|
+
if (!helpers.isObject(item)) {
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
const itemType = helpers.asString(item.type);
|
|
228
|
+
if (itemType === "text") {
|
|
229
|
+
const text = helpers.asString(item.text);
|
|
230
|
+
if (!text) {
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
push("text", {
|
|
234
|
+
actor_kind: "user",
|
|
235
|
+
origin_kind: originKind,
|
|
236
|
+
text,
|
|
237
|
+
display_policy: displayPolicy,
|
|
238
|
+
...(messageId ? { message_id: messageId } : {}),
|
|
239
|
+
source_origin_kind: sourceKind,
|
|
240
|
+
source_event_type: "user/message",
|
|
241
|
+
});
|
|
242
|
+
textFragments += 1;
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
if (itemType === "image" || itemType === "file") {
|
|
246
|
+
loss(`DeepSeek Harness ${itemType} attachment was not projected as conversation text.`, `dsh_user_${itemType}_attachment_not_projected`);
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
loss(`Unsupported DeepSeek Harness user content block type: ${String(itemType)}`, "dsh_unsupported_user_content_block");
|
|
250
|
+
}
|
|
251
|
+
if (textFragments === 0) {
|
|
252
|
+
loss("DeepSeek Harness user message contained no projectable text block.", "dsh_user_message_text_missing");
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function appendAssistantMessage(context, helpers, record, data, draft, timeKey, fragments, push, loss) {
|
|
256
|
+
const message = helpers.isObject(data.message) ? data.message : undefined;
|
|
257
|
+
if (!message) {
|
|
258
|
+
loss("DeepSeek Harness assistant message record has no message body.", "dsh_assistant_message_missing");
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
const source = helpers.isObject(message.source) ? message.source : undefined;
|
|
262
|
+
const model = helpers.asString(source?.model);
|
|
263
|
+
if (model) {
|
|
264
|
+
draft.model = model;
|
|
265
|
+
}
|
|
266
|
+
const messageId = helpers.asString(message.id);
|
|
267
|
+
for (const item of helpers.asArray(message.content)) {
|
|
268
|
+
if (!helpers.isObject(item)) {
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
const itemType = helpers.asString(item.type);
|
|
272
|
+
if (itemType === "text") {
|
|
273
|
+
const text = helpers.asString(item.text);
|
|
274
|
+
if (!text) {
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
push("text", {
|
|
278
|
+
actor_kind: "assistant",
|
|
279
|
+
origin_kind: "assistant_authored",
|
|
280
|
+
text,
|
|
281
|
+
display_policy: "show",
|
|
282
|
+
...(messageId ? { message_id: messageId } : {}),
|
|
283
|
+
...(model ? { model } : {}),
|
|
284
|
+
source_event_type: "assistant/message",
|
|
285
|
+
});
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
if (itemType === "reasoning") {
|
|
289
|
+
const text = helpers.asString(item.text);
|
|
290
|
+
if (!text) {
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
push("text", {
|
|
294
|
+
actor_kind: "assistant",
|
|
295
|
+
origin_kind: "assistant_authored",
|
|
296
|
+
text,
|
|
297
|
+
display_policy: "collapse",
|
|
298
|
+
source_content_type: "reasoning",
|
|
299
|
+
...(messageId ? { message_id: messageId } : {}),
|
|
300
|
+
...(model ? { model } : {}),
|
|
301
|
+
source_event_type: "assistant/message",
|
|
302
|
+
});
|
|
303
|
+
continue;
|
|
304
|
+
}
|
|
305
|
+
if (itemType === "tool-call") {
|
|
306
|
+
// The paired tool/call event owns the durable call record, so the copy
|
|
307
|
+
// embedded in the assistant message is not projected twice.
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
loss(`Unsupported DeepSeek Harness assistant content block type: ${String(itemType)}`, "dsh_unsupported_assistant_content_block");
|
|
311
|
+
}
|
|
312
|
+
const usage = helpers.extractTokenUsage(data.usage);
|
|
313
|
+
if (usage) {
|
|
314
|
+
fragments.push(helpers.createTokenUsageFragment(context, record, fragments.length, timeKey, { ...usage, model: model ?? usage.model }, undefined, {
|
|
315
|
+
scope: "call",
|
|
316
|
+
...(messageId ? { message_id: messageId } : {}),
|
|
317
|
+
independent_usage_event_id: record.id,
|
|
318
|
+
source_event_type: "assistant/message",
|
|
319
|
+
}));
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
function appendToolResult(helpers, data, push, loss) {
|
|
323
|
+
const message = helpers.isObject(data.message) ? data.message : undefined;
|
|
324
|
+
if (!message) {
|
|
325
|
+
loss("DeepSeek Harness tool result record has no message body.", "dsh_tool_result_missing");
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
const callId = helpers.asString(message.toolCallId);
|
|
329
|
+
const output = helpers.stringifyToolContent(message.content);
|
|
330
|
+
const isError = helpers.asBoolean(message.isError);
|
|
331
|
+
const error = helpers.isObject(data.error) ? data.error : undefined;
|
|
332
|
+
push("tool_result", {
|
|
333
|
+
call_id: callId,
|
|
334
|
+
output,
|
|
335
|
+
...(isError !== undefined ? { is_error: isError } : {}),
|
|
336
|
+
...(error ? {
|
|
337
|
+
error_name: helpers.asString(error.name),
|
|
338
|
+
error_code: helpers.asString(error.code),
|
|
339
|
+
error_reason: helpers.asString(error.reason),
|
|
340
|
+
} : {}),
|
|
341
|
+
source_event_type: "tool/result",
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
function appendModelSignal(helpers, data, draft, push) {
|
|
345
|
+
const model = helpers.asString(data.model);
|
|
346
|
+
const provider = helpers.asString(data.provider);
|
|
347
|
+
if (model) {
|
|
348
|
+
draft.model = model;
|
|
349
|
+
}
|
|
350
|
+
if (model || provider) {
|
|
351
|
+
push("model_signal", {
|
|
352
|
+
model,
|
|
353
|
+
provider,
|
|
354
|
+
context_window: helpers.asNumber(data.contextWindow),
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
function parseToolInput(rawArguments, helpers) {
|
|
359
|
+
if (!rawArguments) {
|
|
360
|
+
return {};
|
|
361
|
+
}
|
|
362
|
+
try {
|
|
363
|
+
const parsed = JSON.parse(rawArguments);
|
|
364
|
+
return helpers.isObject(parsed) ? parsed : { arguments: rawArguments };
|
|
365
|
+
}
|
|
366
|
+
catch {
|
|
367
|
+
return { arguments: rawArguments };
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
//# sourceMappingURL=runtime.js.map
|
package/node_modules/@cchistory/source-adapters/dist/platforms/deepseek-harness/runtime.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../src/platforms/deepseek-harness/runtime.ts"],"names":[],"mappings":"AASA;;;;;;;;GAQG;AAEH,6EAA6E;AAC7E,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC;IACxC,uBAAuB;IACvB,qBAAqB;IACrB,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;IACjB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,wBAAwB;IACxB,mBAAmB;IACnB,yBAAyB;IACzB,sBAAsB;IACtB,iBAAiB;IACjB,aAAa;IACb,cAAc;IACd,aAAa;IACb,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,mBAAmB;IACnB,mBAAmB;IACnB,WAAW;IACX,cAAc;IACd,iBAAiB;IACjB,wCAAwC;IACxC,kBAAkB;IAClB,2BAA2B;IAC3B,UAAU;IACV,YAAY;IACZ,qBAAqB;IACrB,iCAAiC;IACjC,gBAAgB;IAChB,aAAa;IACb,wBAAwB;IACxB,qBAAqB;IACrB,WAAW;IACX,WAAW;IACX,YAAY;IACZ,yBAAyB;IACzB,2BAA2B;IAC3B,uBAAuB;IACvB,yBAAyB;IACzB,mBAAmB;IACnB,yBAAyB;IACzB,UAAU;IACV,YAAY;I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L,QAAQ;YACR,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC;SACrD,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,YAAgC,EAAE,OAAkC;IAC1F,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,CAAC;QACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACjD,OAAO,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;IACzE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;IACrC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepseek-harness.d.ts","sourceRoot":"","sources":["../../src/platforms/deepseek-harness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAuBlD,eAAO,MAAM,sBAAsB,EAAE,eA2DpC,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
/**
|
|
3
|
+
* DeepSeek Harness keeps one durability log per session under
|
|
4
|
+
* `<root>/<project-dir>/<session-id>/`, named `session[.vN].jsonl` or
|
|
5
|
+
* `session[.vN].jsonl.zstd` (current generation `v4`, Zstandard frames by
|
|
6
|
+
* default). The file name carries the physical format version, so a source
|
|
7
|
+
* root can retain several generations at once.
|
|
8
|
+
*/
|
|
9
|
+
const SESSION_FILE_NAME = /^session(?:\.v(\d+))?\.jsonl(\.zstd)?$/u;
|
|
10
|
+
function readSessionFileVersion(filePath) {
|
|
11
|
+
const match = SESSION_FILE_NAME.exec(path.basename(filePath));
|
|
12
|
+
if (!match) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
return match[1] === undefined ? 0 : Number.parseInt(match[1], 10);
|
|
16
|
+
}
|
|
17
|
+
function isCompressedSessionFile(filePath) {
|
|
18
|
+
return SESSION_FILE_NAME.exec(path.basename(filePath))?.[2] === ".zstd";
|
|
19
|
+
}
|
|
20
|
+
export const deepSeekHarnessAdapter = {
|
|
21
|
+
platform: "deepseek_harness",
|
|
22
|
+
supportTier: "experimental",
|
|
23
|
+
sessionTargeting: "file",
|
|
24
|
+
// Parent `subagent/catalog` events reference child sessions stored in sibling
|
|
25
|
+
// directories, so one source-wide projection is the conservative boundary.
|
|
26
|
+
projectionBoundary: "source",
|
|
27
|
+
getDefaultBaseDirCandidates: (options) => {
|
|
28
|
+
const candidates = [];
|
|
29
|
+
const env = options.env ?? process.env;
|
|
30
|
+
const harnessHome = env.DSH_HOME?.trim();
|
|
31
|
+
if (harnessHome) {
|
|
32
|
+
candidates.push(path.join(harnessHome, "sessions"));
|
|
33
|
+
}
|
|
34
|
+
const homeDir = options.homeDir;
|
|
35
|
+
if (homeDir) {
|
|
36
|
+
candidates.push(path.join(homeDir, ".dsh", "sessions"));
|
|
37
|
+
}
|
|
38
|
+
return candidates;
|
|
39
|
+
},
|
|
40
|
+
matchesSourceFile: (filePath) => {
|
|
41
|
+
if (readSessionFileVersion(filePath) === undefined) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
// The layout always nests the log inside a session-owned directory; this
|
|
45
|
+
// keeps unrelated `session*.jsonl` files outside a DSH root out of scope.
|
|
46
|
+
return path.basename(path.dirname(filePath)).length > 0;
|
|
47
|
+
},
|
|
48
|
+
filterSourceFiles: (files) => {
|
|
49
|
+
const bestBySessionDir = new Map();
|
|
50
|
+
for (const filePath of files) {
|
|
51
|
+
const version = readSessionFileVersion(filePath);
|
|
52
|
+
if (version === undefined) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const sessionDir = path.dirname(filePath);
|
|
56
|
+
const existing = bestBySessionDir.get(sessionDir);
|
|
57
|
+
if (!existing) {
|
|
58
|
+
bestBySessionDir.set(sessionDir, filePath);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const existingVersion = readSessionFileVersion(existing) ?? 0;
|
|
62
|
+
// A retained older generation is superseded by the highest version; at
|
|
63
|
+
// equal versions the configured (compressed) encoding wins.
|
|
64
|
+
if (version > existingVersion ||
|
|
65
|
+
(version === existingVersion && isCompressedSessionFile(filePath) && !isCompressedSessionFile(existing))) {
|
|
66
|
+
bestBySessionDir.set(sessionDir, filePath);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return [...bestBySessionDir.values()].sort((left, right) => left.localeCompare(right));
|
|
70
|
+
},
|
|
71
|
+
getSourceFilePriority: (filePath) => {
|
|
72
|
+
// Later generations sort after retained predecessors so the current log is
|
|
73
|
+
// parsed last when an incomplete retained tree is the only evidence.
|
|
74
|
+
return readSessionFileVersion(filePath) ?? 0;
|
|
75
|
+
},
|
|
76
|
+
getSourceRoots: (baseDir) => [baseDir],
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=deepseek-harness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepseek-harness.js","sourceRoot":"","sources":["../../src/platforms/deepseek-harness.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAG,yCAAyC,CAAC;AAEpE,SAAS,sBAAsB,CAAC,QAAgB;IAC9C,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9D,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,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