senses should use TypeScript source + esbuild bundle, not raw .js #224
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
All senses currently ship raw
.jscompute files (senses/<name>/index.js). This is inconsistent with workflows which use TypeScript source + esbuild bundle todist/.The
sense-generatorworkflow coder role also produces.jsbecause it follows existing sense patterns.Goal
Align senses with the workflow convention:
src/index.ts(TypeScript)index.js(what daemon loads)src/schema.ts→ stays.ts(loaded via experimental strip-types)Tasks
1. Migrate existing senses to TypeScript
For each sense (
linux-system-health,hermes-gateway-health,hermes-session-message-stats,worker-process-metrics):index.js→src/index.ts(add types)schema.ts→src/schema.tsmigrations/at rootpackage.jsonwith esbuild build script (same pattern as workflows)tsconfig.jsonindex.jsat sense root (what daemon expects)2. Update sense-generator coder prompt
Update
workflows/sense-generator/roles/coder/prompt.tsto instruct the coder to:src/package.jsonwith esbuild build scriptpnpm buildafter creating filesindex.jsat root is the bundled output, not hand-written JS3. Verify daemon loads bundled output
Daemon already loads
senses/<name>/index.js— just verify the esbuild bundle works with the existing loader.Non-goals
.js, that stays)