@garuda-agent/garuda 0.0.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.
- package/CHANGELOG.md +77 -0
- package/LICENSE +202 -0
- package/NOTICE +4 -0
- package/README.md +1097 -0
- package/SECURITY.md +32 -0
- package/dist/acpCommand-FZ2P5JFO.js +153 -0
- package/dist/anthropic-NQDBCHJU.js +327 -0
- package/dist/chunk-23FXBNBB.js +46 -0
- package/dist/chunk-2S62ZNTC.js +320 -0
- package/dist/chunk-2TAXSFWN.js +49 -0
- package/dist/chunk-36GQIVGT.js +526 -0
- package/dist/chunk-3CEPHS4C.js +231 -0
- package/dist/chunk-3NJNVZTK.js +123 -0
- package/dist/chunk-42DSA4EA.js +116 -0
- package/dist/chunk-4JSUUDFQ.js +118 -0
- package/dist/chunk-4P26OKTP.js +100 -0
- package/dist/chunk-5DEWP3YX.js +139 -0
- package/dist/chunk-A2QAIRQL.js +45 -0
- package/dist/chunk-ATW7BNIG.js +31 -0
- package/dist/chunk-B25VL4RU.js +242 -0
- package/dist/chunk-EPKWDCV4.js +9 -0
- package/dist/chunk-EU7PA45O.js +324 -0
- package/dist/chunk-FARS4R67.js +206 -0
- package/dist/chunk-G2AX7MGS.js +36 -0
- package/dist/chunk-HRGX53VC.js +173 -0
- package/dist/chunk-HUIK3WXO.js +234 -0
- package/dist/chunk-INRZR772.js +73 -0
- package/dist/chunk-K3SIUOAG.js +138 -0
- package/dist/chunk-K7KK7U44.js +9358 -0
- package/dist/chunk-KKB5W47S.js +231 -0
- package/dist/chunk-N4I6YS3E.js +73 -0
- package/dist/chunk-NXJ4XLB5.js +19 -0
- package/dist/chunk-OUCV3FCT.js +205 -0
- package/dist/chunk-PQNT34LY.js +1247 -0
- package/dist/chunk-PZS3V6P3.js +46 -0
- package/dist/chunk-S77XDSD4.js +157 -0
- package/dist/chunk-SI2QJYCR.js +1341 -0
- package/dist/chunk-WMOLXTBU.js +61 -0
- package/dist/chunk-YFQJXRIJ.js +193 -0
- package/dist/chunk-YQTGMCU6.js +111 -0
- package/dist/chunk-ZAE25JM2.js +158 -0
- package/dist/cli/index.js +1203 -0
- package/dist/create-N4I7TIZE.js +223 -0
- package/dist/deadline-F5RJJ2QW.js +86 -0
- package/dist/detect-LARDSLLZ.js +10 -0
- package/dist/evalCommand-3SSFMZQD.js +2798 -0
- package/dist/export-HN3CT7AV.js +158 -0
- package/dist/inkChat-34BTFG2K.js +1193 -0
- package/dist/install-VRPBZY5H.js +17 -0
- package/dist/job-3NYDMP2M.js +31 -0
- package/dist/jobCommand-XJ5GULS5.js +30 -0
- package/dist/launchd-QVHQ3VNN.js +40 -0
- package/dist/lspCommand-XNTBHXLA.js +99 -0
- package/dist/manager-4PMSXT47.js +14 -0
- package/dist/manager-CSI76AWF.js +847 -0
- package/dist/nightCommand-CR6ZHYGP.js +247 -0
- package/dist/oauth-W6OK6XXO.js +23 -0
- package/dist/openaiCompatible-CJWVJP5M.js +501 -0
- package/dist/policy-EJPLEEXP.js +31 -0
- package/dist/proxy-XJAHCZB2.js +192 -0
- package/dist/remove-LE7Q7K46.js +59 -0
- package/dist/run-ML6GSPN4.js +888 -0
- package/dist/server-R3GNIC33.js +676 -0
- package/dist/servers-6YDGWOZ6.js +24 -0
- package/dist/text-J2GD647J.js +11 -0
- package/package.json +84 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
INSTALL_TIMEOUT_MS,
|
|
4
|
+
installCommand,
|
|
5
|
+
installServer
|
|
6
|
+
} from "./chunk-INRZR772.js";
|
|
7
|
+
import "./chunk-EU7PA45O.js";
|
|
8
|
+
import "./chunk-SI2QJYCR.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-VRPBZY5H.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-2S62ZNTC.js";
|
|
9
|
+
import "./chunk-N4I6YS3E.js";
|
|
10
|
+
import "./chunk-HRGX53VC.js";
|
|
11
|
+
import "./chunk-5DEWP3YX.js";
|
|
12
|
+
import "./chunk-PZS3V6P3.js";
|
|
13
|
+
import "./chunk-K3SIUOAG.js";
|
|
14
|
+
import "./chunk-S77XDSD4.js";
|
|
15
|
+
import "./chunk-YQTGMCU6.js";
|
|
16
|
+
import "./chunk-OUCV3FCT.js";
|
|
17
|
+
import "./chunk-2TAXSFWN.js";
|
|
18
|
+
import "./chunk-SI2QJYCR.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-XJ5GULS5.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-S77XDSD4.js";
|
|
18
|
+
import "./chunk-2TAXSFWN.js";
|
|
19
|
+
import "./chunk-SI2QJYCR.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-QVHQ3VNN.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-INRZR772.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-SI2QJYCR.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-XNTBHXLA.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
|