harnery 0.0.1 → 0.2.1
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/LICENSE +21 -0
- package/README.md +84 -2
- package/bin/agent-coord +42 -0
- package/bin/agent-hook +44 -0
- package/bin/harn +40 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +18 -0
- package/dist/commander.d.ts +128 -0
- package/dist/commander.d.ts.map +1 -0
- package/dist/commander.js +126 -0
- package/dist/commands/agents.d.ts +18 -0
- package/dist/commands/agents.d.ts.map +1 -0
- package/dist/commands/agents.js +3946 -0
- package/dist/commands/backup.d.ts +22 -0
- package/dist/commands/backup.d.ts.map +1 -0
- package/dist/commands/backup.js +262 -0
- package/dist/commands/browse-ai.d.ts +4 -0
- package/dist/commands/browse-ai.d.ts.map +1 -0
- package/dist/commands/browse-ai.js +156 -0
- package/dist/commands/browse.d.ts +4 -0
- package/dist/commands/browse.d.ts.map +1 -0
- package/dist/commands/browse.js +590 -0
- package/dist/commands/callers.d.ts +4 -0
- package/dist/commands/callers.d.ts.map +1 -0
- package/dist/commands/callers.js +276 -0
- package/dist/commands/completion.d.ts +17 -0
- package/dist/commands/completion.d.ts.map +1 -0
- package/dist/commands/completion.js +158 -0
- package/dist/commands/config-get.d.ts +4 -0
- package/dist/commands/config-get.d.ts.map +1 -0
- package/dist/commands/config-get.js +131 -0
- package/dist/commands/context.d.ts +11 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +185 -0
- package/dist/commands/cookies.d.ts +4 -0
- package/dist/commands/cookies.d.ts.map +1 -0
- package/dist/commands/cookies.js +140 -0
- package/dist/commands/docs.d.ts +4 -0
- package/dist/commands/docs.d.ts.map +1 -0
- package/dist/commands/docs.js +137 -0
- package/dist/commands/doctor.d.ts +25 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +200 -0
- package/dist/commands/edit-batch.d.ts +18 -0
- package/dist/commands/edit-batch.d.ts.map +1 -0
- package/dist/commands/edit-batch.js +172 -0
- package/dist/commands/eml.d.ts +4 -0
- package/dist/commands/eml.d.ts.map +1 -0
- package/dist/commands/eml.js +428 -0
- package/dist/commands/env.d.ts +4 -0
- package/dist/commands/env.d.ts.map +1 -0
- package/dist/commands/env.js +201 -0
- package/dist/commands/fetch.d.ts +4 -0
- package/dist/commands/fetch.d.ts.map +1 -0
- package/dist/commands/fetch.js +99 -0
- package/dist/commands/file-history.d.ts +4 -0
- package/dist/commands/file-history.d.ts.map +1 -0
- package/dist/commands/file-history.js +152 -0
- package/dist/commands/grep.d.ts +4 -0
- package/dist/commands/grep.d.ts.map +1 -0
- package/dist/commands/grep.js +317 -0
- package/dist/commands/init.d.ts +82 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +288 -0
- package/dist/commands/outline.d.ts +4 -0
- package/dist/commands/outline.d.ts.map +1 -0
- package/dist/commands/outline.js +509 -0
- package/dist/commands/presence.d.ts +12 -0
- package/dist/commands/presence.d.ts.map +1 -0
- package/dist/commands/presence.js +123 -0
- package/dist/commands/read.d.ts +7 -0
- package/dist/commands/read.d.ts.map +1 -0
- package/dist/commands/read.js +46 -0
- package/dist/commands/scratch.d.ts +4 -0
- package/dist/commands/scratch.d.ts.map +1 -0
- package/dist/commands/scratch.js +426 -0
- package/dist/commands/session.d.ts +4 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +162 -0
- package/dist/commands/sync.d.ts +24 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +275 -0
- package/dist/commands/toc.d.ts +5 -0
- package/dist/commands/toc.d.ts.map +1 -0
- package/dist/commands/toc.js +153 -0
- package/dist/commands/tokens.d.ts +4 -0
- package/dist/commands/tokens.d.ts.map +1 -0
- package/dist/commands/tokens.js +48 -0
- package/dist/commands/tunnel.d.ts +4 -0
- package/dist/commands/tunnel.d.ts.map +1 -0
- package/dist/commands/tunnel.js +513 -0
- package/dist/commands/uninstall.d.ts +22 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +126 -0
- package/dist/commands/web.d.ts +4 -0
- package/dist/commands/web.d.ts.map +1 -0
- package/dist/commands/web.js +165 -0
- package/dist/core/agents/canonical-emit.d.ts +27 -0
- package/dist/core/agents/canonical-emit.d.ts.map +1 -0
- package/dist/core/agents/canonical-emit.js +72 -0
- package/dist/core/agents/cli-emit.d.ts +27 -0
- package/dist/core/agents/cli-emit.d.ts.map +1 -0
- package/dist/core/agents/cli-emit.js +57 -0
- package/dist/core/agents/cli.d.ts +10 -0
- package/dist/core/agents/cli.d.ts.map +1 -0
- package/dist/core/agents/cli.js +757 -0
- package/dist/core/agents/codex-replay.d.ts +29 -0
- package/dist/core/agents/codex-replay.d.ts.map +1 -0
- package/dist/core/agents/codex-replay.js +138 -0
- package/dist/core/agents/coord-client.d.ts +98 -0
- package/dist/core/agents/coord-client.d.ts.map +1 -0
- package/dist/core/agents/coord-client.js +212 -0
- package/dist/core/agents/events/consume.d.ts +59 -0
- package/dist/core/agents/events/consume.d.ts.map +1 -0
- package/dist/core/agents/events/consume.js +147 -0
- package/dist/core/agents/events/emit.d.ts +42 -0
- package/dist/core/agents/events/emit.d.ts.map +1 -0
- package/dist/core/agents/events/emit.js +70 -0
- package/dist/core/agents/events/ulid.d.ts +11 -0
- package/dist/core/agents/events/ulid.d.ts.map +1 -0
- package/dist/core/agents/events/ulid.js +47 -0
- package/dist/core/agents/index.d.ts +14 -0
- package/dist/core/agents/index.d.ts.map +1 -0
- package/dist/core/agents/index.js +13 -0
- package/dist/core/agents/paths.d.ts +6 -0
- package/dist/core/agents/paths.d.ts.map +1 -0
- package/dist/core/agents/paths.js +17 -0
- package/dist/core/agents/render/prompt-context.d.ts +43 -0
- package/dist/core/agents/render/prompt-context.d.ts.map +1 -0
- package/dist/core/agents/render/prompt-context.js +335 -0
- package/dist/core/agents/render/session-context.d.ts +39 -0
- package/dist/core/agents/render/session-context.d.ts.map +1 -0
- package/dist/core/agents/render/session-context.js +283 -0
- package/dist/core/agents/rules/claim-conflict.d.ts +35 -0
- package/dist/core/agents/rules/claim-conflict.d.ts.map +1 -0
- package/dist/core/agents/rules/claim-conflict.js +244 -0
- package/dist/core/agents/rules/commit-conflict.d.ts +59 -0
- package/dist/core/agents/rules/commit-conflict.d.ts.map +1 -0
- package/dist/core/agents/rules/commit-conflict.js +244 -0
- package/dist/core/agents/rules/stop-hook.d.ts +44 -0
- package/dist/core/agents/rules/stop-hook.d.ts.map +1 -0
- package/dist/core/agents/rules/stop-hook.js +161 -0
- package/dist/core/agents/session-events.d.ts +41 -0
- package/dist/core/agents/session-events.d.ts.map +1 -0
- package/dist/core/agents/session-events.js +205 -0
- package/dist/core/agents/state/activity-log.d.ts +18 -0
- package/dist/core/agents/state/activity-log.d.ts.map +1 -0
- package/dist/core/agents/state/activity-log.js +34 -0
- package/dist/core/agents/state/council.d.ts +39 -0
- package/dist/core/agents/state/council.d.ts.map +1 -0
- package/dist/core/agents/state/council.js +216 -0
- package/dist/core/agents/state/heartbeat-projector.d.ts +59 -0
- package/dist/core/agents/state/heartbeat-projector.d.ts.map +1 -0
- package/dist/core/agents/state/heartbeat-projector.js +436 -0
- package/dist/core/agents/state/heartbeat-writer.d.ts +64 -0
- package/dist/core/agents/state/heartbeat-writer.d.ts.map +1 -0
- package/dist/core/agents/state/heartbeat-writer.js +271 -0
- package/dist/core/agents/state/names.d.ts +35 -0
- package/dist/core/agents/state/names.d.ts.map +1 -0
- package/dist/core/agents/state/names.js +376 -0
- package/dist/core/agents/state/pidmap.d.ts +11 -0
- package/dist/core/agents/state/pidmap.d.ts.map +1 -0
- package/dist/core/agents/state/pidmap.js +32 -0
- package/dist/core/agents/state/scratch.d.ts +27 -0
- package/dist/core/agents/state/scratch.d.ts.map +1 -0
- package/dist/core/agents/state/scratch.js +90 -0
- package/dist/core/agents/state/shell-mutation.d.ts +17 -0
- package/dist/core/agents/state/shell-mutation.d.ts.map +1 -0
- package/dist/core/agents/state/shell-mutation.js +41 -0
- package/dist/core/agents/state/stale-sweep.d.ts +16 -0
- package/dist/core/agents/state/stale-sweep.d.ts.map +1 -0
- package/dist/core/agents/state/stale-sweep.js +166 -0
- package/dist/core/config.d.ts +29 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +108 -0
- package/dist/core/hooks/cli.d.ts +21 -0
- package/dist/core/hooks/cli.d.ts.map +1 -0
- package/dist/core/hooks/cli.js +1123 -0
- package/dist/core/hooks/effects/image-capture.d.ts +43 -0
- package/dist/core/hooks/effects/image-capture.d.ts.map +1 -0
- package/dist/core/hooks/effects/image-capture.js +288 -0
- package/dist/core/hooks/effects/index.d.ts +64 -0
- package/dist/core/hooks/effects/index.d.ts.map +1 -0
- package/dist/core/hooks/effects/index.js +197 -0
- package/dist/core/hooks/events/emit.d.ts +31 -0
- package/dist/core/hooks/events/emit.d.ts.map +1 -0
- package/dist/core/hooks/events/emit.js +89 -0
- package/dist/core/hooks/events/schema.d.ts +235 -0
- package/dist/core/hooks/events/schema.d.ts.map +1 -0
- package/dist/core/hooks/events/schema.js +12 -0
- package/dist/core/hooks/events/ulid.d.ts +10 -0
- package/dist/core/hooks/events/ulid.d.ts.map +1 -0
- package/dist/core/hooks/events/ulid.js +47 -0
- package/dist/core/hooks/harness/detect.d.ts +9 -0
- package/dist/core/hooks/harness/detect.d.ts.map +1 -0
- package/dist/core/hooks/harness/detect.js +29 -0
- package/dist/core/hooks/harness/events.d.ts +45 -0
- package/dist/core/hooks/harness/events.d.ts.map +1 -0
- package/dist/core/hooks/harness/events.js +71 -0
- package/dist/core/hooks/harness/output.d.ts +46 -0
- package/dist/core/hooks/harness/output.d.ts.map +1 -0
- package/dist/core/hooks/harness/output.js +87 -0
- package/dist/core/hooks/harness/parse.d.ts +67 -0
- package/dist/core/hooks/harness/parse.d.ts.map +1 -0
- package/dist/core/hooks/harness/parse.js +132 -0
- package/dist/core/hooks/index.d.ts +8 -0
- package/dist/core/hooks/index.d.ts.map +1 -0
- package/dist/core/hooks/index.js +7 -0
- package/dist/core/hooks/resolve/anchor.d.ts +37 -0
- package/dist/core/hooks/resolve/anchor.d.ts.map +1 -0
- package/dist/core/hooks/resolve/anchor.js +48 -0
- package/dist/core/hooks/resolve/coord-root.d.ts +6 -0
- package/dist/core/hooks/resolve/coord-root.d.ts.map +1 -0
- package/dist/core/hooks/resolve/coord-root.js +27 -0
- package/dist/core/hooks/resolve/intent.d.ts +33 -0
- package/dist/core/hooks/resolve/intent.d.ts.map +1 -0
- package/dist/core/hooks/resolve/intent.js +79 -0
- package/dist/core/hooks/resolve/owner.d.ts +42 -0
- package/dist/core/hooks/resolve/owner.d.ts.map +1 -0
- package/dist/core/hooks/resolve/owner.js +140 -0
- package/dist/core/hooks/resolve/transcript.d.ts +26 -0
- package/dist/core/hooks/resolve/transcript.d.ts.map +1 -0
- package/dist/core/hooks/resolve/transcript.js +73 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/lib/agent-browser/client.d.ts +99 -0
- package/dist/lib/agent-browser/client.d.ts.map +1 -0
- package/dist/lib/agent-browser/client.js +177 -0
- package/dist/lib/agent-browser/index.d.ts +2 -0
- package/dist/lib/agent-browser/index.d.ts.map +1 -0
- package/dist/lib/agent-browser/index.js +1 -0
- package/dist/lib/browser/client.d.ts +193 -0
- package/dist/lib/browser/client.d.ts.map +1 -0
- package/dist/lib/browser/client.js +325 -0
- package/dist/lib/browser/dev-overlay.d.ts +23 -0
- package/dist/lib/browser/dev-overlay.d.ts.map +1 -0
- package/dist/lib/browser/dev-overlay.js +153 -0
- package/dist/lib/browser/index.d.ts +5 -0
- package/dist/lib/browser/index.d.ts.map +1 -0
- package/dist/lib/browser/index.js +2 -0
- package/dist/lib/browser/layout.d.ts +79 -0
- package/dist/lib/browser/layout.d.ts.map +1 -0
- package/dist/lib/browser/layout.js +220 -0
- package/dist/lib/browser/visibility.d.ts +86 -0
- package/dist/lib/browser/visibility.d.ts.map +1 -0
- package/dist/lib/browser/visibility.js +333 -0
- package/dist/lib/browser/visual-diff.d.ts +38 -0
- package/dist/lib/browser/visual-diff.d.ts.map +1 -0
- package/dist/lib/browser/visual-diff.js +107 -0
- package/dist/lib/completion/bash.d.ts +25 -0
- package/dist/lib/completion/bash.d.ts.map +1 -0
- package/dist/lib/completion/bash.js +284 -0
- package/dist/lib/completion/fish.d.ts +16 -0
- package/dist/lib/completion/fish.d.ts.map +1 -0
- package/dist/lib/completion/fish.js +118 -0
- package/dist/lib/completion/index.d.ts +5 -0
- package/dist/lib/completion/index.d.ts.map +1 -0
- package/dist/lib/completion/index.js +4 -0
- package/dist/lib/completion/walk.d.ts +68 -0
- package/dist/lib/completion/walk.d.ts.map +1 -0
- package/dist/lib/completion/walk.js +102 -0
- package/dist/lib/completion/zsh.d.ts +13 -0
- package/dist/lib/completion/zsh.d.ts.map +1 -0
- package/dist/lib/completion/zsh.js +249 -0
- package/dist/lib/context/index.d.ts +107 -0
- package/dist/lib/context/index.d.ts.map +1 -0
- package/dist/lib/context/index.js +275 -0
- package/dist/lib/cookies/client.d.ts +131 -0
- package/dist/lib/cookies/client.d.ts.map +1 -0
- package/dist/lib/cookies/client.js +239 -0
- package/dist/lib/cookies/index.d.ts +2 -0
- package/dist/lib/cookies/index.d.ts.map +1 -0
- package/dist/lib/cookies/index.js +1 -0
- package/dist/lib/council/index.d.ts +266 -0
- package/dist/lib/council/index.d.ts.map +1 -0
- package/dist/lib/council/index.js +674 -0
- package/dist/lib/docs-index.d.ts +28 -0
- package/dist/lib/docs-index.d.ts.map +1 -0
- package/dist/lib/docs-index.js +169 -0
- package/dist/lib/docs-lint.d.ts +26 -0
- package/dist/lib/docs-lint.d.ts.map +1 -0
- package/dist/lib/docs-lint.js +378 -0
- package/dist/lib/docs-sweep.d.ts +34 -0
- package/dist/lib/docs-sweep.d.ts.map +1 -0
- package/dist/lib/docs-sweep.js +304 -0
- package/dist/lib/docs.d.ts +27 -0
- package/dist/lib/docs.d.ts.map +1 -0
- package/dist/lib/docs.js +142 -0
- package/dist/lib/env.d.ts +11 -0
- package/dist/lib/env.d.ts.map +1 -0
- package/dist/lib/env.js +12 -0
- package/dist/lib/exec.d.ts +32 -0
- package/dist/lib/exec.d.ts.map +1 -0
- package/dist/lib/exec.js +54 -0
- package/dist/lib/format.d.ts +29 -0
- package/dist/lib/format.d.ts.map +1 -0
- package/dist/lib/format.js +139 -0
- package/dist/lib/http/client.d.ts +56 -0
- package/dist/lib/http/client.d.ts.map +1 -0
- package/dist/lib/http/client.js +160 -0
- package/dist/lib/http/index.d.ts +2 -0
- package/dist/lib/http/index.d.ts.map +1 -0
- package/dist/lib/http/index.js +1 -0
- package/dist/lib/identities/index.d.ts +77 -0
- package/dist/lib/identities/index.d.ts.map +1 -0
- package/dist/lib/identities/index.js +190 -0
- package/dist/lib/machine.d.ts +19 -0
- package/dist/lib/machine.d.ts.map +1 -0
- package/dist/lib/machine.js +61 -0
- package/dist/lib/presence.d.ts +48 -0
- package/dist/lib/presence.d.ts.map +1 -0
- package/dist/lib/presence.js +123 -0
- package/dist/lib/readability/client.d.ts +39 -0
- package/dist/lib/readability/client.d.ts.map +1 -0
- package/dist/lib/readability/client.js +121 -0
- package/dist/lib/readability/index.d.ts +2 -0
- package/dist/lib/readability/index.d.ts.map +1 -0
- package/dist/lib/readability/index.js +1 -0
- package/dist/lib/scratch/index.d.ts +74 -0
- package/dist/lib/scratch/index.d.ts.map +1 -0
- package/dist/lib/scratch/index.js +393 -0
- package/dist/lib/tunnel/gate.d.ts +12 -0
- package/dist/lib/tunnel/gate.d.ts.map +1 -0
- package/dist/lib/tunnel/gate.js +101 -0
- package/dist/lib/tunnel/state.d.ts +34 -0
- package/dist/lib/tunnel/state.d.ts.map +1 -0
- package/dist/lib/tunnel/state.js +132 -0
- package/package.json +160 -8
- package/schemas/.gitkeep +0 -0
- package/schemas/config.schema.json +109 -0
- package/src/cli.ts +22 -0
- package/src/commander.ts +242 -0
- package/src/commands/.gitkeep +0 -0
- package/src/commands/agents.ts +4567 -0
- package/src/commands/backup.ts +305 -0
- package/src/commands/browse-ai.ts +198 -0
- package/src/commands/browse.ts +849 -0
- package/src/commands/callers.ts +363 -0
- package/src/commands/completion.ts +193 -0
- package/src/commands/config-get.ts +161 -0
- package/src/commands/context.ts +209 -0
- package/src/commands/cookies.ts +198 -0
- package/src/commands/docs.ts +174 -0
- package/src/commands/doctor.ts +231 -0
- package/src/commands/edit-batch.ts +233 -0
- package/src/commands/eml.ts +519 -0
- package/src/commands/env.ts +254 -0
- package/src/commands/fetch.ts +136 -0
- package/src/commands/file-history.ts +202 -0
- package/src/commands/grep.ts +371 -0
- package/src/commands/init.ts +335 -0
- package/src/commands/outline.ts +583 -0
- package/src/commands/presence.ts +152 -0
- package/src/commands/read.ts +64 -0
- package/src/commands/scratch.ts +445 -0
- package/src/commands/session.ts +187 -0
- package/src/commands/sync.ts +306 -0
- package/src/commands/toc.ts +218 -0
- package/src/commands/tokens.ts +79 -0
- package/src/commands/tunnel.ts +633 -0
- package/src/commands/uninstall.ts +144 -0
- package/src/commands/web.ts +193 -0
- package/src/core/agents/canonical-emit.ts +77 -0
- package/src/core/agents/cli-emit.ts +64 -0
- package/src/core/agents/cli.ts +838 -0
- package/src/core/agents/codex-replay.ts +163 -0
- package/src/core/agents/coord-client.ts +249 -0
- package/src/core/agents/events/consume.ts +196 -0
- package/src/core/agents/events/emit.ts +108 -0
- package/src/core/agents/events/ulid.ts +51 -0
- package/src/core/agents/index.ts +14 -0
- package/src/core/agents/paths.ts +16 -0
- package/src/core/agents/render/prompt-context.ts +401 -0
- package/src/core/agents/render/session-context.ts +341 -0
- package/src/core/agents/rules/claim-conflict.ts +282 -0
- package/src/core/agents/rules/commit-conflict.ts +303 -0
- package/src/core/agents/rules/stop-hook.ts +229 -0
- package/src/core/agents/session-events.ts +228 -0
- package/src/core/agents/state/activity-log.ts +33 -0
- package/src/core/agents/state/council.ts +265 -0
- package/src/core/agents/state/heartbeat-projector.ts +488 -0
- package/src/core/agents/state/heartbeat-writer.ts +333 -0
- package/src/core/agents/state/names.ts +399 -0
- package/src/core/agents/state/pidmap.ts +38 -0
- package/src/core/agents/state/scratch.ts +121 -0
- package/src/core/agents/state/shell-mutation.ts +44 -0
- package/src/core/agents/state/stale-sweep.ts +190 -0
- package/src/core/config.ts +111 -0
- package/src/core/hooks/cli.ts +1247 -0
- package/src/core/hooks/effects/image-capture.ts +330 -0
- package/src/core/hooks/effects/index.ts +210 -0
- package/src/core/hooks/events/emit.ts +120 -0
- package/src/core/hooks/events/schema.ts +430 -0
- package/src/core/hooks/events/ulid.ts +51 -0
- package/src/core/hooks/harness/detect.ts +30 -0
- package/src/core/hooks/harness/events.ts +102 -0
- package/src/core/hooks/harness/output.ts +100 -0
- package/src/core/hooks/harness/parse.ts +180 -0
- package/src/core/hooks/index.ts +16 -0
- package/src/core/hooks/resolve/anchor.ts +51 -0
- package/src/core/hooks/resolve/coord-root.ts +25 -0
- package/src/core/hooks/resolve/intent.ts +89 -0
- package/src/core/hooks/resolve/owner.ts +140 -0
- package/src/core/hooks/resolve/transcript.ts +72 -0
- package/src/hooks/.gitkeep +0 -0
- package/src/index.ts +15 -0
- package/src/lib/agent-browser/client.ts +239 -0
- package/src/lib/agent-browser/index.ts +1 -0
- package/src/lib/browser/client.ts +449 -0
- package/src/lib/browser/dev-overlay.ts +207 -0
- package/src/lib/browser/index.ts +24 -0
- package/src/lib/browser/layout.ts +288 -0
- package/src/lib/browser/visibility.ts +419 -0
- package/src/lib/browser/visual-diff.ts +150 -0
- package/src/lib/completion/bash.ts +291 -0
- package/src/lib/completion/fish.ts +134 -0
- package/src/lib/completion/index.ts +10 -0
- package/src/lib/completion/walk.ts +184 -0
- package/src/lib/completion/zsh.ts +262 -0
- package/src/lib/context/index.ts +386 -0
- package/src/lib/cookies/client.ts +301 -0
- package/src/lib/cookies/index.ts +13 -0
- package/src/lib/council/index.ts +803 -0
- package/src/lib/docs-index.ts +216 -0
- package/src/lib/docs-lint.ts +413 -0
- package/src/lib/docs-sweep.ts +348 -0
- package/src/lib/docs.ts +199 -0
- package/src/lib/env.ts +12 -0
- package/src/lib/exec.ts +74 -0
- package/src/lib/format.ts +147 -0
- package/src/lib/http/client.ts +211 -0
- package/src/lib/http/index.ts +1 -0
- package/src/lib/identities/index.ts +210 -0
- package/src/lib/machine.ts +61 -0
- package/src/lib/presence.ts +154 -0
- package/src/lib/readability/client.ts +169 -0
- package/src/lib/readability/index.ts +5 -0
- package/src/lib/readability/turndown-plugin-gfm.d.ts +10 -0
- package/src/lib/scratch/index.ts +470 -0
- package/src/lib/tunnel/gate.ts +113 -0
- package/src/lib/tunnel/state.ts +167 -0
- package/src/web/.gitkeep +0 -0
- package/index.js +0 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared cookie-store library.
|
|
3
|
+
*
|
|
4
|
+
* Design:
|
|
5
|
+
* - CDP-native cookie format (matches Playwright/agent-browser output).
|
|
6
|
+
* - Caller chooses the store path on construction; the harn defaults are
|
|
7
|
+
* `~/.cache/harnery/cookies.json`. Consumers can point at any path.
|
|
8
|
+
* - Pure synchronous I/O; the store is small (<1MB typical) so async
|
|
9
|
+
* buys nothing and complicates the merge-on-write path.
|
|
10
|
+
*/
|
|
11
|
+
/** CDP-native cookie. `expires === -1` means session cookie / no expiry. */
|
|
12
|
+
export interface Cookie {
|
|
13
|
+
name: string;
|
|
14
|
+
value: string;
|
|
15
|
+
domain: string;
|
|
16
|
+
path: string;
|
|
17
|
+
expires: number;
|
|
18
|
+
size?: number;
|
|
19
|
+
httpOnly: boolean;
|
|
20
|
+
secure: boolean;
|
|
21
|
+
session?: boolean;
|
|
22
|
+
sameSite?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface OriginEntry {
|
|
25
|
+
origin: string;
|
|
26
|
+
localStorage: {
|
|
27
|
+
name: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}[];
|
|
30
|
+
}
|
|
31
|
+
export interface CookieStore {
|
|
32
|
+
cookies: Cookie[];
|
|
33
|
+
origins: OriginEntry[];
|
|
34
|
+
exportedAt?: string;
|
|
35
|
+
exportedFrom?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface CookieJarOptions {
|
|
38
|
+
/** Absolute path to the JSON store. Caller must provide. */
|
|
39
|
+
path: string;
|
|
40
|
+
/** `exportedFrom` tag stamped on every save. Defaults to `"bp-cookies"`. */
|
|
41
|
+
source?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface InfoResult {
|
|
44
|
+
path: string;
|
|
45
|
+
exists: boolean;
|
|
46
|
+
bytes: number;
|
|
47
|
+
active: number;
|
|
48
|
+
expired: number;
|
|
49
|
+
total: number;
|
|
50
|
+
domains: string[];
|
|
51
|
+
origins: number;
|
|
52
|
+
exportedAt?: string;
|
|
53
|
+
exportedFrom?: string;
|
|
54
|
+
}
|
|
55
|
+
export declare class CookieJar {
|
|
56
|
+
readonly path: string;
|
|
57
|
+
private readonly source;
|
|
58
|
+
constructor(opts: CookieJarOptions);
|
|
59
|
+
exists(): boolean;
|
|
60
|
+
load(): CookieStore;
|
|
61
|
+
/**
|
|
62
|
+
* Persist a store, stamping `exportedAt` (now) and `exportedFrom`
|
|
63
|
+
* (constructor-provided source). Creates the parent directory if needed.
|
|
64
|
+
*/
|
|
65
|
+
save(store: CookieStore): void;
|
|
66
|
+
/**
|
|
67
|
+
* Read + filter helper. Drops expired cookies. Optional domain filter
|
|
68
|
+
* uses the same `domainMatches` logic Playwright/CDP do (leading dot
|
|
69
|
+
* means subdomain match).
|
|
70
|
+
*/
|
|
71
|
+
list(filter?: {
|
|
72
|
+
domain?: string;
|
|
73
|
+
}): Cookie[];
|
|
74
|
+
/**
|
|
75
|
+
* Set a single cookie, merging into the store on `(name, domain, path)`.
|
|
76
|
+
* Returns the saved store.
|
|
77
|
+
*/
|
|
78
|
+
set(cookie: Cookie): CookieStore;
|
|
79
|
+
/**
|
|
80
|
+
* Clear cookies. Pass `{ all: true }` to wipe everything (including
|
|
81
|
+
* origins/localStorage), or `{ domain: "..." }` to drop matching cookies
|
|
82
|
+
* + origins. Returns counts before/after.
|
|
83
|
+
*/
|
|
84
|
+
clear(opts: {
|
|
85
|
+
domain?: string;
|
|
86
|
+
all?: boolean;
|
|
87
|
+
}): {
|
|
88
|
+
before: number;
|
|
89
|
+
after: number;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Build a `Cookie:` header value for a URL. Only cookies that match
|
|
93
|
+
* domain + path + secure rules are included. Returns `""` when nothing
|
|
94
|
+
* matches.
|
|
95
|
+
*/
|
|
96
|
+
header(url: string): string;
|
|
97
|
+
/**
|
|
98
|
+
* Import cookies from a JSON file. Accepts three shapes:
|
|
99
|
+
* - `{ cookies: [...] }` (CDP/agent-browser native)
|
|
100
|
+
* - `{ data: { cookies: [...] } }` (agent-browser wrapper envelope)
|
|
101
|
+
* - `[...]` (raw array)
|
|
102
|
+
*
|
|
103
|
+
* `replace: true` overwrites the store; default merges on `(name, domain, path)`.
|
|
104
|
+
* Returns the count imported.
|
|
105
|
+
*/
|
|
106
|
+
import(filePath: string, opts?: {
|
|
107
|
+
replace?: boolean;
|
|
108
|
+
}): {
|
|
109
|
+
count: number;
|
|
110
|
+
};
|
|
111
|
+
/** Write the entire store to a file (for sharing with another tool). */
|
|
112
|
+
export(filePath: string): {
|
|
113
|
+
count: number;
|
|
114
|
+
};
|
|
115
|
+
/** Stats for the `info` command. Stable shape so callers can JSON it. */
|
|
116
|
+
info(): InfoResult;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Merge cookies into a store. Newer entries with the same
|
|
120
|
+
* `(name, domain, path)` triple replace older ones. Pure; caller must save.
|
|
121
|
+
*/
|
|
122
|
+
export declare function mergeCookies(store: CookieStore, incoming: Cookie[]): CookieStore;
|
|
123
|
+
/** RFC 6265 domain match. Leading dot in cookie domain means subdomain match. */
|
|
124
|
+
export declare function domainMatches(cookieDomain: string, hostname: string): boolean;
|
|
125
|
+
/** RFC 6265 path match. */
|
|
126
|
+
export declare function pathMatches(cookiePath: string, urlPath: string): boolean;
|
|
127
|
+
/** `expires <= 0` is a session cookie / no expiry; otherwise compare to now. */
|
|
128
|
+
export declare function isExpired(cookie: Cookie): boolean;
|
|
129
|
+
/** Cookies that should be sent with a request to `url`. */
|
|
130
|
+
export declare function matchingCookies(store: CookieStore, url: string): Cookie[];
|
|
131
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/cookies/client.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH,4EAA4E;AAC5E,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACjD;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,MAAM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MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;IAY3C,yEAAyE;IACzE,IAAI,IAAI,UAAU;CAgCnB;AAMD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,WAAW,CAMhF;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAK7E;AAED,2BAA2B;AAC3B,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAKxE;AAED,gFAAgF;AAChF,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAGjD;AAED,2DAA2D;AAC3D,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAUzE"}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { dirname } from "node:path";
|
|
3
|
+
export class CookieJar {
|
|
4
|
+
path;
|
|
5
|
+
source;
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
this.path = opts.path;
|
|
8
|
+
this.source = opts.source ?? "bp-cookies";
|
|
9
|
+
}
|
|
10
|
+
exists() {
|
|
11
|
+
return existsSync(this.path);
|
|
12
|
+
}
|
|
13
|
+
load() {
|
|
14
|
+
if (!existsSync(this.path)) {
|
|
15
|
+
return { cookies: [], origins: [] };
|
|
16
|
+
}
|
|
17
|
+
const raw = readFileSync(this.path, "utf-8");
|
|
18
|
+
const parsed = JSON.parse(raw);
|
|
19
|
+
return {
|
|
20
|
+
cookies: parsed.cookies ?? [],
|
|
21
|
+
origins: parsed.origins ?? [],
|
|
22
|
+
exportedAt: parsed.exportedAt,
|
|
23
|
+
exportedFrom: parsed.exportedFrom,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Persist a store, stamping `exportedAt` (now) and `exportedFrom`
|
|
28
|
+
* (constructor-provided source). Creates the parent directory if needed.
|
|
29
|
+
*/
|
|
30
|
+
save(store) {
|
|
31
|
+
const stamped = {
|
|
32
|
+
...store,
|
|
33
|
+
exportedAt: new Date().toISOString(),
|
|
34
|
+
exportedFrom: this.source,
|
|
35
|
+
};
|
|
36
|
+
mkdirSync(dirname(this.path), { recursive: true });
|
|
37
|
+
writeFileSync(this.path, `${JSON.stringify(stamped, null, 2)}\n`);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Read + filter helper. Drops expired cookies. Optional domain filter
|
|
41
|
+
* uses the same `domainMatches` logic Playwright/CDP do (leading dot
|
|
42
|
+
* means subdomain match).
|
|
43
|
+
*/
|
|
44
|
+
list(filter = {}) {
|
|
45
|
+
const store = this.load();
|
|
46
|
+
let cookies = store.cookies.filter((c) => !isExpired(c));
|
|
47
|
+
if (filter.domain) {
|
|
48
|
+
cookies = cookies.filter((c) => domainMatches(c.domain, filter.domain));
|
|
49
|
+
}
|
|
50
|
+
return cookies;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Set a single cookie, merging into the store on `(name, domain, path)`.
|
|
54
|
+
* Returns the saved store.
|
|
55
|
+
*/
|
|
56
|
+
set(cookie) {
|
|
57
|
+
const store = this.load();
|
|
58
|
+
const merged = mergeCookies(store, [cookie]);
|
|
59
|
+
this.save(merged);
|
|
60
|
+
return merged;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Clear cookies. Pass `{ all: true }` to wipe everything (including
|
|
64
|
+
* origins/localStorage), or `{ domain: "..." }` to drop matching cookies
|
|
65
|
+
* + origins. Returns counts before/after.
|
|
66
|
+
*/
|
|
67
|
+
clear(opts) {
|
|
68
|
+
if (!opts.domain && !opts.all) {
|
|
69
|
+
throw new Error("Specify { domain } or { all: true }");
|
|
70
|
+
}
|
|
71
|
+
const store = this.load();
|
|
72
|
+
const before = store.cookies.length;
|
|
73
|
+
if (opts.all) {
|
|
74
|
+
store.cookies = [];
|
|
75
|
+
store.origins = [];
|
|
76
|
+
}
|
|
77
|
+
else if (opts.domain) {
|
|
78
|
+
const dom = opts.domain;
|
|
79
|
+
store.cookies = store.cookies.filter((c) => !domainMatches(c.domain, dom));
|
|
80
|
+
store.origins = store.origins.filter((o) => {
|
|
81
|
+
try {
|
|
82
|
+
return !domainMatches(dom, new URL(o.origin).hostname);
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
this.save(store);
|
|
90
|
+
return { before, after: store.cookies.length };
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Build a `Cookie:` header value for a URL. Only cookies that match
|
|
94
|
+
* domain + path + secure rules are included. Returns `""` when nothing
|
|
95
|
+
* matches.
|
|
96
|
+
*/
|
|
97
|
+
header(url) {
|
|
98
|
+
const store = this.load();
|
|
99
|
+
const cookies = matchingCookies(store, url);
|
|
100
|
+
return cookies.map((c) => `${c.name}=${c.value}`).join("; ");
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Import cookies from a JSON file. Accepts three shapes:
|
|
104
|
+
* - `{ cookies: [...] }` (CDP/agent-browser native)
|
|
105
|
+
* - `{ data: { cookies: [...] } }` (agent-browser wrapper envelope)
|
|
106
|
+
* - `[...]` (raw array)
|
|
107
|
+
*
|
|
108
|
+
* `replace: true` overwrites the store; default merges on `(name, domain, path)`.
|
|
109
|
+
* Returns the count imported.
|
|
110
|
+
*/
|
|
111
|
+
import(filePath, opts = {}) {
|
|
112
|
+
if (!existsSync(filePath)) {
|
|
113
|
+
throw new Error(`File not found: ${filePath}`);
|
|
114
|
+
}
|
|
115
|
+
const raw = readFileSync(filePath, "utf-8");
|
|
116
|
+
const incoming = JSON.parse(raw);
|
|
117
|
+
const cookies = incoming.cookies ?? incoming.data?.cookies ?? incoming;
|
|
118
|
+
if (!Array.isArray(cookies)) {
|
|
119
|
+
throw new Error(`Expected a cookies array in ${filePath}`);
|
|
120
|
+
}
|
|
121
|
+
if (opts.replace) {
|
|
122
|
+
const store = { cookies, origins: incoming.origins ?? [] };
|
|
123
|
+
this.save(store);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
const store = this.load();
|
|
127
|
+
const merged = mergeCookies(store, cookies);
|
|
128
|
+
if (incoming.origins) {
|
|
129
|
+
const seen = new Set(store.origins.map((o) => o.origin));
|
|
130
|
+
for (const o of incoming.origins) {
|
|
131
|
+
if (!seen.has(o.origin))
|
|
132
|
+
merged.origins.push(o);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
this.save(merged);
|
|
136
|
+
}
|
|
137
|
+
return { count: cookies.length };
|
|
138
|
+
}
|
|
139
|
+
/** Write the entire store to a file (for sharing with another tool). */
|
|
140
|
+
export(filePath) {
|
|
141
|
+
const store = this.load();
|
|
142
|
+
const stamped = {
|
|
143
|
+
...store,
|
|
144
|
+
exportedAt: new Date().toISOString(),
|
|
145
|
+
exportedFrom: `${this.source}-export`,
|
|
146
|
+
};
|
|
147
|
+
mkdirSync(dirname(filePath), { recursive: true });
|
|
148
|
+
writeFileSync(filePath, `${JSON.stringify(stamped, null, 2)}\n`);
|
|
149
|
+
return { count: stamped.cookies.length };
|
|
150
|
+
}
|
|
151
|
+
/** Stats for the `info` command. Stable shape so callers can JSON it. */
|
|
152
|
+
info() {
|
|
153
|
+
if (!existsSync(this.path)) {
|
|
154
|
+
return {
|
|
155
|
+
path: this.path,
|
|
156
|
+
exists: false,
|
|
157
|
+
bytes: 0,
|
|
158
|
+
active: 0,
|
|
159
|
+
expired: 0,
|
|
160
|
+
total: 0,
|
|
161
|
+
domains: [],
|
|
162
|
+
origins: 0,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
const store = this.load();
|
|
166
|
+
const expired = store.cookies.filter(isExpired).length;
|
|
167
|
+
const active = store.cookies.length - expired;
|
|
168
|
+
const domainSet = new Set(store.cookies.map((c) => (c.domain.startsWith(".") ? c.domain.slice(1) : c.domain)));
|
|
169
|
+
return {
|
|
170
|
+
path: this.path,
|
|
171
|
+
exists: true,
|
|
172
|
+
bytes: statSync(this.path).size,
|
|
173
|
+
active,
|
|
174
|
+
expired,
|
|
175
|
+
total: store.cookies.length,
|
|
176
|
+
domains: [...domainSet].sort(),
|
|
177
|
+
origins: store.origins.length,
|
|
178
|
+
exportedAt: store.exportedAt,
|
|
179
|
+
exportedFrom: store.exportedFrom,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// ---------------------------------------------------------------------------
|
|
184
|
+
// Standalone helpers (also exported so callers without a CookieJar can use them)
|
|
185
|
+
// ---------------------------------------------------------------------------
|
|
186
|
+
/**
|
|
187
|
+
* Merge cookies into a store. Newer entries with the same
|
|
188
|
+
* `(name, domain, path)` triple replace older ones. Pure; caller must save.
|
|
189
|
+
*/
|
|
190
|
+
export function mergeCookies(store, incoming) {
|
|
191
|
+
const key = (c) => `${c.name}|${c.domain}|${c.path}`;
|
|
192
|
+
const map = new Map();
|
|
193
|
+
for (const c of store.cookies)
|
|
194
|
+
map.set(key(c), c);
|
|
195
|
+
for (const c of incoming)
|
|
196
|
+
map.set(key(c), c);
|
|
197
|
+
return { ...store, cookies: Array.from(map.values()) };
|
|
198
|
+
}
|
|
199
|
+
/** RFC 6265 domain match. Leading dot in cookie domain means subdomain match. */
|
|
200
|
+
export function domainMatches(cookieDomain, hostname) {
|
|
201
|
+
const cd = cookieDomain.startsWith(".") ? cookieDomain.slice(1) : cookieDomain;
|
|
202
|
+
if (hostname === cd)
|
|
203
|
+
return true;
|
|
204
|
+
if (hostname.endsWith(`.${cd}`))
|
|
205
|
+
return true;
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
/** RFC 6265 path match. */
|
|
209
|
+
export function pathMatches(cookiePath, urlPath) {
|
|
210
|
+
if (urlPath === cookiePath)
|
|
211
|
+
return true;
|
|
212
|
+
if (urlPath.startsWith(cookiePath) && cookiePath.endsWith("/"))
|
|
213
|
+
return true;
|
|
214
|
+
if (urlPath.startsWith(`${cookiePath}/`))
|
|
215
|
+
return true;
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
/** `expires <= 0` is a session cookie / no expiry; otherwise compare to now. */
|
|
219
|
+
export function isExpired(cookie) {
|
|
220
|
+
if (cookie.expires <= 0)
|
|
221
|
+
return false;
|
|
222
|
+
return cookie.expires < Date.now() / 1000;
|
|
223
|
+
}
|
|
224
|
+
/** Cookies that should be sent with a request to `url`. */
|
|
225
|
+
export function matchingCookies(store, url) {
|
|
226
|
+
const parsed = new URL(url);
|
|
227
|
+
const isSecure = parsed.protocol === "https:";
|
|
228
|
+
return store.cookies.filter((c) => {
|
|
229
|
+
if (isExpired(c))
|
|
230
|
+
return false;
|
|
231
|
+
if (!domainMatches(c.domain, parsed.hostname))
|
|
232
|
+
return false;
|
|
233
|
+
if (!pathMatches(c.path, parsed.pathname))
|
|
234
|
+
return false;
|
|
235
|
+
if (c.secure && !isSecure)
|
|
236
|
+
return false;
|
|
237
|
+
return true;
|
|
238
|
+
});
|
|
239
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/cookies/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,aAAa,EACb,KAAK,UAAU,EACf,SAAS,EACT,eAAe,EACf,YAAY,EACZ,KAAK,WAAW,EAChB,WAAW,GACZ,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CookieJar, domainMatches, isExpired, matchingCookies, mergeCookies, pathMatches, } from "./client.js";
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Council manifest helpers: file-based multi-agent coordination primitives.
|
|
3
|
+
*
|
|
4
|
+
* Lives under .harnery/councils/ alongside heartbeats + scratchpads. Council
|
|
5
|
+
* lifecycle commands serialize manifest mutations through a shared flock;
|
|
6
|
+
* round contribution files are per-member and don't need shared locking.
|
|
7
|
+
*/
|
|
8
|
+
export declare const COUNCIL_SCHEMA_VERSION: 2;
|
|
9
|
+
export type CouncilStatus = "active" | "closed" | "archived";
|
|
10
|
+
export type CouncilRoundStatus = "open" | "collected";
|
|
11
|
+
export type CouncilRoundVisibility = "next_round" | "live";
|
|
12
|
+
export interface CouncilManifest {
|
|
13
|
+
schema_version: typeof COUNCIL_SCHEMA_VERSION;
|
|
14
|
+
council_id: string;
|
|
15
|
+
created_at: string;
|
|
16
|
+
/** Display name of the convener (denormalized, for human scan).
|
|
17
|
+
* Canonical FK is `created_by_id`. */
|
|
18
|
+
created_by: string;
|
|
19
|
+
/** Durable persona UUID of the convener (registry key). Authoritative. */
|
|
20
|
+
created_by_id: string;
|
|
21
|
+
/**
|
|
22
|
+
* Optional ongoing process-tender. Distinct from `created_by`, which is the
|
|
23
|
+
* one-time act of creation; the steward is whoever drafts + maintains the
|
|
24
|
+
* per-round prompts that route operator → contributor each round. Defaults
|
|
25
|
+
* to `created_by` when omitted (set at create-time via --steward, or
|
|
26
|
+
* retrofitted via direct manifest edit). Read by `agents council prompt`
|
|
27
|
+
* to enforce write authority.
|
|
28
|
+
*
|
|
29
|
+
* Display name (denormalized). Canonical FK is `steward_id`.
|
|
30
|
+
*/
|
|
31
|
+
steward?: string;
|
|
32
|
+
/** Durable persona UUID of the steward. */
|
|
33
|
+
steward_id?: string;
|
|
34
|
+
objective: string;
|
|
35
|
+
target_doc: string | null;
|
|
36
|
+
/** Member display names (denormalized, parallel to `member_ids`). */
|
|
37
|
+
members: string[];
|
|
38
|
+
/** Canonical FK array of durable persona UUIDs of every member, parallel
|
|
39
|
+
* to `members[]` (same length, same order). Used by contributors-in-round
|
|
40
|
+
* lookups and contribution filenames (`round-N/<member_id>.md`). */
|
|
41
|
+
member_ids: string[];
|
|
42
|
+
current_round: number;
|
|
43
|
+
round_status: CouncilRoundStatus;
|
|
44
|
+
status: CouncilStatus;
|
|
45
|
+
auto_advance: boolean;
|
|
46
|
+
round_visibility: CouncilRoundVisibility;
|
|
47
|
+
closed_at?: string;
|
|
48
|
+
archived_at?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Resolve the effective steward: explicit `steward` field if set, otherwise
|
|
52
|
+
* fall back to `created_by`. Always returns a normalized `agent-Foo` name.
|
|
53
|
+
*/
|
|
54
|
+
export declare function effectiveSteward(manifest: CouncilManifest): string;
|
|
55
|
+
/** Resolve `.harnery/councils/` (creates the dir lazily on first write). */
|
|
56
|
+
export declare function councilsDir(): string | null;
|
|
57
|
+
/** Resolve `.harnery/councils/archive/`. */
|
|
58
|
+
export declare function councilsArchiveDir(): string | null;
|
|
59
|
+
/** Manifest file path: `.harnery/councils/<id>.json`. */
|
|
60
|
+
export declare function manifestPath(councilId: string): string | null;
|
|
61
|
+
/** Council body dir: `.harnery/councils/<id>/` (holds invite.md + round-N/...). */
|
|
62
|
+
export declare function councilBodyDir(councilId: string): string | null;
|
|
63
|
+
/** Normalize an `agent-Foo`/`Foo` reference to canonical `agent-Foo` form. */
|
|
64
|
+
export declare function normalizeAgentName(raw: string): string;
|
|
65
|
+
/** Strip the `agent-` prefix for output to lookups that expect bare name. */
|
|
66
|
+
export declare function bareAgentName(raw: string): string;
|
|
67
|
+
/**
|
|
68
|
+
* Derive a kebab-case slug from objective text. Keeps the first 5 words after
|
|
69
|
+
* lowercasing and stripping non-alphanumeric chars.
|
|
70
|
+
*/
|
|
71
|
+
export declare function deriveSlug(objective: string): string;
|
|
72
|
+
/**
|
|
73
|
+
* Build a council_id from objective + today's UTC date.
|
|
74
|
+
*
|
|
75
|
+
* Format: `<slug>-<YYYY-MM-DD>-<4hex>`. The 4-hex suffix is sourced from a
|
|
76
|
+
* crypto-strong random byte (not from a hash of the objective) to avoid
|
|
77
|
+
* collisions when two councils share the same slug + date.
|
|
78
|
+
*/
|
|
79
|
+
export declare function buildCouncilId(objective: string, now?: Date): string;
|
|
80
|
+
/** Hash an objective deterministically, used by tests for stable IDs. */
|
|
81
|
+
export declare function deterministicCouncilId(objective: string, now?: Date): string;
|
|
82
|
+
/** Atomically write a manifest (write tmp → rename). */
|
|
83
|
+
export declare function writeManifest(manifest: CouncilManifest): void;
|
|
84
|
+
/** Read a manifest by id. Returns null when the file is missing. */
|
|
85
|
+
export declare function readManifest(councilId: string): CouncilManifest | null;
|
|
86
|
+
/** Read an archived manifest by id from `.harnery/councils/archive/<id>.json`.
|
|
87
|
+
* Symmetric to readManifest() but scoped to the archive dir, used by
|
|
88
|
+
* `agents council unarchive` to load an archived council that is
|
|
89
|
+
* (by definition) not in the active councils dir. */
|
|
90
|
+
export declare function readArchivedManifest(councilId: string): CouncilManifest | null;
|
|
91
|
+
/**
|
|
92
|
+
* Reassign the steward on an active or closed council. Atomic via
|
|
93
|
+
* writeManifest's tmp+rename. Refuses to mutate archived councils
|
|
94
|
+
* (those are read-only by convention). Pass `null` to clear the field
|
|
95
|
+
* and revert to the default (the convener, via effectiveSteward).
|
|
96
|
+
*/
|
|
97
|
+
export declare function setCouncilSteward(councilId: string, steward: string | null): CouncilManifest;
|
|
98
|
+
export interface KnownAgent {
|
|
99
|
+
/** `agent-<Name>` canonical handle. */
|
|
100
|
+
name: string;
|
|
101
|
+
/** `active` = currently has a heartbeat in `.harnery/active/`. `stale` =
|
|
102
|
+
* recently ended (scratchpad archived within the lookback window). */
|
|
103
|
+
state: "active" | "stale";
|
|
104
|
+
/** ISO timestamp of the most-recent signal. */
|
|
105
|
+
last_seen: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Active heartbeats + recently-archived scratchpads, deduped by name.
|
|
109
|
+
* Used by `agents council set-steward` to refuse arbitrary names;
|
|
110
|
+
* pass `--allow-unknown` to bypass when bootstrapping a new agent.
|
|
111
|
+
*/
|
|
112
|
+
export declare function listKnownAgents(): KnownAgent[];
|
|
113
|
+
/** List all council manifests in the active dir (skips archive/). */
|
|
114
|
+
export declare function listManifests(): CouncilManifest[];
|
|
115
|
+
/**
|
|
116
|
+
* Move a council's manifest + body dir into the archive subdir. Idempotent:
|
|
117
|
+
* archiving an already-archived council is a no-op (the source paths won't
|
|
118
|
+
* exist). Used by `council archive` and by `council close --archive`.
|
|
119
|
+
*/
|
|
120
|
+
export declare function moveToArchive(councilId: string): void;
|
|
121
|
+
/**
|
|
122
|
+
* Reverse of moveToArchive: move a council's manifest + body dir back from
|
|
123
|
+
* archive/ to the active councils dir. Idempotent: a missing archive path is
|
|
124
|
+
* a no-op; an existing active path is left untouched and the archived copy
|
|
125
|
+
* is dropped (mirrors moveToArchive's clobber-avoidance rule). Used by
|
|
126
|
+
* `agents council unarchive` for testing the archive flow and as an undo
|
|
127
|
+
* escape hatch.
|
|
128
|
+
*/
|
|
129
|
+
export declare function moveFromArchive(councilId: string): void;
|
|
130
|
+
/**
|
|
131
|
+
* Permanently remove an archived council: manifest + body dir under
|
|
132
|
+
* .harnery/councils/archive/<id>. Refuses to touch a council that's still
|
|
133
|
+
* in the active dir (caller must archive first; the trash-can pattern).
|
|
134
|
+
* Idempotent: missing paths are a no-op. Returns true when something was
|
|
135
|
+
* actually deleted, false when both targets were already absent.
|
|
136
|
+
*
|
|
137
|
+
* NB: does NOT touch the council's target_doc (separate authored artifact),
|
|
138
|
+
* close_handoff_path (separate authored artifact), or the canonical event
|
|
139
|
+
* stream (immutable activity log). The delete is scoped to the manifest +
|
|
140
|
+
* per-round member contributions.
|
|
141
|
+
*/
|
|
142
|
+
export declare function deleteArchivedCouncil(councilId: string): boolean;
|
|
143
|
+
/** Resolve a member name (or partial id) to a council manifest from the active dir. */
|
|
144
|
+
export declare function findManifestByPartialId(partial: string): CouncilManifest | null;
|
|
145
|
+
/** Build the invite.md body that ships alongside the manifest. */
|
|
146
|
+
export declare function buildInviteMarkdown(manifest: CouncilManifest): string;
|
|
147
|
+
/**
|
|
148
|
+
* Path to the contribution file for a member in a specific round.
|
|
149
|
+
* Filename uses the agent's durable persona uuid (`<agent_id>.md`) so
|
|
150
|
+
* a future rename doesn't break the link between manifest and on-disk
|
|
151
|
+
* contribution. Resolves the name through the identity registry; mints a
|
|
152
|
+
* new identity when the member name isn't registered yet (rare post-
|
|
153
|
+
* migration; only happens for a brand-new persona that's never run).
|
|
154
|
+
*/
|
|
155
|
+
export declare function contributionPath(councilId: string, round: number, memberName: string): string | null;
|
|
156
|
+
/** Path to a round's directory: `.harnery/councils/<id>/round-<N>/`. */
|
|
157
|
+
export declare function roundDir(councilId: string, round: number): string | null;
|
|
158
|
+
/**
|
|
159
|
+
* Read the set of agent-Names that have contributed to a given round.
|
|
160
|
+
* Returns display names ("agent-Maya"), not raw uuids; filenames on disk
|
|
161
|
+
* are now `<agent_id>.md`, so we resolve each one through the registry
|
|
162
|
+
* before returning. An identity that's been pruned (or never registered)
|
|
163
|
+
* surfaces as `agent-<8-char-prefix>` so the value remains scannable.
|
|
164
|
+
*
|
|
165
|
+
* For UUID-keyed callers, use `contributorIdsInRound`.
|
|
166
|
+
* Empty array when the round directory doesn't exist yet.
|
|
167
|
+
*/
|
|
168
|
+
export declare function contributorsInRound(councilId: string, round: number): string[];
|
|
169
|
+
/** Like contributorsInRound but returns the raw agent_id uuids: the
|
|
170
|
+
* filenames on disk without the .md extension. */
|
|
171
|
+
export declare function contributorIdsInRound(councilId: string, round: number): string[];
|
|
172
|
+
/**
|
|
173
|
+
* Return the IDs of active councils where this agent is a member AND has not
|
|
174
|
+
* yet contributed to the current open round. Used by `agents status` to
|
|
175
|
+
* surface a `council N pending` line in the status box, and by SessionStart
|
|
176
|
+
* adapters to inject system reminders about pending invites.
|
|
177
|
+
*/
|
|
178
|
+
export declare function pendingCouncilsForMember(memberName: string): string[];
|
|
179
|
+
/** Write a contribution file (atomic). Creates the round directory lazily. */
|
|
180
|
+
export declare function writeContribution(councilId: string, round: number, memberName: string, body: string): string;
|
|
181
|
+
/**
|
|
182
|
+
* Path to the round-N prompts directory: `.harnery/councils/<id>/round-N/prompts/`.
|
|
183
|
+
* Sibling to the contribution files. Holds one `<member>.md` per non-self
|
|
184
|
+
* council member, drafted by the steward, read by the operator (copy-paste
|
|
185
|
+
* into each agent harness) and the web UI (per-member panel).
|
|
186
|
+
*/
|
|
187
|
+
export declare function promptsDir(councilId: string, round: number): string | null;
|
|
188
|
+
/** Path to a single member's prompt file in a given round. Like
|
|
189
|
+
* contributionPath, filename uses the agent's durable persona uuid. */
|
|
190
|
+
export declare function promptPath(councilId: string, round: number, memberName: string): string | null;
|
|
191
|
+
/**
|
|
192
|
+
* Build the routing header prepended to every steward-drafted prompt. The
|
|
193
|
+
* contributor skill scans inbound messages for this comment block; if the
|
|
194
|
+
* `member:` line does not match the receiving agent's whoami, the agent
|
|
195
|
+
* refuses to contribute (catches operator misrouting). HTML-comment so it
|
|
196
|
+
* renders invisibly in markdown previews.
|
|
197
|
+
*/
|
|
198
|
+
export declare function buildRouteHeader(councilId: string, round: number, memberName: string): string;
|
|
199
|
+
/** Strip a leading route header from a prompt body, if present. */
|
|
200
|
+
export declare function stripRouteHeader(body: string): string;
|
|
201
|
+
/**
|
|
202
|
+
* Build the submit footer appended to every steward-drafted prompt. This is the
|
|
203
|
+
* load-bearing instruction that a contribution composed in chat is NOT recorded;
|
|
204
|
+
* the agent must run the command below. It rides on the prompt (the one
|
|
205
|
+
* artifact the operator always pastes) so it reaches every harness regardless of
|
|
206
|
+
* whether the convene-time invitation was delivered or a `/council` skill is
|
|
207
|
+
* available. Without it, agents (esp. non-Claude harnesses with no skill) write
|
|
208
|
+
* their take as a reply and end the turn, leaving the council showing them as
|
|
209
|
+
* still-pending. Visible markdown (not an HTML comment) so the agent reads it.
|
|
210
|
+
*/
|
|
211
|
+
export declare function buildSubmitFooter(councilId: string): string;
|
|
212
|
+
/** Strip an appended submit footer from a prompt body, if present. */
|
|
213
|
+
export declare function stripSubmitFooter(body: string): string;
|
|
214
|
+
/** Parse a route header from a string (the inbound user message). Returns
|
|
215
|
+
* null when the comment is absent or malformed. Used by the /council
|
|
216
|
+
* contribute skill to detect operator misrouting before contributing. */
|
|
217
|
+
export declare function parseRouteHeader(text: string): {
|
|
218
|
+
council_id: string;
|
|
219
|
+
council_round: number;
|
|
220
|
+
member: string;
|
|
221
|
+
} | null;
|
|
222
|
+
/** Write a prompt file (atomic). Creates the prompts dir lazily. The body
|
|
223
|
+
* is automatically prepended with a route header (see `buildRouteHeader`) so
|
|
224
|
+
* the contributor skill can verify the operator routed the prompt to the
|
|
225
|
+
* right agent. */
|
|
226
|
+
export declare function writePrompt(councilId: string, round: number, memberName: string, body: string): string;
|
|
227
|
+
/**
|
|
228
|
+
* Read a member's prompt for a given round. Returns null when the file
|
|
229
|
+
* doesn't exist (steward hasn't drafted one yet). Includes a `completed`
|
|
230
|
+
* boolean so the UI can mark the prompt deactivated once the contribution
|
|
231
|
+
* has landed.
|
|
232
|
+
*/
|
|
233
|
+
export declare function readPrompt(councilId: string, round: number, memberName: string): {
|
|
234
|
+
body: string;
|
|
235
|
+
completed: boolean;
|
|
236
|
+
} | null;
|
|
237
|
+
/**
|
|
238
|
+
* Visual/behavioral state of a per-member routing prompt within a round:
|
|
239
|
+
*
|
|
240
|
+
* - `contributed`: the member already submitted; the prompt is preserved for
|
|
241
|
+
* audit but no longer actionable. UIs render it dimmed + struck-through.
|
|
242
|
+
* - `active`: the first not-yet-contributed prompt in `manifest.members`
|
|
243
|
+
* order. This is the one the operator should route next. UIs highlight it.
|
|
244
|
+
* - `queued`: drafted but waiting for an earlier member to contribute first.
|
|
245
|
+
* UIs render it dimmed with the Copy button disabled so the operator can't
|
|
246
|
+
* route it out of order.
|
|
247
|
+
*/
|
|
248
|
+
export type CouncilPromptState = "contributed" | "active" | "queued";
|
|
249
|
+
/**
|
|
250
|
+
* Read every member's prompt for a round, in `manifest.members` order
|
|
251
|
+
* (which is the agreed round-robin sequence; alphabetical is wrong because
|
|
252
|
+
* stewards typically build councils with a deliberate first-to-last order).
|
|
253
|
+
*
|
|
254
|
+
* Each entry carries `order` (1-indexed position within manifest.members,
|
|
255
|
+
* skipping members whose prompts don't exist) + `state` (contributed /
|
|
256
|
+
* active / queued) so the UI can render the three-state pattern without
|
|
257
|
+
* duplicating the active-determination logic.
|
|
258
|
+
*/
|
|
259
|
+
export declare function readRoundPrompts(manifest: CouncilManifest, round: number): Array<{
|
|
260
|
+
member: string;
|
|
261
|
+
body: string;
|
|
262
|
+
completed: boolean;
|
|
263
|
+
order: number;
|
|
264
|
+
state: CouncilPromptState;
|
|
265
|
+
}>;
|
|
266
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/council/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAkBH,eAAO,MAAM,sBAAsB,EAAG,CAAU,CAAC;AAEjD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;AAC7D,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,WAAW,CAAC;AACtD,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,OAAO,sBAAsB,CAAC;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB;0CACsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,I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