dot-agents 0.6.0 → 0.7.5
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/cli/commands/channel.d.ts.map +1 -1
- package/dist/cli/commands/channel.js +70 -2
- package/dist/cli/commands/channel.js.map +1 -1
- package/dist/daemon/api/channels.d.ts +6 -0
- package/dist/daemon/api/channels.d.ts.map +1 -0
- package/dist/daemon/api/channels.js +143 -0
- package/dist/daemon/api/channels.js.map +1 -0
- package/dist/daemon/api/server.d.ts.map +1 -1
- package/dist/daemon/api/server.js +57 -0
- package/dist/daemon/api/server.js.map +1 -1
- package/dist/daemon/daemon.d.ts +28 -0
- package/dist/daemon/daemon.d.ts.map +1 -1
- package/dist/daemon/daemon.js +174 -6
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/lib/index.d.ts +1 -0
- package/dist/daemon/lib/index.d.ts.map +1 -1
- package/dist/daemon/lib/index.js +1 -0
- package/dist/daemon/lib/index.js.map +1 -1
- package/dist/daemon/lib/safeguards.d.ts +135 -0
- package/dist/daemon/lib/safeguards.d.ts.map +1 -0
- package/dist/daemon/lib/safeguards.js +250 -0
- package/dist/daemon/lib/safeguards.js.map +1 -0
- package/dist/daemon/lib/watcher.d.ts.map +1 -1
- package/dist/daemon/lib/watcher.js +48 -8
- package/dist/daemon/lib/watcher.js.map +1 -1
- package/dist/daemon/web/app.js +433 -0
- package/dist/daemon/web/index.html +68 -0
- package/dist/daemon/web/styles.css +452 -0
- package/dist/lib/environment.d.ts +1 -0
- package/dist/lib/environment.d.ts.map +1 -1
- package/dist/lib/environment.js +14 -0
- package/dist/lib/environment.js.map +1 -1
- package/dist/lib/invoke.d.ts +8 -0
- package/dist/lib/invoke.d.ts.map +1 -1
- package/dist/lib/invoke.js +28 -16
- package/dist/lib/invoke.js.map +1 -1
- package/dist/lib/processor.d.ts +8 -0
- package/dist/lib/processor.d.ts.map +1 -1
- package/dist/lib/processor.js +16 -2
- package/dist/lib/processor.js.map +1 -1
- package/dist/lib/validation/persona.d.ts.map +1 -1
- package/dist/lib/validation/persona.js +41 -4
- package/dist/lib/validation/persona.js.map +1 -1
- package/package.json +15 -9
- package/dist/lib/channel.test.d.ts +0 -2
- package/dist/lib/channel.test.d.ts.map +0 -1
- package/dist/lib/channel.test.js +0 -33
- package/dist/lib/channel.test.js.map +0 -1
- package/dist/lib/frontmatter.test.d.ts +0 -2
- package/dist/lib/frontmatter.test.d.ts.map +0 -1
- package/dist/lib/frontmatter.test.js +0 -60
- package/dist/lib/frontmatter.test.js.map +0 -1
- package/dist/lib/integration.test.d.ts +0 -2
- package/dist/lib/integration.test.d.ts.map +0 -1
- package/dist/lib/integration.test.js +0 -445
- package/dist/lib/integration.test.js.map +0 -1
- package/dist/lib/invoke.test.d.ts +0 -2
- package/dist/lib/invoke.test.d.ts.map +0 -1
- package/dist/lib/invoke.test.js +0 -82
- package/dist/lib/invoke.test.js.map +0 -1
- package/dist/lib/persona.test.d.ts +0 -2
- package/dist/lib/persona.test.d.ts.map +0 -1
- package/dist/lib/persona.test.js +0 -324
- package/dist/lib/persona.test.js.map +0 -1
- package/dist/lib/processor.test.d.ts +0 -2
- package/dist/lib/processor.test.d.ts.map +0 -1
- package/dist/lib/processor.test.js +0 -134
- package/dist/lib/processor.test.js.map +0 -1
- package/dist/lib/registry.test.d.ts +0 -2
- package/dist/lib/registry.test.d.ts.map +0 -1
- package/dist/lib/registry.test.js +0 -236
- package/dist/lib/registry.test.js.map +0 -1
- package/dist/lib/session-thread.test.d.ts +0 -2
- package/dist/lib/session-thread.test.d.ts.map +0 -1
- package/dist/lib/session-thread.test.js +0 -235
- package/dist/lib/session-thread.test.js.map +0 -1
- package/dist/lib/session.test.d.ts +0 -2
- package/dist/lib/session.test.d.ts.map +0 -1
- package/dist/lib/session.test.js +0 -336
- package/dist/lib/session.test.js.map +0 -1
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { describe, it } from "node:test";
|
|
2
|
-
import assert from "node:assert";
|
|
3
|
-
function parseChannelAddress(address) {
|
|
4
|
-
if (!address.startsWith("#") && !address.startsWith("@")) {
|
|
5
|
-
throw new Error(`Invalid channel address: ${address}. Must start with # or @`);
|
|
6
|
-
}
|
|
7
|
-
const type = address[0];
|
|
8
|
-
const rest = address.slice(1);
|
|
9
|
-
// Check for project/name format
|
|
10
|
-
const slashIndex = rest.indexOf("/");
|
|
11
|
-
if (slashIndex > 0) {
|
|
12
|
-
const project = rest.slice(0, slashIndex);
|
|
13
|
-
const name = rest.slice(slashIndex + 1);
|
|
14
|
-
if (!name) {
|
|
15
|
-
throw new Error(`Invalid channel address: ${address}. Missing channel/persona name after project.`);
|
|
16
|
-
}
|
|
17
|
-
return { project, type, name, original: address };
|
|
18
|
-
}
|
|
19
|
-
// Local channel
|
|
20
|
-
return { project: null, type, name: rest, original: address };
|
|
21
|
-
}
|
|
22
|
-
// Inline detectNameCollisions logic for testing
|
|
23
|
-
function detectNameCollisions(personaNames, projectRegistry) {
|
|
24
|
-
const collisions = [];
|
|
25
|
-
for (const [projectName, projectPath] of Object.entries(projectRegistry)) {
|
|
26
|
-
for (const personaName of personaNames) {
|
|
27
|
-
if (personaName === projectName) {
|
|
28
|
-
collisions.push({
|
|
29
|
-
name: projectName,
|
|
30
|
-
projectPath: projectPath,
|
|
31
|
-
personaPath: personaName,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return collisions;
|
|
37
|
-
}
|
|
38
|
-
describe("parseChannelAddress", () => {
|
|
39
|
-
describe("local channels", () => {
|
|
40
|
-
it("parses local DM address (@persona)", () => {
|
|
41
|
-
const result = parseChannelAddress("@developer");
|
|
42
|
-
assert.strictEqual(result.project, null);
|
|
43
|
-
assert.strictEqual(result.type, "@");
|
|
44
|
-
assert.strictEqual(result.name, "developer");
|
|
45
|
-
assert.strictEqual(result.original, "@developer");
|
|
46
|
-
});
|
|
47
|
-
it("parses local public channel (#channel)", () => {
|
|
48
|
-
const result = parseChannelAddress("#status");
|
|
49
|
-
assert.strictEqual(result.project, null);
|
|
50
|
-
assert.strictEqual(result.type, "#");
|
|
51
|
-
assert.strictEqual(result.name, "status");
|
|
52
|
-
assert.strictEqual(result.original, "#status");
|
|
53
|
-
});
|
|
54
|
-
it("handles hyphenated names", () => {
|
|
55
|
-
const result = parseChannelAddress("@my-persona");
|
|
56
|
-
assert.strictEqual(result.project, null);
|
|
57
|
-
assert.strictEqual(result.name, "my-persona");
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
describe("cross-project channels", () => {
|
|
61
|
-
it("parses cross-project DM address (@project/persona)", () => {
|
|
62
|
-
const result = parseChannelAddress("@documents/dottie");
|
|
63
|
-
assert.strictEqual(result.project, "documents");
|
|
64
|
-
assert.strictEqual(result.type, "@");
|
|
65
|
-
assert.strictEqual(result.name, "dottie");
|
|
66
|
-
assert.strictEqual(result.original, "@documents/dottie");
|
|
67
|
-
});
|
|
68
|
-
it("parses cross-project public channel (#project/channel)", () => {
|
|
69
|
-
const result = parseChannelAddress("#scoutos/status");
|
|
70
|
-
assert.strictEqual(result.project, "scoutos");
|
|
71
|
-
assert.strictEqual(result.type, "#");
|
|
72
|
-
assert.strictEqual(result.name, "status");
|
|
73
|
-
assert.strictEqual(result.original, "#scoutos/status");
|
|
74
|
-
});
|
|
75
|
-
it("handles hyphenated project names", () => {
|
|
76
|
-
const result = parseChannelAddress("@dot-agents/developer");
|
|
77
|
-
assert.strictEqual(result.project, "dot-agents");
|
|
78
|
-
assert.strictEqual(result.name, "developer");
|
|
79
|
-
});
|
|
80
|
-
it("handles nested path-like names in persona", () => {
|
|
81
|
-
const result = parseChannelAddress("@documents/claude/developer");
|
|
82
|
-
assert.strictEqual(result.project, "documents");
|
|
83
|
-
assert.strictEqual(result.name, "claude/developer");
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
describe("error handling", () => {
|
|
87
|
-
it("throws for addresses without prefix", () => {
|
|
88
|
-
assert.throws(() => parseChannelAddress("documents/dottie"), /Invalid channel address/);
|
|
89
|
-
});
|
|
90
|
-
it("throws for addresses with missing name after project", () => {
|
|
91
|
-
assert.throws(() => parseChannelAddress("@documents/"), /Missing channel\/persona name/);
|
|
92
|
-
});
|
|
93
|
-
it("throws for empty address", () => {
|
|
94
|
-
assert.throws(() => parseChannelAddress(""), /Invalid channel address/);
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
describe("detectNameCollisions", () => {
|
|
99
|
-
it("detects collision when persona name matches project name", () => {
|
|
100
|
-
const personaNames = ["developer", "documents", "reviewer"];
|
|
101
|
-
const registry = {
|
|
102
|
-
documents: "/path/to/documents",
|
|
103
|
-
scoutos: "/path/to/scoutos",
|
|
104
|
-
};
|
|
105
|
-
const collisions = detectNameCollisions(personaNames, registry);
|
|
106
|
-
assert.strictEqual(collisions.length, 1);
|
|
107
|
-
assert.strictEqual(collisions[0].name, "documents");
|
|
108
|
-
assert.strictEqual(collisions[0].projectPath, "/path/to/documents");
|
|
109
|
-
assert.strictEqual(collisions[0].personaPath, "documents");
|
|
110
|
-
});
|
|
111
|
-
it("returns empty array when no collisions", () => {
|
|
112
|
-
const personaNames = ["developer", "reviewer"];
|
|
113
|
-
const registry = {
|
|
114
|
-
documents: "/path/to/documents",
|
|
115
|
-
scoutos: "/path/to/scoutos",
|
|
116
|
-
};
|
|
117
|
-
const collisions = detectNameCollisions(personaNames, registry);
|
|
118
|
-
assert.strictEqual(collisions.length, 0);
|
|
119
|
-
});
|
|
120
|
-
it("detects multiple collisions", () => {
|
|
121
|
-
const personaNames = ["developer", "documents", "scoutos"];
|
|
122
|
-
const registry = {
|
|
123
|
-
documents: "/path/to/documents",
|
|
124
|
-
scoutos: "/path/to/scoutos",
|
|
125
|
-
};
|
|
126
|
-
const collisions = detectNameCollisions(personaNames, registry);
|
|
127
|
-
assert.strictEqual(collisions.length, 2);
|
|
128
|
-
const names = collisions.map((c) => c.name).sort();
|
|
129
|
-
assert.deepStrictEqual(names, ["documents", "scoutos"]);
|
|
130
|
-
});
|
|
131
|
-
it("handles empty inputs", () => {
|
|
132
|
-
assert.strictEqual(detectNameCollisions([], {}).length, 0);
|
|
133
|
-
assert.strictEqual(detectNameCollisions(["dev"], {}).length, 0);
|
|
134
|
-
assert.strictEqual(detectNameCollisions([], { proj: "/path" }).length, 0);
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
function resolveChannelAddressSync(address, localChannelsDir, projectRegistry) {
|
|
138
|
-
const parsed = parseChannelAddress(address);
|
|
139
|
-
if (parsed.project === null) {
|
|
140
|
-
// Check if @name matches a registered project (unified resolution)
|
|
141
|
-
if (parsed.type === "@") {
|
|
142
|
-
const projectPath = projectRegistry[parsed.name];
|
|
143
|
-
if (projectPath) {
|
|
144
|
-
// Route to project's entry point (@root)
|
|
145
|
-
return {
|
|
146
|
-
channelsDir: `${projectPath}/channels`,
|
|
147
|
-
localChannelName: "@root",
|
|
148
|
-
isProjectEntryPoint: true,
|
|
149
|
-
projectName: parsed.name,
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
// Local channel (no project match or public channel)
|
|
154
|
-
return {
|
|
155
|
-
channelsDir: localChannelsDir,
|
|
156
|
-
localChannelName: address,
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
// Cross-project channel with explicit project/name format
|
|
160
|
-
const projectPath = projectRegistry[parsed.project];
|
|
161
|
-
if (!projectPath) {
|
|
162
|
-
throw new Error(`Unknown project: ${parsed.project}. Register it with: npx dot-agents projects add ${parsed.project} /path/to/project`);
|
|
163
|
-
}
|
|
164
|
-
return {
|
|
165
|
-
channelsDir: `${projectPath}/channels`,
|
|
166
|
-
localChannelName: `${parsed.type}${parsed.name}`,
|
|
167
|
-
projectName: parsed.project,
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
describe("resolveChannelAddress cross-project routing", () => {
|
|
171
|
-
const localChannelsDir = "/current-project/.agents/channels";
|
|
172
|
-
const projectRegistry = {
|
|
173
|
-
documents: "/home/user/documents/.agents",
|
|
174
|
-
scoutos: "/home/user/scoutos/.agents",
|
|
175
|
-
};
|
|
176
|
-
describe("@project routes to @root", () => {
|
|
177
|
-
it("@documents routes to documents project's @root channel", () => {
|
|
178
|
-
const result = resolveChannelAddressSync("@documents", localChannelsDir, projectRegistry);
|
|
179
|
-
assert.strictEqual(result.channelsDir, "/home/user/documents/.agents/channels");
|
|
180
|
-
assert.strictEqual(result.localChannelName, "@root");
|
|
181
|
-
assert.strictEqual(result.isProjectEntryPoint, true);
|
|
182
|
-
assert.strictEqual(result.projectName, "documents");
|
|
183
|
-
});
|
|
184
|
-
it("@scoutos routes to scoutos project's @root channel", () => {
|
|
185
|
-
const result = resolveChannelAddressSync("@scoutos", localChannelsDir, projectRegistry);
|
|
186
|
-
assert.strictEqual(result.channelsDir, "/home/user/scoutos/.agents/channels");
|
|
187
|
-
assert.strictEqual(result.localChannelName, "@root");
|
|
188
|
-
assert.strictEqual(result.isProjectEntryPoint, true);
|
|
189
|
-
assert.strictEqual(result.projectName, "scoutos");
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
describe("@project/persona routes to specific persona", () => {
|
|
193
|
-
it("@documents/dottie routes to documents project's @dottie channel", () => {
|
|
194
|
-
const result = resolveChannelAddressSync("@documents/dottie", localChannelsDir, projectRegistry);
|
|
195
|
-
assert.strictEqual(result.channelsDir, "/home/user/documents/.agents/channels");
|
|
196
|
-
assert.strictEqual(result.localChannelName, "@dottie");
|
|
197
|
-
assert.strictEqual(result.projectName, "documents");
|
|
198
|
-
// Not marked as entry point since it's a specific persona
|
|
199
|
-
assert.strictEqual(result.isProjectEntryPoint, undefined);
|
|
200
|
-
});
|
|
201
|
-
});
|
|
202
|
-
describe("local personas without project match", () => {
|
|
203
|
-
it("@developer stays local when no project named 'developer'", () => {
|
|
204
|
-
const result = resolveChannelAddressSync("@developer", localChannelsDir, projectRegistry);
|
|
205
|
-
assert.strictEqual(result.channelsDir, localChannelsDir);
|
|
206
|
-
assert.strictEqual(result.localChannelName, "@developer");
|
|
207
|
-
assert.strictEqual(result.isProjectEntryPoint, undefined);
|
|
208
|
-
assert.strictEqual(result.projectName, undefined);
|
|
209
|
-
});
|
|
210
|
-
it("@reviewer stays local when no project named 'reviewer'", () => {
|
|
211
|
-
const result = resolveChannelAddressSync("@reviewer", localChannelsDir, projectRegistry);
|
|
212
|
-
assert.strictEqual(result.channelsDir, localChannelsDir);
|
|
213
|
-
assert.strictEqual(result.localChannelName, "@reviewer");
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
describe("public channels", () => {
|
|
217
|
-
it("#status stays local (no project routing for public channels)", () => {
|
|
218
|
-
const result = resolveChannelAddressSync("#status", localChannelsDir, projectRegistry);
|
|
219
|
-
assert.strictEqual(result.channelsDir, localChannelsDir);
|
|
220
|
-
assert.strictEqual(result.localChannelName, "#status");
|
|
221
|
-
});
|
|
222
|
-
it("#documents stays local (public channels don't match project names)", () => {
|
|
223
|
-
// Even though 'documents' is a project name, #documents is a public channel
|
|
224
|
-
// and doesn't get routed to the project
|
|
225
|
-
const result = resolveChannelAddressSync("#documents", localChannelsDir, projectRegistry);
|
|
226
|
-
assert.strictEqual(result.channelsDir, localChannelsDir);
|
|
227
|
-
assert.strictEqual(result.localChannelName, "#documents");
|
|
228
|
-
});
|
|
229
|
-
});
|
|
230
|
-
describe("error handling", () => {
|
|
231
|
-
it("throws for unknown project in explicit format", () => {
|
|
232
|
-
assert.throws(() => resolveChannelAddressSync("@unknown-project/persona", localChannelsDir, projectRegistry), /Unknown project: unknown-project/);
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
});
|
|
236
|
-
//# sourceMappingURL=registry.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.test.js","sourceRoot":"","sources":["../../src/lib/registry.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAA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QAC5D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;QAC9B,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;YACvD,MAAM,CAAC,MAAM,CACX,GAAG,EAAE,CACH,yBAAyB,CACvB,0BAA0B,EAC1B,gBAAgB,EAChB,eAAe,CAChB,EACH,kCAAkC,CACnC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-thread.test.d.ts","sourceRoot":"","sources":["../../src/lib/session-thread.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import { describe, it, beforeEach, afterEach } from "node:test";
|
|
2
|
-
import assert from "node:assert";
|
|
3
|
-
import { mkdir, rm, readdir } from "node:fs/promises";
|
|
4
|
-
import { join } from "node:path";
|
|
5
|
-
import { tmpdir } from "node:os";
|
|
6
|
-
import { setTimeout } from "node:timers/promises";
|
|
7
|
-
import { startSession, updateSession, endSession, getSessionWorkspace, } from "./session-thread.js";
|
|
8
|
-
import { readChannel } from "./channel.js";
|
|
9
|
-
// Small delay to ensure unique timestamps for message IDs
|
|
10
|
-
const tick = () => setTimeout(10);
|
|
11
|
-
describe("session-thread", () => {
|
|
12
|
-
let testDir;
|
|
13
|
-
let channelsDir;
|
|
14
|
-
beforeEach(async () => {
|
|
15
|
-
// Create temp directory for tests
|
|
16
|
-
testDir = join(tmpdir(), `session-thread-test-${Date.now()}`);
|
|
17
|
-
channelsDir = join(testDir, "channels");
|
|
18
|
-
await mkdir(channelsDir, { recursive: true });
|
|
19
|
-
});
|
|
20
|
-
afterEach(async () => {
|
|
21
|
-
// Clean up temp directory
|
|
22
|
-
await rm(testDir, { recursive: true, force: true });
|
|
23
|
-
});
|
|
24
|
-
describe("startSession", () => {
|
|
25
|
-
it("creates a session thread in #sessions", async () => {
|
|
26
|
-
const session = await startSession({
|
|
27
|
-
channelsDir,
|
|
28
|
-
persona: "test-persona",
|
|
29
|
-
mode: "interactive",
|
|
30
|
-
trigger: "manual",
|
|
31
|
-
});
|
|
32
|
-
// Session ID should be an ISO timestamp
|
|
33
|
-
assert.ok(session.id.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/));
|
|
34
|
-
// Workspace should exist
|
|
35
|
-
assert.ok(session.workspacePath.includes("workspace"));
|
|
36
|
-
// Check that #sessions channel was created with the thread
|
|
37
|
-
const sessionsDir = join(channelsDir, "#sessions");
|
|
38
|
-
const entries = await readdir(sessionsDir);
|
|
39
|
-
assert.ok(entries.includes(session.id));
|
|
40
|
-
});
|
|
41
|
-
it("includes goal in session message when provided", async () => {
|
|
42
|
-
const session = await startSession({
|
|
43
|
-
channelsDir,
|
|
44
|
-
persona: "test-persona",
|
|
45
|
-
mode: "headless",
|
|
46
|
-
trigger: "cron",
|
|
47
|
-
goal: "Test goal description",
|
|
48
|
-
});
|
|
49
|
-
// Read the message content
|
|
50
|
-
const messages = await readChannel(channelsDir, "#sessions");
|
|
51
|
-
assert.strictEqual(messages.length, 1);
|
|
52
|
-
assert.ok(messages[0].content.includes("Test goal description"));
|
|
53
|
-
assert.ok(messages[0].content.includes("headless"));
|
|
54
|
-
assert.ok(messages[0].content.includes("cron"));
|
|
55
|
-
});
|
|
56
|
-
it("includes upstream in session message when provided", async () => {
|
|
57
|
-
const session = await startSession({
|
|
58
|
-
channelsDir,
|
|
59
|
-
persona: "test-persona",
|
|
60
|
-
mode: "interactive",
|
|
61
|
-
trigger: "dm",
|
|
62
|
-
upstream: "@other-project#sessions --thread abc123",
|
|
63
|
-
});
|
|
64
|
-
const messages = await readChannel(channelsDir, "#sessions");
|
|
65
|
-
assert.ok(messages[0].content.includes("@other-project#sessions"));
|
|
66
|
-
});
|
|
67
|
-
it("creates workspace directory", async () => {
|
|
68
|
-
const session = await startSession({
|
|
69
|
-
channelsDir,
|
|
70
|
-
persona: "test-persona",
|
|
71
|
-
mode: "interactive",
|
|
72
|
-
trigger: "manual",
|
|
73
|
-
});
|
|
74
|
-
const workspaceEntries = await readdir(session.workspacePath).catch(() => null);
|
|
75
|
-
assert.ok(workspaceEntries !== null, "Workspace directory should exist");
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
describe("updateSession", () => {
|
|
79
|
-
it("adds a reply to the session thread", async () => {
|
|
80
|
-
const session = await startSession({
|
|
81
|
-
channelsDir,
|
|
82
|
-
persona: "test-persona",
|
|
83
|
-
mode: "interactive",
|
|
84
|
-
trigger: "manual",
|
|
85
|
-
});
|
|
86
|
-
await tick(); // Ensure reply gets unique timestamp from session start
|
|
87
|
-
await updateSession(session, "First update");
|
|
88
|
-
await tick();
|
|
89
|
-
await updateSession(session, "Second update");
|
|
90
|
-
const messages = await readChannel(channelsDir, "#sessions");
|
|
91
|
-
assert.strictEqual(messages.length, 1);
|
|
92
|
-
assert.strictEqual(messages[0].replies?.length, 2);
|
|
93
|
-
});
|
|
94
|
-
it("works with session ID string instead of session object", async () => {
|
|
95
|
-
const session = await startSession({
|
|
96
|
-
channelsDir,
|
|
97
|
-
persona: "test-persona",
|
|
98
|
-
mode: "interactive",
|
|
99
|
-
trigger: "manual",
|
|
100
|
-
});
|
|
101
|
-
await tick(); // Ensure reply gets unique timestamp from session start
|
|
102
|
-
await updateSession(session.id, channelsDir, "Update via ID");
|
|
103
|
-
const messages = await readChannel(channelsDir, "#sessions");
|
|
104
|
-
assert.strictEqual(messages[0].replies?.length, 1);
|
|
105
|
-
assert.ok(messages[0].replies?.[0].content.includes("Update via ID"));
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
describe("endSession", () => {
|
|
109
|
-
it("posts a completion message to the thread", async () => {
|
|
110
|
-
const session = await startSession({
|
|
111
|
-
channelsDir,
|
|
112
|
-
persona: "test-persona",
|
|
113
|
-
mode: "headless",
|
|
114
|
-
trigger: "manual",
|
|
115
|
-
});
|
|
116
|
-
await tick();
|
|
117
|
-
await endSession(session, {
|
|
118
|
-
success: true,
|
|
119
|
-
exitCode: 0,
|
|
120
|
-
duration: 5000,
|
|
121
|
-
});
|
|
122
|
-
const messages = await readChannel(channelsDir, "#sessions");
|
|
123
|
-
assert.strictEqual(messages[0].replies?.length, 1);
|
|
124
|
-
const endMessage = messages[0].replies?.[0].content;
|
|
125
|
-
assert.ok(endMessage?.includes("Session Ended"));
|
|
126
|
-
assert.ok(endMessage?.includes("Success:** ✓"));
|
|
127
|
-
assert.ok(endMessage?.includes("Exit Code:** 0"));
|
|
128
|
-
assert.ok(endMessage?.includes("5.0s"));
|
|
129
|
-
});
|
|
130
|
-
it("includes error message when session failed", async () => {
|
|
131
|
-
const session = await startSession({
|
|
132
|
-
channelsDir,
|
|
133
|
-
persona: "test-persona",
|
|
134
|
-
mode: "headless",
|
|
135
|
-
trigger: "manual",
|
|
136
|
-
});
|
|
137
|
-
await tick();
|
|
138
|
-
await endSession(session, {
|
|
139
|
-
success: false,
|
|
140
|
-
exitCode: 1,
|
|
141
|
-
duration: 1234,
|
|
142
|
-
error: "Something went wrong",
|
|
143
|
-
});
|
|
144
|
-
const messages = await readChannel(channelsDir, "#sessions");
|
|
145
|
-
const endMessage = messages[0].replies?.[0].content;
|
|
146
|
-
assert.ok(endMessage?.includes("Success:** ✗"));
|
|
147
|
-
assert.ok(endMessage?.includes("Something went wrong"));
|
|
148
|
-
});
|
|
149
|
-
it("formats duration correctly for various lengths", async () => {
|
|
150
|
-
// Test milliseconds
|
|
151
|
-
let session = await startSession({
|
|
152
|
-
channelsDir,
|
|
153
|
-
persona: "test",
|
|
154
|
-
mode: "headless",
|
|
155
|
-
trigger: "manual",
|
|
156
|
-
});
|
|
157
|
-
await tick();
|
|
158
|
-
await endSession(session, { success: true, exitCode: 0, duration: 500 });
|
|
159
|
-
let messages = await readChannel(channelsDir, "#sessions");
|
|
160
|
-
assert.ok(messages[0].replies?.[0].content.includes("500ms"));
|
|
161
|
-
// Test minutes
|
|
162
|
-
await tick();
|
|
163
|
-
session = await startSession({
|
|
164
|
-
channelsDir,
|
|
165
|
-
persona: "test",
|
|
166
|
-
mode: "headless",
|
|
167
|
-
trigger: "manual",
|
|
168
|
-
});
|
|
169
|
-
await tick();
|
|
170
|
-
await endSession(session, { success: true, exitCode: 0, duration: 125000 });
|
|
171
|
-
messages = await readChannel(channelsDir, "#sessions");
|
|
172
|
-
assert.ok(messages[0].replies?.[0].content.includes("2m 5s"));
|
|
173
|
-
// Test hours
|
|
174
|
-
await tick();
|
|
175
|
-
session = await startSession({
|
|
176
|
-
channelsDir,
|
|
177
|
-
persona: "test",
|
|
178
|
-
mode: "headless",
|
|
179
|
-
trigger: "manual",
|
|
180
|
-
});
|
|
181
|
-
await tick();
|
|
182
|
-
await endSession(session, { success: true, exitCode: 0, duration: 3720000 });
|
|
183
|
-
messages = await readChannel(channelsDir, "#sessions");
|
|
184
|
-
assert.ok(messages[0].replies?.[0].content.includes("1h 2m"));
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
describe("getSessionWorkspace", () => {
|
|
188
|
-
it("returns workspace path for existing session", async () => {
|
|
189
|
-
const session = await startSession({
|
|
190
|
-
channelsDir,
|
|
191
|
-
persona: "test-persona",
|
|
192
|
-
mode: "interactive",
|
|
193
|
-
trigger: "manual",
|
|
194
|
-
});
|
|
195
|
-
const workspace = await getSessionWorkspace(channelsDir, session.id);
|
|
196
|
-
assert.strictEqual(workspace, session.workspacePath);
|
|
197
|
-
});
|
|
198
|
-
it("returns null for non-existent session", async () => {
|
|
199
|
-
const workspace = await getSessionWorkspace(channelsDir, "non-existent-id");
|
|
200
|
-
assert.strictEqual(workspace, null);
|
|
201
|
-
});
|
|
202
|
-
it("creates workspace when create=true", async () => {
|
|
203
|
-
const session = await startSession({
|
|
204
|
-
channelsDir,
|
|
205
|
-
persona: "test-persona",
|
|
206
|
-
mode: "interactive",
|
|
207
|
-
trigger: "manual",
|
|
208
|
-
});
|
|
209
|
-
// Remove workspace to test creation
|
|
210
|
-
await rm(session.workspacePath, { recursive: true });
|
|
211
|
-
const workspace = await getSessionWorkspace(channelsDir, session.id, true);
|
|
212
|
-
assert.ok(workspace !== null);
|
|
213
|
-
const entries = await readdir(workspace).catch(() => null);
|
|
214
|
-
assert.ok(entries !== null);
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
describe("thread message structure", () => {
|
|
218
|
-
it("uses uniform timestamp naming for messages", async () => {
|
|
219
|
-
const session = await startSession({
|
|
220
|
-
channelsDir,
|
|
221
|
-
persona: "test-persona",
|
|
222
|
-
mode: "interactive",
|
|
223
|
-
trigger: "manual",
|
|
224
|
-
});
|
|
225
|
-
const threadDir = join(channelsDir, "#sessions", session.id);
|
|
226
|
-
const entries = await readdir(threadDir);
|
|
227
|
-
// Should have: <timestamp>.md (initial), workspace/
|
|
228
|
-
const mdFiles = entries.filter(e => e.endsWith(".md"));
|
|
229
|
-
assert.strictEqual(mdFiles.length, 1);
|
|
230
|
-
// The .md file should be named with the session ID (thread ID)
|
|
231
|
-
assert.ok(mdFiles[0] === `${session.id}.md`);
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
//# sourceMappingURL=session-thread.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-thread.test.js","sourceRoot":"","sources":["../../src/lib/session-thread.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAY,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAA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