@elie-laloum/outpost 4.0.0 → 4.2.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 (240) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +10 -6
  3. package/SECURITY.md +2 -0
  4. package/dist/adapters/agents/codex-adapter.js +2 -0
  5. package/dist/adapters/agents/codex-adapter.js.map +1 -1
  6. package/dist/adapters/agents/codex-provider.d.ts +2 -0
  7. package/dist/adapters/agents/codex-provider.js +32 -0
  8. package/dist/adapters/agents/codex-provider.js.map +1 -0
  9. package/dist/adapters/agents/codex-request.js +2 -1
  10. package/dist/adapters/agents/codex-request.js.map +1 -1
  11. package/dist/adapters/agents/gemini-request.js +2 -0
  12. package/dist/adapters/agents/gemini-request.js.map +1 -1
  13. package/dist/adapters/agents/settings.types.d.ts +5 -0
  14. package/dist/adapters/agents/settings.types.js.map +1 -1
  15. package/dist/adapters/models/openai-compatible.constants.d.ts +4 -0
  16. package/dist/adapters/models/openai-compatible.constants.js +10 -0
  17. package/dist/adapters/models/openai-compatible.constants.js.map +1 -0
  18. package/dist/adapters/models/openai-compatible.d.ts +3 -0
  19. package/dist/adapters/models/openai-compatible.js +78 -0
  20. package/dist/adapters/models/openai-compatible.js.map +1 -0
  21. package/dist/adapters/models/openai-compatible.types.d.ts +14 -0
  22. package/dist/adapters/models/openai-compatible.types.js +2 -0
  23. package/dist/adapters/models/openai-compatible.types.js.map +1 -0
  24. package/dist/adapters/models/openai-http.d.ts +1 -0
  25. package/dist/adapters/models/openai-http.js +30 -0
  26. package/dist/adapters/models/openai-http.js.map +1 -0
  27. package/dist/adapters/models/openai-request.d.ts +4 -0
  28. package/dist/adapters/models/openai-request.js +46 -0
  29. package/dist/adapters/models/openai-request.js.map +1 -0
  30. package/dist/adapters/models/openai-response.d.ts +3 -0
  31. package/dist/adapters/models/openai-response.js +65 -0
  32. package/dist/adapters/models/openai-response.js.map +1 -0
  33. package/dist/application/execution.types.d.ts +2 -0
  34. package/dist/application/execution.types.js.map +1 -1
  35. package/dist/application/outpost.types.d.ts +5 -0
  36. package/dist/application/outpost.types.js.map +1 -1
  37. package/dist/application/recovery-archive.d.ts +4 -0
  38. package/dist/application/recovery-archive.js +29 -0
  39. package/dist/application/recovery-archive.js.map +1 -0
  40. package/dist/application/recovery-archive.types.d.ts +10 -0
  41. package/dist/application/recovery-archive.types.js +2 -0
  42. package/dist/application/recovery-archive.types.js.map +1 -0
  43. package/dist/application/recovery-inspection.js +3 -0
  44. package/dist/application/recovery-inspection.js.map +1 -1
  45. package/dist/application/recovery-inspection.types.d.ts +2 -0
  46. package/dist/application/recovery-inspection.types.js.map +1 -1
  47. package/dist/application/recovery-retention.d.ts +2 -1
  48. package/dist/application/recovery-retention.js +9 -1
  49. package/dist/application/recovery-retention.js.map +1 -1
  50. package/dist/application/recovery-retention.types.d.ts +6 -0
  51. package/dist/application/recovery-retention.types.js.map +1 -1
  52. package/dist/application/remote-backup.js +8 -0
  53. package/dist/application/remote-backup.js.map +1 -1
  54. package/dist/application/remote-workspace.types.d.ts +2 -0
  55. package/dist/application/remote-workspace.types.js.map +1 -1
  56. package/dist/application/sandbox-agents.js +2 -1
  57. package/dist/application/sandbox-agents.js.map +1 -1
  58. package/dist/application/sandbox-dispatch.js +9 -0
  59. package/dist/application/sandbox-dispatch.js.map +1 -1
  60. package/dist/application/sandbox-provision.js +6 -0
  61. package/dist/application/sandbox-provision.js.map +1 -1
  62. package/dist/application/storage-reservation.js +3 -0
  63. package/dist/application/storage-reservation.js.map +1 -1
  64. package/dist/application/transport-inspection.constants.d.ts +2 -0
  65. package/dist/application/transport-inspection.constants.js +10 -0
  66. package/dist/application/transport-inspection.constants.js.map +1 -0
  67. package/dist/application/transport-inspection.d.ts +2 -0
  68. package/dist/application/transport-inspection.js +103 -0
  69. package/dist/application/transport-inspection.js.map +1 -0
  70. package/dist/application/transport-retention.d.ts +4 -0
  71. package/dist/application/transport-retention.js +153 -0
  72. package/dist/application/transport-retention.js.map +1 -0
  73. package/dist/cli/commands.js +55 -18
  74. package/dist/cli/commands.js.map +1 -1
  75. package/dist/cli/init-authentication.constants.d.ts +13 -0
  76. package/dist/cli/init-authentication.constants.js +10 -0
  77. package/dist/cli/init-authentication.constants.js.map +1 -0
  78. package/dist/cli/init-authentication.d.ts +4 -0
  79. package/dist/cli/init-authentication.js +43 -0
  80. package/dist/cli/init-authentication.js.map +1 -0
  81. package/dist/cli/init-command.js +74 -15
  82. package/dist/cli/init-command.js.map +1 -1
  83. package/dist/cli/main.constants.d.ts +102 -2
  84. package/dist/cli/main.constants.js +148 -46
  85. package/dist/cli/main.constants.js.map +1 -1
  86. package/dist/cli/scaffold-files.js +4 -3
  87. package/dist/cli/scaffold-files.js.map +1 -1
  88. package/dist/cli/scaffold-validation.js +19 -0
  89. package/dist/cli/scaffold-validation.js.map +1 -1
  90. package/dist/cli/scaffold.constants.d.ts +0 -5
  91. package/dist/cli/scaffold.constants.js +0 -5
  92. package/dist/cli/scaffold.constants.js.map +1 -1
  93. package/dist/cli/scaffold.js +13 -0
  94. package/dist/cli/scaffold.js.map +1 -1
  95. package/dist/cli/scaffold.types.d.ts +3 -0
  96. package/dist/cli/scaffold.types.js.map +1 -1
  97. package/dist/cli/starters.js +9 -2
  98. package/dist/cli/starters.js.map +1 -1
  99. package/dist/domain/conversation.types.d.ts +2 -0
  100. package/dist/domain/conversation.types.js.map +1 -1
  101. package/dist/domain/model.types.d.ts +15 -0
  102. package/dist/domain/model.types.js +2 -0
  103. package/dist/domain/model.types.js.map +1 -0
  104. package/dist/domain/transport.constants.d.ts +2 -0
  105. package/dist/domain/transport.constants.js +3 -0
  106. package/dist/domain/transport.constants.js.map +1 -0
  107. package/dist/domain/transport.d.ts +6 -0
  108. package/dist/domain/transport.js +21 -0
  109. package/dist/domain/transport.js.map +1 -0
  110. package/dist/domain/transport.types.d.ts +31 -0
  111. package/dist/domain/transport.types.js +2 -0
  112. package/dist/domain/transport.types.js.map +1 -0
  113. package/dist/index.d.ts +18 -1
  114. package/dist/index.js +8 -0
  115. package/dist/index.js.map +1 -1
  116. package/dist/infrastructure/artifact-store.js +10 -0
  117. package/dist/infrastructure/artifact-store.js.map +1 -1
  118. package/dist/infrastructure/artifact-store.types.d.ts +3 -1
  119. package/dist/infrastructure/artifact-store.types.js.map +1 -1
  120. package/dist/infrastructure/conversations/capture.js +1 -1
  121. package/dist/infrastructure/conversations/capture.js.map +1 -1
  122. package/dist/infrastructure/conversations.d.ts +2 -0
  123. package/dist/infrastructure/conversations.js +2 -0
  124. package/dist/infrastructure/conversations.js.map +1 -1
  125. package/dist/infrastructure/inspection-file.js +3 -3
  126. package/dist/infrastructure/inspection-file.js.map +1 -1
  127. package/dist/infrastructure/inspection-hash.js +4 -3
  128. package/dist/infrastructure/inspection-hash.js.map +1 -1
  129. package/dist/infrastructure/inspection-path.d.ts +1 -0
  130. package/dist/infrastructure/inspection-path.js +18 -0
  131. package/dist/infrastructure/inspection-path.js.map +1 -0
  132. package/dist/infrastructure/journal.js +6 -0
  133. package/dist/infrastructure/journal.js.map +1 -1
  134. package/dist/infrastructure/journal.types.d.ts +3 -0
  135. package/dist/infrastructure/journal.types.js.map +1 -1
  136. package/dist/infrastructure/local-transport.d.ts +3 -0
  137. package/dist/infrastructure/local-transport.js +146 -0
  138. package/dist/infrastructure/local-transport.js.map +1 -0
  139. package/dist/infrastructure/local-transport.types.d.ts +3 -0
  140. package/dist/infrastructure/local-transport.types.js +2 -0
  141. package/dist/infrastructure/local-transport.types.js.map +1 -0
  142. package/dist/infrastructure/resource-activity-inspection.d.ts +2 -1
  143. package/dist/infrastructure/resource-activity-inspection.js +2 -2
  144. package/dist/infrastructure/resource-activity-inspection.js.map +1 -1
  145. package/dist/infrastructure/resource-activity.js +42 -14
  146. package/dist/infrastructure/resource-activity.js.map +1 -1
  147. package/dist/infrastructure/resource-activity.types.d.ts +2 -0
  148. package/dist/infrastructure/resource-activity.types.js.map +1 -1
  149. package/dist/infrastructure/s3-transport.d.ts +4 -0
  150. package/dist/infrastructure/s3-transport.js +144 -0
  151. package/dist/infrastructure/s3-transport.js.map +1 -0
  152. package/dist/infrastructure/s3-transport.types.d.ts +6 -0
  153. package/dist/infrastructure/s3-transport.types.js +2 -0
  154. package/dist/infrastructure/s3-transport.types.js.map +1 -0
  155. package/dist/infrastructure/storage-inventory.types.d.ts +2 -1
  156. package/dist/infrastructure/storage-inventory.types.js.map +1 -1
  157. package/dist/infrastructure/storage-reservations.types.d.ts +2 -0
  158. package/dist/infrastructure/storage-reservations.types.js.map +1 -1
  159. package/dist/infrastructure/task-queue-bullmq-resources.d.ts +13 -0
  160. package/dist/infrastructure/task-queue-bullmq-resources.js +118 -0
  161. package/dist/infrastructure/task-queue-bullmq-resources.js.map +1 -0
  162. package/dist/infrastructure/task-queue-bullmq-state.d.ts +5 -0
  163. package/dist/infrastructure/task-queue-bullmq-state.js +26 -0
  164. package/dist/infrastructure/task-queue-bullmq-state.js.map +1 -0
  165. package/dist/infrastructure/task-queue-bullmq.constants.d.ts +7 -0
  166. package/dist/infrastructure/task-queue-bullmq.constants.js +79 -0
  167. package/dist/infrastructure/task-queue-bullmq.constants.js.map +1 -0
  168. package/dist/infrastructure/task-queue-bullmq.d.ts +3 -0
  169. package/dist/infrastructure/task-queue-bullmq.js +124 -0
  170. package/dist/infrastructure/task-queue-bullmq.js.map +1 -0
  171. package/dist/infrastructure/task-queue-bullmq.types.d.ts +17 -0
  172. package/dist/infrastructure/task-queue-bullmq.types.js +2 -0
  173. package/dist/infrastructure/task-queue-bullmq.types.js.map +1 -0
  174. package/dist/infrastructure/transport-archive.constants.d.ts +6 -0
  175. package/dist/infrastructure/transport-archive.constants.js +7 -0
  176. package/dist/infrastructure/transport-archive.constants.js.map +1 -0
  177. package/dist/infrastructure/transport-archive.d.ts +5 -0
  178. package/dist/infrastructure/transport-archive.js +157 -0
  179. package/dist/infrastructure/transport-archive.js.map +1 -0
  180. package/dist/infrastructure/transport-archive.types.d.ts +17 -0
  181. package/dist/infrastructure/transport-archive.types.js +2 -0
  182. package/dist/infrastructure/transport-archive.types.js.map +1 -0
  183. package/dist/infrastructure/transport-artifact-store.d.ts +3 -0
  184. package/dist/infrastructure/transport-artifact-store.js +31 -0
  185. package/dist/infrastructure/transport-artifact-store.js.map +1 -0
  186. package/dist/infrastructure/transport-artifact-store.types.d.ts +4 -0
  187. package/dist/infrastructure/transport-artifact-store.types.js +2 -0
  188. package/dist/infrastructure/transport-artifact-store.types.js.map +1 -0
  189. package/dist/infrastructure/transport-checkpoint.d.ts +5 -0
  190. package/dist/infrastructure/transport-checkpoint.js +105 -0
  191. package/dist/infrastructure/transport-checkpoint.js.map +1 -0
  192. package/dist/infrastructure/transport-checkpoint.types.d.ts +9 -0
  193. package/dist/infrastructure/transport-checkpoint.types.js +2 -0
  194. package/dist/infrastructure/transport-checkpoint.types.js.map +1 -0
  195. package/dist/infrastructure/transport-conversations.d.ts +4 -0
  196. package/dist/infrastructure/transport-conversations.js +69 -0
  197. package/dist/infrastructure/transport-conversations.js.map +1 -0
  198. package/dist/infrastructure/transport-conversations.types.d.ts +4 -0
  199. package/dist/infrastructure/transport-conversations.types.js +2 -0
  200. package/dist/infrastructure/transport-conversations.types.js.map +1 -0
  201. package/dist/infrastructure/transport-envelope.d.ts +7 -0
  202. package/dist/infrastructure/transport-envelope.js +47 -0
  203. package/dist/infrastructure/transport-envelope.js.map +1 -0
  204. package/dist/infrastructure/transport-journal.d.ts +6 -0
  205. package/dist/infrastructure/transport-journal.js +93 -0
  206. package/dist/infrastructure/transport-journal.js.map +1 -0
  207. package/dist/infrastructure/transport-journal.types.d.ts +10 -0
  208. package/dist/infrastructure/transport-journal.types.js +2 -0
  209. package/dist/infrastructure/transport-journal.types.js.map +1 -0
  210. package/dist/infrastructure/transport-json.d.ts +6 -0
  211. package/dist/infrastructure/transport-json.js +46 -0
  212. package/dist/infrastructure/transport-json.js.map +1 -0
  213. package/dist/infrastructure/transport-reservations.d.ts +5 -0
  214. package/dist/infrastructure/transport-reservations.js +89 -0
  215. package/dist/infrastructure/transport-reservations.js.map +1 -0
  216. package/dist/infrastructure/transport-reservations.types.d.ts +4 -0
  217. package/dist/infrastructure/transport-reservations.types.js +2 -0
  218. package/dist/infrastructure/transport-reservations.types.js.map +1 -0
  219. package/dist/infrastructure/transport.constants.d.ts +8 -0
  220. package/dist/infrastructure/transport.constants.js +9 -0
  221. package/dist/infrastructure/transport.constants.js.map +1 -0
  222. package/dist/infrastructure/workflow-checkpoint.js +7 -0
  223. package/dist/infrastructure/workflow-checkpoint.js.map +1 -1
  224. package/dist/infrastructure/workflow-checkpoint.types.d.ts +3 -1
  225. package/dist/infrastructure/workflow-checkpoint.types.js.map +1 -1
  226. package/dist/providers/agents.d.ts +1 -1
  227. package/dist/providers/agents.js.map +1 -1
  228. package/dist/providers/daytona-command.constants.d.ts +2 -0
  229. package/dist/providers/daytona-command.constants.js +13 -0
  230. package/dist/providers/daytona-command.constants.js.map +1 -0
  231. package/dist/providers/daytona-command.js +9 -3
  232. package/dist/providers/daytona-command.js.map +1 -1
  233. package/dist/providers/daytona-output.d.ts +4 -0
  234. package/dist/providers/daytona-output.js +37 -0
  235. package/dist/providers/daytona-output.js.map +1 -0
  236. package/dist/providers/daytona-terminal.js +3 -1
  237. package/dist/providers/daytona-terminal.js.map +1 -1
  238. package/dist/providers/vercel-command.js +2 -2
  239. package/dist/providers/vercel-command.js.map +1 -1
  240. package/package.json +31 -6
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-authentication.js","sourceRoot":"","sources":["../../src/cli/init-authentication.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,MAAM,UAAU,yBAAyB,CAAC,OAAoB;IAC5D,IAAI,OAAO,CAAC,OAAO;QACjB,OAAO,GAAG,OAAO,CAAC,iBAAiB,IAAI,gBAAgB,KAAK,CAAC;IAC/D,IAAI,OAAO,CAAC,cAAc,KAAK,OAAO;QAAE,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C,WAAW,GAAG,gFAAgF,CAAC,IAAI,CAAC;IAC5L,MAAM,KAAK,GAAG,QAAQ;QACpB,CAAC,CAAC,mBAAmB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,kIAAkI;QAC/K,CAAC,CAAC,EAAE,CAAC;IACP,IAAI,KAAK,KAAK,OAAO,IAAI,OAAO,CAAC,OAAO;QACtC,OAAO,GAAG,KAAK,GAAG,KAAK,8BAA8B,CAAC;IACxD,OAAO,GAAG,KAAK,qFAAqF,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,KAAK,CAAC,0CAA0C,CAAC;AAClM,CAAC","sourcesContent":["import type { InitOptions } from \"./scaffold.types.ts\";\nimport { authenticationRecipes } from \"./init-authentication.constants.ts\";\n\nexport function authenticationEnvironment(options: InitOptions): string {\n if (options.baseUrl)\n return `${options.apiKeyEnvironment ?? \"OPENAI_API_KEY\"}=\\n`;\n if (options.authentication === \"login\") return \"\";\n if (options.authentication === \"oauth-token\")\n return \"CLAUDE_CODE_OAUTH_TOKEN=\\n\";\n return authenticationRecipes[options.agent ?? \"codex\"].environment;\n}\n\nexport function authenticationInstructions(options: InitOptions): string {\n if (options.authentication === \"login\")\n return \"Run codex login on the host. For isolated providers, use file credential storage; the generated script copies auth.json into the private sandbox home.\";\n if (options.authentication === \"oauth-token\")\n return \"Run claude setup-token on the host, then set CLAUDE_CODE_OAUTH_TOKEN in the workflow .env or parent environment. This uses your Claude subscription.\";\n return (\n \"Set \" +\n authenticationEnvironment(options).trim().replace(\"=\", \"\") +\n \" in the workflow .env or parent environment. API usage is billed separately from subscriptions.\"\n );\n}\n\nexport function authenticationSource(options: InitOptions): string {\n const agent = options.agent ?? \"codex\";\n if (options.authentication === \"login\") {\n if (options.provider === \"local\") return \"const authentication = {};\";\n return `const seed = await readFile(resolve(process.env.CODEX_HOME || resolve(homedir(), \".codex\"), \"auth.json\"), \"utf8\");\ntry { JSON.parse(seed); } catch { throw new Error(\"Invalid Codex authentication file. Run codex login again with file credential storage.\"); }\nconst authentication = { sandboxReady: [{ executable: \"node\", arguments: [\"-e\", ${JSON.stringify(authenticationRecipes.codex.seed)}], stdin: seed }] };`;\n }\n const key = authenticationEnvironment(options).trim().replace(\"=\", \"\");\n const conflict =\n agent === \"claude\"\n ? key === \"ANTHROPIC_API_KEY\"\n ? \"CLAUDE_CODE_OAUTH_TOKEN\"\n : \"ANTHROPIC_API_KEY\"\n : undefined;\n const check = `if (!variables[${JSON.stringify(key)}]) throw new Error(${JSON.stringify(`Missing ${key}. Configure the workflow .env or parent environment before starting a sandbox.`)});`;\n const guard = conflict\n ? `\\nif (variables[${JSON.stringify(conflict)}]) throw new Error(\"Conflicting Claude authentication methods. Keep only the selected credential in the workflow environment.\");`\n : \"\";\n if (agent !== \"codex\" || options.baseUrl)\n return `${check}${guard}\\nconst authentication = {};`;\n return `${check}\\nconst authentication = { sandboxReady: [{ executable: \"node\", arguments: [\"-e\", ${JSON.stringify(authenticationRecipes.codex.login)}], stdin: variables.OPENAI_API_KEY }] };`;\n}\n"]}
@@ -1,30 +1,89 @@
1
+ import { invariant } from "../domain/errors.js";
1
2
  import { resolve } from "node:path";
