agent-army 0.1.12 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -49,6 +49,7 @@ const deploy_1 = require("./commands/deploy");
49
49
  const status_1 = require("./commands/status");
50
50
  const ssh_1 = require("./commands/ssh");
51
51
  const validate_1 = require("./commands/validate");
52
+ const push_1 = require("./commands/push");
52
53
  const destroy_1 = require("./commands/destroy");
53
54
  const list_1 = require("./commands/list");
54
55
  const update_1 = require("./commands/update");
@@ -105,6 +106,27 @@ program
105
106
  .action(async (opts) => {
106
107
  await (0, validate_1.validateCommand)(opts);
107
108
  });
109
+ program
110
+ .command("push")
111
+ .description("Push workspace files, skills, and config to running agents")
112
+ .option("--skills", "Sync presets/skills/ to remote workspace")
113
+ .option("--workspace", "Sync role-specific preset files + base AGENTS.md")
114
+ .option("--memory-reset", "Remove remote memory/ dir and MEMORY.md")
115
+ .option("--openclaw", "Upgrade openclaw to latest + restart gateway")
116
+ .option("--config-push", "Copy local openclaw.json to remote + restart gateway")
117
+ .option("-a, --agent <name>", "Target a single agent (name, role, or alias)")
118
+ .option("-c, --config <name>", "Config name (auto-detected if only one)")
119
+ .action(async (opts) => {
120
+ await (0, push_1.pushCommand)({
121
+ skills: opts.skills,
122
+ workspace: opts.workspace,
123
+ memoryReset: opts.memoryReset,
124
+ openclaw: opts.openclaw,
125
+ pushConfig: opts.configPush,
126
+ agent: opts.agent,
127
+ config: opts.config,
128
+ });
129
+ });
108
130
  program
109
131
  .command("redeploy")
110
132
  .description("Update agents in-place without destroying infrastructure")
