clawup 1.0.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 (190) hide show
  1. package/README.md +245 -0
  2. package/dist/adapters/api-adapter.d.ts +76 -0
  3. package/dist/adapters/api-adapter.js +250 -0
  4. package/dist/adapters/api-adapter.js.map +1 -0
  5. package/dist/adapters/cli-adapter.d.ts +15 -0
  6. package/dist/adapters/cli-adapter.js +208 -0
  7. package/dist/adapters/cli-adapter.js.map +1 -0
  8. package/dist/adapters/index.d.ts +22 -0
  9. package/dist/adapters/index.js +32 -0
  10. package/dist/adapters/index.js.map +1 -0
  11. package/dist/adapters/types.d.ts +135 -0
  12. package/dist/adapters/types.js +14 -0
  13. package/dist/adapters/types.js.map +1 -0
  14. package/dist/bin.d.ts +8 -0
  15. package/dist/bin.js +221 -0
  16. package/dist/bin.js.map +1 -0
  17. package/dist/commands/config.d.ts +21 -0
  18. package/dist/commands/config.js +323 -0
  19. package/dist/commands/config.js.map +1 -0
  20. package/dist/commands/deploy.d.ts +7 -0
  21. package/dist/commands/deploy.js +13 -0
  22. package/dist/commands/deploy.js.map +1 -0
  23. package/dist/commands/destroy.d.ts +7 -0
  24. package/dist/commands/destroy.js +13 -0
  25. package/dist/commands/destroy.js.map +1 -0
  26. package/dist/commands/init.d.ts +13 -0
  27. package/dist/commands/init.js +698 -0
  28. package/dist/commands/init.js.map +1 -0
  29. package/dist/commands/list.d.ts +8 -0
  30. package/dist/commands/list.js +42 -0
  31. package/dist/commands/list.js.map +1 -0
  32. package/dist/commands/push.d.ts +7 -0
  33. package/dist/commands/push.js +19 -0
  34. package/dist/commands/push.js.map +1 -0
  35. package/dist/commands/redeploy.d.ts +7 -0
  36. package/dist/commands/redeploy.js +13 -0
  37. package/dist/commands/redeploy.js.map +1 -0
  38. package/dist/commands/secrets.d.ts +16 -0
  39. package/dist/commands/secrets.js +169 -0
  40. package/dist/commands/secrets.js.map +1 -0
  41. package/dist/commands/ssh.d.ts +9 -0
  42. package/dist/commands/ssh.js +108 -0
  43. package/dist/commands/ssh.js.map +1 -0
  44. package/dist/commands/status.d.ts +7 -0
  45. package/dist/commands/status.js +13 -0
  46. package/dist/commands/status.js.map +1 -0
  47. package/dist/commands/update.d.ts +7 -0
  48. package/dist/commands/update.js +126 -0
  49. package/dist/commands/update.js.map +1 -0
  50. package/dist/commands/validate.d.ts +7 -0
  51. package/dist/commands/validate.js +13 -0
  52. package/dist/commands/validate.js.map +1 -0
  53. package/dist/commands/webhooks.d.ts +7 -0
  54. package/dist/commands/webhooks.js +13 -0
  55. package/dist/commands/webhooks.js.map +1 -0
  56. package/dist/lib/__tests__/identity.test.d.ts +1 -0
  57. package/dist/lib/__tests__/identity.test.js +186 -0
  58. package/dist/lib/__tests__/identity.test.js.map +1 -0
  59. package/dist/lib/__tests__/validate-agent.test.d.ts +1 -0
  60. package/dist/lib/__tests__/validate-agent.test.js +38 -0
  61. package/dist/lib/__tests__/validate-agent.test.js.map +1 -0
  62. package/dist/lib/config.d.ts +69 -0
  63. package/dist/lib/config.js +218 -0
  64. package/dist/lib/config.js.map +1 -0
  65. package/dist/lib/constants.d.ts +5 -0
  66. package/dist/lib/constants.js +29 -0
  67. package/dist/lib/constants.js.map +1 -0
  68. package/dist/lib/exec.d.ts +24 -0
  69. package/dist/lib/exec.js +63 -0
  70. package/dist/lib/exec.js.map +1 -0
  71. package/dist/lib/prerequisites.d.ts +8 -0
  72. package/dist/lib/prerequisites.js +146 -0
  73. package/dist/lib/prerequisites.js.map +1 -0
  74. package/dist/lib/process.d.ts +18 -0
  75. package/dist/lib/process.js +37 -0
  76. package/dist/lib/process.js.map +1 -0
  77. package/dist/lib/pulumi.d.ts +37 -0
  78. package/dist/lib/pulumi.js +87 -0
  79. package/dist/lib/pulumi.js.map +1 -0
  80. package/dist/lib/tailscale.d.ts +75 -0
  81. package/dist/lib/tailscale.js +251 -0
  82. package/dist/lib/tailscale.js.map +1 -0
  83. package/dist/lib/tool-helpers.d.ts +15 -0
  84. package/dist/lib/tool-helpers.js +35 -0
  85. package/dist/lib/tool-helpers.js.map +1 -0
  86. package/dist/lib/ui.d.ts +26 -0
  87. package/dist/lib/ui.js +86 -0
  88. package/dist/lib/ui.js.map +1 -0
  89. package/dist/lib/update-check.d.ts +8 -0
  90. package/dist/lib/update-check.js +151 -0
  91. package/dist/lib/update-check.js.map +1 -0
  92. package/dist/lib/vendor.d.ts +34 -0
  93. package/dist/lib/vendor.js +128 -0
  94. package/dist/lib/vendor.js.map +1 -0
  95. package/dist/lib/workspace.d.ts +21 -0
  96. package/dist/lib/workspace.js +170 -0
  97. package/dist/lib/workspace.js.map +1 -0
  98. package/dist/tools/deploy.d.ts +16 -0
  99. package/dist/tools/deploy.js +181 -0
  100. package/dist/tools/deploy.js.map +1 -0
  101. package/dist/tools/destroy.d.ts +16 -0
  102. package/dist/tools/destroy.js +119 -0
  103. package/dist/tools/destroy.js.map +1 -0
  104. package/dist/tools/index.d.ts +20 -0
  105. package/dist/tools/index.js +34 -0
  106. package/dist/tools/index.js.map +1 -0
  107. package/dist/tools/push.d.ts +29 -0
  108. package/dist/tools/push.js +341 -0
  109. package/dist/tools/push.js.map +1 -0
  110. package/dist/tools/redeploy.d.ts +17 -0
  111. package/dist/tools/redeploy.js +181 -0
  112. package/dist/tools/redeploy.js.map +1 -0
  113. package/dist/tools/status.d.ts +16 -0
  114. package/dist/tools/status.js +205 -0
  115. package/dist/tools/status.js.map +1 -0
  116. package/dist/tools/validate.d.ts +16 -0
  117. package/dist/tools/validate.js +219 -0
  118. package/dist/tools/validate.js.map +1 -0
  119. package/dist/tools/webhooks.d.ts +17 -0
  120. package/dist/tools/webhooks.js +181 -0
  121. package/dist/tools/webhooks.js.map +1 -0
  122. package/dist/types.d.ts +6 -0
  123. package/dist/types.js +10 -0
  124. package/dist/types.js.map +1 -0
  125. package/infra/Pulumi.yaml +6 -0
  126. package/infra/dist/components/cloud-init.js +412 -0
  127. package/infra/dist/components/config-generator.js +254 -0
  128. package/infra/dist/components/hetzner-agent.js +162 -0
  129. package/infra/dist/components/index.js +18 -0
  130. package/infra/dist/components/openclaw-agent.js +287 -0
  131. package/infra/dist/components/shared.js +132 -0
  132. package/infra/dist/components/types.js +6 -0
  133. package/infra/dist/index.js +387 -0
  134. package/infra/dist/shared-vpc.js +167 -0
  135. package/infra/node_modules/@clawup/core/dist/__tests__/schemas.test.d.ts +2 -0
  136. package/infra/node_modules/@clawup/core/dist/__tests__/schemas.test.d.ts.map +1 -0
  137. package/infra/node_modules/@clawup/core/dist/__tests__/schemas.test.js +124 -0
  138. package/infra/node_modules/@clawup/core/dist/__tests__/schemas.test.js.map +1 -0
  139. package/infra/node_modules/@clawup/core/dist/coding-agent-registry.d.ts +32 -0
  140. package/infra/node_modules/@clawup/core/dist/coding-agent-registry.d.ts.map +1 -0
  141. package/infra/node_modules/@clawup/core/dist/coding-agent-registry.js +56 -0
  142. package/infra/node_modules/@clawup/core/dist/coding-agent-registry.js.map +1 -0
  143. package/infra/node_modules/@clawup/core/dist/constants.d.ts +137 -0
  144. package/infra/node_modules/@clawup/core/dist/constants.d.ts.map +1 -0
  145. package/infra/node_modules/@clawup/core/dist/constants.js +314 -0
  146. package/infra/node_modules/@clawup/core/dist/constants.js.map +1 -0
  147. package/infra/node_modules/@clawup/core/dist/dep-registry.d.ts +25 -0
  148. package/infra/node_modules/@clawup/core/dist/dep-registry.d.ts.map +1 -0
  149. package/infra/node_modules/@clawup/core/dist/dep-registry.js +46 -0
  150. package/infra/node_modules/@clawup/core/dist/dep-registry.js.map +1 -0
  151. package/infra/node_modules/@clawup/core/dist/deps.d.ts +18 -0
  152. package/infra/node_modules/@clawup/core/dist/deps.d.ts.map +1 -0
  153. package/infra/node_modules/@clawup/core/dist/deps.js +39 -0
  154. package/infra/node_modules/@clawup/core/dist/deps.js.map +1 -0
  155. package/infra/node_modules/@clawup/core/dist/identity.d.ts +20 -0
  156. package/infra/node_modules/@clawup/core/dist/identity.d.ts.map +1 -0
  157. package/infra/node_modules/@clawup/core/dist/identity.js +217 -0
  158. package/infra/node_modules/@clawup/core/dist/identity.js.map +1 -0
  159. package/infra/node_modules/@clawup/core/dist/index.d.ts +18 -0
  160. package/infra/node_modules/@clawup/core/dist/index.d.ts.map +1 -0
  161. package/infra/node_modules/@clawup/core/dist/index.js +52 -0
  162. package/infra/node_modules/@clawup/core/dist/index.js.map +1 -0
  163. package/infra/node_modules/@clawup/core/dist/plugin-registry.d.ts +13 -0
  164. package/infra/node_modules/@clawup/core/dist/plugin-registry.d.ts.map +1 -0
  165. package/infra/node_modules/@clawup/core/dist/plugin-registry.js +24 -0
  166. package/infra/node_modules/@clawup/core/dist/plugin-registry.js.map +1 -0
  167. package/infra/node_modules/@clawup/core/dist/schemas/identity.d.ts +74 -0
  168. package/infra/node_modules/@clawup/core/dist/schemas/identity.d.ts.map +1 -0
  169. package/infra/node_modules/@clawup/core/dist/schemas/identity.js +45 -0
  170. package/infra/node_modules/@clawup/core/dist/schemas/identity.js.map +1 -0
  171. package/infra/node_modules/@clawup/core/dist/schemas/index.d.ts +6 -0
  172. package/infra/node_modules/@clawup/core/dist/schemas/index.d.ts.map +1 -0
  173. package/infra/node_modules/@clawup/core/dist/schemas/index.js +13 -0
  174. package/infra/node_modules/@clawup/core/dist/schemas/index.js.map +1 -0
  175. package/infra/node_modules/@clawup/core/dist/schemas/manifest.d.ts +159 -0
  176. package/infra/node_modules/@clawup/core/dist/schemas/manifest.d.ts.map +1 -0
  177. package/infra/node_modules/@clawup/core/dist/schemas/manifest.js +54 -0
  178. package/infra/node_modules/@clawup/core/dist/schemas/manifest.js.map +1 -0
  179. package/infra/node_modules/@clawup/core/dist/skills.d.ts +30 -0
  180. package/infra/node_modules/@clawup/core/dist/skills.d.ts.map +1 -0
  181. package/infra/node_modules/@clawup/core/dist/skills.js +52 -0
  182. package/infra/node_modules/@clawup/core/dist/skills.js.map +1 -0
  183. package/infra/node_modules/@clawup/core/dist/types.d.ts +59 -0
  184. package/infra/node_modules/@clawup/core/dist/types.d.ts.map +1 -0
  185. package/infra/node_modules/@clawup/core/dist/types.js +30 -0
  186. package/infra/node_modules/@clawup/core/dist/types.js.map +1 -0
  187. package/infra/node_modules/@clawup/core/package.json +46 -0
  188. package/infra/package.json +12 -0
  189. package/package.json +43 -0
  190. package/scripts/postinstall.mjs +395 -0
