@locusai/sdk 0.16.1 → 0.16.2
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/reviewer-worker.d.ts +2 -1
- package/dist/agent/reviewer-worker.d.ts.map +1 -1
- package/dist/agent/worker.d.ts +2 -1
- package/dist/agent/worker.d.ts.map +1 -1
- package/dist/agent/worker.js +134 -179
- package/dist/ai/claude-runner.d.ts +0 -7
- package/dist/ai/claude-runner.d.ts.map +1 -1
- package/dist/ai/claude-stream-parser.d.ts +41 -0
- package/dist/ai/claude-stream-parser.d.ts.map +1 -0
- package/dist/ai/codex-runner.d.ts.map +1 -1
- package/dist/ai/factory.d.ts +11 -0
- package/dist/ai/factory.d.ts.map +1 -1
- package/dist/ai/index.d.ts +3 -1
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/discussion/discussion-facilitator.d.ts.map +1 -1
- package/dist/index-node.js +146 -201
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -59
- package/dist/modules/workspaces.d.ts +0 -15
- package/dist/modules/workspaces.d.ts.map +1 -1
- package/dist/planning/planning-meeting.d.ts +2 -1
- package/dist/planning/planning-meeting.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/modules/instances.d.ts +0 -46
- package/dist/modules/instances.d.ts.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LogFn } from "../ai/factory.js";
|
|
1
2
|
import type { AiProvider } from "../ai/runner.js";
|
|
2
3
|
export interface ReviewerConfig {
|
|
3
4
|
agentId: string;
|
|
@@ -23,8 +24,8 @@ export declare class ReviewerWorker {
|
|
|
23
24
|
private currentTaskId;
|
|
24
25
|
private maxReviews;
|
|
25
26
|
private reviewsCompleted;
|
|
27
|
+
log: LogFn;
|
|
26
28
|
constructor(config: ReviewerConfig);
|
|
27
|
-
log(message: string, level?: "info" | "success" | "warn" | "error"): void;
|
|
28
29
|
/**
|
|
29
30
|
* Discover the next unreviewed Locus PR from GitHub.
|
|
30
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewer-worker.d.ts","sourceRoot":"","sources":["../../src/agent/reviewer-worker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reviewer-worker.d.ts","sourceRoot":"","sources":["../../src/agent/reviewer-worker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,iBAAiB,CAAC;AAY5D,MAAM,WAAW,cAAc;IAC7B,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;;;;GAIG;AACH,qBAAa,cAAc;IAUb,OAAO,CAAC,MAAM;IAT1B,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,iBAAiB,CAA+C;IACxE,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,gBAAgB,CAAK;IAC7B,GAAG,EAAE,KAAK,CAAC;gBAES,MAAM,EAAE,cAAc;IA6B1C;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAU3B;;OAEG;YACW,QAAQ;IAiFtB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,aAAa;IAgBf,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAiE3B"}
|
package/dist/agent/worker.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LogFn } from "../ai/factory.js";
|
|
1
2
|
import type { WorkerConfig } from "./worker-types.js";
|
|
2
3
|
export type { WorkerConfig } from "./worker-types.js";
|
|
3
4
|
/**
|
|
@@ -23,8 +24,8 @@ export declare class AgentWorker {
|
|
|
23
24
|
private currentTaskId;
|
|
24
25
|
private completedTaskList;
|
|
25
26
|
private taskSummaries;
|
|
27
|
+
log: LogFn;
|
|
26
28
|
constructor(config: WorkerConfig);
|
|
27
|
-
log(message: string, level?: "info" | "success" | "warn" | "error"): void;
|
|
28
29
|
private getActiveSprint;
|
|
29
30
|
private getNextTask;
|
|
30
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/agent/worker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/agent/worker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAQ9C,OAAO,KAAK,EAAc,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGlE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;;;;;;;GAUG;AACH,qBAAa,WAAW;IAkBV,OAAO,CAAC,MAAM;IAjB1B,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,WAAW,CAAc;IAGjC,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,iBAAiB,CAA+C;IACxE,OAAO,CAAC,aAAa,CAAuB;IAG5C,OAAO,CAAC,iBAAiB,CAA4C;IACrE,OAAO,CAAC,aAAa,CAAgB;IAErC,GAAG,EAAE,KAAK,CAAC;gBAES,MAAM,EAAE,YAAY;YAyD1B,eAAe;YAcf,WAAW;IAgDzB;;OAEG;YACW,WAAW;IAoCzB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,aAAa;IAoBf,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA4I3B"}
|
package/dist/agent/worker.js
CHANGED
|
@@ -156,49 +156,6 @@ var init_docs = __esm(() => {
|
|
|
156
156
|
};
|
|
157
157
|
});
|
|
158
158
|
|
|
159
|
-
// src/modules/instances.ts
|
|
160
|
-
var InstancesModule;
|
|
161
|
-
var init_instances = __esm(() => {
|
|
162
|
-
InstancesModule = class InstancesModule extends BaseModule {
|
|
163
|
-
async list(workspaceId) {
|
|
164
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances`);
|
|
165
|
-
return data.instances;
|
|
166
|
-
}
|
|
167
|
-
async get(workspaceId, instanceId) {
|
|
168
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances/${instanceId}`);
|
|
169
|
-
return data.instance;
|
|
170
|
-
}
|
|
171
|
-
async provision(workspaceId, body) {
|
|
172
|
-
const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances`, body);
|
|
173
|
-
return data.instance;
|
|
174
|
-
}
|
|
175
|
-
async performAction(workspaceId, instanceId, action) {
|
|
176
|
-
const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances/${instanceId}/actions`, { action });
|
|
177
|
-
return data.instance;
|
|
178
|
-
}
|
|
179
|
-
async sync(workspaceId, instanceId) {
|
|
180
|
-
const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances/${instanceId}/sync`);
|
|
181
|
-
return data.instance;
|
|
182
|
-
}
|
|
183
|
-
async checkUpdates(workspaceId, instanceId) {
|
|
184
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances/${instanceId}/updates`);
|
|
185
|
-
return data.update;
|
|
186
|
-
}
|
|
187
|
-
async applyUpdate(workspaceId, instanceId) {
|
|
188
|
-
const { data } = await this.api.post(`/workspaces/${workspaceId}/aws-instances/${instanceId}/updates`);
|
|
189
|
-
return data.update;
|
|
190
|
-
}
|
|
191
|
-
async getSecurity(workspaceId, instanceId) {
|
|
192
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-instances/${instanceId}/security`);
|
|
193
|
-
return data.rules;
|
|
194
|
-
}
|
|
195
|
-
async updateSecurity(workspaceId, instanceId, body) {
|
|
196
|
-
const { data } = await this.api.put(`/workspaces/${workspaceId}/aws-instances/${instanceId}/security`, body);
|
|
197
|
-
return data.rules;
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
});
|
|
201
|
-
|
|
202
159
|
// src/modules/invitations.ts
|
|
203
160
|
var InvitationsModule;
|
|
204
161
|
var init_invitations = __esm(() => {
|
|
@@ -431,17 +388,6 @@ var init_workspaces = __esm(() => {
|
|
|
431
388
|
async deleteApiKey(workspaceId, keyId) {
|
|
432
389
|
await this.api.delete(`/workspaces/${workspaceId}/api-keys/${keyId}`);
|
|
433
390
|
}
|
|
434
|
-
async getAwsCredentials(workspaceId) {
|
|
435
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/aws-credentials`);
|
|
436
|
-
return data.credential;
|
|
437
|
-
}
|
|
438
|
-
async saveAwsCredentials(workspaceId, body) {
|
|
439
|
-
const { data } = await this.api.put(`/workspaces/${workspaceId}/aws-credentials`, body);
|
|
440
|
-
return data.credential;
|
|
441
|
-
}
|
|
442
|
-
async deleteAwsCredentials(workspaceId) {
|
|
443
|
-
await this.api.delete(`/workspaces/${workspaceId}/aws-credentials`);
|
|
444
|
-
}
|
|
445
391
|
};
|
|
446
392
|
});
|
|
447
393
|
|
|
@@ -489,7 +435,6 @@ __export(exports_src, {
|
|
|
489
435
|
LocusEmitter: () => LocusEmitter,
|
|
490
436
|
LocusClient: () => LocusClient,
|
|
491
437
|
InvitationsModule: () => InvitationsModule,
|
|
492
|
-
InstancesModule: () => InstancesModule,
|
|
493
438
|
DocsModule: () => DocsModule,
|
|
494
439
|
DiscussionSchema: () => DiscussionSchema,
|
|
495
440
|
DiscussionMessageSchema: () => DiscussionMessageSchema,
|
|
@@ -510,7 +455,6 @@ class LocusClient {
|
|
|
510
455
|
invitations;
|
|
511
456
|
docs;
|
|
512
457
|
ci;
|
|
513
|
-
instances;
|
|
514
458
|
constructor(config) {
|
|
515
459
|
this.emitter = new LocusEmitter;
|
|
516
460
|
this.api = import_axios.default.create({
|
|
@@ -530,7 +474,6 @@ class LocusClient {
|
|
|
530
474
|
this.invitations = new InvitationsModule(this.api, this.emitter);
|
|
531
475
|
this.docs = new DocsModule(this.api, this.emitter);
|
|
532
476
|
this.ci = new CiModule(this.api, this.emitter);
|
|
533
|
-
this.instances = new InstancesModule(this.api, this.emitter);
|
|
534
477
|
if (config.retryOptions) {
|
|
535
478
|
this.setupRetryInterceptor(config.retryOptions);
|
|
536
479
|
}
|
|
@@ -596,7 +539,6 @@ var init_src = __esm(() => {
|
|
|
596
539
|
init_auth();
|
|
597
540
|
init_ci();
|
|
598
541
|
init_docs();
|
|
599
|
-
init_instances();
|
|
600
542
|
init_invitations();
|
|
601
543
|
init_organizations();
|
|
602
544
|
init_sprints();
|
|
@@ -608,7 +550,6 @@ var init_src = __esm(() => {
|
|
|
608
550
|
init_auth();
|
|
609
551
|
init_ci();
|
|
610
552
|
init_docs();
|
|
611
|
-
init_instances();
|
|
612
553
|
init_invitations();
|
|
613
554
|
init_organizations();
|
|
614
555
|
init_sprints();
|
|
@@ -874,6 +815,112 @@ var init_resolve_bin = __esm(() => {
|
|
|
874
815
|
ENV_VARS_TO_STRIP = ["ANTHROPIC_API_KEY", "OPENAI_API_KEY"];
|
|
875
816
|
});
|
|
876
817
|
|
|
818
|
+
// src/ai/claude-stream-parser.ts
|
|
819
|
+
class ClaudeStreamParser {
|
|
820
|
+
activeTools = new Map;
|
|
821
|
+
parseLineToChunk(line) {
|
|
822
|
+
if (!line.trim())
|
|
823
|
+
return null;
|
|
824
|
+
try {
|
|
825
|
+
const item = JSON.parse(line);
|
|
826
|
+
return this.processItemToChunk(item);
|
|
827
|
+
} catch {
|
|
828
|
+
return null;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
parseLine(line, log) {
|
|
832
|
+
if (!line.trim())
|
|
833
|
+
return null;
|
|
834
|
+
try {
|
|
835
|
+
const item = JSON.parse(line);
|
|
836
|
+
return this.processItem(item, log);
|
|
837
|
+
} catch {
|
|
838
|
+
return null;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
processItemToChunk(item) {
|
|
842
|
+
if (item.type === "result") {
|
|
843
|
+
return { type: "result", content: item.result || "" };
|
|
844
|
+
}
|
|
845
|
+
if (item.type === "stream_event" && item.event) {
|
|
846
|
+
return this.handleEventToChunk(item.event);
|
|
847
|
+
}
|
|
848
|
+
return null;
|
|
849
|
+
}
|
|
850
|
+
handleEventToChunk(event) {
|
|
851
|
+
const { type, delta, content_block, index } = event;
|
|
852
|
+
if (type === "content_block_delta" && delta?.type === "text_delta") {
|
|
853
|
+
return { type: "text_delta", content: delta.text || "" };
|
|
854
|
+
}
|
|
855
|
+
if (type === "content_block_delta" && delta?.type === "input_json_delta" && delta.partial_json !== undefined && index !== undefined) {
|
|
856
|
+
const activeTool = this.activeTools.get(index);
|
|
857
|
+
if (activeTool) {
|
|
858
|
+
activeTool.parameterJson += delta.partial_json;
|
|
859
|
+
}
|
|
860
|
+
return null;
|
|
861
|
+
}
|
|
862
|
+
if (type === "content_block_start" && content_block) {
|
|
863
|
+
if (content_block.type === "tool_use" && content_block.name) {
|
|
864
|
+
if (index !== undefined) {
|
|
865
|
+
this.activeTools.set(index, {
|
|
866
|
+
name: content_block.name,
|
|
867
|
+
id: content_block.id,
|
|
868
|
+
index,
|
|
869
|
+
parameterJson: "",
|
|
870
|
+
startTime: Date.now()
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
return {
|
|
874
|
+
type: "tool_use",
|
|
875
|
+
tool: content_block.name,
|
|
876
|
+
id: content_block.id
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
if (content_block.type === "thinking") {
|
|
880
|
+
return { type: "thinking" };
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
if (type === "content_block_stop" && index !== undefined) {
|
|
884
|
+
const activeTool = this.activeTools.get(index);
|
|
885
|
+
if (activeTool?.parameterJson) {
|
|
886
|
+
try {
|
|
887
|
+
const parameters = JSON.parse(activeTool.parameterJson);
|
|
888
|
+
return {
|
|
889
|
+
type: "tool_parameters",
|
|
890
|
+
tool: activeTool.name,
|
|
891
|
+
id: activeTool.id,
|
|
892
|
+
parameters
|
|
893
|
+
};
|
|
894
|
+
} catch {}
|
|
895
|
+
}
|
|
896
|
+
return null;
|
|
897
|
+
}
|
|
898
|
+
return null;
|
|
899
|
+
}
|
|
900
|
+
processItem(item, log) {
|
|
901
|
+
if (item.type === "result") {
|
|
902
|
+
return item.result || "";
|
|
903
|
+
}
|
|
904
|
+
if (item.type === "stream_event" && item.event) {
|
|
905
|
+
this.handleEvent(item.event, log);
|
|
906
|
+
}
|
|
907
|
+
return null;
|
|
908
|
+
}
|
|
909
|
+
handleEvent(event, log) {
|
|
910
|
+
const { type, content_block } = event;
|
|
911
|
+
if (type === "content_block_start" && content_block) {
|
|
912
|
+
if (content_block.type === "tool_use" && content_block.name) {
|
|
913
|
+
log?.(`
|
|
914
|
+
${c.primary("[Claude]")} ${c.bold(`Running ${content_block.name}...`)}
|
|
915
|
+
`, "info");
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
var init_claude_stream_parser = __esm(() => {
|
|
921
|
+
init_colors();
|
|
922
|
+
});
|
|
923
|
+
|
|
877
924
|
// src/ai/claude-runner.ts
|
|
878
925
|
class ClaudeRunner {
|
|
879
926
|
model;
|
|
@@ -881,7 +928,6 @@ class ClaudeRunner {
|
|
|
881
928
|
projectPath;
|
|
882
929
|
eventEmitter;
|
|
883
930
|
currentToolName;
|
|
884
|
-
activeTools = new Map;
|
|
885
931
|
activeProcess = null;
|
|
886
932
|
aborted = false;
|
|
887
933
|
timeoutMs;
|
|
@@ -916,7 +962,7 @@ class ClaudeRunner {
|
|
|
916
962
|
}
|
|
917
963
|
if (!isLastAttempt) {
|
|
918
964
|
const delay = Math.pow(2, attempt) * 1000;
|
|
919
|
-
|
|
965
|
+
this.log?.(`Claude CLI attempt ${attempt} failed: ${err.message}. Retrying in ${delay}ms...`, "warn");
|
|
920
966
|
await new Promise((resolve2) => setTimeout(resolve2, delay));
|
|
921
967
|
}
|
|
922
968
|
}
|
|
@@ -956,6 +1002,7 @@ class ClaudeRunner {
|
|
|
956
1002
|
}
|
|
957
1003
|
async* runStream(prompt) {
|
|
958
1004
|
this.aborted = false;
|
|
1005
|
+
const parser = new ClaudeStreamParser;
|
|
959
1006
|
const args = this.buildCliArgs();
|
|
960
1007
|
const env = getAugmentedEnv({
|
|
961
1008
|
FORCE_COLOR: "1",
|
|
@@ -1016,7 +1063,7 @@ class ClaudeRunner {
|
|
|
1016
1063
|
`);
|
|
1017
1064
|
buffer = lines.pop() || "";
|
|
1018
1065
|
for (const line of lines) {
|
|
1019
|
-
const chunk =
|
|
1066
|
+
const chunk = parser.parseLineToChunk(line);
|
|
1020
1067
|
if (chunk) {
|
|
1021
1068
|
if (chunk.type === "result") {
|
|
1022
1069
|
lastResultContent = chunk.content;
|
|
@@ -1125,77 +1172,9 @@ class ClaudeRunner {
|
|
|
1125
1172
|
break;
|
|
1126
1173
|
}
|
|
1127
1174
|
}
|
|
1128
|
-
parseStreamLineToChunk(line) {
|
|
1129
|
-
if (!line.trim())
|
|
1130
|
-
return null;
|
|
1131
|
-
try {
|
|
1132
|
-
const item = JSON.parse(line);
|
|
1133
|
-
return this.processStreamItemToChunk(item);
|
|
1134
|
-
} catch {
|
|
1135
|
-
return null;
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
processStreamItemToChunk(item) {
|
|
1139
|
-
if (item.type === "result") {
|
|
1140
|
-
return { type: "result", content: item.result || "" };
|
|
1141
|
-
}
|
|
1142
|
-
if (item.type === "stream_event" && item.event) {
|
|
1143
|
-
return this.handleEventToChunk(item.event);
|
|
1144
|
-
}
|
|
1145
|
-
return null;
|
|
1146
|
-
}
|
|
1147
|
-
handleEventToChunk(event) {
|
|
1148
|
-
const { type, delta, content_block, index } = event;
|
|
1149
|
-
if (type === "content_block_delta" && delta?.type === "text_delta") {
|
|
1150
|
-
return { type: "text_delta", content: delta.text || "" };
|
|
1151
|
-
}
|
|
1152
|
-
if (type === "content_block_delta" && delta?.type === "input_json_delta" && delta.partial_json !== undefined && index !== undefined) {
|
|
1153
|
-
const activeTool = this.activeTools.get(index);
|
|
1154
|
-
if (activeTool) {
|
|
1155
|
-
activeTool.parameterJson += delta.partial_json;
|
|
1156
|
-
}
|
|
1157
|
-
return null;
|
|
1158
|
-
}
|
|
1159
|
-
if (type === "content_block_start" && content_block) {
|
|
1160
|
-
if (content_block.type === "tool_use" && content_block.name) {
|
|
1161
|
-
if (index !== undefined) {
|
|
1162
|
-
this.activeTools.set(index, {
|
|
1163
|
-
name: content_block.name,
|
|
1164
|
-
id: content_block.id,
|
|
1165
|
-
index,
|
|
1166
|
-
parameterJson: "",
|
|
1167
|
-
startTime: Date.now()
|
|
1168
|
-
});
|
|
1169
|
-
}
|
|
1170
|
-
return {
|
|
1171
|
-
type: "tool_use",
|
|
1172
|
-
tool: content_block.name,
|
|
1173
|
-
id: content_block.id
|
|
1174
|
-
};
|
|
1175
|
-
}
|
|
1176
|
-
if (content_block.type === "thinking") {
|
|
1177
|
-
return { type: "thinking" };
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
if (type === "content_block_stop" && index !== undefined) {
|
|
1181
|
-
const activeTool = this.activeTools.get(index);
|
|
1182
|
-
if (activeTool?.parameterJson) {
|
|
1183
|
-
try {
|
|
1184
|
-
const parameters = JSON.parse(activeTool.parameterJson);
|
|
1185
|
-
return {
|
|
1186
|
-
type: "tool_parameters",
|
|
1187
|
-
tool: activeTool.name,
|
|
1188
|
-
id: activeTool.id,
|
|
1189
|
-
parameters
|
|
1190
|
-
};
|
|
1191
|
-
} catch {}
|
|
1192
|
-
}
|
|
1193
|
-
return null;
|
|
1194
|
-
}
|
|
1195
|
-
return null;
|
|
1196
|
-
}
|
|
1197
1175
|
executeRun(prompt) {
|
|
1198
1176
|
this.aborted = false;
|
|
1177
|
+
const parser = new ClaudeStreamParser;
|
|
1199
1178
|
return new Promise((resolve2, reject) => {
|
|
1200
1179
|
const args = this.buildCliArgs();
|
|
1201
1180
|
const env = getAugmentedEnv({
|
|
@@ -1218,7 +1197,7 @@ class ClaudeRunner {
|
|
|
1218
1197
|
`);
|
|
1219
1198
|
buffer = lines.pop() || "";
|
|
1220
1199
|
for (const line of lines) {
|
|
1221
|
-
const result =
|
|
1200
|
+
const result = parser.parseLine(line, this.log);
|
|
1222
1201
|
if (result)
|
|
1223
1202
|
finalResult = result;
|
|
1224
1203
|
}
|
|
@@ -1259,35 +1238,6 @@ class ClaudeRunner {
|
|
|
1259
1238
|
claude.stdin.end();
|
|
1260
1239
|
});
|
|
1261
1240
|
}
|
|
1262
|
-
handleStreamLine(line) {
|
|
1263
|
-
if (!line.trim())
|
|
1264
|
-
return null;
|
|
1265
|
-
try {
|
|
1266
|
-
const item = JSON.parse(line);
|
|
1267
|
-
return this.processStreamItem(item);
|
|
1268
|
-
} catch {
|
|
1269
|
-
return null;
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
processStreamItem(item) {
|
|
1273
|
-
if (item.type === "result") {
|
|
1274
|
-
return item.result || "";
|
|
1275
|
-
}
|
|
1276
|
-
if (item.type === "stream_event" && item.event) {
|
|
1277
|
-
this.handleEvent(item.event);
|
|
1278
|
-
}
|
|
1279
|
-
return null;
|
|
1280
|
-
}
|
|
1281
|
-
handleEvent(event) {
|
|
1282
|
-
const { type, content_block } = event;
|
|
1283
|
-
if (type === "content_block_start" && content_block) {
|
|
1284
|
-
if (content_block.type === "tool_use" && content_block.name) {
|
|
1285
|
-
this.log?.(`
|
|
1286
|
-
${c.primary("[Claude]")} ${c.bold(`Running ${content_block.name}...`)}
|
|
1287
|
-
`, "info");
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
1241
|
shouldSuppressLine(line) {
|
|
1292
1242
|
const infoLogRegex = /^\[\d{2}:\d{2}:\d{2}\]\s\[.*?\]\sℹ\s*$/;
|
|
1293
1243
|
return infoLogRegex.test(line.trim());
|
|
@@ -1301,8 +1251,8 @@ ${c.primary("[Claude]")} ${c.bold(`Running ${content_block.name}...`)}
|
|
|
1301
1251
|
var import_node_child_process, import_node_path3, DEFAULT_TIMEOUT_MS;
|
|
1302
1252
|
var init_claude_runner = __esm(() => {
|
|
1303
1253
|
init_config();
|
|
1304
|
-
init_colors();
|
|
1305
1254
|
init_resolve_bin();
|
|
1255
|
+
init_claude_stream_parser();
|
|
1306
1256
|
import_node_child_process = require("node:child_process");
|
|
1307
1257
|
import_node_path3 = require("node:path");
|
|
1308
1258
|
DEFAULT_TIMEOUT_MS = 60 * 60 * 1000;
|
|
@@ -1350,7 +1300,7 @@ class CodexRunner {
|
|
|
1350
1300
|
}
|
|
1351
1301
|
if (attempt < maxRetries) {
|
|
1352
1302
|
const delay = Math.pow(2, attempt) * 1000;
|
|
1353
|
-
|
|
1303
|
+
this.log?.(`Codex CLI attempt ${attempt} failed: ${lastError.message}. Retrying in ${delay}ms...`, "warn");
|
|
1354
1304
|
await this.sleep(delay);
|
|
1355
1305
|
}
|
|
1356
1306
|
}
|
|
@@ -1647,6 +1597,20 @@ var init_codex_runner = __esm(() => {
|
|
|
1647
1597
|
});
|
|
1648
1598
|
|
|
1649
1599
|
// src/ai/factory.ts
|
|
1600
|
+
function createWorkerLogger(agentId, prefix) {
|
|
1601
|
+
const tag = prefix ? `${prefix}:${agentId.slice(-8)}` : agentId.slice(-8);
|
|
1602
|
+
return (message, level = "info") => {
|
|
1603
|
+
const timestamp = new Date().toISOString().split("T")[1]?.slice(0, 8) ?? "";
|
|
1604
|
+
const colorFn = {
|
|
1605
|
+
info: c.cyan,
|
|
1606
|
+
success: c.green,
|
|
1607
|
+
warn: c.yellow,
|
|
1608
|
+
error: c.red
|
|
1609
|
+
}[level];
|
|
1610
|
+
const icon = { info: "ℹ", success: "✓", warn: "⚠", error: "✗" }[level];
|
|
1611
|
+
console.log(`${c.dim(`[${timestamp}]`)} ${c.bold(`[${tag}]`)} ${colorFn(`${icon} ${message}`)}`);
|
|
1612
|
+
};
|
|
1613
|
+
}
|
|
1650
1614
|
function createAiRunner(provider, config) {
|
|
1651
1615
|
const resolvedProvider = provider ?? PROVIDER.CLAUDE;
|
|
1652
1616
|
const model = config.model ?? DEFAULT_MODEL[resolvedProvider];
|
|
@@ -1661,8 +1625,10 @@ function createAiRunner(provider, config) {
|
|
|
1661
1625
|
return new ClaudeRunner(config.projectPath, model, config.log, config.timeoutMs);
|
|
1662
1626
|
}
|
|
1663
1627
|
}
|
|
1628
|
+
var noopLogger = () => {};
|
|
1664
1629
|
var init_factory = __esm(() => {
|
|
1665
1630
|
init_config();
|
|
1631
|
+
init_colors();
|
|
1666
1632
|
init_claude_runner();
|
|
1667
1633
|
init_codex_runner();
|
|
1668
1634
|
});
|
|
@@ -2595,9 +2561,11 @@ class AgentWorker {
|
|
|
2595
2561
|
currentTaskId = null;
|
|
2596
2562
|
completedTaskList = [];
|
|
2597
2563
|
taskSummaries = [];
|
|
2564
|
+
log;
|
|
2598
2565
|
constructor(config) {
|
|
2599
2566
|
this.config = config;
|
|
2600
2567
|
const projectPath = config.projectPath || process.cwd();
|
|
2568
|
+
this.log = createWorkerLogger(config.agentId);
|
|
2601
2569
|
this.client = new LocusClient({
|
|
2602
2570
|
baseUrl: config.apiBase,
|
|
2603
2571
|
token: config.apiKey,
|
|
@@ -2608,7 +2576,6 @@ class AgentWorker {
|
|
|
2608
2576
|
factor: 2
|
|
2609
2577
|
}
|
|
2610
2578
|
});
|
|
2611
|
-
const log = this.log.bind(this);
|
|
2612
2579
|
if (!isGitAvailable()) {
|
|
2613
2580
|
this.log("git is not installed — branch management will not work", "error");
|
|
2614
2581
|
}
|
|
@@ -2619,29 +2586,18 @@ class AgentWorker {
|
|
|
2619
2586
|
this.aiRunner = createAiRunner(provider, {
|
|
2620
2587
|
projectPath,
|
|
2621
2588
|
model: config.model,
|
|
2622
|
-
log,
|
|
2589
|
+
log: this.log,
|
|
2623
2590
|
reasoningEffort: config.reasoningEffort
|
|
2624
2591
|
});
|
|
2625
2592
|
this.taskExecutor = new TaskExecutor({
|
|
2626
2593
|
aiRunner: this.aiRunner,
|
|
2627
2594
|
projectPath,
|
|
2628
|
-
log
|
|
2595
|
+
log: this.log
|
|
2629
2596
|
});
|
|
2630
|
-
this.gitWorkflow = new GitWorkflow(config, log);
|
|
2597
|
+
this.gitWorkflow = new GitWorkflow(config, this.log);
|
|
2631
2598
|
const providerLabel = provider === "codex" ? "Codex" : "Claude";
|
|
2632
2599
|
this.log(`Using ${providerLabel} CLI for all phases`, "info");
|
|
2633
2600
|
}
|
|
2634
|
-
log(message, level = "info") {
|
|
2635
|
-
const timestamp = new Date().toISOString().split("T")[1]?.slice(0, 8) ?? "";
|
|
2636
|
-
const colorFn = {
|
|
2637
|
-
info: c.cyan,
|
|
2638
|
-
success: c.green,
|
|
2639
|
-
warn: c.yellow,
|
|
2640
|
-
error: c.red
|
|
2641
|
-
}[level];
|
|
2642
|
-
const prefix = { info: "ℹ", success: "✓", warn: "⚠", error: "✗" }[level];
|
|
2643
|
-
console.log(`${c.dim(`[${timestamp}]`)} ${c.bold(`[${this.config.agentId.slice(-8)}]`)} ${colorFn(`${prefix} ${message}`)}`);
|
|
2644
|
-
}
|
|
2645
2601
|
async getActiveSprint() {
|
|
2646
2602
|
try {
|
|
2647
2603
|
if (this.config.sprintId) {
|
|
@@ -2817,7 +2773,6 @@ var init_worker = __esm(() => {
|
|
|
2817
2773
|
init_config();
|
|
2818
2774
|
init_git_utils();
|
|
2819
2775
|
init_src();
|
|
2820
|
-
init_colors();
|
|
2821
2776
|
init_git_workflow();
|
|
2822
2777
|
init_task_executor();
|
|
2823
2778
|
import_shared3 = require("@locusai/shared");
|
|
@@ -8,7 +8,6 @@ export declare class ClaudeRunner implements AiRunner {
|
|
|
8
8
|
private projectPath;
|
|
9
9
|
private eventEmitter?;
|
|
10
10
|
private currentToolName?;
|
|
11
|
-
private activeTools;
|
|
12
11
|
private activeProcess;
|
|
13
12
|
private aborted;
|
|
14
13
|
timeoutMs: number;
|
|
@@ -29,13 +28,7 @@ export declare class ClaudeRunner implements AiRunner {
|
|
|
29
28
|
* Emit an event corresponding to a stream chunk.
|
|
30
29
|
*/
|
|
31
30
|
private emitEventForChunk;
|
|
32
|
-
private parseStreamLineToChunk;
|
|
33
|
-
private processStreamItemToChunk;
|
|
34
|
-
private handleEventToChunk;
|
|
35
31
|
private executeRun;
|
|
36
|
-
private handleStreamLine;
|
|
37
|
-
private processStreamItem;
|
|
38
|
-
private handleEvent;
|
|
39
32
|
private shouldSuppressLine;
|
|
40
33
|
private createExecutionError;
|
|
41
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-runner.d.ts","sourceRoot":"","sources":["../../src/ai/claude-runner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"claude-runner.d.ts","sourceRoot":"","sources":["../../src/ai/claude-runner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAK5C,qBAAa,YAAa,YAAW,QAAQ;IAUzC,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,GAAG,CAAC;IAVd,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAC,CAAmB;IACxC,OAAO,CAAC,eAAe,CAAC,CAAS;IACjC,OAAO,CAAC,aAAa,CAA6B;IAClD,OAAO,CAAC,OAAO,CAAS;IACxB,SAAS,EAAE,MAAM,CAAC;gBAGhB,WAAW,EAAE,MAAM,EACX,KAAK,GAAE,MAAuC,EAC9C,GAAG,CAAC,EAAE,KAAK,YAAA,EACnB,SAAS,CAAC,EAAE,MAAM;IAMpB;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAIhD;;OAEG;IACH,KAAK,IAAI,IAAI;IAQP,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IA+B1C,OAAO,CAAC,WAAW;IA0BnB,OAAO,CAAC,YAAY;IAgBb,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,WAAW,EAAE,IAAI,EAAE,OAAO,CAAC;IA6K5E;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAiCzB,OAAO,CAAC,UAAU;IAkFlB,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,oBAAoB;CAO7B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { StreamChunk } from "../exec/types.js";
|
|
2
|
+
import type { LogFn } from "./factory.js";
|
|
3
|
+
export interface ClaudeStreamItem {
|
|
4
|
+
type: string;
|
|
5
|
+
result?: string;
|
|
6
|
+
event?: {
|
|
7
|
+
type: string;
|
|
8
|
+
index?: number;
|
|
9
|
+
delta?: {
|
|
10
|
+
type: string;
|
|
11
|
+
text?: string;
|
|
12
|
+
partial_json?: string;
|
|
13
|
+
};
|
|
14
|
+
content_block?: {
|
|
15
|
+
type: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
id?: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Parses Claude CLI stream-json output into typed StreamChunks.
|
|
23
|
+
* Handles both streaming mode (returns StreamChunk) and
|
|
24
|
+
* non-streaming mode (returns result string).
|
|
25
|
+
*/
|
|
26
|
+
export declare class ClaudeStreamParser {
|
|
27
|
+
private activeTools;
|
|
28
|
+
/**
|
|
29
|
+
* Parse a stream-json line into a StreamChunk (for streaming mode).
|
|
30
|
+
*/
|
|
31
|
+
parseLineToChunk(line: string): StreamChunk | null;
|
|
32
|
+
/**
|
|
33
|
+
* Parse a stream-json line and extract the final result string (for non-streaming mode).
|
|
34
|
+
*/
|
|
35
|
+
parseLine(line: string, log?: LogFn): string | null;
|
|
36
|
+
private processItemToChunk;
|
|
37
|
+
private handleEventToChunk;
|
|
38
|
+
private processItem;
|
|
39
|
+
private handleEvent;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=claude-stream-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-stream-parser.d.ts","sourceRoot":"","sources":["../../src/ai/claude-stream-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,kBAAkB,CAAC;AAEhE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE;YACN,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,YAAY,CAAC,EAAE,MAAM,CAAC;SACvB,CAAC;QACF,aAAa,CAAC,EAAE;YACd,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,EAAE,CAAC,EAAE,MAAM,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AO,CAAC,SAAS;IAqBjB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,qBAAqB;IAY7B,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,KAAK;CAGd"}
|
package/dist/ai/factory.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import type { AiProvider, AiRunner } from "./runner.js";
|
|
2
2
|
export type LogFn = (message: string, level?: "info" | "success" | "warn" | "error") => void;
|
|
3
|
+
/**
|
|
4
|
+
* Silent no-op logger. Use as default when logging is optional.
|
|
5
|
+
*/
|
|
6
|
+
export declare const noopLogger: LogFn;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a worker-style logger with timestamps and agent ID prefix.
|
|
9
|
+
* Used by SDK agent workers for structured log output.
|
|
10
|
+
*
|
|
11
|
+
* Output format: `[HH:mm:ss] [agent-id] ℹ message`
|
|
12
|
+
*/
|
|
13
|
+
export declare function createWorkerLogger(agentId: string, prefix?: string): LogFn;
|
|
3
14
|
export interface AiRunnerConfig {
|
|
4
15
|
projectPath: string;
|
|
5
16
|
model?: string;
|
package/dist/ai/factory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/ai/factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/ai/factory.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,KAAK,GAAG,CAClB,OAAO,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,KAC1C,IAAI,CAAC;AAEV;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAoB1E;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,UAAU,GAAG,SAAS,EAChC,MAAM,EAAE,cAAc,GACrB,QAAQ,CA8BV"}
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { ClaudeRunner } from "./claude-runner.js";
|
|
2
|
+
export type { ClaudeStreamItem } from "./claude-stream-parser.js";
|
|
3
|
+
export { ClaudeStreamParser } from "./claude-stream-parser.js";
|
|
2
4
|
export { CodexRunner } from "./codex-runner.js";
|
|
3
5
|
export type { AiRunnerConfig, LogFn } from "./factory.js";
|
|
4
|
-
export { createAiRunner } from "./factory.js";
|
|
6
|
+
export { createAiRunner, createWorkerLogger, noopLogger } from "./factory.js";
|
|
5
7
|
export type { AiProvider, AiRunner } from "./runner.js";
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ai/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC9E,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discussion-facilitator.d.ts","sourceRoot":"","sources":["../../src/discussion/discussion-facilitator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"discussion-facilitator.d.ts","sourceRoot":"","sources":["../../src/discussion/discussion-facilitator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAgB,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAKpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE3E,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,iBAAiB,EAAE,iBA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