@locusai/sdk 0.4.14 → 0.5.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/artifact-syncer.d.ts +2 -1
- package/dist/agent/artifact-syncer.d.ts.map +1 -1
- package/dist/agent/codebase-indexer-service.d.ts +4 -5
- package/dist/agent/codebase-indexer-service.d.ts.map +1 -1
- package/dist/agent/sprint-planner.d.ts +4 -5
- package/dist/agent/sprint-planner.d.ts.map +1 -1
- package/dist/agent/task-executor.d.ts +5 -5
- package/dist/agent/task-executor.d.ts.map +1 -1
- package/dist/agent/worker.d.ts +4 -3
- package/dist/agent/worker.d.ts.map +1 -1
- package/dist/agent/worker.js +360 -224
- package/dist/ai/claude-runner.d.ts +10 -3
- package/dist/ai/claude-runner.d.ts.map +1 -1
- package/dist/ai/codex-runner.d.ts +22 -0
- package/dist/ai/codex-runner.d.ts.map +1 -0
- package/dist/ai/factory.d.ts +9 -0
- package/dist/ai/factory.d.ts.map +1 -0
- package/dist/ai/index.d.ts +4 -1
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/runner.d.ts +6 -0
- package/dist/ai/runner.d.ts.map +1 -0
- package/dist/core/config.d.ts +6 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/index-node.js +392 -244
- package/dist/orchestrator.d.ts +3 -1
- package/dist/orchestrator.d.ts.map +1 -1
- package/package.json +7 -6
- package/dist/ai/anthropic-client.d.ts +0 -33
- package/dist/ai/anthropic-client.d.ts.map +0 -1
package/dist/orchestrator.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChildProcess } from "node:child_process";
|
|
2
2
|
import { Task } from "@locusai/shared";
|
|
3
3
|
import { EventEmitter } from "events";
|
|
4
|
+
import type { AiProvider } from "./ai/runner.js";
|
|
4
5
|
export interface AgentConfig {
|
|
5
6
|
id: string;
|
|
6
7
|
maxConcurrentTasks: number;
|
|
@@ -21,8 +22,9 @@ export interface OrchestratorConfig {
|
|
|
21
22
|
maxIterations: number;
|
|
22
23
|
projectPath: string;
|
|
23
24
|
apiKey: string;
|
|
24
|
-
anthropicApiKey?: string;
|
|
25
25
|
model?: string;
|
|
26
|
+
provider?: AiProvider;
|
|
27
|
+
skipPlanning?: boolean;
|
|
26
28
|
}
|
|
27
29
|
export declare class AgentOrchestrator extends EventEmitter {
|
|
28
30
|
private client;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAS,MAAM,oBAAoB,CAAC;AAIzD,OAAO,EAAE,IAAI,EAA4B,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAS,MAAM,oBAAoB,CAAC;AAIzD,OAAO,EAAE,IAAI,EAA4B,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IACpD,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,YAAY,CAA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;;;;;IAeR,OAAO,CAAC,KAAK;CAGd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"main": "./src/index.ts",
|
|
5
6
|
"types": "./src/index.ts",
|
|
6
7
|
"exports": {
|
|
@@ -22,20 +23,20 @@
|
|
|
22
23
|
"README.md"
|
|
23
24
|
],
|
|
24
25
|
"scripts": {
|
|
25
|
-
"build": "bun build ./src/index.ts ./src/index-node.ts ./src/agent/worker.ts --outdir ./dist --target node --format cjs --external
|
|
26
|
+
"build": "bun build ./src/index.ts ./src/index-node.ts ./src/agent/worker.ts --outdir ./dist --target node --format cjs --external axios --external events --external globby --external @locusai/shared && tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
26
27
|
"dev": "tsc --watch",
|
|
27
28
|
"lint": "biome lint .",
|
|
28
|
-
"typecheck": "tsc --noEmit"
|
|
29
|
+
"typecheck": "tsc --noEmit",
|
|
30
|
+
"clean": "rm -rf node_modules"
|
|
29
31
|
},
|
|
30
32
|
"dependencies": {
|
|
31
|
-
"@
|
|
32
|
-
"@locusai/shared": "^0.4.14",
|
|
33
|
+
"@locusai/shared": "^0.5.0",
|
|
33
34
|
"axios": "^1.13.2",
|
|
34
35
|
"events": "^3.3.0",
|
|
35
36
|
"globby": "^14.0.2"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"typescript": "5.8.3",
|
|
39
|
+
"typescript": "^5.8.3",
|
|
39
40
|
"@types/node": "^22.10.7"
|
|
40
41
|
}
|
|
41
42
|
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export interface AnthropicClientConfig {
|
|
2
|
-
apiKey: string;
|
|
3
|
-
model?: string;
|
|
4
|
-
}
|
|
5
|
-
export interface CachedPromptOptions {
|
|
6
|
-
systemPrompt?: string;
|
|
7
|
-
cacheableContext?: string[];
|
|
8
|
-
userPrompt: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Anthropic Client with Prompt Caching Support
|
|
12
|
-
*
|
|
13
|
-
* This client wraps the official Anthropic SDK and adds support for
|
|
14
|
-
* prompt caching to dramatically reduce latency and costs for repeated
|
|
15
|
-
* context (like codebase indexes, CLAUDE.md, etc.)
|
|
16
|
-
*/
|
|
17
|
-
export declare class AnthropicClient {
|
|
18
|
-
private client;
|
|
19
|
-
private model;
|
|
20
|
-
constructor(config: AnthropicClientConfig);
|
|
21
|
-
/**
|
|
22
|
-
* Run a prompt with optional caching for large context blocks
|
|
23
|
-
*
|
|
24
|
-
* @param options - Prompt configuration with cacheable context
|
|
25
|
-
* @returns The generated text response
|
|
26
|
-
*/
|
|
27
|
-
run(options: CachedPromptOptions): Promise<string>;
|
|
28
|
-
/**
|
|
29
|
-
* Simple run without caching (for short prompts)
|
|
30
|
-
*/
|
|
31
|
-
runSimple(prompt: string): Promise<string>;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=anthropic-client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic-client.d.ts","sourceRoot":"","sources":["../../src/ai/anthropic-client.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,KAAK,CAAS;gBAEV,MAAM,EAAE,qBAAqB;IAOzC;;;;;OAKG;IACG,GAAG,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC;IA8CxD;;OAEG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAKjD"}
|