@garuda-agent/garuda 0.14.1 → 0.15.0

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 (33) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +62 -5
  3. package/dist/acpCommand-FZ2P5JFO.js +153 -0
  4. package/dist/chunk-23FXBNBB.js +46 -0
  5. package/dist/{chunk-QOW5TK4L.js → chunk-2S62ZNTC.js} +6 -6
  6. package/dist/{chunk-ZGZ2ZADL.js → chunk-2TAXSFWN.js} +2 -2
  7. package/dist/chunk-4JSUUDFQ.js +118 -0
  8. package/dist/{chunk-KWRJREUH.js → chunk-B25VL4RU.js} +1 -42
  9. package/dist/chunk-EPKWDCV4.js +9 -0
  10. package/dist/{chunk-W7BPYQMW.js → chunk-HRGX53VC.js} +2 -2
  11. package/dist/{chunk-U4OQVT2T.js → chunk-INRZR772.js} +2 -2
  12. package/dist/{chunk-YIZWYUBG.js → chunk-K3SIUOAG.js} +2 -2
  13. package/dist/{chunk-ITITLNAR.js → chunk-K7KK7U44.js} +36 -19
  14. package/dist/chunk-NXJ4XLB5.js +19 -0
  15. package/dist/{chunk-YM6T4J5V.js → chunk-PQNT34LY.js} +8 -111
  16. package/dist/{chunk-35GMLLJW.js → chunk-S77XDSD4.js} +2 -2
  17. package/dist/{chunk-D5O5CIWK.js → chunk-SI2QJYCR.js} +3 -1
  18. package/dist/{chunk-V7WPGQLB.js → chunk-YFQJXRIJ.js} +4 -18
  19. package/dist/cli/index.js +43 -31
  20. package/dist/{create-Y5SXJUXO.js → create-N4I7TIZE.js} +5 -5
  21. package/dist/{evalCommand-5TG2CKZY.js → evalCommand-3SSFMZQD.js} +13 -10
  22. package/dist/{inkChat-3J26R24L.js → inkChat-34BTFG2K.js} +12 -9
  23. package/dist/{install-XWLU22OH.js → install-VRPBZY5H.js} +3 -3
  24. package/dist/{jobCommand-IYWZWTSI.js → jobCommand-XJ5GULS5.js} +7 -7
  25. package/dist/{launchd-2FL5UN2U.js → launchd-QVHQ3VNN.js} +4 -4
  26. package/dist/{lspCommand-TJEZBV2E.js → lspCommand-XNTBHXLA.js} +3 -3
  27. package/dist/{manager-EBTYO2GR.js → manager-CSI76AWF.js} +3 -3
  28. package/dist/{nightCommand-DUNWJASI.js → nightCommand-CR6ZHYGP.js} +7 -7
  29. package/dist/{remove-AENULZZE.js → remove-LE7Q7K46.js} +3 -3
  30. package/dist/{run-66Y6R2KU.js → run-ML6GSPN4.js} +5 -3
  31. package/dist/server-R3GNIC33.js +676 -0
  32. package/package.json +2 -1
  33. package/dist/chunk-6TWBYMY7.js +0 -9
@@ -13,20 +13,22 @@ import {
13
13
  lookupModel,
14
14
  responseCost,
15
15
  totalTokens
16
- } from "./chunk-W7BPYQMW.js";
16
+ } from "./chunk-HRGX53VC.js";
17
17
  import {
18
18
  loadLspConfig
19
19
  } from "./chunk-G2AX7MGS.js";
20
20
  import {
21
- BUILTIN_COMMANDS,
22
21
  MAX_RESULTS,
23
22
  providerLabel,
24
23
  saveSearchUse,
25
24
  search
26
- } from "./chunk-KWRJREUH.js";
25
+ } from "./chunk-B25VL4RU.js";
26
+ import {
27
+ BUILTIN_COMMANDS
28
+ } from "./chunk-23FXBNBB.js";
27
29
  import {
28
30
  VERSION
29
- } from "./chunk-6TWBYMY7.js";
31
+ } from "./chunk-EPKWDCV4.js";
30
32
  import {
31
33
  TrustStore
32
34
  } from "./chunk-5DEWP3YX.js";
