omniagent 0.1.1 → 0.1.3

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 (4) hide show
  1. package/CLAUDE.md +29 -0
  2. package/README.md +49 -0
  3. package/dist/cli.js +1232 -163
  4. package/package.json +4 -1
package/CLAUDE.md ADDED
@@ -0,0 +1,29 @@
1
+ # omniagent Development Guidelines
2
+
3
+ Auto-generated from all feature plans. Last updated: 2026-02-08
4
+
5
+ ## Active Technologies
6
+
7
+ - TypeScript 5.9 (ES2022) on Node.js 18+ + yargs, Node.js `fs/promises` + `path` + `child_process`, Vitest, Vite, Biome (017-dynamic-template-scripts)
8
+
9
+ ## Project Structure
10
+
11
+ ```text
12
+ src/
13
+ tests/
14
+ ```
15
+
16
+ ## Commands
17
+
18
+ npm test && npm run lint
19
+
20
+ ## Code Style
21
+
22
+ TypeScript 5.9 (ES2022) on Node.js 18+: Follow standard conventions
23
+
24
+ ## Recent Changes
25
+
26
+ - 017-dynamic-template-scripts: Added TypeScript 5.9 (ES2022) on Node.js 18+ + yargs, Node.js `fs/promises` + `path` + `child_process`, Vitest, Vite, Biome
27
+
28
+ <!-- MANUAL ADDITIONS START -->
29
+ <!-- MANUAL ADDITIONS END -->
package/README.md CHANGED
@@ -266,6 +266,54 @@ Everyone except Claude and Gemini see this.
266
266
  </agents>
267
267
  ```
268
268
 
269
+ ### Dynamic template scripts (`<nodejs>` and `<shell>`)
270
+
271
+ `sync` can execute inline script blocks in canonical templates before agent templating/rendering.
272
+
273
+ Node.js blocks evaluate JavaScript and inject the returned value:
274
+
275
+ ```md
276
+ Current docs:
277
+ <nodejs>
278
+ const fs = require("node:fs");
279
+ const path = require("node:path");
280
+
281
+ const docsDir = path.join(process.cwd(), "docs");
282
+ const pages = fs
283
+ .readdirSync(docsDir)
284
+ .filter((name) => name.endsWith(".md"))
285
+ .sort();
286
+
287
+ return pages.map((name) => `- ${name}`).join("\n");
288
+ </nodejs>
289
+ ```
290
+
291
+ Shell blocks execute in the user's shell and inject stdout:
292
+
293
+ ```md
294
+ Current docs:
295
+ <shell>
296
+ for file in docs/*.md; do
297
+ [ -f "$file" ] || continue
298
+ printf -- "- %s\n" "$(basename "$file")"
299
+ done | sort
300
+ </shell>
301
+ ```
302
+
303
+ Behavior:
304
+
305
+ - Scripts run once per template per sync run and cached results are reused across targets.
306
+ - Each script block runs in an isolated process (Node subprocess for `<nodejs>`, shell process for `<shell>`).
307
+ - `<nodejs>` blocks can use `require`, `__dirname`, and `__filename`.
308
+ - `<shell>` blocks run with the user's shell (`$SHELL` on Unix, `cmd.exe` on Windows fallback).
309
+ - `<nodejs>` return values are normalized as: string unchanged, object/array JSON text, other values via
310
+ `String(value)`, `null`/`undefined` as empty output.
311
+ - `<shell>` blocks render raw stdout.
312
+ - Static template text around script blocks is preserved.
313
+ - Script failures stop sync before managed writes are applied.
314
+ - Long-running scripts emit periodic `still running` warnings every 30 seconds.
315
+ - Routine per-script telemetry is quiet by default and shown only with `sync --verbose`.
316
+
269
317
  ## CLI reference
270
318
 
271
319
  ```bash
@@ -277,6 +325,7 @@ npx omniagent@latest sync --exclude-local=skills,commands
277
325
  npx omniagent@latest sync --agentsDir ./my-custom-agents
278
326
  npx omniagent@latest sync --list-local
279
327
  npx omniagent@latest sync --yes
328
+ npx omniagent@latest sync --verbose
280
329
  npx omniagent@latest sync --json
281
330
  ```
282
331