@garuda-agent/garuda 0.17.0 → 0.18.1

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 (64) hide show
  1. package/CHANGELOG.md +243 -0
  2. package/README.md +3 -2
  3. package/SECURITY.md +1 -1
  4. package/dist/{acpCommand-7EY3NHPG.js → acpCommand-JAYNMIMP.js} +19 -16
  5. package/dist/advise-HDKJGNBL.js +195 -0
  6. package/dist/brief-RWKESOPT.js +91 -0
  7. package/dist/buildCheck-HB46NWLX.js +19 -0
  8. package/dist/buildInfo-K73FFI5S.js +8 -0
  9. package/dist/chunk-2OYTNNUJ.js +216 -0
  10. package/dist/{chunk-Z66BWTMD.js → chunk-34WBDQBL.js} +135 -78
  11. package/dist/chunk-4QRTTRVK.js +88 -0
  12. package/dist/{chunk-2DYMJMRQ.js → chunk-5UDYQ5MK.js} +405 -70
  13. package/dist/{chunk-J4346IDH.js → chunk-7KBOIPUT.js} +2 -1
  14. package/dist/chunk-CWVXOSAA.js +894 -0
  15. package/dist/{chunk-FARS4R67.js → chunk-DQSCCE77.js} +18 -1
  16. package/dist/chunk-DUYLVGPY.js +821 -0
  17. package/dist/chunk-GKU62MHQ.js +5258 -0
  18. package/dist/chunk-H7LIBGZT.js +9 -0
  19. package/dist/chunk-IKPGHM54.js +334 -0
  20. package/dist/chunk-IYGJWX65.js +9 -0
  21. package/dist/{chunk-U65DQZDB.js → chunk-JMH5W5DG.js} +2 -45
  22. package/dist/chunk-L55VUSX3.js +54 -0
  23. package/dist/{chunk-B4SJY7KT.js → chunk-LMKGSYJC.js} +77 -8
  24. package/dist/{chunk-23FXBNBB.js → chunk-MNE7HHX2.js} +2 -1
  25. package/dist/chunk-NH72AELP.js +48 -0
  26. package/dist/{chunk-735BKABA.js → chunk-NLS7GMF7.js} +12 -106
  27. package/dist/{chunk-ZAE25JM2.js → chunk-QANRZW7W.js} +8 -1
  28. package/dist/{chunk-JRVWH27M.js → chunk-QLBCM2YQ.js} +7 -3
  29. package/dist/{chunk-6XHON3Q6.js → chunk-QXTHEFKP.js} +3 -3
  30. package/dist/{chunk-TJIWD7R7.js → chunk-R7RCW4BQ.js} +10 -8
  31. package/dist/chunk-TLA2PDGM.js +156 -0
  32. package/dist/{chunk-5B5HDTUR.js → chunk-TWQ7V2L6.js} +2 -2
  33. package/dist/chunk-ULAJPMY7.js +107 -0
  34. package/dist/chunk-VISKX36R.js +306 -0
  35. package/dist/{chunk-55CFEEIN.js → chunk-WK5NE6RY.js} +2 -2
  36. package/dist/chunk-Y62J7PTD.js +90 -0
  37. package/dist/chunk-YAQ6QLKB.js +40 -0
  38. package/dist/{chunk-7TH3NHCQ.js → chunk-ZKT4P2PC.js} +2 -2
  39. package/dist/cli/index.js +289 -65
  40. package/dist/config-WV2H64TF.js +23 -0
  41. package/dist/{create-W6BV75QX.js → create-OACSGJ37.js} +5 -5
  42. package/dist/evalCommand-BLJJ4G76.js +696 -0
  43. package/dist/evalTune-W53KAD4V.js +302 -0
  44. package/dist/{export-SJ3DUP6W.js → export-E677HIQS.js} +27 -4
  45. package/dist/exportHtml-BMV73YRO.js +21 -0
  46. package/dist/{inkChat-FNUBK43U.js → inkChat-EVLYDC3K.js} +263 -47
  47. package/dist/{install-TKWN5AYH.js → install-4ST5BNRG.js} +3 -3
  48. package/dist/{jobCommand-FE6XN3YD.js → jobCommand-ILOTYOX3.js} +9 -8
  49. package/dist/{launchd-3A3ONEW5.js → launchd-QG6R5RAK.js} +4 -4
  50. package/dist/{lspCommand-ZZ6R4PA2.js → lspCommand-X4FTTONR.js} +3 -3
  51. package/dist/{manager-73MPYFTP.js → manager-L25IUXHW.js} +11 -11
  52. package/dist/{nightCommand-OODJNWDT.js → nightCommand-XPWT6CQZ.js} +9 -8
  53. package/dist/receiptView-YFDHV253.js +19 -0
  54. package/dist/{remove-42WQNVPX.js → remove-STX5UO7X.js} +3 -3
  55. package/dist/{run-ML6GSPN4.js → run-W4TK52WT.js} +6 -6
  56. package/dist/{server-VEYIJHEU.js → server-ASM73QVY.js} +3 -3
  57. package/dist/{setupCommand-GBQIVYJC.js → setupCommand-OSOMFHDQ.js} +10 -9
  58. package/dist/tour-CEVMAC5S.js +18 -0
  59. package/dist/tune-VX2WQTHS.js +52 -0
  60. package/dist/uiState-YFJQ43D7.js +16 -0
  61. package/package.json +1 -1
  62. package/dist/chunk-4JSUUDFQ.js +0 -118
  63. package/dist/chunk-BSK5T2ZG.js +0 -9
  64. package/dist/evalCommand-YVQAWUZE.js +0 -2833