@@ -61,7 +63,7 @@ import {
61
63
  hostAllowed,
62
64
  isSensitive,
63
65
  loadSettings
64
- } from "./chunk-D5O5CIWK.js";
66
+ } from "./chunk-SI2QJYCR.js";
65
67
  import {
66
68
  PathOutsideRootError,
67
69
  displayPath,
@@ -1392,15 +1394,22 @@ ${z.prettifyError(parsed.error)}`,
1392
1394
  }
1393
1395
  const readOnly = tool.readOnly && info?.mutates !== true;
1394
1396
  const decision = await context.permissions.check(
1395
- info === void 0 ? { tool: tool.name, readOnly } : { tool: tool.name, readOnly, info },
1397
+ {
1398
+ tool: tool.name,
1399
+ readOnly,
1400
+ ...info === void 0 ? {} : { info },
1401
+ // The question names this call (0.15: ACP shows it next to the right tool call).
1402
+ callId: call.id
1403
+ },
1396
1404
  context.signal
1397
1405
  );
1398
1406
  if (!decision.allowed) {
1399
1407
  return { content: `Permission denied: ${decision.reason}`, isError: true, denied: true };
1400
1408
  }
1401
1409
  startTime = Date.now();
1402
- const runContext = decision.hunks === void 0 ? context : {
1410
+ const runContext = decision.hunks === void 0 ? { ...context, callId: call.id } : {
1403
1411
  ...context,
1412
+ callId: call.id,
1404
1413
  approvedHunks: decision.hunks,
1405
1414
  ...info?.preview === void 0 ? {} : { approvedPreview: info.preview }
1406
1415
  };
@@ -1994,6 +2003,7 @@ var editFileTool = {
1994
2003
  return {
1995
2004
  target: { kind: "path", path: edit.shown },
1996
2005
  preview,
2006
+ change: { path: edit.absolute, oldText: edit.before, newText: edit.after },
1997
2007
  // Hunk-by-hunk approval only when the user sees every hunk (U0).
1998
2008
  ...previewIsComplete(preview) ? { hunks: true } : {}
1999
2009
  };
@@ -3183,7 +3193,8 @@ function createWebFetchTool(options = {}) {
3183
3193
  target: { kind: "url", url: next.toString(), host: next.hostname },
3184
3194
  preview: ` GET ${next.toString()}
3185
3195
  (a redirect from ${new URL(key).host})`
3186
- }
3196
+ },
3197
+ ...context.callId === void 0 ? {} : { callId: context.callId }
3187
3198
  },
3188
3199
  context.signal
3189
3200
  );
@@ -3240,8 +3251,14 @@ var writeFileTool = {
3240
3251
  inputSchema: input9,
3241
3252
  readOnly: false,
3242
3253
  async describe({ path, content }, { root }) {
3243
- const shown = displayPath(root, await resolveInRoot(root, path));
3244
- return { target: { kind: "path", path: shown }, preview: unifiedDiff(shown, "", content) };
3254
+ const absolute = await resolveInRoot(root, path);
3255
+ const shown = displayPath(root, absolute);
3256
+ return {
3257
+ target: { kind: "path", path: shown },
3258
+ preview: unifiedDiff(shown, "", content),
3259
+ // write_file only creates files, so there is no old text (0.15: ACP's diff view).
3260
+ change: { path: absolute, oldText: null, newText: content }
3261
+ };
3245
3262
  },
3246
3263
  async run({ path, content }, context) {
3247
3264
  const { root, files } = context;
@@ -8605,7 +8622,7 @@ ${neutralizeTags(output)}`
8605
8622
  text: "There is no finished plan in this chat. Make one in plan mode (/plan), then type /schedule."
8606
8623
  };
8607
8624
  }
