@principal-ai/subsystems-core 0.43.0 → 0.44.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/package.json +1 -1
- package/schemas/subsystem-model.schema.json +15 -15
- package/src/storage/topicStore.test.ts +0 -19
- package/src/storage/topicStore.ts +11 -63
- package/src/types/subsystem-model.ts +23 -23
- package/src/validation.test.ts +10 -10
- package/src/validation.ts +15 -15
- package/dist/agent-sessions/fixture.d.ts +0 -80
- package/dist/agent-sessions/fixture.d.ts.map +0 -1
- package/dist/agent-sessions/fixture.js +0 -130
- package/dist/agent-sessions/fixture.js.map +0 -1
- package/dist/agent-sessions/index.d.ts +0 -3
- package/dist/agent-sessions/index.d.ts.map +0 -1
- package/dist/agent-sessions/index.js +0 -6
- package/dist/agent-sessions/index.js.map +0 -1
- package/dist/index.d.ts +0 -16
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -36
- package/dist/index.js.map +0 -1
- package/dist/node.d.ts +0 -22
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -55
- package/dist/node.js.map +0 -1
- package/dist/opencode/OpenCodeEventStore.d.ts +0 -25
- package/dist/opencode/OpenCodeEventStore.d.ts.map +0 -1
- package/dist/opencode/OpenCodeEventStore.js +0 -182
- package/dist/opencode/OpenCodeEventStore.js.map +0 -1
- package/dist/opencode/agent-sessions.d.ts +0 -46
- package/dist/opencode/agent-sessions.d.ts.map +0 -1
- package/dist/opencode/agent-sessions.js +0 -302
- package/dist/opencode/agent-sessions.js.map +0 -1
- package/dist/opencode/index.d.ts +0 -6
- package/dist/opencode/index.d.ts.map +0 -1
- package/dist/opencode/index.js +0 -15
- package/dist/opencode/index.js.map +0 -1
- package/dist/opencode/node-path-adapter.d.ts +0 -25
- package/dist/opencode/node-path-adapter.d.ts.map +0 -1
- package/dist/opencode/node-path-adapter.js +0 -188
- package/dist/opencode/node-path-adapter.js.map +0 -1
- package/dist/opencode/pipeline.d.ts +0 -42
- package/dist/opencode/pipeline.d.ts.map +0 -1
- package/dist/opencode/pipeline.js +0 -90
- package/dist/opencode/pipeline.js.map +0 -1
- package/dist/opencode/types.d.ts +0 -39
- package/dist/opencode/types.d.ts.map +0 -1
- package/dist/opencode/types.js +0 -3
- package/dist/opencode/types.js.map +0 -1
- package/dist/storage/topic-types.d.ts +0 -203
- package/dist/storage/topic-types.d.ts.map +0 -1
- package/dist/storage/topic-types.js +0 -60
- package/dist/storage/topic-types.js.map +0 -1
- package/dist/storage/topicStore.d.ts +0 -135
- package/dist/storage/topicStore.d.ts.map +0 -1
- package/dist/storage/topicStore.js +0 -389
- package/dist/storage/topicStore.js.map +0 -1
- package/dist/types/index.d.ts +0 -7
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -23
- package/dist/types/index.js.map +0 -1
- package/dist/types/subsystem-model.d.ts +0 -388
- package/dist/types/subsystem-model.d.ts.map +0 -1
- package/dist/types/subsystem-model.js +0 -87
- package/dist/types/subsystem-model.js.map +0 -1
- package/dist/validation.d.ts +0 -24
- package/dist/validation.d.ts.map +0 -1
- package/dist/validation.js +0 -112
- package/dist/validation.js.map +0 -1
|
@@ -1,130 +0,0 @@
|
|
|
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.buildAgentSessionFixture = void 0;
|
|
7
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
-
const agent_monitoring_1 = require("@principal-ai/agent-monitoring");
|
|
9
|
-
function repoLabel(nf) {
|
|
10
|
-
if (nf.repository?.repo)
|
|
11
|
-
return nf.repository.repo;
|
|
12
|
-
if (nf.repository?.gitRoot)
|
|
13
|
-
return node_path_1.default.basename(nf.repository.gitRoot);
|
|
14
|
-
return "";
|
|
15
|
-
}
|
|
16
|
-
function repoRoot(nf) {
|
|
17
|
-
return nf.repository?.gitRoot ?? "";
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Extract a model id from a model value — agents set it inconsistently
|
|
21
|
-
* (opencode stores `{ providerID, modelID }`-shaped objects, cline / grok /
|
|
22
|
-
* pi store a plain string id).
|
|
23
|
-
*/
|
|
24
|
-
function modelIdOf(value) {
|
|
25
|
-
if (typeof value === "string" && value.length > 0)
|
|
26
|
-
return value;
|
|
27
|
-
if (value && typeof value === "object") {
|
|
28
|
-
const o = value;
|
|
29
|
-
for (const key of ["modelID", "id"]) {
|
|
30
|
-
if (typeof o[key] === "string" && o[key].length > 0) {
|
|
31
|
-
return o[key];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return undefined;
|
|
36
|
-
}
|
|
37
|
-
/** Pull the model id from one event — normalized `data.model` first, then the
|
|
38
|
-
* raw opencode `info` blob (the bridge only copies `info.model` onto
|
|
39
|
-
* normalized events when the session's created event carried it). */
|
|
40
|
-
function eventModelId(e) {
|
|
41
|
-
const direct = modelIdOf(e.data?.["model"]);
|
|
42
|
-
if (direct)
|
|
43
|
-
return direct;
|
|
44
|
-
const raw = e.raw;
|
|
45
|
-
return modelIdOf(raw?.data?.info?.model);
|
|
46
|
-
}
|
|
47
|
-
/** Distinct model ids across a session's events, in first-seen order. */
|
|
48
|
-
function collectModels(events) {
|
|
49
|
-
const seen = new Set();
|
|
50
|
-
const models = [];
|
|
51
|
-
for (const e of events) {
|
|
52
|
-
const id = eventModelId(e);
|
|
53
|
-
if (id && !seen.has(id)) {
|
|
54
|
-
seen.add(id);
|
|
55
|
-
models.push(id);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return models;
|
|
59
|
-
}
|
|
60
|
-
function buildAgentSessionFixture(options) {
|
|
61
|
-
const { agent, sessionId, sessionMeta, normalizedEvents, rawEventCount } = options;
|
|
62
|
-
const sessionName = sessionMeta.sessionName || "opencode";
|
|
63
|
-
const agentEvents = (0, agent_monitoring_1.accumulateToAgentSessionEvents)(normalizedEvents, sessionName);
|
|
64
|
-
// Rewrite layer item paths (repo-relative displayPath) back to absolute
|
|
65
|
-
// paths. Layer snapshots reflect accumulated state across events, so build a
|
|
66
|
-
// global displayPath -> absolutePath map from every event's files/dependencies.
|
|
67
|
-
const repoBreakdown = new Map();
|
|
68
|
-
const displayToAbs = new Map();
|
|
69
|
-
for (const e of agentEvents) {
|
|
70
|
-
for (const f of [...e.files, ...e.dependencies]) {
|
|
71
|
-
if (typeof f === "object" && f && "displayPath" in f) {
|
|
72
|
-
const nf = f;
|
|
73
|
-
if (nf.displayPath && !displayToAbs.has(nf.displayPath)) {
|
|
74
|
-
displayToAbs.set(nf.displayPath, nf.absolutePath);
|
|
75
|
-
}
|
|
76
|
-
const label = repoLabel(nf);
|
|
77
|
-
if (!repoBreakdown.has(label)) {
|
|
78
|
-
repoBreakdown.set(label, { root: repoRoot(nf), files: new Set(), edits: new Set() });
|
|
79
|
-
}
|
|
80
|
-
repoBreakdown.get(label).files.add(nf.absolutePath);
|
|
81
|
-
if (!repoBreakdown.get(label).root)
|
|
82
|
-
repoBreakdown.get(label).root = repoRoot(nf);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
const events = agentEvents.map((e) => {
|
|
87
|
-
const files = e.files.map((f) => typeof f === "string" ? f : f.absolutePath);
|
|
88
|
-
const dependencies = e.dependencies.map((f) => typeof f === "string" ? f : f.absolutePath);
|
|
89
|
-
if (e.operation === "editing") {
|
|
90
|
-
for (const f of files) {
|
|
91
|
-
const label = [...repoBreakdown.entries()].find(([, v]) => v.files.has(f))?.[0] ?? "";
|
|
92
|
-
if (!repoBreakdown.has(label)) {
|
|
93
|
-
repoBreakdown.set(label, { root: "", files: new Set(), edits: new Set() });
|
|
94
|
-
}
|
|
95
|
-
repoBreakdown.get(label).edits.add(f);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
const layers = e.layers.map((l) => ({
|
|
99
|
-
...l,
|
|
100
|
-
items: l.items.map((item) => {
|
|
101
|
-
const abs = item.path.startsWith("/") ? item.path : displayToAbs.get(item.path) ?? item.path;
|
|
102
|
-
return { ...item, path: abs };
|
|
103
|
-
}),
|
|
104
|
-
}));
|
|
105
|
-
return { ...e, files, dependencies, layers };
|
|
106
|
-
});
|
|
107
|
-
const session = {
|
|
108
|
-
sessionId,
|
|
109
|
-
agent,
|
|
110
|
-
sessionName,
|
|
111
|
-
sessionTask: sessionMeta.sessionTask,
|
|
112
|
-
workingDirectory: sessionMeta.workingDirectory,
|
|
113
|
-
rawEventCount: rawEventCount ?? normalizedEvents.length,
|
|
114
|
-
agentEventCount: events.length,
|
|
115
|
-
repos: [...repoBreakdown.entries()].map(([repo, v]) => ({
|
|
116
|
-
repo,
|
|
117
|
-
root: v.root,
|
|
118
|
-
files: v.files.size,
|
|
119
|
-
edits: v.edits.size,
|
|
120
|
-
})),
|
|
121
|
-
models: collectModels(normalizedEvents),
|
|
122
|
-
};
|
|
123
|
-
return {
|
|
124
|
-
generatedFrom: `${agent} session ${sessionId}`,
|
|
125
|
-
session,
|
|
126
|
-
events,
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
exports.buildAgentSessionFixture = buildAgentSessionFixture;
|
|
130
|
-
//# sourceMappingURL=fixture.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fixture.js","sourceRoot":"","sources":["../../src/agent-sessions/fixture.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA6B;AAC7B,qEAKwC;AAiFxC,SAAS,SAAS,CAAC,EAAwD;IACzE,IAAI,EAAE,CAAC,UAAU,EAAE,IAAI;QAAE,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;IACnD,IAAI,EAAE,CAAC,UAAU,EAAE,OAAO;QAAE,OAAO,mBAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACxE,OAAO,EAAE,C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tD,IAAI;YACJ,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI;YACnB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI;SACpB,CAAC,CAAC;QACH,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC;KACxC,CAAC;IAEF,OAAO;QACL,aAAa,EAAE,GAAG,KAAK,YAAY,SAAS,EAAE;QAC9C,OAAO;QACP,MAAM;KACP,CAAC;AACJ,CAAC;AArFD,4DAqFC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { buildAgentSessionFixture } from "./fixture";
|
|
2
|
-
export type { AgentSessionFixture, AgentSessionFixtureMeta, AgentSessionFixtureRepo, AgentSessionFixtureSummary, FixtureAgentSessionEvent, FixtureHighlightLayer, FixtureLayerItem, } from "./fixture";
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent-sessions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,WAAW,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildAgentSessionFixture = void 0;
|
|
4
|
-
var fixture_1 = require("./fixture");
|
|
5
|
-
Object.defineProperty(exports, "buildAgentSessionFixture", { enumerable: true, get: function () { return fixture_1.buildAgentSessionFixture; } });
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent-sessions/index.ts"],"names":[],"mappings":";;;AAAA,qCAAqD;AAA5C,mHAAA,wBAAwB,OAAA"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @principal-ai/subsystems-core
|
|
3
|
-
* Browser-safe exports (no Node.js dependencies)
|
|
4
|
-
*
|
|
5
|
-
* Subsystem model types and schema helpers.
|
|
6
|
-
*
|
|
7
|
-
* For Node.js agent-session / OpenCode tooling:
|
|
8
|
-
* import { ... } from '@principal-ai/subsystems-core/node'
|
|
9
|
-
*
|
|
10
|
-
* For Bun-safe session pipeline (no better-sqlite3):
|
|
11
|
-
* import { ... } from '@principal-ai/subsystems-core/pipeline'
|
|
12
|
-
*/
|
|
13
|
-
export * from './types';
|
|
14
|
-
export { validateSubsystemModelCrossField } from './validation';
|
|
15
|
-
export type { SubsystemValidationProblem } from './validation';
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,SAAS,CAAC;AAKxB,OAAO,EAAE,gCAAgC,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @principal-ai/subsystems-core
|
|
4
|
-
* Browser-safe exports (no Node.js dependencies)
|
|
5
|
-
*
|
|
6
|
-
* Subsystem model types and schema helpers.
|
|
7
|
-
*
|
|
8
|
-
* For Node.js agent-session / OpenCode tooling:
|
|
9
|
-
* import { ... } from '@principal-ai/subsystems-core/node'
|
|
10
|
-
*
|
|
11
|
-
* For Bun-safe session pipeline (no better-sqlite3):
|
|
12
|
-
* import { ... } from '@principal-ai/subsystems-core/pipeline'
|
|
13
|
-
*/
|
|
14
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
-
}
|
|
20
|
-
Object.defineProperty(o, k2, desc);
|
|
21
|
-
}) : (function(o, m, k, k2) {
|
|
22
|
-
if (k2 === undefined) k2 = k;
|
|
23
|
-
o[k2] = m[k];
|
|
24
|
-
}));
|
|
25
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.validateSubsystemModelCrossField = void 0;
|
|
30
|
-
__exportStar(require("./types"), exports);
|
|
31
|
-
// Cross-field validation (the rules the JSON Schema can't express). Structural
|
|
32
|
-
// (schema) validation is enforced per surface against
|
|
33
|
-
// `schemas/subsystem-model.schema.json`.
|
|
34
|
-
var validation_1 = require("./validation");
|
|
35
|
-
Object.defineProperty(exports, "validateSubsystemModelCrossField", { enumerable: true, get: function () { return validation_1.validateSubsystemModelCrossField; } });
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;AAEH,0CAAwB;AAExB,+EAA+E;AAC/E,sDAAsD;AACtD,yCAAyC;AACzC,2CAAgE;AAAvD,8HAAA,gCAAgC,OAAA"}
|
package/dist/node.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @principal-ai/subsystems-core/node
|
|
3
|
-
* Node.js-specific exports (require Node.js runtime)
|
|
4
|
-
*
|
|
5
|
-
* Agent sessions, OpenCode SQLite store, topic storage, and the shared
|
|
6
|
-
* session pipeline. Prefer `@principal-ai/subsystems-core/pipeline` in Bun
|
|
7
|
-
* (no better-sqlite3 native binding).
|
|
8
|
-
*/
|
|
9
|
-
export * from './types';
|
|
10
|
-
export { TopicStore, PRINCIPAL_DIR, TOPICS_DIR, LEGACY_TOPICS_BLOB, } from './storage/topicStore';
|
|
11
|
-
export type { TopicIndexEntry, TopicCreate, TopicUpdate, MigrationResult, } from './storage/topicStore';
|
|
12
|
-
export { publishedFromDraft } from './storage/topic-types';
|
|
13
|
-
export type { DraftTopic, PublishedTopic, PublishProjection, TopicStatus, TopicAsset, TopicCreator, } from './storage/topic-types';
|
|
14
|
-
export { OpenCodeEventStore, defaultOpenCodeDBPath } from './opencode/OpenCodeEventStore';
|
|
15
|
-
export type { OpenCodeRawEvent, OpenCodeSessionEvents, OpenCodeEventRetriever, OpenCodeStoreOptions, SessionSummary, SessionListResult, } from './opencode/types';
|
|
16
|
-
export { listAgentSessions, detectAgent, fetchRawEvents } from './opencode/agent-sessions';
|
|
17
|
-
export type { AgentSessionSummary, AgentSessionMeta, SupportedSessionAgent, } from './opencode/agent-sessions';
|
|
18
|
-
export { buildAgentSessionFixture } from './agent-sessions/fixture';
|
|
19
|
-
export type { AgentSessionFixture, AgentSessionFixtureMeta, AgentSessionFixtureRepo, AgentSessionFixtureSummary, FixtureAgentSessionEvent, FixtureHighlightLayer, FixtureLayerItem, } from './agent-sessions/fixture';
|
|
20
|
-
export { NodePathNormalizationAdapter, normalizeEvents, normalizeEventsWithAdapter, accumulateEvents, collectRepositories, opencodeRowsToUniversalEvents, } from './opencode/pipeline';
|
|
21
|
-
export type { OpenCodeEventRow } from './opencode/pipeline';
|
|
22
|
-
//# sourceMappingURL=node.d.ts.map
|
package/dist/node.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,SAAS,CAAC;AAGxB,OAAO,EACL,UAAU,EACV,aAAa,EACb,UAAU,EACV,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,eAAe,EACf,WAAW,EACX,WAAW,EACX,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EACV,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,YAAY,GACb,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC1F,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3F,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,4BAA4B,EAC5B,eAAe,EACf,0BAA0B,EAC1B,gBAAgB,EAChB,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/node.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @principal-ai/subsystems-core/node
|
|
4
|
-
* Node.js-specific exports (require Node.js runtime)
|
|
5
|
-
*
|
|
6
|
-
* Agent sessions, OpenCode SQLite store, topic storage, and the shared
|
|
7
|
-
* session pipeline. Prefer `@principal-ai/subsystems-core/pipeline` in Bun
|
|
8
|
-
* (no better-sqlite3 native binding).
|
|
9
|
-
*/
|
|
10
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
-
}
|
|
16
|
-
Object.defineProperty(o, k2, desc);
|
|
17
|
-
}) : (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
o[k2] = m[k];
|
|
20
|
-
}));
|
|
21
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.opencodeRowsToUniversalEvents = exports.collectRepositories = exports.accumulateEvents = exports.normalizeEventsWithAdapter = exports.normalizeEvents = exports.NodePathNormalizationAdapter = exports.buildAgentSessionFixture = exports.fetchRawEvents = exports.detectAgent = exports.listAgentSessions = exports.defaultOpenCodeDBPath = exports.OpenCodeEventStore = exports.publishedFromDraft = exports.LEGACY_TOPICS_BLOB = exports.TOPICS_DIR = exports.PRINCIPAL_DIR = exports.TopicStore = void 0;
|
|
26
|
-
__exportStar(require("./types"), exports);
|
|
27
|
-
// File-per-topic store (~/.principal/topics) — node:fs only
|
|
28
|
-
var topicStore_1 = require("./storage/topicStore");
|
|
29
|
-
Object.defineProperty(exports, "TopicStore", { enumerable: true, get: function () { return topicStore_1.TopicStore; } });
|
|
30
|
-
Object.defineProperty(exports, "PRINCIPAL_DIR", { enumerable: true, get: function () { return topicStore_1.PRINCIPAL_DIR; } });
|
|
31
|
-
Object.defineProperty(exports, "TOPICS_DIR", { enumerable: true, get: function () { return topicStore_1.TOPICS_DIR; } });
|
|
32
|
-
Object.defineProperty(exports, "LEGACY_TOPICS_BLOB", { enumerable: true, get: function () { return topicStore_1.LEGACY_TOPICS_BLOB; } });
|
|
33
|
-
var topic_types_1 = require("./storage/topic-types");
|
|
34
|
-
Object.defineProperty(exports, "publishedFromDraft", { enumerable: true, get: function () { return topic_types_1.publishedFromDraft; } });
|
|
35
|
-
// OpenCode event retrieval (Node.js only - SQLite)
|
|
36
|
-
var OpenCodeEventStore_1 = require("./opencode/OpenCodeEventStore");
|
|
37
|
-
Object.defineProperty(exports, "OpenCodeEventStore", { enumerable: true, get: function () { return OpenCodeEventStore_1.OpenCodeEventStore; } });
|
|
38
|
-
Object.defineProperty(exports, "defaultOpenCodeDBPath", { enumerable: true, get: function () { return OpenCodeEventStore_1.defaultOpenCodeDBPath; } });
|
|
39
|
-
// Shared, agent-agnostic session listing / fetch / normalization
|
|
40
|
-
var agent_sessions_1 = require("./opencode/agent-sessions");
|
|
41
|
-
Object.defineProperty(exports, "listAgentSessions", { enumerable: true, get: function () { return agent_sessions_1.listAgentSessions; } });
|
|
42
|
-
Object.defineProperty(exports, "detectAgent", { enumerable: true, get: function () { return agent_sessions_1.detectAgent; } });
|
|
43
|
-
Object.defineProperty(exports, "fetchRawEvents", { enumerable: true, get: function () { return agent_sessions_1.fetchRawEvents; } });
|
|
44
|
-
// Frozen-fixture generator (Node.js — git walk-up)
|
|
45
|
-
var fixture_1 = require("./agent-sessions/fixture");
|
|
46
|
-
Object.defineProperty(exports, "buildAgentSessionFixture", { enumerable: true, get: function () { return fixture_1.buildAgentSessionFixture; } });
|
|
47
|
-
// Pure session pipeline (also available via /pipeline without sqlite)
|
|
48
|
-
var pipeline_1 = require("./opencode/pipeline");
|
|
49
|
-
Object.defineProperty(exports, "NodePathNormalizationAdapter", { enumerable: true, get: function () { return pipeline_1.NodePathNormalizationAdapter; } });
|
|
50
|
-
Object.defineProperty(exports, "normalizeEvents", { enumerable: true, get: function () { return pipeline_1.normalizeEvents; } });
|
|
51
|
-
Object.defineProperty(exports, "normalizeEventsWithAdapter", { enumerable: true, get: function () { return pipeline_1.normalizeEventsWithAdapter; } });
|
|
52
|
-
Object.defineProperty(exports, "accumulateEvents", { enumerable: true, get: function () { return pipeline_1.accumulateEvents; } });
|
|
53
|
-
Object.defineProperty(exports, "collectRepositories", { enumerable: true, get: function () { return pipeline_1.collectRepositories; } });
|
|
54
|
-
Object.defineProperty(exports, "opencodeRowsToUniversalEvents", { enumerable: true, get: function () { return pipeline_1.opencodeRowsToUniversalEvents; } });
|
|
55
|
-
//# sourceMappingURL=node.js.map
|
package/dist/node.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;AAEH,0CAAwB;AAExB,4DAA4D;AAC5D,mDAK8B;AAJ5B,wGAAA,UAAU,OAAA;AACV,2GAAA,aAAa,OAAA;AACb,wGAAA,UAAU,OAAA;AACV,gHAAA,kBAAkB,OAAA;AAQpB,qDAA2D;AAAlD,iHAAA,kBAAkB,OAAA;AAU3B,mDAAmD;AACnD,oEAA0F;AAAjF,wHAAA,kBAAkB,OAAA;AAAE,2HAAA,qBAAqB,OAAA;AAUlD,iEAAiE;AACjE,4DAA2F;AAAlF,mHAAA,iBAAiB,OAAA;AAAE,6GAAA,WAAW,OAAA;AAAE,gHAAA,cAAc,OAAA;AAOvD,mDAAmD;AACnD,oDAAoE;AAA3D,mHAAA,wBAAwB,OAAA;AAWjC,sEAAsE;AACtE,gDAO6B;AAN3B,wHAAA,4BAA4B,OAAA;AAC5B,2GAAA,eAAe,OAAA;AACf,sHAAA,0BAA0B,OAAA;AAC1B,4GAAA,gBAAgB,OAAA;AAChB,+GAAA,mBAAmB,OAAA;AACnB,yHAAA,6BAA6B,OAAA"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { OpenCodeSessionEvents, OpenCodeEventRetriever, OpenCodeStoreOptions, SessionListResult } from "./types";
|
|
2
|
-
export declare function defaultOpenCodeDBPath(): string;
|
|
3
|
-
export declare class OpenCodeEventStore implements OpenCodeEventRetriever {
|
|
4
|
-
private db;
|
|
5
|
-
constructor(options?: OpenCodeStoreOptions);
|
|
6
|
-
getSessionMeta(sessionId: string): {
|
|
7
|
-
slug: string;
|
|
8
|
-
title: string;
|
|
9
|
-
directory: string;
|
|
10
|
-
};
|
|
11
|
-
readAggregate(sessionId: string, options?: {
|
|
12
|
-
after?: number;
|
|
13
|
-
limit?: number;
|
|
14
|
-
}): OpenCodeSessionEvents;
|
|
15
|
-
listSessionIds(limit?: number): string[];
|
|
16
|
-
listSessionsWithSummaries(limit?: number): SessionListResult;
|
|
17
|
-
/**
|
|
18
|
-
* opencode stores a placeholder title ("New session - <iso timestamp>") on
|
|
19
|
-
* sessions it never generated a title for. Surface the first real user prompt
|
|
20
|
-
* text instead so lists read as actual tasks.
|
|
21
|
-
*/
|
|
22
|
-
firstUserPromptText(aggregateId: string): string;
|
|
23
|
-
close(): void;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=OpenCodeEventStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenCodeEventStore.d.ts","sourceRoot":"","sources":["../../src/opencode/OpenCodeEventStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EAEpB,iBAAiB,EAClB,MAAM,SAAS,CAAA;AAEhB,wBAAgB,qBAAqB,IAAI,MAAM,CAK9C;AAED,qBAAa,kBAAmB,YAAW,sBAAsB;IAC/D,OAAO,CAAC,EAAE,CAAmB;gBAEjB,OAAO,CAAC,EAAE,oBAAoB;IAK1C,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG;QACjC,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,EAAE,MAAM,CAAA;QACb,SAAS,EAAE,MAAM,CAAA;KAClB;IAkBD,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAC3C,qBAAqB;IAgCxB,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE;IAOxC,yBAAyB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,iBAAiB;IA2F5D;;;;OAIG;IACH,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAyBhD,KAAK,IAAI,IAAI;CAGd"}
|
|
@@ -1,182 +0,0 @@
|
|
|
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.OpenCodeEventStore = exports.defaultOpenCodeDBPath = void 0;
|
|
7
|
-
const better_sqlite3_1 = __importDefault(require("better-sqlite3"));
|
|
8
|
-
function defaultOpenCodeDBPath() {
|
|
9
|
-
if (process.env.OPENCODE_DATA_DIR)
|
|
10
|
-
return `${process.env.OPENCODE_DATA_DIR}/opencode/opencode.db`;
|
|
11
|
-
const home = process.env.HOME || process.env.USERPROFILE || "/root";
|
|
12
|
-
const xdgData = process.env.XDG_DATA_HOME || `${home}/.local/share`;
|
|
13
|
-
return `${xdgData}/opencode/opencode.db`;
|
|
14
|
-
}
|
|
15
|
-
exports.defaultOpenCodeDBPath = defaultOpenCodeDBPath;
|
|
16
|
-
class OpenCodeEventStore {
|
|
17
|
-
constructor(options) {
|
|
18
|
-
const path = options?.dbPath ?? defaultOpenCodeDBPath();
|
|
19
|
-
this.db = new better_sqlite3_1.default(path, { readonly: true });
|
|
20
|
-
}
|
|
21
|
-
getSessionMeta(sessionId) {
|
|
22
|
-
try {
|
|
23
|
-
const row = this.db
|
|
24
|
-
.prepare("SELECT slug, title, directory FROM session WHERE id = ?")
|
|
25
|
-
.get(sessionId);
|
|
26
|
-
if (row) {
|
|
27
|
-
return {
|
|
28
|
-
slug: row.slug ?? "",
|
|
29
|
-
title: row.title ?? "",
|
|
30
|
-
directory: row.directory ?? "",
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
// session table may not exist in older DBs; fall through
|
|
36
|
-
}
|
|
37
|
-
return { slug: "", title: "", directory: "" };
|
|
38
|
-
}
|
|
39
|
-
readAggregate(sessionId, options) {
|
|
40
|
-
const after = options?.after ?? -1;
|
|
41
|
-
const limit = options?.limit ?? 1000;
|
|
42
|
-
const rows = this.db
|
|
43
|
-
.prepare("SELECT id, aggregate_id, seq, type, data FROM event WHERE aggregate_id = ? AND seq > ? ORDER BY seq ASC LIMIT ?")
|
|
44
|
-
.all(sessionId, after, limit + 1);
|
|
45
|
-
const page = rows.slice(0, limit);
|
|
46
|
-
const events = page.map((row) => ({
|
|
47
|
-
id: row.id,
|
|
48
|
-
aggregateId: row.aggregate_id,
|
|
49
|
-
seq: row.seq,
|
|
50
|
-
type: row.type,
|
|
51
|
-
data: typeof row.data === "string" ? JSON.parse(row.data) : row.data,
|
|
52
|
-
}));
|
|
53
|
-
return {
|
|
54
|
-
sessionId,
|
|
55
|
-
events,
|
|
56
|
-
hasMore: rows.length > limit,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
listSessionIds(limit) {
|
|
60
|
-
const rows = this.db
|
|
61
|
-
.prepare("SELECT DISTINCT aggregate_id FROM event ORDER BY aggregate_id LIMIT ?")
|
|
62
|
-
.all(limit ?? 50);
|
|
63
|
-
return rows.map((r) => r.aggregate_id);
|
|
64
|
-
}
|
|
65
|
-
listSessionsWithSummaries(limit) {
|
|
66
|
-
const effectiveLimit = limit ?? 50;
|
|
67
|
-
const firstEvents = this.db
|
|
68
|
-
.prepare(`SELECT e.aggregate_id, e.data,
|
|
69
|
-
(SELECT COUNT(*) FROM event WHERE aggregate_id = e.aggregate_id) AS event_count,
|
|
70
|
-
(SELECT MAX(json_extract(e2.data, '$.info.time.created')) FROM event e2 WHERE e2.aggregate_id = e.aggregate_id) AS last_created
|
|
71
|
-
FROM event e
|
|
72
|
-
WHERE e.seq = (SELECT MIN(e2.seq) FROM event e2 WHERE e2.aggregate_id = e.aggregate_id)
|
|
73
|
-
ORDER BY COALESCE(json_extract(e.data, '$.info.time.created'), 0) DESC
|
|
74
|
-
LIMIT ?`)
|
|
75
|
-
.all(effectiveLimit);
|
|
76
|
-
const idToSummary = new Map();
|
|
77
|
-
for (const row of firstEvents) {
|
|
78
|
-
let title = row.aggregate_id.slice(0, 12);
|
|
79
|
-
let slug = "";
|
|
80
|
-
let createdAt = "";
|
|
81
|
-
let durationMs = 0;
|
|
82
|
-
try {
|
|
83
|
-
const parsed = JSON.parse(row.data);
|
|
84
|
-
const info = parsed["info"];
|
|
85
|
-
const rawTitle = info?.["title"];
|
|
86
|
-
if (typeof rawTitle === "string") {
|
|
87
|
-
title = rawTitle;
|
|
88
|
-
}
|
|
89
|
-
const rawSlug = info?.["slug"];
|
|
90
|
-
if (typeof rawSlug === "string") {
|
|
91
|
-
slug = rawSlug;
|
|
92
|
-
}
|
|
93
|
-
const rawTime = info?.["time"];
|
|
94
|
-
const rawCreated = rawTime?.["created"];
|
|
95
|
-
if (typeof rawCreated === "number") {
|
|
96
|
-
createdAt = new Date(rawCreated).toISOString();
|
|
97
|
-
if (typeof row.last_created === "number") {
|
|
98
|
-
durationMs = row.last_created - rawCreated;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
catch {
|
|
103
|
-
// best-effort parse
|
|
104
|
-
}
|
|
105
|
-
if (title.startsWith("New session")) {
|
|
106
|
-
const promptText = this.firstUserPromptText(row.aggregate_id);
|
|
107
|
-
if (promptText)
|
|
108
|
-
title = promptText;
|
|
109
|
-
}
|
|
110
|
-
idToSummary.set(row.aggregate_id, { id: row.aggregate_id, title, slug, createdAt, durationMs, eventCount: row.event_count, isFinished: false, children: [] });
|
|
111
|
-
}
|
|
112
|
-
const relations = this.db
|
|
113
|
-
.prepare(`SELECT DISTINCT
|
|
114
|
-
json_extract(data, '$.part.state.metadata.parentSessionId') AS parent_id,
|
|
115
|
-
json_extract(data, '$.part.state.metadata.sessionId') AS child_id,
|
|
116
|
-
json_extract(data, '$.part.state.status') AS status
|
|
117
|
-
FROM event
|
|
118
|
-
WHERE json_extract(data, '$.part.type') = 'tool'
|
|
119
|
-
AND json_extract(data, '$.part.tool') = 'task'
|
|
120
|
-
AND json_extract(data, '$.part.state.metadata.sessionId') IS NOT NULL`)
|
|
121
|
-
.all();
|
|
122
|
-
const childIds = new Set();
|
|
123
|
-
for (const rel of relations) {
|
|
124
|
-
if (!rel.parent_id || !rel.child_id)
|
|
125
|
-
continue;
|
|
126
|
-
const child = idToSummary.get(rel.child_id);
|
|
127
|
-
if (child && (rel.status === "completed" || rel.status === "error")) {
|
|
128
|
-
child.isFinished = true;
|
|
129
|
-
}
|
|
130
|
-
childIds.add(rel.child_id);
|
|
131
|
-
const parent = idToSummary.get(rel.parent_id);
|
|
132
|
-
if (parent && child) {
|
|
133
|
-
parent.children.push(child);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
const groups = [];
|
|
137
|
-
const standalone = [];
|
|
138
|
-
for (const summary of idToSummary.values()) {
|
|
139
|
-
if (childIds.has(summary.id))
|
|
140
|
-
continue;
|
|
141
|
-
if (summary.children.length > 0) {
|
|
142
|
-
groups.push({ parent: { ...summary, children: [] }, children: summary.children });
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
standalone.push(summary);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return { groups, standalone };
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* opencode stores a placeholder title ("New session - <iso timestamp>") on
|
|
152
|
-
* sessions it never generated a title for. Surface the first real user prompt
|
|
153
|
-
* text instead so lists read as actual tasks.
|
|
154
|
-
*/
|
|
155
|
-
firstUserPromptText(aggregateId) {
|
|
156
|
-
const userMsg = this.db
|
|
157
|
-
.prepare(`SELECT json_extract(data, '$.info.id') AS id
|
|
158
|
-
FROM event
|
|
159
|
-
WHERE aggregate_id = ? AND type = 'message.updated.1'
|
|
160
|
-
AND json_extract(data, '$.info.role') = 'user'
|
|
161
|
-
ORDER BY seq ASC LIMIT 1`)
|
|
162
|
-
.get(aggregateId);
|
|
163
|
-
if (!userMsg?.id)
|
|
164
|
-
return "";
|
|
165
|
-
const part = this.db
|
|
166
|
-
.prepare(`SELECT json_extract(data, '$.part.text') AS text
|
|
167
|
-
FROM event
|
|
168
|
-
WHERE aggregate_id = ? AND type = 'message.part.updated.1'
|
|
169
|
-
AND json_extract(data, '$.part.messageID') = ?
|
|
170
|
-
AND json_extract(data, '$.part.type') = 'text'
|
|
171
|
-
ORDER BY seq ASC LIMIT 1`)
|
|
172
|
-
.get(aggregateId, userMsg.id);
|
|
173
|
-
if (typeof part?.text !== "string" || part.text === "")
|
|
174
|
-
return "";
|
|
175
|
-
return part.text.replace(/\s+/g, " ").trim();
|
|
176
|
-
}
|
|
177
|
-
close() {
|
|
178
|
-
this.db.close();
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
exports.OpenCodeEventStore = OpenCodeEventStore;
|
|
182
|
-
//# sourceMappingURL=OpenCodeEventStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenCodeEventStore.js","sourceRoot":"","sources":["../../src/opencode/OpenCodeEventStore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
|
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, Grok, and Codex, normalizing raw events into repo-aware universal events.
|
|
7
|
-
*
|
|
8
|
-
* This is the single source of truth for CLI and principal-studio 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" | "codex" | "cursor" | "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" | "codex" | "cursor";
|
|
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" | "codex" | "cursor" | "opencode" | "pi" | "grok";
|
|
40
|
-
dbPath?: string;
|
|
41
|
-
}): {
|
|
42
|
-
agent: "cline" | "codex" | "cursor" | "opencode" | "pi" | "grok";
|
|
43
|
-
events: UniversalAgentSessionEvent[];
|
|
44
|
-
sessionMeta: AgentSessionMeta;
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=agent-sessions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-sessions.d.ts","sourceRoot":"","sources":["../../src/opencode/agent-sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,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,gBAAgB,EAChB,mBAAmB,GACpB,CAAC;AAEF;;;;;;;;GAQG;AAEH,MAAM,MAAM,qBAAqB,GAC7B,OAAO,GACP,OAAO,GACP,QAAQ,GACR,UAAU,GACV,IAAI,GACJ,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,qBAAqB,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsJD,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAC/B,OA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