dot-agents 0.4.1 → 0.6.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/README.md +239 -122
- package/dist/cli/commands/channel.d.ts +19 -0
- package/dist/cli/commands/channel.d.ts.map +1 -1
- package/dist/cli/commands/channel.js +152 -13
- package/dist/cli/commands/channel.js.map +1 -1
- package/dist/cli/commands/check.d.ts.map +1 -1
- package/dist/cli/commands/check.js +61 -1
- package/dist/cli/commands/check.js.map +1 -1
- package/dist/cli/commands/index.d.ts +2 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +2 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/personas.d.ts +3 -0
- package/dist/cli/commands/personas.d.ts.map +1 -0
- package/dist/cli/commands/personas.js +402 -0
- package/dist/cli/commands/personas.js.map +1 -0
- package/dist/cli/commands/projects.d.ts +3 -0
- package/dist/cli/commands/projects.d.ts.map +1 -0
- package/dist/cli/commands/projects.js +138 -0
- package/dist/cli/commands/projects.js.map +1 -0
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +4 -5
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/index.js +5 -12
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/lib/runner.d.ts +2 -0
- package/dist/cli/lib/runner.d.ts.map +1 -1
- package/dist/cli/lib/runner.js +102 -25
- package/dist/cli/lib/runner.js.map +1 -1
- package/dist/daemon/api/server.d.ts.map +1 -1
- package/dist/daemon/api/server.js +4 -2
- package/dist/daemon/api/server.js.map +1 -1
- package/dist/daemon/daemon.d.ts +12 -3
- package/dist/daemon/daemon.d.ts.map +1 -1
- package/dist/daemon/daemon.js +138 -35
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/lib/executor.d.ts +12 -2
- package/dist/daemon/lib/executor.d.ts.map +1 -1
- package/dist/daemon/lib/executor.js +52 -34
- package/dist/daemon/lib/executor.js.map +1 -1
- package/dist/daemon/lib/watcher.d.ts +14 -2
- package/dist/daemon/lib/watcher.d.ts.map +1 -1
- package/dist/daemon/lib/watcher.js +43 -3
- package/dist/daemon/lib/watcher.js.map +1 -1
- package/dist/lib/channel.d.ts +53 -1
- package/dist/lib/channel.d.ts.map +1 -1
- package/dist/lib/channel.js +221 -30
- package/dist/lib/channel.js.map +1 -1
- package/dist/lib/channel.test.d.ts +2 -0
- package/dist/lib/channel.test.d.ts.map +1 -0
- package/dist/lib/channel.test.js +33 -0
- package/dist/lib/channel.test.js.map +1 -0
- package/dist/lib/daemon-status.d.ts +26 -0
- package/dist/lib/daemon-status.d.ts.map +1 -0
- package/dist/lib/daemon-status.js +64 -0
- package/dist/lib/daemon-status.js.map +1 -0
- package/dist/lib/environment.d.ts +87 -0
- package/dist/lib/environment.d.ts.map +1 -0
- package/dist/lib/environment.js +224 -0
- package/dist/lib/environment.js.map +1 -0
- package/dist/lib/frontmatter.d.ts +8 -0
- package/dist/lib/frontmatter.d.ts.map +1 -1
- package/dist/lib/frontmatter.js +16 -3
- package/dist/lib/frontmatter.js.map +1 -1
- package/dist/lib/frontmatter.test.d.ts +2 -0
- package/dist/lib/frontmatter.test.d.ts.map +1 -0
- package/dist/lib/frontmatter.test.js +60 -0
- package/dist/lib/frontmatter.test.js.map +1 -0
- package/dist/lib/index.d.ts +8 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +8 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/integration.test.d.ts +2 -0
- package/dist/lib/integration.test.d.ts.map +1 -0
- package/dist/lib/integration.test.js +445 -0
- package/dist/lib/integration.test.js.map +1 -0
- package/dist/lib/invoke.d.ts +23 -0
- package/dist/lib/invoke.d.ts.map +1 -0
- package/dist/lib/invoke.js +158 -0
- package/dist/lib/invoke.js.map +1 -0
- package/dist/lib/invoke.test.d.ts +2 -0
- package/dist/lib/invoke.test.d.ts.map +1 -0
- package/dist/lib/invoke.test.js +82 -0
- package/dist/lib/invoke.test.js.map +1 -0
- package/dist/lib/persona.d.ts +41 -0
- package/dist/lib/persona.d.ts.map +1 -1
- package/dist/lib/persona.js +233 -31
- package/dist/lib/persona.js.map +1 -1
- package/dist/lib/persona.test.d.ts +2 -0
- package/dist/lib/persona.test.d.ts.map +1 -0
- package/dist/lib/persona.test.js +324 -0
- package/dist/lib/persona.test.js.map +1 -0
- package/dist/lib/processor.d.ts +50 -0
- package/dist/lib/processor.d.ts.map +1 -0
- package/dist/lib/processor.js +135 -0
- package/dist/lib/processor.js.map +1 -0
- package/dist/lib/processor.test.d.ts +2 -0
- package/dist/lib/processor.test.d.ts.map +1 -0
- package/dist/lib/processor.test.js +134 -0
- package/dist/lib/processor.test.js.map +1 -0
- package/dist/lib/registry.d.ts +109 -0
- package/dist/lib/registry.d.ts.map +1 -0
- package/dist/lib/registry.js +192 -0
- package/dist/lib/registry.js.map +1 -0
- package/dist/lib/registry.test.d.ts +2 -0
- package/dist/lib/registry.test.d.ts.map +1 -0
- package/dist/lib/registry.test.js +236 -0
- package/dist/lib/registry.test.js.map +1 -0
- package/dist/lib/session-thread.d.ts +75 -0
- package/dist/lib/session-thread.d.ts.map +1 -0
- package/dist/lib/session-thread.js +132 -0
- package/dist/lib/session-thread.js.map +1 -0
- package/dist/lib/session-thread.test.d.ts +2 -0
- package/dist/lib/session-thread.test.d.ts.map +1 -0
- package/dist/lib/session-thread.test.js +235 -0
- package/dist/lib/session-thread.test.js.map +1 -0
- package/dist/lib/session.d.ts +150 -0
- package/dist/lib/session.d.ts.map +1 -0
- package/dist/lib/session.js +183 -0
- package/dist/lib/session.js.map +1 -0
- package/dist/lib/session.test.d.ts +2 -0
- package/dist/lib/session.test.d.ts.map +1 -0
- package/dist/lib/session.test.js +336 -0
- package/dist/lib/session.test.js.map +1 -0
- package/dist/lib/types/channel.d.ts +4 -0
- package/dist/lib/types/channel.d.ts.map +1 -1
- package/dist/lib/types/persona.d.ts +51 -0
- package/dist/lib/types/persona.d.ts.map +1 -1
- package/dist/lib/types/triggers.d.ts +11 -0
- package/dist/lib/types/triggers.d.ts.map +1 -1
- package/dist/lib/version.d.ts +26 -0
- package/dist/lib/version.d.ts.map +1 -0
- package/dist/lib/version.js +61 -0
- package/dist/lib/version.js.map +1 -0
- package/internal/personas/_base/PERSONA.md +251 -0
- package/internal/skills/channels/list/SKILL.md +76 -0
- package/internal/skills/channels/publish/SKILL.md +129 -0
- package/internal/skills/channels/read/SKILL.md +124 -0
- package/internal/skills/channels/reply/SKILL.md +138 -0
- package/package.json +7 -2
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { describe, it } from "node:test";
|
|
2
|
+
import assert from "node:assert";
|
|
3
|
+
import { join, dirname } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
// Inline hasPersonaFile logic for testing without module resolution issues
|
|
6
|
+
// Mirrors the logic from persona.ts
|
|
7
|
+
import { stat } from "node:fs/promises";
|
|
8
|
+
// Get the directory of this file and derive the project root
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = dirname(__filename);
|
|
11
|
+
// src/lib/processor.test.ts -> project root is ../../
|
|
12
|
+
const PROJECT_ROOT = join(__dirname, "..", "..");
|
|
13
|
+
const PERSONA_FILENAME = "PERSONA.md";
|
|
14
|
+
async function hasPersonaFile(dirPath) {
|
|
15
|
+
try {
|
|
16
|
+
const filePath = join(dirPath, PERSONA_FILENAME);
|
|
17
|
+
const stats = await stat(filePath);
|
|
18
|
+
return stats.isFile();
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// Inline personaExists logic for testing
|
|
25
|
+
// Mirrors the logic from processor.ts
|
|
26
|
+
async function personaExists(config, channelName, personasList = []) {
|
|
27
|
+
const personaName = channelName.slice(1); // Remove @ prefix
|
|
28
|
+
// Check for root persona (.agents/PERSONA.md)
|
|
29
|
+
if (personaName === "root") {
|
|
30
|
+
return await hasPersonaFile(config.agentsDir);
|
|
31
|
+
}
|
|
32
|
+
// Check against provided persona list (simulating listPersonas)
|
|
33
|
+
for (const path of personasList) {
|
|
34
|
+
const parts = path.split("/");
|
|
35
|
+
const name = parts[parts.length - 1];
|
|
36
|
+
if (name === personaName) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
describe("personaExists", () => {
|
|
43
|
+
describe("root persona handling", () => {
|
|
44
|
+
it("returns true for @root when .agents/PERSONA.md exists", async () => {
|
|
45
|
+
// Use the actual dot-agents project as the test fixture
|
|
46
|
+
// This project has a root persona at .agents/PERSONA.md
|
|
47
|
+
const config = {
|
|
48
|
+
agentsDir: join(PROJECT_ROOT, ".agents"),
|
|
49
|
+
personasDir: join(PROJECT_ROOT, ".agents", "personas"),
|
|
50
|
+
};
|
|
51
|
+
const exists = await personaExists(config, "@root");
|
|
52
|
+
assert.strictEqual(exists, true, "Should find root persona when .agents/PERSONA.md exists");
|
|
53
|
+
});
|
|
54
|
+
it("returns false for @root when directory has no PERSONA.md", async () => {
|
|
55
|
+
// Use a directory that definitely won't have PERSONA.md
|
|
56
|
+
const config = {
|
|
57
|
+
agentsDir: "/tmp/nonexistent-agents-dir-test",
|
|
58
|
+
personasDir: "/tmp/nonexistent-agents-dir-test/personas",
|
|
59
|
+
};
|
|
60
|
+
const exists = await personaExists(config, "@root");
|
|
61
|
+
assert.strictEqual(exists, false, "Should return false when no root persona exists");
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
describe("named persona handling", () => {
|
|
65
|
+
it("returns true for @developer when developer persona exists in list", async () => {
|
|
66
|
+
const config = {
|
|
67
|
+
agentsDir: "/project/.agents",
|
|
68
|
+
personasDir: "/project/.agents/personas",
|
|
69
|
+
};
|
|
70
|
+
const personasList = [
|
|
71
|
+
"/project/.agents/personas/developer",
|
|
72
|
+
"/project/.agents/personas/reviewer",
|
|
73
|
+
];
|
|
74
|
+
const exists = await personaExists(config, "@developer", personasList);
|
|
75
|
+
assert.strictEqual(exists, true);
|
|
76
|
+
});
|
|
77
|
+
it("returns false for @unknown when persona not in list", async () => {
|
|
78
|
+
const config = {
|
|
79
|
+
agentsDir: "/project/.agents",
|
|
80
|
+
personasDir: "/project/.agents/personas",
|
|
81
|
+
};
|
|
82
|
+
const personasList = [
|
|
83
|
+
"/project/.agents/personas/developer",
|
|
84
|
+
"/project/.agents/personas/reviewer",
|
|
85
|
+
];
|
|
86
|
+
const exists = await personaExists(config, "@unknown", personasList);
|
|
87
|
+
assert.strictEqual(exists, false);
|
|
88
|
+
});
|
|
89
|
+
it("handles nested persona paths correctly", async () => {
|
|
90
|
+
const config = {
|
|
91
|
+
agentsDir: "/project/.agents",
|
|
92
|
+
personasDir: "/project/.agents/personas",
|
|
93
|
+
};
|
|
94
|
+
// Nested persona: claude/developer
|
|
95
|
+
const personasList = [
|
|
96
|
+
"/project/.agents/personas/claude/developer",
|
|
97
|
+
];
|
|
98
|
+
// The last segment of the path is "developer"
|
|
99
|
+
const exists = await personaExists(config, "@developer", personasList);
|
|
100
|
+
assert.strictEqual(exists, true);
|
|
101
|
+
});
|
|
102
|
+
it("root check does not use personas list", async () => {
|
|
103
|
+
const config = {
|
|
104
|
+
agentsDir: "/tmp/nonexistent-test-dir",
|
|
105
|
+
personasDir: "/tmp/nonexistent-test-dir/personas",
|
|
106
|
+
};
|
|
107
|
+
// Even if "root" is in the personas list, @root should check agentsDir
|
|
108
|
+
const personasList = [
|
|
109
|
+
"/some/path/root", // This should NOT match @root
|
|
110
|
+
];
|
|
111
|
+
const exists = await personaExists(config, "@root", personasList);
|
|
112
|
+
// Should be false because it checks hasPersonaFile(agentsDir), not the list
|
|
113
|
+
assert.strictEqual(exists, false);
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
describe("hasPersonaFile", () => {
|
|
118
|
+
it("returns true when PERSONA.md exists", async () => {
|
|
119
|
+
// Use the actual .agents directory which has PERSONA.md
|
|
120
|
+
const agentsDir = join(PROJECT_ROOT, ".agents");
|
|
121
|
+
const exists = await hasPersonaFile(agentsDir);
|
|
122
|
+
assert.strictEqual(exists, true);
|
|
123
|
+
});
|
|
124
|
+
it("returns false when directory does not exist", async () => {
|
|
125
|
+
const exists = await hasPersonaFile("/nonexistent/path");
|
|
126
|
+
assert.strictEqual(exists, false);
|
|
127
|
+
});
|
|
128
|
+
it("returns false when directory exists but has no PERSONA.md", async () => {
|
|
129
|
+
// Use /tmp which exists but won't have PERSONA.md
|
|
130
|
+
const exists = await hasPersonaFile("/tmp");
|
|
131
|
+
assert.strictEqual(exists, false);
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=processor.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processor.test.js","sourceRoot":"","sources":["../../src/lib/processor.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,2EAA2E;AAC3E,oCAAoC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,6DAA6D;AAC7D,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACtC,sDAAsD;AACtD,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAEjD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAEtC,KAAK,UAAU,cAAc,CAAC,OAAe;IAC3C,IAAI,CAAC;QACH,MAAM,QAAQ,GA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E,CAAC,6CAA6C,EAAE,KAAK,IAAI,EAAE;QAC3D,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,mBAAmB,CAAC,CAAC;QACzD,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2DAA2D,EAAE,KAAK,IAAI,EAAE;QACzE,kDAAkD;QAClD,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,MAAM,CAAC,CAAC;QAC5C,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project registry structure
|
|
3
|
+
*/
|
|
4
|
+
export interface ProjectRegistry {
|
|
5
|
+
projects: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Parsed cross-project channel address
|
|
9
|
+
*/
|
|
10
|
+
export interface CrossProjectAddress {
|
|
11
|
+
/** Project name from registry (null if local) */
|
|
12
|
+
project: string | null;
|
|
13
|
+
/** Channel type: # for public, @ for DM */
|
|
14
|
+
type: "#" | "@";
|
|
15
|
+
/** Channel or persona name */
|
|
16
|
+
name: string;
|
|
17
|
+
/** Full original address for display */
|
|
18
|
+
original: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get path to the projects registry file
|
|
22
|
+
*/
|
|
23
|
+
export declare function getRegistryPath(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Load the project registry
|
|
26
|
+
*/
|
|
27
|
+
export declare function loadRegistry(): Promise<ProjectRegistry>;
|
|
28
|
+
/**
|
|
29
|
+
* Save the project registry
|
|
30
|
+
*/
|
|
31
|
+
export declare function saveRegistry(registry: ProjectRegistry): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Register a project in the registry
|
|
34
|
+
*/
|
|
35
|
+
export declare function registerProject(name: string, path: string): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Unregister a project from the registry
|
|
38
|
+
*/
|
|
39
|
+
export declare function unregisterProject(name: string): Promise<boolean>;
|
|
40
|
+
/**
|
|
41
|
+
* Resolve a project name to its .agents path
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveProject(name: string): Promise<string | null>;
|
|
44
|
+
/**
|
|
45
|
+
* Parse a channel address that may include a project prefix
|
|
46
|
+
*
|
|
47
|
+
* Formats:
|
|
48
|
+
* - @persona (local DM)
|
|
49
|
+
* - #channel (local public channel)
|
|
50
|
+
* - @project/persona (cross-project DM)
|
|
51
|
+
* - #project/channel (cross-project public channel)
|
|
52
|
+
*/
|
|
53
|
+
export declare function parseChannelAddress(address: string): CrossProjectAddress;
|
|
54
|
+
/**
|
|
55
|
+
* Result of resolving a channel address
|
|
56
|
+
*/
|
|
57
|
+
export interface ResolvedChannelAddress {
|
|
58
|
+
/** Path to the channels directory (local or remote) */
|
|
59
|
+
channelsDir: string;
|
|
60
|
+
/** Channel name within that directory (e.g., @persona, #channel, @root) */
|
|
61
|
+
localChannelName: string;
|
|
62
|
+
/** True if this resolved to a project's entry point */
|
|
63
|
+
isProjectEntryPoint?: boolean;
|
|
64
|
+
/** The project name if routed to a project */
|
|
65
|
+
projectName?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Resolve a channel address to a channels directory and local channel name
|
|
69
|
+
*
|
|
70
|
+
* Resolution order for @name (without /):
|
|
71
|
+
* 1. Check registered projects first - if found, routes to project's @root
|
|
72
|
+
* 2. Fall back to local persona lookup
|
|
73
|
+
*
|
|
74
|
+
* Returns:
|
|
75
|
+
* - channelsDir: The path to the channels directory (local or remote)
|
|
76
|
+
* - localChannelName: The channel name within that directory (e.g., @persona, #channel)
|
|
77
|
+
* - isProjectEntryPoint: True if routed to a project's entry point
|
|
78
|
+
* - projectName: The project name if routed to a project
|
|
79
|
+
*/
|
|
80
|
+
export declare function resolveChannelAddress(address: string, localChannelsDir: string): Promise<ResolvedChannelAddress>;
|
|
81
|
+
/**
|
|
82
|
+
* List all registered projects
|
|
83
|
+
*/
|
|
84
|
+
export declare function listProjects(): Promise<Array<{
|
|
85
|
+
name: string;
|
|
86
|
+
path: string;
|
|
87
|
+
}>>;
|
|
88
|
+
/**
|
|
89
|
+
* Get the project name for a given agents directory path
|
|
90
|
+
* Returns null if the path doesn't match any registered project
|
|
91
|
+
*/
|
|
92
|
+
export declare function getProjectNameByPath(agentsDir: string): Promise<string | null>;
|
|
93
|
+
/**
|
|
94
|
+
* A collision between a project name and a local persona name
|
|
95
|
+
*/
|
|
96
|
+
export interface NameCollision {
|
|
97
|
+
/** The conflicting name */
|
|
98
|
+
name: string;
|
|
99
|
+
/** Path to the registered project */
|
|
100
|
+
projectPath: string;
|
|
101
|
+
/** Path to the local persona */
|
|
102
|
+
personaPath: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Detect collisions between registered project names and local persona names.
|
|
106
|
+
* When a collision exists, @name will route to the project (projects take priority).
|
|
107
|
+
*/
|
|
108
|
+
export declare function detectNameCollisions(personaNames: string[]): Promise<NameCollision[]>;
|
|
109
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/lib/registry.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,iDAAiD;IACjD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2CAA2C;IAC3C,IAAI,EAAE,GAAG,GAAG,GAAG,CAAC;IAChB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AAC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AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,YAAY,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,aAAa,EAAE,CAAC,CAkB1B"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { readFile, writeFile, mkdir } from "node:fs/promises";
|
|
2
|
+
import { join, resolve } from "node:path";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
|
+
import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
|
|
5
|
+
const CONFIG_DIR = join(homedir(), ".config", "dot-agents");
|
|
6
|
+
const REGISTRY_FILE = "projects.yaml";
|
|
7
|
+
/**
|
|
8
|
+
* Get path to the projects registry file
|
|
9
|
+
*/
|
|
10
|
+
export function getRegistryPath() {
|
|
11
|
+
return join(CONFIG_DIR, REGISTRY_FILE);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Load the project registry
|
|
15
|
+
*/
|
|
16
|
+
export async function loadRegistry() {
|
|
17
|
+
const registryPath = getRegistryPath();
|
|
18
|
+
try {
|
|
19
|
+
const content = await readFile(registryPath, "utf-8");
|
|
20
|
+
const data = parseYaml(content);
|
|
21
|
+
return data || { projects: {} };
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return { projects: {} };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Save the project registry
|
|
29
|
+
*/
|
|
30
|
+
export async function saveRegistry(registry) {
|
|
31
|
+
await mkdir(CONFIG_DIR, { recursive: true });
|
|
32
|
+
const registryPath = getRegistryPath();
|
|
33
|
+
const content = stringifyYaml(registry);
|
|
34
|
+
await writeFile(registryPath, content, "utf-8");
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Register a project in the registry
|
|
38
|
+
*/
|
|
39
|
+
export async function registerProject(name, path) {
|
|
40
|
+
const registry = await loadRegistry();
|
|
41
|
+
// Expand ~ to home directory
|
|
42
|
+
const expandedPath = path.startsWith("~")
|
|
43
|
+
? join(homedir(), path.slice(1))
|
|
44
|
+
: resolve(path);
|
|
45
|
+
registry.projects[name] = expandedPath;
|
|
46
|
+
await saveRegistry(registry);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Unregister a project from the registry
|
|
50
|
+
*/
|
|
51
|
+
export async function unregisterProject(name) {
|
|
52
|
+
const registry = await loadRegistry();
|
|
53
|
+
if (name in registry.projects) {
|
|
54
|
+
delete registry.projects[name];
|
|
55
|
+
await saveRegistry(registry);
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Resolve a project name to its .agents path
|
|
62
|
+
*/
|
|
63
|
+
export async function resolveProject(name) {
|
|
64
|
+
const registry = await loadRegistry();
|
|
65
|
+
const path = registry.projects[name];
|
|
66
|
+
if (!path) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
// Expand ~ if present (in case registry was edited manually)
|
|
70
|
+
return path.startsWith("~") ? join(homedir(), path.slice(1)) : path;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Parse a channel address that may include a project prefix
|
|
74
|
+
*
|
|
75
|
+
* Formats:
|
|
76
|
+
* - @persona (local DM)
|
|
77
|
+
* - #channel (local public channel)
|
|
78
|
+
* - @project/persona (cross-project DM)
|
|
79
|
+
* - #project/channel (cross-project public channel)
|
|
80
|
+
*/
|
|
81
|
+
export function parseChannelAddress(address) {
|
|
82
|
+
if (!address.startsWith("#") && !address.startsWith("@")) {
|
|
83
|
+
throw new Error(`Invalid channel address: ${address}. Must start with # or @`);
|
|
84
|
+
}
|
|
85
|
+
const type = address[0];
|
|
86
|
+
const rest = address.slice(1);
|
|
87
|
+
// Check for project/name format
|
|
88
|
+
const slashIndex = rest.indexOf("/");
|
|
89
|
+
if (slashIndex > 0) {
|
|
90
|
+
const project = rest.slice(0, slashIndex);
|
|
91
|
+
const name = rest.slice(slashIndex + 1);
|
|
92
|
+
if (!name) {
|
|
93
|
+
throw new Error(`Invalid channel address: ${address}. Missing channel/persona name after project.`);
|
|
94
|
+
}
|
|
95
|
+
return { project, type, name, original: address };
|
|
96
|
+
}
|
|
97
|
+
// Local channel
|
|
98
|
+
return { project: null, type, name: rest, original: address };
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Resolve a channel address to a channels directory and local channel name
|
|
102
|
+
*
|
|
103
|
+
* Resolution order for @name (without /):
|
|
104
|
+
* 1. Check registered projects first - if found, routes to project's @root
|
|
105
|
+
* 2. Fall back to local persona lookup
|
|
106
|
+
*
|
|
107
|
+
* Returns:
|
|
108
|
+
* - channelsDir: The path to the channels directory (local or remote)
|
|
109
|
+
* - localChannelName: The channel name within that directory (e.g., @persona, #channel)
|
|
110
|
+
* - isProjectEntryPoint: True if routed to a project's entry point
|
|
111
|
+
* - projectName: The project name if routed to a project
|
|
112
|
+
*/
|
|
113
|
+
export async function resolveChannelAddress(address, localChannelsDir) {
|
|
114
|
+
const parsed = parseChannelAddress(address);
|
|
115
|
+
if (parsed.project === null) {
|
|
116
|
+
// Check if @name matches a registered project (unified resolution)
|
|
117
|
+
if (parsed.type === "@") {
|
|
118
|
+
const projectPath = await resolveProject(parsed.name);
|
|
119
|
+
if (projectPath) {
|
|
120
|
+
// Route to project's entry point (@root)
|
|
121
|
+
return {
|
|
122
|
+
channelsDir: join(projectPath, "channels"),
|
|
123
|
+
localChannelName: "@root",
|
|
124
|
+
isProjectEntryPoint: true,
|
|
125
|
+
projectName: parsed.name,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// Local channel (no project match or public channel)
|
|
130
|
+
return {
|
|
131
|
+
channelsDir: localChannelsDir,
|
|
132
|
+
localChannelName: address,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
// Cross-project channel with explicit project/name format
|
|
136
|
+
const projectPath = await resolveProject(parsed.project);
|
|
137
|
+
if (!projectPath) {
|
|
138
|
+
throw new Error(`Unknown project: ${parsed.project}. Register it with: npx dot-agents projects add ${parsed.project} /path/to/project`);
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
channelsDir: join(projectPath, "channels"),
|
|
142
|
+
localChannelName: `${parsed.type}${parsed.name}`,
|
|
143
|
+
projectName: parsed.project,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* List all registered projects
|
|
148
|
+
*/
|
|
149
|
+
export async function listProjects() {
|
|
150
|
+
const registry = await loadRegistry();
|
|
151
|
+
return Object.entries(registry.projects).map(([name, path]) => ({
|
|
152
|
+
name,
|
|
153
|
+
path,
|
|
154
|
+
}));
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Get the project name for a given agents directory path
|
|
158
|
+
* Returns null if the path doesn't match any registered project
|
|
159
|
+
*/
|
|
160
|
+
export async function getProjectNameByPath(agentsDir) {
|
|
161
|
+
const registry = await loadRegistry();
|
|
162
|
+
const normalizedPath = agentsDir.replace(/\/$/, ""); // Remove trailing slash
|
|
163
|
+
for (const [name, path] of Object.entries(registry.projects)) {
|
|
164
|
+
const normalizedProjectPath = path.replace(/\/$/, "");
|
|
165
|
+
if (normalizedPath === normalizedProjectPath) {
|
|
166
|
+
return name;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Detect collisions between registered project names and local persona names.
|
|
173
|
+
* When a collision exists, @name will route to the project (projects take priority).
|
|
174
|
+
*/
|
|
175
|
+
export async function detectNameCollisions(personaNames) {
|
|
176
|
+
const registry = await loadRegistry();
|
|
177
|
+
const collisions = [];
|
|
178
|
+
for (const [projectName, projectPath] of Object.entries(registry.projects)) {
|
|
179
|
+
// Check if any persona name matches the project name
|
|
180
|
+
for (const personaName of personaNames) {
|
|
181
|
+
if (personaName === projectName) {
|
|
182
|
+
collisions.push({
|
|
183
|
+
name: projectName,
|
|
184
|
+
projectPath: projectPath,
|
|
185
|
+
personaPath: personaName,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return collisions;
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/lib/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAEtE,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;AAC5D,MAAM,aAAa,GAAG,eAAe,CAAC;AAuBtC;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACtD,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAoB,CAAC;QACnD,OAAO,IAAI,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;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