@a-company/paradigm 5.8.1 → 5.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-loader-DBF4OARL.js → agent-loader-X7TDYLFL.js} +9 -1
- package/dist/{chunk-T3YGSZCI.js → chunk-3UCH56D5.js} +1 -1
- package/dist/{chunk-ITPJJIHG.js → chunk-MA7G4CTI.js} +36 -1
- package/dist/chunk-NQKQG45G.js +688 -0
- package/dist/{chunk-B2RC3HEB.js → chunk-V7BZBBI6.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp.js +204 -667
- package/dist/{nomination-engine-LPLCCDW2.js → nomination-engine-LLREC5BZ.js} +2 -2
- package/dist/{reindex-KFUPB3ES.js → reindex-U2HEB6GW.js} +1 -1
- package/dist/{shift-2NYRFVEZ.js → shift-VJUGMADR.js} +260 -64
- package/dist/symphony-loader-UZGON56V.js +90 -0
- package/package.json +1 -1
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
processEvent,
|
|
18
18
|
processPendingEvents,
|
|
19
19
|
resolveDebate
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-V7BZBBI6.js";
|
|
21
|
+
import "./chunk-MA7G4CTI.js";
|
|
22
22
|
import "./chunk-MCMOGQMU.js";
|
|
23
23
|
import "./chunk-7N7GSU6K.js";
|
|
24
24
|
init_nomination_engine();
|
|
@@ -46,16 +46,191 @@ import "./chunk-YMDLDELF.js";
|
|
|
46
46
|
import "./chunk-PDX44BCA.js";
|
|
47
47
|
|
|
48
48
|
// src/commands/shift.ts
|
|
49
|
-
import * as
|
|
50
|
-
import * as
|
|
49
|
+
import * as fs2 from "fs";
|
|
50
|
+
import * as path2 from "path";
|
|
51
51
|
import chalk from "chalk";
|
|
52
52
|
import ora from "ora";
|
|
53
53
|
import * as yaml from "js-yaml";
|
|
54
|
+
|
|
55
|
+
// src/core/project-type.ts
|
|
56
|
+
import * as fs from "fs";
|
|
57
|
+
import * as path from "path";
|
|
58
|
+
import { Glob } from "glob";
|
|
59
|
+
function detectProjectType(cwd) {
|
|
60
|
+
const exists = (p) => {
|
|
61
|
+
if (p.includes("*")) {
|
|
62
|
+
try {
|
|
63
|
+
const matches = new Glob(p, { cwd, nodir: true }).walkSync();
|
|
64
|
+
return matches.length > 0;
|
|
65
|
+
} catch {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return fs.existsSync(path.join(cwd, p));
|
|
70
|
+
};
|
|
71
|
+
if (exists("project.godot") || exists("Assets/ProjectSettings")) return "game";
|
|
72
|
+
if (exists("Package.swift") && !exists("package.json")) {
|
|
73
|
+
return exists("Sources/*/App") || exists("**/AppDelegate.swift") ? "macos-app" : "ios-app";
|
|
74
|
+
}
|
|
75
|
+
if (exists("pubspec.yaml")) return "flutter-app";
|
|
76
|
+
if (exists("supabase") && (exists("next.config.*") || exists("vite.config.*"))) return "saas-web-app";
|
|
77
|
+
if (exists("next.config.*") || exists("vite.config.*") || exists("nuxt.config.*")) return "web-app";
|
|
78
|
+
if (exists("Dockerfile") || exists("prisma") || exists("drizzle.config.*")) return "backend-api";
|
|
79
|
+
if (exists("Cargo.toml")) return "rust-project";
|
|
80
|
+
if (exists("pyproject.toml") || exists("setup.py") || exists("requirements.txt")) return "python-project";
|
|
81
|
+
return "generic";
|
|
82
|
+
}
|
|
83
|
+
var ROSTER_SUGGESTIONS = {
|
|
84
|
+
"saas-web-app": [
|
|
85
|
+
"architect",
|
|
86
|
+
"builder",
|
|
87
|
+
"reviewer",
|
|
88
|
+
"tester",
|
|
89
|
+
"security",
|
|
90
|
+
"documentor",
|
|
91
|
+
"designer",
|
|
92
|
+
"copywriter",
|
|
93
|
+
"performance",
|
|
94
|
+
"devops",
|
|
95
|
+
"dba",
|
|
96
|
+
"e2e",
|
|
97
|
+
"dx",
|
|
98
|
+
"seo",
|
|
99
|
+
"pm",
|
|
100
|
+
"product",
|
|
101
|
+
"sales",
|
|
102
|
+
"legal",
|
|
103
|
+
"a11y",
|
|
104
|
+
"qa",
|
|
105
|
+
"advocate",
|
|
106
|
+
"debugger",
|
|
107
|
+
"release",
|
|
108
|
+
"narrator"
|
|
109
|
+
],
|
|
110
|
+
"web-app": [
|
|
111
|
+
"architect",
|
|
112
|
+
"builder",
|
|
113
|
+
"reviewer",
|
|
114
|
+
"tester",
|
|
115
|
+
"security",
|
|
116
|
+
"documentor",
|
|
117
|
+
"designer",
|
|
118
|
+
"copywriter",
|
|
119
|
+
"performance",
|
|
120
|
+
"devops",
|
|
121
|
+
"e2e",
|
|
122
|
+
"seo",
|
|
123
|
+
"a11y",
|
|
124
|
+
"qa",
|
|
125
|
+
"debugger"
|
|
126
|
+
],
|
|
127
|
+
"backend-api": [
|
|
128
|
+
"architect",
|
|
129
|
+
"builder",
|
|
130
|
+
"reviewer",
|
|
131
|
+
"tester",
|
|
132
|
+
"security",
|
|
133
|
+
"documentor",
|
|
134
|
+
"devops",
|
|
135
|
+
"dba",
|
|
136
|
+
"performance",
|
|
137
|
+
"dx",
|
|
138
|
+
"qa",
|
|
139
|
+
"debugger",
|
|
140
|
+
"release"
|
|
141
|
+
],
|
|
142
|
+
"ios-app": [
|
|
143
|
+
"architect",
|
|
144
|
+
"builder",
|
|
145
|
+
"reviewer",
|
|
146
|
+
"tester",
|
|
147
|
+
"security",
|
|
148
|
+
"documentor",
|
|
149
|
+
"designer",
|
|
150
|
+
"mobile",
|
|
151
|
+
"performance",
|
|
152
|
+
"a11y",
|
|
153
|
+
"qa",
|
|
154
|
+
"debugger"
|
|
155
|
+
],
|
|
156
|
+
"macos-app": [
|
|
157
|
+
"architect",
|
|
158
|
+
"builder",
|
|
159
|
+
"reviewer",
|
|
160
|
+
"tester",
|
|
161
|
+
"security",
|
|
162
|
+
"documentor",
|
|
163
|
+
"designer",
|
|
164
|
+
"performance",
|
|
165
|
+
"qa",
|
|
166
|
+
"debugger"
|
|
167
|
+
],
|
|
168
|
+
"flutter-app": [
|
|
169
|
+
"architect",
|
|
170
|
+
"builder",
|
|
171
|
+
"reviewer",
|
|
172
|
+
"tester",
|
|
173
|
+
"security",
|
|
174
|
+
"documentor",
|
|
175
|
+
"designer",
|
|
176
|
+
"mobile",
|
|
177
|
+
"performance",
|
|
178
|
+
"a11y",
|
|
179
|
+
"debugger"
|
|
180
|
+
],
|
|
181
|
+
"game": [
|
|
182
|
+
"architect",
|
|
183
|
+
"builder",
|
|
184
|
+
"reviewer",
|
|
185
|
+
"tester",
|
|
186
|
+
"documentor",
|
|
187
|
+
"gamedev",
|
|
188
|
+
"3d",
|
|
189
|
+
"audio",
|
|
190
|
+
"designer",
|
|
191
|
+
"performance",
|
|
192
|
+
"debugger"
|
|
193
|
+
],
|
|
194
|
+
"rust-project": [
|
|
195
|
+
"architect",
|
|
196
|
+
"builder",
|
|
197
|
+
"reviewer",
|
|
198
|
+
"tester",
|
|
199
|
+
"security",
|
|
200
|
+
"documentor",
|
|
201
|
+
"performance",
|
|
202
|
+
"debugger",
|
|
203
|
+
"qa"
|
|
204
|
+
],
|
|
205
|
+
"python-project": [
|
|
206
|
+
"architect",
|
|
207
|
+
"builder",
|
|
208
|
+
"reviewer",
|
|
209
|
+
"tester",
|
|
210
|
+
"security",
|
|
211
|
+
"documentor",
|
|
212
|
+
"performance",
|
|
213
|
+
"debugger",
|
|
214
|
+
"qa"
|
|
215
|
+
],
|
|
216
|
+
"generic": [
|
|
217
|
+
"architect",
|
|
218
|
+
"builder",
|
|
219
|
+
"reviewer",
|
|
220
|
+
"tester",
|
|
221
|
+
"security",
|
|
222
|
+
"documentor",
|
|
223
|
+
"debugger",
|
|
224
|
+
"qa"
|
|
225
|
+
]
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
// src/commands/shift.ts
|
|
54
229
|
async function shiftCommand(options = {}) {
|
|
55
230
|
const cwd = process.cwd();
|
|
56
|
-
const projectName =
|
|
57
|
-
const paradigmDir =
|
|
58
|
-
const isInitialized =
|
|
231
|
+
const projectName = path2.basename(cwd);
|
|
232
|
+
const paradigmDir = path2.join(cwd, ".paradigm");
|
|
233
|
+
const isInitialized = fs2.existsSync(paradigmDir) && fs2.statSync(paradigmDir).isDirectory();
|
|
59
234
|
console.log(chalk.blue("\n\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
|
|
60
235
|
console.log(chalk.blue("\u2502") + chalk.white.bold(" paradigm shift ") + chalk.blue("\u2502"));
|
|
61
236
|
console.log(chalk.blue("\u2502") + chalk.gray(" Full project setup in one command ") + chalk.blue("\u2502"));
|
|
@@ -83,10 +258,10 @@ async function shiftCommand(options = {}) {
|
|
|
83
258
|
}
|
|
84
259
|
} else {
|
|
85
260
|
spinner.succeed(chalk.gray("Step 1/6: Already initialized (use --force to reinit)"));
|
|
86
|
-
const configPath =
|
|
87
|
-
if (
|
|
261
|
+
const configPath = path2.join(paradigmDir, "config.yaml");
|
|
262
|
+
if (fs2.existsSync(configPath)) {
|
|
88
263
|
try {
|
|
89
|
-
const configContent =
|
|
264
|
+
const configContent = fs2.readFileSync(configPath, "utf8");
|
|
90
265
|
const config = yaml.load(configContent);
|
|
91
266
|
if (!config.discipline || config.discipline === "auto") {
|
|
92
267
|
const detected = detectDiscipline(cwd);
|
|
@@ -96,7 +271,7 @@ async function shiftCommand(options = {}) {
|
|
|
96
271
|
`discipline: ${detected}`
|
|
97
272
|
);
|
|
98
273
|
if (updated !== configContent) {
|
|
99
|
-
|
|
274
|
+
fs2.writeFileSync(configPath, updated, "utf8");
|
|
100
275
|
console.log(chalk.green(` \u2713 Detected discipline: ${chalk.cyan(detected)} (updated config.yaml)`));
|
|
101
276
|
}
|
|
102
277
|
} else if (!config.discipline) {
|
|
@@ -106,7 +281,7 @@ async function shiftCommand(options = {}) {
|
|
|
106
281
|
discipline: ${detected}`
|
|
107
282
|
);
|
|
108
283
|
if (withDiscipline !== configContent) {
|
|
109
|
-
|
|
284
|
+
fs2.writeFileSync(configPath, withDiscipline, "utf8");
|
|
110
285
|
console.log(chalk.green(` \u2713 Added discipline: ${chalk.cyan(detected)} to config.yaml`));
|
|
111
286
|
}
|
|
112
287
|
}
|
|
@@ -127,17 +302,17 @@ discipline: ${detected}`
|
|
|
127
302
|
}
|
|
128
303
|
}
|
|
129
304
|
{
|
|
130
|
-
const configPath =
|
|
131
|
-
if (options.workspace &&
|
|
132
|
-
const wsFilePath = options.workspacePath ?
|
|
133
|
-
if (
|
|
305
|
+
const configPath = path2.join(paradigmDir, "config.yaml");
|
|
306
|
+
if (options.workspace && fs2.existsSync(configPath)) {
|
|
307
|
+
const wsFilePath = options.workspacePath ? path2.resolve(cwd, options.workspacePath) : path2.join(path2.dirname(cwd), ".paradigm-workspace");
|
|
308
|
+
if (fs2.existsSync(wsFilePath)) {
|
|
134
309
|
try {
|
|
135
|
-
const wsConfig = yaml.load(
|
|
136
|
-
const currentName =
|
|
137
|
-
const wsDir =
|
|
138
|
-
const relPath = "./" +
|
|
310
|
+
const wsConfig = yaml.load(fs2.readFileSync(wsFilePath, "utf8"));
|
|
311
|
+
const currentName = path2.basename(cwd);
|
|
312
|
+
const wsDir = path2.dirname(wsFilePath);
|
|
313
|
+
const relPath = "./" + path2.relative(wsDir, cwd);
|
|
139
314
|
const alreadyMember = wsConfig.members.some(
|
|
140
|
-
(m) =>
|
|
315
|
+
(m) => path2.resolve(wsDir, m.path) === cwd
|
|
141
316
|
);
|
|
142
317
|
if (!alreadyMember) {
|
|
143
318
|
const role = detectProjectRole(currentName, cwd);
|
|
@@ -146,7 +321,7 @@ discipline: ${detected}`
|
|
|
146
321
|
path: relPath,
|
|
147
322
|
...role && { role }
|
|
148
323
|
});
|
|
149
|
-
|
|
324
|
+
fs2.writeFileSync(
|
|
150
325
|
wsFilePath,
|
|
151
326
|
yaml.dump(wsConfig, { indent: 2, lineWidth: 120, noRefs: true, sortKeys: false, quotingType: '"' }),
|
|
152
327
|
"utf8"
|
|
@@ -160,66 +335,66 @@ discipline: ${detected}`
|
|
|
160
335
|
}
|
|
161
336
|
} else {
|
|
162
337
|
try {
|
|
163
|
-
const currentName =
|
|
164
|
-
const wsDir =
|
|
165
|
-
const relPath = "./" +
|
|
338
|
+
const currentName = path2.basename(cwd);
|
|
339
|
+
const wsDir = path2.dirname(wsFilePath);
|
|
340
|
+
const relPath = "./" + path2.relative(wsDir, cwd);
|
|
166
341
|
const role = detectProjectRole(currentName, cwd);
|
|
167
342
|
const wsConfig = {
|
|
168
343
|
version: "1.0",
|
|
169
344
|
name: options.workspace,
|
|
170
345
|
members: [{ name: currentName, path: relPath, ...role && { role } }]
|
|
171
346
|
};
|
|
172
|
-
|
|
173
|
-
|
|
347
|
+
fs2.mkdirSync(path2.dirname(wsFilePath), { recursive: true });
|
|
348
|
+
fs2.writeFileSync(
|
|
174
349
|
wsFilePath,
|
|
175
350
|
yaml.dump(wsConfig, { indent: 2, lineWidth: 120, noRefs: true, sortKeys: false, quotingType: '"' }),
|
|
176
351
|
"utf8"
|
|
177
352
|
);
|
|
178
|
-
console.log(chalk.green(` \u2713 Created workspace: ${chalk.cyan(options.workspace)} at ${chalk.gray(
|
|
353
|
+
console.log(chalk.green(` \u2713 Created workspace: ${chalk.cyan(options.workspace)} at ${chalk.gray(path2.relative(cwd, wsFilePath))}`));
|
|
179
354
|
} catch (e) {
|
|
180
355
|
console.log(chalk.yellow(` \u26A0 Failed to create workspace: ${e.message}`));
|
|
181
356
|
}
|
|
182
357
|
}
|
|
183
358
|
try {
|
|
184
|
-
const configContent =
|
|
359
|
+
const configContent = fs2.readFileSync(configPath, "utf8");
|
|
185
360
|
const config = yaml.load(configContent);
|
|
186
|
-
const relWsPath =
|
|
361
|
+
const relWsPath = path2.relative(cwd, wsFilePath);
|
|
187
362
|
if (config.workspace !== relWsPath) {
|
|
188
363
|
if (config.workspace) {
|
|
189
364
|
const updated = configContent.replace(
|
|
190
365
|
/^workspace:\s*.*$/m,
|
|
191
366
|
`workspace: "${relWsPath}"`
|
|
192
367
|
);
|
|
193
|
-
|
|
368
|
+
fs2.writeFileSync(configPath, updated, "utf8");
|
|
194
369
|
} else {
|
|
195
370
|
const updated = configContent.trimEnd() + `
|
|
196
371
|
workspace: "${relWsPath}"
|
|
197
372
|
`;
|
|
198
|
-
|
|
373
|
+
fs2.writeFileSync(configPath, updated, "utf8");
|
|
199
374
|
}
|
|
200
375
|
console.log(chalk.green(` \u2713 Linked workspace in config.yaml`));
|
|
201
376
|
}
|
|
202
377
|
} catch (e) {
|
|
203
378
|
log.operation("shift").debug("Workspace config link failed", { error: e.message });
|
|
204
379
|
}
|
|
205
|
-
} else if (
|
|
380
|
+
} else if (fs2.existsSync(configPath)) {
|
|
206
381
|
try {
|
|
207
|
-
const configContent =
|
|
382
|
+
const configContent = fs2.readFileSync(configPath, "utf8");
|
|
208
383
|
const config = yaml.load(configContent);
|
|
209
384
|
if (!config.workspace) {
|
|
210
|
-
let searchDir =
|
|
385
|
+
let searchDir = path2.dirname(cwd);
|
|
211
386
|
for (let i = 0; i < 3; i++) {
|
|
212
|
-
const wsCandidate =
|
|
213
|
-
if (
|
|
214
|
-
const relPath =
|
|
387
|
+
const wsCandidate = path2.join(searchDir, ".paradigm-workspace");
|
|
388
|
+
if (fs2.existsSync(wsCandidate)) {
|
|
389
|
+
const relPath = path2.relative(cwd, wsCandidate);
|
|
215
390
|
const updated = configContent.trimEnd() + `
|
|
216
391
|
workspace: "${relPath}"
|
|
217
392
|
`;
|
|
218
|
-
|
|
393
|
+
fs2.writeFileSync(configPath, updated, "utf8");
|
|
219
394
|
console.log(chalk.green(` \u2713 Found workspace: ${chalk.cyan(relPath)} (added to config.yaml)`));
|
|
220
395
|
break;
|
|
221
396
|
}
|
|
222
|
-
const parent =
|
|
397
|
+
const parent = path2.dirname(searchDir);
|
|
223
398
|
if (parent === searchDir) break;
|
|
224
399
|
searchDir = parent;
|
|
225
400
|
}
|
|
@@ -247,6 +422,26 @@ workspace: "${relPath}"
|
|
|
247
422
|
} else {
|
|
248
423
|
spinner.succeed(chalk.gray("Step 2/6: Team already configured (use --force to reinit)"));
|
|
249
424
|
}
|
|
425
|
+
const rosterPath = path2.join(cwd, ".paradigm", "roster.yaml");
|
|
426
|
+
if (!fs2.existsSync(rosterPath) || options.force) {
|
|
427
|
+
try {
|
|
428
|
+
const projectType = detectProjectType(cwd);
|
|
429
|
+
const suggested = ROSTER_SUGGESTIONS[projectType] || ROSTER_SUGGESTIONS["generic"];
|
|
430
|
+
const rosterData = { version: "1.0", project: projectName, type: projectType, active: suggested.sort() };
|
|
431
|
+
fs2.writeFileSync(rosterPath, yaml.dump(rosterData, { lineWidth: -1, noRefs: true }), "utf8");
|
|
432
|
+
console.log(chalk.green(` \u2713 Agent roster set: ${chalk.cyan(suggested.length)} agents for ${chalk.cyan(projectType)}`));
|
|
433
|
+
} catch (e) {
|
|
434
|
+
log.operation("shift").debug("Roster setup failed", { error: e.message });
|
|
435
|
+
}
|
|
436
|
+
} else {
|
|
437
|
+
try {
|
|
438
|
+
const existing = yaml.load(fs2.readFileSync(rosterPath, "utf8"));
|
|
439
|
+
const count = existing?.active?.length ?? 0;
|
|
440
|
+
console.log(chalk.gray(` \u2713 Agent roster exists (${count} agents active)`));
|
|
441
|
+
} catch {
|
|
442
|
+
console.log(chalk.gray(" \u2713 Agent roster exists"));
|
|
443
|
+
}
|
|
444
|
+
}
|
|
250
445
|
if (!options.quick) {
|
|
251
446
|
spinner.start("Step 3/6: Scanning and indexing symbols...");
|
|
252
447
|
try {
|
|
@@ -259,10 +454,10 @@ workspace: "${relPath}"
|
|
|
259
454
|
spinner.succeed(chalk.gray("Step 3/6: Skipped scan (--quick mode)"));
|
|
260
455
|
}
|
|
261
456
|
{
|
|
262
|
-
const configPath =
|
|
263
|
-
if (
|
|
457
|
+
const configPath = path2.join(paradigmDir, "config.yaml");
|
|
458
|
+
if (fs2.existsSync(configPath)) {
|
|
264
459
|
try {
|
|
265
|
-
const configForWs = yaml.load(
|
|
460
|
+
const configForWs = yaml.load(fs2.readFileSync(configPath, "utf8"));
|
|
266
461
|
if (configForWs.workspace) {
|
|
267
462
|
spinner.start("Step 3b/6: Reindexing workspace members...");
|
|
268
463
|
try {
|
|
@@ -278,29 +473,29 @@ workspace: "${relPath}"
|
|
|
278
473
|
}
|
|
279
474
|
}
|
|
280
475
|
}
|
|
281
|
-
const portalPath =
|
|
282
|
-
if (!
|
|
476
|
+
const portalPath = path2.join(cwd, "portal.yaml");
|
|
477
|
+
if (!fs2.existsSync(portalPath)) {
|
|
283
478
|
const defaultPortal = { version: "1.0.0", gates: {}, routes: {} };
|
|
284
|
-
|
|
479
|
+
fs2.writeFileSync(portalPath, yaml.dump(defaultPortal, { lineWidth: -1, noRefs: true }), "utf8");
|
|
285
480
|
}
|
|
286
|
-
const lorePath =
|
|
287
|
-
if (!
|
|
288
|
-
|
|
481
|
+
const lorePath = path2.join(cwd, ".paradigm", "lore");
|
|
482
|
+
if (!fs2.existsSync(lorePath)) {
|
|
483
|
+
fs2.mkdirSync(lorePath, { recursive: true });
|
|
289
484
|
}
|
|
290
|
-
const uniBase =
|
|
485
|
+
const uniBase = path2.join(cwd, ".paradigm", "university");
|
|
291
486
|
for (const subdir of ["content/notes", "content/policies", "content/quizzes", "content/paths", "diplomas"]) {
|
|
292
|
-
const dirPath =
|
|
293
|
-
if (!
|
|
294
|
-
|
|
487
|
+
const dirPath = path2.join(uniBase, subdir);
|
|
488
|
+
if (!fs2.existsSync(dirPath)) {
|
|
489
|
+
fs2.mkdirSync(dirPath, { recursive: true });
|
|
295
490
|
}
|
|
296
491
|
}
|
|
297
|
-
const uniConfigPath =
|
|
298
|
-
if (!
|
|
492
|
+
const uniConfigPath = path2.join(uniBase, "config.yaml");
|
|
493
|
+
if (!fs2.existsSync(uniConfigPath)) {
|
|
299
494
|
let projectName2 = "Project";
|
|
300
495
|
try {
|
|
301
|
-
const configPath =
|
|
302
|
-
if (
|
|
303
|
-
const configData = yaml.load(
|
|
496
|
+
const configPath = path2.join(cwd, ".paradigm", "config.yaml");
|
|
497
|
+
if (fs2.existsSync(configPath)) {
|
|
498
|
+
const configData = yaml.load(fs2.readFileSync(configPath, "utf8"));
|
|
304
499
|
if (configData.project && typeof configData.project === "string") {
|
|
305
500
|
projectName2 = configData.project;
|
|
306
501
|
}
|
|
@@ -334,7 +529,7 @@ workspace: "${relPath}"
|
|
|
334
529
|
includeGlobalPLSAT: true
|
|
335
530
|
}
|
|
336
531
|
};
|
|
337
|
-
|
|
532
|
+
fs2.writeFileSync(uniConfigPath, yaml.dump(uniConfig, { lineWidth: -1, noRefs: true }), "utf8");
|
|
338
533
|
}
|
|
339
534
|
spinner.start("Step 4/6: Syncing IDE configurations...");
|
|
340
535
|
try {
|
|
@@ -391,19 +586,20 @@ workspace: "${relPath}"
|
|
|
391
586
|
{ path: ".purpose", desc: "Root feature definitions" },
|
|
392
587
|
{ path: ".paradigm/lore/", desc: "Project lore timeline", isDir: true },
|
|
393
588
|
{ path: "portal.yaml", desc: "Authorization gates" },
|
|
589
|
+
{ path: ".paradigm/roster.yaml", desc: "Agent roster for this project" },
|
|
394
590
|
{ path: "CLAUDE.md", desc: "Claude Code AI instructions" },
|
|
395
591
|
{ path: "AGENTS.md", desc: "Universal AI agent instructions" },
|
|
396
592
|
{ path: ".cursor/rules/", desc: "Cursor AI instructions", isDir: true },
|
|
397
593
|
{ path: ".claude/hooks/", desc: "Claude Code enforcement hooks", isDir: true, optional: true },
|
|
398
594
|
{ path: ".cursor/hooks/", desc: "Cursor enforcement hooks", isDir: true, optional: true }
|
|
399
595
|
];
|
|
400
|
-
const configPathForSummary =
|
|
401
|
-
if (
|
|
596
|
+
const configPathForSummary = path2.join(paradigmDir, "config.yaml");
|
|
597
|
+
if (fs2.existsSync(configPathForSummary)) {
|
|
402
598
|
try {
|
|
403
|
-
const cfg = yaml.load(
|
|
599
|
+
const cfg = yaml.load(fs2.readFileSync(configPathForSummary, "utf8"));
|
|
404
600
|
if (typeof cfg.workspace === "string") {
|
|
405
|
-
const wsAbsPath =
|
|
406
|
-
const wsRelPath =
|
|
601
|
+
const wsAbsPath = path2.resolve(cwd, cfg.workspace);
|
|
602
|
+
const wsRelPath = path2.relative(cwd, wsAbsPath);
|
|
407
603
|
files.push({ path: wsRelPath, desc: "Multi-project workspace", optional: true });
|
|
408
604
|
}
|
|
409
605
|
} catch (e) {
|
|
@@ -411,8 +607,8 @@ workspace: "${relPath}"
|
|
|
411
607
|
}
|
|
412
608
|
}
|
|
413
609
|
for (const file of files) {
|
|
414
|
-
const fullPath =
|
|
415
|
-
if (
|
|
610
|
+
const fullPath = path2.join(cwd, file.path);
|
|
611
|
+
if (fs2.existsSync(fullPath)) {
|
|
416
612
|
console.log(chalk.green(" \u2713 ") + chalk.white(file.path.padEnd(28)) + chalk.gray(file.desc));
|
|
417
613
|
} else if (!file.optional) {
|
|
418
614
|
console.log(chalk.yellow(" \u25CB ") + chalk.gray(file.path.padEnd(28)) + chalk.gray(`(${file.desc})`));
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
SCORE_DIR,
|
|
4
|
+
acknowledgeMessages,
|
|
5
|
+
appendJsonlLine,
|
|
6
|
+
appendToInbox,
|
|
7
|
+
appendToOutbox,
|
|
8
|
+
approveFileRequest,
|
|
9
|
+
buildMessage,
|
|
10
|
+
cleanStaleAgents,
|
|
11
|
+
createFileRequest,
|
|
12
|
+
createThread,
|
|
13
|
+
denyFileRequest,
|
|
14
|
+
discoverClaudeCodeSessions,
|
|
15
|
+
ensureMailDirs,
|
|
16
|
+
ensureScoreDirs,
|
|
17
|
+
expireOldRequests,
|
|
18
|
+
garbageCollect,
|
|
19
|
+
getAgentDir,
|
|
20
|
+
getMyIdentity,
|
|
21
|
+
getThreadMessages,
|
|
22
|
+
isAgentAsleep,
|
|
23
|
+
isPathAutoApproved,
|
|
24
|
+
isPathDenied,
|
|
25
|
+
listAgents,
|
|
26
|
+
listFileRequests,
|
|
27
|
+
listThreads,
|
|
28
|
+
loadFileRequest,
|
|
29
|
+
loadThread,
|
|
30
|
+
loadTrustConfig,
|
|
31
|
+
markAgentPollTime,
|
|
32
|
+
peekInbox,
|
|
33
|
+
readAck,
|
|
34
|
+
readInbox,
|
|
35
|
+
readJsonlFile,
|
|
36
|
+
readOutbox,
|
|
37
|
+
recordAckSize,
|
|
38
|
+
registerAgent,
|
|
39
|
+
resolveAgentIdentity,
|
|
40
|
+
resolveThread,
|
|
41
|
+
routeMessage,
|
|
42
|
+
unregisterAgent,
|
|
43
|
+
updateAgentStatus,
|
|
44
|
+
updateThread
|
|
45
|
+
} from "./chunk-NQKQG45G.js";
|
|
46
|
+
import "./chunk-7N7GSU6K.js";
|
|
47
|
+
export {
|
|
48
|
+
SCORE_DIR,
|
|
49
|
+
acknowledgeMessages,
|
|
50
|
+
appendJsonlLine,
|
|
51
|
+
appendToInbox,
|
|
52
|
+
appendToOutbox,
|
|
53
|
+
approveFileRequest,
|
|
54
|
+
buildMessage,
|
|
55
|
+
cleanStaleAgents,
|
|
56
|
+
createFileRequest,
|
|
57
|
+
createThread,
|
|
58
|
+
denyFileRequest,
|
|
59
|
+
discoverClaudeCodeSessions,
|
|
60
|
+
ensureMailDirs,
|
|
61
|
+
ensureScoreDirs,
|
|
62
|
+
expireOldRequests,
|
|
63
|
+
garbageCollect,
|
|
64
|
+
getAgentDir,
|
|
65
|
+
getMyIdentity,
|
|
66
|
+
getThreadMessages,
|
|
67
|
+
isAgentAsleep,
|
|
68
|
+
isPathAutoApproved,
|
|
69
|
+
isPathDenied,
|
|
70
|
+
listAgents,
|
|
71
|
+
listFileRequests,
|
|
72
|
+
listThreads,
|
|
73
|
+
loadFileRequest,
|
|
74
|
+
loadThread,
|
|
75
|
+
loadTrustConfig,
|
|
76
|
+
markAgentPollTime,
|
|
77
|
+
peekInbox,
|
|
78
|
+
readAck,
|
|
79
|
+
readInbox,
|
|
80
|
+
readJsonlFile,
|
|
81
|
+
readOutbox,
|
|
82
|
+
recordAckSize,
|
|
83
|
+
registerAgent,
|
|
84
|
+
resolveAgentIdentity,
|
|
85
|
+
resolveThread,
|
|
86
|
+
routeMessage,
|
|
87
|
+
unregisterAgent,
|
|
88
|
+
updateAgentStatus,
|
|
89
|
+
updateThread
|
|
90
|
+
};
|