@locusai/sdk 0.7.0 → 0.7.3
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/task-executor.d.ts +0 -1
- package/dist/agent/task-executor.d.ts.map +1 -1
- package/dist/agent/worker.d.ts +0 -1
- package/dist/agent/worker.d.ts.map +1 -1
- package/dist/agent/worker.js +104 -19
- package/dist/core/indexer.d.ts.map +1 -1
- package/dist/core/prompt-builder.d.ts +1 -0
- package/dist/core/prompt-builder.d.ts.map +1 -1
- package/dist/index-node.js +104 -22
- package/dist/index.js +7 -0
- package/dist/modules/ai.d.ts +9 -1
- package/dist/modules/ai.d.ts.map +1 -1
- package/dist/orchestrator.d.ts +0 -1
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/utils/colors.d.ts +14 -0
- package/dist/utils/colors.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-executor.d.ts","sourceRoot":"","sources":["../../src/agent/task-executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"task-executor.d.ts","sourceRoot":"","sources":["../../src/agent/task-executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,KAAK,CAAC;CACZ;AAED;;GAEG;AACH,qBAAa,YAAY;IAGX,OAAO,CAAC,IAAI;IAFxB,OAAO,CAAC,aAAa,CAAgB;gBAEjB,IAAI,EAAE,gBAAgB;IAIpC,OAAO,CACX,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CA2ClD"}
|
package/dist/agent/worker.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/agent/worker.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,iBAAiB,CAAC;AAsB5D,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/agent/worker.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,iBAAiB,CAAC;AAsB5D,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,UAAU,CAAC;CACvB;AAED;;;GAGG;AACH,qBAAa,WAAW;IAgBV,OAAO,CAAC,MAAM;IAf1B,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,QAAQ,CAAW;IAG3B,OAAO,CAAC,cAAc,CAAyB;IAC/C,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,YAAY,CAAe;IAGnC,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,YAAY,CAAU;gBAEV,MAAM,EAAE,YAAY;IAiDxC,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAgB;YAe5D,eAAe;YAcf,WAAW;YAiBX,WAAW;IA6BnB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAqF3B"}
|
package/dist/agent/worker.js
CHANGED
|
@@ -114,6 +114,13 @@ class AIModule extends BaseModule {
|
|
|
114
114
|
async deleteSession(workspaceId, sessionId) {
|
|
115
115
|
await this.api.delete(`/ai/${workspaceId}/session/${sessionId}`);
|
|
116
116
|
}
|
|
117
|
+
async shareSession(workspaceId, sessionId, body) {
|
|
118
|
+
await this.api.post(`/ai/${workspaceId}/session/${sessionId}/share`, body);
|
|
119
|
+
}
|
|
120
|
+
async getSharedSession(sessionId) {
|
|
121
|
+
const { data } = await this.api.get(`/ai/shared/${sessionId}`);
|
|
122
|
+
return data;
|
|
123
|
+
}
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
// src/modules/auth.ts
|
|
@@ -556,7 +563,15 @@ var colors = {
|
|
|
556
563
|
brightBlue: `${ESC}94m`,
|
|
557
564
|
brightMagenta: `${ESC}95m`,
|
|
558
565
|
brightCyan: `${ESC}96m`,
|
|
559
|
-
brightWhite: `${ESC}97m
|
|
566
|
+
brightWhite: `${ESC}97m`,
|
|
567
|
+
bgBlack: `${ESC}40m`,
|
|
568
|
+
bgRed: `${ESC}41m`,
|
|
569
|
+
bgGreen: `${ESC}42m`,
|
|
570
|
+
bgYellow: `${ESC}43m`,
|
|
571
|
+
bgBlue: `${ESC}44m`,
|
|
572
|
+
bgMagenta: `${ESC}45m`,
|
|
573
|
+
bgCyan: `${ESC}46m`,
|
|
574
|
+
bgWhite: `${ESC}47m`
|
|
560
575
|
};
|
|
561
576
|
var c = {
|
|
562
577
|
text: (text, ...colorNames) => {
|
|
@@ -572,11 +587,17 @@ var c = {
|
|
|
572
587
|
magenta: (t) => c.text(t, "magenta"),
|
|
573
588
|
cyan: (t) => c.text(t, "cyan"),
|
|
574
589
|
gray: (t) => c.text(t, "gray"),
|
|
590
|
+
white: (t) => c.text(t, "white"),
|
|
591
|
+
brightBlue: (t) => c.text(t, "brightBlue"),
|
|
592
|
+
bgBlue: (t) => c.text(t, "bgBlue", "white", "bold"),
|
|
575
593
|
success: (t) => c.text(t, "green", "bold"),
|
|
576
594
|
error: (t) => c.text(t, "red", "bold"),
|
|
577
595
|
warning: (t) => c.text(t, "yellow", "bold"),
|
|
578
596
|
info: (t) => c.text(t, "cyan", "bold"),
|
|
579
597
|
primary: (t) => c.text(t, "blue", "bold"),
|
|
598
|
+
secondary: (t) => c.text(t, "magenta", "bold"),
|
|
599
|
+
header: (t) => c.text(` ${t} `, "bgBlue", "white", "bold"),
|
|
600
|
+
step: (t) => c.text(` ${t} `, "bgCyan", "black", "bold"),
|
|
580
601
|
underline: (t) => c.text(t, "underline")
|
|
581
602
|
};
|
|
582
603
|
|
|
@@ -704,7 +725,6 @@ class ClaudeRunner {
|
|
|
704
725
|
if (type === "content_block_start" && content_block) {
|
|
705
726
|
if (content_block.type === "tool_use" && content_block.name) {
|
|
706
727
|
this.log?.(`
|
|
707
|
-
|
|
708
728
|
${c.primary("[Claude]")} ${c.bold(`Running ${content_block.name}...`)}
|
|
709
729
|
`, "info");
|
|
710
730
|
}
|
|
@@ -980,13 +1000,10 @@ class CodebaseIndexer {
|
|
|
980
1000
|
`);
|
|
981
1001
|
const newTreeHash = this.hashTree(treeString);
|
|
982
1002
|
const existingIndex = this.loadIndex();
|
|
983
|
-
if (!force && existingIndex?.treeHash === newTreeHash) {
|
|
984
|
-
onProgress?.("No file changes detected, skipping reindex");
|
|
985
|
-
return null;
|
|
986
|
-
}
|
|
987
1003
|
const currentHashes = this.computeFileHashes(currentFiles);
|
|
988
1004
|
const existingHashes = existingIndex?.fileHashes;
|
|
989
|
-
const
|
|
1005
|
+
const hasExistingContent = existingIndex && (Object.keys(existingIndex.symbols).length > 0 || Object.keys(existingIndex.responsibilities).length > 0);
|
|
1006
|
+
const canIncremental = !force && existingIndex && existingHashes && hasExistingContent;
|
|
990
1007
|
if (canIncremental) {
|
|
991
1008
|
onProgress?.("Performing incremental update");
|
|
992
1009
|
const { added, deleted, modified } = this.diffFiles(currentHashes, existingHashes);
|
|
@@ -1019,8 +1036,12 @@ class CodebaseIndexer {
|
|
|
1019
1036
|
}
|
|
1020
1037
|
}
|
|
1021
1038
|
onProgress?.("AI is analyzing codebase structure...");
|
|
1022
|
-
|
|
1023
|
-
|
|
1039
|
+
try {
|
|
1040
|
+
const index = await treeSummarizer(treeString);
|
|
1041
|
+
return this.applyIndexMetadata(index, currentHashes, newTreeHash);
|
|
1042
|
+
} catch (error) {
|
|
1043
|
+
throw new Error(`AI analysis failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
1044
|
+
}
|
|
1024
1045
|
}
|
|
1025
1046
|
async getFileTree() {
|
|
1026
1047
|
const gitmodulesPath = import_node_path5.join(this.projectPath, ".gitmodules");
|
|
@@ -1372,6 +1393,76 @@ ${comment.text}
|
|
|
1372
1393
|
2. **Artifact Management**: If you create any high-level documentation (PRDs, technical drafts, architecture docs), you MUST save them in \`.locus/artifacts/\`. Do NOT create them in the root directory.
|
|
1373
1394
|
3. **Paths**: Use relative paths from the project root at all times. Do NOT use absolute local paths (e.g., /Users/...).
|
|
1374
1395
|
4. When finished successfully, output: <promise>COMPLETE</promise>
|
|
1396
|
+
`;
|
|
1397
|
+
return prompt;
|
|
1398
|
+
}
|
|
1399
|
+
async buildGenericPrompt(query) {
|
|
1400
|
+
let prompt = `# Direct Execution
|
|
1401
|
+
|
|
1402
|
+
`;
|
|
1403
|
+
prompt += `## Prompt
|
|
1404
|
+
${query}
|
|
1405
|
+
|
|
1406
|
+
`;
|
|
1407
|
+
const projectConfig = this.getProjectConfig();
|
|
1408
|
+
if (projectConfig) {
|
|
1409
|
+
prompt += `## Project Metadata
|
|
1410
|
+
`;
|
|
1411
|
+
prompt += `- Version: ${projectConfig.version || "Unknown"}
|
|
1412
|
+
`;
|
|
1413
|
+
prompt += `- Created At: ${projectConfig.createdAt || "Unknown"}
|
|
1414
|
+
|
|
1415
|
+
`;
|
|
1416
|
+
}
|
|
1417
|
+
const contextPath = getLocusPath(this.projectPath, "contextFile");
|
|
1418
|
+
let hasLocalContext = false;
|
|
1419
|
+
if (import_node_fs4.existsSync(contextPath)) {
|
|
1420
|
+
try {
|
|
1421
|
+
const context = import_node_fs4.readFileSync(contextPath, "utf-8");
|
|
1422
|
+
if (context.trim().length > 20) {
|
|
1423
|
+
prompt += `## Project Context (Local)
|
|
1424
|
+
${context}
|
|
1425
|
+
|
|
1426
|
+
`;
|
|
1427
|
+
hasLocalContext = true;
|
|
1428
|
+
}
|
|
1429
|
+
} catch (err) {
|
|
1430
|
+
console.warn(`Warning: Could not read context file: ${err}`);
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
if (!hasLocalContext) {
|
|
1434
|
+
const fallback = this.getFallbackContext();
|
|
1435
|
+
if (fallback) {
|
|
1436
|
+
prompt += `## Project Context (README Fallback)
|
|
1437
|
+
${fallback}
|
|
1438
|
+
|
|
1439
|
+
`;
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
prompt += this.getProjectStructure();
|
|
1443
|
+
prompt += this.getSkillsInfo();
|
|
1444
|
+
prompt += `## Project Knowledge Base
|
|
1445
|
+
`;
|
|
1446
|
+
prompt += `You have access to the following documentation directories for context:
|
|
1447
|
+
`;
|
|
1448
|
+
prompt += `- Artifacts: \`.locus/artifacts\`
|
|
1449
|
+
`;
|
|
1450
|
+
prompt += `- Documents: \`.locus/documents\`
|
|
1451
|
+
`;
|
|
1452
|
+
prompt += `If you need more information about the project strategies, plans, or architecture, please read files in these directories.
|
|
1453
|
+
|
|
1454
|
+
`;
|
|
1455
|
+
const indexPath = getLocusPath(this.projectPath, "indexFile");
|
|
1456
|
+
if (import_node_fs4.existsSync(indexPath)) {
|
|
1457
|
+
prompt += `## Codebase Overview
|
|
1458
|
+
There is an index file in the .locus/codebase-index.json and if you need you can check it.
|
|
1459
|
+
|
|
1460
|
+
`;
|
|
1461
|
+
}
|
|
1462
|
+
prompt += `## Instructions
|
|
1463
|
+
1. Execute the prompt based on the provided project context.
|
|
1464
|
+
2. **Paths**: Use relative paths from the project root at all times. Do NOT use absolute local paths (e.g., /Users/...).
|
|
1465
|
+
3. When finished successfully, output: <promise>COMPLETE</promise>
|
|
1375
1466
|
`;
|
|
1376
1467
|
return prompt;
|
|
1377
1468
|
}
|
|
@@ -1513,16 +1604,12 @@ class TaskExecutor {
|
|
|
1513
1604
|
});
|
|
1514
1605
|
try {
|
|
1515
1606
|
let plan = null;
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
} else {
|
|
1519
|
-
this.deps.log("Phase 1: Planning (CLI)...", "info");
|
|
1520
|
-
const planningPrompt = `${basePrompt}
|
|
1607
|
+
this.deps.log("Phase 1: Planning (CLI)...", "info");
|
|
1608
|
+
const planningPrompt = `${basePrompt}
|
|
1521
1609
|
|
|
1522
1610
|
## Phase 1: Planning
|
|
1523
1611
|
Analyze and create a detailed plan for THIS SPECIFIC TASK. Do NOT execute changes yet.`;
|
|
1524
|
-
|
|
1525
|
-
}
|
|
1612
|
+
plan = await this.deps.aiRunner.run(planningPrompt, true);
|
|
1526
1613
|
this.deps.log("Starting Execution...", "info");
|
|
1527
1614
|
let executionPrompt = basePrompt;
|
|
1528
1615
|
if (plan != null) {
|
|
@@ -1611,7 +1698,6 @@ class AgentWorker {
|
|
|
1611
1698
|
this.taskExecutor = new TaskExecutor({
|
|
1612
1699
|
aiRunner: this.aiRunner,
|
|
1613
1700
|
projectPath,
|
|
1614
|
-
skipPlanning: config.skipPlanning,
|
|
1615
1701
|
log
|
|
1616
1702
|
});
|
|
1617
1703
|
const providerLabel = provider === "codex" ? "Codex" : "Claude";
|
|
@@ -1742,8 +1828,7 @@ if (process.argv[1]?.includes("agent-worker") || process.argv[1]?.includes("work
|
|
|
1742
1828
|
if (value && !value.startsWith("--"))
|
|
1743
1829
|
i++;
|
|
1744
1830
|
config.provider = resolveProvider(value);
|
|
1745
|
-
}
|
|
1746
|
-
config.skipPlanning = true;
|
|
1831
|
+
}
|
|
1747
1832
|
}
|
|
1748
1833
|
if (!config.agentId || !config.workspaceId || !config.apiBase || !config.apiKey || !config.projectPath) {
|
|
1749
1834
|
console.error("Missing required arguments");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexer.d.ts","sourceRoot":"","sources":["../../src/core/indexer.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,yBAAyB,CAAe;gBAEpC,WAAW,EAAE,MAAM;IAK/B;;;;OAIG;IACG,KAAK,CAC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5B,OAAO,CAAC,UAAU;CA8BnB"}
|
|
@@ -6,6 +6,7 @@ export declare class PromptBuilder {
|
|
|
6
6
|
private projectPath;
|
|
7
7
|
constructor(projectPath: string);
|
|
8
8
|
build(task: Task, options?: PromptOptions): Promise<string>;
|
|
9
|
+
buildGenericPrompt(query: string): Promise<string>;
|
|
9
10
|
private getProjectConfig;
|
|
10
11
|
private getFallbackContext;
|
|
11
12
|
private getProjectStructure;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-builder.d.ts","sourceRoot":"","sources":["../../src/core/prompt-builder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAGrD,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,aAAa;IACZ,OAAO,CAAC,WAAW;gBAAX,WAAW,EAAE,MAAM;IAEjC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"prompt-builder.d.ts","sourceRoot":"","sources":["../../src/core/prompt-builder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAGrD,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,aAAa;IACZ,OAAO,CAAC,WAAW;gBAAX,WAAW,EAAE,MAAM;IAEjC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;IAsI/D,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IA6DxD,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,mBAAmB;IAyB3B,OAAO,CAAC,aAAa;IAyCrB,OAAO,CAAC,qBAAqB;IAmB7B,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,GAAG,MAAM,GAAG,IAAI;CAoBtD"}
|
package/dist/index-node.js
CHANGED
|
@@ -114,6 +114,13 @@ class AIModule extends BaseModule {
|
|
|
114
114
|
async deleteSession(workspaceId, sessionId) {
|
|
115
115
|
await this.api.delete(`/ai/${workspaceId}/session/${sessionId}`);
|
|
116
116
|
}
|
|
117
|
+
async shareSession(workspaceId, sessionId, body) {
|
|
118
|
+
await this.api.post(`/ai/${workspaceId}/session/${sessionId}/share`, body);
|
|
119
|
+
}
|
|
120
|
+
async getSharedSession(sessionId) {
|
|
121
|
+
const { data } = await this.api.get(`/ai/shared/${sessionId}`);
|
|
122
|
+
return data;
|
|
123
|
+
}
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
// src/modules/auth.ts
|
|
@@ -556,7 +563,15 @@ var colors = {
|
|
|
556
563
|
brightBlue: `${ESC}94m`,
|
|
557
564
|
brightMagenta: `${ESC}95m`,
|
|
558
565
|
brightCyan: `${ESC}96m`,
|
|
559
|
-
brightWhite: `${ESC}97m
|
|
566
|
+
brightWhite: `${ESC}97m`,
|
|
567
|
+
bgBlack: `${ESC}40m`,
|
|
568
|
+
bgRed: `${ESC}41m`,
|
|
569
|
+
bgGreen: `${ESC}42m`,
|
|
570
|
+
bgYellow: `${ESC}43m`,
|
|
571
|
+
bgBlue: `${ESC}44m`,
|
|
572
|
+
bgMagenta: `${ESC}45m`,
|
|
573
|
+
bgCyan: `${ESC}46m`,
|
|
574
|
+
bgWhite: `${ESC}47m`
|
|
560
575
|
};
|
|
561
576
|
var c = {
|
|
562
577
|
text: (text, ...colorNames) => {
|
|
@@ -572,11 +587,17 @@ var c = {
|
|
|
572
587
|
magenta: (t) => c.text(t, "magenta"),
|
|
573
588
|
cyan: (t) => c.text(t, "cyan"),
|
|
574
589
|
gray: (t) => c.text(t, "gray"),
|
|
590
|
+
white: (t) => c.text(t, "white"),
|
|
591
|
+
brightBlue: (t) => c.text(t, "brightBlue"),
|
|
592
|
+
bgBlue: (t) => c.text(t, "bgBlue", "white", "bold"),
|
|
575
593
|
success: (t) => c.text(t, "green", "bold"),
|
|
576
594
|
error: (t) => c.text(t, "red", "bold"),
|
|
577
595
|
warning: (t) => c.text(t, "yellow", "bold"),
|
|
578
596
|
info: (t) => c.text(t, "cyan", "bold"),
|
|
579
597
|
primary: (t) => c.text(t, "blue", "bold"),
|
|
598
|
+
secondary: (t) => c.text(t, "magenta", "bold"),
|
|
599
|
+
header: (t) => c.text(` ${t} `, "bgBlue", "white", "bold"),
|
|
600
|
+
step: (t) => c.text(` ${t} `, "bgCyan", "black", "bold"),
|
|
580
601
|
underline: (t) => c.text(t, "underline")
|
|
581
602
|
};
|
|
582
603
|
|
|
@@ -704,7 +725,6 @@ class ClaudeRunner {
|
|
|
704
725
|
if (type === "content_block_start" && content_block) {
|
|
705
726
|
if (content_block.type === "tool_use" && content_block.name) {
|
|
706
727
|
this.log?.(`
|
|
707
|
-
|
|
708
728
|
${c.primary("[Claude]")} ${c.bold(`Running ${content_block.name}...`)}
|
|
709
729
|
`, "info");
|
|
710
730
|
}
|
|
@@ -980,13 +1000,10 @@ class CodebaseIndexer {
|
|
|
980
1000
|
`);
|
|
981
1001
|
const newTreeHash = this.hashTree(treeString);
|
|
982
1002
|
const existingIndex = this.loadIndex();
|
|
983
|
-
if (!force && existingIndex?.treeHash === newTreeHash) {
|
|
984
|
-
onProgress?.("No file changes detected, skipping reindex");
|
|
985
|
-
return null;
|
|
986
|
-
}
|
|
987
1003
|
const currentHashes = this.computeFileHashes(currentFiles);
|
|
988
1004
|
const existingHashes = existingIndex?.fileHashes;
|
|
989
|
-
const
|
|
1005
|
+
const hasExistingContent = existingIndex && (Object.keys(existingIndex.symbols).length > 0 || Object.keys(existingIndex.responsibilities).length > 0);
|
|
1006
|
+
const canIncremental = !force && existingIndex && existingHashes && hasExistingContent;
|
|
990
1007
|
if (canIncremental) {
|
|
991
1008
|
onProgress?.("Performing incremental update");
|
|
992
1009
|
const { added, deleted, modified } = this.diffFiles(currentHashes, existingHashes);
|
|
@@ -1019,8 +1036,12 @@ class CodebaseIndexer {
|
|
|
1019
1036
|
}
|
|
1020
1037
|
}
|
|
1021
1038
|
onProgress?.("AI is analyzing codebase structure...");
|
|
1022
|
-
|
|
1023
|
-
|
|
1039
|
+
try {
|
|
1040
|
+
const index = await treeSummarizer(treeString);
|
|
1041
|
+
return this.applyIndexMetadata(index, currentHashes, newTreeHash);
|
|
1042
|
+
} catch (error) {
|
|
1043
|
+
throw new Error(`AI analysis failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
1044
|
+
}
|
|
1024
1045
|
}
|
|
1025
1046
|
async getFileTree() {
|
|
1026
1047
|
const gitmodulesPath = import_node_path5.join(this.projectPath, ".gitmodules");
|
|
@@ -1372,6 +1393,76 @@ ${comment.text}
|
|
|
1372
1393
|
2. **Artifact Management**: If you create any high-level documentation (PRDs, technical drafts, architecture docs), you MUST save them in \`.locus/artifacts/\`. Do NOT create them in the root directory.
|
|
1373
1394
|
3. **Paths**: Use relative paths from the project root at all times. Do NOT use absolute local paths (e.g., /Users/...).
|
|
1374
1395
|
4. When finished successfully, output: <promise>COMPLETE</promise>
|
|
1396
|
+
`;
|
|
1397
|
+
return prompt;
|
|
1398
|
+
}
|
|
1399
|
+
async buildGenericPrompt(query) {
|
|
1400
|
+
let prompt = `# Direct Execution
|
|
1401
|
+
|
|
1402
|
+
`;
|
|
1403
|
+
prompt += `## Prompt
|
|
1404
|
+
${query}
|
|
1405
|
+
|
|
1406
|
+
`;
|
|
1407
|
+
const projectConfig = this.getProjectConfig();
|
|
1408
|
+
if (projectConfig) {
|
|
1409
|
+
prompt += `## Project Metadata
|
|
1410
|
+
`;
|
|
1411
|
+
prompt += `- Version: ${projectConfig.version || "Unknown"}
|
|
1412
|
+
`;
|
|
1413
|
+
prompt += `- Created At: ${projectConfig.createdAt || "Unknown"}
|
|
1414
|
+
|
|
1415
|
+
`;
|
|
1416
|
+
}
|
|
1417
|
+
const contextPath = getLocusPath(this.projectPath, "contextFile");
|
|
1418
|
+
let hasLocalContext = false;
|
|
1419
|
+
if (import_node_fs4.existsSync(contextPath)) {
|
|
1420
|
+
try {
|
|
1421
|
+
const context = import_node_fs4.readFileSync(contextPath, "utf-8");
|
|
1422
|
+
if (context.trim().length > 20) {
|
|
1423
|
+
prompt += `## Project Context (Local)
|
|
1424
|
+
${context}
|
|
1425
|
+
|
|
1426
|
+
`;
|
|
1427
|
+
hasLocalContext = true;
|
|
1428
|
+
}
|
|
1429
|
+
} catch (err) {
|
|
1430
|
+
console.warn(`Warning: Could not read context file: ${err}`);
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
if (!hasLocalContext) {
|
|
1434
|
+
const fallback = this.getFallbackContext();
|
|
1435
|
+
if (fallback) {
|
|
1436
|
+
prompt += `## Project Context (README Fallback)
|
|
1437
|
+
${fallback}
|
|
1438
|
+
|
|
1439
|
+
`;
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
prompt += this.getProjectStructure();
|
|
1443
|
+
prompt += this.getSkillsInfo();
|
|
1444
|
+
prompt += `## Project Knowledge Base
|
|
1445
|
+
`;
|
|
1446
|
+
prompt += `You have access to the following documentation directories for context:
|
|
1447
|
+
`;
|
|
1448
|
+
prompt += `- Artifacts: \`.locus/artifacts\`
|
|
1449
|
+
`;
|
|
1450
|
+
prompt += `- Documents: \`.locus/documents\`
|
|
1451
|
+
`;
|
|
1452
|
+
prompt += `If you need more information about the project strategies, plans, or architecture, please read files in these directories.
|
|
1453
|
+
|
|
1454
|
+
`;
|
|
1455
|
+
const indexPath = getLocusPath(this.projectPath, "indexFile");
|
|
1456
|
+
if (import_node_fs4.existsSync(indexPath)) {
|
|
1457
|
+
prompt += `## Codebase Overview
|
|
1458
|
+
There is an index file in the .locus/codebase-index.json and if you need you can check it.
|
|
1459
|
+
|
|
1460
|
+
`;
|
|
1461
|
+
}
|
|
1462
|
+
prompt += `## Instructions
|
|
1463
|
+
1. Execute the prompt based on the provided project context.
|
|
1464
|
+
2. **Paths**: Use relative paths from the project root at all times. Do NOT use absolute local paths (e.g., /Users/...).
|
|
1465
|
+
3. When finished successfully, output: <promise>COMPLETE</promise>
|
|
1375
1466
|
`;
|
|
1376
1467
|
return prompt;
|
|
1377
1468
|
}
|
|
@@ -1513,16 +1604,12 @@ class TaskExecutor {
|
|
|
1513
1604
|
});
|
|
1514
1605
|
try {
|
|
1515
1606
|
let plan = null;
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
} else {
|
|
1519
|
-
this.deps.log("Phase 1: Planning (CLI)...", "info");
|
|
1520
|
-
const planningPrompt = `${basePrompt}
|
|
1607
|
+
this.deps.log("Phase 1: Planning (CLI)...", "info");
|
|
1608
|
+
const planningPrompt = `${basePrompt}
|
|
1521
1609
|
|
|
1522
1610
|
## Phase 1: Planning
|
|
1523
1611
|
Analyze and create a detailed plan for THIS SPECIFIC TASK. Do NOT execute changes yet.`;
|
|
1524
|
-
|
|
1525
|
-
}
|
|
1612
|
+
plan = await this.deps.aiRunner.run(planningPrompt, true);
|
|
1526
1613
|
this.deps.log("Starting Execution...", "info");
|
|
1527
1614
|
let executionPrompt = basePrompt;
|
|
1528
1615
|
if (plan != null) {
|
|
@@ -1611,7 +1698,6 @@ class AgentWorker {
|
|
|
1611
1698
|
this.taskExecutor = new TaskExecutor({
|
|
1612
1699
|
aiRunner: this.aiRunner,
|
|
1613
1700
|
projectPath,
|
|
1614
|
-
skipPlanning: config.skipPlanning,
|
|
1615
1701
|
log
|
|
1616
1702
|
});
|
|
1617
1703
|
const providerLabel = provider === "codex" ? "Codex" : "Claude";
|
|
@@ -1742,8 +1828,7 @@ if (process.argv[1]?.includes("agent-worker") || process.argv[1]?.includes("work
|
|
|
1742
1828
|
if (value && !value.startsWith("--"))
|
|
1743
1829
|
i++;
|
|
1744
1830
|
config.provider = resolveProvider(value);
|
|
1745
|
-
}
|
|
1746
|
-
config.skipPlanning = true;
|
|
1831
|
+
}
|
|
1747
1832
|
}
|
|
1748
1833
|
if (!config.agentId || !config.workspaceId || !config.apiBase || !config.apiKey || !config.projectPath) {
|
|
1749
1834
|
console.error("Missing required arguments");
|
|
@@ -1911,9 +1996,6 @@ ${c.success("✅ Orchestrator finished")}`);
|
|
|
1911
1996
|
if (this.config.provider) {
|
|
1912
1997
|
workerArgs.push("--provider", this.config.provider);
|
|
1913
1998
|
}
|
|
1914
|
-
if (this.config.skipPlanning) {
|
|
1915
|
-
workerArgs.push("--skip-planning");
|
|
1916
|
-
}
|
|
1917
1999
|
if (this.resolvedSprintId) {
|
|
1918
2000
|
workerArgs.push("--sprint-id", this.resolvedSprintId);
|
|
1919
2001
|
}
|
package/dist/index.js
CHANGED
|
@@ -114,6 +114,13 @@ class AIModule extends BaseModule {
|
|
|
114
114
|
async deleteSession(workspaceId, sessionId) {
|
|
115
115
|
await this.api.delete(`/ai/${workspaceId}/session/${sessionId}`);
|
|
116
116
|
}
|
|
117
|
+
async shareSession(workspaceId, sessionId, body) {
|
|
118
|
+
await this.api.post(`/ai/${workspaceId}/session/${sessionId}/share`, body);
|
|
119
|
+
}
|
|
120
|
+
async getSharedSession(sessionId) {
|
|
121
|
+
const { data } = await this.api.get(`/ai/shared/${sessionId}`);
|
|
122
|
+
return data;
|
|
123
|
+
}
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
// src/modules/auth.ts
|
package/dist/modules/ai.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatRequest, ChatResponse } from "@locusai/shared";
|
|
1
|
+
import { ChatRequest, ChatResponse, ShareChatRequest } from "@locusai/shared";
|
|
2
2
|
import { BaseModule } from "./base.js";
|
|
3
3
|
export declare class AIModule extends BaseModule {
|
|
4
4
|
/**
|
|
@@ -43,5 +43,13 @@ export declare class AIModule extends BaseModule {
|
|
|
43
43
|
* Delete a chat session.
|
|
44
44
|
*/
|
|
45
45
|
deleteSession(workspaceId: string, sessionId: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Toggle chat session sharing.
|
|
48
|
+
*/
|
|
49
|
+
shareSession(workspaceId: string, sessionId: string, body: ShareChatRequest): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Get a shared chat session (public).
|
|
52
|
+
*/
|
|
53
|
+
getSharedSession(sessionId: string): Promise<ChatResponse>;
|
|
46
54
|
}
|
|
47
55
|
//# sourceMappingURL=ai.d.ts.map
|
package/dist/modules/ai.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/modules/ai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/modules/ai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,qBAAa,QAAS,SAAQ,UAAU;IACtC;;OAEG;IACG,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IASzE;;OAEG;IACG,YAAY,CAChB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,WAAW,GAChB,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAStE;;OAEG;IACG,aAAa,CACjB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAC/C,OAAO,CAAC,YAAY,CAAC;IASxB;;OAEG;IACG,YAAY,CAChB,WAAW,E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|
brightCyan: string;
|
|
26
26
|
brightWhite: string;
|
|
27
|
+
bgBlack: string;
|
|
28
|
+
bgRed: string;
|
|
29
|
+
bgGreen: string;
|
|
30
|
+
bgYellow: string;
|
|
31
|
+
bgBlue: string;
|
|
32
|
+
bgMagenta: string;
|
|
33
|
+
bgCyan: string;
|
|
34
|
+
bgWhite: string;
|
|
27
35
|
};
|
|
28
36
|
type ColorName = keyof typeof colors;
|
|
29
37
|
export declare const c: {
|
|
@@ -37,11 +45,17 @@ export declare const c: {
|
|
|
37
45
|
magenta: (t: string) => string;
|
|
38
46
|
cyan: (t: string) => string;
|
|
39
47
|
gray: (t: string) => string;
|
|
48
|
+
white: (t: string) => string;
|
|
49
|
+
brightBlue: (t: string) => string;
|
|
50
|
+
bgBlue: (t: string) => string;
|
|
40
51
|
success: (t: string) => string;
|
|
41
52
|
error: (t: string) => string;
|
|
42
53
|
warning: (t: string) => string;
|
|
43
54
|
info: (t: string) => string;
|
|
44
55
|
primary: (t: string) => string;
|
|
56
|
+
secondary: (t: string) => string;
|
|
57
|
+
header: (t: string) => string;
|
|
58
|
+
step: (t: string) => string;
|
|
45
59
|
underline: (t: string) => string;
|
|
46
60
|
};
|
|
47
61
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,QAAA,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCX,CAAC;AAEF,KAAK,SAAS,GAAG,MAAM,OAAO,MAAM,CAAC;AAErC,eAAO,MAAM,CAAC;iBACC,MAAM,iBAAiB,SAAS,EAAE;cAMrC,MAAM;aACP,MAAM;aACN,MAAM;eACJ,MAAM;gBACL,MAAM;cACR,MAAM;iBACH,MAAM;cACT,MAAM;cACN,MAAM;eAEL,MAAM;oBACD,MAAM;gBACV,MAAM;iBAGL,MAAM;eACR,MAAM;iBACJ,MAAM;cACT,MAAM;iBACH,MAAM;mBACJ,MAAM;gBACT,MAAM;cACR,MAAM;mBACD,MAAM;CACtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"clean": "rm -rf node_modules"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@locusai/shared": "^0.7.
|
|
33
|
+
"@locusai/shared": "^0.7.3",
|
|
34
34
|
"axios": "^1.13.2",
|
|
35
35
|
"events": "^3.3.0",
|
|
36
36
|
"globby": "^14.0.2"
|