lalph 0.3.115 → 0.3.117
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 +78 -39
- package/package.json +3 -3
- 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/src/domain/CliAgent.ts +2 -0
package/dist/cli.mjs
CHANGED
|
@@ -91495,6 +91495,7 @@ ${prompt}`], {
|
|
|
91495
91495
|
"exec",
|
|
91496
91496
|
"--dangerously-bypass-approvals-and-sandbox",
|
|
91497
91497
|
...extraArgs,
|
|
91498
|
+
"--",
|
|
91498
91499
|
prdFilePath ? `@${prdFilePath}
|
|
91499
91500
|
|
|
91500
91501
|
${prompt}` : prompt
|
|
@@ -91503,9 +91504,13 @@ ${prompt}` : prompt
|
|
|
91503
91504
|
stderr: "pipe",
|
|
91504
91505
|
stdin: "inherit"
|
|
91505
91506
|
}),
|
|
91506
|
-
commandPlan: ({ prompt, prdFilePath, dangerous }) => make$45("codex", [
|
|
91507
|
+
commandPlan: ({ prompt, prdFilePath, dangerous }) => make$45("codex", [
|
|
91508
|
+
...dangerous ? ["--dangerously-bypass-approvals-and-sandbox"] : [],
|
|
91509
|
+
"--",
|
|
91510
|
+
prdFilePath ? `@${prdFilePath}
|
|
91507
91511
|
|
|
91508
|
-
${prompt}` : prompt
|
|
91512
|
+
${prompt}` : prompt
|
|
91513
|
+
], {
|
|
91509
91514
|
stdout: "inherit",
|
|
91510
91515
|
stderr: "inherit",
|
|
91511
91516
|
stdin: "inherit"
|
|
@@ -182737,7 +182742,7 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
|
|
|
182737
182742
|
});
|
|
182738
182743
|
Ze.glob = Ze;
|
|
182739
182744
|
//#endregion
|
|
182740
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
182745
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/ApplyPatch.js
|
|
182741
182746
|
/**
|
|
182742
182747
|
* @since 1.0.0
|
|
182743
182748
|
*/
|
|
@@ -197618,7 +197623,7 @@ var StreamableHTTPClientTransport = class {
|
|
|
197618
197623
|
}
|
|
197619
197624
|
};
|
|
197620
197625
|
//#endregion
|
|
197621
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
197626
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/McpClient.js
|
|
197622
197627
|
/**
|
|
197623
197628
|
* @since 1.0.0
|
|
197624
197629
|
*/
|
|
@@ -197663,7 +197668,7 @@ const layer$13 = effect$1(McpClient, gen(function* () {
|
|
|
197663
197668
|
});
|
|
197664
197669
|
}));
|
|
197665
197670
|
//#endregion
|
|
197666
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
197671
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/ExaSearch.js
|
|
197667
197672
|
/**
|
|
197668
197673
|
* @since 1.0.0
|
|
197669
197674
|
*/
|
|
@@ -212613,7 +212618,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin$1(((exports) => {
|
|
|
212613
212618
|
exports.impl = impl;
|
|
212614
212619
|
}));
|
|
212615
212620
|
//#endregion
|
|
212616
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
212621
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/WebToMarkdown.js
|
|
212617
212622
|
/**
|
|
212618
212623
|
* @since 1.0.0
|
|
212619
212624
|
*/
|
|
@@ -215752,7 +215757,7 @@ function isEmptyParamsRecord(indexSignature) {
|
|
|
215752
215757
|
return indexSignature.parameter === string$3 && isNever(indexSignature.type);
|
|
215753
215758
|
}
|
|
215754
215759
|
//#endregion
|
|
215755
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
215760
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/SemanticSearch/Service.js
|
|
215756
215761
|
/**
|
|
215757
215762
|
* @since 1.0.0
|
|
215758
215763
|
*/
|
|
@@ -215778,7 +215783,7 @@ const maybeRemoveFile = (path) => serviceOption(SemanticSearch).pipe(flatMap$5(m
|
|
|
215778
215783
|
onSome: (service) => service.removeFile(path)
|
|
215779
215784
|
})));
|
|
215780
215785
|
//#endregion
|
|
215781
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
215786
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/AgentTools.js
|
|
215782
215787
|
/**
|
|
215783
215788
|
* @since 1.0.0
|
|
215784
215789
|
*/
|
|
@@ -216181,7 +216186,7 @@ const AgentToolHandlers = AgentToolHandlersNoDeps.pipe(provide$3([layer$12, laye
|
|
|
216181
216186
|
AgentToolHandlersNoDeps.pipe(provide$3([mock(ExaSearch)({}), mock(WebToMarkdown)({})]));
|
|
216182
216187
|
var ApplyPatchError = class extends TaggedClass$2("ApplyPatchError") {};
|
|
216183
216188
|
//#endregion
|
|
216184
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
216189
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/TypeBuilder.js
|
|
216185
216190
|
const resolveDocumentation = resolveAt("documentation");
|
|
216186
216191
|
const identifierPattern = /^[$A-Z_a-z][$0-9A-Z_a-z]*$/u;
|
|
216187
216192
|
const Precedence = {
|
|
@@ -216454,7 +216459,7 @@ const render = (schema, options) => {
|
|
|
216454
216459
|
return printNode({ text: documentation === void 0 ? rendered.text : `${renderJsDoc(documentation, 0, printerOptions)}${printerOptions.newLine}${rendered.text}` }, printerOptions);
|
|
216455
216460
|
};
|
|
216456
216461
|
//#endregion
|
|
216457
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
216462
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/ToolkitRenderer.js
|
|
216458
216463
|
/**
|
|
216459
216464
|
* @since 1.0.0
|
|
216460
216465
|
*/
|
|
@@ -216476,7 +216481,7 @@ declare function ${name}(${params}): Promise<${render(tool.successSchema)}>`);
|
|
|
216476
216481
|
}) });
|
|
216477
216482
|
};
|
|
216478
216483
|
//#endregion
|
|
216479
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
216484
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/ScriptPreprocessing.js
|
|
216480
216485
|
const callTemplateTargets = ["applyPatch", "taskComplete"];
|
|
216481
216486
|
const objectPropertyTargets = [{
|
|
216482
216487
|
functionName: "writeFile",
|
|
@@ -216672,7 +216677,9 @@ const normalizePatchEscapedQuotes = (text) => text.includes("*** Begin Patch") ?
|
|
|
216672
216677
|
if (previous === "{" || previous === "[" || previous === ":" || previous === "," || next === ":" || next === "}" || next === "]" || next === ",") return match;
|
|
216673
216678
|
return `"${content}"`;
|
|
216674
216679
|
}) : text;
|
|
216675
|
-
const
|
|
216680
|
+
const normalizeTemplateEscapedMarkers = (text) => text.replace(/\\{2,}(?=`|\$\{)/g, "\\");
|
|
216681
|
+
const normalizePatchEscapedCodeSpans = (text) => text.replace(/(?<!\\)\\\\`([^`\r\n]+?)\\\\`/g, "\\`$1\\`");
|
|
216682
|
+
const normalizeNonPatchEscapedTemplateMarkers = (text) => normalizeTemplateEscapedMarkers(text).replace(/(^|\s)\\+(?=\.[A-Za-z0-9_-]+\/)/g, "$1");
|
|
216676
216683
|
const findStringLiteralEnd = (text, start, delimiter) => {
|
|
216677
216684
|
for (let index = start + 1; index < text.length; index++) if (text[index] === delimiter && !isEscaped(text, index)) return index;
|
|
216678
216685
|
return -1;
|
|
@@ -216754,7 +216761,7 @@ const findLiteralInterpolationEnd = (text, start) => {
|
|
|
216754
216761
|
const escapeTemplateLiteralContent = (text) => {
|
|
216755
216762
|
const patchNormalized = normalizePatchEscapedQuotes(text);
|
|
216756
216763
|
const isPatchContent = patchNormalized.includes("*** Begin Patch");
|
|
216757
|
-
const normalized = isPatchContent ? patchNormalized : normalizeNonPatchEscapedTemplateMarkers(patchNormalized);
|
|
216764
|
+
const normalized = isPatchContent ? normalizePatchEscapedCodeSpans(patchNormalized) : normalizeNonPatchEscapedTemplateMarkers(patchNormalized);
|
|
216758
216765
|
if (!needsTemplateEscaping(normalized) && !(isPatchContent && normalized.includes("\\\""))) return normalized;
|
|
216759
216766
|
let out = "";
|
|
216760
216767
|
for (let index = 0; index < normalized.length; index++) {
|
|
@@ -217086,7 +217093,7 @@ const rewriteAssignedTargets = (script) => {
|
|
|
217086
217093
|
};
|
|
217087
217094
|
const preprocessScript = (script) => rewriteAssignedTargets(rewriteDirectTemplates(script));
|
|
217088
217095
|
//#endregion
|
|
217089
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
217096
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/AgentExecutor.js
|
|
217090
217097
|
/**
|
|
217091
217098
|
* @since 1.0.0
|
|
217092
217099
|
*/
|
|
@@ -217271,7 +217278,7 @@ var QueueWriteStream = class extends Writable {
|
|
|
217271
217278
|
}
|
|
217272
217279
|
};
|
|
217273
217280
|
//#endregion
|
|
217274
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
217281
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/ScriptExtraction.js
|
|
217275
217282
|
const stripWrappingCodeFence = (script) => {
|
|
217276
217283
|
const lines = script.split(/\r?\n/);
|
|
217277
217284
|
if (lines.length < 2) return script;
|
|
@@ -218820,7 +218827,7 @@ const applySpanTransformer = (transformer, response, options) => {
|
|
|
218820
218827
|
});
|
|
218821
218828
|
};
|
|
218822
218829
|
//#endregion
|
|
218823
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
218830
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/Agent.js
|
|
218824
218831
|
/**
|
|
218825
218832
|
* @since 1.0.0
|
|
218826
218833
|
*/
|
|
@@ -218863,6 +218870,7 @@ ${content}
|
|
|
218863
218870
|
const subagentModel = yield* SubagentModel;
|
|
218864
218871
|
const modelConfig = yield* AgentModelConfig;
|
|
218865
218872
|
const conversationMode = yield* ConversationMode;
|
|
218873
|
+
const turnTimeout = yield* TurnTimeout;
|
|
218866
218874
|
let finalSummary = none$4();
|
|
218867
218875
|
const output = yield* make$75();
|
|
218868
218876
|
let inputTokens = 0;
|
|
@@ -218943,7 +218951,30 @@ ${content}
|
|
|
218943
218951
|
return succeed$4(finished.summary);
|
|
218944
218952
|
}), orDie$2);
|
|
218945
218953
|
}, provide$1(subagentModel), provideService$2(SubagentModel, subagentModel));
|
|
218954
|
+
const clock = yield* Clock;
|
|
218955
|
+
const turnTimeoutMs = toMillis(turnTimeout);
|
|
218956
|
+
let turnExpires = 0;
|
|
218957
|
+
const turnTimeoutReset = () => {
|
|
218958
|
+
turnExpires = clock.currentTimeMillisUnsafe() + turnTimeoutMs;
|
|
218959
|
+
};
|
|
218960
|
+
const toolLatch = makeUnsafe$10(true);
|
|
218961
|
+
const toolLatchAcquire = toolLatch.close;
|
|
218962
|
+
const toolLatchRelease = sync(() => {
|
|
218963
|
+
turnTimeoutReset();
|
|
218964
|
+
toolLatch.openUnsafe();
|
|
218965
|
+
});
|
|
218966
|
+
const turnTimeoutEffect = gen(function* () {
|
|
218967
|
+
toolLatch.openUnsafe();
|
|
218968
|
+
turnTimeoutReset();
|
|
218969
|
+
while (true) {
|
|
218970
|
+
yield* sleep(turnExpires - clock.currentTimeMillisUnsafe());
|
|
218971
|
+
yield* toolLatch.await;
|
|
218972
|
+
if (turnExpires - clock.currentTimeMillisUnsafe() > 0) continue;
|
|
218973
|
+
return yield* new TimeoutError();
|
|
218974
|
+
}
|
|
218975
|
+
});
|
|
218946
218976
|
const executeScript = fnUntraced(function* (script) {
|
|
218977
|
+
yield* toolLatchAcquire;
|
|
218947
218978
|
maybeSend({
|
|
218948
218979
|
agentId,
|
|
218949
218980
|
part: new ScriptEnd(),
|
|
@@ -218962,7 +218993,7 @@ ${content}
|
|
|
218962
218993
|
part: new ScriptOutput({ output })
|
|
218963
218994
|
});
|
|
218964
218995
|
return output;
|
|
218965
|
-
});
|
|
218996
|
+
}, ensuring$2(toolLatchRelease));
|
|
218966
218997
|
if (!modelConfig.systemPromptTransform) update$1(prompt, setSystem(system));
|
|
218967
218998
|
yield* gen(function* () {
|
|
218968
218999
|
while (true) {
|
|
@@ -218992,6 +219023,7 @@ ${content}
|
|
|
218992
219023
|
return false;
|
|
218993
219024
|
}), runForEachArray((parts) => {
|
|
218994
219025
|
response.push(...parts);
|
|
219026
|
+
turnTimeoutReset();
|
|
218995
219027
|
for (const part of parts) switch (part.type) {
|
|
218996
219028
|
case "text-start":
|
|
218997
219029
|
case "reasoning-start":
|
|
@@ -219045,8 +219077,12 @@ ${content}
|
|
|
219045
219077
|
break;
|
|
219046
219078
|
}
|
|
219047
219079
|
return void_$2;
|
|
219048
|
-
}), retry$1({
|
|
219080
|
+
}), raceFirst(turnTimeoutEffect), retry$1({
|
|
219049
219081
|
while: (err) => {
|
|
219082
|
+
if (err._tag === "TimeoutError") {
|
|
219083
|
+
response = [];
|
|
219084
|
+
return true;
|
|
219085
|
+
}
|
|
219050
219086
|
if (err.isRetryable) {
|
|
219051
219087
|
maybeSend({
|
|
219052
219088
|
agentId,
|
|
@@ -219061,7 +219097,7 @@ ${content}
|
|
|
219061
219097
|
return err.isRetryable;
|
|
219062
219098
|
},
|
|
219063
219099
|
schedule: retryPolicy
|
|
219064
|
-
}), modelConfig.systemPromptTransform ? (effect) => modelConfig.systemPromptTransform(system, effect) : identity);
|
|
219100
|
+
}), catchTag$1("TimeoutError", die$2), modelConfig.systemPromptTransform ? (effect) => modelConfig.systemPromptTransform(system, effect) : identity);
|
|
219065
219101
|
update$1(prompt, concat(fromResponseParts(response)));
|
|
219066
219102
|
if (conversationMode && !hadToolCall && pendingMessages.size === 0) finalSummary = some$2(responseToSummary(response));
|
|
219067
219103
|
}
|
|
@@ -219205,6 +219241,15 @@ var ConversationMode = class ConversationMode extends Reference("clanka/Agent/Co
|
|
|
219205
219241
|
static layer = (enabled) => succeed$5(ConversationMode, enabled);
|
|
219206
219242
|
};
|
|
219207
219243
|
/**
|
|
219244
|
+
* Specify an inactivity timeout before retrying a turn.
|
|
219245
|
+
*
|
|
219246
|
+
* @since 1.0.0
|
|
219247
|
+
* @category Turn timeout
|
|
219248
|
+
*/
|
|
219249
|
+
var TurnTimeout = class TurnTimeout extends Reference("clanka/Agent/TurnTimeout", { defaultValue: () => minutes(2) }) {
|
|
219250
|
+
static layer = (timeout) => succeed$5(TurnTimeout, fromInputUnsafe(timeout));
|
|
219251
|
+
};
|
|
219252
|
+
/**
|
|
219208
219253
|
* @since 1.0.0
|
|
219209
219254
|
* @category System prompts
|
|
219210
219255
|
*/
|
|
@@ -230332,7 +230377,7 @@ const transformToolCallParams = /* @__PURE__ */ fnUntraced(function* (tools, too
|
|
|
230332
230377
|
})));
|
|
230333
230378
|
});
|
|
230334
230379
|
//#endregion
|
|
230335
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
230380
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/CodexAuth.js
|
|
230336
230381
|
/**
|
|
230337
230382
|
* @since 1.0.0
|
|
230338
230383
|
*/
|
|
@@ -230552,7 +230597,7 @@ var CodexAuth = class CodexAuth extends Service$1()("clanka/CodexAuth") {
|
|
|
230552
230597
|
static layerClient = this.layerClientNoDeps.pipe(provide$3(CodexAuth.layer));
|
|
230553
230598
|
};
|
|
230554
230599
|
//#endregion
|
|
230555
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
230600
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/Codex.js
|
|
230556
230601
|
/**
|
|
230557
230602
|
* @since 1.0.0
|
|
230558
230603
|
*/
|
|
@@ -230578,7 +230623,7 @@ const layerModel = (model, options) => layer$7({
|
|
|
230578
230623
|
}
|
|
230579
230624
|
}).pipe(merge$6(AgentModelConfig.layer({ systemPromptTransform: (system, effect) => withConfigOverride(effect, { instructions: system }) })));
|
|
230580
230625
|
//#endregion
|
|
230581
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
230626
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/CodeChunker.js
|
|
230582
230627
|
/**
|
|
230583
230628
|
* @since 1.0.0
|
|
230584
230629
|
*/
|
|
@@ -232338,7 +232383,7 @@ const getUsageDetailNumber = (details, field) => {
|
|
|
232338
232383
|
return typeof value === "number" ? value : void 0;
|
|
232339
232384
|
};
|
|
232340
232385
|
//#endregion
|
|
232341
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
232386
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/CopilotAuth.js
|
|
232342
232387
|
/**
|
|
232343
232388
|
* @since 1.0.0
|
|
232344
232389
|
*/
|
|
@@ -232529,7 +232574,7 @@ var GithubCopilotAuth = class GithubCopilotAuth extends Service$1()("clanka/Gith
|
|
|
232529
232574
|
static layerClient = this.layerClientNoDeps.pipe(provide$3(GithubCopilotAuth.layer));
|
|
232530
232575
|
};
|
|
232531
232576
|
//#endregion
|
|
232532
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
232577
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/Copilot.js
|
|
232533
232578
|
/**
|
|
232534
232579
|
* @since 1.0.0
|
|
232535
232580
|
*/
|
|
@@ -232949,7 +232994,7 @@ Object.defineProperties(createChalk.prototype, styles);
|
|
|
232949
232994
|
const chalk = createChalk();
|
|
232950
232995
|
createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
232951
232996
|
//#endregion
|
|
232952
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
232997
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/OutputFormatter.js
|
|
232953
232998
|
/**
|
|
232954
232999
|
* @since 1.0.0
|
|
232955
233000
|
*/
|
|
@@ -233657,7 +233702,7 @@ select * from ${sql(options.tableName)} where ${sql(idColumn)} = LAST_INSERT_ID(
|
|
|
233657
233702
|
};
|
|
233658
233703
|
});
|
|
233659
233704
|
//#endregion
|
|
233660
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
233705
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/ChunkRepo.js
|
|
233661
233706
|
/**
|
|
233662
233707
|
* @since 1.0.0
|
|
233663
233708
|
* @category Models
|
|
@@ -233923,7 +233968,7 @@ const run$1 = /* @__PURE__ */ make$25({});
|
|
|
233923
233968
|
*/
|
|
233924
233969
|
const layer$1 = (options) => effectDiscard(run$1(options));
|
|
233925
233970
|
//#endregion
|
|
233926
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
233971
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/internal/sqlite-vector.js
|
|
233927
233972
|
/**
|
|
233928
233973
|
* Binary extension for each platform
|
|
233929
233974
|
*/
|
|
@@ -234040,7 +234085,7 @@ function getExtensionPath() {
|
|
|
234040
234085
|
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
234086
|
}
|
|
234042
234087
|
//#endregion
|
|
234043
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
234088
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/Sqlite.js
|
|
234044
234089
|
/**
|
|
234045
234090
|
* @since 1.0.0
|
|
234046
234091
|
*/
|
|
@@ -234068,7 +234113,7 @@ const SqliteLayer = (database) => layer$1({ loader: fromRecord({ "0001_create_ch
|
|
|
234068
234113
|
yield* fs.makeDirectory(directory, { recursive: true });
|
|
234069
234114
|
}))));
|
|
234070
234115
|
//#endregion
|
|
234071
|
-
//#region node_modules/.pnpm/clanka@0.2.
|
|
234116
|
+
//#region node_modules/.pnpm/clanka@0.2.43_@effect+ai-openai-compat@4.0.0-beta.40_effect@4.0.0-beta.40__@effect+ai-o_9149c2988a955c6ae74372ce7479977b/node_modules/clanka/dist/SemanticSearch.js
|
|
234072
234117
|
/**
|
|
234073
234118
|
* @since 1.0.0
|
|
234074
234119
|
*/
|
|
@@ -242710,7 +242755,7 @@ const runClanka = fnUntraced(function* (options) {
|
|
|
242710
242755
|
yield* log$1(`Received steer message: ${message}`);
|
|
242711
242756
|
yield* agent.steer(message);
|
|
242712
242757
|
}, fromEffectDrain)), runDrain, forkScoped);
|
|
242713
|
-
return yield*
|
|
242758
|
+
return yield* output.pipe(options.maxContext ? tap((part) => {
|
|
242714
242759
|
if (part._tag !== "Usage") return void_$2;
|
|
242715
242760
|
if (part.contextTokens <= options.maxContext) return void_$2;
|
|
242716
242761
|
return fail$6(new TimeoutError("Max context reached"));
|
|
@@ -242768,7 +242813,6 @@ ${research}`
|
|
|
242768
242813
|
}),
|
|
242769
242814
|
maxContext: options.maxContext,
|
|
242770
242815
|
steer: options.steer,
|
|
242771
|
-
stallTimeout: options.stallTimeout,
|
|
242772
242816
|
mode: CurrentTask.$match(options.currentTask, {
|
|
242773
242817
|
task: () => "default",
|
|
242774
242818
|
ralph: () => "ralph"
|
|
@@ -242925,8 +242969,7 @@ const agentChooser = fnUntraced(function* (options) {
|
|
|
242925
242969
|
directory: worktree.directory,
|
|
242926
242970
|
model: options.preset.extraArgs.join(" "),
|
|
242927
242971
|
prompt: promptGen.promptChooseClanka({ gitFlow }),
|
|
242928
|
-
mode: "choose"
|
|
242929
|
-
stallTimeout: options.stallTimeout
|
|
242972
|
+
mode: "choose"
|
|
242930
242973
|
}).pipe(provideService$2(ChosenTaskDeferred, deferred), flatMap$5(() => fail$6(new ChosenTaskNotFound$1())), raceFirst(_await(deferred)));
|
|
242931
242974
|
const prdTask = yield* source.findById(projectId, result.taskId);
|
|
242932
242975
|
if (!prdTask) return yield* new ChosenTaskNotFound$1();
|
|
@@ -242987,7 +243030,6 @@ const agentReviewer = fnUntraced(function* (options) {
|
|
|
242987
243030
|
prompt: options.instructions,
|
|
242988
243031
|
gitFlow
|
|
242989
243032
|
})),
|
|
242990
|
-
stallTimeout: options.stallTimeout,
|
|
242991
243033
|
mode
|
|
242992
243034
|
});
|
|
242993
243035
|
return ExitCode(0);
|
|
@@ -243044,7 +243086,6 @@ const agentTimeout = fnUntraced(function* (options) {
|
|
|
243044
243086
|
model: options.preset.extraArgs.join(" "),
|
|
243045
243087
|
system: timeoutMode.system,
|
|
243046
243088
|
prompt: timeoutMode.clankaPrompt,
|
|
243047
|
-
stallTimeout: options.stallTimeout,
|
|
243048
243089
|
mode: timeoutMode.mode
|
|
243049
243090
|
});
|
|
243050
243091
|
return ExitCode(0);
|
|
@@ -243068,8 +243109,7 @@ const agentResearcher = fnUntraced(function* (options) {
|
|
|
243068
243109
|
directory: worktree.directory,
|
|
243069
243110
|
model: options.preset.extraArgs.join(" "),
|
|
243070
243111
|
system: promptGen.systemClanka(options),
|
|
243071
|
-
prompt: promptGen.promptResearch({ task: options.task })
|
|
243072
|
-
stallTimeout: options.stallTimeout
|
|
243112
|
+
prompt: promptGen.promptResearch({ task: options.task })
|
|
243073
243113
|
}).pipe(asSome);
|
|
243074
243114
|
});
|
|
243075
243115
|
//#endregion
|
|
@@ -243166,7 +243206,6 @@ const run = fnUntraced(function* (options) {
|
|
|
243166
243206
|
if (options.research) researchResult = yield* agentResearcher({
|
|
243167
243207
|
task: chosenTask.prd,
|
|
243168
243208
|
specsDirectory: options.specsDirectory,
|
|
243169
|
-
stallTimeout: options.stallTimeout,
|
|
243170
243209
|
preset: taskPreset
|
|
243171
243210
|
});
|
|
243172
243211
|
const promptGen = yield* PromptGen;
|
|
@@ -243753,7 +243792,7 @@ const commandEdit = make$60("edit").pipe(withDescription("Open the selected proj
|
|
|
243753
243792
|
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
243793
|
//#endregion
|
|
243755
243794
|
//#region package.json
|
|
243756
|
-
var version = "0.3.
|
|
243795
|
+
var version = "0.3.117";
|
|
243757
243796
|
//#endregion
|
|
243758
243797
|
//#region src/Tracing.ts
|
|
243759
243798
|
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.117",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"@changesets/cli": "^2.30.0",
|
|
40
40
|
"@effect/ai-openai": "4.0.0-beta.40",
|
|
41
41
|
"@effect/ai-openai-compat": "4.0.0-beta.40",
|
|
42
|
-
"@effect/language-service": "^0.
|
|
42
|
+
"@effect/language-service": "^0.84.0",
|
|
43
43
|
"@effect/platform-node": "4.0.0-beta.40",
|
|
44
44
|
"@linear/sdk": "^80.0.0",
|
|
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.43",
|
|
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
package/src/domain/CliAgent.ts
CHANGED
|
@@ -163,6 +163,7 @@ const codex = new CliAgent({
|
|
|
163
163
|
"exec",
|
|
164
164
|
"--dangerously-bypass-approvals-and-sandbox",
|
|
165
165
|
...extraArgs,
|
|
166
|
+
"--",
|
|
166
167
|
prdFilePath
|
|
167
168
|
? `@${prdFilePath}
|
|
168
169
|
|
|
@@ -180,6 +181,7 @@ ${prompt}`
|
|
|
180
181
|
"codex",
|
|
181
182
|
[
|
|
182
183
|
...(dangerous ? ["--dangerously-bypass-approvals-and-sandbox"] : []),
|
|
184
|
+
"--",
|
|
183
185
|
prdFilePath
|
|
184
186
|
? `@${prdFilePath}
|
|
185
187
|
|