8608
- const { createJob } = await import("./create-Y5SXJUXO.js");
8625
+ const { createJob } = await import("./create-N4I7TIZE.js");
8609
8626
  const created = await createJob({
8610
8627
  root: this.root,
8611
8628
  executor: this.executor,
@@ -8672,7 +8689,7 @@ ${result.stderr.text}`)
8672
8689
  */
8673
8690
  async cancelJob(id, agent = {}) {
8674
8691
  const { loadJob, saveJob } = await import("./job-3NYDMP2M.js");
8675
- const { defaultAgentEnv, nightSpec, removeAgent, removeSpec } = await import("./launchd-2FL5UN2U.js");
8692
+ const { defaultAgentEnv, nightSpec, removeAgent, removeSpec } = await import("./launchd-QVHQ3VNN.js");
8676
8693
  if (id === "night") {
8677
8694
  const removed = await removeSpec(
8678
8695
  agent.executor ?? this.executor,
@@ -8704,8 +8721,8 @@ ${result.stderr.text}`)
8704
8721
  */
8705
8722
  async deleteJob(id, signal, agent = {}) {
8706
8723
  const { loadJob } = await import("./job-3NYDMP2M.js");
8707
- const { defaultAgentEnv, removeAgent } = await import("./launchd-2FL5UN2U.js");
8708
- const { jobLeftovers, removeJob } = await import("./remove-AENULZZE.js");
8724
+ const { defaultAgentEnv, removeAgent } = await import("./launchd-QVHQ3VNN.js");
8725
+ const { jobLeftovers, removeJob } = await import("./remove-LE7Q7K46.js");
8709
8726
  let job;
8710
8727
  try {
8711
8728
  job = await loadJob(this.root, id);
@@ -8877,7 +8894,7 @@ ${result.stderr.text}`)
8877
8894
  * The files it writes are new only; the turn's own writes go through the normal approvals.
8878
8895
  */
8879
8896
  async init(signal) {
8880
- const { runInit } = await import("./run-66Y6R2KU.js");
8897
+ const { runInit } = await import("./run-ML6GSPN4.js");
8881
8898
  const result = await runInit({
8882
8899
  root: this.root,
8883
8900
  home: this.commandsHome,
@@ -9032,7 +9049,7 @@ ${result.stderr.text}`)
9032
9049
  }
9033
9050
  /** Install a language server into ~/.garuda/lsp (the user asked for it). */
9034
9051
  async installLsp(language, signal) {
9035
- const { installServer } = await import("./install-XWLU22OH.js");
9052
+ const { installServer } = await import("./install-VRPBZY5H.js");
9036
9053
  const result = await installServer(language, {
9037
9054
  executor: this.executor,
9038
9055
  home: this.lspHome,
@@ -9043,7 +9060,7 @@ ${result.stderr.text}`)
9043
9060
  }
9044
9061
  /** autoInstall (~/.garuda/lsp.json): ask before a managed install. */
9045
9062
  async askInstall(language, signal) {
9046
- const { installCommand } = await import("./install-XWLU22OH.js");
9063
+ const { installCommand } = await import("./install-VRPBZY5H.js");
9047
9064
  const { LANGUAGE_LABELS } = await import("./manager-4PMSXT47.js");
9048
9065
  const { managedLabel, managedDir } = await import("./servers-6YDGWOZ6.js");
9049
9066
  const dir = managedDir(language, this.lspHome);
@@ -9076,7 +9093,7 @@ ${result.stderr.text}`)
9076
9093
  async startMcp(signal) {
9077
9094
  if (this.mcpServers.length === 0) return;
9078
9095
  this.mcpStarted ??= (async () => {
9079
- const { McpManager } = await import("./manager-EBTYO2GR.js");
9096
+ const { McpManager } = await import("./manager-CSI76AWF.js");
9080
9097
  const { AuthStore } = await import("./oauth-W6OK6XXO.js");
9081
9098
  const manager = new McpManager({
9082
9099
  root: this.root,
@@ -9338,4 +9355,4 @@ export {
9338
9355
  modelFacts,
9339
9356
  Runtime
9340
9357
  };
9341
- //# sourceMappingURL=chunk-ITITLNAR.js.map
9358
+ //# sourceMappingURL=chunk-K7KK7U44.js.map
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/permissions/autoApprover.ts
4
+ var AutoApprover = class {
5
+ requests = [];
6
+ answer;
7
+ constructor(answer = "once") {
8
+ this.answer = typeof answer === "function" ? answer : () => answer;
9
+ }
10
+ async ask(request) {
11
+ this.requests.push(request);
12
+ return this.answer(request);
13
+ }
14
+ };
15
+
16
+ export {
17
+ AutoApprover
18
+ };
19
+ //# sourceMappingURL=chunk-NXJ4XLB5.js.map
@@ -1,4 +1,7 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ colorDiff
4
+ } from "./chunk-4JSUUDFQ.js";
2
5
  import {
3
6
  SPECIALIST_SPECS,
4
7
  THINKING_WORDS,
@@ -14,14 +17,14 @@ import {
14
17
  repoMapText,
15
18
  repoMapTool,
16
19
  verifyAuditFile
17
- } from "./chunk-ITITLNAR.js";
20
+ } from "./chunk-K7KK7U44.js";
18
21
  import {
19
22
  WEB_SEARCH_USD,
20
23
  totalTokens
21
- } from "./chunk-W7BPYQMW.js";
24
+ } from "./chunk-HRGX53VC.js";
22
25
  import {
23
26
  BUILTIN_COMMANDS
24
- } from "./chunk-KWRJREUH.js";
27
+ } from "./chunk-23FXBNBB.js";
25
28
  import {
26
29
  LSP_LANGUAGES
27
30
  } from "./chunk-EU7PA45O.js";
@@ -29,108 +32,6 @@ import {
29
32
  listJobs
30
33
  } from "./chunk-KKB5W47S.js";
31
34
 
32
- // src/cli/approver.ts
33
- import { styleText } from "util";
34
- var TerminalApprover = class {
35
- /** Set by the CLI: it aborts the current turn. */
36
- onInterrupt = () => {
37
- };
38
- /** One question at a time (0.14.1, review): two prompts at once mixed their keys. */
39
- ask(request, signal) {
40
- const next = this.asking === 0 ? this.askNow(request, signal) : this.queue.then(() => this.askNow(request, signal));
41
- this.asking++;
42
- this.queue = next.catch(() => {
43
- }).finally(() => {
44
- this.asking--;
45
- });
46
- return next;
47
- }
48
- asking = 0;
49
- queue = Promise.resolve();
50
- async askNow(request, signal) {
51
- signal.throwIfAborted();
52
- const out = process.stderr;
53
- out.write(`
54
- ${header(request)}
55
- ${colorPreview(request)}
56
- `);
57
- if (!process.stdin.isTTY) {
58
- out.write("No terminal to ask for approval, so Garuda denies this call.\n");
59
- return "deny";
60
- }
61
- const sessionLabel = request.labels?.session ?? (request.target.kind === "command" ? "Yes, and allow this exact command for this session" : request.target.kind === "url" ? `Yes, and allow ${request.target.host} for this session` : `Yes, and allow all ${request.tool} calls for this session`);
62
- const { select } = await import("@inquirer/prompts");
63
- try {
64
- return await select(
65
- {
66
- message: request.question ?? "Allow?",
67
- choices: [
68
- { name: request.labels?.once ?? "Yes, once", value: "once" },
69
- { name: sessionLabel, value: "session" },
70
- { name: request.labels?.deny ?? "No, deny", value: "deny" }
71
- ].filter((c) => request.choices?.includes(c.value) ?? true)
72
- },
73
- { signal, output: out }
74
- );
75
- } catch (error) {
76
- if (error.name === "ExitPromptError") this.onInterrupt();
77
- throw error;
78
- }
79
- }
80
- };
81
- var SwitchApprover = class {
82
- constructor(current) {
83
- this.current = current;
84
- }
85
- current;
86
- /** Called before each question: the chat's notifier (0.6). */
87
- onAsk = () => {
88
- };
89
- ask(request, signal) {
90
- this.onAsk(request);
91
- return this.current.ask(request, signal);
92
- }
93
- };
94
- function visible(text) {
95
- return text.replace(/[\u0000-\u0008\u000b-\u001f]/g, (c) => String.fromCodePoint(9216 + c.charCodeAt(0))).replace(/\u007f/g, "\u2421").replace(
96
- /[\u0080-\u009f\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u2069\ufeff\u{e0000}-\u{e007f}]/gu,
97
- (c) => `[U+${(c.codePointAt(0) ?? 0).toString(16).toUpperCase().padStart(4, "0")}]`
98
- );
99
- }
100
- function hasHidden(text) {
101
- return visible(text) !== text;
102
- }
103
- function header(request) {
104
- const { tool, target, isolation } = request;
105
- const title = request.title === void 0 ? void 0 : visible(request.title);
106
- if (title !== void 0) return styleText("bold", title);
107
- if (target.kind === "command") {
108
- const where = isolation === "none" ? "on your machine, no sandbox" : target.outsideSandbox ? "OUTSIDE the sandbox: network on, writes anywhere" : `sandbox: ${isolation}`;
109
- return styleText("bold", `${tool} wants to run a command (${where}):`);
110
- }
111
- if (target.kind === "input") return styleText("bold", `${tool} wants to run with this input:`);
112
- if (target.kind === "url")
113
- return styleText("bold", `${tool} wants to fetch from ${visible(target.host)}:`);
114
- return styleText("bold", `${tool} wants to change ${visible(target.path)}:`);
115
- }
116
- function colorPreview({ target, preview }) {
117
- const warning = hasHidden(preview) ? `
118
- ${styleText("yellow", " ! This holds hidden or control characters, shown as \u240D, \u241B or [U+\u2026]. Read it with care.")}` : "";
119
- if (target.kind === "command") return `${styleText("cyan", ` $ ${visible(preview)}`)}${warning}`;
120
- if (target.kind === "url") return `${visible(preview)}${warning}`;
121
- return `${colorDiff(visible(preview))}${warning}`;
122
- }
123
- function colorDiff(text) {
124
- return text.split("\n").map((line) => {
125
- if (line.startsWith("+++") || line.startsWith("---") || line.startsWith("diff --git"))
126
- return styleText("bold", line);
127
- if (line.startsWith("+")) return styleText("green", line);
128
- if (line.startsWith("-")) return styleText("red", line);
129
- if (line.startsWith("@@")) return styleText("cyan", line);
130
- return line;
131
- }).join("\n");
132
- }
133
-
134
35
  // src/cli/errors.ts
135
36
  function describeError(error) {
136
37
  const parts = [];
@@ -588,7 +489,7 @@ async function jobsCommand(runtime, renderer, id) {
588
489
  return;
589
490
  }
590
491
  const jobs = await listJobs2(runtime.root);
591
- const { defaultAgentEnv, nightAgentTime } = await import("./launchd-2FL5UN2U.js");
492
+ const { defaultAgentEnv, nightAgentTime } = await import("./launchd-QVHQ3VNN.js");
592
493
  const night = nightAgentTime(runtime.root, defaultAgentEnv());
593
494
  const nightLine = night === void 0 ? [] : [
594
495
  `Night shift: launchd starts the queue at ${night.toTimeString().slice(0, 5)} on ${night.toDateString()} (/jobs cancel night removes it).`
@@ -1322,10 +1223,6 @@ var CommandArgs = class {
1322
1223
  };
1323
1224
 
1324
1225
  export {
1325
- TerminalApprover,
1326
- SwitchApprover,
1327
- header,
1328
- colorPreview,
1329
1226
  describeError,
1330
1227
  FOCUS_REPORTING_ON,
1331
1228
  FOCUS_REPORTING_OFF,
@@ -1347,4 +1244,4 @@ export {
1347
1244
  statusOf,
1348
1245
  CommandArgs
1349
1246
  };
1350
- //# sourceMappingURL=chunk-YM6T4J5V.js.map
1247
+ //# sourceMappingURL=chunk-PQNT34LY.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  hostCommand,
4
4
  shellWord
5
- } from "./chunk-ZGZ2ZADL.js";
5
+ } from "./chunk-2TAXSFWN.js";
6
6
  import {
7
7
  JOBS_DIR
8
8
  } from "./chunk-KKB5W47S.js";
@@ -154,4 +154,4 @@ export {
154
154
  nightAgentTime,
155
155
  removeAgent
156
156
  };
157
- //# sourceMappingURL=chunk-35GMLLJW.js.map
157
+ //# sourceMappingURL=chunk-S77XDSD4.js.map
@@ -1155,6 +1155,8 @@ var PermissionEngine = class {
1155
1155
  target: asked,
1156
1156
  preview: info?.preview ?? describeTarget(asked),
1157
1157
  isolation: this.isolation,
1158
+ ...request.callId === void 0 ? {} : { callId: request.callId },
1159
+ ...info?.change === void 0 ? {} : { change: info.change },
1158
1160
  ...info?.title === void 0 ? {} : { title: info.title },
1159
1161
  ...info?.hunks === true ? {
1160
1162
  selectHunks: (hunks) => {
@@ -1336,4 +1338,4 @@ export {
1336
1338
  JOB_DENIAL,
1337
1339
  PermissionEngine
1338
1340
  };
1339
- //# sourceMappingURL=chunk-D5O5CIWK.js.map
1341
+ //# sourceMappingURL=chunk-SI2QJYCR.js.map
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  keepSecretForRedaction
4
- } from "./chunk-ITITLNAR.js";
4
+ } from "./chunk-K7KK7U44.js";
5
5
  import {
6
6
  lookupModel
7
- } from "./chunk-W7BPYQMW.js";
7
+ } from "./chunk-HRGX53VC.js";
8
8
  import {
9
9
  isLoopbackHost
10
10
  } from "./chunk-ATW7BNIG.js";
@@ -184,24 +184,10 @@ function checkBaseUrl(provider, def) {
184
184
  }
185
185
  }
186
186
 
187
- // src/permissions/autoApprover.ts
188
- var AutoApprover = class {
189
- requests = [];
190
- answer;
191
- constructor(answer = "once") {
192
- this.answer = typeof answer === "function" ? answer : () => answer;
193
- }
194
- async ask(request) {
195
- this.requests.push(request);
196
- return this.answer(request);
197
- }
198
- };
199
-
200
187
  export {
201
188
  loadModelsConfig,
202
189
  keepProviderKey,
203
190
  hasProviderKey,
204
- resolveModel,
205
- AutoApprover
191
+ resolveModel
206
192
  };
207
- //# sourceMappingURL=chunk-V7WPGQLB.js.map
193
+ //# sourceMappingURL=chunk-YFQJXRIJ.js.map
package/dist/cli/index.js CHANGED
@@ -1,22 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- AutoApprover,
4
- hasProviderKey,
5
- keepProviderKey,
6
- loadModelsConfig,
7
- resolveModel
8
- } from "../chunk-V7WPGQLB.js";
9
- import {
10
- Notifier,
11
- pickChannel
12
- } from "../chunk-N4I6YS3E.js";
13
2
  import {
14
3
  BUILD_PROMPT,
15
4
  CommandArgs,
16
5
  FOCUS_REPORTING_OFF,
17
6
  FocusTracker,
18
- SwitchApprover,
19
- TerminalApprover,
20
7
  commandNames,
21
8
  complete,
22
9
  describeError,
@@ -28,10 +15,27 @@ import {
28
15
  runCommand,
29
16
  runTurnInTerminal,
30
17
  stopMessage
31
- } from "../chunk-YM6T4J5V.js";
18
+ } from "../chunk-PQNT34LY.js";
32
19
  import {
33
20
  PlainRenderer
34
21
  } from "../chunk-FARS4R67.js";
22
+ import {
23
+ AutoApprover
24
+ } from "../chunk-NXJ4XLB5.js";
25
+ import {
26
+ Notifier,
27
+ pickChannel
28
+ } from "../chunk-N4I6YS3E.js";
29
+ import {
30
+ SwitchApprover,
31
+ TerminalApprover
32
+ } from "../chunk-4JSUUDFQ.js";
33
+ import {
34
+ hasProviderKey,
35
+ keepProviderKey,
36
+ loadModelsConfig,
37
+ resolveModel
38
+ } from "../chunk-YFQJXRIJ.js";
35
39
  import {
36
40
  DEFAULT_MAX_TOKENS,
37
41
  FileSessionStore,
@@ -48,18 +52,20 @@ import {
48
52
  redoPoint,
49
53
  runAgent,
50
54
  signature
51
- } from "../chunk-ITITLNAR.js";
55
+ } from "../chunk-K7KK7U44.js";
52
56
  import "../chunk-A2QAIRQL.js";
53
- import "../chunk-W7BPYQMW.js";
57
+ import "../chunk-HRGX53VC.js";
54
58
  import "../chunk-G2AX7MGS.js";
55
59
  import {
56
- BUILTIN_COMMANDS,
57
60
  loadSearchConfig
58
- } from "../chunk-KWRJREUH.js";
61
+ } from "../chunk-B25VL4RU.js";
62
+ import {
63
+ BUILTIN_COMMANDS
64
+ } from "../chunk-23FXBNBB.js";
59
65
  import "../chunk-EU7PA45O.js";
60
66
  import {
61
67
  VERSION
62
- } from "../chunk-6TWBYMY7.js";
68
+ } from "../chunk-EPKWDCV4.js";
63
69
  import "../chunk-5DEWP3YX.js";
64
70
  import "../chunk-ZAE25JM2.js";
65
71
  import "../chunk-ATW7BNIG.js";
@@ -67,7 +73,7 @@ import "../chunk-PZS3V6P3.js";
67
73
  import "../chunk-OUCV3FCT.js";
68
74
  import {
69
75
  JOB_DENIAL
70
- } from "../chunk-D5O5CIWK.js";
76
+ } from "../chunk-SI2QJYCR.js";
71
77
  import "../chunk-WMOLXTBU.js";
72
78
  import "../chunk-HUIK3WXO.js";
73
79
  import "../chunk-KKB5W47S.js";
@@ -761,7 +767,7 @@ async function main() {
761
767
  "--test-command <cmd>",
762
768
  "with --from-git: the test command; {files} takes the test files (default: detected)"
763
769
  ).action(async (options) => {
764
- const { runEvalCommand } = await import("../evalCommand-5TG2CKZY.js");
770
+ const { runEvalCommand } = await import("../evalCommand-3SSFMZQD.js");
765
771
  process.exitCode = await runEvalCommand({
766
772
  ...options,
767
773
  model: options.model ?? process.env.GARUDA_MODEL,
@@ -783,15 +789,21 @@ async function main() {
783
789
  program.command("night").description(
784
790
  "run this project's night queue (jobs from /schedule), up to 3 at a time, then write one digest"
785
791
  ).option("--at <HH:MM>", "wait until this local time first (keep the terminal open)").option("--parallel <n>", "jobs at the same time (1 to 10, default 3)").addOption(new Option("--from-launchd").hideHelp()).action(async (options) => {
786
- const { nightCommand } = await import("../nightCommand-DUNWJASI.js");
792
+ const { nightCommand } = await import("../nightCommand-CR6ZHYGP.js");
787
793
  process.exitCode = await nightCommand(options, new PlainRenderer());
788
794
  });
795
+ program.command("acp").description(
796
+ "run as an agent for an editor over the Agent Client Protocol (VS Code with an extension, Zed, JetBrains, Neovim, Emacs); the editor starts it"
797
+ ).option("-m, --model <id>", "model id (or set GARUDA_MODEL)").action(async (options) => {
798
+ const { acpCommand } = await import("../acpCommand-FZ2P5JFO.js");
799
+ process.exitCode = await acpCommand(options);
800
+ });
789
801
  const lsp = program.command("lsp").description("show the language servers for diagnostics (TS/JS, Python, Java)").action(async () => {
790
- const { lspStatusCommand } = await import("../lspCommand-TJEZBV2E.js");
802
+ const { lspStatusCommand } = await import("../lspCommand-XNTBHXLA.js");
791
803
  process.exitCode = await lspStatusCommand();
792
804
  });
793
805
  lsp.command("install").description("install a pinned language server into ~/.garuda/lsp (needs the network)").argument("<language>", "typescript, python or java").action(async (language) => {
794
- const { lspInstallCommand } = await import("../lspCommand-TJEZBV2E.js");
806
+ const { lspInstallCommand } = await import("../lspCommand-XNTBHXLA.js");
795
807
  process.exitCode = await lspInstallCommand(language);
796
808
  });
797
809
  await program.parseAsync();
@@ -803,7 +815,7 @@ async function start(options, program) {
803
815
  let job;
804
816
  let jobGuard;
805
817
  if (options.job !== void 0) {
806
- const { prepareJob } = await import("../jobCommand-IYWZWTSI.js");
818
+ const { prepareJob } = await import("../jobCommand-XJ5GULS5.js");
807
819
  const prepared = await prepareJob(
808
820
  mainRoot,
809
821
  options.job,
@@ -958,7 +970,7 @@ async function start(options, program) {
958
970
  job.job.status = "failed";
959
971
  await saveJob(job.job);
960
972
  if (options.fromLaunchd === true || job.job.launchd !== void 0) {
961
- const { removeAgent, defaultAgentEnv } = await import("../launchd-2FL5UN2U.js");
973
+ const { removeAgent, defaultAgentEnv } = await import("../launchd-QVHQ3VNN.js");
962
974
  await removeAgent(runtime.executor, job.job, defaultAgentEnv());
963
975
  }
964
976
  return 1;
@@ -1028,7 +1040,7 @@ async function start(options, program) {
1028
1040
  if (resolved2.kind === "prompt") prompt = resolved2.prompt;
1029
1041
  }
1030
1042
  if (job !== void 0) {
1031
- const { testsBefore } = await import("../jobCommand-IYWZWTSI.js");
1043
+ const { testsBefore } = await import("../jobCommand-XJ5GULS5.js");
1032
1044
  await testsBefore(job, runtime, renderer);
1033
1045
  }
1034
1046
  const outcome = await runTurnInTerminal(
@@ -1041,7 +1053,7 @@ async function start(options, program) {
1041
1053
  await runtime.close();
1042
1054
  finish(outcome);
1043
1055
  if (job !== void 0) {
1044
- const { finishJob } = await import("../jobCommand-IYWZWTSI.js");
1056
+ const { finishJob } = await import("../jobCommand-XJ5GULS5.js");
1045
1057
  await finishJob(job, outcome, runtime, renderer, void 0, {
1046
1058
  fromLaunchd: options.fromLaunchd === true
1047
1059
  });
@@ -1127,7 +1139,7 @@ function wantsInk() {
1127
1139
  }
1128
1140
  async function loadInk(renderer) {
1129
1141
  try {
1130
- return await import("../inkChat-3J26R24L.js");
1142
+ return await import("../inkChat-34BTFG2K.js");
1131
1143
  } catch (error) {
1132
1144
  renderer.info(`Plain chat (Ink is not available: ${error.message.split("\n")[0]}).`);
1133
1145
  return void 0;
@@ -1159,8 +1171,8 @@ function recordJobDenial(job, tool, target) {
1159
1171
  }
1160
1172
  async function jobBatchClient(job, resolved, renderer) {
1161
1173
  const { DeadlineClient } = await import("../deadline-F5RJJ2QW.js");
1162
- const { nextTime } = await import("../launchd-2FL5UN2U.js");
1163
- const { DEFAULT_FINISH_BY, DEFAULT_STEP_LIMIT_MINUTES, SWITCH_BEFORE_MS } = await import("../create-Y5SXJUXO.js");
1174
+ const { nextTime } = await import("../launchd-QVHQ3VNN.js");
1175
+ const { DEFAULT_FINISH_BY, DEFAULT_STEP_LIMIT_MINUTES, SWITCH_BEFORE_MS } = await import("../create-N4I7TIZE.js");
1164
1176
  const finishBy = job.job.finishBy ?? DEFAULT_FINISH_BY;
1165
1177
  const stepLimit = job.job.stepLimitMinutes ?? DEFAULT_STEP_LIMIT_MINUTES;
1166
1178
  const switchAt = new Date(nextTime(finishBy).getTime() - SWITCH_BEFORE_MS);
@@ -3,7 +3,7 @@ import {
3
3
  jobBase,
4
4
  linkCandidates,
5
5
  worktreeDir
6
- } from "./chunk-YIZWYUBG.js";
6
+ } from "./chunk-K3SIUOAG.js";
7
7
  import {
8
8
  agentLabel,
9
9
  defaultAgentEnv,
@@ -12,15 +12,15 @@ import {
12
12
  nextTime,
13
13
  nightAgentTime,
14
14
  nightSpec
15
- } from "./chunk-35GMLLJW.js";
15
+ } from "./chunk-S77XDSD4.js";
16
16
  import {
17
17
  jobPrompt
18
18
  } from "./chunk-YQTGMCU6.js";
19
19
  import "./chunk-OUCV3FCT.js";
20
20
  import {
21
21
  JobGitError
22
- } from "./chunk-ZGZ2ZADL.js";
23
- import "./chunk-D5O5CIWK.js";
22
+ } from "./chunk-2TAXSFWN.js";
23
+ import "./chunk-SI2QJYCR.js";
24
24
  import "./chunk-WMOLXTBU.js";
25
25
  import "./chunk-HUIK3WXO.js";
26
26
  import {
@@ -220,4 +220,4 @@ export {
220
220
  createJob,
221
221
  switchTime
222
222
  };
223
- //# sourceMappingURL=create-Y5SXJUXO.js.map
223
+ //# sourceMappingURL=create-N4I7TIZE.js.map
@@ -1,9 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- AutoApprover,
3
+ AutoApprover
4
+ } from "./chunk-NXJ4XLB5.js";
5
+ import {
4
6
  loadModelsConfig,
5
7
  resolveModel
6
- } from "./chunk-V7WPGQLB.js";
8
+ } from "./chunk-YFQJXRIJ.js";
7
9
  import {
8
10
  CODE_INDEX_MODES,
9
11
  DEFAULT_CODE_INDEX_MODE,
@@ -11,14 +13,15 @@ import {
11
13
  Runtime,
12
14
  detectProfiles,
13
15
  newSessionId
14
- } from "./chunk-ITITLNAR.js";
16
+ } from "./chunk-K7KK7U44.js";
15
17
  import "./chunk-A2QAIRQL.js";
16
18
  import {
17
19
  totalTokens
18
- } from "./chunk-W7BPYQMW.js";
20
+ } from "./chunk-HRGX53VC.js";
19
21
  import "./chunk-G2AX7MGS.js";
20
- import "./chunk-KWRJREUH.js";
21
- import "./chunk-6TWBYMY7.js";
22
+ import "./chunk-B25VL4RU.js";
23
+ import "./chunk-23FXBNBB.js";
24
+ import "./chunk-EPKWDCV4.js";
22
25
  import "./chunk-5DEWP3YX.js";
23
26
  import "./chunk-ZAE25JM2.js";
24
27
  import "./chunk-ATW7BNIG.js";
@@ -26,7 +29,7 @@ import "./chunk-PZS3V6P3.js";
26
29
  import {
27
30
  LINK_CANDIDATES,
28
31
  cleanArgs
29
- } from "./chunk-YIZWYUBG.js";
32
+ } from "./chunk-K3SIUOAG.js";
30
33
  import {
31
34
  MANIFEST,
32
35
  TEST_PATH,
@@ -36,7 +39,7 @@ import {
36
39
  import {
37
40
  git,
38
41
  shellWord
39
- } from "./chunk-ZGZ2ZADL.js";
42
+ } from "./chunk-2TAXSFWN.js";
40
43
  import {
41
44
  DEFAULT_ENV_ALLOWLIST,
42
45
  EXECUTOR_NAMES,
@@ -44,7 +47,7 @@ import {
44
47
  createExecutor,
45
48
  expandAllowlist,
46
49
  parseSettings
47
- } from "./chunk-D5O5CIWK.js";
50
+ } from "./chunk-SI2QJYCR.js";
48
51
  import "./chunk-WMOLXTBU.js";
49
52
  import "./chunk-HUIK3WXO.js";
50
53
  import "./chunk-3NJNVZTK.js";
@@ -2792,4 +2795,4 @@ export {
2792
2795
  BATCH_TASK_TIMEOUT_MS,
2793
2796
  runEvalCommand
2794
2797
  };
2795
- //# sourceMappingURL=evalCommand-5TG2CKZY.js.map
2798
+ //# sourceMappingURL=evalCommand-3SSFMZQD.js.map