@agentic-surfaces/cli 0.1.16 → 0.1.17
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/index.js +18 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -246,9 +246,26 @@ export async function run(argv) {
|
|
|
246
246
|
});
|
|
247
247
|
console.log(`▶ agentic-surfaces ${VERSION} — ${url}`);
|
|
248
248
|
}
|
|
249
|
+
// --watch: exit when a config file changes so a supervisor (launchd/pm2/systemd) restarts us
|
|
250
|
+
// with the fresh config. The seen-cache (.flow-cache.sqlite) persists across the restart, so
|
|
251
|
+
// dedup is preserved. Without a supervisor this just exits on the first edit.
|
|
252
|
+
if (rest.includes("--watch")) {
|
|
253
|
+
const { watch } = await import("node:fs");
|
|
254
|
+
let pending;
|
|
255
|
+
watch(dir, { recursive: true }, (_event, filename) => {
|
|
256
|
+
if (!filename || !/\.(yaml|md)$/.test(filename))
|
|
257
|
+
return;
|
|
258
|
+
clearTimeout(pending);
|
|
259
|
+
pending = setTimeout(() => {
|
|
260
|
+
console.log(`config changed (${filename}) — exiting for the supervisor to restart with the new config`);
|
|
261
|
+
process.exit(0);
|
|
262
|
+
}, 300); // debounce editor multi-writes
|
|
263
|
+
});
|
|
264
|
+
console.log("--watch: will restart on config (*.yaml / *.md) changes");
|
|
265
|
+
}
|
|
249
266
|
return 0;
|
|
250
267
|
}
|
|
251
|
-
console.error("usage: flow <validate|run|start> [workflow|projectDir] [--ui] [--fake]");
|
|
268
|
+
console.error("usage: flow <validate|run|start> [workflow|projectDir] [--ui] [--watch] [--fake]");
|
|
252
269
|
return 1;
|
|
253
270
|
}
|
|
254
271
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentic-surfaces/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@agentic-surfaces/core": "0.1.
|
|
25
|
-
"@agentic-surfaces/server": "0.1.
|
|
26
|
-
"@agentic-surfaces/agent": "0.1.
|
|
24
|
+
"@agentic-surfaces/core": "0.1.17",
|
|
25
|
+
"@agentic-surfaces/server": "0.1.17",
|
|
26
|
+
"@agentic-surfaces/agent": "0.1.17"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "tsc -b",
|