2
- import { createInterface } from "node:readline/promises";
3
- import { initializationQuestions } from "./main.constants.js";
3
+ import { cancel, intro, isCancel, outro, select, spinner, } from "@clack/prompts";
4
+ import { projectSettings } from "./project-settings.js";
5
+ import { authenticationInstructions } from "./init-authentication.js";
6
+ import { supportedManagers } from "./scaffold.constants.js";
7
+ import { initializationQuestions, authenticationChoices, } from "./main.constants.js";
4
8
  import { initialize } from "./scaffold.js";
5
9
  export async function initializeCommand({ values, }) {
6
10
  const options = Object.fromEntries(Object.entries(values).filter(([key]) => !["help", "yes"].includes(key)));
11
+ if (values["base-url"] !== undefined)
12
+ options.baseUrl = values["base-url"];
13
+ if (values["api-key-env"] !== undefined)
14
+ options.apiKeyEnvironment = values["api-key-env"];
15
+ delete options["base-url"];
16
+ delete options["api-key-env"];
7
17
  if (!values.yes &&
8
18
  !process.stdin.isTTY &&
9
19
  (!values.agent || !values.provider))
10
20
  throw new Error("Headless initialization requires --yes for defaults, or --agent and --provider.");
11
21
  if (!values.yes && process.stdin.isTTY) {
12
- const terminal = createInterface({
13
- input: process.stdin,
14
- output: process.stdout,
15
- });
16
- try {
17
- for (const [key, label, fallback] of initializationQuestions) {
18
- options[key] ??=
19
- (await terminal.question(`${label} [${fallback}]: `)).trim() ||
20
- fallback;
22
+ intro("Create an Outpost workflow");
23
+ for (const question of initializationQuestions) {
24
+ if (options[question.key] !== undefined)
25
+ continue;
26
+ const value = await select({
27
+ message: question.message,
28
+ options: question.choices.map((value) => ({ value, label: value })),
29
+ });
30
+ if (isCancel(value)) {
31
+ cancel("Initialization cancelled.");
32
+ process.exitCode = 130;
33
+ return;
21
34
  }
35
+ options[question.key] = value;
22
36
  }
23
- finally {
24
- terminal.close();
37
+ const settings = await projectSettings(resolve(values.directory ?? process.cwd()), options);
38
+ const choices = Object.entries(authenticationChoices).find(([name]) => name === options.agent)?.[1];
39
+ invariant(choices, "Choose codex, claude or gemini");
40
+ const questions = [
41
+ {
42
+ key: "manager",
43
+ message: "Package manager",
44
+ options: supportedManagers.map((value) => ({ value, label: value })),
45
+ initialValue: settings.manager,
46
+ },
47
+ {
48
+ key: "authentication",
49
+ message: "Agent authentication",
50
+ options: [...choices],
51
+ initialValue: "api-key",
52
+ },
53
+ ];
54
+ for (const question of questions) {
55
+ if (options[question.key] !== undefined)
56
+ continue;
57
+ const value = await select(question);
58
+ if (isCancel(value)) {
59
+ cancel("Initialization cancelled.");
60
+ process.exitCode = 130;
61
+ return;
62
+ }
63
+ options[question.key] = value;
25
64
  }
26
65
  }
27
- const result = await initialize(options);
28
- process.stdout.write(`Initialized ${result.files.length} files in ${resolve(values.directory ?? process.cwd())}.\nRun: ${result.run}\n`);
66
+ options.build ??= ["docker", "podman"].includes(String(options.provider ?? "docker"));
67
+ const progress = !values.yes && process.stdin.isTTY ? spinner() : undefined;
68
+ progress?.start(options.build
69
+ ? "Creating project and building its container image"
70
+ : "Creating project");
71
+ let result;
72
+ try {
73
+ result = await initialize(options);
74
+ }
75
+ catch (error) {
76
+ progress?.stop("Initialization failed");
77
+ throw error;
78
+ }
79
+ progress?.stop("Project ready");
80
+ const installation = options.install
81
+ ? ""
82
+ : "Install project dependencies with your selected package manager before running.\n";
83
+ const message = `Initialized ${result.files.length} files in ${resolve(values.directory ?? process.cwd())}.\n${authenticationInstructions(options)}\n${installation}Run: ${result.run}`;
84
+ if (!values.yes && process.stdin.isTTY)
85
+ outro(message);
86
+ else
87
+ process.stdout.write(`${message}\n`);
29
88
  }
30
89
  //# sourceMappingURL=init-command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"init-command.js","sourceRoot":"","sources":["../../src/cli/init-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACtC,MAAM,GACQ;IACd,MAAM,OAAO,GAA4B,MAAM,CAAC,WAAW,CACzD,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CACzE,CAAC;IACF,IACE,CAAC,MAAM,CAAC,GAAG;QACX,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK;QACpB,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;QAEnC,MAAM,IAAI,KAAK,CACb,iFAAiF,CAClF,CAAC;IACJ,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACvC,MAAM,QAAQ,GAAG,eAAe,CAAC;YAC/B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC,CAAC;QACH,IAAI,CAAC;YACH,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAI,uBAAuB,EAAE,CAAC;gBAC7D,OAAO,CAAC,GAAG,CAAC;oBACV,CAAC,MAAM,QAAQ,CAAC,QAAQ,CAAC,GAAG,KAAK,KAAK,QAAQ,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;wBAC5D,QAAQ,CAAC;YACb,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,QAAQ,CAAC,KAAK,EAAE,CAAC;QACnB,CAAC;IACH,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAsB,CAAC,CAAC;IACxD,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,eAAe,MAAM,CAAC,KAAK,CAAC,MAAM,aAAa,OAAO,CAAC,MAAM,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,WAAW,MAAM,CAAC,GAAG,IAAI,CACnH,CAAC;AACJ,CAAC","sourcesContent":["import { resolve } from \"node:path\";\nimport { createInterface } from \"node:readline/promises\";\nimport { initializationQuestions } from \"./main.constants.ts\";\nimport type { CliInvocation } from \"./main.types.ts\";\nimport { initialize } from \"./scaffold.ts\";\nimport type { InitOptions } from \"./scaffold.types.ts\";\n\nexport async function initializeCommand({\n values,\n}: CliInvocation): Promise<void> {\n const options: Record<string, unknown> = Object.fromEntries(\n Object.entries(values).filter(([key]) => ![\"help\", \"yes\"].includes(key)),\n );\n if (\n !values.yes &&\n !process.stdin.isTTY &&\n (!values.agent || !values.provider)\n )\n throw new Error(\n \"Headless initialization requires --yes for defaults, or --agent and --provider.\",\n );\n if (!values.yes && process.stdin.isTTY) {\n const terminal = createInterface({\n input: process.stdin,\n output: process.stdout,\n });\n try {\n for (const [key, label, fallback] of initializationQuestions) {\n options[key] ??=\n (await terminal.question(`${label} [${fallback}]: `)).trim() ||\n fallback;\n }\n } finally {\n terminal.close();\n }\n }\n const result = await initialize(options as InitOptions);\n process.stdout.write(\n `Initialized ${result.files.length} files in ${resolve(values.directory ?? process.cwd())}.\\nRun: ${result.run}\\n`,\n );\n}\n"]}
1
+ {"version":3,"file":"init-command.js","sourceRoot":"","sources":["../../src/cli/init-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,OAAO,GACR,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACtC,MAAM,GACQ;IACd,MAAM,OAAO,GAA4B,MAAM,CAAC,WAAW,CACzD,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CACzE,CAAC;IACF,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,SAAS;QAAE,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAC3E,IAAI,MAAM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,QAAQ,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5E,QAAQ,EAAE,KAAK,CACb,OAAO,CAAC,KAAK;QACX,CAAC,CAAC,mDAAmD;QACrD,CAAC,CAAC,kBAAkB,CACvB,CAAC;IACF,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,UAAU,CAAC,OAAsB,CAAC,CAAC;IACpD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,QAAQ,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACxC,MAAM,KAAK,CAAC;IACd,CAAC;IACD,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IAChC,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO;QAClC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,mFAAmF,CAAC;IACxF,MAAM,OAAO,GAAG,eAAe,MAAM,CAAC,KAAK,CAAC,MAAM,aAAa,OAAO,CAAC,MAAM,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,0BAA0B,CAAC,OAAsB,CAAC,KAAK,YAAY,QAAQ,MAAM,CAAC,GAAG,EAAE,CAAC;IACvM,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK;QAAE,KAAK,CAAC,OAAO,CAAC,CAAC;;QAClD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["import { invariant } from \"../domain/errors.ts\";\nimport { resolve } from \"node:path\";\nimport {\n cancel,\n intro,\n isCancel,\n outro,\n select,\n spinner,\n} from \"@clack/prompts\";\nimport { projectSettings } from \"./project-settings.ts\";\nimport { authenticationInstructions } from \"./init-authentication.ts\";\nimport { supportedManagers } from \"./scaffold.constants.ts\";\nimport {\n initializationQuestions,\n authenticationChoices,\n} from \"./main.constants.ts\";\nimport type { CliInvocation } from \"./main.types.ts\";\nimport { initialize } from \"./scaffold.ts\";\nimport type { InitOptions } from \"./scaffold.types.ts\";\n\nexport async function initializeCommand({\n values,\n}: CliInvocation): Promise<void> {\n const options: Record<string, unknown> = Object.fromEntries(\n Object.entries(values).filter(([key]) => ![\"help\", \"yes\"].includes(key)),\n );\n if (values[\"base-url\"] !== undefined) options.baseUrl = values[\"base-url\"];\n if (values[\"api-key-env\"] !== undefined)\n options.apiKeyEnvironment = values[\"api-key-env\"];\n delete options[\"base-url\"];\n delete options[\"api-key-env\"];\n if (\n !values.yes &&\n !process.stdin.isTTY &&\n (!values.agent || !values.provider)\n )\n throw new Error(\n \"Headless initialization requires --yes for defaults, or --agent and --provider.\",\n );\n if (!values.yes && process.stdin.isTTY) {\n intro(\"Create an Outpost workflow\");\n for (const question of initializationQuestions) {\n if (options[question.key] !== undefined) continue;\n const value = await select({\n message: question.message,\n options: question.choices.map((value) => ({ value, label: value })),\n });\n if (isCancel(value)) {\n cancel(\"Initialization cancelled.\");\n process.exitCode = 130;\n return;\n }\n options[question.key] = value;\n }\n const settings = await projectSettings(\n resolve(values.directory ?? process.cwd()),\n options as InitOptions,\n );\n const choices = Object.entries(authenticationChoices).find(\n ([name]) => name === options.agent,\n )?.[1];\n invariant(choices, \"Choose codex, claude or gemini\");\n const questions = [\n {\n key: \"manager\",\n message: \"Package manager\",\n options: supportedManagers.map((value) => ({ value, label: value })),\n initialValue: settings.manager,\n },\n {\n key: \"authentication\",\n message: \"Agent authentication\",\n options: [...choices],\n initialValue: \"api-key\",\n },\n ];\n for (const question of questions) {\n if (options[question.key] !== undefined) continue;\n const value = await select(question);\n if (isCancel(value)) {\n cancel(\"Initialization cancelled.\");\n process.exitCode = 130;\n return;\n }\n options[question.key] = value;\n }\n }\n options.build ??= [\"docker\", \"podman\"].includes(\n String(options.provider ?? \"docker\"),\n );\n const progress = !values.yes && process.stdin.isTTY ? spinner() : undefined;\n progress?.start(\n options.build\n ? \"Creating project and building its container image\"\n : \"Creating project\",\n );\n let result;\n try {\n result = await initialize(options as InitOptions);\n } catch (error) {\n progress?.stop(\"Initialization failed\");\n throw error;\n }\n progress?.stop(\"Project ready\");\n const installation = options.install\n ? \"\"\n : \"Install project dependencies with your selected package manager before running.\\n\";\n const message = `Initialized ${result.files.length} files in ${resolve(values.directory ?? process.cwd())}.\\n${authenticationInstructions(options as InitOptions)}\\n${installation}Run: ${result.run}`;\n if (!values.yes && process.stdin.isTTY) outro(message);\n else process.stdout.write(`${message}\\n`);\n}\n"]}
@@ -1,87 +1,187 @@
1
- export declare const help = "Outpost \u2014 sandboxed coding agents and workflows\n\noutpost init [--yes] [--agent codex|claude|gemini] [--provider docker|podman|vercel|daytona|local]\n [--manager npm|pnpm|yarn|bun] [--model NAME] [--install] [--build] [--image NAME] [--directory PATH] [--repository PATH]\noutpost image build|remove [--engine docker|podman] [--file PATH] [--image NAME] [--uid ID] [--gid ID]\n\noutpost doctor [--provider docker|podman|local|vercel|daytona] [--agent codex|claude|gemini] [--image NAME] [--json]\n\noutpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--resources] [--json]\noutpost recovery verify --directory TRANSFER_PATH [--checksums] [--max-bytes NUMBER] [--restorability --repository PATH] [--json]\noutpost recovery restore --directory TRANSFER_PATH --repository PATH --destination NEW_PATH --side previous|incoming [--max-bytes NUMBER] [--apply] [--json]\noutpost recovery prune --policy FILE [--repository PATH] [--apply] [--json]\n\nNode.js 24+ and Git are required. Run generated scripts with Node.js.\nInitialization writes run.ts and project files directly into --directory (default: current directory).\n--repository selects the target Git repository; relative paths are resolved from the workflow directory.\n";
2
1
  export declare const cliOptions: {
2
+ readonly "base-url": {
3
+ readonly type: "string";
4
+ readonly description: "Custom Codex Responses API base URL (requires --model)";
5
+ };
6
+ readonly "api-key-env": {
7
+ readonly type: "string";
8
+ readonly description: "Custom provider API-key environment variable";
9
+ };
10
+ readonly authentication: {
11
+ readonly type: "string";
12
+ readonly description: "Authentication: api-key, oauth-token (Claude), login (Codex)";
13
+ };
3
14
  readonly help: {
4
15
  readonly type: "boolean";
5
16
  readonly short: "h";
17
+ readonly description: "Help";
6
18
  };
7
19
  readonly yes: {
8
20
  readonly type: "boolean";
9
21
  readonly short: "y";
22
+ readonly description: "Accept defaults without prompting";
10
23
  };
11
24
  readonly install: {
12
25
  readonly type: "boolean";
26
+ readonly description: "Install project dependencies";
13
27
  };
14
28
  readonly build: {
15
29
  readonly type: "boolean";
30
+ readonly description: "Build the container image";
16
31
  };
17
32
  readonly json: {
18
33
  readonly type: "boolean";
34
+ readonly description: "Write a machine-readable JSON report";
19
35
  };
20
36
  readonly git: {
21
37
  readonly type: "boolean";
38
+ readonly description: "Inspect workspace Git state";
22
39
  };
23
40
  readonly locks: {
24
41
  readonly type: "boolean";
42
+ readonly description: "Inspect local lock ownership";
25
43
  };
26
44
  readonly resources: {
27
45
  readonly type: "boolean";
46
+ readonly description: "Inspect recorded sandbox activity";
28
47
  };
29
48
  readonly restorability: {
30
49
  readonly type: "boolean";
50
+ readonly description: "Check whether the retained transfer can be restored";
31
51
  };
32
52
  readonly apply: {
33
53
  readonly type: "boolean";
54
+ readonly description: "Apply changes (default: preview)";
34
55
  };
35
56
  readonly policy: {
36
57
  readonly type: "string";
58
+ readonly description: "Retention policy file";
37
59
  };
38
60
  readonly checksums: {
39
61
  readonly type: "boolean";
62
+ readonly description: "Verify retained file checksums";
40
63
  };
41
64
  readonly "max-bytes": {
42
65
  readonly type: "string";
66
+ readonly description: "Maximum bytes to inspect";
43
67
  };
44
68
  readonly "max-entries": {
45
69
  readonly type: "string";
70
+ readonly description: "Maximum inventory entries";
46
71
  };
47
72
  readonly agent: {
48
73
  readonly type: "string";
74
+ readonly description: "Agent: codex, claude or gemini";
49
75
  };
50
76
  readonly provider: {
51
77
  readonly type: "string";
78
+ readonly description: "Provider: docker, podman, local, vercel or daytona";
52
79
  };
53
80
  readonly manager: {
54
81
  readonly type: "string";
82
+ readonly description: "Package manager: npm, pnpm, yarn or bun";
55
83
  };
56
84
  readonly model: {
57
85
  readonly type: "string";
86
+ readonly description: "Agent model name";
58
87
  };
59
88
  readonly directory: {
60
89
  readonly type: "string";
90
+ readonly description: "Workflow or retained transfer directory";
61
91
  };
62
92
  readonly repository: {
63
93
  readonly type: "string";
94
+ readonly description: "Target Git repository";
64
95
  };
65
96
  readonly destination: {
66
97
  readonly type: "string";
98
+ readonly description: "New restoration directory";
67
99
  };
68
100
  readonly side: {
69
101
  readonly type: "string";
102
+ readonly description: "Transfer side: previous or incoming";
70
103
  };
71
104
  readonly engine: {
72
105
  readonly type: "string";
106
+ readonly description: "Container engine: docker or podman";
73
107
  };
74
108
  readonly file: {
75
109
  readonly type: "string";
110
+ readonly description: "Container recipe path";
76
111
  };
77
112
  readonly image: {
78
113
  readonly type: "string";
114
+ readonly description: "Container image name";
79
115
  };
80
116
  readonly uid: {
81
117
  readonly type: "string";
118
+ readonly description: "Container user ID";
82
119
  };
83
120
  readonly gid: {
84
121
  readonly type: "string";
122
+ readonly description: "Container group ID";
123
+ };
124
+ };
125
+ export declare const commandOptions: {
126
+ readonly init: {
127
+ readonly description: "Create a standalone workflow project";
128
+ readonly options: readonly ["yes", "agent", "provider", "manager", "authentication", "model", "base-url", "api-key-env", "install", "build", "image", "directory", "repository"];
85
129
  };
130
+ readonly doctor: {
131
+ readonly description: "Diagnose host and sandbox prerequisites";
132
+ readonly options: readonly ["provider", "agent", "image", "json"];
133
+ };
134
+ readonly "image build": {
135
+ readonly description: "Build a container image";
136
+ readonly options: readonly ["directory", "engine", "file", "image", "uid", "gid"];
137
+ };
138
+ readonly "image remove": {
139
+ readonly description: "Remove a container image";
140
+ readonly options: readonly ["directory", "engine", "image"];
141
+ };
142
+ readonly "recovery inspect": {
143
+ readonly description: "Inspect recovery inventory";
144
+ readonly options: readonly ["repository", "max-entries", "git", "locks", "resources", "json"];
145
+ };
146
+ readonly "recovery verify": {
147
+ readonly description: "Verify a retained transfer";
148
+ readonly options: readonly ["directory", "checksums", "max-bytes", "restorability", "repository", "json"];
149
+ };
150
+ readonly "recovery restore": {
151
+ readonly description: "Restore a retained transfer";
152
+ readonly options: readonly ["directory", "repository", "destination", "side", "max-bytes", "apply", "json"];
153
+ };
154
+ readonly "recovery prune": {
155
+ readonly description: "Apply an explicit retention policy";
156
+ readonly options: readonly ["policy", "repository", "apply", "json"];
157
+ };
158
+ };
159
+ export declare const initializationQuestions: readonly [{
160
+ readonly key: "agent";
161
+ readonly message: "Coding agent";
162
+ readonly choices: readonly ["codex", "claude", "gemini"];
163
+ }, {
164
+ readonly key: "provider";
165
+ readonly message: "Sandbox provider";
166
+ readonly choices: readonly ["docker", "podman", "vercel", "daytona", "local"];
167
+ }];
168
+ export declare const authenticationChoices: {
169
+ readonly codex: readonly [{
170
+ readonly value: "api-key";
171
+ readonly label: "OpenAI API key (API billing)";
172
+ }, {
173
+ readonly value: "login";
174
+ readonly label: "Existing Codex account login";
175
+ }];
176
+ readonly claude: readonly [{
177
+ readonly value: "api-key";
178
+ readonly label: "Anthropic API key (API billing)";
179
+ }, {
180
+ readonly value: "oauth-token";
181
+ readonly label: "Claude subscription token (claude setup-token)";
182
+ }];
183
+ readonly gemini: readonly [{
184
+ readonly value: "api-key";
185
+ readonly label: "Gemini API key";
186
+ }];
86
187
  };
87
- export declare const initializationQuestions: readonly [readonly ["agent", "Agent (codex/claude/gemini)", "codex"], readonly ["provider", "Sandbox (docker/podman/vercel/daytona/local)", "docker"]];
@@ -1,51 +1,153 @@
1
- export const help = `Outpost — sandboxed coding agents and workflows
2
-
3
- outpost init [--yes] [--agent codex|claude|gemini] [--provider docker|podman|vercel|daytona|local]
4
- [--manager npm|pnpm|yarn|bun] [--model NAME] [--install] [--build] [--image NAME] [--directory PATH] [--repository PATH]
5
- outpost image build|remove [--engine docker|podman] [--file PATH] [--image NAME] [--uid ID] [--gid ID]
6
-
7
- outpost doctor [--provider docker|podman|local|vercel|daytona] [--agent codex|claude|gemini] [--image NAME] [--json]
8
-
9
- outpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--resources] [--json]
10
- outpost recovery verify --directory TRANSFER_PATH [--checksums] [--max-bytes NUMBER] [--restorability --repository PATH] [--json]
11
- outpost recovery restore --directory TRANSFER_PATH --repository PATH --destination NEW_PATH --side previous|incoming [--max-bytes NUMBER] [--apply] [--json]
12
- outpost recovery prune --policy FILE [--repository PATH] [--apply] [--json]
13
-
14
- Node.js 24+ and Git are required. Run generated scripts with Node.js.
15
- Initialization writes run.ts and project files directly into --directory (default: current directory).
16
- --repository selects the target Git repository; relative paths are resolved from the workflow directory.
17
- `;
18
1
  export const cliOptions = {
19
- help: { type: "boolean", short: "h" },
20
- yes: { type: "boolean", short: "y" },
21
- install: { type: "boolean" },
22
- build: { type: "boolean" },
23
- json: { type: "boolean" },
24
- git: { type: "boolean" },
25
- locks: { type: "boolean" },
26
- resources: { type: "boolean" },
27
- restorability: { type: "boolean" },
28
- apply: { type: "boolean" },
29
- policy: { type: "string" },
30
- checksums: { type: "boolean" },
31
- "max-bytes": { type: "string" },
32
- "max-entries": { type: "string" },
33
- agent: { type: "string" },
34
- provider: { type: "string" },
35
- manager: { type: "string" },
36
- model: { type: "string" },
37
- directory: { type: "string" },
38
- repository: { type: "string" },
39
- destination: { type: "string" },
40
- side: { type: "string" },
41
- engine: { type: "string" },
42
- file: { type: "string" },
43
- image: { type: "string" },
44
- uid: { type: "string" },
45
- gid: { type: "string" },
2
+ "base-url": {
3
+ type: "string",
4
+ description: "Custom Codex Responses API base URL (requires --model)",
5
+ },
6
+ "api-key-env": {
7
+ type: "string",
8
+ description: "Custom provider API-key environment variable",
9
+ },
10
+ authentication: {
11
+ type: "string",
12
+ description: "Authentication: api-key, oauth-token (Claude), login (Codex)",
13
+ },
14
+ help: { type: "boolean", short: "h", description: "Help" },
15
+ yes: {
16
+ type: "boolean",
17
+ short: "y",
18
+ description: "Accept defaults without prompting",
19
+ },
20
+ install: { type: "boolean", description: "Install project dependencies" },
21
+ build: { type: "boolean", description: "Build the container image" },
22
+ json: {
23
+ type: "boolean",
24
+ description: "Write a machine-readable JSON report",
25
+ },
26
+ git: { type: "boolean", description: "Inspect workspace Git state" },
27
+ locks: { type: "boolean", description: "Inspect local lock ownership" },
28
+ resources: {
29
+ type: "boolean",
30
+ description: "Inspect recorded sandbox activity",
31
+ },
32
+ restorability: {
33
+ type: "boolean",
34
+ description: "Check whether the retained transfer can be restored",
35
+ },
36
+ apply: { type: "boolean", description: "Apply changes (default: preview)" },
37
+ policy: { type: "string", description: "Retention policy file" },
38
+ checksums: { type: "boolean", description: "Verify retained file checksums" },
39
+ "max-bytes": { type: "string", description: "Maximum bytes to inspect" },
40
+ "max-entries": { type: "string", description: "Maximum inventory entries" },
41
+ agent: { type: "string", description: "Agent: codex, claude or gemini" },
42
+ provider: {
43
+ type: "string",
44
+ description: "Provider: docker, podman, local, vercel or daytona",
45
+ },
46
+ manager: {
47
+ type: "string",
48
+ description: "Package manager: npm, pnpm, yarn or bun",
49
+ },
50
+ model: { type: "string", description: "Agent model name" },
51
+ directory: {
52
+ type: "string",
53
+ description: "Workflow or retained transfer directory",
54
+ },
55
+ repository: { type: "string", description: "Target Git repository" },
56
+ destination: { type: "string", description: "New restoration directory" },
57
+ side: { type: "string", description: "Transfer side: previous or incoming" },
58
+ engine: { type: "string", description: "Container engine: docker or podman" },
59
+ file: { type: "string", description: "Container recipe path" },
60
+ image: { type: "string", description: "Container image name" },
61
+ uid: { type: "string", description: "Container user ID" },
62
+ gid: { type: "string", description: "Container group ID" },
63
+ };
64
+ export const commandOptions = {
65
+ init: {
66
+ description: "Create a standalone workflow project",
67
+ options: [
68
+ "yes",
69
+ "agent",
70
+ "provider",
71
+ "manager",
72
+ "authentication",
73
+ "model",
74
+ "base-url",
75
+ "api-key-env",
76
+ "install",
77
+ "build",
78
+ "image",
79
+ "directory",
80
+ "repository",
81
+ ],
82
+ },
83
+ doctor: {
84
+ description: "Diagnose host and sandbox prerequisites",
85
+ options: ["provider", "agent", "image", "json"],
86
+ },
87
+ "image build": {
88
+ description: "Build a container image",
89
+ options: ["directory", "engine", "file", "image", "uid", "gid"],
90
+ },
91
+ "image remove": {
92
+ description: "Remove a container image",
93
+ options: ["directory", "engine", "image"],
94
+ },
95
+ "recovery inspect": {
96
+ description: "Inspect recovery inventory",
97
+ options: ["repository", "max-entries", "git", "locks", "resources", "json"],
98
+ },
99
+ "recovery verify": {
100
+ description: "Verify a retained transfer",
101
+ options: [
102
+ "directory",
103
+ "checksums",
104
+ "max-bytes",
105
+ "restorability",
106
+ "repository",
107
+ "json",
108
+ ],
109
+ },
110
+ "recovery restore": {
111
+ description: "Restore a retained transfer",
112
+ options: [
113
+ "directory",
114
+ "repository",
115
+ "destination",
116
+ "side",
117
+ "max-bytes",
118
+ "apply",
119
+ "json",
120
+ ],
121
+ },
122
+ "recovery prune": {
123
+ description: "Apply an explicit retention policy",
124
+ options: ["policy", "repository", "apply", "json"],
125
+ },
46
126
  };
47
127
  export const initializationQuestions = [
48
- ["agent", "Agent (codex/claude/gemini)", "codex"],
49
- ["provider", "Sandbox (docker/podman/vercel/daytona/local)", "docker"],
128
+ {
129
+ key: "agent",
130
+ message: "Coding agent",
131
+ choices: ["codex", "claude", "gemini"],
132
+ },
133
+ {
134
+ key: "provider",
135
+ message: "Sandbox provider",
136
+ choices: ["docker", "podman", "vercel", "daytona", "local"],
137
+ },
50
138
  ];
139
+ export const authenticationChoices = {
140
+ codex: [
141
+ { value: "api-key", label: "OpenAI API key (API billing)" },
142
+ { value: "login", label: "Existing Codex account login" },
143
+ ],
144
+ claude: [
145
+ { value: "api-key", label: "Anthropic API key (API billing)" },
146
+ {
147
+ value: "oauth-token",
148
+ label: "Claude subscription token (claude setup-token)",
149
+ },
150
+ ],
151
+ gemini: [{ value: "api-key", label: "Gemini API key" }],
152
+ };
51
153
  //# sourceMappingURL=main.constants.js.map
@@ -1 +1 @@
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EAAE,IAAI,EAAE,QAAQ,EAAE;IAC/B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACzB,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACvB,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;CACf,CAAC;AAEX,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,CAAC,OAAO,EAAE,6BAA6B,EAAE,OAAO,CAAC;IACjD,CAAC,UAAU,EAAE,8CAA8C,EAAE,QAAQ,CAAC;CAC9D,CAAC","sourcesContent":["export const help = `Outpost — sandboxed coding agents and workflows\n\noutpost init [--yes] [--agent codex|claude|gemini] [--provider docker|podman|vercel|daytona|local]\n [--manager npm|pnpm|yarn|bun] [--model NAME] [--install] [--build] [--image NAME] [--directory PATH] [--repository PATH]\noutpost image build|remove [--engine docker|podman] [--file PATH] [--image NAME] [--uid ID] [--gid ID]\n\noutpost doctor [--provider docker|podman|local|vercel|daytona] [--agent codex|claude|gemini] [--image NAME] [--json]\n\noutpost recovery inspect [--repository PATH] [--max-entries NUMBER] [--git] [--locks] [--resources] [--json]\noutpost recovery verify --directory TRANSFER_PATH [--checksums] [--max-bytes NUMBER] [--restorability --repository PATH] [--json]\noutpost recovery restore --directory TRANSFER_PATH --repository PATH --destination NEW_PATH --side previous|incoming [--max-bytes NUMBER] [--apply] [--json]\noutpost recovery prune --policy FILE [--repository PATH] [--apply] [--json]\n\nNode.js 24+ and Git are required. Run generated scripts with Node.js.\nInitialization writes run.ts and project files directly into --directory (default: current directory).\n--repository selects the target Git repository; relative paths are resolved from the workflow directory.\n`;\n\nexport const cliOptions = {\n help: { type: \"boolean\", short: \"h\" },\n yes: { type: \"boolean\", short: \"y\" },\n install: { type: \"boolean\" },\n build: { type: \"boolean\" },\n json: { type: \"boolean\" },\n git: { type: \"boolean\" },\n locks: { type: \"boolean\" },\n resources: { type: \"boolean\" },\n restorability: { type: \"boolean\" },\n apply: { type: \"boolean\" },\n policy: { type: \"string\" },\n checksums: { type: \"boolean\" },\n \"max-bytes\": { type: \"string\" },\n \"max-entries\": { type: \"string\" },\n agent: { type: \"string\" },\n provider: { type: \"string\" },\n manager: { type: \"string\" },\n model: { type: \"string\" },\n directory: { type: \"string\" },\n repository: { type: \"string\" },\n destination: { type: \"string\" },\n side: { type: \"string\" },\n engine: { type: \"string\" },\n file: { type: \"string\" },\n image: { type: \"string\" },\n uid: { type: \"string\" },\n gid: { type: \"string\" },\n} as const;\n\nexport const initializationQuestions = [\n [\"agent\", \"Agent (codex/claude/gemini)\", \"codex\"],\n [\"provider\", \"Sandbox (docker/podman/vercel/daytona/local)\", \"docker\"],\n] as const;\n"]}
1
+ {"version":3,"file":"main.constants.js","sourceRoot":"","sources":["../../src/cli/main.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,wDAAwD;KACtE;IACD,aAAa,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,8CAA8C;KAC5D;IACD,cAAc,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,8DAA8D;KAC5E;IACD,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE;IAC1D,GAAG,EAAE;QACH,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,mCAAmC;KACjD;IACD,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,8BAA8B,EAAE;IACzE,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,2BAA2B,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,CAAC","sourcesContent":["export const cliOptions = {\n \"base-url\": {\n type: \"string\",\n description: \"Custom Codex Responses API base URL (requires --model)\",\n },\n \"api-key-env\": {\n type: \"string\",\n description: \"Custom provider API-key environment variable\",\n },\n authentication: {\n type: \"string\",\n description: \"Authentication: api-key, oauth-token (Claude), login (Codex)\",\n },\n help: { type: \"boolean\", short: \"h\", description: \"Help\" },\n yes: {\n type: \"boolean\",\n short: \"y\",\n description: \"Accept defaults without prompting\",\n },\n install: { type: \"boolean\", description: \"Install project dependencies\" },\n build: { type: \"boolean\", description: \"Build the container image\" },\n json: {\n type: \"boolean\",\n description: \"Write a machine-readable JSON report\",\n },\n git: { type: \"boolean\", description: \"Inspect workspace Git state\" },\n locks: { type: \"boolean\", description: \"Inspect local lock ownership\" },\n resources: {\n type: \"boolean\",\n description: \"Inspect recorded sandbox activity\",\n },\n restorability: {\n type: \"boolean\",\n description: \"Check whether the retained transfer can be restored\",\n },\n apply: { type: \"boolean\", description: \"Apply changes (default: preview)\" },\n policy: { type: \"string\", description: \"Retention policy file\" },\n checksums: { type: \"boolean\", description: \"Verify retained file checksums\" },\n \"max-bytes\": { type: \"string\", description: \"Maximum bytes to inspect\" },\n \"max-entries\": { type: \"string\", description: \"Maximum inventory entries\" },\n agent: { type: \"string\", description: \"Agent: codex, claude or gemini\" },\n provider: {\n type: \"string\",\n description: \"Provider: docker, podman, local, vercel or daytona\",\n },\n manager: {\n type: \"string\",\n description: \"Package manager: npm, pnpm, yarn or bun\",\n },\n model: { type: \"string\", description: \"Agent model name\" },\n directory: {\n type: \"string\",\n description: \"Workflow or retained transfer directory\",\n },\n repository: { type: \"string\", description: \"Target Git repository\" },\n destination: { type: \"string\", description: \"New restoration directory\" },\n side: { type: \"string\", description: \"Transfer side: previous or incoming\" },\n engine: { type: \"string\", description: \"Container engine: docker or podman\" },\n file: { type: \"string\", description: \"Container recipe path\" },\n image: { type: \"string\", description: \"Container image name\" },\n uid: { type: \"string\", description: \"Container user ID\" },\n gid: { type: \"string\", description: \"Container group ID\" },\n} as const;\n\nexport const commandOptions = {\n init: {\n description: \"Create a standalone workflow project\",\n options: [\n \"yes\",\n \"agent\",\n \"provider\",\n \"manager\",\n \"authentication\",\n \"model\",\n \"base-url\",\n \"api-key-env\",\n \"install\",\n \"build\",\n \"image\",\n \"directory\",\n \"repository\",\n ],\n },\n doctor: {\n description: \"Diagnose host and sandbox prerequisites\",\n options: [\"provider\", \"agent\", \"image\", \"json\"],\n },\n \"image build\": {\n description: \"Build a container image\",\n options: [\"directory\", \"engine\", \"file\", \"image\", \"uid\", \"gid\"],\n },\n \"image remove\": {\n description: \"Remove a container image\",\n options: [\"directory\", \"engine\", \"image\"],\n },\n \"recovery inspect\": {\n description: \"Inspect recovery inventory\",\n options: [\"repository\", \"max-entries\", \"git\", \"locks\", \"resources\", \"json\"],\n },\n \"recovery verify\": {\n description: \"Verify a retained transfer\",\n options: [\n \"directory\",\n \"checksums\",\n \"max-bytes\",\n \"restorability\",\n \"repository\",\n \"json\",\n ],\n },\n \"recovery restore\": {\n description: \"Restore a retained transfer\",\n options: [\n \"directory\",\n \"repository\",\n \"destination\",\n \"side\",\n \"max-bytes\",\n \"apply\",\n \"json\",\n ],\n },\n \"recovery prune\": {\n description: \"Apply an explicit retention policy\",\n options: [\"policy\", \"repository\", \"apply\", \"json\"],\n },\n} as const;\n\nexport const initializationQuestions = [\n {\n key: \"agent\",\n message: \"Coding agent\",\n choices: [\"codex\", \"claude\", \"gemini\"],\n },\n {\n key: \"provider\",\n message: \"Sandbox provider\",\n choices: [\"docker\", \"podman\", \"vercel\", \"daytona\", \"local\"],\n },\n] as const;\n\nexport const authenticationChoices = {\n codex: [\n { value: \"api-key\", label: \"OpenAI API key (API billing)\" },\n { value: \"login\", label: \"Existing Codex account login\" },\n ],\n claude: [\n { value: \"api-key\", label: \"Anthropic API key (API billing)\" },\n {\n value: \"oauth-token\",\n label: \"Claude subscription token (claude setup-token)\",\n },\n ],\n gemini: [{ value: \"api-key\", label: \"Gemini API key\" }],\n} as const;\n"]}
@@ -1,12 +1,13 @@
1
1
  import { readFile } from "node:fs/promises";
2
- import { agentEnvironment, imageRecipe, providerPackages, } from "./scaffold.constants.js";
2
+ import { imageRecipe, providerPackages } from "./scaffold.constants.js";
3
+ import { authenticationEnvironment } from "./init-authentication.js";
3
4
  import { starter } from "./starters.js";
4
5
  export async function scaffoldFiles(options, hasPackage, extension) {
5
- const agent = options.agent ?? "codex", provider = options.provider ?? "docker";
6
+ const provider = options.provider ?? "docker";
6
7
  const files = {
7
8
  [`run.${extension}`]: starter(options),
8
9
  "brief.md": "Objective: {{OBJECTIVE}}\n\nWork on {{WORK_BRANCH}} from {{BASE_BRANCH}}. Inspect the repository, implement the objective, run relevant tests and commit your changes. When finished, write <outpost>done</outpost>.\n",
9
- ".env.example": agentEnvironment[agent],
10
+ ".env.example": authenticationEnvironment(options),
10
11
  ".gitignore": "node_modules/\n.env\n.outpost/workspaces/\n.outpost/locks/\n.outpost/recovery/\n.outpost/logs/\n",
11
12
  };
12
13
  if (provider === "docker" || provider === "podman")
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold-files.js","sourceRoot":"","sources":["../../src/cli/scaffold-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAoB,EACpB,UAAmB,EACnB,SAAuB;IAEvB,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,EACpC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,QAAQ,CAAC;IAC1C,MAAM,KAAK,GAA2B;QACpC,CAAC,OAAO,SAAS,EAAE,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;QACtC,UAAU,EACR,wNAAwN;QAC1N,cAAc,EAAE,gBAAgB,CAAC,KAAK,CAAC;QACvC,YAAY,EACV,kGAAkG;KACrG,CAAC;IACF,IAAI,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,QAAQ;QAChD,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,eAAe,CAAC,GAAG,WAAW,CAAC;IAE9E,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CACzB,MAAM,QAAQ,CAAC,IAAI,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CACvE,CAAC;QACF,KAAK,CAAC,cAAc,CAAC;YACnB,IAAI,CAAC,SAAS,CACZ;gBACE,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE,KAAK,EAAE,YAAY,SAAS,EAAE,EAAE;gBAC3C,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;gBACzB,eAAe,EAAE;oBACf,sBAAsB,EAAE,IAAI,QAAQ,CAAC,OAAO,EAAE;oBAC9C,GAAG,MAAM,CAAC,WAAW,CACnB,gBAAgB,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;wBACvC,IAAI;wBACJ,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC;qBAChC,CAAC,CACH;iBACF;aACF,EACD,IAAI,EACJ,CAAC,CACF,GAAG,IAAI,CAAC;IACb,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport {\n agentEnvironment,\n imageRecipe,\n providerPackages,\n} from \"./scaffold.constants.ts\";\nimport type { InitOptions } from \"./scaffold.types.ts\";\nimport { starter } from \"./starters.ts\";\n\nexport async function scaffoldFiles(\n options: InitOptions,\n hasPackage: boolean,\n extension: \"ts\" | \"mts\",\n): Promise<Record<string, string>> {\n const agent = options.agent ?? \"codex\",\n provider = options.provider ?? \"docker\";\n const files: Record<string, string> = {\n [`run.${extension}`]: starter(options),\n \"brief.md\":\n \"Objective: {{OBJECTIVE}}\\n\\nWork on {{WORK_BRANCH}} from {{BASE_BRANCH}}. Inspect the repository, implement the objective, run relevant tests and commit your changes. When finished, write <outpost>done</outpost>.\\n\",\n \".env.example\": agentEnvironment[agent],\n \".gitignore\":\n \"node_modules/\\n.env\\n.outpost/workspaces/\\n.outpost/locks/\\n.outpost/recovery/\\n.outpost/logs/\\n\",\n };\n if (provider === \"docker\" || provider === \"podman\")\n files[provider === \"docker\" ? \"Dockerfile\" : \"Containerfile\"] = imageRecipe;\n\n if (!hasPackage) {\n const manifest = JSON.parse(\n await readFile(new URL(\"../../package.json\", import.meta.url), \"utf8\"),\n );\n files[\"package.json\"] =\n JSON.stringify(\n {\n private: true,\n type: \"module\",\n scripts: { start: `node run.${extension}` },\n engines: { node: \">=24\" },\n devDependencies: {\n \"@elie-laloum/outpost\": `^${manifest.version}`,\n ...Object.fromEntries(\n providerPackages[provider].map((name) => [\n name,\n manifest.peerDependencies[name],\n ]),\n ),\n },\n },\n null,\n 2,\n ) + \"\\n\";\n }\n return files;\n}\n"]}
1
+ {"version":3,"file":"scaffold-files.js","sourceRoot":"","sources":["../../src/cli/scaffold-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAExE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAoB,EACpB,UAAmB,EACnB,SAAuB;IAEvB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IA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scaffold.constants.ts\";\nimport type { InitOptions } from \"./scaffold.types.ts\";\nimport { authenticationEnvironment } from \"./init-authentication.ts\";\nimport { starter } from \"./starters.ts\";\n\nexport async function scaffoldFiles(\n options: InitOptions,\n hasPackage: boolean,\n extension: \"ts\" | \"mts\",\n): Promise<Record<string, string>> {\n const provider = options.provider ?? \"docker\";\n const files: Record<string, string> = {\n [`run.${extension}`]: starter(options),\n \"brief.md\":\n \"Objective: {{OBJECTIVE}}\\n\\nWork on {{WORK_BRANCH}} from {{BASE_BRANCH}}. Inspect the repository, implement the objective, run relevant tests and commit your changes. When finished, write <outpost>done</outpost>.\\n\",\n \".env.example\": authenticationEnvironment(options),\n \".gitignore\":\n \"node_modules/\\n.env\\n.outpost/workspaces/\\n.outpost/locks/\\n.outpost/recovery/\\n.outpost/logs/\\n\",\n };\n if (provider === \"docker\" || provider === \"podman\")\n files[provider === \"docker\" ? \"Dockerfile\" : \"Containerfile\"] = imageRecipe;\n\n if (!hasPackage) {\n const manifest = JSON.parse(\n await readFile(new URL(\"../../package.json\", import.meta.url), \"utf8\"),\n );\n files[\"package.json\"] =\n JSON.stringify(\n {\n private: true,\n type: \"module\",\n scripts: { start: `node run.${extension}` },\n engines: { node: \">=24\" },\n devDependencies: {\n \"@elie-laloum/outpost\": `^${manifest.version}`,\n ...Object.fromEntries(\n providerPackages[provider].map((name) => [\n name,\n manifest.peerDependencies[name],\n ]),\n ),\n },\n },\n null,\n 2,\n ) + \"\\n\";\n }\n return files;\n}\n"]}