@mobrienv/autoloop 0.3.0 → 0.7.0
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/README.md +140 -43
- package/bin/autoloop +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/testing/mock-backend.js +3 -5
- package/dist/testing/mock-backend.js.map +1 -1
- package/package.json +32 -10
- package/plugins/autoloop/.claude-plugin/plugin.json +1 -1
- package/dist/agent-map.d.ts +0 -10
- package/dist/agent-map.js +0 -58
- package/dist/agent-map.js.map +0 -1
- package/dist/backend/acp-client.d.ts +0 -38
- package/dist/backend/acp-client.js +0 -288
- package/dist/backend/acp-client.js.map +0 -1
- package/dist/backend/index.d.ts +0 -10
- package/dist/backend/index.js +0 -71
- package/dist/backend/index.js.map +0 -1
- package/dist/backend/kiro-bridge.d.ts +0 -17
- package/dist/backend/kiro-bridge.js +0 -84
- package/dist/backend/kiro-bridge.js.map +0 -1
- package/dist/backend/kiro-worker.d.ts +0 -1
- package/dist/backend/kiro-worker.js +0 -92
- package/dist/backend/kiro-worker.js.map +0 -1
- package/dist/backend/run-command.d.ts +0 -7
- package/dist/backend/run-command.js +0 -50
- package/dist/backend/run-command.js.map +0 -1
- package/dist/backend/run-kiro.d.ts +0 -3
- package/dist/backend/run-kiro.js +0 -16
- package/dist/backend/run-kiro.js.map +0 -1
- package/dist/backend/run-mock.d.ts +0 -1
- package/dist/backend/run-mock.js +0 -6
- package/dist/backend/run-mock.js.map +0 -1
- package/dist/backend/run-pi.d.ts +0 -5
- package/dist/backend/run-pi.js +0 -5
- package/dist/backend/run-pi.js.map +0 -1
- package/dist/backend/types.d.ts +0 -21
- package/dist/backend/types.js +0 -2
- package/dist/backend/types.js.map +0 -1
- package/dist/chains/budget.d.ts +0 -7
- package/dist/chains/budget.js +0 -54
- package/dist/chains/budget.js.map +0 -1
- package/dist/chains/load.d.ts +0 -18
- package/dist/chains/load.js +0 -129
- package/dist/chains/load.js.map +0 -1
- package/dist/chains/render.d.ts +0 -2
- package/dist/chains/render.js +0 -74
- package/dist/chains/render.js.map +0 -1
- package/dist/chains/run.d.ts +0 -17
- package/dist/chains/run.js +0 -260
- package/dist/chains/run.js.map +0 -1
- package/dist/chains/types.d.ts +0 -38
- package/dist/chains/types.js +0 -2
- package/dist/chains/types.js.map +0 -1
- package/dist/chains.d.ts +0 -6
- package/dist/chains.js +0 -5
- package/dist/chains.js.map +0 -1
- package/dist/commands/chain.d.ts +0 -1
- package/dist/commands/chain.js +0 -53
- package/dist/commands/chain.js.map +0 -1
- package/dist/commands/config.d.ts +0 -1
- package/dist/commands/config.js +0 -74
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -1
- package/dist/commands/dashboard.js +0 -68
- package/dist/commands/dashboard.js.map +0 -1
- package/dist/commands/guide.d.ts +0 -1
- package/dist/commands/guide.js +0 -33
- package/dist/commands/guide.js.map +0 -1
- package/dist/commands/inspect.d.ts +0 -1
- package/dist/commands/inspect.js +0 -203
- package/dist/commands/inspect.js.map +0 -1
- package/dist/commands/list.d.ts +0 -1
- package/dist/commands/list.js +0 -15
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/loops.d.ts +0 -1
- package/dist/commands/loops.js +0 -72
- package/dist/commands/loops.js.map +0 -1
- package/dist/commands/memory.d.ts +0 -1
- package/dist/commands/memory.js +0 -65
- package/dist/commands/memory.js.map +0 -1
- package/dist/commands/pi-adapter.d.ts +0 -1
- package/dist/commands/pi-adapter.js +0 -6
- package/dist/commands/pi-adapter.js.map +0 -1
- package/dist/commands/run.d.ts +0 -1
- package/dist/commands/run.js +0 -292
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/runs.d.ts +0 -1
- package/dist/commands/runs.js +0 -50
- package/dist/commands/runs.js.map +0 -1
- package/dist/commands/task.d.ts +0 -1
- package/dist/commands/task.js +0 -74
- package/dist/commands/task.js.map +0 -1
- package/dist/commands/worktree.d.ts +0 -1
- package/dist/commands/worktree.js +0 -162
- package/dist/commands/worktree.js.map +0 -1
- package/dist/config.d.ts +0 -31
- package/dist/config.js +0 -261
- package/dist/config.js.map +0 -1
- package/dist/dashboard/app.d.ts +0 -12
- package/dist/dashboard/app.js +0 -23
- package/dist/dashboard/app.js.map +0 -1
- package/dist/dashboard/routes/api.d.ts +0 -3
- package/dist/dashboard/routes/api.js +0 -130
- package/dist/dashboard/routes/api.js.map +0 -1
- package/dist/dashboard/routes/pages.d.ts +0 -2
- package/dist/dashboard/routes/pages.js +0 -14
- package/dist/dashboard/routes/pages.js.map +0 -1
- package/dist/dashboard/views/alpine-vendor.d.ts +0 -1
- package/dist/dashboard/views/alpine-vendor.js +0 -10
- package/dist/dashboard/views/alpine-vendor.js.map +0 -1
- package/dist/dashboard/views/shell.d.ts +0 -1
- package/dist/dashboard/views/shell.js +0 -746
- package/dist/dashboard/views/shell.js.map +0 -1
- package/dist/events/decode.d.ts +0 -2
- package/dist/events/decode.js +0 -45
- package/dist/events/decode.js.map +0 -1
- package/dist/events/encode.d.ts +0 -2
- package/dist/events/encode.js +0 -33
- package/dist/events/encode.js.map +0 -1
- package/dist/events/guards.d.ts +0 -5
- package/dist/events/guards.js +0 -42
- package/dist/events/guards.js.map +0 -1
- package/dist/events/types.d.ts +0 -26
- package/dist/events/types.js +0 -2
- package/dist/events/types.js.map +0 -1
- package/dist/harness/config-helpers.d.ts +0 -35
- package/dist/harness/config-helpers.js +0 -411
- package/dist/harness/config-helpers.js.map +0 -1
- package/dist/harness/coordination.d.ts +0 -1
- package/dist/harness/coordination.js +0 -127
- package/dist/harness/coordination.js.map +0 -1
- package/dist/harness/display.d.ts +0 -21
- package/dist/harness/display.js +0 -176
- package/dist/harness/display.js.map +0 -1
- package/dist/harness/emit.d.ts +0 -15
- package/dist/harness/emit.js +0 -240
- package/dist/harness/emit.js.map +0 -1
- package/dist/harness/index.d.ts +0 -13
- package/dist/harness/index.js +0 -240
- package/dist/harness/index.js.map +0 -1
- package/dist/harness/iteration.d.ts +0 -16
- package/dist/harness/iteration.js +0 -131
- package/dist/harness/iteration.js.map +0 -1
- package/dist/harness/journal.d.ts +0 -31
- package/dist/harness/journal.js +0 -178
- package/dist/harness/journal.js.map +0 -1
- package/dist/harness/metareview.d.ts +0 -4
- package/dist/harness/metareview.js +0 -48
- package/dist/harness/metareview.js.map +0 -1
- package/dist/harness/metrics.d.ts +0 -12
- package/dist/harness/metrics.js +0 -180
- package/dist/harness/metrics.js.map +0 -1
- package/dist/harness/parallel.d.ts +0 -37
- package/dist/harness/parallel.js +0 -237
- package/dist/harness/parallel.js.map +0 -1
- package/dist/harness/prompt.d.ts +0 -46
- package/dist/harness/prompt.js +0 -403
- package/dist/harness/prompt.js.map +0 -1
- package/dist/harness/scratchpad.d.ts +0 -2
- package/dist/harness/scratchpad.js +0 -67
- package/dist/harness/scratchpad.js.map +0 -1
- package/dist/harness/stop.d.ts +0 -5
- package/dist/harness/stop.js +0 -70
- package/dist/harness/stop.js.map +0 -1
- package/dist/harness/tools.d.ts +0 -3
- package/dist/harness/tools.js +0 -65
- package/dist/harness/tools.js.map +0 -1
- package/dist/harness/types.d.ts +0 -110
- package/dist/harness/types.js +0 -2
- package/dist/harness/types.js.map +0 -1
- package/dist/harness/wave/finalize-wave.d.ts +0 -9
- package/dist/harness/wave/finalize-wave.js +0 -87
- package/dist/harness/wave/finalize-wave.js.map +0 -1
- package/dist/harness/wave/launch-branches.d.ts +0 -6
- package/dist/harness/wave/launch-branches.js +0 -314
- package/dist/harness/wave/launch-branches.js.map +0 -1
- package/dist/harness/wave/parse-objectives.d.ts +0 -3
- package/dist/harness/wave/parse-objectives.js +0 -32
- package/dist/harness/wave/parse-objectives.js.map +0 -1
- package/dist/harness/wave/types.d.ts +0 -43
- package/dist/harness/wave/types.js +0 -2
- package/dist/harness/wave/types.js.map +0 -1
- package/dist/harness/wave.d.ts +0 -6
- package/dist/harness/wave.js +0 -159
- package/dist/harness/wave.js.map +0 -1
- package/dist/isolation/index.d.ts +0 -4
- package/dist/isolation/index.js +0 -3
- package/dist/isolation/index.js.map +0 -1
- package/dist/isolation/resolve.d.ts +0 -39
- package/dist/isolation/resolve.js +0 -118
- package/dist/isolation/resolve.js.map +0 -1
- package/dist/isolation/run-scope.d.ts +0 -21
- package/dist/isolation/run-scope.js +0 -50
- package/dist/isolation/run-scope.js.map +0 -1
- package/dist/json.d.ts +0 -8
- package/dist/json.js +0 -82
- package/dist/json.js.map +0 -1
- package/dist/loops/health.d.ts +0 -16
- package/dist/loops/health.js +0 -152
- package/dist/loops/health.js.map +0 -1
- package/dist/loops/list.d.ts +0 -6
- package/dist/loops/list.js +0 -21
- package/dist/loops/list.js.map +0 -1
- package/dist/loops/policy.d.ts +0 -6
- package/dist/loops/policy.js +0 -41
- package/dist/loops/policy.js.map +0 -1
- package/dist/loops/render.d.ts +0 -19
- package/dist/loops/render.js +0 -100
- package/dist/loops/render.js.map +0 -1
- package/dist/loops/show.d.ts +0 -8
- package/dist/loops/show.js +0 -31
- package/dist/loops/show.js.map +0 -1
- package/dist/loops/watch.d.ts +0 -14
- package/dist/loops/watch.js +0 -143
- package/dist/loops/watch.js.map +0 -1
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -148
- package/dist/main.js.map +0 -1
- package/dist/markdown.d.ts +0 -10
- package/dist/markdown.js +0 -66
- package/dist/markdown.js.map +0 -1
- package/dist/memory-render.d.ts +0 -6
- package/dist/memory-render.js +0 -81
- package/dist/memory-render.js.map +0 -1
- package/dist/memory.d.ts +0 -22
- package/dist/memory.js +0 -318
- package/dist/memory.js.map +0 -1
- package/dist/pi-adapter.d.ts +0 -1
- package/dist/pi-adapter.js +0 -220
- package/dist/pi-adapter.js.map +0 -1
- package/dist/profiles.d.ts +0 -12
- package/dist/profiles.js +0 -71
- package/dist/profiles.js.map +0 -1
- package/dist/registry/derive.d.ts +0 -8
- package/dist/registry/derive.js +0 -88
- package/dist/registry/derive.js.map +0 -1
- package/dist/registry/discover.d.ts +0 -20
- package/dist/registry/discover.js +0 -98
- package/dist/registry/discover.js.map +0 -1
- package/dist/registry/harness.d.ts +0 -7
- package/dist/registry/harness.js +0 -63
- package/dist/registry/harness.js.map +0 -1
- package/dist/registry/index.d.ts +0 -6
- package/dist/registry/index.js +0 -6
- package/dist/registry/index.js.map +0 -1
- package/dist/registry/read.d.ts +0 -11
- package/dist/registry/read.js +0 -50
- package/dist/registry/read.js.map +0 -1
- package/dist/registry/rebuild.d.ts +0 -5
- package/dist/registry/rebuild.js +0 -22
- package/dist/registry/rebuild.js.map +0 -1
- package/dist/registry/types.d.ts +0 -28
- package/dist/registry/types.js +0 -2
- package/dist/registry/types.js.map +0 -1
- package/dist/registry/update.d.ts +0 -2
- package/dist/registry/update.js +0 -7
- package/dist/registry/update.js.map +0 -1
- package/dist/tasks-render.d.ts +0 -2
- package/dist/tasks-render.js +0 -44
- package/dist/tasks-render.js.map +0 -1
- package/dist/tasks.d.ts +0 -24
- package/dist/tasks.js +0 -184
- package/dist/tasks.js.map +0 -1
- package/dist/topology.d.ts +0 -31
- package/dist/topology.js +0 -309
- package/dist/topology.js.map +0 -1
- package/dist/usage.d.ts +0 -9
- package/dist/usage.js +0 -159
- package/dist/usage.js.map +0 -1
- package/dist/utils.d.ts +0 -21
- package/dist/utils.js +0 -349
- package/dist/utils.js.map +0 -1
- package/dist/worktree/clean.d.ts +0 -12
- package/dist/worktree/clean.js +0 -98
- package/dist/worktree/clean.js.map +0 -1
- package/dist/worktree/create.d.ts +0 -14
- package/dist/worktree/create.js +0 -71
- package/dist/worktree/create.js.map +0 -1
- package/dist/worktree/index.d.ts +0 -10
- package/dist/worktree/index.js +0 -6
- package/dist/worktree/index.js.map +0 -1
- package/dist/worktree/list.d.ts +0 -9
- package/dist/worktree/list.js +0 -24
- package/dist/worktree/list.js.map +0 -1
- package/dist/worktree/merge.d.ts +0 -11
- package/dist/worktree/merge.js +0 -129
- package/dist/worktree/merge.js.map +0 -1
- package/dist/worktree/meta.d.ts +0 -17
- package/dist/worktree/meta.js +0 -34
- package/dist/worktree/meta.js.map +0 -1
- package/presets/autocode/README.md +0 -81
- package/presets/autocode/autoloops.toml +0 -30
- package/presets/autocode/harness.md +0 -26
- package/presets/autocode/miniloops.toml +0 -22
- package/presets/autocode/roles/build.md +0 -34
- package/presets/autocode/roles/critic.md +0 -40
- package/presets/autocode/roles/finalizer.md +0 -43
- package/presets/autocode/roles/planner.md +0 -40
- package/presets/autocode/topology.toml +0 -32
- package/presets/autodoc/README.md +0 -42
- package/presets/autodoc/autoloops.toml +0 -21
- package/presets/autodoc/harness.md +0 -19
- package/presets/autodoc/miniloops.toml +0 -21
- package/presets/autodoc/roles/auditor.md +0 -39
- package/presets/autodoc/roles/checker.md +0 -43
- package/presets/autodoc/roles/publisher.md +0 -51
- package/presets/autodoc/roles/writer.md +0 -37
- package/presets/autodoc/topology.toml +0 -31
- package/presets/autofix/README.md +0 -56
- package/presets/autofix/autoloops.toml +0 -24
- package/presets/autofix/harness.md +0 -25
- package/presets/autofix/miniloops.toml +0 -21
- package/presets/autofix/roles/closer.md +0 -48
- package/presets/autofix/roles/diagnoser.md +0 -43
- package/presets/autofix/roles/fixer.md +0 -28
- package/presets/autofix/roles/verifier.md +0 -31
- package/presets/autofix/topology.toml +0 -33
- package/presets/autoideas/README.md +0 -73
- package/presets/autoideas/autoloops.toml +0 -18
- package/presets/autoideas/harness.md +0 -31
- package/presets/autoideas/miniloops.toml +0 -18
- package/presets/autoideas/roles/analyst.md +0 -32
- package/presets/autoideas/roles/reviewer.md +0 -36
- package/presets/autoideas/roles/scanner.md +0 -26
- package/presets/autoideas/roles/synthesizer.md +0 -61
- package/presets/autoideas/topology.toml +0 -32
- package/presets/automerge/README.md +0 -3
- package/presets/automerge/autoloops.toml +0 -12
- package/presets/automerge/harness.md +0 -10
- package/presets/automerge/miniloops.toml +0 -12
- package/presets/automerge/roles/merge.md +0 -10
- package/presets/automerge/topology.toml +0 -10
- package/presets/autoperf/README.md +0 -56
- package/presets/autoperf/autoloops.toml +0 -21
- package/presets/autoperf/harness.md +0 -21
- package/presets/autoperf/miniloops.toml +0 -21
- package/presets/autoperf/roles/judge.md +0 -38
- package/presets/autoperf/roles/measurer.md +0 -36
- package/presets/autoperf/roles/optimizer.md +0 -35
- package/presets/autoperf/roles/profiler.md +0 -38
- package/presets/autoperf/topology.toml +0 -32
- package/presets/autopr/README.md +0 -99
- package/presets/autopr/autoloops.toml +0 -22
- package/presets/autopr/harness.md +0 -27
- package/presets/autopr/miniloops.toml +0 -22
- package/presets/autopr/roles/collector.md +0 -55
- package/presets/autopr/roles/drafter.md +0 -38
- package/presets/autopr/roles/publisher.md +0 -28
- package/presets/autopr/roles/validator.md +0 -31
- package/presets/autopr/topology.toml +0 -32
- package/presets/autoqa/README.md +0 -76
- package/presets/autoqa/autoloops.toml +0 -21
- package/presets/autoqa/harness.md +0 -30
- package/presets/autoqa/miniloops.toml +0 -21
- package/presets/autoqa/roles/executor.md +0 -43
- package/presets/autoqa/roles/inspector.md +0 -45
- package/presets/autoqa/roles/planner.md +0 -55
- package/presets/autoqa/roles/reporter.md +0 -74
- package/presets/autoqa/topology.toml +0 -31
- package/presets/autoresearch/README.md +0 -63
- package/presets/autoresearch/autoloops.toml +0 -18
- package/presets/autoresearch/harness.md +0 -28
- package/presets/autoresearch/miniloops.toml +0 -18
- package/presets/autoresearch/roles/benchmarker.md +0 -34
- package/presets/autoresearch/roles/evaluator.md +0 -33
- package/presets/autoresearch/roles/implementer.md +0 -26
- package/presets/autoresearch/roles/strategist.md +0 -43
- package/presets/autoresearch/topology.toml +0 -31
- package/presets/autoreview/README.md +0 -51
- package/presets/autoreview/autoloops.toml +0 -21
- package/presets/autoreview/harness.md +0 -20
- package/presets/autoreview/miniloops.toml +0 -21
- package/presets/autoreview/roles/checker.md +0 -36
- package/presets/autoreview/roles/reader.md +0 -33
- package/presets/autoreview/roles/suggester.md +0 -26
- package/presets/autoreview/roles/summarizer.md +0 -57
- package/presets/autoreview/topology.toml +0 -31
- package/presets/autosec/README.md +0 -51
- package/presets/autosec/autoloops.toml +0 -21
- package/presets/autosec/harness.md +0 -20
- package/presets/autosec/miniloops.toml +0 -21
- package/presets/autosec/roles/analyst.md +0 -38
- package/presets/autosec/roles/hardener.md +0 -36
- package/presets/autosec/roles/reporter.md +0 -63
- package/presets/autosec/roles/scanner.md +0 -38
- package/presets/autosec/topology.toml +0 -31
- package/presets/autosimplify/README.md +0 -83
- package/presets/autosimplify/autoloops.toml +0 -26
- package/presets/autosimplify/harness.md +0 -25
- package/presets/autosimplify/miniloops.toml +0 -22
- package/presets/autosimplify/roles/reviewer.md +0 -38
- package/presets/autosimplify/roles/scoper.md +0 -42
- package/presets/autosimplify/roles/simplifier.md +0 -51
- package/presets/autosimplify/roles/verifier.md +0 -40
- package/presets/autosimplify/topology.toml +0 -32
- package/presets/autospec/README.md +0 -84
- package/presets/autospec/autoloops.toml +0 -21
- package/presets/autospec/harness.md +0 -23
- package/presets/autospec/miniloops.toml +0 -21
- package/presets/autospec/roles/clarifier.md +0 -39
- package/presets/autospec/roles/critic.md +0 -41
- package/presets/autospec/roles/designer.md +0 -37
- package/presets/autospec/roles/planner.md +0 -38
- package/presets/autospec/roles/researcher.md +0 -33
- package/presets/autospec/topology.toml +0 -38
- package/presets/autotest/README.md +0 -55
- package/presets/autotest/autoloops.toml +0 -21
- package/presets/autotest/harness.md +0 -21
- package/presets/autotest/miniloops.toml +0 -21
- package/presets/autotest/roles/assessor.md +0 -57
- package/presets/autotest/roles/runner.md +0 -31
- package/presets/autotest/roles/surveyor.md +0 -39
- package/presets/autotest/roles/writer.md +0 -37
- package/presets/autotest/topology.toml +0 -32
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"harness.js","sourceRoot":"","sources":["../../src/registry/harness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;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,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC7C,MAAM,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,IAAiB,EACjB,SAAiB,EACjB,MAAc;IAEd,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,IAAiB,EACjB,SAAiB,EACjB,MAAc;IAEd,gBAAgB,CACd,IAAI,EACJ,SAAS,EACT,kBAAkB,CAAC,MAAM,CAAC,EAC1B,MAAM,EACN,WAAW,CACZ,CAAC;AACJ,CAAC"}
|
package/dist/registry/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { deriveRunRecords, stopReasonToStatus } from "./derive.js";
|
|
2
|
-
export { discoverChainRegistries, mergedActiveRuns, mergedFindRunByPrefix, mergedRecentRuns, readMergedRegistry, } from "./discover.js";
|
|
3
|
-
export { activeRuns, findRunByPrefix, getRun, readRegistry, recentRuns, } from "./read.js";
|
|
4
|
-
export { rebuildRegistry } from "./rebuild.js";
|
|
5
|
-
export type { RegistryStatus, RunRecord } from "./types.js";
|
|
6
|
-
export { appendRegistryEntry } from "./update.js";
|
package/dist/registry/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { deriveRunRecords, stopReasonToStatus } from "./derive.js";
|
|
2
|
-
export { discoverChainRegistries, mergedActiveRuns, mergedFindRunByPrefix, mergedRecentRuns, readMergedRegistry, } from "./discover.js";
|
|
3
|
-
export { activeRuns, findRunByPrefix, getRun, readRegistry, recentRuns, } from "./read.js";
|
|
4
|
-
export { rebuildRegistry } from "./rebuild.js";
|
|
5
|
-
export { appendRegistryEntry } from "./update.js";
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,UAAU,EACV,eAAe,EACf,MAAM,EACN,YAAY,EACZ,UAAU,GACX,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/registry/read.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { RunRecord } from "./types.js";
|
|
2
|
-
export declare function readRegistry(path: string): RunRecord[];
|
|
3
|
-
export declare function getRun(path: string, runId: string): RunRecord | undefined;
|
|
4
|
-
export declare function activeRuns(path: string): RunRecord[];
|
|
5
|
-
export declare function recentRuns(path: string, limit: number): RunRecord[];
|
|
6
|
-
/**
|
|
7
|
-
* Find a run by exact or prefix match.
|
|
8
|
-
* Returns the matched record, or an array of candidates if ambiguous.
|
|
9
|
-
* Returns undefined if no match.
|
|
10
|
-
*/
|
|
11
|
-
export declare function findRunByPrefix(path: string, partial: string): RunRecord | RunRecord[] | undefined;
|
package/dist/registry/read.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
-
export function readRegistry(path) {
|
|
3
|
-
if (!existsSync(path))
|
|
4
|
-
return [];
|
|
5
|
-
const text = readFileSync(path, "utf-8");
|
|
6
|
-
const entries = new Map();
|
|
7
|
-
for (const line of text.split("\n")) {
|
|
8
|
-
const trimmed = line.trim();
|
|
9
|
-
if (!trimmed)
|
|
10
|
-
continue;
|
|
11
|
-
try {
|
|
12
|
-
const record = JSON.parse(trimmed);
|
|
13
|
-
if (record.run_id)
|
|
14
|
-
entries.set(record.run_id, record);
|
|
15
|
-
}
|
|
16
|
-
catch {
|
|
17
|
-
// skip malformed lines
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return Array.from(entries.values());
|
|
21
|
-
}
|
|
22
|
-
export function getRun(path, runId) {
|
|
23
|
-
return readRegistry(path).find((r) => r.run_id === runId);
|
|
24
|
-
}
|
|
25
|
-
export function activeRuns(path) {
|
|
26
|
-
return readRegistry(path).filter((r) => r.status === "running");
|
|
27
|
-
}
|
|
28
|
-
export function recentRuns(path, limit) {
|
|
29
|
-
const all = readRegistry(path);
|
|
30
|
-
all.sort((a, b) => b.updated_at.localeCompare(a.updated_at));
|
|
31
|
-
return all.slice(0, limit);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Find a run by exact or prefix match.
|
|
35
|
-
* Returns the matched record, or an array of candidates if ambiguous.
|
|
36
|
-
* Returns undefined if no match.
|
|
37
|
-
*/
|
|
38
|
-
export function findRunByPrefix(path, partial) {
|
|
39
|
-
const all = readRegistry(path);
|
|
40
|
-
const exact = all.find((r) => r.run_id === partial);
|
|
41
|
-
if (exact)
|
|
42
|
-
return exact;
|
|
43
|
-
const matches = all.filter((r) => r.run_id.startsWith(partial));
|
|
44
|
-
if (matches.length === 1)
|
|
45
|
-
return matches[0];
|
|
46
|
-
if (matches.length > 1)
|
|
47
|
-
return matches;
|
|
48
|
-
return undefined;
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=read.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/registry/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGnD,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACjC,MA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,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAC7B,IAAY,EACZ,OAAe;IAEf,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC;IACpD,IAAI,KAAK;QAAE,OAAO,KAAK,CAAC;IACxB,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5C,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC;IACvC,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/registry/rebuild.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { dirname } from "node:path";
|
|
3
|
-
import { deriveRunRecords } from "./derive.js";
|
|
4
|
-
/**
|
|
5
|
-
* Rebuild the registry JSONL from the canonical journal.
|
|
6
|
-
* Overwrites the registry file with derived state.
|
|
7
|
-
*/
|
|
8
|
-
export function rebuildRegistry(journalPath, registryPath) {
|
|
9
|
-
if (!existsSync(journalPath))
|
|
10
|
-
return;
|
|
11
|
-
const text = readFileSync(journalPath, "utf-8");
|
|
12
|
-
const lines = text
|
|
13
|
-
.split("\n")
|
|
14
|
-
.map((l) => l.trim())
|
|
15
|
-
.filter((l) => l !== "");
|
|
16
|
-
const records = deriveRunRecords(lines);
|
|
17
|
-
mkdirSync(dirname(registryPath), { recursive: true });
|
|
18
|
-
const content = records.map((r) => JSON.stringify(r)).join("\n") +
|
|
19
|
-
(records.length > 0 ? "\n" : "");
|
|
20
|
-
writeFileSync(registryPath, content, "utf-8");
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=rebuild.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rebuild.js","sourceRoot":"","sources":["../../src/registry/rebuild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;GAGG;AACH,MAAM,UAAU,eAAe,CAC7B,WAAmB,EACnB,YAAoB;IAEpB,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;QAAE,OAAO;IACrC,MAAM,IAAI,GAAG,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,IAAI;SACf,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;IAC3B,MAAM,OAAO,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACxC,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,MAAM,OAAO,GACX,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAChD,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACnC,aAAa,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC"}
|
package/dist/registry/types.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export type RegistryStatus = "running" | "completed" | "failed" | "timed_out" | "stopped";
|
|
2
|
-
export interface RunRecord {
|
|
3
|
-
run_id: string;
|
|
4
|
-
status: RegistryStatus;
|
|
5
|
-
preset: string;
|
|
6
|
-
objective: string;
|
|
7
|
-
trigger: string;
|
|
8
|
-
project_dir: string;
|
|
9
|
-
work_dir: string;
|
|
10
|
-
state_dir: string;
|
|
11
|
-
journal_file: string;
|
|
12
|
-
parent_run_id: string;
|
|
13
|
-
backend: string;
|
|
14
|
-
backend_args: string[];
|
|
15
|
-
created_at: string;
|
|
16
|
-
updated_at: string;
|
|
17
|
-
iteration: number;
|
|
18
|
-
max_iterations: number;
|
|
19
|
-
stop_reason: string;
|
|
20
|
-
latest_event: string;
|
|
21
|
-
isolation_mode: string;
|
|
22
|
-
worktree_name: string;
|
|
23
|
-
worktree_path: string;
|
|
24
|
-
pid?: number;
|
|
25
|
-
worktree_merged?: boolean;
|
|
26
|
-
worktree_merged_at?: string | null;
|
|
27
|
-
worktree_merge_strategy?: string;
|
|
28
|
-
}
|
package/dist/registry/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":""}
|
package/dist/registry/update.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { appendFileSync, mkdirSync } from "node:fs";
|
|
2
|
-
import { dirname } from "node:path";
|
|
3
|
-
export function appendRegistryEntry(path, record) {
|
|
4
|
-
mkdirSync(dirname(path), { recursive: true });
|
|
5
|
-
appendFileSync(path, `${JSON.stringify(record)}\n`, "utf-8");
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=update.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/registry/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,MAAiB;IACjE,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9C,cAAc,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/D,CAAC"}
|
package/dist/tasks-render.d.ts
DELETED
package/dist/tasks-render.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { lineSep } from "./utils.js";
|
|
2
|
-
export function renderTasksPrompt(tasks, budgetChars) {
|
|
3
|
-
if (tasks.open.length === 0 && tasks.done.length === 0)
|
|
4
|
-
return "";
|
|
5
|
-
const lines = ["Tasks:"];
|
|
6
|
-
if (tasks.open.length > 0) {
|
|
7
|
-
lines.push("Open:");
|
|
8
|
-
for (const t of tasks.open) {
|
|
9
|
-
lines.push(`- [ ] [${t.id}] ${t.text}`);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
if (tasks.done.length > 0) {
|
|
13
|
-
lines.push("Done:");
|
|
14
|
-
for (const t of tasks.done) {
|
|
15
|
-
lines.push(`- [x] [${t.id}] ${t.text} (done)`);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
const text = lines.join(lineSep()) + lineSep();
|
|
19
|
-
return truncateTasksText(text, budgetChars, tasks);
|
|
20
|
-
}
|
|
21
|
-
function truncateTasksText(text, budgetChars, tasks) {
|
|
22
|
-
if (budgetChars <= 0)
|
|
23
|
-
return text;
|
|
24
|
-
if (text.length <= budgetChars)
|
|
25
|
-
return text;
|
|
26
|
-
// Drop done tasks first, then oldest open tasks
|
|
27
|
-
const lines = text.split(lineSep());
|
|
28
|
-
const kept = [];
|
|
29
|
-
let used = 0;
|
|
30
|
-
for (const line of lines) {
|
|
31
|
-
const lineLen = line.length + 1;
|
|
32
|
-
if (used + lineLen > budgetChars)
|
|
33
|
-
break;
|
|
34
|
-
kept.push(line);
|
|
35
|
-
used += lineLen;
|
|
36
|
-
}
|
|
37
|
-
const totalEntries = tasks.open.length + tasks.done.length;
|
|
38
|
-
const keptEntries = kept.filter((l) => l.startsWith("- ")).length;
|
|
39
|
-
const dropped = totalEntries - keptEntries;
|
|
40
|
-
return (kept.join(lineSep()) +
|
|
41
|
-
"\n...\n" +
|
|
42
|
-
`(tasks truncated: ${dropped} entries dropped — ${text.length}/${budgetChars} chars)`);
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=tasks-render.js.map
|
package/dist/tasks-render.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks-render.js","sourceRoot":"","sources":["../src/tasks-render.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,UAAU,iBAAiB,CAC/B,KAAwB,EACxB,WAAmB;IAEnB,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAElE,MAAM,KAAK,GAAa,CAAC,QAAQ,CAAC,CAAC;IAEnC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpB,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAC1C,CAAC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AAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IAClE,MAAM,OAAO,GAAG,YAAY,GAAG,WAAW,CAAC;IAE3C,OAAO,CACL,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QACpB,SAAS;QACT,qBAAqB,OAAO,sBAAsB,IAAI,CAAC,MAAM,IAAI,WAAW,SAAS,CACtF,CAAC;AACJ,CAAC"}
|
package/dist/tasks.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface TaskEntry {
|
|
2
|
-
id: string;
|
|
3
|
-
type: "task" | "task-tombstone";
|
|
4
|
-
text: string;
|
|
5
|
-
status: "open" | "done";
|
|
6
|
-
source: string;
|
|
7
|
-
created: string;
|
|
8
|
-
completed?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface MaterializedTasks {
|
|
11
|
-
open: TaskEntry[];
|
|
12
|
-
done: TaskEntry[];
|
|
13
|
-
}
|
|
14
|
-
export declare function resolveFile(projectDir: string): string;
|
|
15
|
-
export declare function resolveFileIn(projectDir: string, workDir: string): string;
|
|
16
|
-
export declare function materialize(lines: string[]): MaterializedTasks;
|
|
17
|
-
export declare function materializeOpen(projectDir: string): TaskEntry[];
|
|
18
|
-
export declare function materializeOpenFrom(path: string): TaskEntry[];
|
|
19
|
-
export declare function addTask(projectDir: string, text: string, source: string): string;
|
|
20
|
-
export declare function completeTask(projectDir: string, id: string): boolean;
|
|
21
|
-
export declare function updateTask(projectDir: string, id: string, text: string): boolean;
|
|
22
|
-
export declare function removeTask(projectDir: string, id: string, reason: string): boolean;
|
|
23
|
-
export declare function listTasks(projectDir: string): string;
|
|
24
|
-
export declare function renderTaskList(tasks: MaterializedTasks): string;
|
package/dist/tasks.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { appendFileSync, mkdirSync } from "node:fs";
|
|
2
|
-
import { dirname } from "node:path";
|
|
3
|
-
import * as config from "./config.js";
|
|
4
|
-
import { readLines } from "./harness/journal.js";
|
|
5
|
-
import { extractField, jsonField } from "./json.js";
|
|
6
|
-
export function resolveFile(projectDir) {
|
|
7
|
-
const envPath = process.env.AUTOLOOP_TASKS_FILE;
|
|
8
|
-
if (envPath)
|
|
9
|
-
return envPath;
|
|
10
|
-
return config.resolveTasksFile(projectDir);
|
|
11
|
-
}
|
|
12
|
-
export function resolveFileIn(projectDir, workDir) {
|
|
13
|
-
const envPath = process.env.AUTOLOOP_TASKS_FILE;
|
|
14
|
-
if (envPath)
|
|
15
|
-
return envPath;
|
|
16
|
-
return config.resolveTasksFileIn(projectDir, workDir);
|
|
17
|
-
}
|
|
18
|
-
export function materialize(lines) {
|
|
19
|
-
const reversed = [...lines].reverse();
|
|
20
|
-
const seen = [];
|
|
21
|
-
const tombstoned = [];
|
|
22
|
-
const open = [];
|
|
23
|
-
const done = [];
|
|
24
|
-
for (const line of reversed) {
|
|
25
|
-
const type = extractField(line, "type");
|
|
26
|
-
const id = extractField(line, "id");
|
|
27
|
-
if (type === "task-tombstone") {
|
|
28
|
-
const targetId = extractField(line, "target_id");
|
|
29
|
-
tombstoned.push(targetId);
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
if (type !== "task")
|
|
33
|
-
continue;
|
|
34
|
-
if (!id)
|
|
35
|
-
continue;
|
|
36
|
-
if (tombstoned.includes(id) || seen.includes(id))
|
|
37
|
-
continue;
|
|
38
|
-
seen.push(id);
|
|
39
|
-
const entry = parseEntry(line);
|
|
40
|
-
if (entry.status === "done") {
|
|
41
|
-
done.push(entry);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
open.push(entry);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
// Open: oldest first (by creation). Done: most recent completion first.
|
|
48
|
-
return {
|
|
49
|
-
open: open.reverse(),
|
|
50
|
-
done: done.reverse(),
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function parseEntry(line) {
|
|
54
|
-
return {
|
|
55
|
-
id: extractField(line, "id"),
|
|
56
|
-
type: "task",
|
|
57
|
-
text: extractField(line, "text"),
|
|
58
|
-
status: extractField(line, "status") === "done" ? "done" : "open",
|
|
59
|
-
source: extractField(line, "source") || "manual",
|
|
60
|
-
created: extractField(line, "created"),
|
|
61
|
-
completed: extractField(line, "completed") || undefined,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
export function materializeOpen(projectDir) {
|
|
65
|
-
const path = resolveFile(projectDir);
|
|
66
|
-
const lines = readLines(path);
|
|
67
|
-
if (lines.length === 0)
|
|
68
|
-
return [];
|
|
69
|
-
return materialize(lines).open;
|
|
70
|
-
}
|
|
71
|
-
export function materializeOpenFrom(path) {
|
|
72
|
-
const lines = readLines(path);
|
|
73
|
-
if (lines.length === 0)
|
|
74
|
-
return [];
|
|
75
|
-
return materialize(lines).open;
|
|
76
|
-
}
|
|
77
|
-
export function addTask(projectDir, text, source) {
|
|
78
|
-
const path = resolveFile(projectDir);
|
|
79
|
-
const id = nextId(path);
|
|
80
|
-
appendEntry(path, taskLine(id, "task", jsonField("text", text) +
|
|
81
|
-
", " +
|
|
82
|
-
jsonField("status", "open") +
|
|
83
|
-
", " +
|
|
84
|
-
jsonField("source", source) +
|
|
85
|
-
", " +
|
|
86
|
-
jsonField("created", currentTime())));
|
|
87
|
-
return id;
|
|
88
|
-
}
|
|
89
|
-
export function completeTask(projectDir, id) {
|
|
90
|
-
const path = resolveFile(projectDir);
|
|
91
|
-
const tasks = materialize(readLines(path));
|
|
92
|
-
const entry = [...tasks.open, ...tasks.done].find((t) => t.id === id);
|
|
93
|
-
if (!entry)
|
|
94
|
-
return false;
|
|
95
|
-
if (entry.status === "done")
|
|
96
|
-
return false;
|
|
97
|
-
appendEntry(path, taskLine(id, "task", jsonField("text", entry.text) +
|
|
98
|
-
", " +
|
|
99
|
-
jsonField("status", "done") +
|
|
100
|
-
", " +
|
|
101
|
-
jsonField("source", entry.source) +
|
|
102
|
-
", " +
|
|
103
|
-
jsonField("created", entry.created) +
|
|
104
|
-
", " +
|
|
105
|
-
jsonField("completed", currentTime())));
|
|
106
|
-
return true;
|
|
107
|
-
}
|
|
108
|
-
export function updateTask(projectDir, id, text) {
|
|
109
|
-
const path = resolveFile(projectDir);
|
|
110
|
-
const tasks = materialize(readLines(path));
|
|
111
|
-
const entry = [...tasks.open, ...tasks.done].find((t) => t.id === id);
|
|
112
|
-
if (!entry)
|
|
113
|
-
return false;
|
|
114
|
-
appendEntry(path, taskLine(id, "task", jsonField("text", text) +
|
|
115
|
-
", " +
|
|
116
|
-
jsonField("status", entry.status) +
|
|
117
|
-
", " +
|
|
118
|
-
jsonField("source", entry.source) +
|
|
119
|
-
", " +
|
|
120
|
-
jsonField("created", entry.created) +
|
|
121
|
-
(entry.completed ? `, ${jsonField("completed", entry.completed)}` : "")));
|
|
122
|
-
return true;
|
|
123
|
-
}
|
|
124
|
-
export function removeTask(projectDir, id, reason) {
|
|
125
|
-
const path = resolveFile(projectDir);
|
|
126
|
-
const tasks = materialize(readLines(path));
|
|
127
|
-
const exists = [...tasks.open, ...tasks.done].some((t) => t.id === id);
|
|
128
|
-
if (!exists)
|
|
129
|
-
return false;
|
|
130
|
-
appendEntry(path, taskLine(nextId(path), "task-tombstone", jsonField("target_id", id) +
|
|
131
|
-
", " +
|
|
132
|
-
jsonField("reason", reason) +
|
|
133
|
-
", " +
|
|
134
|
-
jsonField("created", currentTime())));
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
export function listTasks(projectDir) {
|
|
138
|
-
const path = resolveFile(projectDir);
|
|
139
|
-
const tasks = materialize(readLines(path));
|
|
140
|
-
return renderTaskList(tasks);
|
|
141
|
-
}
|
|
142
|
-
export function renderTaskList(tasks) {
|
|
143
|
-
if (tasks.open.length === 0 && tasks.done.length === 0) {
|
|
144
|
-
return "No tasks.";
|
|
145
|
-
}
|
|
146
|
-
const lines = [];
|
|
147
|
-
if (tasks.open.length > 0) {
|
|
148
|
-
lines.push("Open:");
|
|
149
|
-
for (const t of tasks.open) {
|
|
150
|
-
lines.push(`- [ ] [${t.id}] ${t.text}`);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
if (tasks.done.length > 0) {
|
|
154
|
-
if (lines.length > 0)
|
|
155
|
-
lines.push("");
|
|
156
|
-
lines.push("Done:");
|
|
157
|
-
for (const t of tasks.done) {
|
|
158
|
-
lines.push(`- [x] [${t.id}] ${t.text}`);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
return lines.join("\n");
|
|
162
|
-
}
|
|
163
|
-
function appendEntry(path, content) {
|
|
164
|
-
const dir = dirname(path);
|
|
165
|
-
mkdirSync(dir, { recursive: true });
|
|
166
|
-
appendFileSync(path, content, "utf-8");
|
|
167
|
-
}
|
|
168
|
-
function nextId(path) {
|
|
169
|
-
const count = readLines(path).length;
|
|
170
|
-
return `task-${count + 1}`;
|
|
171
|
-
}
|
|
172
|
-
function currentTime() {
|
|
173
|
-
return new Date().toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
174
|
-
}
|
|
175
|
-
function taskLine(id, type, fieldsJson) {
|
|
176
|
-
return ("{" +
|
|
177
|
-
jsonField("id", id) +
|
|
178
|
-
", " +
|
|
179
|
-
jsonField("type", type) +
|
|
180
|
-
", " +
|
|
181
|
-
fieldsJson +
|
|
182
|
-
"}\n");
|
|
183
|
-
}
|
|
184
|
-
//# sourceMappingURL=tasks.js.map
|
package/dist/tasks.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../src/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,SAAS,E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AAW,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,QAAQ,CAAC,EAAU,EAAE,IAAY,EAAE,UAAkB;IAC5D,OAAO,CACL,GAAG;QACH,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC;QACnB,IAAI;QACJ,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC;QACvB,IAAI;QACJ,UAAU;QACV,KAAK,CACN,CAAC;AACJ,CAAC"}
|
package/dist/topology.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export interface Role {
|
|
2
|
-
id: string;
|
|
3
|
-
prompt: string;
|
|
4
|
-
promptFile: string;
|
|
5
|
-
emits: string[];
|
|
6
|
-
}
|
|
7
|
-
export interface Topology {
|
|
8
|
-
name: string;
|
|
9
|
-
completion: string;
|
|
10
|
-
roles: Role[];
|
|
11
|
-
handoff: Record<string, string[]>;
|
|
12
|
-
handoffKeys: string[];
|
|
13
|
-
}
|
|
14
|
-
export declare function eventMatchesAny(topic: string, patterns: string[]): boolean;
|
|
15
|
-
export declare function getRoleIds(topology: Topology): string[];
|
|
16
|
-
export declare function allEmittedEvents(topology: Topology): string[];
|
|
17
|
-
export declare function handoffKeys(topology: Topology): string[];
|
|
18
|
-
export declare function handoffTargetIds(topology: Topology): string[];
|
|
19
|
-
export declare function loadTopology(projectDir: string): Topology;
|
|
20
|
-
export declare function completionEvent(topology: Topology, fallback: string): string;
|
|
21
|
-
export declare function suggestedRoles(topology: Topology, recentEvent: string): string[];
|
|
22
|
-
export declare function allowedEvents(topology: Topology, recentEvent: string): string[];
|
|
23
|
-
export declare function roleCount(topology: Topology): number;
|
|
24
|
-
export declare function render(topology: Topology, recentEvent: string): string;
|
|
25
|
-
export declare function renderWithContext(topology: Topology, recentEvent: string, suggested: string[], allowed: string[]): string;
|
|
26
|
-
export interface TopologyWarning {
|
|
27
|
-
kind: "orphan-role" | "unreachable-event" | "no-emits";
|
|
28
|
-
message: string;
|
|
29
|
-
}
|
|
30
|
-
export declare function validateTopology(topology: Topology): TopologyWarning[];
|
|
31
|
-
export declare function renderTopologyInspect(projectDir: string, format: string): void;
|