elanous 0.2.12 → 0.2.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/apps/pwa/out/404/index.html +1 -1
- package/apps/pwa/out/404.html +1 -1
- package/apps/pwa/out/_next/static/chunks/{7334.a6679d9168f37aa8.js → 1268.0840ff91e083fcbd.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/1307-6e7e0377c1db0bdc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1826-5d279da64bbbc2de.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{9656-c1540088f5859c80.js → 1844-9ec4b1d12f6e80eb.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/1866-e7a6999f25548b30.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{390.c373e31b3b9d0c41.js → 1948.15f356b15a625597.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/211-9c9090c59e2c5907.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2196-4700653d12a44b40.js +1 -0
- package/apps/pwa/out/_next/static/chunks/224-798346143007ff65.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2699-63b73fa4d3bcf6ff.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2957-96ffab3d521fb08f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/311.e685738f92e6e2ec.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3194-807b212fb8eae065.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3324-d1d2979821dfa845.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3558-bbb5ab553a0471d3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3916-3d02dd1fc257dd3c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4144-a0041c8dc3be57ac.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4554-3565eea1f1495ba7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4562-071d8bac44a01069.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{4685-c3c1c625b71accd1.js → 4614-21403aac730d4586.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{8039-df92e08fede5de8f.js → 4795-f372490b178583fc.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/5135-44008fe8b1f2aa41.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5233-bf28bd6bd7a32099.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5360-be1f1d8f9fcc9755.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5977-2df489622a52a33a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5994-ae92c0de046ab9ba.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{1452.93700483b9d4fc61.js → 6110.1297d4093fdfbb0d.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/6158.9c0449a9a8d0064b.js +2 -0
- package/apps/pwa/out/_next/static/chunks/6877-7c6208705c284124.js +1 -0
- package/apps/pwa/out/_next/static/chunks/726.83532d69452ee24b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7290-f09c928a06c52e2d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{1829-b453a1b22d3999bb.js → 7327-2d69fb321ba73389.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/7395-164e238f471b5d7b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7787-02a1c0b04e25e811.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{9906-482c6619b3fdda20.js → 8060-cc008cc6fedfa818.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/8085-d065d0393c1760f5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8682-7061dd4fa7bd62ed.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8827-e2f5b09a8d37e83b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8868-10a3a4440fb0ccd8.js +25 -0
- package/apps/pwa/out/_next/static/chunks/{8421-1c4acfb1395a0edf.js → 8949-ecb4128a0858b911.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/9070.067c106528ec1ae6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9103-7a3ae7f60af3b99f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{3869-3cd46526879f454c.js → 9247-29d889b809288e65.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/935.4ddaa99fc1d1126c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{79f8be9e-957d68913b590b08.js → a9f2b54d-7865aba0f4d2ee49.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-c1a96669158471ec.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-74383f890f075511.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-7b2b4f378354869a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/board/page-c496bb16da85385f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/botlab/page-1abfe3aec3be6bdc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/bots/page-1512d91c7491ed62.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/chat/page-a627db94ec6904a0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/consult/page-fb260b9283dbf646.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/control/page-e6b84ab07d3567d5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-61ec1d2e92bdd50a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/editor/page-fed69f9759d248d0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/exec/{page-a67e11ba962337b5.js → page-15374909d8f1aebd.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/field/page-012a742f81218b01.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-c1a96669158471ec.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/inside/page-fd7e200d4d83fbd7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/intake/page-99effd9d893a43dc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/layout-938de57ae0315e46.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/live/page-d47266766766d227.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/loops/page-160089123a40dd91.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/market/page-629e1ede482ec6eb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/{page-793fa536b3a6ef37.js → page-2ce5471926761fdd.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/morning/page-27e99b4e54a849d4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/not-found-e995d30f6800b6bf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-39f89c53038a51d4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-32cde713be47cddb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/release/page-e7e10cd3386222e5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-5a753bb4ec0cc511.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-04250f0e2c0d03df.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/page-341480ed8e3c1ea8.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-e64caff084f7ce21.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-db07eaffba0df7e3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-8ac8d71c2adf9c8a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-e1e47d8d940aba3d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/page-86f91034bd5cabe5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-94dc383d3d54db1a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-c1a96669158471ec.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/page-b3759cc14da80908.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/share/page-ce4d8a1215ce53a3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-58043db78ba519ae.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-357750dfb91bf960.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/term/{page-e297866051595d81.js → page-274703bc41b71333.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/today/page-194dce4a83143fce.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/trace/page-35bdeae2e2c17147.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/vault/page-3b7e821dc492bdfd.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-16bef3da05a900c3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-f8da5dc6f3752276.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-2f810b18d89ecba6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-134c1bc762aee62c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{5cd7e3a9-404fd6b8d0ecd44c.js → f6231284-45726550aba08fca.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{f48170cc-d05d28bf87a43bf4.js → f6b7c9ba.64a895b8b2fedbdc.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/framework-5c169757551134ed.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-59fe95fed40c7a01.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-app-4ca74dbbee7057c6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_app-13a0a886df4d97a1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_error-6af8591cd3a3f038.js +1 -0
- package/apps/pwa/out/_next/static/chunks/webpack-539cde99554be20f.js +1 -0
- package/apps/pwa/out/_next/static/css/2e33713c444d5b39.css +1 -0
- package/apps/pwa/out/_next/static/x6mjI6vqOkVVu0jFuDkz1/_buildManifest.js +1 -0
- package/apps/pwa/out/approvals/index.html +1 -1
- package/apps/pwa/out/approvals/index.txt +23 -23
- package/apps/pwa/out/autopilot/index.html +1 -1
- package/apps/pwa/out/autopilot/index.txt +23 -23
- package/apps/pwa/out/board/index.html +1 -1
- package/apps/pwa/out/board/index.txt +23 -23
- package/apps/pwa/out/botlab/index.html +1 -1
- package/apps/pwa/out/botlab/index.txt +22 -22
- package/apps/pwa/out/bots/index.html +1 -1
- package/apps/pwa/out/bots/index.txt +22 -22
- package/apps/pwa/out/chat/index.html +1 -1
- package/apps/pwa/out/chat/index.txt +22 -22
- package/apps/pwa/out/consult/index.html +1 -1
- package/apps/pwa/out/consult/index.txt +23 -23
- package/apps/pwa/out/control/index.html +1 -1
- package/apps/pwa/out/control/index.txt +23 -23
- package/apps/pwa/out/design-check/index.html +1 -1
- package/apps/pwa/out/design-check/index.txt +23 -23
- package/apps/pwa/out/editor/index.html +1 -1
- package/apps/pwa/out/editor/index.txt +23 -23
- package/apps/pwa/out/exec/index.html +1 -1
- package/apps/pwa/out/exec/index.txt +23 -23
- package/apps/pwa/out/field/index.html +1 -1
- package/apps/pwa/out/field/index.txt +23 -23
- package/apps/pwa/out/healthz +1 -1
- package/apps/pwa/out/index.html +1 -1
- package/apps/pwa/out/index.txt +22 -22
- package/apps/pwa/out/inside/index.html +1 -1
- package/apps/pwa/out/inside/index.txt +22 -22
- package/apps/pwa/out/intake/index.html +1 -1
- package/apps/pwa/out/intake/index.txt +23 -23
- package/apps/pwa/out/live/index.html +1 -1
- package/apps/pwa/out/live/index.txt +23 -23
- package/apps/pwa/out/loops/index.html +1 -0
- package/apps/pwa/out/loops/index.txt +30 -0
- package/apps/pwa/out/market/index.html +1 -1
- package/apps/pwa/out/market/index.txt +22 -22
- package/apps/pwa/out/missions/placeholder/index.html +1 -1
- package/apps/pwa/out/missions/placeholder/index.txt +22 -22
- package/apps/pwa/out/morning/index.html +1 -1
- package/apps/pwa/out/morning/index.txt +23 -23
- package/apps/pwa/out/observatory/index.html +1 -1
- package/apps/pwa/out/observatory/index.txt +23 -23
- package/apps/pwa/out/ops/checklist/index.html +1 -1
- package/apps/pwa/out/ops/checklist/index.txt +22 -22
- package/apps/pwa/out/ops/release/index.html +1 -1
- package/apps/pwa/out/ops/release/index.txt +22 -22
- package/apps/pwa/out/ops/seats/index.html +1 -1
- package/apps/pwa/out/ops/seats/index.txt +22 -22
- package/apps/pwa/out/outputs/index.html +1 -1
- package/apps/pwa/out/outputs/index.txt +22 -22
- package/apps/pwa/out/reflection/index.html +1 -1
- package/apps/pwa/out/reflection/index.txt +23 -23
- package/apps/pwa/out/scheduler/index.html +1 -1
- package/apps/pwa/out/scheduler/index.txt +23 -23
- package/apps/pwa/out/sessions/index.html +1 -1
- package/apps/pwa/out/sessions/index.txt +22 -22
- package/apps/pwa/out/settings/devices/index.html +1 -1
- package/apps/pwa/out/settings/devices/index.txt +23 -23
- package/apps/pwa/out/settings/index.html +1 -1
- package/apps/pwa/out/settings/index.txt +23 -23
- package/apps/pwa/out/setup/done/index.html +1 -1
- package/apps/pwa/out/setup/done/index.txt +23 -23
- package/apps/pwa/out/setup/index.html +1 -1
- package/apps/pwa/out/setup/index.txt +23 -23
- package/apps/pwa/out/share/index.html +1 -1
- package/apps/pwa/out/share/index.txt +23 -23
- package/apps/pwa/out/showroom/index.html +1 -1
- package/apps/pwa/out/showroom/index.txt +22 -22
- package/apps/pwa/out/tasks/index.html +1 -1
- package/apps/pwa/out/tasks/index.txt +23 -23
- package/apps/pwa/out/term/index.html +1 -1
- package/apps/pwa/out/term/index.txt +23 -23
- package/apps/pwa/out/today/index.html +1 -1
- package/apps/pwa/out/today/index.txt +23 -23
- package/apps/pwa/out/trace/index.html +1 -1
- package/apps/pwa/out/trace/index.txt +23 -23
- package/apps/pwa/out/vault/index.html +1 -1
- package/apps/pwa/out/vault/index.txt +23 -23
- package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
- package/apps/pwa/out/workflows/chat-ui/index.txt +23 -23
- package/apps/pwa/out/workflows/index.html +1 -1
- package/apps/pwa/out/workflows/index.txt +23 -23
- package/apps/pwa/out/workspace/index.html +1 -1
- package/apps/pwa/out/workspace/index.txt +23 -23
- package/apps/pwa/out/worktrees/index.html +1 -1
- package/apps/pwa/out/worktrees/index.txt +23 -23
- package/examples/teams/personas/backend.yaml +4 -0
- package/examples/teams/personas/pm.yaml +4 -0
- package/examples/teams/personas/qa.yaml +4 -0
- package/examples/teams/small-product.yaml +20 -0
- package/graphs/lecture/lecture-note.yaml +28 -0
- package/graphs/lecture/recipes.yaml +17 -0
- package/graphs/orchestrator/orchestrator.yaml +59 -0
- package/graphs/orchestrator/recipes.yaml +18 -0
- package/graphs/release/recipes.yaml +3 -0
- package/graphs/release/release-loop.yaml +4 -1
- package/graphs/rhythm/daily.yaml +38 -0
- package/graphs/rhythm/recipes.yaml +18 -0
- package/graphs/rhythm/weekly.yaml +39 -0
- package/graphs/video/recipes.yaml +3 -0
- package/graphs/video/youtube-summary.yaml +17 -0
- package/package.json +2 -1
- package/scripts/audit-test-state-writes.ts +72 -17
- package/scripts/brand/check.ts +186 -0
- package/scripts/context-hooks/emit.ts +36 -14
- package/scripts/coord-channel-watch.sh +1 -0
- package/scripts/coord-post.sh +11 -1
- package/scripts/discord-seat-probe.ts +144 -0
- package/scripts/docs-cli-check.ts +23 -6
- package/scripts/expose-rubric-check.ts +118 -0
- package/scripts/expose-rubric-suggest.ts +163 -0
- package/scripts/heal/run-role.ts +14 -0
- package/scripts/hq/hq-standby.sh +65 -0
- package/scripts/hq/standby-promote.ts +173 -0
- package/scripts/hq/standby-role.ts +59 -0
- package/scripts/hq/standby-snapshot.ts +226 -0
- package/scripts/hq/standby-verify.ts +223 -0
- package/scripts/lecture-note/node.ts +256 -0
- package/scripts/lessons/handbook-page.ts +85 -0
- package/scripts/release-loop/gate-node.ts +62 -15
- package/scripts/release-loop/ops-upgrade-node.ts +17 -5
- package/scripts/release-loop/publish-node.ts +14 -1
- package/scripts/release-loop/unattended-release.ts +23 -1
- package/scripts/release-loop/vault-note-node.ts +196 -0
- package/scripts/release-story/draft.ts +172 -0
- package/scripts/rhythm/daily.ts +383 -0
- package/scripts/rhythm/weekly.ts +294 -0
- package/scripts/skills/public-check.ts +169 -0
- package/scripts/test-deterministic.ts +57 -11
- package/scripts/test-diet/effectiveness.ts +195 -0
- package/scripts/test-diet/lib.ts +16 -8
- package/scripts/test-diet/node.ts +77 -9
- package/scripts/ux/demo-rehearsal.ts +2 -2
- package/scripts/ux/lib/rehearsal-verdict.ts +1 -0
- package/scripts/video/youtube-summary.ts +133 -0
- package/skills/diagram-master/SKILL.md +42 -49
- package/skills/diagram-master/references/pyproject.toml +4 -1
- package/skills/diagram-master/references/routing-guide.md +4 -2
- package/skills/grill-me/SKILL.md +1 -0
- package/skills/omni-crawl/SKILL.md +16 -16
- package/skills/omni-crawl/package-lock.json +1 -544
- package/skills/omni-crawl/package.json +3 -4
- package/skills/omni-crawl/scripts/main.ts +13 -13
- package/skills/omni-crawl/scripts/monitor.ts +8 -8
- package/skills/omni-crawl/src/apify.ts +13 -2
- package/skills/omni-crawl/src/capture.ts +6 -0
- package/skills/omni-crawl/src/registry.ts +2 -2
- package/skills/omni-crawl/src/stdout-json.ts +4 -0
- package/skills/omni-digest/SKILL.md +10 -11
- package/skills/omni-digest/package-lock.json +0 -545
- package/skills/omni-digest/package.json +2 -5
- package/skills/omni-digest/scripts/main.ts +3 -3
- package/skills/omni-digest/src/delegate.ts +5 -5
- package/skills/omni-digest/src/fetch.ts +2 -2
- package/skills/omni-digest/src/media.ts +25 -11
- package/skills/omni-digest/src/visual.ts +3 -2
- package/skills/omni-market/scripts/main.ts +1 -1
- package/skills/omni-market/scripts/stdout-json.ts +4 -0
- package/skills/youtube-master/SKILL.md +13 -13
- package/skills/youtube-master/package-lock.json +0 -545
- package/skills/youtube-master/package.json +2 -5
- package/skills/youtube-master/scripts/main.ts +2 -2
- package/skills/youtube-master/scripts/transcribe-local.ts +1 -1
- package/skills/youtube-master/src/util.ts +30 -7
- package/src/agent/identity-env.ts +11 -0
- package/src/agent-mission/driver.ts +15 -10
- package/src/agent-mission/duo.ts +94 -0
- package/src/agent-mission/pty-decision.ts +1 -1
- package/src/autopilot/build/llm-conflict-merge.ts +45 -8
- package/src/autopilot/build/merge-intent.ts +53 -0
- package/src/autopilot/track-agent-shadow.ts +2 -1
- package/src/autopilot/track-agent.ts +4 -1
- package/src/boot/daemon-prompt-request.ts +3 -0
- package/src/boot/daemon-prompt-turn.ts +6 -2
- package/src/boot/daemon-runtime.ts +48 -16
- package/src/chat/index.ts +2 -0
- package/src/claims/claims-ledger.ts +232 -0
- package/src/claims/claims-render.ts +157 -0
- package/src/cli/claims-cli.ts +94 -0
- package/src/cli/decisions-cli.ts +84 -20
- package/src/cli/docs-cli.ts +2 -0
- package/src/cli/flow-cli.ts +11 -0
- package/src/cli/freeze-cli.ts +45 -0
- package/src/cli/lesson-cli.ts +108 -0
- package/src/cli/logs-cli.ts +104 -2
- package/src/cli/logs-model-input.ts +131 -0
- package/src/cli/outputs-cli.ts +92 -0
- package/src/cli/persona-cli.ts +29 -0
- package/src/cli/pod-cli.ts +10 -3
- package/src/cli/pr-cli.ts +44 -2
- package/src/cli/private-ledger-commands.ts +54 -4
- package/src/cli/pty-drive-verdict.ts +11 -2
- package/src/cli/release-cli.ts +248 -45
- package/src/cli/rfc-status.ts +91 -0
- package/src/connectors/linear.ts +5 -3
- package/src/context-bus/condense.ts +189 -0
- package/src/context-bus/context-day.ts +82 -0
- package/src/context-bus/context-now-public.ts +86 -0
- package/src/context-bus/context-now-surfaces.ts +70 -4
- package/src/context-bus/context-now.ts +4 -3
- package/src/context-bus/long-term-memory.ts +201 -24
- package/src/context-bus/nightly-condense.ts +1 -1
- package/src/dashboard/index.ts +75 -22
- package/src/dashboard/slash-runtime/chat-persona.ts +66 -0
- package/src/dashboard/slash-runtime/dashboard-handlers.ts +99 -0
- package/src/dashboard/slash-runtime/loops-table.ts +77 -0
- package/src/decisions/decision-cards.ts +13 -7
- package/src/decisions/decision-ledger.ts +83 -18
- package/src/discord/sprint21-runtime.ts +16 -0
- package/src/discord-self-message.ts +8 -0
- package/src/discord-slash-wire.ts +31 -2
- package/src/domains/outbound-alert.ts +1 -1
- package/src/elanous-config-dir.ts +29 -4
- package/src/execution-loop/launch-gate.ts +29 -14
- package/src/flow/cards.ts +239 -0
- package/src/graph-kinds/registry.ts +2 -2
- package/src/graph-runner/graph-approval-card.ts +2 -2
- package/src/graph-runner/graph-grow.ts +64 -11
- package/src/graph-runner/graph-tick.ts +13 -2
- package/src/graph-runner/runner.ts +111 -22
- package/src/harness/harness-cli-command.ts +178 -27
- package/src/harness/harness-incidents.ts +43 -12
- package/src/harness/harness-pod-dispatch.ts +2 -0
- package/src/harness/harness-queue-child.ts +37 -0
- package/src/harness/harness-queue.ts +494 -0
- package/src/harness/helper-scan.ts +139 -0
- package/src/harness/model-input-observation.ts +37 -0
- package/src/hooks/github-shadow.ts +72 -2
- package/src/hooks/receiver.ts +4 -2
- package/src/hq/hq.ts +318 -0
- package/src/hq/lease.ts +210 -0
- package/src/hq/ledger-write-target.ts +41 -0
- package/src/hq/promote.ts +301 -0
- package/src/index.ts +281 -27
- package/src/intake-plane/discord-seat-work.ts +13 -6
- package/src/intake-plane/linear-wish.ts +72 -0
- package/src/intake-plane/persona-answer.ts +5 -0
- package/src/intake-plane/telegram-seat-work.ts +13 -6
- package/src/intake-plane/wish-benchmark-ledger.ts +129 -0
- package/src/intake-plane/wish-card.ts +53 -2
- package/src/intake-plane/wish-folder.ts +5 -2
- package/src/intake-plane/wish-reply.ts +72 -0
- package/src/lessons/lesson-import.ts +106 -0
- package/src/lessons/lesson-ledger.ts +206 -0
- package/src/loops/activity.ts +203 -0
- package/src/loops/budget.ts +32 -0
- package/src/loops/checker.ts +180 -0
- package/src/loops/contract/examples/orchestrator.loop.yaml +1 -1
- package/src/loops/loop-cli.ts +72 -6
- package/src/loops/neighbors.ts +40 -0
- package/src/loops/observe.ts +59 -0
- package/src/loops/orchestrator/author-depth.ts +164 -0
- package/src/loops/orchestrator/author-input-check.ts +77 -0
- package/src/loops/orchestrator/author-ledger.ts +230 -0
- package/src/loops/orchestrator/finish-rate.ts +175 -0
- package/src/loops/orchestrator/overlap.ts +180 -0
- package/src/loops/orchestrator/resync-shadow.ts +227 -0
- package/src/loops/orchestrator/tick.ts +302 -0
- package/src/loops/orchestrator/traffic.ts +165 -0
- package/src/loops/package/verify.ts +125 -0
- package/src/loops/registry.ts +454 -9
- package/src/loops/status-rows.ts +118 -0
- package/src/loops/verdict.ts +34 -0
- package/src/maturity/bot-slash-catalog.ts +66 -0
- package/src/maturity/feature-maturity.ts +8 -5
- package/src/memory.ts +37 -4
- package/src/nexus/api/card-followup-route.ts +118 -0
- package/src/nexus/api/dashboard.ts +6 -1
- package/src/nexus/api/decisions-route.ts +68 -0
- package/src/nexus/api/http-server.ts +65 -2
- package/src/nexus/api/merge-approvals-gate.ts +1 -1
- package/src/nexus/api/personas.ts +2 -1
- package/src/nexus/api/schedules-read.ts +5 -1
- package/src/nexus/api/skill-exec-route.ts +97 -0
- package/src/nexus/api/task-cards-api.ts +44 -5
- package/src/nexus/api/workflows.ts +2 -1
- package/src/persona/loader.ts +18 -0
- package/src/persona/persona-todo.ts +14 -9
- package/src/persona/presets.ts +2 -1
- package/src/persona/team.ts +105 -0
- package/src/persona/types.ts +4 -0
- package/src/pod-lease/host-lease.ts +130 -20
- package/src/release-loop/auto-start.ts +48 -0
- package/src/release-loop/checklist.ts +13 -4
- package/src/release-loop/feature-store.ts +28 -16
- package/src/release-loop/landed-but-yellow.ts +12 -0
- package/src/release-loop/landing-freeze.ts +121 -0
- package/src/release-loop/placement.ts +242 -0
- package/src/release-loop/release-schedule.ts +3 -1
- package/src/seat-dispatch/ceo-commands.ts +2 -2
- package/src/seat-dispatch/seat-ask.ts +73 -15
- package/src/seat-dispatch/seat-questions.ts +58 -0
- package/src/seat-loop/seat-loop.ts +495 -46
- package/src/seat-loop/seat-pack.ts +127 -0
- package/src/self-dev/ask-launch-flow.ts +3 -0
- package/src/self-dev/dev-pipeline.ts +6 -2
- package/src/self-dev/draft-sweep.ts +76 -0
- package/src/self-dev/run-store.ts +73 -1
- package/src/self-dev/run-supervisor.ts +8 -0
- package/src/self-dev/self-orchestrate-runtime.ts +5 -1
- package/src/self-implement/budget-gate.ts +29 -0
- package/src/self-implement/expose-gate.ts +47 -0
- package/src/self-implement/frozen-merges.ts +294 -0
- package/src/self-implement/gate-cli.ts +10 -4
- package/src/self-implement/gate-scope.ts +46 -9
- package/src/self-implement/goal-archive.ts +222 -0
- package/src/self-implement/goal-lookup.ts +147 -0
- package/src/self-implement/heal-intake.ts +79 -0
- package/src/self-implement/host-regate.ts +25 -2
- package/src/self-implement/l8-merge-queue.ts +157 -1
- package/src/self-implement/orchestrator.ts +114 -10
- package/src/self-implement/revert-guard.ts +62 -0
- package/src/self-implement/run-ledger.ts +1 -1
- package/src/self-implement/seams.ts +28 -8
- package/src/session/index.ts +2 -0
- package/src/steward/launch.ts +5 -1
- package/src/steward/readiness.ts +125 -0
- package/src/steward/rescue.ts +75 -0
- package/src/steward/triage.ts +48 -9
- package/src/task-cards/card-cli.ts +86 -0
- package/src/task-cards/card-store.ts +10 -6
- package/src/task-orchestrator/surfaces/pod-lease.ts +23 -8
- package/src/task-orchestrator/surfaces/pod-ledger-collect.ts +46 -6
- package/src/task-orchestrator/surfaces/pod-pool.ts +27 -10
- package/src/task-orchestrator/surfaces/self-implement-pod.ts +112 -18
- package/src/telegram-commands.ts +27 -3
- package/src/telegram-dispatch-forward.ts +1 -1
- package/src/telegram-fabric-plan.ts +90 -0
- package/src/telegram-loops-command.ts +44 -0
- package/src/telegram-project-command.ts +10 -4
- package/src/telegram.ts +5 -0
- package/src/tool-runtime/elanous-control-runtimes.ts +2 -1
- package/src/user-config.ts +204 -16
- package/src/version/packed-revision.json +1 -1
- package/src/workflow-runtime/executor.ts +4 -0
- package/src/workflow-runtime/node-catalog.ts +13 -0
- package/src/workflow-runtime/nodes/knowledge.ts +38 -0
- package/src/workflow-runtime/schema.ts +17 -1
- package/src/workflow-runtime/storage.ts +31 -13
- package/src/workflow-runtime/types.ts +13 -1
- package/apps/pwa/out/_next/static/-6XrAoD3eU7NyMHAE4xPS/_buildManifest.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1147-466ec15afacc1a65.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1159-0c5ef8bc21cb6afb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1394-ee3795b112907122.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2176-c379e3ebce874151.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2426.8c6ee0c668d53def.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3170-7ec60a56fa0e4728.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3278-ae6ef084769f6195.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3454-988a53dac60a1763.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3638-aa80b4641ea439db.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3735-fe3402553ac1c9c6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3992-2e522a8ac5f2afde.js +0 -25
- package/apps/pwa/out/_next/static/chunks/4215-c9d91dd644ec1719.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4508-5d0161d1e724d735.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4733-623a79345b171e1c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4883.3bd969ea1d3aaaff.js +0 -2
- package/apps/pwa/out/_next/static/chunks/5532.6899a12958a89b72.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5845-e6c003ce8d5fd36a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5978-b27004c677119115.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6048-4c5c33579bc4ef78.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6303-422dbf0f67c72aac.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6751-bb3595948b2e311b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7274-19b7279f18b47ab3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7277-0b2fc7c16ba2d64b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7551-a0e0707b79164ddd.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7758-0b018a9e4fc56200.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7777-79f845045aa1ed86.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8025-cc24ee5d8f2fb6f8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8206-c6684dcde12be721.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8605-0259994816604c49.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8725.bf46bb1395dd0fa2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8734-252d511cd276c0dc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8834-ca1cb09c1cb1a6bf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9269.d2a4795bc6812717.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9538-2816b90923606459.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9920-5cfdc5e8fd209825.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-d16993889b125c42.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-cb169620945d1952.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-cefe8169e36cf62a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/board/page-d2e35228bc497119.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/botlab/page-5c05b0da4bc1392c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/bots/page-e0ccdb576812b523.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/chat/page-813c4a52c9d05ca8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/consult/page-4731f2c215358937.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/control/page-a022b257950f39e6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-a2ffc717e04b8b0a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/editor/page-b59ee4e70fc18fcf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/field/page-c172dabd796eb7a3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-d16993889b125c42.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/inside/page-1efd0cb9e0ed9d13.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/intake/page-d5dc7ff69a37b4cf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/layout-e71c84189e8c683e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/live/page-1d6a533ce5a6efcb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/market/page-dfca9b7d2de0b135.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/morning/page-6dd3bfbbde2a5c2c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/not-found-490653e8d4cc8852.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-77447356baad75d2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-29e961191f6057df.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/release/page-c822f55b884d9104.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-fa4ccfc432424e52.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-6d604227e1664b71.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/page-9c7e8f744a765daf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-4048543b4b7ad5e0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-4c3a3126abed551a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-64b0aecb1ca75e75.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-4292d0149020e8a7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/page-db14d0be7f1c460c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-e5d8072cd7cfef73.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-d16993889b125c42.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/page-9547b5cec7cf76bf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/share/page-e6dcb83265530636.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-45248f08d6aecae5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-2cddeb9e2aeedc55.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/today/page-baba2e047872fb0f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/trace/page-e895da4ec9cac345.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/vault/page-4344faf20216233b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-698bb29f11864b89.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-bd6a6dc1ddc273f2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-2e9e2fb01c9da1c9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-d62ceb13411ebba4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/framework-172630e6aa5e2d7f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-app-f0fe2d7477845181.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-fc98ac70b44eccb0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_app-5bd7f10271f72413.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_error-97d0d85ea05fef9b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/webpack-9e4d02d567b98240.js +0 -1
- package/apps/pwa/out/_next/static/css/128fb7fb670b2fbf.css +0 -1
- /package/apps/pwa/out/_next/static/{-6XrAoD3eU7NyMHAE4xPS → x6mjI6vqOkVVu0jFuDkz1}/_ssgManifest.js +0 -0
package/src/cli/decisions-cli.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { Option, type Command } from 'commander';
|
|
2
|
+
import { hqCliWriteAllowed, type HqDeps } from '../hq/hq.js';
|
|
3
|
+
import { fileLeaseStore } from '../hq/lease.js';
|
|
4
|
+
import { isIsolatedLedgerWriteRoot } from '../hq/ledger-write-target.js';
|
|
5
|
+
import { debug } from '../debug/log.js';
|
|
6
|
+
import { elanousStateRoot } from '../autopilot/state-paths.js';
|
|
7
|
+
import { join } from 'node:path';
|
|
8
|
+
import { getElanousConfigDirOverride } from '../elanous-config-dir.js';
|
|
9
|
+
import { effectiveInstanceRoot } from '../instance/resolve.js';
|
|
10
|
+
import { getUserConfig } from '../user-config.js';
|
|
2
11
|
import { projectDecisionsToLinear } from '../decisions/decision-linear-projection.js';
|
|
3
|
-
import { DecisionLedger, importDecisionMarkdown, type DecisionCategory, type DecisionLedgerOptions, type DecisionOption, type DecisionTrack, type DecisionEntry } from '../decisions/decision-ledger.js';
|
|
12
|
+
import { DecisionLedger, importDecisionMarkdown, type DecisionCategory, type DecisionLedgerOptions, type DecisionOption, type DecisionTrack, type DecisionEntry, type Seat, type SeatDecisionRecord } from '../decisions/decision-ledger.js';
|
|
4
13
|
|
|
5
14
|
const repeat = (value: string, values: string[]) => [...values, value];
|
|
6
15
|
function date(raw?: string): string | undefined {
|
|
@@ -46,13 +55,30 @@ export function formatDecisionDetail(e: DecisionEntry): string {
|
|
|
46
55
|
...(e.refs?.length ? [`참조: ${e.refs.join(' · ')}`] : [])].join('\n');
|
|
47
56
|
}
|
|
48
57
|
|
|
49
|
-
export function
|
|
50
|
-
|
|
58
|
+
export function formatSeatDecisionRow(e: SeatDecisionRecord): string {
|
|
59
|
+
return `${e.id} · 결정: ${e.decidedAt ? kst(e.decidedAt) : '시각 미상'} · 기록: ${e.recordedAt ? kst(e.recordedAt) : '시각 미상'} · ${e.seat} 결정 · 사후 보고 · ${e.title} → ${e.decision} · 위임: ${e.delegation}${e.refs?.length ? ` · 참조: ${e.refs.join(' · ')}` : ''}`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function registerDecisionsCommands(program: Command, config: DecisionLedgerOptions = {}, out: Pick<Console, 'log'> = console, hqDeps: HqDeps = {}): void {
|
|
63
|
+
const noXcheck = new Option('--no-xcheck <이유>', '교차 확인 생략 이유');
|
|
64
|
+
// This flag takes a reason, not Commander's negated boolean default.
|
|
65
|
+
noXcheck.negate = false;
|
|
66
|
+
const root = program.command('decisions').description('대표 결정 원장 · 로컬 전용').option('--hq-override', '본부 임대 거부를 관측하며 수동 우회');
|
|
67
|
+
const mayWrite = (command: string, override?: boolean) => {
|
|
68
|
+
const ledgerRoot = config.stateDir ?? elanousStateRoot();
|
|
69
|
+
if (command !== 'linear-sync' && isIsolatedLedgerWriteRoot(ledgerRoot)) {
|
|
70
|
+
try { debug.log('hq.fence', 'skipped-isolated', { root: ledgerRoot, command: `decisions ${command}` }); } catch { /* observation is fail-soft */ }
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
return hqCliWriteAllowed(`decisions ${command}`, Boolean(override || root.opts().hqOverride),
|
|
74
|
+
(getElanousConfigDirOverride() || config.stateDir) && !hqDeps.store && !getUserConfig().hq?.arbiter ? { ...hqDeps, store: fileLeaseStore(join(config.stateDir ?? effectiveInstanceRoot(), 'hq', 'lease.json')), seenPath: join(config.stateDir ?? effectiveInstanceRoot(), 'hq', 'seen-generation'), localPath: join(config.stateDir ?? effectiveInstanceRoot(), 'hq', 'local.json') } : hqDeps);
|
|
75
|
+
};
|
|
51
76
|
const emit = (value: unknown, json?: boolean, text?: string) => out.log(json ? JSON.stringify(value) : text ?? JSON.stringify(value));
|
|
52
77
|
const fail = (action: () => void) => { try { action(); } catch (e) { throw new Error(`decisions: ${e instanceof Error ? e.message : String(e)}`); } };
|
|
53
78
|
root.command('linear-sync').description('열린 결정을 COO Linear 프로젝트에 투영하고 닫힌 결정을 동기화한다')
|
|
54
|
-
.option('--dry-run').option('--json')
|
|
55
|
-
.action(async (o: { dryRun?: boolean; json?: boolean }) => {
|
|
79
|
+
.option('--dry-run').option('--json').option('--hq-override')
|
|
80
|
+
.action(async (o: { dryRun?: boolean; json?: boolean; hqOverride?: boolean }) => {
|
|
81
|
+
if (!o.dryRun && !mayWrite('linear-sync', o.hqOverride)) return;
|
|
56
82
|
const result = await projectDecisionsToLinear({ stateDir: config.stateDir, dryRun: o.dryRun });
|
|
57
83
|
emit(result, o.json, result.reason ?? `생성 ${result.created} · 닫음 ${result.closed} · 건너뜀 ${result.skipped} · 실패 ${result.failed}${result.plan?.length ? `\n${result.plan.map(p => `${p.action} ${p.decisionId}${p.issue ? ` ${p.issue}` : ''}`).join('\n')}` : ''}`);
|
|
58
84
|
});
|
|
@@ -61,23 +87,56 @@ export function registerDecisionsCommands(program: Command, config: DecisionLedg
|
|
|
61
87
|
.requiredOption('--s <text>').requiredOption('--c <text>').option('--q <text>').option('--a <text>')
|
|
62
88
|
.requiredOption('--option <key=label:consequence>', '선택지 (두 번 이상)', repeat, [] as string[])
|
|
63
89
|
.option('--recommend <key>').option('--why <text>').option('--skip-recommend <reason>')
|
|
90
|
+
.option('--xcheck <SEAT:메모>', '교차 확인 (반복)', repeat, [] as string[])
|
|
91
|
+
.addOption(noXcheck)
|
|
92
|
+
.option('--alternative <key>').option('--dissent <text>')
|
|
64
93
|
.option('--track <track>').option('--agent <agent>').option('--session <id>')
|
|
65
94
|
.option('--resume-question <qid>').option('--run <runId>')
|
|
66
95
|
.option('--ref <url>', '참조 (반복)', repeat, [] as string[])
|
|
67
96
|
.option('--due <when>', '기한 — UTC ISO(2026-10-04T09:00:00Z) 또는 +Nh(지금부터 N시간) · 기한 2시간 전 텔레그램·디스코드로 다시 알린다')
|
|
68
|
-
.option('--json')
|
|
69
|
-
.action((o: { due?: string; title: string; category: DecisionCategory; s: string; c: string; q?: string; a?: string; option: string[]; recommend?: string; why?: string; skipRecommend?: string; track?: DecisionTrack; agent?: string; session?: string; resumeQuestion?: string; run?: string; ref: string[]; json?: boolean }) => fail(() => {
|
|
97
|
+
.option('--json').option('--hq-override')
|
|
98
|
+
.action((o: { due?: string; title: string; category: DecisionCategory; s: string; c: string; q?: string; a?: string; option: string[]; recommend?: string; why?: string; skipRecommend?: string; xcheck: string[]; noXcheck?: string; alternative?: string; dissent?: string; track?: DecisionTrack; agent?: string; session?: string; resumeQuestion?: string; run?: string; ref: string[]; json?: boolean; hqOverride?: boolean }) => fail(() => {
|
|
70
99
|
if (o.run !== undefined && o.resumeQuestion === undefined) throw new Error('--run requires --resume-question');
|
|
71
100
|
if (o.skipRecommend !== undefined && (o.recommend !== undefined || o.why !== undefined)) throw new Error('choose recommendation or skip, not both');
|
|
72
101
|
if (o.skipRecommend === undefined && (!o.recommend || !o.why)) throw new Error('--recommend and --why required, or --skip-recommend <reason>');
|
|
73
102
|
const options: DecisionOption[] = o.option.map(parseOption);
|
|
103
|
+
if (o.xcheck.length && o.noXcheck !== undefined) throw new Error('choose --xcheck or --no-xcheck, not both');
|
|
104
|
+
const crossCheck = o.xcheck.map(raw => {
|
|
105
|
+
const match = /^([^:\s]+):(.+)$/.exec(raw);
|
|
106
|
+
if (!match || !match[2]!.trim()) throw new Error(`invalid --xcheck: ${raw} (expected SEAT:메모)`);
|
|
107
|
+
return { seat: match[1]!, at: new Date().toISOString(), note: match[2]!.trim() };
|
|
108
|
+
});
|
|
109
|
+
if (!crossCheck.length && o.noXcheck === undefined && getUserConfig().decisions?.requireCrossCheck) throw new Error('교차 확인 없음 — --xcheck SEAT:메모 또는 --no-xcheck 이유');
|
|
110
|
+
const who = agent(o.agent);
|
|
111
|
+
if (!mayWrite('raise', o.hqOverride)) return;
|
|
74
112
|
const entry = new DecisionLedger(config).raise({ title: o.title, category: o.category, scqa: { s: o.s, c: o.c, ...(o.q ? { q: o.q } : {}), ...(o.a ? { a: o.a } : {}) }, options,
|
|
113
|
+
...(crossCheck.length ? { crossCheck } : { crossCheckSkipped: o.noXcheck ?? 'missing' }),
|
|
114
|
+
...(o.alternative !== undefined ? { alternative: o.alternative } : {}), ...(o.dissent !== undefined ? { dissent: o.dissent } : {}),
|
|
75
115
|
recommendation: o.skipRecommend !== undefined ? { skipped: true, reason: o.skipRecommend } : { option: o.recommend!, why: o.why! },
|
|
76
|
-
raisedBy: { agent:
|
|
116
|
+
raisedBy: { agent: who, ...(o.track ? { track: o.track } : {}), ...(o.session ? { session: o.session } : {}) }, ...(o.ref.length ? { refs: o.ref } : {}),
|
|
77
117
|
...(o.resumeQuestion !== undefined ? { resume: { questionId: o.resumeQuestion, ...(o.run !== undefined ? { runId: o.run } : {}) } } : {}),
|
|
78
118
|
...(o.due ? { dueAt: dueAt(o.due) } : {}) });
|
|
119
|
+
if (entry.crossCheckSkipped === 'missing') console.error('교차 확인 없음 — --xcheck SEAT:메모 또는 --no-xcheck 이유');
|
|
79
120
|
emit(entry, o.json, `올림: ${formatDecisionRow(entry)}`);
|
|
80
121
|
}));
|
|
122
|
+
root.command('record-seat').description('위임 범위에서 이미 내린 자리 결정을 사후 보고로 원장에 기록 (대표 카드 아님)')
|
|
123
|
+
.requiredOption('--seat <OP|MK|TC|UX>').requiredOption('--title <text>')
|
|
124
|
+
.requiredOption('--decision <text>').requiredOption('--delegation <scope>')
|
|
125
|
+
.option('--at <UTC>', '알고 있는 결정 시각 (UTC ISO; 생략 시 결정 시각 미상)')
|
|
126
|
+
.option('--ref <source>', '조율 글 등의 출처 (반복)', repeat, [] as string[])
|
|
127
|
+
.option('--json').option('--hq-override')
|
|
128
|
+
.action((o: { seat: Seat; title: string; decision: string; delegation: string; at?: string; ref: string[]; json?: boolean; hqOverride?: boolean }) => fail(() => {
|
|
129
|
+
if (!mayWrite('record-seat', o.hqOverride)) return;
|
|
130
|
+
const entry = new DecisionLedger(config).recordSeatDecision({ seat: o.seat, title: o.title, decision: o.decision,
|
|
131
|
+
delegation: o.delegation, ...(o.at ? { decidedAt: o.at } : {}), ...(o.ref.length ? { refs: o.ref } : {}) });
|
|
132
|
+
emit(entry, o.json, formatSeatDecisionRow(entry));
|
|
133
|
+
}));
|
|
134
|
+
root.command('seat-report').description('밤사이 자리들의 사후 결정을 한 번에 조회 (기본 최근 24시간)')
|
|
135
|
+
.option('--since <date>', '조회 시작 UTC ISO 또는 Nd', '1d').option('--seat <OP|MK|TC|UX>').option('--json')
|
|
136
|
+
.action((o: { since: string; seat?: Seat; json?: boolean }) => fail(() => {
|
|
137
|
+
const rows = new DecisionLedger(config).seatReport({ since: date(o.since), seat: o.seat });
|
|
138
|
+
emit(rows, o.json, rows.length ? rows.map(formatSeatDecisionRow).join('\n') : '자리 결정 0건');
|
|
139
|
+
}));
|
|
81
140
|
root.command('list').description('결정 목록 (기본 열린 것)')
|
|
82
141
|
.option('--status <open|decided|all>', '기본 open', 'open').option('--since <date>').option('--version <version>')
|
|
83
142
|
.option('--decided-by <human|auto>').option('--category <category>').option('--json')
|
|
@@ -88,11 +147,12 @@ export function registerDecisionsCommands(program: Command, config: DecisionLedg
|
|
|
88
147
|
root.command('show <id>').description('SCQA · 선택지 · 권고 · 이력 · 판').option('--json')
|
|
89
148
|
.action((id: string, o: { json?: boolean }) => fail(() => { const entry = new DecisionLedger(config).show(id); emit(entry, o.json, formatDecisionDetail(entry)); }));
|
|
90
149
|
root.command('decide <id> <option>').description('사람 또는 AUTO 위임 결정 기록')
|
|
91
|
-
.option('--note <text>').option('--auto').option('--delegation <reason>').option('--track <track>').option('--agent <agent>').option('--json')
|
|
92
|
-
.action((id: string, choice: string, o: { note?: string; auto?: boolean; delegation?: string; track?: DecisionTrack; agent?: string; json?: boolean }) => fail(() => {
|
|
150
|
+
.option('--note <text>').option('--auto').option('--delegation <reason>').option('--track <track>').option('--agent <agent>').option('--json').option('--hq-override')
|
|
151
|
+
.action((id: string, choice: string, o: { note?: string; auto?: boolean; delegation?: string; track?: DecisionTrack; agent?: string; json?: boolean; hqOverride?: boolean }) => fail(() => {
|
|
93
152
|
if (o.auto && !o.delegation?.trim()) throw new Error('--auto requires --delegation');
|
|
94
153
|
if (!o.auto && (o.delegation || o.track || o.agent)) throw new Error('delegation/track/agent require --auto');
|
|
95
154
|
const by = o.auto ? { kind: 'auto' as const, agent: agent(o.agent), delegation: o.delegation!, ...(o.track ? { track: o.track } : {}) } : { kind: 'human' as const };
|
|
155
|
+
if (!mayWrite('decide', o.hqOverride)) return;
|
|
96
156
|
const { entry, delivery } = new DecisionLedger(config).decideWithDelivery(id, choice, by, o.note);
|
|
97
157
|
if (delivery && !delivery.ok) {
|
|
98
158
|
// The decision is recorded; only the answer to the waiting run failed — say so and how to retry, never «success».
|
|
@@ -103,22 +163,26 @@ export function registerDecisionsCommands(program: Command, config: DecisionLedg
|
|
|
103
163
|
}
|
|
104
164
|
emit(delivery ? { ...entry, delivery } : entry, o.json, `결정: ${formatDecisionDetail(entry)}`);
|
|
105
165
|
}));
|
|
106
|
-
root.command('retry-answer <id>').description('기록된 결정의 대기 질문 답 전달만 재시도한다').option('--json')
|
|
107
|
-
.action((id: string, o: { json?: boolean }) => fail(() => {
|
|
166
|
+
root.command('retry-answer <id>').description('기록된 결정의 대기 질문 답 전달만 재시도한다').option('--json').option('--hq-override')
|
|
167
|
+
.action((id: string, o: { json?: boolean; hqOverride?: boolean }) => fail(() => {
|
|
168
|
+
if (!mayWrite('retry-answer', o.hqOverride)) return;
|
|
108
169
|
const entry = new DecisionLedger(config).retryAnswer(id);
|
|
109
170
|
emit(entry, o.json, `답 전달: ${entry.id} → ${entry.resume?.questionId}`);
|
|
110
171
|
}));
|
|
111
172
|
root.command('add-options <id>').description('선택지가 미기재된 과거 항목에 확인된 선택지를 추가')
|
|
112
173
|
.requiredOption('--option <key=label:consequence>', '선택지 (두 번 이상)', repeat, [] as string[])
|
|
113
|
-
.option('--agent <agent>').option('--json')
|
|
114
|
-
.action((id: string, o: { option: string[]; agent?: string; json?: boolean }) => fail(() => {
|
|
115
|
-
const
|
|
174
|
+
.option('--agent <agent>').option('--json').option('--hq-override')
|
|
175
|
+
.action((id: string, o: { option: string[]; agent?: string; json?: boolean; hqOverride?: boolean }) => fail(() => {
|
|
176
|
+
const who = agent(o.agent);
|
|
177
|
+
if (!mayWrite('add-options', o.hqOverride)) return;
|
|
178
|
+
const entry = new DecisionLedger(config).addOptions(id, o.option.map(parseOption), who);
|
|
116
179
|
emit(entry, o.json, formatDecisionDetail(entry));
|
|
117
180
|
}));
|
|
118
|
-
root.command('withdraw <id>').description('결정 철회도 원장에 남긴다').requiredOption('--reason <reason>').option('--json')
|
|
119
|
-
.action((id: string, o: { reason: string; json?: boolean }) => fail(() => { const entry = new DecisionLedger(config).withdraw(id, o.reason); emit(entry, o.json, `철회: ${formatDecisionDetail(entry)}`); }));
|
|
120
|
-
root.command('import-markdown <file>').description('기존 대표 결정 문서 씨앗을 가져온다 (재실행 안전)').option('--json')
|
|
121
|
-
.action((file: string, o: { json?: boolean }) => fail(() => {
|
|
181
|
+
root.command('withdraw <id>').description('결정 철회도 원장에 남긴다').requiredOption('--reason <reason>').option('--json').option('--hq-override')
|
|
182
|
+
.action((id: string, o: { reason: string; json?: boolean; hqOverride?: boolean }) => fail(() => { if (!mayWrite('withdraw', o.hqOverride)) return; const entry = new DecisionLedger(config).withdraw(id, o.reason); emit(entry, o.json, `철회: ${formatDecisionDetail(entry)}`); }));
|
|
183
|
+
root.command('import-markdown <file>').description('기존 대표 결정 문서 씨앗을 가져온다 (재실행 안전)').option('--json').option('--hq-override')
|
|
184
|
+
.action((file: string, o: { json?: boolean; hqOverride?: boolean }) => fail(() => {
|
|
185
|
+
if (!mayWrite('import-markdown', o.hqOverride)) return;
|
|
122
186
|
const result = importDecisionMarkdown(new DecisionLedger(config), file);
|
|
123
187
|
emit(result, o.json, `가져옴 ${result.imported.length} · 기존 ${result.existing.length} · 불완전 ${result.incomplete.length} · 못 읽음 ${result.unread.length}${result.incomplete.length ? `\n${result.incomplete.join('\n')}` : ''}${result.unread.length ? `\n${result.unread.join('\n')}` : ''}`);
|
|
124
188
|
if (result.unread.length) process.exitCode = 1;
|
package/src/cli/docs-cli.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// 양쪽에서 잡는다. 임베딩 다운 시 키워드 단독으로 강등(fail-soft).
|
|
7
7
|
|
|
8
8
|
import type { Command } from 'commander';
|
|
9
|
+
import { registerRfcStatusCommand } from './rfc-status.js';
|
|
9
10
|
import { existsSync, readFileSync } from 'node:fs';
|
|
10
11
|
import { relative, resolve } from 'node:path';
|
|
11
12
|
import { knowledgeDbPath, openKnowledgeDb, hybridQueryKnowledge } from '../domains/knowledge.js';
|
|
@@ -280,6 +281,7 @@ export async function runDocsStale(
|
|
|
280
281
|
export function registerDocsCommands(program: Command): void {
|
|
281
282
|
const docsCmd = program.command('docs')
|
|
282
283
|
.description('문서 지식 검색/관리 — knowledge.db 벡터+BM25 하이브리드 (DocOps)');
|
|
284
|
+
registerRfcStatusCommand(docsCmd);
|
|
283
285
|
docsCmd.command('search <query>')
|
|
284
286
|
.description('하이브리드 검색(RRF) — 의미(임베딩)+키워드(FTS5) 융합. 임베딩 다운 시 키워드 단독')
|
|
285
287
|
.option('--limit <n>', '최대 결과 (기본 8·최대 20)')
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import { flowCard, flowTick } from '../flow/cards.js';
|
|
3
|
+
|
|
4
|
+
export function registerFlowCommands(program: Command): void {
|
|
5
|
+
const flow = program.command('flow').description('Wish 카드 → 칸 → 릴리스 판');
|
|
6
|
+
flow.command('tick').description('새 Wish 카드 한 장 처리 (크론용)')
|
|
7
|
+
.action(async () => { const result = await flowTick(); console.log(result ? result.text : '새 카드 없음'); });
|
|
8
|
+
flow.command('plan <cardId>').description('카드 분할·배치 미리보기 (쓰기 없음)')
|
|
9
|
+
.requiredOption('--dry-run', '판·결정·카드 원장에 쓰지 않는다')
|
|
10
|
+
.action(async (cardId: string) => { console.log(JSON.stringify(await flowCard(cardId, {}, true))); });
|
|
11
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import { debug } from '../debug/log.js';
|
|
3
|
+
import { CliUserError } from './cli-user-error.js';
|
|
4
|
+
import { awaitLandingMergesDrained, disableLandingFreeze, enableLandingFreeze, readLandingFreeze, landingFreezeMessage } from '../release-loop/landing-freeze.js';
|
|
5
|
+
import { pendingFrozenMerges, sweepFrozenMerges } from '../self-implement/frozen-merges.js';
|
|
6
|
+
|
|
7
|
+
export function registerFreezeCommands(program: Command): void {
|
|
8
|
+
const freeze = program.command('freeze').description('착지 동결 상태 on/off/status');
|
|
9
|
+
freeze.command('on').option('--reason <text>', '동결 이유').option('--until <timestamp>', '끝 시각(타임존 포함 ISO)')
|
|
10
|
+
.option('--wait-seconds <n>', '이미 동결 검사를 지난 병합이 끝나기를 기다릴 최대 초', '600')
|
|
11
|
+
.action(async (opts: { reason?: string; until?: string; waitSeconds: string }) => {
|
|
12
|
+
const waitSeconds = Number(opts.waitSeconds);
|
|
13
|
+
if (!/^\d+$/.test(opts.waitSeconds.trim()) || !Number.isSafeInteger(waitSeconds) || waitSeconds > 86_400) {
|
|
14
|
+
throw new CliUserError(`잘못된 --wait-seconds: ${opts.waitSeconds}`, '0 이상 86400 이하의 정수 초');
|
|
15
|
+
}
|
|
16
|
+
const state = enableLandingFreeze(opts);
|
|
17
|
+
debug.log('harness.merge', 'freeze-on', state);
|
|
18
|
+
const drained = await awaitLandingMergesDrained(undefined, { timeoutMs: waitSeconds * 1000 });
|
|
19
|
+
debug.log('harness.merge', 'freeze-drain', drained);
|
|
20
|
+
console.log(landingFreezeMessage(state));
|
|
21
|
+
if (!drained.drained) {
|
|
22
|
+
console.error(`⚠ 동결 전에 시작한 병합 ${drained.pending}건이 아직 진행 중 — 끝나면 더 이상 병합이 시작되지 않는다`);
|
|
23
|
+
process.exitCode = 2;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
freeze.command('off').description('동결을 풀고 보류된 병합을 바로 이어 한다').action(async () => {
|
|
27
|
+
disableLandingFreeze();
|
|
28
|
+
debug.log('harness.merge', 'freeze-off', {});
|
|
29
|
+
console.log('동결 해제');
|
|
30
|
+
await resume();
|
|
31
|
+
});
|
|
32
|
+
freeze.command('resume').description('동결이 풀렸으면 보류된 병합을 지금 이어 한다').action(async () => { await resume(); });
|
|
33
|
+
freeze.command('status').option('--json', '상태 JSON').action((opts: { json?: boolean }) => {
|
|
34
|
+
const state = readLandingFreeze();
|
|
35
|
+
const pending = pendingFrozenMerges();
|
|
36
|
+
if (opts.json) console.log(JSON.stringify({ frozen: state !== null, freeze: state, pendingMerges: pending }));
|
|
37
|
+
else console.log(`${state ? landingFreezeMessage(state) : '동결 없음'} · 보류 병합 ${pending}건`);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async function resume(): Promise<void> {
|
|
42
|
+
const result = await sweepFrozenMerges();
|
|
43
|
+
debug.log('harness.merge', 'freeze-resume', result);
|
|
44
|
+
console.log(`보류 병합 이어 하기: 병합 ${result.merged}건 · 남음 ${result.pending}건`);
|
|
45
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { debug } from '../debug/log.js';
|
|
4
|
+
import { importLessons, scanLessonDocs } from '../lessons/lesson-import.js';
|
|
5
|
+
import { LessonInputError, LessonLedger, type LessonLedgerOptions, type LessonRow, type LessonDetail } from '../lessons/lesson-ledger.js';
|
|
6
|
+
|
|
7
|
+
function actor(explicit?: string): string {
|
|
8
|
+
const by = explicit?.trim() || process.env.AI_AGENT?.trim();
|
|
9
|
+
if (!by) throw new LessonInputError('--by or AI_AGENT is required');
|
|
10
|
+
return by;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function reportError(command: string, message: string): void {
|
|
14
|
+
const escaped = message.replace(/\r/g, '\\r').replace(/\n/g, '\\n')
|
|
15
|
+
.replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
|
|
16
|
+
process.stderr.write(`lesson ${command}: ${escaped}\n`);
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function handle<Args extends unknown[]>(command: string, action: (...args: Args) => void): (...args: Args) => void {
|
|
21
|
+
return (...args) => {
|
|
22
|
+
try { action(...args); }
|
|
23
|
+
catch (error) {
|
|
24
|
+
if (!(error instanceof LessonInputError)) throw error;
|
|
25
|
+
reportError(command, error.message);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function format(row: LessonRow): string {
|
|
31
|
+
return `${row.id} · ${row.status} · ${row.occurrence_count}회 · ${row.incident} · ${row.owner}`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function detail(row: LessonDetail): string {
|
|
35
|
+
return [format(row), `원인: ${row.cause}`, `처방: ${row.remedy}`, `강제: ${row.enforced_by || '없음'}`,
|
|
36
|
+
...(row.disproof ? [`반증: ${row.disproof}`] : []),
|
|
37
|
+
'발생:', ...row.occurrences.map(o => ` ${o.at} · ${o.source}${o.note ? ` · ${o.note}` : ''}`),
|
|
38
|
+
'이력:', ...row.history.map(h => ` ${h.at} · ${h.event} · ${h.by} · ${h.detail}`)].join('\n');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function registerLessonCommands(program: Command, options: LessonLedgerOptions = {}, out: Pick<Console, 'log'> = console): void {
|
|
42
|
+
const root = program.command('lesson').description('사고 · 원인 · 처방 · 재발 교훈 원장');
|
|
43
|
+
const ledger = () => new LessonLedger(options);
|
|
44
|
+
const emit = (value: unknown, json: boolean | undefined, text: string) => out.log(json ? JSON.stringify(value) : text);
|
|
45
|
+
root.command('import').description('INCIDENT·FINDING 문서 교훈 미리 보기 (기본값); --apply 로 적재')
|
|
46
|
+
.option('--apply', '원장에 적재').option('--json', 'JSON 출력').option('--by <name>', '기록자 (기본 AI_AGENT)')
|
|
47
|
+
.action(handle('import', (o: { apply?: boolean; json?: boolean; by?: string }) => {
|
|
48
|
+
const by = actor(o.by);
|
|
49
|
+
const scan = scanLessonDocs(resolve(process.cwd()));
|
|
50
|
+
const imported = importLessons(ledger(), scan.items, { apply: !!o.apply, by });
|
|
51
|
+
const result = { files: scan.files, items: imported.items, skipped: [...scan.skipped, ...imported.skipped],
|
|
52
|
+
emptyCause: imported.items.filter(item => !item.cause).length,
|
|
53
|
+
emptyRemedy: imported.items.filter(item => !item.remedy).length, written: imported.written };
|
|
54
|
+
if (o.apply) debug.log('lessons.import', 'applied', { files: result.files, items: result.items.length,
|
|
55
|
+
skipped: result.skipped.length, written: result.written });
|
|
56
|
+
emit(result, o.json, `파일 ${result.files} · 넣을 교훈 ${result.items.length} · 건너뜀 ${result.skipped.length} · 빈 원인 ${result.emptyCause} · 빈 처방 ${result.emptyRemedy} · 기록 ${result.written}`);
|
|
57
|
+
}));
|
|
58
|
+
root.command('page').description('교훈 원장에서 핸드북 페이지 생성')
|
|
59
|
+
.option('--out <file>', '출력 파일').option('--json', 'JSON 출력')
|
|
60
|
+
.action(async (o: { out?: string; json?: boolean }) => {
|
|
61
|
+
try {
|
|
62
|
+
const { generateHandbookPage } = await import('../../scripts/lessons/handbook-page.js');
|
|
63
|
+
const result = generateHandbookPage({ stateDir: options.stateDir, out: o.out });
|
|
64
|
+
emit(result, o.json, 'skipped' in result
|
|
65
|
+
? '교훈 페이지: 건너뜀(원장 비어 있음)'
|
|
66
|
+
: `교훈 페이지: ${result.out} · 총 ${result.total} · 강제 자리 없음 ${result.unenforced}`);
|
|
67
|
+
} catch (error) {
|
|
68
|
+
reportError('page', error instanceof Error ? error.message : String(error));
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
root.command('add <id>').requiredOption('--incident <text>').requiredOption('--cause <text>')
|
|
72
|
+
.requiredOption('--remedy <text>').requiredOption('--owner <name>').requiredOption('--source <path>')
|
|
73
|
+
.option('--enforced-by <paths>').option('--disproof <command>').option('--by <name>')
|
|
74
|
+
.action(handle('add', (id: string, o: { incident: string; cause: string; remedy: string; owner: string; source: string; enforcedBy?: string; disproof?: string; by?: string }) => {
|
|
75
|
+
const by = actor(o.by);
|
|
76
|
+
const row = ledger().add({ id, incident: o.incident, cause: o.cause, remedy: o.remedy, owner: o.owner,
|
|
77
|
+
source: o.source, by, ...(o.enforcedBy !== undefined ? { enforcedBy: o.enforcedBy } : {}),
|
|
78
|
+
...(o.disproof !== undefined ? { disproof: o.disproof } : {}) });
|
|
79
|
+
emit(row, false, format(row));
|
|
80
|
+
}));
|
|
81
|
+
root.command('recur <id>').requiredOption('--source <path>').option('--note <text>').option('--by <name>')
|
|
82
|
+
.action(handle('recur', (id: string, o: { source: string; note?: string; by?: string }) => {
|
|
83
|
+
const row = ledger().recur(id, { source: o.source, note: o.note ?? '', by: actor(o.by) });
|
|
84
|
+
emit(row, false, format(row));
|
|
85
|
+
}));
|
|
86
|
+
root.command('enforce <id>').requiredOption('--enforced-by <paths>').option('--by <name>')
|
|
87
|
+
.action(handle('enforce', (id: string, o: { enforcedBy: string; by?: string }) => {
|
|
88
|
+
const row = ledger().enforce(id, { enforcedBy: o.enforcedBy, by: actor(o.by) });
|
|
89
|
+
emit(row, false, format(row));
|
|
90
|
+
}));
|
|
91
|
+
root.command('promote <id>').requiredOption('--rule <path>').option('--by <name>')
|
|
92
|
+
.action(handle('promote', (id: string, o: { rule: string; by?: string }) => {
|
|
93
|
+
const row = ledger().promote(id, { rulePath: o.rule, by: actor(o.by) });
|
|
94
|
+
emit(row, false, format(row));
|
|
95
|
+
}));
|
|
96
|
+
root.command('find <query>').option('--json').action(handle('find', (query: string, o: { json?: boolean }) => {
|
|
97
|
+
const rows = ledger().find(query);
|
|
98
|
+
emit(rows, o.json, rows.length ? rows.map(format).join('\n') : '교훈 0건');
|
|
99
|
+
}));
|
|
100
|
+
root.command('show <id>').option('--json').action(handle('show', (id: string, o: { json?: boolean }) => {
|
|
101
|
+
const row = ledger().get(id);
|
|
102
|
+
emit(row, o.json, detail(row));
|
|
103
|
+
}));
|
|
104
|
+
root.command('candidates').option('--json').action(handle('candidates', (o: { json?: boolean }) => {
|
|
105
|
+
const rows = ledger().candidates();
|
|
106
|
+
emit(rows, o.json, rows.length ? rows.map(format).join('\n') : '승격 후보 0건');
|
|
107
|
+
}));
|
|
108
|
+
}
|
package/src/cli/logs-cli.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// 같은 케이던스). 레벨 제어만 데몬 REST(/v1/logs/level — 런타임 상태라 프로세스
|
|
15
15
|
// 경유 필수). 설계: 내부 문서 `PLAN-unified-log-fabric-2026-07-13` §LF3.
|
|
16
16
|
|
|
17
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
17
|
+
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
|
18
18
|
import type { Command } from 'commander';
|
|
19
19
|
import { homedir } from 'node:os';
|
|
20
20
|
import { basename, dirname, join } from 'node:path';
|
|
@@ -37,7 +37,7 @@ import { isRenderCategory, RENDER_ORIENTED_PREFIXES } from '../mss/logging/rende
|
|
|
37
37
|
import { readScopedRenderLogs } from '../mss/logging/scoped-level.js';
|
|
38
38
|
import { formatClock } from '../time/format.js';
|
|
39
39
|
import { HARNESS_SPACE_KINDS } from '../harness/harness-space.js';
|
|
40
|
-
import { LogCursorNotFoundError, STORE_SAFETY_MAX } from '../mss/logging/log-store.js';
|
|
40
|
+
import { LOG_RETENTION_DEFAULTS, LogCursorNotFoundError, STORE_SAFETY_MAX } from '../mss/logging/log-store.js';
|
|
41
41
|
import { resolveDaemonEndpoint } from '../nexus/daemon-endpoint.js';
|
|
42
42
|
import { getElanousConfigDir } from '../elanous-config-dir.js';
|
|
43
43
|
import { debug } from '../debug/log.js';
|
|
@@ -705,6 +705,74 @@ export function categoryCandidateWarning(
|
|
|
705
705
|
return `안내: 지정한 카테고리 이름은 이 로그 스토어에서 관측된 적 없습니다: ${shown}${rest > 0 ? ` 외 ${rest}개` : ''}.`;
|
|
706
706
|
}
|
|
707
707
|
|
|
708
|
+
/** A child-observation query can miss Pod-only logs even when the local store was read successfully. */
|
|
709
|
+
export function podObservationGapNotice(
|
|
710
|
+
query: Pick<LogQuery, 'categories' | 'exactCategories' | 'events'>,
|
|
711
|
+
podRuns: number,
|
|
712
|
+
): string | null {
|
|
713
|
+
if (podRuns <= 0) return null;
|
|
714
|
+
const childCategory = (category: string): boolean => ['self-implement', 'self-dev', 'harness']
|
|
715
|
+
.some((prefix) => category.startsWith(prefix));
|
|
716
|
+
const categories = [...(query.categories ?? []), ...(query.exactCategories ?? [])];
|
|
717
|
+
if (!categories.some(childCategory) && !(categories.length === 0 && (query.events?.length ?? 0) > 0)) return null;
|
|
718
|
+
return `안내: 이 창에 Pod 에서 돈 런 ${podRuns}개 — Pod 자식의 관측은 이 logs.db 에 수집되지 않는다(POD-OBS). 원장으로 본다: elanous self run-ledger <runId>`;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/** Select ledger roots independently of DB existence; --all includes registered roots with no logs.db. */
|
|
722
|
+
function podLedgerDirectories(opts: LogsCliOpts, targets: readonly LogTarget[], instances: readonly LogInstanceView[]): string[] {
|
|
723
|
+
const roots = targets.map(({ dbPath }) => dirname(dirname(dbPath)));
|
|
724
|
+
if (opts.all && !opts.instance) {
|
|
725
|
+
roots.push(dirname(dirname(prodTarget().dbPath)));
|
|
726
|
+
for (const instance of instances) {
|
|
727
|
+
if (instance.kind !== 'test' || opts.includeTest) roots.push(instance.stateDir);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
return [...new Set(roots.map((root) => join(root, 'run-ledger')))];
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/** Read-only run-ledger scan over the independently selected instance roots. */
|
|
734
|
+
async function countPodRunLedgers(
|
|
735
|
+
directories: readonly string[],
|
|
736
|
+
query: Pick<LogQuery, 'sinceMs' | 'untilMs'>,
|
|
737
|
+
): Promise<{ podRuns: number; unreadableLedgers: number }> {
|
|
738
|
+
const { loadRunLedger } = await import('../self-implement/run-ledger.js');
|
|
739
|
+
const untilMs = query.untilMs ?? Date.now();
|
|
740
|
+
const sinceMs = query.sinceMs ?? untilMs - LOG_RETENTION_DEFAULTS.maxAgeDays * 86_400_000;
|
|
741
|
+
let podRuns = 0;
|
|
742
|
+
let unreadableLedgers = 0;
|
|
743
|
+
for (const directory of directories) {
|
|
744
|
+
let files: string[];
|
|
745
|
+
try { files = readdirSync(directory); }
|
|
746
|
+
catch (error) {
|
|
747
|
+
if ((error as NodeJS.ErrnoException).code !== 'ENOENT') unreadableLedgers += 1;
|
|
748
|
+
continue;
|
|
749
|
+
}
|
|
750
|
+
for (const file of files) {
|
|
751
|
+
if (!/^run-[a-zA-Z0-9-]+\.jsonl$/.test(file)) continue;
|
|
752
|
+
try {
|
|
753
|
+
const stamp = statSync(join(directory, file));
|
|
754
|
+
if (!stamp.isFile() || stamp.mtimeMs < sinceMs) continue;
|
|
755
|
+
const ledger = loadRunLedger(file.slice(0, -'.jsonl'.length), directory);
|
|
756
|
+
if (!ledger) { unreadableLedgers += 1; continue; }
|
|
757
|
+
const origin = ledger.find((entry) => entry.event === 'run-origin');
|
|
758
|
+
if (!origin || typeof origin.data.hostname !== 'string' || !origin.data.hostname.startsWith('si-task-')) continue;
|
|
759
|
+
let start = Number.POSITIVE_INFINITY;
|
|
760
|
+
let end = Number.NEGATIVE_INFINITY;
|
|
761
|
+
for (const entry of ledger) {
|
|
762
|
+
const time = entry.timestamp === undefined ? NaN : Date.parse(entry.timestamp);
|
|
763
|
+
if (!Number.isFinite(time)) continue;
|
|
764
|
+
start = Math.min(start, time);
|
|
765
|
+
end = Math.max(end, time);
|
|
766
|
+
}
|
|
767
|
+
// Older ledgers may have no timestamp at all; their mtime is the only available window evidence.
|
|
768
|
+
if (start === Number.POSITIVE_INFINITY) { start = stamp.mtimeMs; end = stamp.mtimeMs; }
|
|
769
|
+
if (start <= untilMs && end >= sinceMs) podRuns += 1;
|
|
770
|
+
} catch { unreadableLedgers += 1; }
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
return { podRuns, unreadableLedgers };
|
|
774
|
+
}
|
|
775
|
+
|
|
708
776
|
// ── 0건 --event 안내: 이미 찍힌 기록에서만 답한다 ────────────────────────
|
|
709
777
|
//
|
|
710
778
|
// 갈림 ① 어느 범위에서 모으나 — **고정 24시간 관측 창**.
|
|
@@ -1480,9 +1548,25 @@ export async function runLogsCli(opts: LogsCliOpts, deps: RunLogsCliDeps = {}):
|
|
|
1480
1548
|
: {};
|
|
1481
1549
|
const queryStatus = registryScope.queryStatus;
|
|
1482
1550
|
const unopenedStoreBanner = unopenedStores === undefined ? '안 본 스토어 수 미측정' : `안 본 스토어 ${unopenedStores}개`;
|
|
1551
|
+
const podGap = !opts.topFailures && podObservationGapNotice(query, 1) !== null
|
|
1552
|
+
? await countPodRunLedgers(podLedgerDirectories(opts, resolved.targets, registryScope.instances), query)
|
|
1553
|
+
: null;
|
|
1554
|
+
const podNotice = podGap ? podObservationGapNotice(query, podGap.podRuns) : null;
|
|
1555
|
+
const podGapMeta = podGap && (podNotice || podGap.unreadableLedgers > 0)
|
|
1556
|
+
? { _meta: { type: 'log-query-pod-observation-gap', ...podGap } }
|
|
1557
|
+
: null;
|
|
1558
|
+
const emitPodGap = (): void => {
|
|
1559
|
+
if (!opts.json && podGap) {
|
|
1560
|
+
if (podNotice) console.error(`${podNotice}${podGap.unreadableLedgers > 0 ? ` (못 읽은 원장 ${podGap.unreadableLedgers})` : ''}`);
|
|
1561
|
+
else if (podGap.unreadableLedgers > 0) console.error(`안내: Pod 원장 조회 중 못 읽은 원장 ${podGap.unreadableLedgers}개 — Pod 런 수를 확정할 수 없다(POD-OBS).`);
|
|
1562
|
+
}
|
|
1563
|
+
if (podGapMeta && podGap) debug.log('logs.query', 'pod-observation-gap', podGap);
|
|
1564
|
+
};
|
|
1483
1565
|
if (opened.length === 0) {
|
|
1484
1566
|
console.error(`elanous logs: 열 수 있는 로그 스토어 없음 — ${missing.join(' · ') || '타겟 0'} · scope=${JSON.stringify(scope)} · queryStatus=${JSON.stringify(queryStatus)}`);
|
|
1485
1567
|
console.error(' 스토어는 해당 인스턴스 데몬(LF0 이후)이 한 번은 떠야 생성됩니다.');
|
|
1568
|
+
if (opts.json && podGapMeta) console.log(JSON.stringify(podGapMeta));
|
|
1569
|
+
emitPodGap();
|
|
1486
1570
|
return 1;
|
|
1487
1571
|
}
|
|
1488
1572
|
if (missing.length > 0) console.error(`elanous logs: 스킵 — ${missing.join(' · ')}`);
|
|
@@ -1666,6 +1750,7 @@ export async function runLogsCli(opts: LogsCliOpts, deps: RunLogsCliDeps = {}):
|
|
|
1666
1750
|
// JSONL 소비자는 stdout만 읽는다. 결손·중복 성격·상한 메타도 별도 행으로 내어 행별 JSON 파싱을 보존한다.
|
|
1667
1751
|
if (opts.json && multiSurfaceDuplicateMeta) outputLines.unshift(JSON.stringify(multiSurfaceDuplicateMeta));
|
|
1668
1752
|
if (opts.json && unreadableMeta) outputLines.unshift(JSON.stringify(unreadableMeta));
|
|
1753
|
+
if (opts.json && podGapMeta) outputLines.unshift(JSON.stringify(podGapMeta));
|
|
1669
1754
|
if (unreadableInstances.length > 0 && !opts.json) {
|
|
1670
1755
|
outputLines.unshift(`⚠️ 못 읽은 인스턴스 ${unreadableInstances.length}개: ${unreadableInstances.join(', ')}`);
|
|
1671
1756
|
}
|
|
@@ -1676,6 +1761,7 @@ export async function runLogsCli(opts: LogsCliOpts, deps: RunLogsCliDeps = {}):
|
|
|
1676
1761
|
const output = `${outputLines.join('\n')}\n`;
|
|
1677
1762
|
await new Promise<void>((resolve, reject) => process.stdout.write(output, (error) => error ? reject(error) : resolve()));
|
|
1678
1763
|
}
|
|
1764
|
+
emitPodGap();
|
|
1679
1765
|
const eventWarning = eventCategoryWarning(opts.event);
|
|
1680
1766
|
if (eventWarning) {
|
|
1681
1767
|
console.error(eventWarning);
|
|
@@ -1744,6 +1830,8 @@ export async function runLogsCli(opts: LogsCliOpts, deps: RunLogsCliDeps = {}):
|
|
|
1744
1830
|
}
|
|
1745
1831
|
seed.sort((a, b) => a.row.ts_ms - b.row.ts_ms || a.row.id - b.row.id);
|
|
1746
1832
|
for (const m of seed.slice(-20)) emit(m.row, m.name, m.path);
|
|
1833
|
+
if (opts.json && podGapMeta) console.log(JSON.stringify(podGapMeta));
|
|
1834
|
+
emitPodGap();
|
|
1747
1835
|
const cursors = new Map<string, number>();
|
|
1748
1836
|
for (const { name, store } of opened) {
|
|
1749
1837
|
try { cursors.set(name, store.maxId()); } catch { cursors.set(name, 0); }
|
|
@@ -1993,6 +2081,20 @@ logsCmd.command('durations')
|
|
|
1993
2081
|
process.exit(runLogsToolDurations(merged));
|
|
1994
2082
|
});
|
|
1995
2083
|
|
|
2084
|
+
logsCmd.command('model-input')
|
|
2085
|
+
.description('최근 노드 종류별 모델 입력 토큰 기준선 (중앙값·p90·못 잼 별도 집계, 기본 3일)')
|
|
2086
|
+
.option('--since <t>', '조회 시작 (기본 3d · 30s|15m|2h|7d 또는 ISO)')
|
|
2087
|
+
.option('--json', '구조화 JSON 출력')
|
|
2088
|
+
.option('--test', 'cwd 레포의 격리 테스트 인스턴스(.elanous-test/)')
|
|
2089
|
+
.option('--instance <name>', '레지스트리 등록 인스턴스')
|
|
2090
|
+
.option('--all', '등록된 모든 로그 인스턴스 연합 조회')
|
|
2091
|
+
.option('--include-test', '--all 연합에 격리 test 인스턴스 포함')
|
|
2092
|
+
.action(async (o: import('./logs-model-input.js').LogsModelInputOpts, cmd: { optsWithGlobals(): Record<string, unknown> }) => {
|
|
2093
|
+
const merged = { ...cmd.optsWithGlobals(), ...o } as import('./logs-model-input.js').LogsModelInputOpts;
|
|
2094
|
+
const { runLogsModelInput } = await import('./logs-model-input.js');
|
|
2095
|
+
process.exitCode = runLogsModelInput(merged);
|
|
2096
|
+
});
|
|
2097
|
+
|
|
1996
2098
|
logsCmd.command('degenerate')
|
|
1997
2099
|
.description('수치 로그 필드의 always-same/all-zero/표본 부족 퇴화를 NDJSON으로 판정 (기본 표본 50)')
|
|
1998
2100
|
.option('--category <prefix>', '카테고리 접두 필터 (복수는 쉼표)')
|