@locusai/sdk 0.15.5 → 0.16.1
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/worker.js +0 -29
- package/dist/events.d.ts +0 -2
- package/dist/events.d.ts.map +1 -1
- package/dist/index-node.d.ts +0 -1
- package/dist/index-node.d.ts.map +1 -1
- package/dist/index-node.js +0 -267
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -28
- package/dist/utils/resolve-bin.d.ts.map +1 -1
- package/package.json +5 -7
- package/dist/modules/suggestions.d.ts +0 -12
- package/dist/modules/suggestions.d.ts.map +0 -1
- package/dist/proposals/context-gatherer.d.ts +0 -32
- package/dist/proposals/context-gatherer.d.ts.map +0 -1
- package/dist/proposals/index.d.ts +0 -4
- package/dist/proposals/index.d.ts.map +0 -1
- package/dist/proposals/proposal-engine.d.ts +0 -21
- package/dist/proposals/proposal-engine.d.ts.map +0 -1
package/dist/agent/worker.js
CHANGED
|
@@ -307,29 +307,6 @@ var init_sprints = __esm(() => {
|
|
|
307
307
|
};
|
|
308
308
|
});
|
|
309
309
|
|
|
310
|
-
// src/modules/suggestions.ts
|
|
311
|
-
var SuggestionsModule;
|
|
312
|
-
var init_suggestions = __esm(() => {
|
|
313
|
-
SuggestionsModule = class SuggestionsModule extends BaseModule {
|
|
314
|
-
async create(workspaceId, data) {
|
|
315
|
-
const { data: res } = await this.api.post(`/workspaces/${workspaceId}/suggestions`, data);
|
|
316
|
-
return res.suggestion;
|
|
317
|
-
}
|
|
318
|
-
async list(workspaceId, params) {
|
|
319
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/suggestions`, { params });
|
|
320
|
-
return data.suggestions;
|
|
321
|
-
}
|
|
322
|
-
async get(workspaceId, id) {
|
|
323
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/suggestions/${id}`);
|
|
324
|
-
return data.suggestion;
|
|
325
|
-
}
|
|
326
|
-
async updateStatus(workspaceId, id, status) {
|
|
327
|
-
const { data } = await this.api.patch(`/workspaces/${workspaceId}/suggestions/${id}/status`, status);
|
|
328
|
-
return data.suggestion;
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
});
|
|
332
|
-
|
|
333
310
|
// src/modules/tasks.ts
|
|
334
311
|
var import_shared, TasksModule;
|
|
335
312
|
var init_tasks = __esm(() => {
|
|
@@ -506,7 +483,6 @@ var exports_src = {};
|
|
|
506
483
|
__export(exports_src, {
|
|
507
484
|
WorkspacesModule: () => WorkspacesModule,
|
|
508
485
|
TasksModule: () => TasksModule,
|
|
509
|
-
SuggestionsModule: () => SuggestionsModule,
|
|
510
486
|
SprintsModule: () => SprintsModule,
|
|
511
487
|
OrganizationsModule: () => OrganizationsModule,
|
|
512
488
|
LocusEvent: () => LocusEvent,
|
|
@@ -535,7 +511,6 @@ class LocusClient {
|
|
|
535
511
|
docs;
|
|
536
512
|
ci;
|
|
537
513
|
instances;
|
|
538
|
-
suggestions;
|
|
539
514
|
constructor(config) {
|
|
540
515
|
this.emitter = new LocusEmitter;
|
|
541
516
|
this.api = import_axios.default.create({
|
|
@@ -556,7 +531,6 @@ class LocusClient {
|
|
|
556
531
|
this.docs = new DocsModule(this.api, this.emitter);
|
|
557
532
|
this.ci = new CiModule(this.api, this.emitter);
|
|
558
533
|
this.instances = new InstancesModule(this.api, this.emitter);
|
|
559
|
-
this.suggestions = new SuggestionsModule(this.api, this.emitter);
|
|
560
534
|
if (config.retryOptions) {
|
|
561
535
|
this.setupRetryInterceptor(config.retryOptions);
|
|
562
536
|
}
|
|
@@ -626,7 +600,6 @@ var init_src = __esm(() => {
|
|
|
626
600
|
init_invitations();
|
|
627
601
|
init_organizations();
|
|
628
602
|
init_sprints();
|
|
629
|
-
init_suggestions();
|
|
630
603
|
init_tasks();
|
|
631
604
|
init_workspaces();
|
|
632
605
|
init_discussion_types();
|
|
@@ -639,7 +612,6 @@ var init_src = __esm(() => {
|
|
|
639
612
|
init_invitations();
|
|
640
613
|
init_organizations();
|
|
641
614
|
init_sprints();
|
|
642
|
-
init_suggestions();
|
|
643
615
|
init_tasks();
|
|
644
616
|
init_workspaces();
|
|
645
617
|
});
|
|
@@ -892,7 +864,6 @@ var init_resolve_bin = __esm(() => {
|
|
|
892
864
|
import_node_path2.join(import_node_os.homedir(), ".local", "bin"),
|
|
893
865
|
import_node_path2.join(import_node_os.homedir(), ".npm", "bin"),
|
|
894
866
|
import_node_path2.join(import_node_os.homedir(), ".npm-global", "bin"),
|
|
895
|
-
import_node_path2.join(import_node_os.homedir(), ".npm-packages", "bin"),
|
|
896
867
|
import_node_path2.join(import_node_os.homedir(), ".yarn", "bin"),
|
|
897
868
|
import_node_path2.join(import_node_os.homedir(), ".bun", "bin"),
|
|
898
869
|
import_node_path2.join(import_node_os.homedir(), "Library", "pnpm"),
|
package/dist/events.d.ts
CHANGED
|
@@ -15,10 +15,8 @@ export declare class LocusEmitter extends EventEmitter {
|
|
|
15
15
|
on(event: LocusEvent.TOKEN_EXPIRED, listener: () => void): this;
|
|
16
16
|
on(event: LocusEvent.AUTH_ERROR, listener: (error: Error) => void): this;
|
|
17
17
|
on(event: LocusEvent.REQUEST_ERROR, listener: (error: Error) => void): this;
|
|
18
|
-
on(event: string, listener: (...args: unknown[]) => void): this;
|
|
19
18
|
emit(event: LocusEvent.TOKEN_EXPIRED): boolean;
|
|
20
19
|
emit(event: LocusEvent.AUTH_ERROR, error: Error): boolean;
|
|
21
20
|
emit(event: LocusEvent.REQUEST_ERROR, error: Error): boolean;
|
|
22
|
-
emit(event: string, ...args: unknown[]): boolean;
|
|
23
21
|
}
|
|
24
22
|
//# sourceMappingURL=events.d.ts.map
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,oBAAY,UAAU;IACpB,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,aAAa,kBAAkB;CAChC;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED,qBAAa,YAAa,SAAQ,YAAY;IAC5C,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,aAAa,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAC/D,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI;IACxE,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,aAAa,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI;IAQ3E,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,aAAa,GAAG,OAAO;IAC9C,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO;IACzD,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,aAAa,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO;CAI7D"}
|
package/dist/index-node.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ export * from "./git/index.js";
|
|
|
16
16
|
export * from "./index.js";
|
|
17
17
|
export { AgentOrchestrator, type AgentState, type OrchestratorConfig, } from "./orchestrator/index.js";
|
|
18
18
|
export * from "./planning/index.js";
|
|
19
|
-
export * from "./proposals/index.js";
|
|
20
19
|
export { c } from "./utils/colors.js";
|
|
21
20
|
export { extractJsonFromLLMOutput } from "./utils/json-extractor.js";
|
|
22
21
|
export { parseJsonWithSchema } from "./utils/structured-output.js";
|
package/dist/index-node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../src/index-node.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,kBAAkB,CAAC;AAEjC,cAAc,eAAe,CAAC;AAE9B,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,cAAc,uBAAuB,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,YAAY,CAAC;AAE3B,OAAO,EACL,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,kBAAkB,GACxB,MAAM,yBAAyB,CAAC;AAEjC,cAAc,qBAAqB,CAAC;AAEpC,
|
|
1
|
+
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../src/index-node.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,kBAAkB,CAAC;AAEjC,cAAc,eAAe,CAAC;AAE9B,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,cAAc,uBAAuB,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,YAAY,CAAC;AAE3B,OAAO,EACL,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,kBAAkB,GACxB,MAAM,yBAAyB,CAAC;AAEjC,cAAc,qBAAqB,CAAC;AAEpC,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/index-node.js
CHANGED
|
@@ -307,29 +307,6 @@ var init_sprints = __esm(() => {
|
|
|
307
307
|
};
|
|
308
308
|
});
|
|
309
309
|
|
|
310
|
-
// src/modules/suggestions.ts
|
|
311
|
-
var SuggestionsModule;
|
|
312
|
-
var init_suggestions = __esm(() => {
|
|
313
|
-
SuggestionsModule = class SuggestionsModule extends BaseModule {
|
|
314
|
-
async create(workspaceId, data) {
|
|
315
|
-
const { data: res } = await this.api.post(`/workspaces/${workspaceId}/suggestions`, data);
|
|
316
|
-
return res.suggestion;
|
|
317
|
-
}
|
|
318
|
-
async list(workspaceId, params) {
|
|
319
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/suggestions`, { params });
|
|
320
|
-
return data.suggestions;
|
|
321
|
-
}
|
|
322
|
-
async get(workspaceId, id) {
|
|
323
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/suggestions/${id}`);
|
|
324
|
-
return data.suggestion;
|
|
325
|
-
}
|
|
326
|
-
async updateStatus(workspaceId, id, status) {
|
|
327
|
-
const { data } = await this.api.patch(`/workspaces/${workspaceId}/suggestions/${id}/status`, status);
|
|
328
|
-
return data.suggestion;
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
});
|
|
332
|
-
|
|
333
310
|
// src/modules/tasks.ts
|
|
334
311
|
var import_shared, TasksModule;
|
|
335
312
|
var init_tasks = __esm(() => {
|
|
@@ -506,7 +483,6 @@ var exports_src = {};
|
|
|
506
483
|
__export(exports_src, {
|
|
507
484
|
WorkspacesModule: () => WorkspacesModule,
|
|
508
485
|
TasksModule: () => TasksModule,
|
|
509
|
-
SuggestionsModule: () => SuggestionsModule,
|
|
510
486
|
SprintsModule: () => SprintsModule,
|
|
511
487
|
OrganizationsModule: () => OrganizationsModule,
|
|
512
488
|
LocusEvent: () => LocusEvent,
|
|
@@ -535,7 +511,6 @@ class LocusClient {
|
|
|
535
511
|
docs;
|
|
536
512
|
ci;
|
|
537
513
|
instances;
|
|
538
|
-
suggestions;
|
|
539
514
|
constructor(config) {
|
|
540
515
|
this.emitter = new LocusEmitter;
|
|
541
516
|
this.api = import_axios.default.create({
|
|
@@ -556,7 +531,6 @@ class LocusClient {
|
|
|
556
531
|
this.docs = new DocsModule(this.api, this.emitter);
|
|
557
532
|
this.ci = new CiModule(this.api, this.emitter);
|
|
558
533
|
this.instances = new InstancesModule(this.api, this.emitter);
|
|
559
|
-
this.suggestions = new SuggestionsModule(this.api, this.emitter);
|
|
560
534
|
if (config.retryOptions) {
|
|
561
535
|
this.setupRetryInterceptor(config.retryOptions);
|
|
562
536
|
}
|
|
@@ -626,7 +600,6 @@ var init_src = __esm(() => {
|
|
|
626
600
|
init_invitations();
|
|
627
601
|
init_organizations();
|
|
628
602
|
init_sprints();
|
|
629
|
-
init_suggestions();
|
|
630
603
|
init_tasks();
|
|
631
604
|
init_workspaces();
|
|
632
605
|
init_discussion_types();
|
|
@@ -639,7 +612,6 @@ var init_src = __esm(() => {
|
|
|
639
612
|
init_invitations();
|
|
640
613
|
init_organizations();
|
|
641
614
|
init_sprints();
|
|
642
|
-
init_suggestions();
|
|
643
615
|
init_tasks();
|
|
644
616
|
init_workspaces();
|
|
645
617
|
});
|
|
@@ -892,7 +864,6 @@ var init_resolve_bin = __esm(() => {
|
|
|
892
864
|
import_node_path2.join(import_node_os.homedir(), ".local", "bin"),
|
|
893
865
|
import_node_path2.join(import_node_os.homedir(), ".npm", "bin"),
|
|
894
866
|
import_node_path2.join(import_node_os.homedir(), ".npm-global", "bin"),
|
|
895
|
-
import_node_path2.join(import_node_os.homedir(), ".npm-packages", "bin"),
|
|
896
867
|
import_node_path2.join(import_node_os.homedir(), ".yarn", "bin"),
|
|
897
868
|
import_node_path2.join(import_node_os.homedir(), ".bun", "bin"),
|
|
898
869
|
import_node_path2.join(import_node_os.homedir(), "Library", "pnpm"),
|
|
@@ -2887,11 +2858,9 @@ __export(exports_index_node, {
|
|
|
2887
2858
|
WorkspacesModule: () => WorkspacesModule,
|
|
2888
2859
|
TasksModule: () => TasksModule,
|
|
2889
2860
|
TaskExecutor: () => TaskExecutor,
|
|
2890
|
-
SuggestionsModule: () => SuggestionsModule,
|
|
2891
2861
|
SprintsModule: () => SprintsModule,
|
|
2892
2862
|
ReviewerWorker: () => ReviewerWorker,
|
|
2893
2863
|
ReviewService: () => ReviewService,
|
|
2894
|
-
ProposalEngine: () => ProposalEngine,
|
|
2895
2864
|
PromptBuilder: () => PromptBuilder,
|
|
2896
2865
|
PrService: () => PrService,
|
|
2897
2866
|
PlanningMeeting: () => PlanningMeeting,
|
|
@@ -2922,7 +2891,6 @@ __export(exports_index_node, {
|
|
|
2922
2891
|
DiscussionFacilitator: () => DiscussionFacilitator,
|
|
2923
2892
|
DEFAULT_MODEL: () => DEFAULT_MODEL,
|
|
2924
2893
|
ContextTracker: () => ContextTracker,
|
|
2925
|
-
ContextGatherer: () => ContextGatherer,
|
|
2926
2894
|
CodexRunner: () => CodexRunner,
|
|
2927
2895
|
CodebaseIndexerService: () => CodebaseIndexerService,
|
|
2928
2896
|
CodebaseIndexer: () => CodebaseIndexer,
|
|
@@ -5690,240 +5658,5 @@ class PlanningMeeting {
|
|
|
5690
5658
|
};
|
|
5691
5659
|
}
|
|
5692
5660
|
}
|
|
5693
|
-
// src/proposals/context-gatherer.ts
|
|
5694
|
-
var import_node_child_process8 = require("node:child_process");
|
|
5695
|
-
var import_node_fs12 = require("node:fs");
|
|
5696
|
-
var import_node_path13 = require("node:path");
|
|
5697
|
-
|
|
5698
|
-
class ContextGatherer {
|
|
5699
|
-
async gather(projectPath, client, workspaceId) {
|
|
5700
|
-
const [activeSprint, allTasks, skippedSuggestions] = await Promise.all([
|
|
5701
|
-
this.fetchActiveSprint(client, workspaceId),
|
|
5702
|
-
this.fetchTasks(client, workspaceId),
|
|
5703
|
-
this.fetchSkippedSuggestions(client, workspaceId)
|
|
5704
|
-
]);
|
|
5705
|
-
const sprintTasks = activeSprint ? allTasks.filter((t) => t.sprintId === activeSprint.id) : [];
|
|
5706
|
-
const backlogTasks = allTasks.filter((t) => !t.sprintId);
|
|
5707
|
-
const gitLog = this.readGitLog(projectPath);
|
|
5708
|
-
const artifactContents = this.readArtifacts(projectPath);
|
|
5709
|
-
const locusInstructions = this.readLocusInstructions(projectPath);
|
|
5710
|
-
return {
|
|
5711
|
-
activeSprint,
|
|
5712
|
-
sprintTasks,
|
|
5713
|
-
backlogTasks,
|
|
5714
|
-
gitLog,
|
|
5715
|
-
artifactContents,
|
|
5716
|
-
locusInstructions,
|
|
5717
|
-
skippedSuggestions
|
|
5718
|
-
};
|
|
5719
|
-
}
|
|
5720
|
-
async fetchActiveSprint(client, workspaceId) {
|
|
5721
|
-
try {
|
|
5722
|
-
return await client.sprints.getActive(workspaceId);
|
|
5723
|
-
} catch {
|
|
5724
|
-
return null;
|
|
5725
|
-
}
|
|
5726
|
-
}
|
|
5727
|
-
async fetchTasks(client, workspaceId) {
|
|
5728
|
-
try {
|
|
5729
|
-
return await client.tasks.list(workspaceId);
|
|
5730
|
-
} catch {
|
|
5731
|
-
return [];
|
|
5732
|
-
}
|
|
5733
|
-
}
|
|
5734
|
-
async fetchSkippedSuggestions(client, workspaceId) {
|
|
5735
|
-
try {
|
|
5736
|
-
return await client.suggestions.list(workspaceId, { status: "SKIPPED" });
|
|
5737
|
-
} catch {
|
|
5738
|
-
return [];
|
|
5739
|
-
}
|
|
5740
|
-
}
|
|
5741
|
-
readGitLog(projectPath) {
|
|
5742
|
-
try {
|
|
5743
|
-
return import_node_child_process8.execFileSync("git", ["log", "--oneline", "--no-decorate", "-n", "20"], {
|
|
5744
|
-
cwd: projectPath,
|
|
5745
|
-
encoding: "utf-8",
|
|
5746
|
-
timeout: 1e4,
|
|
5747
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
5748
|
-
}).trim();
|
|
5749
|
-
} catch {
|
|
5750
|
-
return "";
|
|
5751
|
-
}
|
|
5752
|
-
}
|
|
5753
|
-
readArtifacts(projectPath) {
|
|
5754
|
-
const artifactsDir = import_node_path13.join(projectPath, ".locus", "artifacts");
|
|
5755
|
-
if (!import_node_fs12.existsSync(artifactsDir))
|
|
5756
|
-
return [];
|
|
5757
|
-
try {
|
|
5758
|
-
const files = import_node_fs12.readdirSync(artifactsDir).filter((f) => f.endsWith(".md"));
|
|
5759
|
-
return files.slice(0, 10).map((name) => ({
|
|
5760
|
-
name,
|
|
5761
|
-
content: import_node_fs12.readFileSync(import_node_path13.join(artifactsDir, name), "utf-8").slice(0, 2000)
|
|
5762
|
-
}));
|
|
5763
|
-
} catch {
|
|
5764
|
-
return [];
|
|
5765
|
-
}
|
|
5766
|
-
}
|
|
5767
|
-
readLocusInstructions(projectPath) {
|
|
5768
|
-
const locusPath = import_node_path13.join(projectPath, ".locus", "LOCUS.md");
|
|
5769
|
-
if (!import_node_fs12.existsSync(locusPath))
|
|
5770
|
-
return null;
|
|
5771
|
-
try {
|
|
5772
|
-
return import_node_fs12.readFileSync(locusPath, "utf-8").slice(0, 3000);
|
|
5773
|
-
} catch {
|
|
5774
|
-
return null;
|
|
5775
|
-
}
|
|
5776
|
-
}
|
|
5777
|
-
}
|
|
5778
|
-
// src/proposals/proposal-engine.ts
|
|
5779
|
-
init_factory();
|
|
5780
|
-
var import_shared6 = require("@locusai/shared");
|
|
5781
|
-
class ProposalEngine {
|
|
5782
|
-
contextGatherer;
|
|
5783
|
-
constructor(contextGatherer) {
|
|
5784
|
-
this.contextGatherer = contextGatherer ?? new ContextGatherer;
|
|
5785
|
-
}
|
|
5786
|
-
async runProposalCycle(projectPath, client, workspaceId) {
|
|
5787
|
-
const context = await this.contextGatherer.gather(projectPath, client, workspaceId);
|
|
5788
|
-
return this.generateProposals(context, projectPath, client, workspaceId);
|
|
5789
|
-
}
|
|
5790
|
-
async generateProposals(context, projectPath, client, workspaceId) {
|
|
5791
|
-
const prompt = this.buildPrompt(context);
|
|
5792
|
-
const runner = createAiRunner(undefined, {
|
|
5793
|
-
projectPath,
|
|
5794
|
-
timeoutMs: 5 * 60 * 1000,
|
|
5795
|
-
maxTurns: 1
|
|
5796
|
-
});
|
|
5797
|
-
let aiResponse;
|
|
5798
|
-
try {
|
|
5799
|
-
aiResponse = await runner.run(prompt);
|
|
5800
|
-
} catch {
|
|
5801
|
-
return [];
|
|
5802
|
-
}
|
|
5803
|
-
const proposals = this.parseResponse(aiResponse);
|
|
5804
|
-
const created = [];
|
|
5805
|
-
for (const proposal of proposals) {
|
|
5806
|
-
if (this.isDuplicate(proposal.title, context.skippedSuggestions)) {
|
|
5807
|
-
continue;
|
|
5808
|
-
}
|
|
5809
|
-
try {
|
|
5810
|
-
const suggestion = await client.suggestions.create(workspaceId, {
|
|
5811
|
-
type: import_shared6.SuggestionType.NEXT_STEP,
|
|
5812
|
-
title: proposal.title,
|
|
5813
|
-
description: proposal.description,
|
|
5814
|
-
metadata: {
|
|
5815
|
-
complexity: proposal.complexity,
|
|
5816
|
-
relatedBacklogItem: proposal.relatedBacklogItem,
|
|
5817
|
-
source: "proposal-engine"
|
|
5818
|
-
}
|
|
5819
|
-
});
|
|
5820
|
-
created.push(suggestion);
|
|
5821
|
-
} catch {}
|
|
5822
|
-
}
|
|
5823
|
-
return created;
|
|
5824
|
-
}
|
|
5825
|
-
buildPrompt(context) {
|
|
5826
|
-
const sections = [];
|
|
5827
|
-
sections.push("You are a proactive software engineering advisor. Based on the project context below, propose 1-3 high-value next steps the team should take. Focus on actionable, impactful work.");
|
|
5828
|
-
if (context.activeSprint) {
|
|
5829
|
-
const sprintInfo = `Sprint: ${context.activeSprint.name} (${context.activeSprint.status})`;
|
|
5830
|
-
const tasksByStatus = this.groupTasksByStatus(context.sprintTasks);
|
|
5831
|
-
sections.push(`## Current Sprint
|
|
5832
|
-
${sprintInfo}
|
|
5833
|
-
${tasksByStatus}`);
|
|
5834
|
-
}
|
|
5835
|
-
if (context.backlogTasks.length > 0) {
|
|
5836
|
-
const backlogList = context.backlogTasks.slice(0, 15).map((t) => `- [${t.priority}] ${t.title}${t.description ? `: ${t.description.slice(0, 100)}` : ""}`).join(`
|
|
5837
|
-
`);
|
|
5838
|
-
sections.push(`## Backlog Items
|
|
5839
|
-
${backlogList}`);
|
|
5840
|
-
}
|
|
5841
|
-
if (context.gitLog) {
|
|
5842
|
-
sections.push(`## Recent Commits (last 20)
|
|
5843
|
-
${context.gitLog}`);
|
|
5844
|
-
}
|
|
5845
|
-
if (context.artifactContents.length > 0) {
|
|
5846
|
-
const artifacts = context.artifactContents.map((a) => `### ${a.name}
|
|
5847
|
-
${a.content}`).join(`
|
|
5848
|
-
|
|
5849
|
-
`);
|
|
5850
|
-
sections.push(`## Product Context
|
|
5851
|
-
${artifacts}`);
|
|
5852
|
-
}
|
|
5853
|
-
if (context.locusInstructions) {
|
|
5854
|
-
sections.push(`## Project Instructions
|
|
5855
|
-
${context.locusInstructions}`);
|
|
5856
|
-
}
|
|
5857
|
-
if (context.skippedSuggestions.length > 0) {
|
|
5858
|
-
const skipped = context.skippedSuggestions.map((s) => `- ${s.title}`).join(`
|
|
5859
|
-
`);
|
|
5860
|
-
sections.push(`## Previously Skipped Proposals (do NOT re-propose these)
|
|
5861
|
-
${skipped}`);
|
|
5862
|
-
}
|
|
5863
|
-
sections.push(`## Instructions
|
|
5864
|
-
Propose 1-3 high-value next steps. For each, respond with exactly this format:
|
|
5865
|
-
|
|
5866
|
-
PROPOSAL_START
|
|
5867
|
-
Title: <clear, concise title>
|
|
5868
|
-
Description: <what to do and why, 2-4 sentences>
|
|
5869
|
-
Complexity: <low|medium|high>
|
|
5870
|
-
Related Backlog: <title of related backlog item, or "none">
|
|
5871
|
-
PROPOSAL_END
|
|
5872
|
-
|
|
5873
|
-
Rules:
|
|
5874
|
-
- Focus on what would deliver the most value right now
|
|
5875
|
-
- Align with the current sprint goals when possible
|
|
5876
|
-
- Don't propose things that are already in progress
|
|
5877
|
-
- Don't re-propose previously skipped suggestions
|
|
5878
|
-
- Keep proposals specific and actionable`);
|
|
5879
|
-
return sections.join(`
|
|
5880
|
-
|
|
5881
|
-
`);
|
|
5882
|
-
}
|
|
5883
|
-
parseResponse(response) {
|
|
5884
|
-
const proposals = [];
|
|
5885
|
-
const blocks = response.split("PROPOSAL_START");
|
|
5886
|
-
for (const block of blocks) {
|
|
5887
|
-
const endIdx = block.indexOf("PROPOSAL_END");
|
|
5888
|
-
if (endIdx === -1)
|
|
5889
|
-
continue;
|
|
5890
|
-
const content = block.slice(0, endIdx).trim();
|
|
5891
|
-
const title = this.extractField(content, "Title");
|
|
5892
|
-
const description = this.extractField(content, "Description");
|
|
5893
|
-
const complexity = this.extractField(content, "Complexity") ?? "medium";
|
|
5894
|
-
const relatedRaw = this.extractField(content, "Related Backlog");
|
|
5895
|
-
const relatedBacklogItem = relatedRaw && relatedRaw.toLowerCase() !== "none" ? relatedRaw : null;
|
|
5896
|
-
if (title && description) {
|
|
5897
|
-
proposals.push({
|
|
5898
|
-
title: title.slice(0, 200),
|
|
5899
|
-
description: description.slice(0, 2000),
|
|
5900
|
-
complexity: complexity.toLowerCase(),
|
|
5901
|
-
relatedBacklogItem
|
|
5902
|
-
});
|
|
5903
|
-
}
|
|
5904
|
-
}
|
|
5905
|
-
return proposals.slice(0, 3);
|
|
5906
|
-
}
|
|
5907
|
-
extractField(content, field) {
|
|
5908
|
-
const regex = new RegExp(`^${field}:\\s*(.+)`, "im");
|
|
5909
|
-
const match = content.match(regex);
|
|
5910
|
-
return match ? match[1].trim() : null;
|
|
5911
|
-
}
|
|
5912
|
-
isDuplicate(title, skipped) {
|
|
5913
|
-
const normalized = title.toLowerCase().trim();
|
|
5914
|
-
return skipped.some((s) => {
|
|
5915
|
-
const skippedNorm = s.title.toLowerCase().trim();
|
|
5916
|
-
return skippedNorm === normalized || skippedNorm.includes(normalized) || normalized.includes(skippedNorm);
|
|
5917
|
-
});
|
|
5918
|
-
}
|
|
5919
|
-
groupTasksByStatus(tasks2) {
|
|
5920
|
-
const groups = {};
|
|
5921
|
-
for (const t of tasks2) {
|
|
5922
|
-
groups[t.status] = (groups[t.status] ?? 0) + 1;
|
|
5923
|
-
}
|
|
5924
|
-
return Object.entries(groups).map(([status, count]) => `- ${status}: ${count} task(s)`).join(`
|
|
5925
|
-
`);
|
|
5926
|
-
}
|
|
5927
|
-
}
|
|
5928
5661
|
// src/index-node.ts
|
|
5929
5662
|
init_colors();
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { InstancesModule } from "./modules/instances.js";
|
|
|
6
6
|
import { InvitationsModule } from "./modules/invitations.js";
|
|
7
7
|
import { OrganizationsModule } from "./modules/organizations.js";
|
|
8
8
|
import { SprintsModule } from "./modules/sprints.js";
|
|
9
|
-
import { SuggestionsModule } from "./modules/suggestions.js";
|
|
10
9
|
import { TasksModule } from "./modules/tasks.js";
|
|
11
10
|
import { WorkspacesModule } from "./modules/workspaces.js";
|
|
12
11
|
export type { Discussion, DiscussionInsight, DiscussionMessage, } from "./discussion/discussion-types.js";
|
|
@@ -19,7 +18,6 @@ export * from "./modules/instances.js";
|
|
|
19
18
|
export * from "./modules/invitations.js";
|
|
20
19
|
export * from "./modules/organizations.js";
|
|
21
20
|
export * from "./modules/sprints.js";
|
|
22
|
-
export * from "./modules/suggestions.js";
|
|
23
21
|
export * from "./modules/tasks.js";
|
|
24
22
|
export * from "./modules/workspaces.js";
|
|
25
23
|
export declare class LocusClient {
|
|
@@ -34,7 +32,6 @@ export declare class LocusClient {
|
|
|
34
32
|
readonly docs: DocsModule;
|
|
35
33
|
readonly ci: CiModule;
|
|
36
34
|
readonly instances: InstancesModule;
|
|
37
|
-
readonly suggestions: SuggestionsModule;
|
|
38
35
|
constructor(config: LocusConfig);
|
|
39
36
|
private setupRetryInterceptor;
|
|
40
37
|
private setupInterceptors;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAI3D,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,kCAAkC,CAAC;AAE1C,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AAExC,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAgB;IACpC,SAAgB,OAAO,EAAE,YAAY,CAAC;IAEtC,SAAgB,IAAI,EAAE,UAAU,CAAC;IACjC,SAAgB,KAAK,EAAE,WAAW,CAAC;IACnC,SAAgB,OAAO,EAAE,aAAa,CAAC;IACvC,SAAgB,UAAU,EAAE,gBAAgB,CAAC;IAC7C,SAAgB,aAAa,EAAE,mBAAmB,CAAC;IACnD,SAAgB,WAAW,EAAE,iBAAiB,CAAC;IAC/C,SAAgB,IAAI,EAAE,UAAU,CAAC;IACjC,SAAgB,EAAE,EAAE,QAAQ,CAAC;IAC7B,SAAgB,SAAS,EAAE,eAAe,CAAC;gBAE/B,MAAM,EAAE,WAAW;IA8B/B,OAAO,CAAC,qBAAqB;IAmC7B,OAAO,CAAC,iBAAiB;IAmDlB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAOrC"}
|
package/dist/index.js
CHANGED
|
@@ -307,29 +307,6 @@ var init_sprints = __esm(() => {
|
|
|
307
307
|
};
|
|
308
308
|
});
|
|
309
309
|
|
|
310
|
-
// src/modules/suggestions.ts
|
|
311
|
-
var SuggestionsModule;
|
|
312
|
-
var init_suggestions = __esm(() => {
|
|
313
|
-
SuggestionsModule = class SuggestionsModule extends BaseModule {
|
|
314
|
-
async create(workspaceId, data) {
|
|
315
|
-
const { data: res } = await this.api.post(`/workspaces/${workspaceId}/suggestions`, data);
|
|
316
|
-
return res.suggestion;
|
|
317
|
-
}
|
|
318
|
-
async list(workspaceId, params) {
|
|
319
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/suggestions`, { params });
|
|
320
|
-
return data.suggestions;
|
|
321
|
-
}
|
|
322
|
-
async get(workspaceId, id) {
|
|
323
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/suggestions/${id}`);
|
|
324
|
-
return data.suggestion;
|
|
325
|
-
}
|
|
326
|
-
async updateStatus(workspaceId, id, status) {
|
|
327
|
-
const { data } = await this.api.patch(`/workspaces/${workspaceId}/suggestions/${id}/status`, status);
|
|
328
|
-
return data.suggestion;
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
});
|
|
332
|
-
|
|
333
310
|
// src/modules/tasks.ts
|
|
334
311
|
var import_shared, TasksModule;
|
|
335
312
|
var init_tasks = __esm(() => {
|
|
@@ -506,7 +483,6 @@ var exports_src = {};
|
|
|
506
483
|
__export(exports_src, {
|
|
507
484
|
WorkspacesModule: () => WorkspacesModule,
|
|
508
485
|
TasksModule: () => TasksModule,
|
|
509
|
-
SuggestionsModule: () => SuggestionsModule,
|
|
510
486
|
SprintsModule: () => SprintsModule,
|
|
511
487
|
OrganizationsModule: () => OrganizationsModule,
|
|
512
488
|
LocusEvent: () => LocusEvent,
|
|
@@ -535,7 +511,6 @@ class LocusClient {
|
|
|
535
511
|
docs;
|
|
536
512
|
ci;
|
|
537
513
|
instances;
|
|
538
|
-
suggestions;
|
|
539
514
|
constructor(config) {
|
|
540
515
|
this.emitter = new LocusEmitter;
|
|
541
516
|
this.api = import_axios.default.create({
|
|
@@ -556,7 +531,6 @@ class LocusClient {
|
|
|
556
531
|
this.docs = new DocsModule(this.api, this.emitter);
|
|
557
532
|
this.ci = new CiModule(this.api, this.emitter);
|
|
558
533
|
this.instances = new InstancesModule(this.api, this.emitter);
|
|
559
|
-
this.suggestions = new SuggestionsModule(this.api, this.emitter);
|
|
560
534
|
if (config.retryOptions) {
|
|
561
535
|
this.setupRetryInterceptor(config.retryOptions);
|
|
562
536
|
}
|
|
@@ -626,7 +600,6 @@ var init_src = __esm(() => {
|
|
|
626
600
|
init_invitations();
|
|
627
601
|
init_organizations();
|
|
628
602
|
init_sprints();
|
|
629
|
-
init_suggestions();
|
|
630
603
|
init_tasks();
|
|
631
604
|
init_workspaces();
|
|
632
605
|
init_discussion_types();
|
|
@@ -639,7 +612,6 @@ var init_src = __esm(() => {
|
|
|
639
612
|
init_invitations();
|
|
640
613
|
init_organizations();
|
|
641
614
|
init_sprints();
|
|
642
|
-
init_suggestions();
|
|
643
615
|
init_tasks();
|
|
644
616
|
init_workspaces();
|
|
645
617
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-bin.d.ts","sourceRoot":"","sources":["../../src/utils/resolve-bin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve-bin.d.ts","sourceRoot":"","sources":["../../src/utils/resolve-bin.ts"],"names":[],"mappings":"AA4GA;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CA2BzC;AASD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACrC,MAAM,CAAC,UAAU,CAYnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"README.md"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
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 --external zod
|
|
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 --external zod && tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
27
27
|
"dev": "tsc --watch",
|
|
28
28
|
"lint": "biome lint .",
|
|
29
29
|
"test": "bun test",
|
|
@@ -31,16 +31,14 @@
|
|
|
31
31
|
"clean": "rm -rf node_modules"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@locusai/shared": "^0.
|
|
34
|
+
"@locusai/shared": "^0.16.1",
|
|
35
35
|
"axios": "^1.13.2",
|
|
36
36
|
"events": "^3.3.0",
|
|
37
37
|
"globby": "^14.0.2",
|
|
38
|
-
"node-cron": "^3.0.3",
|
|
39
38
|
"zod": "^4.3.6"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|
|
42
|
-
"
|
|
43
|
-
"@types/node
|
|
44
|
-
"typescript": "^5.8.3"
|
|
41
|
+
"typescript": "^5.8.3",
|
|
42
|
+
"@types/node": "^22.10.7"
|
|
45
43
|
}
|
|
46
44
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { CreateSuggestion, Suggestion, UpdateSuggestionStatus } from "@locusai/shared";
|
|
2
|
-
import { BaseModule } from "./base.js";
|
|
3
|
-
export interface SuggestionListOptions {
|
|
4
|
-
status?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class SuggestionsModule extends BaseModule {
|
|
7
|
-
create(workspaceId: string, data: CreateSuggestion): Promise<Suggestion>;
|
|
8
|
-
list(workspaceId: string, params?: SuggestionListOptions): Promise<Suggestion[]>;
|
|
9
|
-
get(workspaceId: string, id: string): Promise<Suggestion>;
|
|
10
|
-
updateStatus(workspaceId: string, id: string, status: UpdateSuggestionStatus): Promise<Suggestion>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=suggestions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"suggestions.d.ts","sourceRoot":"","sources":["../../src/modules/suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAUvC,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,iBAAkB,SAAQ,UAAU;IACzC,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,UAAU,CAAC;IAQhB,IAAI,CACR,WAAW,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,qBAAqB,GAC7B,OAAO,CAAC,UAAU,EAAE,CAAC;IAQlB,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAOzD,YAAY,CAChB,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,UAAU,CAAC;CAOvB"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Sprint, Suggestion, Task } from "@locusai/shared";
|
|
2
|
-
import type { LocusClient } from "../index.js";
|
|
3
|
-
export interface ProposalContext {
|
|
4
|
-
/** Active sprint, if any */
|
|
5
|
-
activeSprint: Sprint | null;
|
|
6
|
-
/** Tasks in the current sprint */
|
|
7
|
-
sprintTasks: Task[];
|
|
8
|
-
/** Backlog tasks not yet assigned to a sprint */
|
|
9
|
-
backlogTasks: Task[];
|
|
10
|
-
/** Recent git commit log (last 20 commits) */
|
|
11
|
-
gitLog: string;
|
|
12
|
-
/** Product context from .locus/artifacts/ */
|
|
13
|
-
artifactContents: ArtifactFile[];
|
|
14
|
-
/** Project-specific instructions from .locus/LOCUS.md */
|
|
15
|
-
locusInstructions: string | null;
|
|
16
|
-
/** Previously skipped suggestions (for deduplication) */
|
|
17
|
-
skippedSuggestions: Suggestion[];
|
|
18
|
-
}
|
|
19
|
-
export interface ArtifactFile {
|
|
20
|
-
name: string;
|
|
21
|
-
content: string;
|
|
22
|
-
}
|
|
23
|
-
export declare class ContextGatherer {
|
|
24
|
-
gather(projectPath: string, client: LocusClient, workspaceId: string): Promise<ProposalContext>;
|
|
25
|
-
private fetchActiveSprint;
|
|
26
|
-
private fetchTasks;
|
|
27
|
-
private fetchSkippedSuggestions;
|
|
28
|
-
private readGitLog;
|
|
29
|
-
private readArtifacts;
|
|
30
|
-
private readLocusInstructions;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=context-gatherer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-gatherer.d.ts","sourceRoot":"","sources":["../../src/proposals/context-gatherer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM/C,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,kCAAkC;IAClC,WAAW,EAAE,IAAI,EAAE,CAAC;IACpB,iDAAiD;IACjD,YAAY,EAAE,IAAI,EAAE,CAAC;IACrB,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACjC,yDAAyD;IACzD,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,yDAAyD;IACzD,kBAAkB,EAAE,UAAU,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD,qBAAa,eAAe;IACpB,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,eAAe,CAAC;YAkCb,iBAAiB;YAWjB,UAAU;YAWV,uBAAuB;IAerC,OAAO,CAAC,UAAU;IAiBlB,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,qBAAqB;CAU9B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proposals/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type Suggestion } from "@locusai/shared";
|
|
2
|
-
import type { LocusClient } from "../index.js";
|
|
3
|
-
import { ContextGatherer, type ProposalContext } from "./context-gatherer.js";
|
|
4
|
-
export declare class ProposalEngine {
|
|
5
|
-
private readonly contextGatherer;
|
|
6
|
-
constructor(contextGatherer?: ContextGatherer);
|
|
7
|
-
/**
|
|
8
|
-
* Full proposal cycle: gather context → generate proposals → create suggestions.
|
|
9
|
-
*/
|
|
10
|
-
runProposalCycle(projectPath: string, client: LocusClient, workspaceId: string): Promise<Suggestion[]>;
|
|
11
|
-
/**
|
|
12
|
-
* Generate proposals from gathered context, deduplicate, and create suggestions.
|
|
13
|
-
*/
|
|
14
|
-
generateProposals(context: ProposalContext, projectPath: string, client: LocusClient, workspaceId: string): Promise<Suggestion[]>;
|
|
15
|
-
private buildPrompt;
|
|
16
|
-
private parseResponse;
|
|
17
|
-
private extractField;
|
|
18
|
-
private isDuplicate;
|
|
19
|
-
private groupTasksByStatus;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=proposal-engine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proposal-engine.d.ts","sourceRoot":"","sources":["../../src/proposals/proposal-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAkB,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAiB9E,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;gBAEtC,eAAe,CAAC,EAAE,eAAe;IAI7C;;OAEG;IACG,gBAAgB,CACpB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,UAAU,EAAE,CAAC;IASxB;;OAEG;IACG,iBAAiB,CACrB,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,UAAU,EAAE,CAAC;IAiDxB,OAAO,CAAC,WAAW;IA+EnB,OAAO,CAAC,aAAa;IA+BrB,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,kBAAkB;CAU3B"}
|