lalph 0.3.115 → 0.3.116
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/cli.mjs +67 -35
- package/package.json +2 -2
- package/src/Agents/chooser.ts +0 -1
- package/src/Agents/researcher.ts +1 -3
- package/src/Agents/reviewer.ts +0 -1
- package/src/Agents/timeout.ts +0 -1
- package/src/Agents/worker.ts +0 -1
- package/src/Clanka.ts +1 -8
- package/src/commands/root.ts +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -182737,7 +182737,7 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
|
|
|
182737
182737
|
});
|
|
182738
182738
|
Ze.glob = Ze;
|
|
182739
182739
|
//#endregion
|
|
182740
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
182740
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/ApplyPatch.js
|
|
182741
182741
|
/**
|
|
182742
182742
|
* @since 1.0.0
|
|
182743
182743
|
*/
|
|
@@ -197618,7 +197618,7 @@ var StreamableHTTPClientTransport = class {
|
|
|
197618
197618
|
}
|
|
197619
197619
|
};
|
|
197620
197620
|
//#endregion
|
|
197621
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
197621
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/McpClient.js
|
|
197622
197622
|
/**
|
|
197623
197623
|
* @since 1.0.0
|
|
197624
197624
|
*/
|
|
@@ -197663,7 +197663,7 @@ const layer$13 = effect$1(McpClient, gen(function* () {
|
|
|
197663
197663
|
});
|
|
197664
197664
|
}));
|
|
197665
197665
|
//#endregion
|
|
197666
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
197666
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/ExaSearch.js
|
|
197667
197667
|
/**
|
|
197668
197668
|
* @since 1.0.0
|
|
197669
197669
|
*/
|
|
@@ -212613,7 +212613,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
212613
212613
|
exports.impl = impl;
|
|
212614
212614
|
}));
|
|
212615
212615
|
//#endregion
|
|
212616
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
212616
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/WebToMarkdown.js
|
|
212617
212617
|
/**
|
|
212618
212618
|
* @since 1.0.0
|
|
212619
212619
|
*/
|
|
@@ -215752,7 +215752,7 @@ function isEmptyParamsRecord(indexSignature) {
|
|
|
215752
215752
|
return indexSignature.parameter === string$3 && isNever(indexSignature.type);
|
|
215753
215753
|
}
|
|
215754
215754
|
//#endregion
|
|
215755
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
215755
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/SemanticSearch/Service.js
|
|
215756
215756
|
/**
|
|
215757
215757
|
* @since 1.0.0
|
|
215758
215758
|
*/
|
|
@@ -215778,7 +215778,7 @@ const maybeRemoveFile = (path) => serviceOption(SemanticSearch).pipe(flatMap$5(m
|
|
|
215778
215778
|
onSome: (service) => service.removeFile(path)
|
|
215779
215779
|
})));
|
|
215780
215780
|
//#endregion
|
|
215781
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
215781
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/AgentTools.js
|
|
215782
215782
|
/**
|
|
215783
215783
|
* @since 1.0.0
|
|
215784
215784
|
*/
|
|
@@ -216181,7 +216181,7 @@ const AgentToolHandlers = AgentToolHandlersNoDeps.pipe(provide$3([layer$12, laye
|
|
|
216181
216181
|
AgentToolHandlersNoDeps.pipe(provide$3([mock(ExaSearch)({}), mock(WebToMarkdown)({})]));
|
|
216182
216182
|
var ApplyPatchError = class extends TaggedClass$2("ApplyPatchError") {};
|
|
216183
216183
|
//#endregion
|
|
216184
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
216184
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/TypeBuilder.js
|
|
216185
216185
|
const resolveDocumentation = resolveAt("documentation");
|
|
216186
216186
|
const identifierPattern = /^[$A-Z_a-z][$0-9A-Z_a-z]*$/u;
|
|
216187
216187
|
const Precedence = {
|
|
@@ -216454,7 +216454,7 @@ const render = (schema, options) => {
|
|
|
216454
216454
|
return printNode({ text: documentation === void 0 ? rendered.text : `${renderJsDoc(documentation, 0, printerOptions)}${printerOptions.newLine}${rendered.text}` }, printerOptions);
|
|
216455
216455
|
};
|
|
216456
216456
|
//#endregion
|
|
216457
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
216457
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/ToolkitRenderer.js
|
|
216458
216458
|
/**
|
|
216459
216459
|
* @since 1.0.0
|
|
216460
216460
|
*/
|
|
@@ -216476,7 +216476,7 @@ declare function ${name}(${params}): Promise<${render(tool.successSchema)}>`);
|
|
|
216476
216476
|
}) });
|
|
216477
216477
|
};
|
|
216478
216478
|
//#endregion
|
|
216479
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
216479
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/ScriptPreprocessing.js
|
|
216480
216480
|
const callTemplateTargets = ["applyPatch", "taskComplete"];
|
|
216481
216481
|
const objectPropertyTargets = [{
|
|
216482
216482
|
functionName: "writeFile",
|
|
@@ -217086,7 +217086,7 @@ const rewriteAssignedTargets = (script) => {
|
|
|
217086
217086
|
};
|
|
217087
217087
|
const preprocessScript = (script) => rewriteAssignedTargets(rewriteDirectTemplates(script));
|
|
217088
217088
|
//#endregion
|
|
217089
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
217089
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/AgentExecutor.js
|
|
217090
217090
|
/**
|
|
217091
217091
|
* @since 1.0.0
|
|
217092
217092
|
*/
|
|
@@ -217271,7 +217271,7 @@ var QueueWriteStream = class extends Writable {
|
|
|
217271
217271
|
}
|
|
217272
217272
|
};
|
|
217273
217273
|
//#endregion
|
|
217274
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
217274
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/ScriptExtraction.js
|
|
217275
217275
|
const stripWrappingCodeFence = (script) => {
|
|
217276
217276
|
const lines = script.split(/\r?\n/);
|
|
217277
217277
|
if (lines.length < 2) return script;
|
|
@@ -218820,7 +218820,7 @@ const applySpanTransformer = (transformer, response, options) => {
|
|
|
218820
218820
|
});
|
|
218821
218821
|
};
|
|
218822
218822
|
//#endregion
|
|
218823
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
218823
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/Agent.js
|
|
218824
218824
|
/**
|
|
218825
218825
|
* @since 1.0.0
|
|
218826
218826
|
*/
|
|
@@ -218863,6 +218863,7 @@ ${content}
|
|
|
218863
218863
|
const subagentModel = yield* SubagentModel;
|
|
218864
218864
|
const modelConfig = yield* AgentModelConfig;
|
|
218865
218865
|
const conversationMode = yield* ConversationMode;
|
|
218866
|
+
const turnTimeout = yield* TurnTimeout;
|
|
218866
218867
|
let finalSummary = none$4();
|
|
218867
218868
|
const output = yield* make$75();
|
|
218868
218869
|
let inputTokens = 0;
|
|
@@ -218943,7 +218944,30 @@ ${content}
|
|
|
218943
218944
|
return succeed$4(finished.summary);
|
|
218944
218945
|
}), orDie$2);
|
|
218945
218946
|
}, provide$1(subagentModel), provideService$2(SubagentModel, subagentModel));
|
|
218947
|
+
const clock = yield* Clock;
|
|
218948
|
+
const turnTimeoutMs = toMillis(turnTimeout);
|
|
218949
|
+
let turnExpires = 0;
|
|
218950
|
+
const turnTimeoutReset = () => {
|
|
218951
|
+
turnExpires = clock.currentTimeMillisUnsafe() + turnTimeoutMs;
|
|
218952
|
+
};
|
|
218953
|
+
const toolLatch = makeUnsafe$10(true);
|
|
218954
|
+
const toolLatchAcquire = toolLatch.close;
|
|
218955
|
+
const toolLatchRelease = sync(() => {
|
|
218956
|
+
turnTimeoutReset();
|
|
218957
|
+
toolLatch.openUnsafe();
|
|
218958
|
+
});
|
|
218959
|
+
const turnTimeoutEffect = gen(function* () {
|
|
218960
|
+
toolLatch.openUnsafe();
|
|
218961
|
+
turnTimeoutReset();
|
|
218962
|
+
while (true) {
|
|
218963
|
+
yield* sleep(turnExpires - clock.currentTimeMillisUnsafe());
|
|
218964
|
+
yield* toolLatch.await;
|
|
218965
|
+
if (turnExpires - clock.currentTimeMillisUnsafe() > 0) continue;
|
|
218966
|
+
return yield* new TimeoutError();
|
|
218967
|
+
}
|
|
218968
|
+
});
|
|
218946
218969
|
const executeScript = fnUntraced(function* (script) {
|
|
218970
|
+
yield* toolLatchAcquire;
|
|
218947
218971
|
maybeSend({
|
|
218948
218972
|
agentId,
|
|
218949
218973
|
part: new ScriptEnd(),
|
|
@@ -218962,7 +218986,7 @@ ${content}
|
|
|
218962
218986
|
part: new ScriptOutput({ output })
|
|
218963
218987
|
});
|
|
218964
218988
|
return output;
|
|
218965
|
-
});
|
|
218989
|
+
}, ensuring$2(toolLatchRelease));
|
|
218966
218990
|
if (!modelConfig.systemPromptTransform) update$1(prompt, setSystem(system));
|
|
218967
218991
|
yield* gen(function* () {
|
|
218968
218992
|
while (true) {
|
|
@@ -218992,6 +219016,7 @@ ${content}
|
|
|
218992
219016
|
return false;
|
|
218993
219017
|
}), runForEachArray((parts) => {
|
|
218994
219018
|
response.push(...parts);
|
|
219019
|
+
turnTimeoutReset();
|
|
218995
219020
|
for (const part of parts) switch (part.type) {
|
|
218996
219021
|
case "text-start":
|
|
218997
219022
|
case "reasoning-start":
|
|
@@ -219045,8 +219070,12 @@ ${content}
|
|
|
219045
219070
|
break;
|
|
219046
219071
|
}
|
|
219047
219072
|
return void_$2;
|
|
219048
|
-
}), retry$1({
|
|
219073
|
+
}), raceFirst(turnTimeoutEffect), retry$1({
|
|
219049
219074
|
while: (err) => {
|
|
219075
|
+
if (err._tag === "TimeoutError") {
|
|
219076
|
+
response = [];
|
|
219077
|
+
return true;
|
|
219078
|
+
}
|
|
219050
219079
|
if (err.isRetryable) {
|
|
219051
219080
|
maybeSend({
|
|
219052
219081
|
agentId,
|
|
@@ -219061,7 +219090,7 @@ ${content}
|
|
|
219061
219090
|
return err.isRetryable;
|
|
219062
219091
|
},
|
|
219063
219092
|
schedule: retryPolicy
|
|
219064
|
-
}), modelConfig.systemPromptTransform ? (effect) => modelConfig.systemPromptTransform(system, effect) : identity);
|
|
219093
|
+
}), catchTag$1("TimeoutError", die$2), modelConfig.systemPromptTransform ? (effect) => modelConfig.systemPromptTransform(system, effect) : identity);
|
|
219065
219094
|
update$1(prompt, concat(fromResponseParts(response)));
|
|
219066
219095
|
if (conversationMode && !hadToolCall && pendingMessages.size === 0) finalSummary = some$2(responseToSummary(response));
|
|
219067
219096
|
}
|
|
@@ -219205,6 +219234,15 @@ var ConversationMode = class ConversationMode extends Reference("clanka/Agent/Co
|
|
|
219205
219234
|
static layer = (enabled) => succeed$5(ConversationMode, enabled);
|
|
219206
219235
|
};
|
|
219207
219236
|
/**
|
|
219237
|
+
* Specify an inactivity timeout before retrying a turn.
|
|
219238
|
+
*
|
|
219239
|
+
* @since 1.0.0
|
|
219240
|
+
* @category Turn timeout
|
|
219241
|
+
*/
|
|
219242
|
+
var TurnTimeout = class TurnTimeout extends Reference("clanka/Agent/TurnTimeout", { defaultValue: () => minutes(2) }) {
|
|
219243
|
+
static layer = (timeout) => succeed$5(TurnTimeout, fromInputUnsafe(timeout));
|
|
219244
|
+
};
|
|
219245
|
+
/**
|
|
219208
219246
|
* @since 1.0.0
|
|
219209
219247
|
* @category System prompts
|
|
219210
219248
|
*/
|
|
@@ -230332,7 +230370,7 @@ const transformToolCallParams = /* @__PURE__ */ fnUntraced(function* (tools, too
|
|
|
230332
230370
|
})));
|
|
230333
230371
|
});
|
|
230334
230372
|
//#endregion
|
|
230335
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
230373
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/CodexAuth.js
|
|
230336
230374
|
/**
|
|
230337
230375
|
* @since 1.0.0
|
|
230338
230376
|
*/
|
|
@@ -230552,7 +230590,7 @@ var CodexAuth = class CodexAuth extends Service$1()("clanka/CodexAuth") {
|
|
|
230552
230590
|
static layerClient = this.layerClientNoDeps.pipe(provide$3(CodexAuth.layer));
|
|
230553
230591
|
};
|
|
230554
230592
|
//#endregion
|
|
230555
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
230593
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/Codex.js
|
|
230556
230594
|
/**
|
|
230557
230595
|
* @since 1.0.0
|
|
230558
230596
|
*/
|
|
@@ -230578,7 +230616,7 @@ const layerModel = (model, options) => layer$7({
|
|
|
230578
230616
|
}
|
|
230579
230617
|
}).pipe(merge$6(AgentModelConfig.layer({ systemPromptTransform: (system, effect) => withConfigOverride(effect, { instructions: system }) })));
|
|
230580
230618
|
//#endregion
|
|
230581
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
230619
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/CodeChunker.js
|
|
230582
230620
|
/**
|
|
230583
230621
|
* @since 1.0.0
|
|
230584
230622
|
*/
|
|
@@ -232338,7 +232376,7 @@ const getUsageDetailNumber = (details, field) => {
|
|
|
232338
232376
|
return typeof value === "number" ? value : void 0;
|
|
232339
232377
|
};
|
|
232340
232378
|
//#endregion
|
|
232341
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
232379
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/CopilotAuth.js
|
|
232342
232380
|
/**
|
|
232343
232381
|
* @since 1.0.0
|
|
232344
232382
|
*/
|
|
@@ -232529,7 +232567,7 @@ var GithubCopilotAuth = class GithubCopilotAuth extends Service$1()("clanka/Gith
|
|
|
232529
232567
|
static layerClient = this.layerClientNoDeps.pipe(provide$3(GithubCopilotAuth.layer));
|
|
232530
232568
|
};
|
|
232531
232569
|
//#endregion
|
|
232532
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
232570
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/Copilot.js
|
|
232533
232571
|
/**
|
|
232534
232572
|
* @since 1.0.0
|
|
232535
232573
|
*/
|
|
@@ -232949,7 +232987,7 @@ Object.defineProperties(createChalk.prototype, styles);
|
|
|
232949
232987
|
const chalk = createChalk();
|
|
232950
232988
|
createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
232951
232989
|
//#endregion
|
|
232952
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
232990
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/OutputFormatter.js
|
|
232953
232991
|
/**
|
|
232954
232992
|
* @since 1.0.0
|
|
232955
232993
|
*/
|
|
@@ -233657,7 +233695,7 @@ select * from ${sql(options.tableName)} where ${sql(idColumn)} = LAST_INSERT_ID(
|
|
|
233657
233695
|
};
|
|
233658
233696
|
});
|
|
233659
233697
|
//#endregion
|
|
233660
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
233698
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/ChunkRepo.js
|
|
233661
233699
|
/**
|
|
233662
233700
|
* @since 1.0.0
|
|
233663
233701
|
* @category Models
|
|
@@ -233923,7 +233961,7 @@ const run$1 = /* @__PURE__ */ make$25({});
|
|
|
233923
233961
|
*/
|
|
233924
233962
|
const layer$1 = (options) => effectDiscard(run$1(options));
|
|
233925
233963
|
//#endregion
|
|
233926
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
233964
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/internal/sqlite-vector.js
|
|
233927
233965
|
/**
|
|
233928
233966
|
* Binary extension for each platform
|
|
233929
233967
|
*/
|
|
@@ -234040,7 +234078,7 @@ function getExtensionPath() {
|
|
|
234040
234078
|
throw new ExtensionNotFoundError(`SQLite Vector extension not found for platform: ${getCurrentPlatform()}\n\nThe platform-specific package "${getPlatformPackageName()}" is not installed.\nThis usually happens when:\n 1. Your platform is not supported\n 2. npm failed to install optional dependencies\n 3. You're installing with --no-optional flag\n\nTry running: npm install --force`);
|
|
234041
234079
|
}
|
|
234042
234080
|
//#endregion
|
|
234043
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
234081
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/Sqlite.js
|
|
234044
234082
|
/**
|
|
234045
234083
|
* @since 1.0.0
|
|
234046
234084
|
*/
|
|
@@ -234068,7 +234106,7 @@ const SqliteLayer = (database) => layer$1({ loader: fromRecord({ "0001_create_ch
|
|
|
234068
234106
|
yield* fs.makeDirectory(directory, { recursive: true });
|
|
234069
234107
|
}))));
|
|
234070
234108
|
//#endregion
|
|
234071
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
234109
|
+
//#region node_modules/.pnpm/clanka@0.2.42_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_c7a7255483c6179856904fa879ba5401/node_modules/clanka/dist/SemanticSearch.js
|
|
234072
234110
|
/**
|
|
234073
234111
|
* @since 1.0.0
|
|
234074
234112
|
*/
|
|
@@ -242710,7 +242748,7 @@ const runClanka = fnUntraced(function* (options) {
|
|
|
242710
242748
|
yield* log$1(`Received steer message: ${message}`);
|
|
242711
242749
|
yield* agent.steer(message);
|
|
242712
242750
|
}, fromEffectDrain)), runDrain, forkScoped);
|
|
242713
|
-
return yield*
|
|
242751
|
+
return yield* output.pipe(options.maxContext ? tap((part) => {
|
|
242714
242752
|
if (part._tag !== "Usage") return void_$2;
|
|
242715
242753
|
if (part.contextTokens <= options.maxContext) return void_$2;
|
|
242716
242754
|
return fail$6(new TimeoutError("Max context reached"));
|
|
@@ -242768,7 +242806,6 @@ ${research}`
|
|
|
242768
242806
|
}),
|
|
242769
242807
|
maxContext: options.maxContext,
|
|
242770
242808
|
steer: options.steer,
|
|
242771
|
-
stallTimeout: options.stallTimeout,
|
|
242772
242809
|
mode: CurrentTask.$match(options.currentTask, {
|
|
242773
242810
|
task: () => "default",
|
|
242774
242811
|
ralph: () => "ralph"
|
|
@@ -242925,8 +242962,7 @@ const agentChooser = fnUntraced(function* (options) {
|
|
|
242925
242962
|
directory: worktree.directory,
|
|
242926
242963
|
model: options.preset.extraArgs.join(" "),
|
|
242927
242964
|
prompt: promptGen.promptChooseClanka({ gitFlow }),
|
|
242928
|
-
mode: "choose"
|
|
242929
|
-
stallTimeout: options.stallTimeout
|
|
242965
|
+
mode: "choose"
|
|
242930
242966
|
}).pipe(provideService$2(ChosenTaskDeferred, deferred), flatMap$5(() => fail$6(new ChosenTaskNotFound$1())), raceFirst(_await(deferred)));
|
|
242931
242967
|
const prdTask = yield* source.findById(projectId, result.taskId);
|
|
242932
242968
|
if (!prdTask) return yield* new ChosenTaskNotFound$1();
|
|
@@ -242987,7 +243023,6 @@ const agentReviewer = fnUntraced(function* (options) {
|
|
|
242987
243023
|
prompt: options.instructions,
|
|
242988
243024
|
gitFlow
|
|
242989
243025
|
})),
|
|
242990
|
-
stallTimeout: options.stallTimeout,
|
|
242991
243026
|
mode
|
|
242992
243027
|
});
|
|
242993
243028
|
return ExitCode(0);
|
|
@@ -243044,7 +243079,6 @@ const agentTimeout = fnUntraced(function* (options) {
|
|
|
243044
243079
|
model: options.preset.extraArgs.join(" "),
|
|
243045
243080
|
system: timeoutMode.system,
|
|
243046
243081
|
prompt: timeoutMode.clankaPrompt,
|
|
243047
|
-
stallTimeout: options.stallTimeout,
|
|
243048
243082
|
mode: timeoutMode.mode
|
|
243049
243083
|
});
|
|
243050
243084
|
return ExitCode(0);
|
|
@@ -243068,8 +243102,7 @@ const agentResearcher = fnUntraced(function* (options) {
|
|
|
243068
243102
|
directory: worktree.directory,
|
|
243069
243103
|
model: options.preset.extraArgs.join(" "),
|
|
243070
243104
|
system: promptGen.systemClanka(options),
|
|
243071
|
-
prompt: promptGen.promptResearch({ task: options.task })
|
|
243072
|
-
stallTimeout: options.stallTimeout
|
|
243105
|
+
prompt: promptGen.promptResearch({ task: options.task })
|
|
243073
243106
|
}).pipe(asSome);
|
|
243074
243107
|
});
|
|
243075
243108
|
//#endregion
|
|
@@ -243166,7 +243199,6 @@ const run = fnUntraced(function* (options) {
|
|
|
243166
243199
|
if (options.research) researchResult = yield* agentResearcher({
|
|
243167
243200
|
task: chosenTask.prd,
|
|
243168
243201
|
specsDirectory: options.specsDirectory,
|
|
243169
|
-
stallTimeout: options.stallTimeout,
|
|
243170
243202
|
preset: taskPreset
|
|
243171
243203
|
});
|
|
243172
243204
|
const promptGen = yield* PromptGen;
|
|
@@ -243753,7 +243785,7 @@ const commandEdit = make$60("edit").pipe(withDescription("Open the selected proj
|
|
|
243753
243785
|
const commandSource = make$60("source").pipe(withDescription("Select the issue source to use (e.g. GitHub Issues or Linear). This applies to all projects."), withHandler(() => selectIssueSource), provide(Settings.layer));
|
|
243754
243786
|
//#endregion
|
|
243755
243787
|
//#region package.json
|
|
243756
|
-
var version = "0.3.
|
|
243788
|
+
var version = "0.3.116";
|
|
243757
243789
|
//#endregion
|
|
243758
243790
|
//#region src/Tracing.ts
|
|
243759
243791
|
const TracingLayer = unwrap$3(gen(function* () {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lalph",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.116",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@octokit/plugin-rest-endpoint-methods": "^17.0.0",
|
|
46
46
|
"@octokit/types": "^16.0.0",
|
|
47
47
|
"@typescript/native-preview": "7.0.0-dev.20260326.1",
|
|
48
|
-
"clanka": "^0.2.
|
|
48
|
+
"clanka": "^0.2.42",
|
|
49
49
|
"concurrently": "^9.2.1",
|
|
50
50
|
"effect": "4.0.0-beta.40",
|
|
51
51
|
"husky": "^9.1.7",
|
package/src/Agents/chooser.ts
CHANGED
|
@@ -41,7 +41,6 @@ export const agentChooser = Effect.fnUntraced(function* (options: {
|
|
|
41
41
|
model: options.preset.extraArgs.join(" "),
|
|
42
42
|
prompt: promptGen.promptChooseClanka({ gitFlow }),
|
|
43
43
|
mode: "choose",
|
|
44
|
-
stallTimeout: options.stallTimeout,
|
|
45
44
|
}).pipe(
|
|
46
45
|
Effect.provideService(ChosenTaskDeferred, deferred),
|
|
47
46
|
Effect.flatMap(() => Effect.fail(new ChosenTaskNotFound())),
|
package/src/Agents/researcher.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Effect, Option } from "effect"
|
|
2
2
|
import { PromptGen } from "../PromptGen.ts"
|
|
3
3
|
import { Worktree } from "../Worktree.ts"
|
|
4
4
|
import type { CliAgentPreset } from "../domain/CliAgentPreset.ts"
|
|
@@ -8,7 +8,6 @@ import type { PrdIssue } from "../domain/PrdIssue.ts"
|
|
|
8
8
|
export const agentResearcher = Effect.fnUntraced(function* (options: {
|
|
9
9
|
readonly task: PrdIssue
|
|
10
10
|
readonly specsDirectory: string
|
|
11
|
-
readonly stallTimeout: Duration.Duration
|
|
12
11
|
readonly preset: CliAgentPreset
|
|
13
12
|
}) {
|
|
14
13
|
const worktree = yield* Worktree
|
|
@@ -26,6 +25,5 @@ export const agentResearcher = Effect.fnUntraced(function* (options: {
|
|
|
26
25
|
prompt: promptGen.promptResearch({
|
|
27
26
|
task: options.task,
|
|
28
27
|
}),
|
|
29
|
-
stallTimeout: options.stallTimeout,
|
|
30
28
|
}).pipe(Effect.asSome)
|
|
31
29
|
})
|
package/src/Agents/reviewer.ts
CHANGED
package/src/Agents/timeout.ts
CHANGED
|
@@ -47,7 +47,6 @@ export const agentTimeout = Effect.fnUntraced(function* (options: {
|
|
|
47
47
|
model: options.preset.extraArgs.join(" "),
|
|
48
48
|
system: timeoutMode.system,
|
|
49
49
|
prompt: timeoutMode.clankaPrompt,
|
|
50
|
-
stallTimeout: options.stallTimeout,
|
|
51
50
|
mode: timeoutMode.mode,
|
|
52
51
|
})
|
|
53
52
|
return ExitCode(0)
|
package/src/Agents/worker.ts
CHANGED
package/src/Clanka.ts
CHANGED
|
@@ -3,7 +3,6 @@ import * as OutputFormatter from "clanka/OutputFormatter"
|
|
|
3
3
|
import {
|
|
4
4
|
Cause,
|
|
5
5
|
Config,
|
|
6
|
-
Duration,
|
|
7
6
|
Effect,
|
|
8
7
|
identity,
|
|
9
8
|
Layer,
|
|
@@ -20,7 +19,6 @@ import type { Prompt } from "effect/unstable/ai"
|
|
|
20
19
|
import { OpenAiClient, OpenAiEmbeddingModel } from "@effect/ai-openai"
|
|
21
20
|
import { Worktree } from "./Worktree.ts"
|
|
22
21
|
import { SemanticSearch } from "clanka"
|
|
23
|
-
import { withStallTimeout } from "./shared/stream.ts"
|
|
24
22
|
|
|
25
23
|
export const ClankaMuxerLayer = Layer.effectDiscard(
|
|
26
24
|
Effect.gen(function* () {
|
|
@@ -75,7 +73,6 @@ export const runClanka = Effect.fnUntraced(
|
|
|
75
73
|
readonly prompt: Prompt.RawInput
|
|
76
74
|
readonly system?: string | undefined
|
|
77
75
|
readonly maxContext?: number | undefined
|
|
78
|
-
readonly stallTimeout?: Duration.Duration | undefined
|
|
79
76
|
readonly steer?: Stream.Stream<string> | undefined
|
|
80
77
|
readonly mode?: "ralph" | "choose" | "default" | undefined
|
|
81
78
|
}) {
|
|
@@ -102,11 +99,7 @@ export const runClanka = Effect.fnUntraced(
|
|
|
102
99
|
)
|
|
103
100
|
}
|
|
104
101
|
|
|
105
|
-
|
|
106
|
-
? withStallTimeout(options.stallTimeout)(output)
|
|
107
|
-
: output
|
|
108
|
-
|
|
109
|
-
return yield* stream.pipe(
|
|
102
|
+
return yield* output.pipe(
|
|
110
103
|
options.maxContext
|
|
111
104
|
? Stream.tap((part) => {
|
|
112
105
|
if (part._tag !== "Usage") return Effect.void
|
package/src/commands/root.ts
CHANGED