@garuda-agent/garuda 0.0.1 → 0.14.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 (61) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +4 -0
  4. package/README.md +1040 -0
  5. package/SECURITY.md +32 -0
  6. package/dist/anthropic-NQDBCHJU.js +327 -0
  7. package/dist/chunk-35GMLLJW.js +157 -0
  8. package/dist/chunk-36GQIVGT.js +526 -0
  9. package/dist/chunk-3CEPHS4C.js +231 -0
  10. package/dist/chunk-3NJNVZTK.js +123 -0
  11. package/dist/chunk-42DSA4EA.js +116 -0
  12. package/dist/chunk-4P26OKTP.js +100 -0
  13. package/dist/chunk-5DEWP3YX.js +139 -0
  14. package/dist/chunk-6TWBYMY7.js +9 -0
  15. package/dist/chunk-A2QAIRQL.js +45 -0
  16. package/dist/chunk-ATW7BNIG.js +31 -0
  17. package/dist/chunk-D5O5CIWK.js +1339 -0
  18. package/dist/chunk-EU7PA45O.js +324 -0
  19. package/dist/chunk-FARS4R67.js +206 -0
  20. package/dist/chunk-G2AX7MGS.js +36 -0
  21. package/dist/chunk-HUIK3WXO.js +234 -0
  22. package/dist/chunk-ITITLNAR.js +9341 -0
  23. package/dist/chunk-KKB5W47S.js +231 -0
  24. package/dist/chunk-KWRJREUH.js +283 -0
  25. package/dist/chunk-N4I6YS3E.js +73 -0
  26. package/dist/chunk-OUCV3FCT.js +205 -0
  27. package/dist/chunk-PZS3V6P3.js +46 -0
  28. package/dist/chunk-QOW5TK4L.js +320 -0
  29. package/dist/chunk-U4OQVT2T.js +73 -0
  30. package/dist/chunk-V7WPGQLB.js +207 -0
  31. package/dist/chunk-W7BPYQMW.js +173 -0
  32. package/dist/chunk-WMOLXTBU.js +61 -0
  33. package/dist/chunk-YIZWYUBG.js +138 -0
  34. package/dist/chunk-YM6T4J5V.js +1350 -0
  35. package/dist/chunk-YQTGMCU6.js +111 -0
  36. package/dist/chunk-ZAE25JM2.js +158 -0
  37. package/dist/chunk-ZGZ2ZADL.js +49 -0
  38. package/dist/cli/index.js +1191 -0
  39. package/dist/create-Y5SXJUXO.js +223 -0
  40. package/dist/deadline-F5RJJ2QW.js +86 -0
  41. package/dist/detect-LARDSLLZ.js +10 -0
  42. package/dist/evalCommand-5TG2CKZY.js +2795 -0
  43. package/dist/export-HN3CT7AV.js +158 -0
  44. package/dist/inkChat-3J26R24L.js +1190 -0
  45. package/dist/install-XWLU22OH.js +17 -0
  46. package/dist/job-3NYDMP2M.js +31 -0
  47. package/dist/jobCommand-IYWZWTSI.js +30 -0
  48. package/dist/launchd-2FL5UN2U.js +40 -0
  49. package/dist/lspCommand-TJEZBV2E.js +99 -0
  50. package/dist/manager-4PMSXT47.js +14 -0
  51. package/dist/manager-EBTYO2GR.js +847 -0
  52. package/dist/nightCommand-DUNWJASI.js +247 -0
  53. package/dist/oauth-W6OK6XXO.js +23 -0
  54. package/dist/openaiCompatible-CJWVJP5M.js +501 -0
  55. package/dist/policy-EJPLEEXP.js +31 -0
  56. package/dist/proxy-XJAHCZB2.js +192 -0
  57. package/dist/remove-AENULZZE.js +59 -0
  58. package/dist/run-66Y6R2KU.js +886 -0
  59. package/dist/servers-6YDGWOZ6.js +24 -0
  60. package/dist/text-J2GD647J.js +11 -0
  61. package/package.json +83 -3
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ INSTALL_TIMEOUT_MS,
4
+ installCommand,
5
+ installServer
6
+ } from "./chunk-U4OQVT2T.js";
7
+ import "./chunk-EU7PA45O.js";
8
+ import "./chunk-D5O5CIWK.js";
9
+ import "./chunk-WMOLXTBU.js";
10
+ import "./chunk-HUIK3WXO.js";
11
+ import "./chunk-3NJNVZTK.js";
12
+ export {
13
+ INSTALL_TIMEOUT_MS,
14
+ installCommand,
15
+ installServer
16
+ };
17
+ //# sourceMappingURL=install-XWLU22OH.js.map
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ DEFAULT_JOB_MAX_STEPS,
4
+ JOBS_DIR,
5
+ JOB_STATUSES,
6
+ failJobSync,
7
+ jobPath,
8
+ listJobs,
9
+ loadJob,
10
+ newJobId,
11
+ planPermissions,
12
+ planTitle,
13
+ saveJob,
14
+ settleJob
15
+ } from "./chunk-KKB5W47S.js";
16
+ import "./chunk-3NJNVZTK.js";
17
+ export {
18
+ DEFAULT_JOB_MAX_STEPS,
19
+ JOBS_DIR,
20
+ JOB_STATUSES,
21
+ failJobSync,
22
+ jobPath,
23
+ listJobs,
24
+ loadJob,
25
+ newJobId,
26
+ planPermissions,
27
+ planTitle,
28
+ saveJob,
29
+ settleJob
30
+ };
31
+ //# sourceMappingURL=job-3NYDMP2M.js.map
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ JOB_TEST_TIMEOUT_MS,
4
+ finishJob,
5
+ msUntil,
6
+ prepareJob,
7
+ testsBefore
8
+ } from "./chunk-QOW5TK4L.js";
9
+ import "./chunk-N4I6YS3E.js";
10
+ import "./chunk-W7BPYQMW.js";
11
+ import "./chunk-5DEWP3YX.js";
12
+ import "./chunk-PZS3V6P3.js";
13
+ import "./chunk-YIZWYUBG.js";
14
+ import "./chunk-35GMLLJW.js";
15
+ import "./chunk-YQTGMCU6.js";
16
+ import "./chunk-OUCV3FCT.js";
17
+ import "./chunk-ZGZ2ZADL.js";
18
+ import "./chunk-D5O5CIWK.js";
19
+ import "./chunk-WMOLXTBU.js";
20
+ import "./chunk-HUIK3WXO.js";
21
+ import "./chunk-KKB5W47S.js";
22
+ import "./chunk-3NJNVZTK.js";
23
+ export {
24
+ JOB_TEST_TIMEOUT_MS,
25
+ finishJob,
26
+ msUntil,
27
+ prepareJob,
28
+ testsBefore
29
+ };
30
+ //# sourceMappingURL=jobCommand-IYWZWTSI.js.map
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ agentLabel,
4
+ agentPath,
5
+ agentPlist,
6
+ defaultAgentEnv,
7
+ installAgent,
8
+ installSpec,
9
+ jobSpec,
10
+ nextTime,
11
+ nightAgentTime,
12
+ nightSpec,
13
+ removeAgent,
14
+ removeSpec,
15
+ specPath,
16
+ specPlist
17
+ } from "./chunk-35GMLLJW.js";
18
+ import "./chunk-ZGZ2ZADL.js";
19
+ import "./chunk-D5O5CIWK.js";
20
+ import "./chunk-WMOLXTBU.js";
21
+ import "./chunk-HUIK3WXO.js";
22
+ import "./chunk-KKB5W47S.js";
23
+ import "./chunk-3NJNVZTK.js";
24
+ export {
25
+ agentLabel,
26
+ agentPath,
27
+ agentPlist,
28
+ defaultAgentEnv,
29
+ installAgent,
30
+ installSpec,
31
+ jobSpec,
32
+ nextTime,
33
+ nightAgentTime,
34
+ nightSpec,
35
+ removeAgent,
36
+ removeSpec,
37
+ specPath,
38
+ specPlist
39
+ };
40
+ //# sourceMappingURL=launchd-2FL5UN2U.js.map
@@ -0,0 +1,99 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ LspManager,
4
+ lspStatusText
5
+ } from "./chunk-36GQIVGT.js";
6
+ import {
7
+ installServer
8
+ } from "./chunk-U4OQVT2T.js";
9
+ import {
10
+ LSP_CONFIG_FILE,
11
+ loadLspConfig
12
+ } from "./chunk-G2AX7MGS.js";
13
+ import {
14
+ LSP_LANGUAGES
15
+ } from "./chunk-EU7PA45O.js";
16
+ import "./chunk-PZS3V6P3.js";
17
+ import {
18
+ HostExecutor,
19
+ createExecutor,
20
+ loadSettings
21
+ } from "./chunk-D5O5CIWK.js";
22
+ import "./chunk-WMOLXTBU.js";
23
+ import "./chunk-HUIK3WXO.js";
24
+ import "./chunk-3NJNVZTK.js";
25
+
26
+ // src/cli/lspCommand.ts
27
+ import { realpathSync } from "fs";
28
+ import { homedir } from "os";
29
+ import { join } from "path";
30
+ async function lspStatusCommand() {
31
+ const root = realpathSync(process.cwd());
32
+ let enabled = false;
33
+ let executorName = "auto";
34
+ try {
35
+ const settings = await loadSettings(root);
36
+ enabled = settings.lsp?.enabled === true;
37
+ executorName = settings.executor;
38
+ } catch (error) {
39
+ process.stderr.write(`${error.message}
40
+ `);
41
+ }
42
+ const { executor } = createExecutor(executorName);
43
+ const manager = new LspManager({ root, executor, policy: unused });
44
+ const how = 'Turn them on with garuda --lsp, or "lsp": { "enabled": true } in .garuda/settings.json.';
45
+ const lines = [lspStatusText(manager.status(), { on: enabled, how })];
46
+ if (executor.isolation === "none") {
47
+ lines.push("No OS sandbox here: language servers run only in the sandbox, so they stay off.");
48
+ }
49
+ try {
50
+ const config = await loadLspConfig();
51
+ lines.push(
52
+ config.autoInstall ? `autoInstall is on (~/${LSP_CONFIG_FILE}): Garuda asks to install a missing server.` : `To be asked to install a missing server, put { "autoInstall": true } in ~/${LSP_CONFIG_FILE}.`
53
+ );
54
+ } catch (error) {
55
+ lines.push(error.message);
56
+ }
57
+ process.stdout.write(`${lines.join("\n")}
58
+ `);
59
+ return 0;
60
+ }
61
+ async function lspInstallCommand(language) {
62
+ if (!LSP_LANGUAGES.includes(language)) {
63
+ process.stderr.write(`Unknown language ${language}. Use: ${LSP_LANGUAGES.join(", ")}.
64
+ `);
65
+ return 1;
66
+ }
67
+ const lang = language;
68
+ const controller = new AbortController();
69
+ const stop = () => controller.abort(new Error("stopped by the user"));
70
+ process.once("SIGINT", stop);
71
+ try {
72
+ process.stderr.write(`Installing into ${join(homedir(), ".garuda", "lsp", lang)} \u2026
73
+ `);
74
+ const result = await installServer(lang, {
75
+ executor: new HostExecutor(),
76
+ signal: controller.signal
77
+ });
78
+ if (!result.ok) {
79
+ process.stderr.write(`The install failed.
80
+ $ ${result.command}
81
+ ${result.output ?? ""}
82
+ `);
83
+ return 1;
84
+ }
85
+ process.stdout.write(`Installed. Check it with: garuda lsp
86
+ `);
87
+ return 0;
88
+ } finally {
89
+ process.off("SIGINT", stop);
90
+ }
91
+ }
92
+ function unused() {
93
+ throw new Error("The status starts no server.");
94
+ }
95
+ export {
96
+ lspInstallCommand,
97
+ lspStatusCommand
98
+ };
99
+ //# sourceMappingURL=lspCommand-TJEZBV2E.js.map
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ LANGUAGE_LABELS,
4
+ LspManager,
5
+ lspStatusText
6
+ } from "./chunk-36GQIVGT.js";
7
+ import "./chunk-EU7PA45O.js";
8
+ import "./chunk-PZS3V6P3.js";
9
+ export {
10
+ LANGUAGE_LABELS,
11
+ LspManager,
12
+ lspStatusText
13
+ };
14
+ //# sourceMappingURL=manager-4PMSXT47.js.map