@principal-ai/principal-view-core 0.28.8 → 0.28.10
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/agent-sessions/fixture.d.ts +80 -0
- package/dist/agent-sessions/fixture.d.ts.map +1 -0
- package/dist/agent-sessions/fixture.js +130 -0
- package/dist/agent-sessions/fixture.js.map +1 -0
- package/dist/agent-sessions/index.d.ts +3 -0
- package/dist/agent-sessions/index.d.ts.map +1 -0
- package/dist/agent-sessions/index.js +6 -0
- package/dist/agent-sessions/index.js.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +8 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +22 -2
- package/dist/node.js.map +1 -1
- package/dist/opencode/OpenCodeEventStore.d.ts +25 -0
- package/dist/opencode/OpenCodeEventStore.d.ts.map +1 -0
- package/dist/opencode/OpenCodeEventStore.js +182 -0
- package/dist/opencode/OpenCodeEventStore.js.map +1 -0
- package/dist/opencode/agent-sessions.d.ts +46 -0
- package/dist/opencode/agent-sessions.d.ts.map +1 -0
- package/dist/opencode/agent-sessions.js +219 -0
- package/dist/opencode/agent-sessions.js.map +1 -0
- package/dist/opencode/index.d.ts +6 -0
- package/dist/opencode/index.d.ts.map +1 -0
- package/dist/opencode/index.js +15 -0
- package/dist/opencode/index.js.map +1 -0
- package/dist/opencode/node-path-adapter.d.ts +25 -0
- package/dist/opencode/node-path-adapter.d.ts.map +1 -0
- package/dist/opencode/node-path-adapter.js +183 -0
- package/dist/opencode/node-path-adapter.js.map +1 -0
- package/dist/opencode/pipeline.d.ts +42 -0
- package/dist/opencode/pipeline.d.ts.map +1 -0
- package/dist/opencode/pipeline.js +90 -0
- package/dist/opencode/pipeline.js.map +1 -0
- package/dist/opencode/types.d.ts +39 -0
- package/dist/opencode/types.d.ts.map +1 -0
- package/dist/opencode/types.js +3 -0
- package/dist/opencode/types.js.map +1 -0
- package/dist/storage/topic-types.d.ts +14 -0
- package/dist/storage/topic-types.d.ts.map +1 -1
- package/dist/storage/topic-types.js +1 -0
- package/dist/storage/topic-types.js.map +1 -1
- package/dist/storage/topicStore.d.ts +1 -1
- package/dist/storage/topicStore.d.ts.map +1 -1
- package/package.json +10 -1
- package/src/agent-sessions/fixture.ts +225 -0
- package/src/agent-sessions/index.ts +10 -0
- package/src/index.ts +1 -0
- package/src/node.ts +31 -0
- package/src/opencode/EVENT_MAPPING.md +82 -0
- package/src/opencode/OpenCodeEventStore.ts +214 -0
- package/src/opencode/__fixtures__/event-shapes.json +443 -0
- package/src/opencode/__fixtures__/session-events.json +13491 -0
- package/src/opencode/agent-sessions.ts +282 -0
- package/src/opencode/index.ts +23 -0
- package/src/opencode/node-path-adapter.ts +199 -0
- package/src/opencode/pipeline.ts +141 -0
- package/src/opencode/types.ts +43 -0
- package/src/storage/topic-types.ts +15 -0
- package/src/storage/topicStore.test.ts +38 -1
- package/src/storage/topicStore.ts +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type UniversalAgentSessionEvent } from "@principal-ai/agent-monitoring";
|
|
2
|
+
import { NodePathNormalizationAdapter, accumulateEvents, collectRepositories, normalizeEvents, normalizeEventsWithAdapter } from "./pipeline";
|
|
3
|
+
export { NodePathNormalizationAdapter, normalizeEvents, normalizeEventsWithAdapter, accumulateEvents, collectRepositories, };
|
|
4
|
+
/**
|
|
5
|
+
* Shared, agent-agnostic session access: list + fetch across Cline, opencode,
|
|
6
|
+
* pi, and Grok, normalizing raw events into repo-aware universal events.
|
|
7
|
+
*
|
|
8
|
+
* This is the single source of truth for CLI and trail-viewer session pulling.
|
|
9
|
+
* opencode listing delegates to `OpenCodeEventStore.listSessionsWithSummaries()`,
|
|
10
|
+
* which already builds parent/child groups and excludes subagent (child) sessions
|
|
11
|
+
* from the standalone list.
|
|
12
|
+
*/
|
|
13
|
+
export type SupportedSessionAgent = "cline" | "opencode" | "pi" | "grok" | "unknown";
|
|
14
|
+
export interface AgentSessionSummary {
|
|
15
|
+
agent: SupportedSessionAgent;
|
|
16
|
+
sessionId: string;
|
|
17
|
+
title: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
eventCount: number;
|
|
20
|
+
isFinished: boolean;
|
|
21
|
+
parentID?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AgentSessionMeta {
|
|
24
|
+
sessionName: string;
|
|
25
|
+
sessionTask: string;
|
|
26
|
+
workingDirectory: string;
|
|
27
|
+
createdAt?: string;
|
|
28
|
+
}
|
|
29
|
+
/** List sessions from all supported agents. Top-level only by default. */
|
|
30
|
+
export declare function listAgentSessions(options?: {
|
|
31
|
+
dbPath?: string;
|
|
32
|
+
}): AgentSessionSummary[];
|
|
33
|
+
/** Detect which agent a session id belongs to. */
|
|
34
|
+
export declare function detectAgent(sessionId: string): "cline" | "opencode" | "pi" | "grok";
|
|
35
|
+
/**
|
|
36
|
+
* Fetch a session's raw universal events from the appropriate source.
|
|
37
|
+
*/
|
|
38
|
+
export declare function fetchRawEvents(sessionId: string, options?: {
|
|
39
|
+
agent?: "cline" | "opencode" | "pi" | "grok";
|
|
40
|
+
dbPath?: string;
|
|
41
|
+
}): {
|
|
42
|
+
agent: "cline" | "opencode" | "pi" | "grok";
|
|
43
|
+
events: UniversalAgentSessionEvent[];
|
|
44
|
+
sessionMeta: AgentSessionMeta;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=agent-sessions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-sessions.d.ts","sourceRoot":"","sources":["../../src/opencode/agent-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,0BAA0B,EAChC,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,4BAA4B,EAC5B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,0BAA0B,EAE3B,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,4BAA4B,EAC5B,eAAe,EACf,0BAA0B,EAC1B,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{ value: true });
|
|
3
|
+
exports.fetchRawEvents = exports.detectAgent = exports.listAgentSessions = exports.collectRepositories = exports.accumulateEvents = exports.normalizeEventsWithAdapter = exports.normalizeEvents = exports.NodePathNormalizationAdapter = void 0;
|
|
4
|
+
const agent_monitoring_1 = require("@principal-ai/agent-monitoring");
|
|
5
|
+
const OpenCodeEventStore_1 = require("./OpenCodeEventStore");
|
|
6
|
+
const pipeline_1 = require("./pipeline");
|
|
7
|
+
Object.defineProperty(exports, "NodePathNormalizationAdapter", { enumerable: true, get: function () { return pipeline_1.NodePathNormalizationAdapter; } });
|
|
8
|
+
Object.defineProperty(exports, "accumulateEvents", { enumerable: true, get: function () { return pipeline_1.accumulateEvents; } });
|
|
9
|
+
Object.defineProperty(exports, "collectRepositories", { enumerable: true, get: function () { return pipeline_1.collectRepositories; } });
|
|
10
|
+
Object.defineProperty(exports, "normalizeEvents", { enumerable: true, get: function () { return pipeline_1.normalizeEvents; } });
|
|
11
|
+
Object.defineProperty(exports, "normalizeEventsWithAdapter", { enumerable: true, get: function () { return pipeline_1.normalizeEventsWithAdapter; } });
|
|
12
|
+
const clineReader = new agent_monitoring_1.ClineSessionReader();
|
|
13
|
+
const piReader = new agent_monitoring_1.PiSessionReader();
|
|
14
|
+
const grokReader = new agent_monitoring_1.GrokSessionReader();
|
|
15
|
+
function isClineSession(sessionId) {
|
|
16
|
+
return clineReader.readSession(sessionId) !== null;
|
|
17
|
+
}
|
|
18
|
+
function isPiSession(sessionId) {
|
|
19
|
+
return piReader.readSession(sessionId) !== null;
|
|
20
|
+
}
|
|
21
|
+
function isGrokSession(sessionId) {
|
|
22
|
+
return grokReader.readSession(sessionId) !== null;
|
|
23
|
+
}
|
|
24
|
+
/** List Cline CLI sessions from the durable on-disk transcript. */
|
|
25
|
+
function listClineSessions() {
|
|
26
|
+
return clineReader.listSessions().map((record) => {
|
|
27
|
+
const meta = record.metadata;
|
|
28
|
+
const promptText = (meta.prompt ?? "").trim();
|
|
29
|
+
const title = promptText.length > 0
|
|
30
|
+
? promptText.length > 80
|
|
31
|
+
? `${promptText.slice(0, 80)}…`
|
|
32
|
+
: promptText
|
|
33
|
+
: "Cline session";
|
|
34
|
+
return {
|
|
35
|
+
agent: "cline",
|
|
36
|
+
sessionId: record.sessionId,
|
|
37
|
+
title,
|
|
38
|
+
createdAt: meta.started_at ?? "",
|
|
39
|
+
eventCount: clineReader.readMessages(record.sessionId)?.messages.length ?? 0,
|
|
40
|
+
isFinished: meta.status === "completed" || meta.status === "failed",
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/** List pi CLI sessions from the durable on-disk JSONL transcripts. */
|
|
45
|
+
function listPiSessions() {
|
|
46
|
+
return piReader.listSessions().map((record) => {
|
|
47
|
+
const promptText = (record.firstPrompt ?? "").trim();
|
|
48
|
+
const title = promptText.length > 0
|
|
49
|
+
? promptText.length > 80
|
|
50
|
+
? `${promptText.slice(0, 80)}…`
|
|
51
|
+
: promptText
|
|
52
|
+
: "pi session";
|
|
53
|
+
return {
|
|
54
|
+
agent: "pi",
|
|
55
|
+
sessionId: record.sessionId,
|
|
56
|
+
title,
|
|
57
|
+
createdAt: record.header.timestamp ?? "",
|
|
58
|
+
eventCount: record.messageCount,
|
|
59
|
+
// pi transcripts carry no finished marker; the trail-viewer appends a
|
|
60
|
+
// synthesized session-end event at read time.
|
|
61
|
+
isFinished: false,
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/** List Grok Build sessions from ~/.grok/sessions durable JSONL. */
|
|
66
|
+
function listGrokSessions() {
|
|
67
|
+
return grokReader.listSessions().map((record) => {
|
|
68
|
+
return {
|
|
69
|
+
agent: "grok",
|
|
70
|
+
sessionId: record.sessionId,
|
|
71
|
+
title: record.title || "Grok session",
|
|
72
|
+
createdAt: record.createdAt,
|
|
73
|
+
eventCount: record.messageCount,
|
|
74
|
+
isFinished: false,
|
|
75
|
+
parentID: record.parentSessionId,
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* List opencode sessions, top-level only by default. Delegates to the store's
|
|
81
|
+
* grouped `listSessionsWithSummaries()` which excludes subagent (child) sessions.
|
|
82
|
+
*/
|
|
83
|
+
function listOpencodeSessions(dbPath) {
|
|
84
|
+
const store = new OpenCodeEventStore_1.OpenCodeEventStore({ dbPath });
|
|
85
|
+
try {
|
|
86
|
+
const result = store.listSessionsWithSummaries(50);
|
|
87
|
+
const toSummary = (s) => ({
|
|
88
|
+
agent: "opencode",
|
|
89
|
+
sessionId: s.id,
|
|
90
|
+
title: s.title,
|
|
91
|
+
createdAt: s.createdAt,
|
|
92
|
+
eventCount: s.eventCount,
|
|
93
|
+
isFinished: s.isFinished,
|
|
94
|
+
});
|
|
95
|
+
const standalone = [
|
|
96
|
+
...result.standalone.map(toSummary),
|
|
97
|
+
...result.groups.map((g) => toSummary(g.parent)),
|
|
98
|
+
];
|
|
99
|
+
// Sort newest-first by createdAt
|
|
100
|
+
return standalone.sort((a, b) => b.createdAt < a.createdAt ? -1 : b.createdAt > a.createdAt ? 1 : 0);
|
|
101
|
+
}
|
|
102
|
+
finally {
|
|
103
|
+
store.close();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/** List sessions from all supported agents. Top-level only by default. */
|
|
107
|
+
function listAgentSessions(options = {}) {
|
|
108
|
+
const all = [];
|
|
109
|
+
let firstError = null;
|
|
110
|
+
try {
|
|
111
|
+
all.push(...listOpencodeSessions(options.dbPath));
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
firstError = err;
|
|
115
|
+
}
|
|
116
|
+
try {
|
|
117
|
+
all.push(...listClineSessions());
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
if (!firstError)
|
|
121
|
+
firstError = err;
|
|
122
|
+
}
|
|
123
|
+
try {
|
|
124
|
+
all.push(...listPiSessions());
|
|
125
|
+
}
|
|
126
|
+
catch (err) {
|
|
127
|
+
if (!firstError)
|
|
128
|
+
firstError = err;
|
|
129
|
+
}
|
|
130
|
+
try {
|
|
131
|
+
all.push(...listGrokSessions());
|
|
132
|
+
}
|
|
133
|
+
catch (err) {
|
|
134
|
+
if (!firstError)
|
|
135
|
+
firstError = err;
|
|
136
|
+
}
|
|
137
|
+
if (all.length === 0 && firstError) {
|
|
138
|
+
throw firstError;
|
|
139
|
+
}
|
|
140
|
+
return all;
|
|
141
|
+
}
|
|
142
|
+
exports.listAgentSessions = listAgentSessions;
|
|
143
|
+
/** Detect which agent a session id belongs to. */
|
|
144
|
+
function detectAgent(sessionId) {
|
|
145
|
+
if (isClineSession(sessionId))
|
|
146
|
+
return "cline";
|
|
147
|
+
if (isPiSession(sessionId))
|
|
148
|
+
return "pi";
|
|
149
|
+
if (isGrokSession(sessionId))
|
|
150
|
+
return "grok";
|
|
151
|
+
return "opencode";
|
|
152
|
+
}
|
|
153
|
+
exports.detectAgent = detectAgent;
|
|
154
|
+
/**
|
|
155
|
+
* Fetch a session's raw universal events from the appropriate source.
|
|
156
|
+
*/
|
|
157
|
+
function fetchRawEvents(sessionId, options = {}) {
|
|
158
|
+
const agent = options.agent ?? detectAgent(sessionId);
|
|
159
|
+
if (agent === "cline") {
|
|
160
|
+
const record = clineReader.readSession(sessionId);
|
|
161
|
+
const promptText = (record?.metadata.prompt ?? "").trim();
|
|
162
|
+
return {
|
|
163
|
+
agent,
|
|
164
|
+
events: clineReader.toUniversalEvents(sessionId),
|
|
165
|
+
sessionMeta: {
|
|
166
|
+
sessionName: "cline",
|
|
167
|
+
sessionTask: (promptText.length > 80 ? `${promptText.slice(0, 80)}…` : promptText) ||
|
|
168
|
+
"Cline session",
|
|
169
|
+
workingDirectory: record?.metadata.workspace_root ?? record?.metadata.cwd ?? "",
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
if (agent === "pi") {
|
|
174
|
+
const record = piReader.readSession(sessionId);
|
|
175
|
+
const promptText = (record?.firstPrompt ?? "").trim();
|
|
176
|
+
return {
|
|
177
|
+
agent,
|
|
178
|
+
events: piReader.toUniversalEvents(sessionId),
|
|
179
|
+
sessionMeta: {
|
|
180
|
+
sessionName: "pi",
|
|
181
|
+
sessionTask: (promptText.length > 80 ? `${promptText.slice(0, 80)}…` : promptText) || "pi session",
|
|
182
|
+
workingDirectory: "",
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
if (agent === "grok") {
|
|
187
|
+
const record = grokReader.readSession(sessionId);
|
|
188
|
+
return {
|
|
189
|
+
agent,
|
|
190
|
+
events: grokReader.toUniversalEvents(sessionId),
|
|
191
|
+
sessionMeta: {
|
|
192
|
+
sessionName: "grok",
|
|
193
|
+
sessionTask: record?.title || "Grok session",
|
|
194
|
+
workingDirectory: record?.cwd ?? "",
|
|
195
|
+
createdAt: record?.createdAt,
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
const store = new OpenCodeEventStore_1.OpenCodeEventStore({ dbPath: options.dbPath });
|
|
200
|
+
try {
|
|
201
|
+
const { events } = store.readAggregate(sessionId, { limit: 10000 });
|
|
202
|
+
const meta = store.getSessionMeta(sessionId);
|
|
203
|
+
const title = meta.title && !meta.title.startsWith("New session") ? meta.title : meta.slug;
|
|
204
|
+
return {
|
|
205
|
+
agent,
|
|
206
|
+
events: (0, pipeline_1.opencodeRowsToUniversalEvents)(events),
|
|
207
|
+
sessionMeta: {
|
|
208
|
+
sessionName: meta.slug || "opencode",
|
|
209
|
+
sessionTask: title || meta.slug || "opencode",
|
|
210
|
+
workingDirectory: meta.directory,
|
|
211
|
+
},
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
finally {
|
|
215
|
+
store.close();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
exports.fetchRawEvents = fetchRawEvents;
|
|
219
|
+
//# sourceMappingURL=agent-sessions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent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AAC;KACH;YAAS;QACR,KAAK,CAAC,KAAK,EAAE,CAAC;KACf;AACH,CAAC;AAxED,wCAwEC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { OpenCodeRawEvent, OpenCodeSessionEvents, OpenCodeEventRetriever, OpenCodeStoreOptions, } from "./types";
|
|
2
|
+
export { listAgentSessions, detectAgent, fetchRawEvents } from "./agent-sessions";
|
|
3
|
+
export type { AgentSessionSummary, AgentSessionMeta, SupportedSessionAgent, } from "./agent-sessions";
|
|
4
|
+
export { NodePathNormalizationAdapter, normalizeEvents, normalizeEventsWithAdapter, accumulateEvents, collectRepositories, opencodeRowsToUniversalEvents, } from "./pipeline";
|
|
5
|
+
export type { OpenCodeEventRow } from "./pipeline";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/opencode/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClF,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,4BAA4B,EAC5B,eAAe,EACf,0BAA0B,EAC1B,gBAAgB,EAChB,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.opencodeRowsToUniversalEvents = exports.collectRepositories = exports.accumulateEvents = exports.normalizeEventsWithAdapter = exports.normalizeEvents = exports.NodePathNormalizationAdapter = exports.fetchRawEvents = exports.detectAgent = exports.listAgentSessions = void 0;
|
|
4
|
+
var agent_sessions_1 = require("./agent-sessions");
|
|
5
|
+
Object.defineProperty(exports, "listAgentSessions", { enumerable: true, get: function () { return agent_sessions_1.listAgentSessions; } });
|
|
6
|
+
Object.defineProperty(exports, "detectAgent", { enumerable: true, get: function () { return agent_sessions_1.detectAgent; } });
|
|
7
|
+
Object.defineProperty(exports, "fetchRawEvents", { enumerable: true, get: function () { return agent_sessions_1.fetchRawEvents; } });
|
|
8
|
+
var pipeline_1 = require("./pipeline");
|
|
9
|
+
Object.defineProperty(exports, "NodePathNormalizationAdapter", { enumerable: true, get: function () { return pipeline_1.NodePathNormalizationAdapter; } });
|
|
10
|
+
Object.defineProperty(exports, "normalizeEvents", { enumerable: true, get: function () { return pipeline_1.normalizeEvents; } });
|
|
11
|
+
Object.defineProperty(exports, "normalizeEventsWithAdapter", { enumerable: true, get: function () { return pipeline_1.normalizeEventsWithAdapter; } });
|
|
12
|
+
Object.defineProperty(exports, "accumulateEvents", { enumerable: true, get: function () { return pipeline_1.accumulateEvents; } });
|
|
13
|
+
Object.defineProperty(exports, "collectRepositories", { enumerable: true, get: function () { return pipeline_1.collectRepositories; } });
|
|
14
|
+
Object.defineProperty(exports, "opencodeRowsToUniversalEvents", { enumerable: true, get: function () { return pipeline_1.opencodeRowsToUniversalEvents; } });
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/opencode/index.ts"],"names":[],"mappings":";;;AAOA,mDAAkF;AAAzE,mHAAA,iBAAiB,OAAA;AAAE,6GAAA,WAAW,OAAA;AAAE,gHAAA,cAAc,OAAA;AAOvD,uCAOoB;AANlB,wHAAA,4BAA4B,OAAA;AAC5B,2GAAA,eAAe,OAAA;AACf,sHAAA,0BAA0B,OAAA;AAC1B,4GAAA,gBAAgB,OAAA;AAChB,+GAAA,mBAAmB,OAAA;AACnB,yHAAA,6BAA6B,OAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PathNormalizationAdapter, RepositoryInfo, SystemInfo } from "@principal-ai/agent-monitoring";
|
|
2
|
+
export declare class NodePathNormalizationAdapter implements PathNormalizationAdapter {
|
|
3
|
+
private homeDir;
|
|
4
|
+
private gitRootCache;
|
|
5
|
+
private canonicalCaseCache;
|
|
6
|
+
private knownRoots;
|
|
7
|
+
/** Roots discovered via .git walk-up that weren't in the initial knownRoots */
|
|
8
|
+
readonly newlyDiscovered: RepositoryInfo[];
|
|
9
|
+
constructor(knownRoots?: Map<string, RepositoryInfo>);
|
|
10
|
+
/**
|
|
11
|
+
* Resolve the on-disk spelling of a directory path segment by segment. On
|
|
12
|
+
* case-insensitive filesystems (macOS APFS) the same directory is reachable
|
|
13
|
+
* under any casing, so git-root discovery can surface `/repo` and `/Repo` as
|
|
14
|
+
* two distinct roots unless we pin them to the actual on-disk spelling.
|
|
15
|
+
*/
|
|
16
|
+
private canonicalizeCase;
|
|
17
|
+
getRawRepositoryInfo(absolutePath: string): Promise<RepositoryInfo | null>;
|
|
18
|
+
private findGitRoot;
|
|
19
|
+
getSystemInfo(): SystemInfo;
|
|
20
|
+
resolvePath(relativePath: string, workingDirectory: string): string;
|
|
21
|
+
isAbsolutePath(path: string): boolean;
|
|
22
|
+
getRelativePath(fromPath: string, toPath: string): string;
|
|
23
|
+
isAvailable(): boolean;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=node-path-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-path-adapter.d.ts","sourceRoot":"","sources":["../../src/opencode/node-path-adapter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,wBAAwB,EACxB,cAAc,EACd,UAAU,EACX,MAAM,gCAAgC,CAAC;AAuCxC,qBAAa,4BAA6B,YAAW,wBAAwB;IAC3E,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,YAAY,CAAoC;IACxD,OAAO,CAAC,kBAAkB,CAA6B;IACvD,OAAO,CAAC,UAAU,CAA8B;IAChD,+EAA+E;IAC/E,QAAQ,CAAC,eAAe,EAAE,cAAc,EAAE,CAAM;gBAEpC,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC;IAKpD;;;;;OAKG;YACW,gBAAgB;IAsBxB,oBAAoB,CACxB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;YA8DnB,WAAW;IAsBzB,aAAa,IAAI,UAAU;IAS3B,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,MAAM;IAInE,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIrC,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAIzD,WAAW,IAAI,OAAO;CAGvB"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NodePathNormalizationAdapter = void 0;
|
|
7
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
9
|
+
const node_path_1 = require("node:path");
|
|
10
|
+
const node_os_1 = __importDefault(require("node:os"));
|
|
11
|
+
/**
|
|
12
|
+
* NodePathNormalizationAdapter — a Node.js implementation of the
|
|
13
|
+
* `PathNormalizationAdapter` interface from `@principal-ai/agent-monitoring`.
|
|
14
|
+
*
|
|
15
|
+
* This is the shared, agent-agnostic adapter used by the CLI's `agent-session`
|
|
16
|
+
* command. It discovers git roots by walking up directories and enriches them
|
|
17
|
+
* with git metadata via the `git` CLI (spawnSync). It keeps the same interface
|
|
18
|
+
* so `PathNormalizationService` can be shared verbatim. It is the Node.js
|
|
19
|
+
* analogue of the trail-viewer's `BunNormalizationAdapter` and the desktop
|
|
20
|
+
* app's `ServerPathNormalizationAdapter`.
|
|
21
|
+
*/
|
|
22
|
+
function gitCommand(cwd, subcommand) {
|
|
23
|
+
const result = (0, node_child_process_1.spawnSync)("git", ["-C", cwd, ...subcommand.split(" ")], {
|
|
24
|
+
encoding: "utf8",
|
|
25
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
26
|
+
timeout: 5000,
|
|
27
|
+
});
|
|
28
|
+
if (result.status !== 0 || !result.stdout)
|
|
29
|
+
return undefined;
|
|
30
|
+
return result.stdout.trim() || undefined;
|
|
31
|
+
}
|
|
32
|
+
/** Basic GitHub owner/repo extraction from a remote URL. */
|
|
33
|
+
function githubIdentityFromRemoteUrl(remoteUrl) {
|
|
34
|
+
const cleaned = remoteUrl
|
|
35
|
+
.replace(/^git@github\.com:/, "")
|
|
36
|
+
.replace(/^https?:\/\/github\.com\//, "")
|
|
37
|
+
.replace(/\.git$/, "");
|
|
38
|
+
const parts = cleaned.split("/").filter(Boolean);
|
|
39
|
+
if (parts.length >= 2) {
|
|
40
|
+
return { owner: parts[0], name: parts[1] };
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
class NodePathNormalizationAdapter {
|
|
45
|
+
constructor(knownRoots) {
|
|
46
|
+
this.gitRootCache = new Map();
|
|
47
|
+
this.canonicalCaseCache = new Map();
|
|
48
|
+
/** Roots discovered via .git walk-up that weren't in the initial knownRoots */
|
|
49
|
+
this.newlyDiscovered = [];
|
|
50
|
+
this.homeDir = node_os_1.default.homedir();
|
|
51
|
+
this.knownRoots = knownRoots ?? new Map();
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Resolve the on-disk spelling of a directory path segment by segment. On
|
|
55
|
+
* case-insensitive filesystems (macOS APFS) the same directory is reachable
|
|
56
|
+
* under any casing, so git-root discovery can surface `/repo` and `/Repo` as
|
|
57
|
+
* two distinct roots unless we pin them to the actual on-disk spelling.
|
|
58
|
+
*/
|
|
59
|
+
async canonicalizeCase(input) {
|
|
60
|
+
const cached = this.canonicalCaseCache.get(input);
|
|
61
|
+
if (cached !== undefined)
|
|
62
|
+
return cached;
|
|
63
|
+
const segments = input.split("/").filter(Boolean);
|
|
64
|
+
let current = "/";
|
|
65
|
+
for (const seg of segments) {
|
|
66
|
+
let real = seg;
|
|
67
|
+
try {
|
|
68
|
+
const entries = await node_fs_1.promises.readdir(current);
|
|
69
|
+
const match = entries.find((name) => name.toLowerCase() === seg.toLowerCase());
|
|
70
|
+
if (match)
|
|
71
|
+
real = match;
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
// segment vanished; keep the given spelling
|
|
75
|
+
}
|
|
76
|
+
current = current === "/" ? `/${real}` : `${current}/${real}`;
|
|
77
|
+
}
|
|
78
|
+
this.canonicalCaseCache.set(input, current);
|
|
79
|
+
return current;
|
|
80
|
+
}
|
|
81
|
+
async getRawRepositoryInfo(absolutePath) {
|
|
82
|
+
// Canonicalize the input: strip trailing slashes and collapse redundant
|
|
83
|
+
// separators (e.g. a tool that reads a directory as "/repo/" vs "/repo").
|
|
84
|
+
// findGitRoot returns its input verbatim when it IS the git root, so an
|
|
85
|
+
// uncanonical input would surface the same repo under two distinct root
|
|
86
|
+
// strings and duplicate it in the session's repo list. NOTE: use resolve,
|
|
87
|
+
// not normalize — path.normalize preserves trailing slashes.
|
|
88
|
+
const target = (0, node_path_1.resolve)(absolutePath);
|
|
89
|
+
// Fast path: prefix-match against known roots (zero I/O).
|
|
90
|
+
// Match on a path boundary so sibling dirs (/repo vs /repo2) don't collide.
|
|
91
|
+
let bestMatch = null;
|
|
92
|
+
let bestLen = 0;
|
|
93
|
+
for (const [root, info] of this.knownRoots) {
|
|
94
|
+
const rootCanon = (0, node_path_1.resolve)(root);
|
|
95
|
+
if ((target === rootCanon || target.startsWith(`${rootCanon}/`)) && rootCanon.length > bestLen) {
|
|
96
|
+
bestMatch = info;
|
|
97
|
+
bestLen = rootCanon.length;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (bestMatch)
|
|
101
|
+
return bestMatch;
|
|
102
|
+
const gitRoot = await this.findGitRoot(target);
|
|
103
|
+
if (!gitRoot)
|
|
104
|
+
return null;
|
|
105
|
+
// Pin the root to its on-disk casing so a case-variant spelling of the same
|
|
106
|
+
// directory never surfaces as a second repo (see canonicalizeCase).
|
|
107
|
+
const canonicalRoot = await this.canonicalizeCase(gitRoot);
|
|
108
|
+
const remoteUrl = gitCommand(canonicalRoot, "remote get-url origin");
|
|
109
|
+
const branch = gitCommand(canonicalRoot, "rev-parse --abbrev-ref HEAD");
|
|
110
|
+
const headCommit = gitCommand(canonicalRoot, "rev-parse HEAD");
|
|
111
|
+
let owner;
|
|
112
|
+
let repo;
|
|
113
|
+
if (remoteUrl) {
|
|
114
|
+
const identity = githubIdentityFromRemoteUrl(remoteUrl);
|
|
115
|
+
if (identity) {
|
|
116
|
+
owner = identity.owner;
|
|
117
|
+
repo = identity.name;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (!repo) {
|
|
121
|
+
const parts = canonicalRoot.replace(/\/+$/, "").split("/");
|
|
122
|
+
repo = parts[parts.length - 1] ?? undefined;
|
|
123
|
+
}
|
|
124
|
+
const info = {
|
|
125
|
+
root: canonicalRoot,
|
|
126
|
+
remoteUrl,
|
|
127
|
+
owner,
|
|
128
|
+
repo,
|
|
129
|
+
branch,
|
|
130
|
+
headCommit,
|
|
131
|
+
};
|
|
132
|
+
if (!this.knownRoots.has(canonicalRoot)) {
|
|
133
|
+
this.knownRoots.set(canonicalRoot, info);
|
|
134
|
+
this.newlyDiscovered.push(info);
|
|
135
|
+
}
|
|
136
|
+
return info;
|
|
137
|
+
}
|
|
138
|
+
async findGitRoot(dir) {
|
|
139
|
+
const cached = this.gitRootCache.get(dir);
|
|
140
|
+
if (cached !== undefined)
|
|
141
|
+
return cached;
|
|
142
|
+
try {
|
|
143
|
+
const s = await node_fs_1.promises.stat((0, node_path_1.resolve)(dir, ".git"));
|
|
144
|
+
if (s.isDirectory() || s.isFile()) {
|
|
145
|
+
this.gitRootCache.set(dir, dir);
|
|
146
|
+
return dir;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
// not a git root; walk up
|
|
151
|
+
}
|
|
152
|
+
const parent = (0, node_path_1.dirname)(dir);
|
|
153
|
+
if (parent === dir || parent.length >= dir.length) {
|
|
154
|
+
this.gitRootCache.set(dir, null);
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
const result = await this.findGitRoot(parent);
|
|
158
|
+
this.gitRootCache.set(dir, result);
|
|
159
|
+
return result;
|
|
160
|
+
}
|
|
161
|
+
getSystemInfo() {
|
|
162
|
+
return {
|
|
163
|
+
homeDir: this.homeDir,
|
|
164
|
+
pathSeparator: "/",
|
|
165
|
+
platform: process.platform,
|
|
166
|
+
machineId: "",
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
resolvePath(relativePath, workingDirectory) {
|
|
170
|
+
return (0, node_path_1.resolve)(workingDirectory, relativePath);
|
|
171
|
+
}
|
|
172
|
+
isAbsolutePath(path) {
|
|
173
|
+
return (0, node_path_1.isAbsolute)(path);
|
|
174
|
+
}
|
|
175
|
+
getRelativePath(fromPath, toPath) {
|
|
176
|
+
return (0, node_path_1.relative)(fromPath, toPath);
|
|
177
|
+
}
|
|
178
|
+
isAvailable() {
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
exports.NodePathNormalizationAdapter = NodePathNormalizationAdapter;
|
|
183
|
+
//# sourceMappingURL=node-path-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-path-adapter.js","sourceRoot":"","sources":["../../src/opencode/node-path-adapter.ts"],"names":[],"mappings":";;;;;;AAAA,2DAA+C;AAC/C,qCAAyC;AACzC,yCAA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AAC,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE;YACjD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACjC,OAAO,IAAI,CAAC;SACb;QACD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACnC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,aAAa;QACX,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,aAAa,EAAE,GAAG;YAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,SAAS,EAAE,EAAE;SACd,CAAC;IACJ,CAAC;IAED,WAAW,CAAC,YAAoB,EAAE,gBAAwB;QACxD,OAAO,IAAA,mBAAO,EAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACjD,CAAC;IAED,cAAc,CAAC,IAAY;QACzB,OAAO,IAAA,sBAAc,EAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,eAAe,CAAC,QAAgB,EAAE,MAAc;QAC9C,OAAO,IAAA,oBAAQ,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAvJD,oEAuJC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type RepoNormalizedUniversalAgentSessionEvent, type RepositoryInfo, type UniversalAgentSessionEvent } from "@principal-ai/agent-monitoring";
|
|
2
|
+
import { NodePathNormalizationAdapter } from "./node-path-adapter";
|
|
3
|
+
export { NodePathNormalizationAdapter };
|
|
4
|
+
/**
|
|
5
|
+
* Pure, agent-agnostic session pipeline shared by CLI and trail-viewer.
|
|
6
|
+
*
|
|
7
|
+
* This module intentionally imports NO better-sqlite3 / OpenCodeEventStore so
|
|
8
|
+
* it can be loaded in any runtime (the trail-viewer runs under Bun, where
|
|
9
|
+
* better-sqlite3's native NAPI binding crashes). Runtime-specific DB access
|
|
10
|
+
* feeds this pipeline; everything after the raw rows are in is shared.
|
|
11
|
+
*/
|
|
12
|
+
/** A raw opencode event DB row, before JSON decoding of its `data` payload. */
|
|
13
|
+
export interface OpenCodeEventRow {
|
|
14
|
+
id: string;
|
|
15
|
+
aggregateId: string;
|
|
16
|
+
seq: number;
|
|
17
|
+
type: string;
|
|
18
|
+
data: string | Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Convert raw opencode event rows into universal events. Handles both string
|
|
22
|
+
* (SQLite TEXT, unparsed) and already-parsed object `data` payloads.
|
|
23
|
+
*/
|
|
24
|
+
export declare function opencodeRowsToUniversalEvents(rows: OpenCodeEventRow[]): UniversalAgentSessionEvent[];
|
|
25
|
+
/** Normalize raw universal events into repo-normalized universal events. */
|
|
26
|
+
export declare function normalizeEvents(events: UniversalAgentSessionEvent[], workingDirectory?: string, knownRoots?: Map<string, RepositoryInfo>): Promise<RepoNormalizedUniversalAgentSessionEvent[]>;
|
|
27
|
+
/**
|
|
28
|
+
* Like `normalizeEvents`, but also returns the adapter so callers can inspect
|
|
29
|
+
* `adapter.newlyDiscovered` for auto-registration of newly found git roots.
|
|
30
|
+
*/
|
|
31
|
+
export declare function normalizeEventsWithAdapter(events: UniversalAgentSessionEvent[], workingDirectory?: string, knownRoots?: Map<string, RepositoryInfo>): Promise<{
|
|
32
|
+
normalized: RepoNormalizedUniversalAgentSessionEvent[];
|
|
33
|
+
adapter: NodePathNormalizationAdapter;
|
|
34
|
+
}>;
|
|
35
|
+
/** Compute the accumulated agent-session event rows for a normalized session. */
|
|
36
|
+
export declare function accumulateEvents(normalizedEvents: RepoNormalizedUniversalAgentSessionEvent[], sessionTitle?: string): Array<{
|
|
37
|
+
normalized: RepoNormalizedUniversalAgentSessionEvent;
|
|
38
|
+
accumulated: unknown;
|
|
39
|
+
}>;
|
|
40
|
+
/** Collect the distinct repositories referenced across a normalized session. */
|
|
41
|
+
export declare function collectRepositories(normalizedEvents: RepoNormalizedUniversalAgentSessionEvent[]): RepositoryInfo[];
|
|
42
|
+
//# sourceMappingURL=pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/opencode/pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,wCAAwC,EAC7C,KAAK,cAAc,EACnB,KAAK,0BAA0B,EAChC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAE,4BAA4B,EAAE,CAAC;AAExC;;;;;;;GAOG;AAEH,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,gBAAgB,EAAE,GACvB,0BAA0B,EAAE,CAmB9B;AAED,4EAA4E;AAC5E,wBAAsB,eAAe,CACnC,MAAM,EAAE,0BAA0B,EAAE,EACpC,gBAAgB,SAAK,EACrB,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,GACvC,OAAO,CAAC,wCAAwC,EAAE,CAAC,CAGrD;AAED;;;GAGG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,0BAA0B,EAAE,EACpC,gBAAgB,SAAK,EACrB,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,GACvC,OAAO,CAAC;IAAE,UAAU,EAAE,wCAAwC,EAAE,CAAC;IAAC,OAAO,EAAE,4BAA4B,CAAA;CAA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