package/dist/bin.js.map CHANGED
@@ -1 +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;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AA,yBAAgB,EAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,6CAA6C,CAAC;KAC1D,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;IACrB,MAAM,IAAA,sBAAa,EAAC,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEL,iEAAiE;AACjE,kEAAkE;AAClE,4DAA4D;AAC5D,mEAAmE;AACnE,IAAA,8BAAe,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AAEjD,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * agent-army push — Live-update running agents via Tailscale SSH
3
+ *
4
+ * This command wraps the platform-agnostic pushTool with the CLI adapter.
5
+ */
6
+ import { type PushOptions } from "../tools";
7
+ export declare function pushCommand(opts: PushOptions): Promise<void>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /**
3
+ * agent-army push — Live-update running agents via Tailscale SSH
4
+ *
5
+ * This command wraps the platform-agnostic pushTool with the CLI adapter.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.pushCommand = pushCommand;
9
+ const tools_1 = require("../tools");
10
+ const ui_1 = require("../lib/ui");
11
+ async function pushCommand(opts) {
12
+ try {
13
+ await (0, tools_1.pushTool)((0, tools_1.createCLIAdapter)(), opts);
14
+ }
15
+ catch (err) {
16
+ (0, ui_1.exitWithError)(err instanceof Error ? err.message : String(err));
17
+ }
18
+ }
19
+ //# sourceMappingURL=push.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push.js","sourceRoot":"","sources":["../../commands/push.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAKH,kCAMC;AATD,oCAAwE;AACxE,kCAA0C;AAEnC,KAAK,UAAU,WAAW,CAAC,IAAiB;IACjD,IAAI,CAAC;QACH,MAAM,IAAA,gBAAQ,EAAC,IAAA,wBAAgB,GAAE,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAA,kBAAa,EAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAClE,CAAC;AACH,CAAC"}
@@ -15,4 +15,5 @@ export { statusTool, type StatusOptions } from "./status";
15
15
  export { validateTool, type ValidateOptions } from "./validate";
16
16
  export { destroyTool, type DestroyOptions } from "./destroy";
17
17
  export { redeployTool, type RedeployOptions } from "./redeploy";
18
+ export { pushTool, type PushOptions } from "./push";
18
19
  export { type RuntimeAdapter, type ToolImplementation, type ToolDefinition, createCLIAdapter, } from "../adapters";
@@ -12,7 +12,7 @@
12
12
  * await deployTool(createCLIAdapter(), { yes: false });
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.createCLIAdapter = exports.redeployTool = exports.destroyTool = exports.validateTool = exports.statusTool = exports.deployTool = void 0;
15
+ exports.createCLIAdapter = exports.pushTool = exports.redeployTool = exports.destroyTool = exports.validateTool = exports.statusTool = exports.deployTool = void 0;
16
16
  // Export all tools
17
17
  var deploy_1 = require("./deploy");
18
18
  Object.defineProperty(exports, "deployTool", { enumerable: true, get: function () { return deploy_1.deployTool; } });
@@ -24,6 +24,8 @@ var destroy_1 = require("./destroy");
24
24
  Object.defineProperty(exports, "destroyTool", { enumerable: true, get: function () { return destroy_1.destroyTool; } });
25
25
  var redeploy_1 = require("./redeploy");
26
26
  Object.defineProperty(exports, "redeployTool", { enumerable: true, get: function () { return redeploy_1.redeployTool; } });
27
+ var push_1 = require("./push");
28
+ Object.defineProperty(exports, "pushTool", { enumerable: true, get: function () { return push_1.pushTool; } });
27
29
  // Re-export adapter types and factory for convenience
28
30
  var adapters_1 = require("../adapters");
29
31
  Object.defineProperty(exports, "createCLIAdapter", { enumerable: true, get: function () { return adapters_1.createCLIAdapter; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../tools/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,mBAAmB;AACnB,mCAA0D;AAAjD,oGAAA,UAAU,OAAA;AACnB,mCAA0D;AAAjD,oGAAA,UAAU,OAAA;AACnB,uCAAgE;AAAvD,wGAAA,YAAY,OAAA;AACrB,qCAA6D;AAApD,sGAAA,WAAW,OAAA;AACpB,uCAAgE;AAAvD,wGAAA,YAAY,OAAA;AAErB,sDAAsD;AACtD,wCAKqB;AADnB,4GAAA,gBAAgB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../tools/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,mBAAmB;AACnB,mCAA0D;AAAjD,oGAAA,UAAU,OAAA;AACnB,mCAA0D;AAAjD,oGAAA,UAAU,OAAA;AACnB,uCAAgE;AAAvD,wGAAA,YAAY,OAAA;AACrB,qCAA6D;AAApD,sGAAA,WAAW,OAAA;AACpB,uCAAgE;AAAvD,wGAAA,YAAY,OAAA;AACrB,+BAAoD;AAA3C,gGAAA,QAAQ,OAAA;AAEjB,sDAAsD;AACtD,wCAKqB;AADnB,4GAAA,gBAAgB,OAAA"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Push Tool — Live-update running agents via Tailscale SSH
3
+ *
4
+ * Syncs workspace files, skills, config, and OpenClaw updates to
5
+ * running agent instances without redeploying infrastructure.
6
+ *
7
+ * Platform-agnostic implementation using RuntimeAdapter.
8
+ */
9
+ import type { ToolImplementation } from "../adapters";
10
+ export interface PushOptions {
11
+ /** Sync presets/skills/ to remote workspace */
12
+ skills?: boolean;
13
+ /** Sync role-specific preset files + base AGENTS.md to remote workspace */
14
+ workspace?: boolean;
15
+ /** Remove remote memory/ dir and MEMORY.md */
16
+ memoryReset?: boolean;
17
+ /** Run npm install -g openclaw@latest + gateway restart */
18
+ openclaw?: boolean;
19
+ /** Copy local openclaw.json to remote + gateway restart */
20
+ pushConfig?: boolean;
21
+ /** Filter to a single agent (name, role, or alias) */
22
+ agent?: string;
23
+ /** Config name (auto-detected if only one) */
24
+ config?: string;
25
+ }
26
+ /**
27
+ * Push tool implementation
28
+ */
29
+ export declare const pushTool: ToolImplementation<PushOptions>;
@@ -0,0 +1,342 @@
1
+ "use strict";
2
+ /**
3
+ * Push Tool — Live-update running agents via Tailscale SSH
4
+ *
5
+ * Syncs workspace files, skills, config, and OpenClaw updates to
6
+ * running agent instances without redeploying infrastructure.
7
+ *
8
+ * Platform-agnostic implementation using RuntimeAdapter.
9
+ */
10
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
22
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
23
+ }) : function(o, v) {
24
+ o["default"] = v;
25
+ });
26
+ var __importStar = (this && this.__importStar) || (function () {
27
+ var ownKeys = function(o) {
28
+ ownKeys = Object.getOwnPropertyNames || function (o) {
29
+ var ar = [];
30
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
31
+ return ar;
32
+ };
33
+ return ownKeys(o);
34
+ };
35
+ return function (mod) {
36
+ if (mod && mod.__esModule) return mod;
37
+ var result = {};
38
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
39
+ __setModuleDefault(result, mod);
40
+ return result;
41
+ };
42
+ })();
43
+ var __importDefault = (this && this.__importDefault) || function (mod) {
44
+ return (mod && mod.__esModule) ? mod : { "default": mod };
45
+ };
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.pushTool = void 0;
48
+ const fs = __importStar(require("fs"));
49
+ const path = __importStar(require("path"));
50
+ const config_1 = require("../lib/config");
51
+ const constants_1 = require("../lib/constants");
52
+ const workspace_1 = require("../lib/workspace");
53
+ const pulumi_1 = require("../lib/pulumi");
54
+ const picocolors_1 = __importDefault(require("picocolors"));
55
+ /** SSH options for non-interactive connections */
56
+ const SSH_OPTS = [
57
+ "-o", "StrictHostKeyChecking=no",
58
+ "-o", "UserKnownHostsFile=/dev/null",
59
+ "-o", "BatchMode=yes",
60
+ ];
61
+ const REMOTE_WORKSPACE = `/home/${constants_1.SSH_USER}/.openclaw/workspace`;
62
+ const REMOTE_SKILLS = `${REMOTE_WORKSPACE}/skills`;
63
+ /**
64
+ * Run a command over SSH, returning success/failure and output.
65
+ */
66
+ function sshExec(exec, host, command) {
67
+ const result = exec.capture("ssh", [
68
+ "-o", "ConnectTimeout=15",
69
+ ...SSH_OPTS,
70
+ `${constants_1.SSH_USER}@${host}`,
71
+ `"${command.replace(/"/g, '\\"')}"`,
72
+ ]);
73
+ return { ok: result.exitCode === 0, output: result.stdout || result.stderr };
74
+ }
75
+ /**
76
+ * Run rsync to sync a local directory to a remote path.
77
+ */
78
+ function rsyncDir(exec, localDir, host, remoteDir) {
79
+ // Ensure trailing slash on localDir so rsync syncs contents
80
+ const src = localDir.endsWith("/") ? localDir : `${localDir}/`;
81
+ const result = exec.capture("rsync", [
82
+ "-avz", "--delete",
83
+ "-e", `ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes`,
84
+ src,
85
+ `${constants_1.SSH_USER}@${host}:${remoteDir}/`,
86
+ ]);
87
+ return { ok: result.exitCode === 0, output: result.stdout || result.stderr };
88
+ }
89
+ /**
90
+ * Copy a single file to a remote path via scp.
91
+ */
92
+ function scpFile(exec, localFile, host, remotePath) {
93
+ const result = exec.capture("scp", [
94
+ ...SSH_OPTS,
95
+ localFile,
96
+ `${constants_1.SSH_USER}@${host}:${remotePath}`,
97
+ ]);
98
+ return { ok: result.exitCode === 0, output: result.stdout || result.stderr };
99
+ }
100
+ /**
101
+ * Resolve the presets directory.
102
+ * Dev mode: repo root is 3 levels up from cli/dist/tools/
103
+ * Installed mode: presets are bundled under cli/presets/ (via infra)
104
+ */
105
+ function resolvePresetsDir() {
106
+ // From cli/dist/tools/push.js → repo root → presets/
107
+ const devPath = path.resolve(__dirname, "..", "..", "..", "presets");
108
+ if (fs.existsSync(devPath))
109
+ return devPath;
110
+ // Fallback: check next to the infra dir (installed mode)
111
+ const installedPath = path.resolve(__dirname, "..", "..", "presets");
112
+ if (fs.existsSync(installedPath))
113
+ return installedPath;
114
+ throw new Error(`Presets directory not found. Searched:\n ${devPath}\n ${installedPath}`);
115
+ }
116
+ /**
117
+ * Resolve an agent query (name, role, alias, displayName) against the manifest.
118
+ */
119
+ function findAgent(agents, query) {
120
+ const q = query.toLowerCase();
121
+ const resolvedRole = constants_1.AGENT_ALIASES[q] ?? q;
122
+ return agents.find((a) => a.role === resolvedRole ||
123
+ a.name === q ||
124
+ a.name === `agent-${q}` ||
125
+ a.displayName.toLowerCase() === q);
126
+ }
127
+ /**
128
+ * Push tool implementation
129
+ */
130
+ const pushTool = async (runtime, options) => {
131
+ const { ui, exec } = runtime;
132
+ ui.intro("Agent Army");
133
+ // Ensure workspace is set up
134
+ const wsResult = (0, workspace_1.ensureWorkspace)();
135
+ if (!wsResult.ok) {
136
+ throw new Error(wsResult.error ?? "Failed to set up workspace.");
137
+ }
138
+ const cwd = (0, workspace_1.getWorkspaceDir)();
139
+ // Resolve config name and load manifest
140
+ let configName;
141
+ try {
142
+ configName = (0, config_1.resolveConfigName)(options.config);
143
+ }
144
+ catch (err) {
145
+ throw new Error(err.message);
146
+ }
147
+ const manifest = (0, config_1.loadManifest)(configName);
148
+ if (!manifest) {
149
+ throw new Error(`Config '${configName}' could not be loaded.`);
150
+ }
151
+ // Select Pulumi stack to read tailnet config
152
+ const stackResult = (0, pulumi_1.selectOrCreateStack)(manifest.stackName, cwd);
153
+ if (!stackResult.ok) {
154
+ throw new Error(`Could not select Pulumi stack "${manifest.stackName}".`);
155
+ }
156
+ // Get tailnet DNS name
157
+ const tailnetDnsName = (0, pulumi_1.getConfig)("tailnetDnsName", cwd);
158
+ if (!tailnetDnsName) {
159
+ throw new Error("Could not determine tailnet DNS name from Pulumi config.");
160
+ }
161
+ // Default behavior: if no flags are set, push skills + workspace
162
+ const noFlags = !options.skills && !options.workspace && !options.memoryReset &&
163
+ !options.openclaw && !options.pushConfig;
164
+ const doSkills = options.skills || noFlags;
165
+ const doWorkspace = options.workspace || noFlags;
166
+ // Resolve presets directory
167
+ let presetsDir;
168
+ try {
169
+ presetsDir = resolvePresetsDir();
170
+ }
171
+ catch (err) {
172
+ throw new Error(err.message);
173
+ }
174
+ // Determine target agents
175
+ let targetAgents = manifest.agents;
176
+ if (options.agent) {
177
+ const matched = findAgent(manifest.agents, options.agent);
178
+ if (!matched) {
179
+ const validNames = manifest.agents
180
+ .map((a) => `${a.role}, ${a.displayName.toLowerCase()}, ${a.name}`)
181
+ .join("\n ");
182
+ ui.log.error(`Unknown agent: "${options.agent}"\nValid identifiers:\n ${validNames}`);
183
+ return;
184
+ }
185
+ targetAgents = [matched];
186
+ }
187
+ // Describe what we're pushing
188
+ const actions = [];
189
+ if (doSkills)
190
+ actions.push("skills");
191
+ if (doWorkspace)
192
+ actions.push("workspace");
193
+ if (options.memoryReset)
194
+ actions.push("memory-reset");
195
+ if (options.openclaw)
196
+ actions.push("openclaw upgrade");
197
+ if (options.pushConfig)
198
+ actions.push("config");
199
+ ui.log.step(`Pushing [${actions.join(", ")}] to ${targetAgents.length} agent(s)...`);
200
+ console.log();
201
+ let allOk = true;
202
+ for (const agent of targetAgents) {
203
+ const tsHost = (0, constants_1.tailscaleHostname)(manifest.stackName, agent.name);
204
+ const host = `${tsHost}.${tailnetDnsName}`;
205
+ ui.log.info(`${picocolors_1.default.bold(agent.displayName)} (${agent.role}) — ${host}`);
206
+ let needsRestart = false;
207
+ // 1. Push skills
208
+ if (doSkills) {
209
+ const skillsDir = path.join(presetsDir, "skills");
210
+ if (fs.existsSync(skillsDir)) {
211
+ // Ensure remote skills dir exists
212
+ sshExec(exec, host, `mkdir -p ${REMOTE_SKILLS}`);
213
+ const result = rsyncDir(exec, skillsDir, host, REMOTE_SKILLS);
214
+ if (result.ok) {
215
+ console.log(` ${picocolors_1.default.green("OK")} skills synced`);
216
+ }
217
+ else {
218
+ console.log(` ${picocolors_1.default.red("FAIL")} skills sync failed: ${result.output.substring(0, 100)}`);
219
+ allOk = false;
220
+ }
221
+ }
222
+ else {
223
+ console.log(` ${picocolors_1.default.yellow("SKIP")} no skills directory found at ${skillsDir}`);
224
+ }
225
+ }
226
+ // 2. Push workspace files (role-specific preset + base AGENTS.md)
227
+ if (doWorkspace) {
228
+ const presetName = agent.preset;
229
+ if (presetName) {
230
+ const roleDir = path.join(presetsDir, presetName);
231
+ if (fs.existsSync(roleDir)) {
232
+ // Ensure remote workspace dir exists
233
+ sshExec(exec, host, `mkdir -p ${REMOTE_WORKSPACE}`);
234
+ // Sync role-specific files (SOUL.md, IDENTITY.md, HEARTBEAT.md, TOOLS.md, etc.)
235
+ const roleFiles = fs.readdirSync(roleDir).filter((f) => fs.statSync(path.join(roleDir, f)).isFile());
236
+ let wsOk = true;
237
+ for (const file of roleFiles) {
238
+ const localFile = path.join(roleDir, file);
239
+ // Remove .tpl extension for remote name
240
+ const remoteName = file.replace(/\.tpl$/, "");
241
+ const result = scpFile(exec, localFile, host, `${REMOTE_WORKSPACE}/${remoteName}`);
242
+ if (!result.ok) {
243
+ console.log(` ${picocolors_1.default.red("FAIL")} workspace file ${file}: ${result.output.substring(0, 100)}`);
244
+ wsOk = false;
245
+ allOk = false;
246
+ }
247
+ }
248
+ if (wsOk) {
249
+ console.log(` ${picocolors_1.default.green("OK")} workspace files synced (${roleFiles.length} files from ${presetName}/)`);
250
+ }
251
+ }
252
+ else {
253
+ console.log(` ${picocolors_1.default.yellow("SKIP")} preset directory not found: ${roleDir}`);
254
+ }
255
+ // Sync base AGENTS.md
256
+ const agentsMd = path.join(presetsDir, "base", "AGENTS.md");
257
+ if (fs.existsSync(agentsMd)) {
258
+ const result = scpFile(exec, agentsMd, host, `${REMOTE_WORKSPACE}/AGENTS.md`);
259
+ if (result.ok) {
260
+ console.log(` ${picocolors_1.default.green("OK")} AGENTS.md synced`);
261
+ }
262
+ else {
263
+ console.log(` ${picocolors_1.default.red("FAIL")} AGENTS.md sync failed: ${result.output.substring(0, 100)}`);
264
+ allOk = false;
265
+ }
266
+ }
267
+ }
268
+ else {
269
+ console.log(` ${picocolors_1.default.yellow("SKIP")} no preset defined for ${agent.displayName} (custom agent)`);
270
+ }
271
+ }
272
+ // 3. Memory reset
273
+ if (options.memoryReset) {
274
+ const cmd = `rm -rf ${REMOTE_WORKSPACE}/memory ${REMOTE_WORKSPACE}/MEMORY.md`;
275
+ const result = sshExec(exec, host, cmd);
276
+ if (result.ok) {
277
+ console.log(` ${picocolors_1.default.green("OK")} memory reset`);
278
+ }
279
+ else {
280
+ console.log(` ${picocolors_1.default.red("FAIL")} memory reset failed: ${result.output.substring(0, 100)}`);
281
+ allOk = false;
282
+ }
283
+ }
284
+ // 4. OpenClaw upgrade
285
+ if (options.openclaw) {
286
+ const cmd = `npm install -g openclaw@latest 2>&1`;
287
+ const result = sshExec(exec, host, cmd);
288
+ if (result.ok) {
289
+ console.log(` ${picocolors_1.default.green("OK")} openclaw upgraded`);
290
+ needsRestart = true;
291
+ }
292
+ else {
293
+ console.log(` ${picocolors_1.default.red("FAIL")} openclaw upgrade failed: ${result.output.substring(0, 100)}`);
294
+ allOk = false;
295
+ }
296
+ }
297
+ // 5. Config push
298
+ if (options.pushConfig) {
299
+ const localConfig = path.join(`/home/${constants_1.SSH_USER}/.openclaw`, "openclaw.json");
300
+ // The local config is on the operator's machine at ~/.openclaw/openclaw.json
301
+ // However, this should reference the operator's local file
302
+ const operatorConfig = path.join(process.env.HOME ?? "", ".openclaw", "openclaw.json");
303
+ if (fs.existsSync(operatorConfig)) {
304
+ const result = scpFile(exec, operatorConfig, host, `/home/${constants_1.SSH_USER}/.openclaw/openclaw.json`);
305
+ if (result.ok) {
306
+ console.log(` ${picocolors_1.default.green("OK")} openclaw.json pushed`);
307
+ needsRestart = true;
308
+ }
309
+ else {
310
+ console.log(` ${picocolors_1.default.red("FAIL")} config push failed: ${result.output.substring(0, 100)}`);
311
+ allOk = false;
312
+ }
313
+ }
314
+ else {
315
+ console.log(` ${picocolors_1.default.red("FAIL")} local openclaw.json not found at ${operatorConfig}`);
316
+ allOk = false;
317
+ }
318
+ }
319
+ // 6. Restart gateway if needed
320
+ if (needsRestart) {
321
+ const result = sshExec(exec, host, "systemctl --user restart openclaw-gateway");
322
+ if (result.ok) {
323
+ console.log(` ${picocolors_1.default.green("OK")} gateway restarted`);
324
+ }
325
+ else {
326
+ console.log(` ${picocolors_1.default.red("FAIL")} gateway restart failed: ${result.output.substring(0, 100)}`);
327
+ allOk = false;
328
+ }
329
+ }
330
+ console.log();
331
+ }
332
+ // Summary
333
+ if (allOk) {
334
+ ui.log.success(`Push completed successfully for ${targetAgents.length} agent(s).`);
335
+ }
336
+ else {
337
+ ui.log.warn("Push completed with some failures. Check output above.");
338
+ throw new Error("Push completed with failures.");
339
+ }
340
+ };
341
+ exports.pushTool = pushTool;
342
+ //# sourceMappingURL=push.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push.js","sourceRoot":"","sources":["../../tools/push.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAE7B,0CA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CAAC;IACrF,CAAC;SAAM,CAAC;QACN,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;QACtE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;AACH,CAAC,CAAC;AA9OW,QAAA,QAAQ,YA8OnB"}
@@ -111,7 +111,9 @@ function loadPresetFiles(presetDir, baseDir = "base") {
111
111
  for (const filename of fs.readdirSync(rolePath)) {
112
112
  const filePath = path.join(rolePath, filename);
113
113
  if (fs.statSync(filePath).isFile()) {
114
- files[filename] = fs.readFileSync(filePath, "utf-8");
114
+ // Remove .tpl extension if present (template files)
115
+ const outputName = filename.replace(/\.tpl$/, "");
116
+ files[outputName] = fs.readFileSync(filePath, "utf-8");
115
117
  }
116
118
  }
117
119
  }
