lalph 0.3.66 → 0.3.67

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +49 -29
  2. package/package.json +4 -4
package/dist/cli.mjs CHANGED
@@ -179087,7 +179087,7 @@ var ji = Bt, Ii = Object.assign(Qe, { sync: Bt }), zi = Ut, Bi = Object.assign(e
179087
179087
  });
179088
179088
  Ze.glob = Ze;
179089
179089
  //#endregion
179090
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/ApplyPatch.js
179090
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/ApplyPatch.js
179091
179091
  /**
179092
179092
  * @since 1.0.0
179093
179093
  */
@@ -193960,7 +193960,7 @@ var StreamableHTTPClientTransport = class {
193960
193960
  }
193961
193961
  };
193962
193962
  //#endregion
193963
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/McpClient.js
193963
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/McpClient.js
193964
193964
  /**
193965
193965
  * @since 1.0.0
193966
193966
  */
@@ -194005,7 +194005,7 @@ const layer$7 = effect$1(McpClient, gen(function* () {
194005
194005
  });
194006
194006
  }));
194007
194007
  //#endregion
194008
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/ExaSearch.js
194008
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/ExaSearch.js
194009
194009
  /**
194010
194010
  * @since 1.0.0
194011
194011
  */
@@ -208955,7 +208955,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin$1(((exports) => {
208955
208955
  exports.impl = impl;
208956
208956
  }));
208957
208957
  //#endregion
208958
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/WebToMarkdown.js
208958
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/WebToMarkdown.js
208959
208959
  /**
208960
208960
  * @since 1.0.0
208961
208961
  */
