@moxt-ai/mobius 0.0.16 → 0.0.18

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 (87) hide show
  1. package/dist/acp/session-config/grok-build-session-config.d.ts +10 -0
  2. package/dist/acp/session-config/grok-build-session-config.d.ts.map +1 -0
  3. package/dist/acp/session-config/grok-build-session-config.js +202 -0
  4. package/dist/acp/session-config/grok-build-session-config.js.map +1 -0
  5. package/dist/acp/session-config/session-config-protocol.d.ts +32 -0
  6. package/dist/acp/session-config/session-config-protocol.d.ts.map +1 -0
  7. package/dist/acp/session-config/session-config-protocol.js +237 -0
  8. package/dist/acp/session-config/session-config-protocol.js.map +1 -0
  9. package/dist/acp/session-config/session-config-registry.d.ts +3 -0
  10. package/dist/acp/session-config/session-config-registry.d.ts.map +1 -0
  11. package/dist/acp/session-config/session-config-registry.js +8 -0
  12. package/dist/acp/session-config/session-config-registry.js.map +1 -0
  13. package/dist/acp/session-manager.d.ts.map +1 -1
  14. package/dist/acp/session-manager.js +29 -155
  15. package/dist/acp/session-manager.js.map +1 -1
  16. package/dist/agent-catalog/agent-discovery.d.ts +19 -9
  17. package/dist/agent-catalog/agent-discovery.d.ts.map +1 -1
  18. package/dist/agent-catalog/agent-discovery.js +32 -16
  19. package/dist/agent-catalog/agent-discovery.js.map +1 -1
  20. package/dist/agent-catalog/agent-specification.d.ts +0 -1
  21. package/dist/agent-catalog/agent-specification.d.ts.map +1 -1
  22. package/dist/agent-catalog/agent-specification.js +0 -2
  23. package/dist/agent-catalog/agent-specification.js.map +1 -1
  24. package/dist/agent-catalog/agents/cursor-cli-agent.d.ts +0 -1
  25. package/dist/agent-catalog/agents/cursor-cli-agent.d.ts.map +1 -1
  26. package/dist/agent-catalog/agents/cursor-cli-agent.js +0 -1
  27. package/dist/agent-catalog/agents/cursor-cli-agent.js.map +1 -1
  28. package/dist/agent-catalog/discover-agent.d.ts.map +1 -1
  29. package/dist/agent-catalog/discover-agent.js +30 -21
  30. package/dist/agent-catalog/discover-agent.js.map +1 -1
  31. package/dist/agent-catalog/discover-local-agents.d.ts +0 -1
  32. package/dist/agent-catalog/discover-local-agents.d.ts.map +1 -1
  33. package/dist/agent-catalog/discover-local-agents.js +1 -1
  34. package/dist/agent-catalog/discover-local-agents.js.map +1 -1
  35. package/dist/agent-catalog/local-agent.d.ts +12 -1
  36. package/dist/agent-catalog/local-agent.d.ts.map +1 -1
  37. package/dist/agent-catalog/local-agent.js +16 -0
  38. package/dist/agent-catalog/local-agent.js.map +1 -1
  39. package/dist/agent-catalog/publish-agent-catalog.d.ts.map +1 -1
  40. package/dist/agent-catalog/publish-agent-catalog.js +3 -4
  41. package/dist/agent-catalog/publish-agent-catalog.js.map +1 -1
  42. package/dist/agent-installation/agent-installation-manager.d.ts.map +1 -1
  43. package/dist/agent-installation/agent-installation-manager.js +6 -7
  44. package/dist/agent-installation/agent-installation-manager.js.map +1 -1
  45. package/dist/agent-installation/fixed-installation-executor.d.ts +2 -3
  46. package/dist/agent-installation/fixed-installation-executor.d.ts.map +1 -1
  47. package/dist/agent-installation/fixed-installation-executor.js +47 -67
  48. package/dist/agent-installation/fixed-installation-executor.js.map +1 -1
  49. package/dist/agent-installation/managed-agent-archive.d.ts +2 -5
  50. package/dist/agent-installation/managed-agent-archive.d.ts.map +1 -1
  51. package/dist/agent-installation/managed-agent-archive.js +1 -1
  52. package/dist/agent-installation/managed-agent-archive.js.map +1 -1
  53. package/dist/agent-installation/verified-download.d.ts +0 -4
  54. package/dist/agent-installation/verified-download.d.ts.map +1 -1
  55. package/dist/agent-installation/verified-download.js +1 -1
  56. package/dist/agent-installation/verified-download.js.map +1 -1
  57. package/dist/cli.js +1128 -1782
  58. package/dist/cli.js.map +4 -4
  59. package/dist/index.js +1129 -1783
  60. package/dist/index.js.map +4 -4
  61. package/dist/pairing/pair-local-machine.d.ts.map +1 -1
  62. package/dist/pairing/pair-local-machine.js +4 -5
  63. package/dist/pairing/pair-local-machine.js.map +1 -1
  64. package/dist/run-daemon.d.ts.map +1 -1
  65. package/dist/run-daemon.js +162 -57
  66. package/dist/run-daemon.js.map +1 -1
  67. package/package.json +1 -1
  68. package/dist/agent-installation/automatic-adapter-provisioner.d.ts +0 -19
  69. package/dist/agent-installation/automatic-adapter-provisioner.d.ts.map +0 -1
  70. package/dist/agent-installation/automatic-adapter-provisioner.js +0 -125
  71. package/dist/agent-installation/automatic-adapter-provisioner.js.map +0 -1
  72. package/dist/agent-installation/fixed-agent-install-recipe.d.ts +0 -20
  73. package/dist/agent-installation/fixed-agent-install-recipe.d.ts.map +0 -1
  74. package/dist/agent-installation/fixed-agent-install-recipe.js +0 -18
  75. package/dist/agent-installation/fixed-agent-install-recipe.js.map +0 -1
  76. package/dist/agent-installation/fixed-agent-install-recipes.d.ts +0 -26
  77. package/dist/agent-installation/fixed-agent-install-recipes.d.ts.map +0 -1
  78. package/dist/agent-installation/fixed-agent-install-recipes.js +0 -301
  79. package/dist/agent-installation/fixed-agent-install-recipes.js.map +0 -1
  80. package/dist/agent-installation/grok-build-install-recipe.d.ts +0 -12
  81. package/dist/agent-installation/grok-build-install-recipe.d.ts.map +0 -1
  82. package/dist/agent-installation/grok-build-install-recipe.js +0 -102
  83. package/dist/agent-installation/grok-build-install-recipe.js.map +0 -1
  84. package/dist/agent-installation/workbuddy-install-recipe.d.ts +0 -12
  85. package/dist/agent-installation/workbuddy-install-recipe.d.ts.map +0 -1
  86. package/dist/agent-installation/workbuddy-install-recipe.js +0 -51
  87. package/dist/agent-installation/workbuddy-install-recipe.js.map +0 -1