@@ -1,21 +1,22 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  msUntil
4
- } from "./chunk-TJIWD7R7.js";
4
+ } from "./chunk-R7RCW4BQ.js";
5
5
  import {
6
6
  notificationBytes,
7
7
  pickChannel
8
8
  } from "./chunk-N4I6YS3E.js";
9
- import "./chunk-735BKABA.js";
10
- import "./chunk-J4346IDH.js";
9
+ import "./chunk-ULAJPMY7.js";
10
+ import "./chunk-NLS7GMF7.js";
11
+ import "./chunk-7KBOIPUT.js";
11
12
  import "./chunk-5DEWP3YX.js";
12
13
  import "./chunk-PZS3V6P3.js";
13
- import "./chunk-55CFEEIN.js";
14
+ import "./chunk-WK5NE6RY.js";
14
15
  import {
15
16
  defaultAgentEnv,
16
17
  nightSpec,
17
18
  removeSpec
18
- } from "./chunk-5B5HDTUR.js";
19
+ } from "./chunk-TWQ7V2L6.js";
19
20
  import {
20
21
  formatCost,
21
22
  jobCost,
@@ -27,10 +28,10 @@ import {
27
28
  import {
28
29
  hostCommand,
29
30
  shellWord
30
- } from "./chunk-6XHON3Q6.js";
31
+ } from "./chunk-QXTHEFKP.js";
31
32
  import {
32
33
  createExecutor
33
- } from "./chunk-B4SJY7KT.js";
34
+ } from "./chunk-LMKGSYJC.js";
34
35
  import "./chunk-BHZ6G65V.js";
35
36
  import "./chunk-P6XWWIEK.js";