@@ -210187,7 +210187,7 @@ const FinishReason = /* @__PURE__ */ Literals([
210187
210187
  * @since 1.0.0
210188
210188
  * @category models
210189
210189
  */
210190
- var Usage = class extends Class$1("effect/ai/AiResponse/Usage")({
210190
+ var Usage$1 = class extends Class$1("effect/ai/AiResponse/Usage")({
210191
210191
  inputTokens: /* @__PURE__ */ Struct({
210192
210192
  uncached: /* @__PURE__ */ UndefinedOr(Number$1),
210193
210193
  total: /* @__PURE__ */ UndefinedOr(Number$1),
@@ -210210,7 +210210,7 @@ const FinishPart = /* @__PURE__ */ Struct({
210210
210210
  ...BasePart$1.fields,
210211
210211
  type: tag("finish"),
210212
210212
  reason: FinishReason,
210213
- usage: Usage,
210213
+ usage: Usage$1,
210214
210214
  response: UndefinedOr(HttpResponseDetails)
210215
210215
  }).annotate({ identifier: "FinishPart" });
210216
210216
  /**
@@ -212089,7 +212089,7 @@ function isEmptyParamsRecord(indexSignature) {
212089
212089
  return indexSignature.parameter === string$3 && isNever(indexSignature.type);
212090
212090
  }
212091
212091
  //#endregion
212092
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/AgentTools.js
212092
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/AgentTools.js
212093
212093
  /**
212094
212094
  * @since 1.0.0
212095
212095
  */
@@ -212126,6 +212126,7 @@ const AgentTools = make$10(make$9("readFile", {
212126
212126
  parameters: Struct({
212127
212127
  pattern: String$1,
212128
212128
  glob: optional$3(String$1).annotate({ documentation: "--glob" }),
212129
+ filesOnly: optional$3(Boolean$2).annotate({ documentation: "Only return file paths. --files-with-matches" }),
212129
212130
  maxLines: optional$3(Finite).annotate({ documentation: "The total maximum number of lines to return across all files (default: 500)" })
212130
212131
  }),
212131
212132
  success: String$1,
@@ -212266,6 +212267,7 @@ const AgentToolHandlersNoDeps = AgentTools.toLayer(gen(function* () {
212266
212267
  "1M",
212267
212268
  "--line-number"
212268
212269
  ];
212270
+ if (options.filesOnly) args.push("--files-with-matches");
212269
212271
  if (options.glob) {
212270
212272
  args.push("--glob", options.glob);
212271
212273
  if (!options.glob.startsWith("*")) args.push("-uu");
@@ -212423,7 +212425,7 @@ const AgentToolHandlers = AgentToolHandlersNoDeps.pipe(provide$3([layer$6, layer
212423
212425
  AgentToolHandlersNoDeps.pipe(provide$3([mock(ExaSearch)({}), mock(WebToMarkdown)({})]));
212424
212426
  var ApplyPatchError = class extends TaggedClass$1("ApplyPatchError") {};
212425
212427
  //#endregion
212426
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/TypeBuilder.js
212428
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/TypeBuilder.js
212427
212429
  const resolveDocumentation = resolveAt("documentation");
212428
212430
  const identifierPattern = /^[$A-Z_a-z][$0-9A-Z_a-z]*$/u;
212429
212431
  const Precedence = {
@@ -212696,7 +212698,7 @@ const render = (schema, options) => {
212696
212698
  return printNode({ text: documentation === void 0 ? rendered.text : `${renderJsDoc(documentation, 0, printerOptions)}${printerOptions.newLine}${rendered.text}` }, printerOptions);
212697
212699
  };
212698
212700
  //#endregion
212699
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/ToolkitRenderer.js
212701
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/ToolkitRenderer.js
212700
212702
  /**
212701
212703
  * @since 1.0.0
212702
212704
  */
@@ -212718,7 +212720,7 @@ declare function ${name}(${params}): Promise<${render(tool.successSchema)}>`);
212718
212720
  }) });
212719
212721
  };
212720
212722
  //#endregion
212721
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/AgentExecutor.js
212723
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/AgentExecutor.js
212722
212724
  /**
212723
212725
  * @since 1.0.0
212724
212726
  */
@@ -212872,7 +212874,7 @@ var QueueWriteStream = class extends Writable {
212872
212874
  }
212873
212875
  };
212874
212876
  //#endregion
212875
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/ScriptExtraction.js
212877
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/ScriptExtraction.js
212876
212878
  const stripWrappingCodeFence = (script) => {
212877
212879
  const lines = script.split(/\r?\n/);
212878
212880
  if (lines.length < 2) return script;
@@ -213803,7 +213805,7 @@ var GenerateTextResponse = class {
213803
213805
  */
213804
213806
  get usage() {
213805
213807
  const finishPart = this.content.find((part) => part.type === "finish");
213806
- if (isUndefined(finishPart)) return new Usage({
213808
+ if (isUndefined(finishPart)) return new Usage$1({
213807
213809
  inputTokens: {
213808
213810
  uncached: void 0,
213809
213811
  total: void 0,
@@ -214395,7 +214397,7 @@ const applySpanTransformer = (transformer, response, options) => {
214395
214397
  });
214396
214398
  };
214397
214399
  //#endregion
214398
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/Agent.js
214400
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/Agent.js
214399
214401
  /**
214400
214402
  * @since 1.0.0
214401
214403
  */
@@ -214439,6 +214441,7 @@ ${content}
214439
214441
  const modelConfig = yield* AgentModelConfig;
214440
214442
  let finalSummary = none$4();
214441
214443
  const output = yield* make$64();
214444
+ let outputTokens = 0;
214442
214445
  const prompt = opts.disableHistory ? make$66(empty) : history;
214443
214446
  update(prompt, concat(opts.prompt));
214444
214447
  let system = (typeof opts.system === "function" ? opts.system : defaultSystem)({
@@ -214596,7 +214599,17 @@ ${content}
214596
214599
  });
214597
214600
  }
214598
214601
  break;
214599
- case "finish": break;
214602
+ case "finish":
214603
+ const usage = part.usage;
214604
+ if (usage.outputTokens.total !== void 0) outputTokens += usage.outputTokens.total;
214605
+ if (usage.inputTokens.total !== void 0) maybeSend({
214606
+ agentId,
214607
+ part: new Usage({
214608
+ inputTokens: usage.inputTokens.total,
214609
+ outputTokens
214610
+ })
214611
+ });
214612
+ break;
214600
214613
  }
214601
214614
  return void_$1;
214602
214615
  }), retry$3({
@@ -214668,6 +214681,7 @@ const generateSystemTools = (toolsDts) => `**YOU ONLY HAVE ACCESS TO ONE TOOL**
214668
214681
  - Use \`console.log\` to print any output you need.
214669
214682
  - Top level await is supported.
214670
214683
  - AVOID passing scripts into the "bash" function, and instead write javascript.
214684
+ - When using "rg" over a large codebase, prefer using the "filesOnly" option before looking at file contents
214671
214685
  - Do as much work as possible in a single script, using \`Promise.all\` to run multiple functions in parallel.
214672
214686
  - Variables **are not shared** between executions, so you must include all necessary code in each script you execute.
214673
214687
  - Use the "delegate" function to assign complex jobs to another software engineer.
@@ -214796,6 +214810,14 @@ var ScriptEnd = class extends TaggedClass()("ScriptEnd", {}) {};
214796
214810
  * @since 1.0.0
214797
214811
  * @category Output
214798
214812
  */
214813
+ var Usage = class extends TaggedClass()("Usage", {
214814
+ inputTokens: Number$1,
214815
+ outputTokens: Number$1
214816
+ }) {};
214817
+ /**
214818
+ * @since 1.0.0
214819
+ * @category Output
214820
+ */
214799
214821
  var ErrorRetry = class extends TaggedClass()("ErrorRetry", { error: AiError }) {};
214800
214822
  /**
214801
214823
  * @since 1.0.0
@@ -214832,6 +214854,7 @@ const ContentPart = Union([
214832
214854
  ScriptDelta,
214833
214855
  ScriptEnd,
214834
214856
  ScriptOutput,
214857
+ Usage,
214835
214858
  ErrorRetry
214836
214859
  ]);
214837
214860
  /**
@@ -214843,18 +214866,11 @@ var SubagentPart = class extends TaggedClass()("SubagentPart", {
214843
214866
  part: ContentPart
214844
214867
  }) {};
214845
214868
  Union([
214869
+ ...ContentPart.members,
214846
214870
  AgentStart,
214847
- ReasoningStart,
214848
- ReasoningDelta,
214849
- ReasoningEnd,
214850
- ScriptStart,
214851
- ScriptDelta,
214852
- ScriptEnd,
214853
- ScriptOutput,
214854
214871
  SubagentStart,
214855
214872
  SubagentComplete,
214856
- SubagentPart,
214857
- ErrorRetry
214873
+ SubagentPart
214858
214874
  ]);
214859
214875
  /**
214860
214876
  * @since 1.0.0
@@ -225610,7 +225626,7 @@ const transformToolCallParams = /* @__PURE__ */ fnUntraced(function* (tools, too
225610
225626
  })));
225611
225627
  });
225612
225628
  //#endregion
225613
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/CodexAuth.js
225629
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/CodexAuth.js
225614
225630
  /**
225615
225631
  * @since 1.0.0
225616
225632
  */
@@ -225830,7 +225846,7 @@ var CodexAuth = class CodexAuth extends Service$1()("clanka/CodexAuth") {
225830
225846
  static layerClient = this.layerClientNoDeps.pipe(provide$3(CodexAuth.layer));
225831
225847
  };
225832
225848
  //#endregion
225833
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/Codex.js
225849
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/Codex.js
225834
225850
  /**
225835
225851
  * @since 1.0.0
225836
225852
  */
@@ -227142,7 +227158,7 @@ const getUsageDetailNumber = (details, field) => {
227142
227158
  return typeof value === "number" ? value : void 0;
227143
227159
  };
227144
227160
  //#endregion
227145
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/CopilotAuth.js
227161
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/CopilotAuth.js
227146
227162
  /**
227147
227163
  * @since 1.0.0
227148
227164
  */
@@ -227333,7 +227349,7 @@ var GithubCopilotAuth = class GithubCopilotAuth extends Service$1()("clanka/Gith
227333
227349
  static layerClient = this.layerClientNoDeps.pipe(provide$3(GithubCopilotAuth.layer));
227334
227350
  };
227335
227351
  //#endregion
227336
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/Copilot.js
227352
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/Copilot.js
227337
227353
  /**
227338
227354
  * @since 1.0.0
227339
227355
  */
@@ -227753,7 +227769,7 @@ Object.defineProperties(createChalk.prototype, styles);
227753
227769
  const chalk = createChalk();
227754
227770
  createChalk({ level: stderrColor ? stderrColor.level : 0 });
227755
227771
  //#endregion
227756
- //#region node_modules/.pnpm/clanka@0.1.17_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_7183b12affd4420b40add07d0b291105/node_modules/clanka/dist/OutputFormatter.js
227772
+ //#region node_modules/.pnpm/clanka@0.1.18_@effect+ai-openai-compat@https+++pkg.pr.new+Effect-TS+effect-smol+@effect_bdfe5d83e2db9f6ba699c1ec52156b04/node_modules/clanka/dist/OutputFormatter.js
227757
227773
  /**
227758
227774
  * @since 1.0.0
227759
227775
  */
@@ -227787,6 +227803,7 @@ ${output.summary}\n\n`;
227787
227803
  return `${prefix}${chalkScriptHeading(`${scriptIcon} Script output`)}\n\n${chalk.dim(truncated)}\n\n`;
227788
227804
  }
227789
227805
  case "ErrorRetry": return `${prefix}${chalk.red(`Error: ${output.error.reason._tag}. Retrying...`)}\n\n${chalk.dim(pretty$1(fail$7(output.error)))}\n\n`;
227806
+ case "Usage": return `${prefix}${chalkInfoHeading(`${infoIcon} Usage:`)} ${numberFormat.format(output.inputTokens)} input / ${numberFormat.format(output.outputTokens)} output\n\n`;
227790
227807
  }
227791
227808
  }), catchTag("AgentFinished", (finished) => succeed$1(`\n${chalk.bold.green(`${doneIcon} Task complete:`)}\n\n${finished.summary}`)));
227792
227809
  const promptToString = (prompt) => {
@@ -227801,14 +227818,17 @@ const promptToString = (prompt) => {
227801
227818
  }
227802
227819
  return textParts.join("\n");
227803
227820
  };
227821
+ const numberFormat = new Intl.NumberFormat();
227804
227822
  const chalkAgentHeading = chalk.bold.green;
227805
227823
  const chalkScriptHeading = chalk.bold.blue;
227806
227824
  const chalkSubagentHeading = chalk.bold.magenta;
227807
227825
  const chalkReasoningHeading = chalk.bold.yellow;
227826
+ const chalkInfoHeading = chalk.bold.cyan;
227808
227827
  const scriptIcon = "󰯁";
227809
227828
  const subagentIcon = " ";
227810
227829
  const thinkingIcon = "󰟶";
227811
227830
  const doneIcon = "";
227831
+ const infoIcon = "";
227812
227832
  /**
227813
227833
  * @since 1.0.0
227814
227834
  * @category Muxer
@@ -237085,7 +237105,7 @@ const commandEdit = make$50("edit").pipe(withDescription("Open the selected proj
237085
237105
  const commandSource = make$50("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));
237086
237106
  //#endregion
237087
237107
  //#region package.json
237088
- var version = "0.3.66";
237108
+ var version = "0.3.67";
237089
237109
  //#endregion
237090
237110
  //#region src/commands/projects/ls.ts
237091
237111
  const commandProjectsLs = make$50("ls").pipe(withDescription("List configured projects and how they run (enabled state, concurrency, branch, git flow, review agent)."), withHandler(fnUntraced(function* () {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lalph",
3
3
  "type": "module",
4
- "version": "0.3.66",
4
+ "version": "0.3.67",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -30,15 +30,15 @@
30
30
  "@octokit/plugin-rest-endpoint-methods": "^17.0.0",
31
31
  "@octokit/types": "^16.0.0",
32
32
  "@typescript/native-preview": "7.0.0-dev.20260316.1",
33
- "clanka": "^0.1.17",
33
+ "clanka": "^0.1.18",
34
34
  "concurrently": "^9.2.1",
35
35
  "effect": "https://pkg.pr.new/Effect-TS/effect-smol/effect@273f4c6",
36
36
  "husky": "^9.1.7",
37
37
  "lint-staged": "^16.4.0",
38
38
  "octokit": "^5.0.5",
39
- "oxlint": "^1.55.0",
39
+ "oxlint": "^1.56.0",
40
40
  "prettier": "^3.8.1",
41
- "tsdown": "^0.21.3",
41
+ "tsdown": "^0.21.4",
42
42
  "typescript": "^5.9.3",
43
43
  "yaml": "^2.8.2"
44
44
  },