@@ -1,301 +0,0 @@
1
- import { mkdir, mkdtemp, rm } from "node:fs/promises";
2
- import { join } from "node:path";
3
- import { runBoundedProcess, } from "../process/executable.js";
4
- import { InstallationManagerError } from "./agent-installation-manager.js";
5
- import { DEEPSEEK_HARNESS_PACKAGE } from "./deepseek-managed-package.js";
6
- import { FixedAgentInstallRecipe, } from "./fixed-agent-install-recipe.js";
7
- import { GrokBuildInstallRecipe } from "./grok-build-install-recipe.js";
8
- import { ManagedAgentArchiveError, ManagedAgentArchiveInstaller, } from "./managed-agent-archive.js";
9
- import { ManagedNpmPackageError, ManagedNpmPackageInstaller, } from "./managed-npm-package.js";
10
- import { OPENCODE_MANAGED_VERSION, openCodeManagedArchive, } from "./opencode-managed-release.js";
11
- import { PI_AGENT_PACKAGE } from "./pi-managed-packages.js";
12
- import { downloadVerifiedFile } from "./verified-download.js";
13
- import { WorkBuddyInstallRecipe } from "./workbuddy-install-recipe.js";
14
- const INSTALLER_DOWNLOAD_LIMIT_BYTES = 1024 * 1024;
15
- const INSTALLER_DOWNLOAD_TIMEOUT_MILLISECONDS = 60_000;
16
- const AGENT_INSTALL_TIMEOUT_MILLISECONDS = 5 * 60 * 1_000;
17
- const MINIMAL_PATH = "/usr/bin:/bin";
18
- class CodexInstallRecipe extends FixedAgentInstallRecipe {
19
- id = "codex";
20
- label = "Codex";
21
- releaseChannel = "latest";
22
- install = async (options) => {
23
- this.assertSupportedPlatform();
24
- const root = join(options.stateDirectory, "agents", this.id);
25
- const temporaryRoot = join(options.stateDirectory, "temporary");
26
- await Promise.all([
27
- mkdir(root, { mode: 0o700, recursive: true }),
28
- mkdir(temporaryRoot, { mode: 0o700, recursive: true }),
29
- ]);
30
- const temporaryDirectory = await mkdtemp(join(temporaryRoot, ".codex-install-"));
31
- const installerPath = join(temporaryDirectory, "install.sh");
32
- const installDirectory = join(root, "bin");
33
- const codexHome = join(root, "home");
34
- try {
35
- await Promise.all([
36
- mkdir(installDirectory, { mode: 0o700, recursive: true }),
37
- mkdir(codexHome, { mode: 0o700, recursive: true }),
38
- ]);
39
- await options.report("downloading");
40
- const download = await downloadVerifiedFile({
41
- allowedHosts: new Set(["chatgpt.com", "releases.openai.com"]),
42
- destination: installerPath,
43
- maximumBytes: INSTALLER_DOWNLOAD_LIMIT_BYTES,
44
- signal: options.signal,
45
- timeoutMilliseconds: INSTALLER_DOWNLOAD_TIMEOUT_MILLISECONDS,
46
- url: new URL("https://chatgpt.com/codex/install.sh"),
47
- });
48
- options.audit.record("agent_installer_download_verified", options.requestId, this.id, {
49
- bytes: download.bytes.toString(),
50
- releaseChannel: this.releaseChannel,
51
- sha256: download.sha256,
52
- });
53
- await options.report("verifying");
54
- await options.report("installing_agent");
55
- await runBoundedProcess({
56
- arguments: [installerPath],
57
- command: "/bin/sh",
58
- cwd: temporaryDirectory,
59
- environment: {
60
- CODEX_HOME: codexHome,
61
- CODEX_INSTALL_DIR: installDirectory,
62
- CODEX_NON_INTERACTIVE: "1",
63
- CODEX_RELEASE: this.releaseChannel,
64
- HOME: codexHome,
65
- PATH: MINIMAL_PATH,
66
- },
67
- outputLimitBytes: 64 * 1024,
68
- signal: options.signal,
69
- timeoutMilliseconds: AGENT_INSTALL_TIMEOUT_MILLISECONDS,
70
- });
71
- return await this.requireInstalledExecutable(join(installDirectory, "codex"));
72
- }
73
- catch (error) {
74
- if (options.signal.aborted) {
75
- options.signal.throwIfAborted();
76
- }
77
- if (error instanceof InstallationManagerError ||
78
- (error instanceof Error && "code" in error)) {
79
- throw error;
80
- }
81
- throw new InstallationManagerError("agent_install_failed", "The fixed Codex installation recipe failed");
82
- }
83
- finally {
84
- await rm(temporaryDirectory, { force: true, recursive: true });
85
- }
86
- };
87
- }
88
- class ClaudeCodeInstallRecipe extends FixedAgentInstallRecipe {
89
- id = "claude";
90
- label = "Claude Code";
91
- releaseChannel = "stable";
92
- install = async (options) => {
93
- this.assertSupportedPlatform();
94
- const root = join(options.stateDirectory, "agents", this.id);
95
- const managedHome = join(root, "home");
96
- const temporaryRoot = join(options.stateDirectory, "temporary");
97
- await Promise.all([
98
- mkdir(managedHome, { mode: 0o700, recursive: true }),
99
- mkdir(temporaryRoot, { mode: 0o700, recursive: true }),
100
- ]);
101
- const temporaryDirectory = await mkdtemp(join(temporaryRoot, ".claude-install-"));
102
- const installerPath = join(temporaryDirectory, "install.sh");
103
- try {
104
- await options.report("downloading");
105
- const download = await downloadVerifiedFile({
106
- allowedHosts: new Set(["claude.ai"]),
107
- destination: installerPath,
108
- maximumBytes: INSTALLER_DOWNLOAD_LIMIT_BYTES,
109
- signal: options.signal,
110
- timeoutMilliseconds: INSTALLER_DOWNLOAD_TIMEOUT_MILLISECONDS,
111
- url: new URL("https://claude.ai/install.sh"),
112
- });
113
- options.audit.record("agent_installer_download_verified", options.requestId, this.id, {
114
- bytes: download.bytes.toString(),
115
- releaseChannel: this.releaseChannel,
116
- sha256: download.sha256,
117
- });
118
- await options.report("verifying");
119
- await options.report("installing_agent");
120
- await runBoundedProcess({
121
- arguments: [installerPath, "stable"],
122
- command: "/bin/bash",
123
- cwd: temporaryDirectory,
124
- environment: {
125
- HOME: managedHome,
126
- PATH: MINIMAL_PATH,
127
- SHELL: "/bin/bash",
128
- },
129
- outputLimitBytes: 64 * 1024,
130
- signal: options.signal,
131
- timeoutMilliseconds: AGENT_INSTALL_TIMEOUT_MILLISECONDS,
132
- });
133
- return await this.requireInstalledExecutable(join(managedHome, ".local", "bin", "claude"));
134
- }
135
- catch (error) {
136
- if (options.signal.aborted) {
137
- options.signal.throwIfAborted();
138
- }
139
- if (error instanceof InstallationManagerError ||
140
- (error instanceof Error && "code" in error)) {
141
- throw error;
142
- }
143
- throw new InstallationManagerError("agent_install_failed", "The fixed Claude Code installation recipe failed");
144
- }
145
- finally {
146
- await rm(temporaryDirectory, { force: true, recursive: true });
147
- }
148
- };
149
- }
150
- class PiInstallRecipe extends FixedAgentInstallRecipe {
151
- #npmInstaller;
152
- id = "pi";
153
- label = "Pi";
154
- releaseChannel = PI_AGENT_PACKAGE.version;
155
- constructor(npmInstaller = new ManagedNpmPackageInstaller()) {
156
- super();
157
- this.#npmInstaller = npmInstaller;
158
- }
159
- install = async (options) => {
160
- this.assertSupportedPlatform();
161
- try {
162
- await options.report("downloading");
163
- await options.report("verifying");
164
- await options.report("installing_agent");
165
- const executable = await this.#npmInstaller.install(join(options.stateDirectory, "agents", this.id, PI_AGENT_PACKAGE.version), PI_AGENT_PACKAGE, options.environment, options.signal);
166
- options.audit.record("agent_npm_package_verified", options.requestId, this.id, {
167
- integrity: PI_AGENT_PACKAGE.integrity,
168
- package: PI_AGENT_PACKAGE.packageName,
169
- version: PI_AGENT_PACKAGE.version,
170
- });
171
- return executable;
172
- }
173
- catch (error) {
174
- if (options.signal.aborted) {
175
- options.signal.throwIfAborted();
176
- }
177
- if (error instanceof ManagedNpmPackageError) {
178
- if (error.code === "managed_package_verification_failed") {
179
- throw new InstallationManagerError("agent_verification_failed", "The managed Pi package did not match its pinned artifact", { cause: error });
180
- }
181
- if (error.code === "managed_package_publish_failed") {
182
- throw new InstallationManagerError("agent_publish_failed", "The managed Pi package could not be published", { cause: error });
183
- }
184
- throw new InstallationManagerError(error.code, error.message, {
185
- cause: error,
186
- });
187
- }
188
- if (error instanceof InstallationManagerError) {
189
- throw error;
190
- }
191
- throw new InstallationManagerError("agent_install_failed", "The fixed Pi installation recipe failed", { cause: error });
192
- }
193
- };
194
- }
195
- export class DeepSeekHarnessInstallRecipe extends FixedAgentInstallRecipe {
196
- #npmInstaller;
197
- id = "deepseek-harness";
198
- label = "DeepSeek Harness";
199
- releaseChannel = DEEPSEEK_HARNESS_PACKAGE.version;
200
- constructor(npmInstaller = new ManagedNpmPackageInstaller()) {
201
- super();
202
- this.#npmInstaller = npmInstaller;
203
- }
204
- install = async (options) => {
205
- this.assertSupportedPlatform();
206
- try {
207
- const managedHome = join(options.stateDirectory, "agents", this.id, "home");
208
- await mkdir(managedHome, { mode: 0o700, recursive: true });
209
- await options.report("downloading");
210
- await options.report("verifying");
211
- await options.report("installing_agent");
212
- const executable = await this.#npmInstaller.install(join(options.stateDirectory, "agents", this.id, DEEPSEEK_HARNESS_PACKAGE.version), DEEPSEEK_HARNESS_PACKAGE, options.environment, options.signal);
213
- options.audit.record("agent_npm_package_verified", options.requestId, this.id, {
214
- integrity: DEEPSEEK_HARNESS_PACKAGE.integrity,
215
- package: DEEPSEEK_HARNESS_PACKAGE.packageName,
216
- version: DEEPSEEK_HARNESS_PACKAGE.version,
217
- });
218
- return executable;
219
- }
220
- catch (error) {
221
- if (options.signal.aborted) {
222
- options.signal.throwIfAborted();
223
- }
224
- if (error instanceof ManagedNpmPackageError) {
225
- if (error.code === "managed_package_verification_failed") {
226
- throw new InstallationManagerError("agent_verification_failed", "The managed DeepSeek Harness package did not match its pinned artifact", { cause: error });
227
- }
228
- if (error.code === "managed_package_publish_failed") {
229
- throw new InstallationManagerError("agent_publish_failed", "The managed DeepSeek Harness package could not be published", { cause: error });
230
- }
231
- throw new InstallationManagerError(error.code, error.message, {
232
- cause: error,
233
- });
234
- }
235
- if (error instanceof InstallationManagerError) {
236
- throw error;
237
- }
238
- throw new InstallationManagerError("agent_install_failed", "The fixed DeepSeek Harness installation recipe failed", { cause: error });
239
- }
240
- };
241
- }
242
- export class OpenCodeInstallRecipe extends FixedAgentInstallRecipe {
243
- #archiveInstaller;
244
- id = "opencode";
245
- label = "OpenCode";
246
- releaseChannel = OPENCODE_MANAGED_VERSION;
247
- constructor(archiveInstaller = new ManagedAgentArchiveInstaller()) {
248
- super();
249
- this.#archiveInstaller = archiveInstaller;
250
- }
251
- install = async (options) => {
252
- this.assertSupportedPlatform();
253
- const definition = openCodeManagedArchive(process.platform, process.arch);
254
- try {
255
- await options.report("downloading");
256
- await options.report("verifying");
257
- await options.report("installing_agent");
258
- const executable = await this.#archiveInstaller.install(join(options.stateDirectory, "agents", this.id, OPENCODE_MANAGED_VERSION), definition, options.signal);
259
- options.audit.record("agent_archive_verified", options.requestId, this.id, {
260
- sha256: definition.archiveSha256,
261
- version: definition.version,
262
- });
263
- return executable;
264
- }
265
- catch (error) {
266
- if (options.signal.aborted) {
267
- options.signal.throwIfAborted();
268
- }
269
- if (error instanceof ManagedAgentArchiveError) {
270
- if (error.code === "managed_archive_verification_failed") {
271
- throw new InstallationManagerError("agent_verification_failed", "The managed OpenCode archive did not match its pinned artifact", { cause: error });
272
- }
273
- if (error.code === "managed_archive_publish_failed") {
274
- throw new InstallationManagerError("agent_publish_failed", "The managed OpenCode archive could not be published", { cause: error });
275
- }
276
- throw new InstallationManagerError(error.code, error.message, {
277
- cause: error,
278
- });
279
- }
280
- if (error instanceof InstallationManagerError) {
281
- throw error;
282
- }
283
- throw new InstallationManagerError("agent_install_failed", "The fixed OpenCode installation recipe failed", { cause: error });
284
- }
285
- };
286
- }
287
- export function fixedAgentInstallRecipes() {
288
- return Object.freeze([
289
- new CodexInstallRecipe(),
290
- new ClaudeCodeInstallRecipe(),
291
- new PiInstallRecipe(),
292
- new DeepSeekHarnessInstallRecipe(),
293
- new OpenCodeInstallRecipe(),
294
- new GrokBuildInstallRecipe(),
295
- new WorkBuddyInstallRecipe(),
296
- ]);
297
- }
298
- export { FixedAgentInstallRecipe } from "./fixed-agent-install-recipe.js";
299
- export { GrokBuildInstallRecipe } from "./grok-build-install-recipe.js";
300
- export { WorkBuddyInstallRecipe } from "./workbuddy-install-recipe.js";
301
- //# sourceMappingURL=fixed-agent-install-recipes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fixed-agent-install-recipes.js","sourceRoot":"","sources":["../../src/agent-installation/fixed-agent-install-recipes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAEL,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAEL,uBAAuB,GACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EACL,wBAAwB,EAExB,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EAEtB,0BAA0B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IAAI,qBAAqB,EAAE;QAC3B,IAAI,sBAAsB,EAAE;QAC5B,IAAI,sBAAsB,EAAE;KAC7B,CAAC,CAAC;AACL,CAAC;AAGD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { ResolvedExecutable } from "../process/executable.ts";
2
- import { type AgentInstallRecipeOptions, FixedAgentInstallRecipe } from "./fixed-agent-install-recipe.ts";
3
- import { type ManagedNpmPackageInstallationPort } from "./managed-npm-package.ts";
4
- export declare class GrokBuildInstallRecipe extends FixedAgentInstallRecipe {
5
- #private;
6
- readonly id = "grok-build";
7
- readonly label = "Grok Build";
8
- readonly releaseChannel = "1.0.21";
9
- constructor(npmInstaller?: ManagedNpmPackageInstallationPort);
10
- readonly install: (options: AgentInstallRecipeOptions) => Promise<ResolvedExecutable>;
11
- }
12
- //# sourceMappingURL=grok-build-install-recipe.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"grok-build-install-recipe.d.ts","sourceRoot":"","sources":["../../src/agent-installation/grok-build-install-recipe.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAGnE,OAAO,EACL,KAAK,yBAAyB,EAC9B,uBAAuB,EACxB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EAEL,KAAK,iCAAiC,EAEvC,MAAM,0BAA0B,CAAC;AAkClC,qBAAa,sBAAuB,SAAQ,uBAAuB;;IAEjE,QAAQ,CAAC,EAAE,gBAAgB;IAC3B,QAAQ,CAAC,KAAK,gBAAgB;IAC9B,QAAQ,CAAC,cAAc,YAA8B;IAErD,YACE,YAAY,GAAE,iCAAoE,EAInF;IAED,QAAQ,CAAC,OAAO,YACL,yBAAyB,KACjC,OAAO,CAAC,kBAAkB,CAAC,CAgG5B;CACH"}
@@ -1,102 +0,0 @@
1
- import { mkdir, realpath, stat } from "node:fs/promises";
2
- import { delimiter, dirname, isAbsolute, join, relative, sep } from "node:path";
3
- import { runBoundedProcess } from "../process/executable.js";
4
- import { InstallationManagerError } from "./agent-installation-manager.js";
5
- import { FixedAgentInstallRecipe, } from "./fixed-agent-install-recipe.js";
6
- import { GROK_BUILD_MANAGED_VERSION, grokBuildManagedPackage, } from "./grok-managed-package.js";
7
- import { ManagedNpmPackageError, ManagedNpmPackageInstaller, } from "./managed-npm-package.js";
8
- const INSTALL_TIMEOUT_MILLISECONDS = 5 * 60 * 1_000;
9
- function isContainedPath(root, candidate) {
10
- const difference = relative(root, candidate);
11
- return (difference.length > 0 &&
12
- difference !== ".." &&
13
- !difference.startsWith(`..${sep}`) &&
14
- !isAbsolute(difference));
15
- }
16
- async function resolveLifecycleScript(packageRoot) {
17
- try {
18
- const canonicalPackageRoot = await realpath(packageRoot);
19
- const script = await realpath(join(canonicalPackageRoot, "bin", "postinstall.js"));
20
- const metadata = await stat(script);
21
- if (!metadata.isFile() || !isContainedPath(canonicalPackageRoot, script)) {
22
- throw new Error("Invalid Grok Build lifecycle script");
23
- }
24
- return script;
25
- }
26
- catch (error) {
27
- throw new InstallationManagerError("agent_verification_failed", "The managed Grok Build lifecycle script is invalid", { cause: error });
28
- }
29
- }
30
- export class GrokBuildInstallRecipe extends FixedAgentInstallRecipe {
31
- #npmInstaller;
32
- id = "grok-build";
33
- label = "Grok Build";
34
- releaseChannel = GROK_BUILD_MANAGED_VERSION;
35
- constructor(npmInstaller = new ManagedNpmPackageInstaller()) {
36
- super();
37
- this.#npmInstaller = npmInstaller;
38
- }
39
- install = async (options) => {
40
- this.assertSupportedPlatform();
41
- const definition = grokBuildManagedPackage(process.platform, process.arch);
42
- const versionRoot = join(options.stateDirectory, "agents", this.id, GROK_BUILD_MANAGED_VERSION);
43
- const packageRoot = join(versionRoot, "package");
44
- const managedHome = join(versionRoot, "home");
45
- try {
46
- await mkdir(managedHome, { mode: 0o700, recursive: true });
47
- const canonicalHome = await realpath(managedHome);
48
- await options.report("downloading");
49
- await options.report("verifying");
50
- await options.report("installing_agent");
51
- await this.#npmInstaller.install(packageRoot, definition, options.environment, options.signal);
52
- options.audit.record("agent_npm_package_verified", options.requestId, this.id, {
53
- integrity: definition.integrity,
54
- package: definition.packageName,
55
- version: definition.version,
56
- });
57
- const script = await resolveLifecycleScript(join(packageRoot, "node_modules", "@xai-official", "grok"));
58
- await runBoundedProcess({
59
- arguments: [script],
60
- command: process.execPath,
61
- cwd: dirname(script),
62
- environment: {
63
- GROK_HOME: canonicalHome,
64
- GROK_INSTALL_COMPLETIONS: "0",
65
- GROK_NPM_REGISTRY: "https://registry.npmjs.org/",
66
- HOME: canonicalHome,
67
- PATH: `${dirname(process.execPath)}${delimiter}/usr/bin${delimiter}/bin`,
68
- },
69
- outputLimitBytes: 64 * 1024,
70
- signal: options.signal,
71
- timeoutMilliseconds: INSTALL_TIMEOUT_MILLISECONDS,
72
- });
73
- options.audit.record("agent_lifecycle_step_completed", options.requestId, this.id, {
74
- lifecycle: "postinstall",
75
- package: definition.packageName,
76
- version: definition.version,
77
- });
78
- return await this.requireInstalledExecutable(join(canonicalHome, "bin", "grok"));
79
- }
80
- catch (error) {
81
- if (options.signal.aborted) {
82
- options.signal.throwIfAborted();
83
- }
84
- if (error instanceof ManagedNpmPackageError) {
85
- if (error.code === "managed_package_verification_failed") {
86
- throw new InstallationManagerError("agent_verification_failed", "The managed Grok Build packages did not match their pinned artifacts", { cause: error });
87
- }
88
- if (error.code === "managed_package_publish_failed") {
89
- throw new InstallationManagerError("agent_publish_failed", "The managed Grok Build package could not be published", { cause: error });
90
- }
91
- throw new InstallationManagerError(error.code, error.message, {
92
- cause: error,
93
- });
94
- }
95
- if (error instanceof InstallationManagerError) {
96
- throw error;
97
- }
98
- throw new InstallationManagerError("agent_install_failed", "The fixed Grok Build installation recipe failed", { cause: error });
99
- }
100
- };
101
- }
102
- //# sourceMappingURL=grok-build-install-recipe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"grok-build-install-recipe.js","sourceRoot":"","sources":["../../src/agent-installation/grok-build-install-recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGhF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAEL,uBAAuB,GACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,sBAAsB,EAEtB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAElC,MAAM,4BAA4B,GAAG,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;AAEpD,SAAS,eAAe,CAAC,IAAY,EAAE,SAAiB;IACtD,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC7C,OAAO,CACL,UAAU,CAAC,MAAM,GAAG,CAAC;QACrB,UAAU,KAAK,IAAI;QACnB,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC;QAClC,CAAC,UAAU,CAAC,UAAU,CAAC,CACxB,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,sBAAsB,CAAC,WAAmB;IACvD,IAAI,CAAC;QACH,MAAM,oBAAoB,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAC;QACzD,MAAM,MAAM,GAAG,MAAM,QAAQ,CAC3B,IAAI,CAAC,oBAAoB,EAAE,KAAK,EAAE,gBAAgB,CAAC,CACpD,CAAC;QACF,MAAM,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ResolvedExecutable } from "../process/executable.ts";
2
- import { type AgentInstallRecipeOptions, FixedAgentInstallRecipe } from "./fixed-agent-install-recipe.ts";
3
- import { type ManagedNpmPackageInstallationPort } from "./managed-npm-package.ts";
4
- export declare class WorkBuddyInstallRecipe extends FixedAgentInstallRecipe {
5
- #private;
6
- readonly id = "workbuddy";
7
- readonly label = "WorkBuddy";
8
- readonly releaseChannel = "2.146.0";
9
- constructor(npmInstaller?: ManagedNpmPackageInstallationPort);
10
- readonly install: (options: AgentInstallRecipeOptions) => Promise<ResolvedExecutable>;
11
- }
12
- //# sourceMappingURL=workbuddy-install-recipe.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workbuddy-install-recipe.d.ts","sourceRoot":"","sources":["../../src/agent-installation/workbuddy-install-recipe.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EACL,KAAK,yBAAyB,EAC9B,uBAAuB,EACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,iCAAiC,EAEvC,MAAM,0BAA0B,CAAC;AAMlC,qBAAa,sBAAuB,SAAQ,uBAAuB;;IAEjE,QAAQ,CAAC,EAAE,eAAe;IAC1B,QAAQ,CAAC,KAAK,eAAe;IAC7B,QAAQ,CAAC,cAAc,aAA6B;IAEpD,YACE,YAAY,GAAE,iCAAoE,EAInF;IAED,QAAQ,CAAC,OAAO,YACL,yBAAyB,KACjC,OAAO,CAAC,kBAAkB,CAAC,CA4D5B;CACH"}
@@ -1,51 +0,0 @@
1
- import { join } from "node:path";
2
- import { InstallationManagerError } from "./agent-installation-manager.js";
3
- import { FixedAgentInstallRecipe, } from "./fixed-agent-install-recipe.js";
4
- import { ManagedNpmPackageError, ManagedNpmPackageInstaller, } from "./managed-npm-package.js";
5
- import { WORKBUDDY_MANAGED_PACKAGE, WORKBUDDY_MANAGED_VERSION, } from "./workbuddy-managed-package.js";
6
- export class WorkBuddyInstallRecipe extends FixedAgentInstallRecipe {
7
- #npmInstaller;
8
- id = "workbuddy";
9
- label = "WorkBuddy";
10
- releaseChannel = WORKBUDDY_MANAGED_VERSION;
11
- constructor(npmInstaller = new ManagedNpmPackageInstaller()) {
12
- super();
13
- this.#npmInstaller = npmInstaller;
14
- }
15
- install = async (options) => {
16
- this.assertSupportedPlatform();
17
- try {
18
- await options.report("downloading");
19
- await options.report("verifying");
20
- await options.report("installing_agent");
21
- const executable = await this.#npmInstaller.install(join(options.stateDirectory, "agents", this.id, WORKBUDDY_MANAGED_VERSION), WORKBUDDY_MANAGED_PACKAGE, options.environment, options.signal);
22
- options.audit.record("agent_npm_package_verified", options.requestId, this.id, {
23
- integrity: WORKBUDDY_MANAGED_PACKAGE.integrity,
24
- package: WORKBUDDY_MANAGED_PACKAGE.packageName,
25
- version: WORKBUDDY_MANAGED_PACKAGE.version,
26
- });
27
- return executable;
28
- }
29
- catch (error) {
30
- if (options.signal.aborted) {
31
- options.signal.throwIfAborted();
32
- }
33
- if (error instanceof ManagedNpmPackageError) {
34
- if (error.code === "managed_package_verification_failed") {
35
- throw new InstallationManagerError("agent_verification_failed", "The managed WorkBuddy package did not match its pinned artifact", { cause: error });
36
- }
37
- if (error.code === "managed_package_publish_failed") {
38
- throw new InstallationManagerError("agent_publish_failed", "The managed WorkBuddy package could not be published", { cause: error });
39
- }
40
- throw new InstallationManagerError(error.code, error.message, {
41
- cause: error,
42
- });
43
- }
44
- if (error instanceof InstallationManagerError) {
45
- throw error;
46
- }
47
- throw new InstallationManagerError("agent_install_failed", "The fixed WorkBuddy installation recipe failed", { cause: error });
48
- }
49
- };
50
- }
51
- //# sourceMappingURL=workbuddy-install-recipe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workbuddy-install-recipe.js","sourceRoot":"","sources":["../../src/agent-installation/workbuddy-install-recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,w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