@@ -124,7 +126,9 @@ function loadPresetFiles(presetDir, baseDir = "base") {
124
126
  for (const filename of fs.readdirSync(skillDirPath)) {
125
127
  const filePath = path.join(skillDirPath, filename);
126
128
  if (fs.statSync(filePath).isFile()) {
127
- files[`skills/${skillDir}/${filename}`] = fs.readFileSync(filePath, "utf-8");
129
+ // Remove .tpl extension if present (template files)
130
+ const outputName = filename.replace(/\.tpl$/, "");
131
+ files[`skills/${skillDir}/${outputName}`] = fs.readFileSync(filePath, "utf-8");
128
132
  }
129
133
  }
130
134
  }
@@ -3,6 +3,28 @@
3
3
  ## Always
4
4
 
5
5
  - [ ] If `BOOTSTRAP.md` exists in workspace, follow it first. Do not continue with the rest of this checklist until bootstrap is complete.
6
- - [ ] Check Linear for tickets assigned to me in "Todo" or "Backlog" status that haven't been prepped yet — for each one, run the `linear-ticket-prep` skill to prepare it for work
6
+ - [ ] Check Linear for tickets assigned to me in "Todo" or "Backlog" status that haven't been prepped yet
7
+ - [ ] Read each ticket's **labels** and route to the appropriate process. If multiple routing labels are present, prioritize: **Research Needed > Bug > Plan > default**:
8
+ - **Research Needed** → Run research only (Phase 2 of `linear-ticket-prep`), then assign back to Boss (Stepan)
9
+ - **Bug** → Research the codebase and related tools, expand the description with findings, then run `linear-ticket-prep` to prep for implementation
10
+ - **Plan** → Full `linear-ticket-prep` flow (research + break down into sub-tickets if needed + assign to Titus)
11
+ - **No label / other labels** → Standard `linear-ticket-prep` flow (prep and assign to Titus)
7
12
  - [ ] If any assigned ticket is missing a description or acceptance criteria, flag it and ask the assigner for clarification
8
- - [ ] Once prepped, assign the ticket to Titus and move it to "To Do" status
13
+ - [ ] **Slow modifier**: If the ticket has a "Slow" label or "Slow" directive in the description, it modifies the routing above — follow the label's normal process to completion, but assign back to Boss (Stepan) instead of forwarding to Titus
14
+
15
+ ## Label Quick Reference
16
+
17
+ ### Routing Labels (pick highest priority if multiple)
18
+
19
+ | Label | Process | Assign To When Done |
20
+ |-------|---------|-------------------|
21
+ | Research Needed | Research only (no implementation prep) | Stepan (Boss) |
22
+ | Bug | Research codebase + expand description + `linear-ticket-prep` | Titus |
23
+ | Plan | Full `linear-ticket-prep` (research + split + context + prompt) | Titus |
24
+ | (none/other) | Standard `linear-ticket-prep` flow | Titus |
25
+
26
+ ### Modifier Labels
27
+
28
+ | Label | Effect |
29
+ |-------|--------|
30
+ | Slow | Complete the routing process above, then assign to Stepan (Boss) instead of the usual assignee |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-army",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "Deploy and manage a fleet of OpenClaw AI agents on AWS",
5
5
  "bin": {
6
6
  "agent-army": "dist/bin.js"