@@ -0,0 +1,208 @@
1
+ "use strict";
2
+ /**
3
+ * CLI Runtime Adapter
4
+ *
5
+ * Implements RuntimeAdapter for interactive terminal usage
6
+ * using @clack/prompts for UI and child_process for execution.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ var __importDefault = (this && this.__importDefault) || function (mod) {
42
+ return (mod && mod.__esModule) ? mod : { "default": mod };
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.cliAdapter = void 0;
46
+ exports.createCLIAdapter = createCLIAdapter;
47
+ const p = __importStar(require("@clack/prompts"));
48
+ const picocolors_1 = __importDefault(require("picocolors"));
49
+ const child_process_1 = require("child_process");
50
+ const process_1 = require("../lib/process");
51
+ const vendor_1 = require("../lib/vendor");
52
+ // ============================================================================
53
+ // Execution Adapter Implementation
54
+ // ============================================================================
55
+ class CLIExecAdapter {
56
+ capture(command, args = [], cwd) {
57
+ const resolved = (0, vendor_1.resolveCommand)(command);
58
+ try {
59
+ const result = (0, child_process_1.execSync)([resolved, ...args].join(" "), {
60
+ cwd,
61
+ encoding: "utf-8",
62
+ stdio: ["pipe", "pipe", "pipe"],
63
+ });
64
+ return { stdout: result.trim(), stderr: "", exitCode: 0 };
65
+ }
66
+ catch (err) {
67
+ const e = err;
68
+ return {
69
+ stdout: (e.stdout ?? "").toString().trim(),
70
+ stderr: (e.stderr ?? "").toString().trim(),
71
+ exitCode: e.status ?? 1,
72
+ };
73
+ }
74
+ }
75
+ stream(command, args = [], options) {
76
+ const resolved = (0, vendor_1.resolveCommand)(command);
77
+ return new Promise((resolve) => {
78
+ const opts = {
79
+ cwd: options?.cwd,
80
+ stdio: options?.capture ? "pipe" : "inherit",
81
+ shell: true,
82
+ };
83
+ const child = (0, child_process_1.spawn)(resolved, args, opts);
84
+ (0, process_1.trackChild)(child);
85
+ child.on("close", (code) => resolve(code ?? 1));
86
+ child.on("error", (err) => {
87
+ console.warn(`[exec] Child process error: ${err.message}`);
88
+ resolve(1);
89
+ });
90
+ });
91
+ }
92
+ commandExists(command) {
93
+ return (0, vendor_1.commandExistsWithVendor)(command);
94
+ }
95
+ }
96
+ // ============================================================================
97
+ // UI Adapter Implementation
98
+ // ============================================================================
99
+ class CLIUIAdapter {
100
+ intro(message) {
101
+ console.log();
102
+ p.intro(picocolors_1.default.bgCyan(picocolors_1.default.black(` ${message} `)));
103
+ }
104
+ note(content, title) {
105
+ p.note(content, title);
106
+ }
107
+ outro(message) {
108
+ p.outro(message);
109
+ }
110
+ cancel(message) {
111
+ p.cancel(message);
112
+ process.exit(0);
113
+ }
114
+ log = {
115
+ info(message) {
116
+ p.log.info(message);
117
+ },
118
+ step(message) {
119
+ p.log.step(message);
120
+ },
121
+ success(message) {
122
+ p.log.success(message);
123
+ },
124
+ warn(message) {
125
+ p.log.warn(message);
126
+ },
127
+ error(message) {
128
+ p.log.error(message);
129
+ },
130
+ };
131
+ async text(options) {
132
+ const result = await p.text({
133
+ message: options.message,
134
+ placeholder: options.placeholder,
135
+ defaultValue: options.defaultValue,
136
+ validate: options.validate,
137
+ });
138
+ if (p.isCancel(result)) {
139
+ this.cancel("Operation cancelled.");
140
+ }
141
+ return result;
142
+ }
143
+ async confirm(options) {
144
+ const result = await p.confirm({
145
+ message: options.message,
146
+ initialValue: options.initialValue,
147
+ });
148
+ if (p.isCancel(result)) {
149
+ this.cancel("Operation cancelled.");
150
+ }
151
+ return result;
152
+ }
153
+ async select(options) {
154
+ const result = await p.select({
155
+ message: options.message,
156
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
157
+ options: options.options,
158
+ initialValue: options.initialValue,
159
+ });
160
+ if (p.isCancel(result)) {
161
+ this.cancel("Operation cancelled.");
162
+ }
163
+ return result;
164
+ }
165
+ async multiSelect(options) {
166
+ const result = await p.multiselect({
167
+ message: options.message,
168
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
169
+ options: options.options,
170
+ initialValues: options.initialValues,
171
+ required: options.required,
172
+ });
173
+ if (p.isCancel(result)) {
174
+ this.cancel("Operation cancelled.");
175
+ }
176
+ return result;
177
+ }
178
+ spinner(message) {
179
+ const s = p.spinner();
180
+ s.start(message);
181
+ return {
182
+ stop(msg, code) {
183
+ s.stop(msg, code);
184
+ },
185
+ message(msg) {
186
+ s.message(msg);
187
+ },
188
+ };
189
+ }
190
+ }
191
+ // ============================================================================
192
+ // Runtime Adapter
193
+ // ============================================================================
194
+ /**
195
+ * Create a CLI runtime adapter for interactive terminal usage
196
+ */
197
+ function createCLIAdapter() {
198
+ return {
199
+ ui: new CLIUIAdapter(),
200
+ exec: new CLIExecAdapter(),
201
+ platform: "cli",
202
+ };
203
+ }
204
+ /**
205
+ * Singleton CLI adapter instance for convenience
206
+ */
207
+ exports.cliAdapter = createCLIAdapter();
208
+ //# sourceMappingURL=cli-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-adapter.js","sourceRoot":"","sources":["../../adapters/cli-adapter.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4LH,4CAMC;AAhMD,kDAAoC;AACpC,4DAA4B;AAC5B,iDAA8E;AAC9E,4CAA4C;AAC5C,0CAAwE;AAcxE,+EAA+E;AAC/E,mCAAmC;AACnC,+EAA+E;AAE/E,MAAM,cAAc;IAClB,OAAO,CAAC,OAAe,EAAE,OAAiB,EAAE,EAAE,GAAY;QACxD,MAAM,QAAQ,GAAG,IAAA,uBAAc,EAAC,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAA,wBAAQ,EAAC,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBACrD,GAAG;gBACH,QAAQ,EAAE,OAAO;gBACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;aAChC,CAAC,CAAC;YACH,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;QAC5D,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACtB,MAAM,CAAC,GAAG,GAA4D,CAAC;YACvE,OAAO;gBACL,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,QAAQ,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CAAC,MAAM,CAAC,EAAE,CAAC;YACvB,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;QACtC,CAAC;QAED,OAAO,MAAa,CAAC;IACvB,CAAC;IAED,OAAO,CAAC,OAAe;QACrB,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;QACtB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACjB,OAAO;YACL,IAAI,CAAC,GAAY,EAAE,IAAa;gBAC9B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACpB,CAAC;YACD,OAAO,CAAC,GAAW;gBACjB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACjB,CAAC;SACF,CAAC;IACJ,CAAC;CACF;AAED,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E;;GAEG;AACH,SAAgB,gBAAgB;IAC9B,OAAO;QACL,EAAE,EAAE,IAAI,YAAY,EAAE;QACtB,IAAI,EAAE,IAAI,cAAc,EAAE;QAC1B,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC;AAED;;GAEG;AACU,QAAA,UAAU,GAAG,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Runtime Adapters Module
3
+ *
4
+ * Provides platform-agnostic abstractions for UI and execution,
5
+ * enabling the same core command logic to run in different environments.
6
+ *
7
+ * @example
8
+ * import { createCLIAdapter, type RuntimeAdapter, type ToolImplementation } from './adapters';
9
+ *
10
+ * const myTool: ToolImplementation<{ name: string }> = async (runtime, options) => {
11
+ * runtime.ui.intro("My Tool");
12
+ * const name = options.name || await runtime.ui.text({ message: "Enter name:" });
13
+ * runtime.ui.log.success(`Hello, ${name}!`);
14
+ * };
15
+ *
16
+ * // Run with CLI adapter
17
+ * await myTool(createCLIAdapter(), { name: "World" });
18
+ */
19
+ export type { RuntimeAdapter, UIAdapter, ExecAdapter, LogAdapter, ExecResult, TextOptions, ConfirmOptions, SelectOptions, SelectOption, MultiSelectOptions, SpinnerController, StreamOptions, ToolImplementation, ToolDefinition, } from "./types";
20
+ export { createCLIAdapter, cliAdapter } from "./cli-adapter";
21
+ export { createAPIAdapter, APIAdapterNeedsInputError, APIAdapterValidationError, APIAdapterCancelError, } from "./api-adapter";
22
+ export type { FieldDescriptor, LogEntry, APIResponse } from "./api-adapter";
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ * Runtime Adapters Module
4
+ *
5
+ * Provides platform-agnostic abstractions for UI and execution,
6
+ * enabling the same core command logic to run in different environments.
7
+ *
8
+ * @example
9
+ * import { createCLIAdapter, type RuntimeAdapter, type ToolImplementation } from './adapters';
10
+ *
11
+ * const myTool: ToolImplementation<{ name: string }> = async (runtime, options) => {
12
+ * runtime.ui.intro("My Tool");
13
+ * const name = options.name || await runtime.ui.text({ message: "Enter name:" });
14
+ * runtime.ui.log.success(`Hello, ${name}!`);
15
+ * };
16
+ *
17
+ * // Run with CLI adapter
18
+ * await myTool(createCLIAdapter(), { name: "World" });
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.APIAdapterCancelError = exports.APIAdapterValidationError = exports.APIAdapterNeedsInputError = exports.createAPIAdapter = exports.cliAdapter = exports.createCLIAdapter = void 0;
22
+ // Export CLI adapter
23
+ var cli_adapter_1 = require("./cli-adapter");
24
+ Object.defineProperty(exports, "createCLIAdapter", { enumerable: true, get: function () { return cli_adapter_1.createCLIAdapter; } });
25
+ Object.defineProperty(exports, "cliAdapter", { enumerable: true, get: function () { return cli_adapter_1.cliAdapter; } });
26
+ // Export API adapter
27
+ var api_adapter_1 = require("./api-adapter");
28
+ Object.defineProperty(exports, "createAPIAdapter", { enumerable: true, get: function () { return api_adapter_1.createAPIAdapter; } });
29
+ Object.defineProperty(exports, "APIAdapterNeedsInputError", { enumerable: true, get: function () { return api_adapter_1.APIAdapterNeedsInputError; } });
30
+ Object.defineProperty(exports, "APIAdapterValidationError", { enumerable: true, get: function () { return api_adapter_1.APIAdapterValidationError; } });
31
+ Object.defineProperty(exports, "APIAdapterCancelError", { enumerable: true, get: function () { return api_adapter_1.APIAdapterCancelError; } });
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../adapters/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAoBH,qBAAqB;AACrB,6CAA6D;AAApD,+GAAA,gBAAgB,OAAA;AAAE,yGAAA,UAAU,OAAA;AAErC,qBAAqB;AACrB,6CAKuB;AAJrB,+GAAA,gBAAgB,OAAA;AAChB,wHAAA,yBAAyB,OAAA;AACzB,wHAAA,yBAAyB,OAAA;AACzB,oHAAA,qBAAqB,OAAA"}
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Runtime Adapter Interfaces
3
+ *
4
+ * These interfaces define the contract between the core command logic
5
+ * and the runtime environment (CLI, API server, etc.).
6
+ *
7
+ * This pattern allows the same core to run with different adapters:
8
+ * - CLIAdapter: Interactive terminal with @clack/prompts
9
+ * - APIAdapter: HTTP server returning JSON responses (future)
10
+ * - TestAdapter: Mock adapter for testing (future)
11
+ */
12
+ /** Result of a captured command execution */
13
+ export interface ExecResult {
14
+ stdout: string;
15
+ stderr: string;
16
+ exitCode: number;
17
+ }
18
+ /** Options for streaming command execution */
19
+ export interface StreamOptions {
20
+ cwd?: string;
21
+ /** If true, capture output instead of streaming to console */
22
+ capture?: boolean;
23
+ }
24
+ /** Select option for prompts */
25
+ export interface SelectOption<T> {
26
+ value: T;
27
+ label: string;
28
+ hint?: string;
29
+ }
30
+ /** Text input options */
31
+ export interface TextOptions {
32
+ message: string;
33
+ placeholder?: string;
34
+ defaultValue?: string;
35
+ validate?: (value: string) => string | undefined;
36
+ }
37
+ /** Confirm options */
38
+ export interface ConfirmOptions {
39
+ message: string;
40
+ initialValue?: boolean;
41
+ }
42
+ /** Select options */
43
+ export interface SelectOptions<T> {
44
+ message: string;
45
+ options: SelectOption<T>[];
46
+ initialValue?: T;
47
+ }
48
+ /** Multi-select options */
49
+ export interface MultiSelectOptions<T> {
50
+ message: string;
51
+ options: SelectOption<T>[];
52
+ initialValues?: T[];
53
+ required?: boolean;
54
+ }
55
+ /** Logging interface */
56
+ export interface LogAdapter {
57
+ info(message: string): void;
58
+ step(message: string): void;
59
+ success(message: string): void;
60
+ warn(message: string): void;
61
+ error(message: string): void;
62
+ }
63
+ /** User interface adapter for prompts and output */
64
+ export interface UIAdapter {
65
+ /** Show introductory banner/message */
66
+ intro(message: string): void;
67
+ /** Show a note/info box */
68
+ note(content: string, title?: string): void;
69
+ /** Show outro/closing message */
70
+ outro(message: string): void;
71
+ /** Show cancellation message and exit */
72
+ cancel(message: string): never;
73
+ /** Logging methods */
74
+ log: LogAdapter;
75
+ /** Prompt for text input */
76
+ text(options: TextOptions): Promise<string>;
77
+ /** Prompt for yes/no confirmation */
78
+ confirm(options: ConfirmOptions): Promise<boolean>;
79
+ /** Prompt for single selection */
80
+ select<T>(options: SelectOptions<T>): Promise<T>;
81
+ /** Prompt for multiple selection */
82
+ multiSelect<T>(options: MultiSelectOptions<T>): Promise<T[]>;
83
+ /** Start a loading spinner */
84
+ spinner(message: string): SpinnerController;
85
+ }
86
+ /** Spinner control interface */
87
+ export interface SpinnerController {
88
+ stop(message?: string, code?: number): void;
89
+ message(msg: string): void;
90
+ }
91
+ /** Command execution adapter */
92
+ export interface ExecAdapter {
93
+ /** Execute a command and capture output */
94
+ capture(command: string, args?: string[], cwd?: string): ExecResult;
95
+ /** Execute a command with streaming output, returns exit code */
96
+ stream(command: string, args?: string[], options?: StreamOptions): Promise<number>;
97
+ /** Check if a command exists on the system */
98
+ commandExists(command: string): boolean;
99
+ }
100
+ /** Combined runtime adapter providing all platform abstractions */
101
+ export interface RuntimeAdapter {
102
+ /** User interface adapter */
103
+ ui: UIAdapter;
104
+ /** Command execution adapter */
105
+ exec: ExecAdapter;
106
+ /** Platform identifier for conditional logic */
107
+ platform: "cli" | "api" | "test";
108
+ }
109
+ /**
110
+ * A tool implementation is a function that performs a command action
111
+ * using the provided runtime adapter. This allows the same logic to
112
+ * work across different runtime environments.
113
+ *
114
+ * @example
115
+ * const deployTool: ToolImplementation<DeployOptions> = async (runtime, options) => {
116
+ * const { ui, exec } = runtime;
117
+ * ui.intro("Deploying agents...");
118
+ * const result = exec.capture("pulumi", ["up", "--yes"]);
119
+ * if (result.exitCode !== 0) {
120
+ * ui.log.error("Deployment failed");
121
+ * }
122
+ * };
123
+ */
124
+ export type ToolImplementation<TOptions = Record<string, unknown>> = (runtime: RuntimeAdapter, options: TOptions) => Promise<void>;
125
+ /**
126
+ * Tool definition with metadata
127
+ */
128
+ export interface ToolDefinition<TOptions = Record<string, unknown>> {
129
+ /** Tool name/identifier */
130
+ name: string;
131
+ /** Human-readable description */
132
+ description: string;
133
+ /** The implementation function */
134
+ execute: ToolImplementation<TOptions>;
135
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * Runtime Adapter Interfaces
4
+ *
5
+ * These interfaces define the contract between the core command logic
6
+ * and the runtime environment (CLI, API server, etc.).
7
+ *
8
+ * This pattern allows the same core to run with different adapters:
9
+ * - CLIAdapter: Interactive terminal with @clack/prompts
10
+ * - APIAdapter: HTTP server returning JSON responses (future)
11
+ * - TestAdapter: Mock adapter for testing (future)
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../adapters/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG"}
package/dist/bin.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Agent Army CLI — Entry point
4
+ *
5
+ * Provides interactive commands for the full agent lifecycle:
6
+ * init, deploy, redeploy, status, ssh, validate, destroy, config
7
+ */
8
+ export {};
package/dist/bin.js ADDED
@@ -0,0 +1,221 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ /**
4
+ * Agent Army CLI — Entry point
5
+ *
6
+ * Provides interactive commands for the full agent lifecycle:
7
+ * init, deploy, redeploy, status, ssh, validate, destroy, config
8
+ */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || (function () {
26
+ var ownKeys = function(o) {
27
+ ownKeys = Object.getOwnPropertyNames || function (o) {
28
+ var ar = [];
29
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
+ return ar;
31
+ };
32
+ return ownKeys(o);
33
+ };
34
+ return function (mod) {
35
+ if (mod && mod.__esModule) return mod;
36
+ var result = {};
37
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
+ __setModuleDefault(result, mod);
39
+ return result;
40
+ };
41
+ })();
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ const fs = __importStar(require("fs"));
44
+ const path = __importStar(require("path"));
45
+ const commander_1 = require("commander");
46
+ const process_1 = require("./lib/process");
47
+ const init_1 = require("./commands/init");
48
+ const deploy_1 = require("./commands/deploy");
49
+ const status_1 = require("./commands/status");
50
+ const ssh_1 = require("./commands/ssh");
51
+ const validate_1 = require("./commands/validate");
52
+ const push_1 = require("./commands/push");
53
+ const destroy_1 = require("./commands/destroy");
54
+ const list_1 = require("./commands/list");
55
+ const update_1 = require("./commands/update");
56
+ const config_1 = require("./commands/config");
57
+ const secrets_1 = require("./commands/secrets");
58
+ const redeploy_1 = require("./commands/redeploy");
59
+ const webhooks_1 = require("./commands/webhooks");
60
+ const update_check_1 = require("./lib/update-check");
61
+ // Forward SIGINT/SIGTERM to child processes before exiting
62
+ (0, process_1.setupGracefulShutdown)();
63
+ // Read version from package.json so it stays in sync with npm publish
64
+ const pkgJson = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf-8"));
65
+ const program = new commander_1.Command();
66
+ program
67
+ .name("clawup")
68
+ .description("Deploy and manage a fleet of OpenClaw AI agents on AWS")
69
+ .version(pkgJson.version);
70
+ program
71
+ .command("init")
72
+ .description("Interactive setup wizard — configure stack, secrets, and agents")
73
+ .option("--deploy", "Deploy immediately after init")
74
+ .option("-y, --yes", "Skip confirmation prompt (for deploy)")
75
+ .action(async (opts) => {
76
+ await (0, init_1.initCommand)(opts);
77
+ });
78
+ program
79
+ .command("deploy")
80
+ .description("Deploy agents with pulumi up")
81
+ .option("-y, --yes", "Skip confirmation prompt")
82
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
83
+ .action(async (opts) => {
84
+ await (0, deploy_1.deployCommand)(opts);
85
+ });
86
+ program
87
+ .command("status")
88
+ .description("Show agent statuses from stack outputs")
89
+ .option("--json", "Output as JSON")
90
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
91
+ .action(async (opts) => {
92
+ await (0, status_1.statusCommand)(opts);
93
+ });
94
+ program
95
+ .command("ssh <agent>")
96
+ .description("SSH to an agent by name or alias (juno, titus, scout)")
97
+ .option("-u, --user <user>", "SSH user")
98
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
99
+ .argument("[command...]", "Command to run on the agent")
100
+ .action(async (agent, commandArgs, opts) => {
101
+ await (0, ssh_1.sshCommand)(agent, commandArgs, opts);
102
+ });
103
+ program
104
+ .command("validate")
105
+ .description("Health check agents via Tailscale SSH")
106
+ .option("-t, --timeout <seconds>", "SSH timeout in seconds", "30")
107
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
108
+ .action(async (opts) => {
109
+ await (0, validate_1.validateCommand)(opts);
110
+ });
111
+ program
112
+ .command("push")
113
+ .description("Push workspace files, skills, and config to running agents")
114
+ .option("--skills", "Sync skills to remote workspace")
115
+ .option("--workspace", "Sync workspace files from identity")
116
+ .option("--memory-reset", "Remove remote memory/ dir and MEMORY.md")
117
+ .option("--openclaw", "Upgrade openclaw to latest + restart gateway")
118
+ .option("--config-push", "Copy local openclaw.json to remote + restart gateway")
119
+ .option("-a, --agent <name>", "Target a single agent (name, role, or alias)")
120
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
121
+ .action(async (opts) => {
122
+ await (0, push_1.pushCommand)({
123
+ skills: opts.skills,
124
+ workspace: opts.workspace,
125
+ memoryReset: opts.memoryReset,
126
+ openclaw: opts.openclaw,
127
+ pushConfig: opts.configPush,
128
+ agent: opts.agent,
129
+ config: opts.config,
130
+ });
131
+ });
132
+ program
133
+ .command("redeploy")
134
+ .description("Update agents in-place without destroying infrastructure")
135
+ .option("-y, --yes", "Skip confirmation prompt")
136
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
137
+ .action(async (opts) => {
138
+ await (0, redeploy_1.redeployCommand)(opts);
139
+ });
140
+ program
141
+ .command("destroy")
142
+ .description("Tear down all resources with safety confirmations")
143
+ .option("-y, --yes", "Skip confirmation prompts (dangerous!)")
144
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
145
+ .action(async (opts) => {
146
+ await (0, destroy_1.destroyCommand)(opts);
147
+ });
148
+ program
149
+ .command("list")
150
+ .description("List all saved configs")
151
+ .option("--json", "Output as JSON")
152
+ .action(async (opts) => {
153
+ await (0, list_1.listCommand)(opts);
154
+ });
155
+ const configCmd = program
156
+ .command("config")
157
+ .description("View or modify config without re-running init");
158
+ configCmd
159
+ .command("show")
160
+ .description("Display current config")
161
+ .option("--json", "Output as JSON")
162
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
163
+ .action(async (opts) => {
164
+ await (0, config_1.configShowCommand)(opts);
165
+ });
166
+ configCmd
167
+ .command("set <key> <value>")
168
+ .description("Update a config value")
169
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
170
+ .option("-a, --agent <name>", "Target a specific agent")
171
+ .action(async (key, value, opts) => {
172
+ await (0, config_1.configSetCommand)(key, value, opts);
173
+ });
174
+ configCmd
175
+ .command("migrate")
176
+ .description("Migrate plugin config files into the manifest (one-time upgrade)")
177
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
178
+ .action(async (opts) => {
179
+ await (0, config_1.configMigrateCommand)(opts);
180
+ });
181
+ const secretsCmd = program
182
+ .command("secrets")
183
+ .description("View or update Pulumi secrets without re-running init");
184
+ secretsCmd
185
+ .command("set <key> <value>")
186
+ .description("Set a secret (e.g. braveApiKey, anthropicApiKey)")
187
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
188
+ .option("-a, --agent <role>", "Agent role for per-agent secrets (e.g. eng, pm, tester)")
189
+ .action(async (key, value, opts) => {
190
+ await (0, secrets_1.secretsSetCommand)(key, value, opts);
191
+ });
192
+ secretsCmd
193
+ .command("list")
194
+ .description("Show which secrets are configured (values redacted)")
195
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
196
+ .action(async (opts) => {
197
+ await (0, secrets_1.secretsListCommand)(opts);
198
+ });
199
+ const webhooksCmd = program
200
+ .command("webhooks")
201
+ .description("Manage agent webhooks");
202
+ webhooksCmd
203
+ .command("setup")
204
+ .description("Configure Linear webhooks for deployed agents")
205
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
206
+ .action(async (opts) => {
207
+ await (0, webhooks_1.webhooksSetupCommand)(opts);
208
+ });
209
+ program
210
+ .command("update")
211
+ .description("Update clawup CLI to the latest version")
212
+ .action(async (opts) => {
213
+ await (0, update_1.updateCommand)(opts);
214
+ });
215
+ // Fire-and-forget update check — must run before parse() because
216
+ // Commander's --help/--version call process.exit() synchronously.
217
+ // The cached path (no await) prints the notice before exit;
218
+ // the stale-cache path fetches in the background for the next run.
219
+ (0, update_check_1.checkForUpdates)(pkgJson.version).catch(() => { });
220
+ program.parse();
221
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../bin.ts"],"names":[],"mappings":";;AAEA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,yCAAoC;AACpC,2CAAsD;AACtD,0CAA8C;AAC9C,8CAAkD;AAClD,8CAAkD;AAClD,wCAA4C;AAC5C,kDAAsD;AACtD,0CAA8C;AAE9C,gDAAoD;AACpD,0CAA8C;AAC9C,8CAAkD;AAClD,8CAA8F;AAC9F,gDAA2E;AAC3E,kDAAsD;AACtD,kDAA2D;AAC3D,qDAAqD;AAErD,2DAA2D;AAC3D,IAAA,+BAAqB,GAAE,CAAC;AAExB,sEAAsE;AACtE,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;AAEjG,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,wDAAwD,CAAC;KACrE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAE5B,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,iEAAiE,CAAC;KAC9E,MAAM,CAAC,UAAU,EAAE,+BAA+B,CAAC;KACnD,MAAM,CAAC,WAAW,EAAE,uCAAuC,CAAC;KAC5D,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE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