36
37
  import {
@@ -252,4 +253,4 @@ Digest: ${file}`);
252
253
  export {
253
254
  nightCommand
254
255
  };
255
- //# sourceMappingURL=nightCommand-OODJNWDT.js.map
256
+ //# sourceMappingURL=nightCommand-XPWT6CQZ.js.map
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ RECEIPT_BOX_MIN_COLUMNS,
4
+ RECEIPT_MAX_WIDTH,
5
+ cells,
6
+ receiptText,
7
+ screenReaderMode
8
+ } from "./chunk-2OYTNNUJ.js";
9
+ import "./chunk-NLS7GMF7.js";
10
+ import "./chunk-7KBOIPUT.js";
11
+ import "./chunk-BHZ6G65V.js";
12
+ export {
13
+ RECEIPT_BOX_MIN_COLUMNS,
14
+ RECEIPT_MAX_WIDTH,
15
+ cells,
16
+ receiptText,
17
+ screenReaderMode
18
+ };
19
+ //# sourceMappingURL=receiptView-YFDHV253.js.map
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  git
4
- } from "./chunk-6XHON3Q6.js";
5
- import "./chunk-B4SJY7KT.js";
4
+ } from "./chunk-QXTHEFKP.js";
5
+ import "./chunk-LMKGSYJC.js";
6
6
  import "./chunk-BHZ6G65V.js";
7
7
  import "./chunk-P6XWWIEK.js";
8
8
  import {
@@ -58,4 +58,4 @@ export {
58
58
  jobLeftovers,
59
59
  removeJob
60
60
  };
61
- //# sourceMappingURL=remove-42WQNVPX.js.map
61
+ //# sourceMappingURL=remove-STX5UO7X.js.map
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-B25VL4RU.js";
7
7
  import {
8
8
  BUILTIN_COMMANDS
9
- } from "./chunk-23FXBNBB.js";
9
+ } from "./chunk-MNE7HHX2.js";
10
+ import {
11
+ folderKind
12
+ } from "./chunk-42DSA4EA.js";
10
13
  import {
11
14
  SERVER_NAME,
12
15
  checkServerUrl
13
- } from "./chunk-ZAE25JM2.js";
16
+ } from "./chunk-QANRZW7W.js";
14
17
  import "./chunk-ATW7BNIG.js";
15
- import {
16
- folderKind
17
- } from "./chunk-42DSA4EA.js";
18
18
 
19
19
  // src/init/run.ts
20
20
  import { existsSync as existsSync3 } from "fs";
@@ -885,4 +885,4 @@ export {
885
885
  initPrompt,
886
886
  runInit
887
887
  };
888
- //# sourceMappingURL=run-ML6GSPN4.js.map
888
+ //# sourceMappingURL=run-W4TK52WT.js.map
@@ -4,10 +4,10 @@ import {
4
4
  hasHidden,
5
5
  headerText,
6
6
  visible
7
- } from "./chunk-4JSUUDFQ.js";
7
+ } from "./chunk-VISKX36R.js";
8
8
  import {
9
9
  BUILTIN_COMMANDS
10
- } from "./chunk-23FXBNBB.js";
10
+ } from "./chunk-MNE7HHX2.js";
11
11
 
12
12
  // src/acp/server.ts
13
13
  import { randomUUID } from "crypto";
@@ -695,4 +695,4 @@ export {
695
695
  canRunTerminalAuth,
696
696
  setupNeeded
697
697
  };
698
- //# sourceMappingURL=server-VEYIJHEU.js.map
698
+ //# sourceMappingURL=server-ASM73QVY.js.map
@@ -1,4 +1,10 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ fetchCatalog,
4
+ loadCatalog,
5
+ mergedModels,
6
+ saveCatalog
7
+ } from "./chunk-JMH5W5DG.js";
2
8
  import {
3
9
  BUILTIN_PROVIDERS,
4
10
  KEY_NAME,
@@ -11,14 +17,9 @@ import {
11
17
  resolveModel,
12
18
  setDefaultModel,
13
19
  writeCredentials
14
- } from "./chunk-JRVWH27M.js";
15
- import {
16
- fetchCatalog,
17
- loadCatalog,
18
- mergedModels,
19
- saveCatalog
20
- } from "./chunk-U65DQZDB.js";
21
- import "./chunk-J4346IDH.js";
20
+ } from "./chunk-QLBCM2YQ.js";
21
+ import "./chunk-NH72AELP.js";
22
+ import "./chunk-7KBOIPUT.js";
22
23
  import "./chunk-ATW7BNIG.js";
23
24
  import "./chunk-BHZ6G65V.js";
24
25
 
@@ -332,4 +333,4 @@ export {
332
333
  setupCommand,
333
334
  terminalIO
334
335
  };
335
- //# sourceMappingURL=setupCommand-GBQIVYJC.js.map
336
+ //# sourceMappingURL=setupCommand-OSOMFHDQ.js.map
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ detectStack,
4
+ firstRunTour,
5
+ tourChoice,
6
+ tourPrompts,
7
+ tourText
8
+ } from "./chunk-Y62J7PTD.js";
9
+ import "./chunk-42DSA4EA.js";
10
+ import "./chunk-AOGFYUKG.js";
11
+ export {
12
+ detectStack,
13
+ firstRunTour,
14
+ tourChoice,
15
+ tourPrompts,
16
+ tourText
17
+ };
18
+ //# sourceMappingURL=tour-CEVMAC5S.js.map
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ ADDENDUM_MAX_CHARS,
4
+ PROPOSER_SYSTEM,
5
+ decide,
6
+ parseProposal,
7
+ proposerInput,
8
+ readAddendum,
9
+ rejectReason,
10
+ tune
11
+ } from "./chunk-IKPGHM54.js";
12
+ import "./chunk-DUYLVGPY.js";
13
+ import "./chunk-CWVXOSAA.js";
14
+ import "./chunk-H7LIBGZT.js";
15
+ import "./chunk-YAQ6QLKB.js";
16
+ import "./chunk-NXJ4XLB5.js";
17
+ import "./chunk-5UDYQ5MK.js";
18
+ import "./chunk-G2AX7MGS.js";
19
+ import "./chunk-ULAJPMY7.js";
20
+ import "./chunk-JMH5W5DG.js";
21
+ import "./chunk-NH72AELP.js";
22
+ import "./chunk-4QRTTRVK.js";
23
+ import "./chunk-A2QAIRQL.js";
24
+ import "./chunk-NLS7GMF7.js";
25
+ import "./chunk-7KBOIPUT.js";
26
+ import "./chunk-B25VL4RU.js";
27
+ import "./chunk-MNE7HHX2.js";
28
+ import "./chunk-IYGJWX65.js";
29
+ import "./chunk-5DEWP3YX.js";
30
+ import "./chunk-PZS3V6P3.js";
31
+ import "./chunk-QANRZW7W.js";
32
+ import "./chunk-ATW7BNIG.js";
33
+ import "./chunk-WK5NE6RY.js";
34
+ import "./chunk-AOGFYUKG.js";
35
+ import "./chunk-QXTHEFKP.js";
36
+ import "./chunk-LMKGSYJC.js";
37
+ import "./chunk-BHZ6G65V.js";
38
+ import "./chunk-P6XWWIEK.js";
39
+ import "./chunk-UIRJOQQS.js";
40
+ import "./chunk-4LFJFDCF.js";
41
+ import "./chunk-3NJNVZTK.js";
42
+ export {
43
+ ADDENDUM_MAX_CHARS,
44
+ PROPOSER_SYSTEM,
45
+ decide,
46
+ parseProposal,
47
+ proposerInput,
48
+ readAddendum,
49
+ rejectReason,
50
+ tune
51
+ };
52
+ //# sourceMappingURL=tune-VX2WQTHS.js.map
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ KEYS_HELP,
4
+ KEY_HINT_CHATS,
5
+ contextBar,
6
+ contextLevel,
7
+ countChat
8
+ } from "./chunk-L55VUSX3.js";
9
+ export {
10
+ KEYS_HELP,
11
+ KEY_HINT_CHATS,
12
+ contextBar,
13
+ contextLevel,
14
+ countChat
15
+ };
16
+ //# sourceMappingURL=uiState-YFJQ43D7.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@garuda-agent/garuda",
3
- "version": "0.17.0",
3
+ "version": "0.18.1",
4
4
  "description": "Garuda: a terminal coding agent with an OS sandbox, approvals and an audit log.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Madhusudhan Vasanth Kumar",
@@ -1,118 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // src/cli/approver.ts
4
- import { styleText } from "util";
5
- var TerminalApprover = class {
6
- /** Set by the CLI: it aborts the current turn. */
7
- onInterrupt = () => {
8
- };
9
- /** One question at a time (0.14.1, review): two prompts at once mixed their keys. */
10
- ask(request, signal) {
11
- const next = this.asking === 0 ? this.askNow(request, signal) : this.queue.then(() => this.askNow(request, signal));
12
- this.asking++;
13
- this.queue = next.catch(() => {
14
- }).finally(() => {
15
- this.asking--;
16
- });
17
- return next;
18
- }
19
- asking = 0;
20
- queue = Promise.resolve();
21
- async askNow(request, signal) {
22
- signal.throwIfAborted();
23
- const out = process.stderr;
24
- out.write(`
25
- ${header(request)}
26
- ${colorPreview(request)}
27
- `);
28
- if (!process.stdin.isTTY) {
29
- out.write("No terminal to ask for approval, so Garuda denies this call.\n");
30
- return "deny";
31
- }
32
- 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`);
33
- const { select } = await import("@inquirer/prompts");
34
- try {
35
- return await select(
36
- {
37
- message: request.question ?? "Allow?",
38
- choices: [
39
- { name: request.labels?.once ?? "Yes, once", value: "once" },
40
- { name: sessionLabel, value: "session" },
41
- { name: request.labels?.deny ?? "No, deny", value: "deny" }
42
- ].filter((c) => request.choices?.includes(c.value) ?? true)
43
- },
44
- { signal, output: out }
45
- );
46
- } catch (error) {
47
- if (error.name === "ExitPromptError") this.onInterrupt();
48
- throw error;
49
- }
50
- }
51
- };
52
- var SwitchApprover = class {
53
- constructor(current) {
54
- this.current = current;
55
- }
56
- current;
57
- /** Called before each question: the chat's notifier (0.6). */
58
- onAsk = () => {
59
- };
60
- ask(request, signal) {
61
- this.onAsk(request);
62
- return this.current.ask(request, signal);
63
- }
64
- };
65
- function visible(text) {
66
- return text.replace(/[\u0000-\u0008\u000b-\u001f]/g, (c) => String.fromCodePoint(9216 + c.charCodeAt(0))).replace(/\u007f/g, "\u2421").replace(
67
- /[\u0080-\u009f\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u2069\ufeff\u{e0000}-\u{e007f}]/gu,
68
- (c) => `[U+${(c.codePointAt(0) ?? 0).toString(16).toUpperCase().padStart(4, "0")}]`
69
- );
70
- }
71
- function hasHidden(text) {
72
- return visible(text) !== text;
73
- }
74
- var HIDDEN_WARNING = "! This holds hidden or control characters, shown as \u240D, \u241B or [U+\u2026]. Read it with care.";
75
- function headerText(request) {
76
- const { tool, target, isolation } = request;
77
- if (request.title !== void 0) return visible(request.title);
78
- if (target.kind === "command") {
79
- const where = isolation === "none" ? "on your machine, no sandbox" : target.outsideSandbox ? "OUTSIDE the sandbox: network on, writes anywhere" : `sandbox: ${isolation}`;
80
- return `${tool} wants to run a command (${where}):`;
81
- }
82
- if (target.kind === "input") return `${tool} wants to run with this input:`;
83
- if (target.kind === "url") return `${tool} wants to fetch from ${visible(target.host)}:`;
84
- return `${tool} wants to change ${visible(target.path)}:`;
85
- }
86
- function header(request) {
87
- return styleText("bold", headerText(request));
88
- }
89
- function colorPreview({ target, preview }) {
90
- const warning = hasHidden(preview) ? `
91
- ${styleText("yellow", ` ${HIDDEN_WARNING}`)}` : "";
92
- if (target.kind === "command") return `${styleText("cyan", ` $ ${visible(preview)}`)}${warning}`;
93
- if (target.kind === "url") return `${visible(preview)}${warning}`;
94
- return `${colorDiff(visible(preview))}${warning}`;
95
- }
96
- function colorDiff(text) {
97
- return text.split("\n").map((line) => {
98
- if (line.startsWith("+++") || line.startsWith("---") || line.startsWith("diff --git"))
99
- return styleText("bold", line);
100
- if (line.startsWith("+")) return styleText("green", line);
101
- if (line.startsWith("-")) return styleText("red", line);
102
- if (line.startsWith("@@")) return styleText("cyan", line);
103
- return line;
104
- }).join("\n");
105
- }
106
-
107
- export {
108
- TerminalApprover,
109
- SwitchApprover,
110
- visible,
111
- hasHidden,
112
- HIDDEN_WARNING,
113
- headerText,
114
- header,
115
- colorPreview,
116
- colorDiff
117
- };
118
- //# sourceMappingURL=chunk-4JSUUDFQ.js.map
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // src/version.ts
4
- var VERSION = "0.17.0";
5
-
6
- export {
7
- VERSION
8
- };
9
- //# sourceMappingURL=chunk-BSK5T2ZG.js.map