@jitsusama/agentic-harness.core 0.1.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 +52 -0
- package/dist/advisor/charter.d.ts +14 -0
- package/dist/advisor/charter.js +48 -0
- package/dist/advisor/findings.d.ts +43 -0
- package/dist/advisor/findings.js +82 -0
- package/dist/advisor/index.d.ts +24 -0
- package/dist/advisor/index.js +23 -0
- package/dist/advisor/settings.d.ts +16 -0
- package/dist/advisor/settings.js +30 -0
- package/dist/advisor/substantive.d.ts +14 -0
- package/dist/advisor/substantive.js +33 -0
- package/dist/advisor/tools.d.ts +38 -0
- package/dist/advisor/tools.js +202 -0
- package/dist/attribution/commit-hook.d.ts +53 -0
- package/dist/attribution/commit-hook.js +133 -0
- package/dist/attribution/gh-footer.d.ts +27 -0
- package/dist/attribution/gh-footer.js +80 -0
- package/dist/attribution/index.d.ts +11 -0
- package/dist/attribution/index.js +11 -0
- package/dist/attribution/model-name.d.ts +11 -0
- package/dist/attribution/model-name.js +26 -0
- package/dist/bin/attribution.d.ts +36 -0
- package/dist/bin/attribution.js +82 -0
- package/dist/bin/cli.d.ts +14 -0
- package/dist/bin/cli.js +236 -0
- package/dist/bin/gate-deps.d.ts +23 -0
- package/dist/bin/gate-deps.js +61 -0
- package/dist/bin/guardians.d.ts +51 -0
- package/dist/bin/guardians.js +174 -0
- package/dist/bin/memory.d.ts +16 -0
- package/dist/bin/memory.js +81 -0
- package/dist/bin/notes.d.ts +30 -0
- package/dist/bin/notes.js +67 -0
- package/dist/bin/process-exec.d.ts +14 -0
- package/dist/bin/process-exec.js +31 -0
- package/dist/bin/quest.d.ts +38 -0
- package/dist/bin/quest.js +187 -0
- package/dist/bin/slack-auth.d.ts +49 -0
- package/dist/bin/slack-auth.js +107 -0
- package/dist/clock/index.d.ts +46 -0
- package/dist/clock/index.js +72 -0
- package/dist/command/cwd.d.ts +21 -0
- package/dist/command/cwd.js +60 -0
- package/dist/command/edit.d.ts +14 -0
- package/dist/command/edit.js +22 -0
- package/dist/command/flags.d.ts +29 -0
- package/dist/command/flags.js +111 -0
- package/dist/command/index.d.ts +16 -0
- package/dist/command/index.js +12 -0
- package/dist/command/tokenize.d.ts +7 -0
- package/dist/command/tokenize.js +315 -0
- package/dist/command/types.d.ts +66 -0
- package/dist/command/types.js +9 -0
- package/dist/completion/index.d.ts +17 -0
- package/dist/completion/index.js +16 -0
- package/dist/completion/investigate.d.ts +63 -0
- package/dist/completion/investigate.js +198 -0
- package/dist/completion/resolve.d.ts +29 -0
- package/dist/completion/resolve.js +42 -0
- package/dist/completion/side.d.ts +51 -0
- package/dist/completion/side.js +93 -0
- package/dist/completion/types.d.ts +84 -0
- package/dist/completion/types.js +14 -0
- package/dist/exec/exec.d.ts +38 -0
- package/dist/exec/exec.js +51 -0
- package/dist/exec/index.d.ts +8 -0
- package/dist/exec/index.js +8 -0
- package/dist/gate/decision.d.ts +52 -0
- package/dist/gate/decision.js +68 -0
- package/dist/gate/deps.d.ts +14 -0
- package/dist/gate/deps.js +1 -0
- package/dist/gate/index.d.ts +2 -0
- package/dist/gate/index.js +1 -0
- package/dist/git-cli/index.d.ts +47 -0
- package/dist/git-cli/index.js +127 -0
- package/dist/github-cli/command-spec.d.ts +14 -0
- package/dist/github-cli/command-spec.js +18 -0
- package/dist/github-cli/index.d.ts +71 -0
- package/dist/github-cli/index.js +188 -0
- package/dist/google/apis/calendar.d.ts +64 -0
- package/dist/google/apis/calendar.js +297 -0
- package/dist/google/apis/docs.d.ts +29 -0
- package/dist/google/apis/docs.js +154 -0
- package/dist/google/apis/drive.d.ts +46 -0
- package/dist/google/apis/drive.js +189 -0
- package/dist/google/apis/gmail.d.ts +67 -0
- package/dist/google/apis/gmail.js +374 -0
- package/dist/google/apis/index.d.ts +10 -0
- package/dist/google/apis/index.js +10 -0
- package/dist/google/apis/sheets.d.ts +16 -0
- package/dist/google/apis/sheets.js +54 -0
- package/dist/google/apis/slides.d.ts +16 -0
- package/dist/google/apis/slides.js +40 -0
- package/dist/google/auth/browser.d.ts +5 -0
- package/dist/google/auth/browser.js +27 -0
- package/dist/google/auth/credentials.d.ts +26 -0
- package/dist/google/auth/credentials.js +69 -0
- package/dist/google/auth/errors.d.ts +15 -0
- package/dist/google/auth/errors.js +26 -0
- package/dist/google/auth/index.d.ts +12 -0
- package/dist/google/auth/index.js +12 -0
- package/dist/google/auth/oauth-app.d.ts +15 -0
- package/dist/google/auth/oauth-app.js +20 -0
- package/dist/google/auth/oauth.d.ts +46 -0
- package/dist/google/auth/oauth.js +146 -0
- package/dist/google/auth/server.d.ts +13 -0
- package/dist/google/auth/server.js +70 -0
- package/dist/google/auth/setup-instructions.d.ts +16 -0
- package/dist/google/auth/setup-instructions.js +24 -0
- package/dist/google/auth/store.d.ts +19 -0
- package/dist/google/auth/store.js +27 -0
- package/dist/google/index.d.ts +13 -0
- package/dist/google/index.js +12 -0
- package/dist/google/paths.d.ts +17 -0
- package/dist/google/paths.js +28 -0
- package/dist/google/renderers/calendar.d.ts +23 -0
- package/dist/google/renderers/calendar.js +312 -0
- package/dist/google/renderers/drive.d.ts +31 -0
- package/dist/google/renderers/drive.js +214 -0
- package/dist/google/renderers/email.d.ts +16 -0
- package/dist/google/renderers/email.js +130 -0
- package/dist/google/renderers/index.d.ts +8 -0
- package/dist/google/renderers/index.js +8 -0
- package/dist/google/types.d.ts +143 -0
- package/dist/google/types.js +27 -0
- package/dist/governance/distill.d.ts +31 -0
- package/dist/governance/distill.js +78 -0
- package/dist/governance/index.d.ts +11 -0
- package/dist/governance/index.js +10 -0
- package/dist/governance/render.d.ts +13 -0
- package/dist/governance/render.js +23 -0
- package/dist/governance/store.d.ts +32 -0
- package/dist/governance/store.js +102 -0
- package/dist/governance/types.d.ts +19 -0
- package/dist/governance/types.js +9 -0
- package/dist/guardian/index.d.ts +7 -0
- package/dist/guardian/index.js +7 -0
- package/dist/guardian/types.d.ts +37 -0
- package/dist/guardian/types.js +12 -0
- package/dist/internal/github/cli.d.ts +40 -0
- package/dist/internal/github/cli.js +102 -0
- package/dist/internal/guardian/commit-file.d.ts +7 -0
- package/dist/internal/guardian/commit-file.js +36 -0
- package/dist/internal/guardian/commit-format.d.ts +35 -0
- package/dist/internal/guardian/commit-format.js +63 -0
- package/dist/internal/guardian/commit-shell.d.ts +38 -0
- package/dist/internal/guardian/commit-shell.js +134 -0
- package/dist/internal/guardian/history-gate.d.ts +41 -0
- package/dist/internal/guardian/history-gate.js +76 -0
- package/dist/internal/guardian/prose-gate.d.ts +31 -0
- package/dist/internal/guardian/prose-gate.js +50 -0
- package/dist/internal/guardian/redirect-gate.d.ts +41 -0
- package/dist/internal/guardian/redirect-gate.js +114 -0
- package/dist/internal/guardian/section-gate.d.ts +20 -0
- package/dist/internal/guardian/section-gate.js +36 -0
- package/dist/internal/guardian/title-gate.d.ts +20 -0
- package/dist/internal/guardian/title-gate.js +36 -0
- package/dist/internal/json-array.d.ts +11 -0
- package/dist/internal/json-array.js +40 -0
- package/dist/internal/lsp/registry.d.ts +12 -0
- package/dist/internal/lsp/registry.js +16 -0
- package/dist/internal/notes/discovery.d.ts +59 -0
- package/dist/internal/notes/discovery.js +91 -0
- package/dist/internal/notes/frontmatter.d.ts +52 -0
- package/dist/internal/notes/frontmatter.js +163 -0
- package/dist/internal/notes/id.d.ts +42 -0
- package/dist/internal/notes/id.js +80 -0
- package/dist/internal/notes/io.d.ts +25 -0
- package/dist/internal/notes/io.js +51 -0
- package/dist/internal/notes/sanitize.d.ts +19 -0
- package/dist/internal/notes/sanitize.js +35 -0
- package/dist/internal/process-global.d.ts +20 -0
- package/dist/internal/process-global.js +28 -0
- package/dist/internal/quest/alias-index.d.ts +61 -0
- package/dist/internal/quest/alias-index.js +69 -0
- package/dist/internal/quest/append-journey.d.ts +22 -0
- package/dist/internal/quest/append-journey.js +63 -0
- package/dist/internal/quest/bash-write.d.ts +49 -0
- package/dist/internal/quest/bash-write.js +208 -0
- package/dist/internal/quest/dates.d.ts +14 -0
- package/dist/internal/quest/dates.js +20 -0
- package/dist/internal/quest/discovery.d.ts +96 -0
- package/dist/internal/quest/discovery.js +354 -0
- package/dist/internal/quest/fields.d.ts +37 -0
- package/dist/internal/quest/fields.js +94 -0
- package/dist/internal/quest/frontmatter.d.ts +88 -0
- package/dist/internal/quest/frontmatter.js +630 -0
- package/dist/internal/quest/git-signals.d.ts +53 -0
- package/dist/internal/quest/git-signals.js +192 -0
- package/dist/internal/quest/id.d.ts +50 -0
- package/dist/internal/quest/id.js +116 -0
- package/dist/internal/quest/io.d.ts +54 -0
- package/dist/internal/quest/io.js +233 -0
- package/dist/internal/quest/mentions.d.ts +45 -0
- package/dist/internal/quest/mentions.js +70 -0
- package/dist/internal/quest/mutate.d.ts +38 -0
- package/dist/internal/quest/mutate.js +83 -0
- package/dist/internal/quest/process-liveness.d.ts +98 -0
- package/dist/internal/quest/process-liveness.js +216 -0
- package/dist/internal/quest/quest-doc.d.ts +116 -0
- package/dist/internal/quest/quest-doc.js +239 -0
- package/dist/internal/quest/ranking.d.ts +48 -0
- package/dist/internal/quest/ranking.js +114 -0
- package/dist/internal/quest/reopen.d.ts +65 -0
- package/dist/internal/quest/reopen.js +113 -0
- package/dist/internal/quest/resolve-cwd.d.ts +32 -0
- package/dist/internal/quest/resolve-cwd.js +89 -0
- package/dist/internal/quest/sanitize.d.ts +42 -0
- package/dist/internal/quest/sanitize.js +69 -0
- package/dist/internal/quest/scaffold.d.ts +59 -0
- package/dist/internal/quest/scaffold.js +169 -0
- package/dist/internal/quest/scratch.d.ts +27 -0
- package/dist/internal/quest/scratch.js +106 -0
- package/dist/internal/quest/session-liveness.d.ts +125 -0
- package/dist/internal/quest/session-liveness.js +386 -0
- package/dist/internal/quest/session-ownership.d.ts +22 -0
- package/dist/internal/quest/session-ownership.js +100 -0
- package/dist/internal/quest/session-registry.d.ts +221 -0
- package/dist/internal/quest/session-registry.js +266 -0
- package/dist/internal/quest/status.d.ts +10 -0
- package/dist/internal/quest/status.js +15 -0
- package/dist/internal/quest/structural-journal.d.ts +41 -0
- package/dist/internal/quest/structural-journal.js +67 -0
- package/dist/internal/quest/structural.d.ts +43 -0
- package/dist/internal/quest/structural.js +77 -0
- package/dist/internal/quest/toc.d.ts +28 -0
- package/dist/internal/quest/toc.js +90 -0
- package/dist/internal/quest/trees.d.ts +53 -0
- package/dist/internal/quest/trees.js +145 -0
- package/dist/internal/quest/url-fetchers.d.ts +50 -0
- package/dist/internal/quest/url-fetchers.js +97 -0
- package/dist/internal/quest/write-classifier.d.ts +46 -0
- package/dist/internal/quest/write-classifier.js +59 -0
- package/dist/internal/refs/builtins.d.ts +32 -0
- package/dist/internal/refs/builtins.js +179 -0
- package/dist/internal/refs/registry.d.ts +25 -0
- package/dist/internal/refs/registry.js +42 -0
- package/dist/internal/registry/global-symbol-registry.d.ts +37 -0
- package/dist/internal/registry/global-symbol-registry.js +55 -0
- package/dist/internal/review/registry.d.ts +12 -0
- package/dist/internal/review/registry.js +16 -0
- package/dist/internal/sqlite/db.d.ts +16 -0
- package/dist/internal/sqlite/db.js +26 -0
- package/dist/internal/terminal/builtins.d.ts +8 -0
- package/dist/internal/terminal/builtins.js +14 -0
- package/dist/internal/terminal/drivers/fallback.d.ts +8 -0
- package/dist/internal/terminal/drivers/fallback.js +31 -0
- package/dist/internal/terminal/drivers/shared.d.ts +39 -0
- package/dist/internal/terminal/drivers/shared.js +51 -0
- package/dist/internal/terminal/drivers/tmux.d.ts +14 -0
- package/dist/internal/terminal/drivers/tmux.js +88 -0
- package/dist/internal/terminal/drivers/wezterm.d.ts +35 -0
- package/dist/internal/terminal/drivers/wezterm.js +175 -0
- package/dist/internal/terminal/registry.d.ts +12 -0
- package/dist/internal/terminal/registry.js +16 -0
- package/dist/internal/tree/builtins.d.ts +8 -0
- package/dist/internal/tree/builtins.js +10 -0
- package/dist/internal/tree/providers/git-worktree.d.ts +20 -0
- package/dist/internal/tree/providers/git-worktree.js +279 -0
- package/dist/internal/tree/registry.d.ts +12 -0
- package/dist/internal/tree/registry.js +16 -0
- package/dist/lsp/config.d.ts +77 -0
- package/dist/lsp/config.js +154 -0
- package/dist/lsp/external.d.ts +13 -0
- package/dist/lsp/external.js +52 -0
- package/dist/lsp/format.d.ts +11 -0
- package/dist/lsp/format.js +54 -0
- package/dist/lsp/index.d.ts +17 -0
- package/dist/lsp/index.js +16 -0
- package/dist/lsp/offsets.d.ts +22 -0
- package/dist/lsp/offsets.js +51 -0
- package/dist/lsp/registry.d.ts +28 -0
- package/dist/lsp/registry.js +45 -0
- package/dist/lsp/standalone/backend.d.ts +42 -0
- package/dist/lsp/standalone/backend.js +150 -0
- package/dist/lsp/standalone/document.d.ts +45 -0
- package/dist/lsp/standalone/document.js +81 -0
- package/dist/lsp/standalone/server.d.ts +84 -0
- package/dist/lsp/standalone/server.js +521 -0
- package/dist/lsp/types.d.ts +119 -0
- package/dist/lsp/types.js +13 -0
- package/dist/memory/db.d.ts +15 -0
- package/dist/memory/db.js +25 -0
- package/dist/memory/index.d.ts +12 -0
- package/dist/memory/index.js +11 -0
- package/dist/memory/paths.d.ts +19 -0
- package/dist/memory/paths.js +33 -0
- package/dist/memory/scope.d.ts +14 -0
- package/dist/memory/scope.js +22 -0
- package/dist/memory/store.d.ts +12 -0
- package/dist/memory/store.js +146 -0
- package/dist/memory/types.d.ts +80 -0
- package/dist/memory/types.js +6 -0
- package/dist/notes/types.d.ts +50 -0
- package/dist/notes/types.js +23 -0
- package/dist/notes/verbs/create.d.ts +5 -0
- package/dist/notes/verbs/create.js +55 -0
- package/dist/notes/verbs/mutate.d.ts +8 -0
- package/dist/notes/verbs/mutate.js +152 -0
- package/dist/notes/verbs/queries.d.ts +15 -0
- package/dist/notes/verbs/queries.js +116 -0
- package/dist/notes/verbs/reindex.d.ts +12 -0
- package/dist/notes/verbs/reindex.js +35 -0
- package/dist/notes/verbs/shared.d.ts +37 -0
- package/dist/notes/verbs/shared.js +29 -0
- package/dist/observability/index.d.ts +13 -0
- package/dist/observability/index.js +12 -0
- package/dist/observability/recorder.d.ts +50 -0
- package/dist/observability/recorder.js +77 -0
- package/dist/observability/store.d.ts +22 -0
- package/dist/observability/store.js +213 -0
- package/dist/observability/types.d.ts +82 -0
- package/dist/observability/types.js +1 -0
- package/dist/process/index.d.ts +9 -0
- package/dist/process/index.js +9 -0
- package/dist/process/process.d.ts +95 -0
- package/dist/process/process.js +153 -0
- package/dist/prose/block.d.ts +9 -0
- package/dist/prose/block.js +43 -0
- package/dist/prose/detect.d.ts +50 -0
- package/dist/prose/detect.js +217 -0
- package/dist/prose/gate.d.ts +14 -0
- package/dist/prose/gate.js +21 -0
- package/dist/prose/index.d.ts +4 -0
- package/dist/prose/index.js +4 -0
- package/dist/prose/wrap.d.ts +9 -0
- package/dist/prose/wrap.js +47 -0
- package/dist/quest/actions.d.ts +20 -0
- package/dist/quest/actions.js +107 -0
- package/dist/quest/config.d.ts +79 -0
- package/dist/quest/config.js +83 -0
- package/dist/quest/index.d.ts +29 -0
- package/dist/quest/index.js +28 -0
- package/dist/quest/lifecycle.d.ts +365 -0
- package/dist/quest/lifecycle.js +900 -0
- package/dist/quest/lookup.d.ts +243 -0
- package/dist/quest/lookup.js +496 -0
- package/dist/quest/machine.d.ts +48 -0
- package/dist/quest/machine.js +96 -0
- package/dist/quest/render-rows.d.ts +166 -0
- package/dist/quest/render-rows.js +214 -0
- package/dist/quest/state.d.ts +111 -0
- package/dist/quest/state.js +46 -0
- package/dist/quest/types.d.ts +224 -0
- package/dist/quest/types.js +10 -0
- package/dist/quest/verbs/alias.d.ts +9 -0
- package/dist/quest/verbs/alias.js +129 -0
- package/dist/quest/verbs/lifecycle.d.ts +36 -0
- package/dist/quest/verbs/lifecycle.js +407 -0
- package/dist/quest/verbs/queries.d.ts +24 -0
- package/dist/quest/verbs/queries.js +241 -0
- package/dist/quest/verbs/reorder.d.ts +15 -0
- package/dist/quest/verbs/reorder.js +85 -0
- package/dist/quest/verbs/shared.d.ts +63 -0
- package/dist/quest/verbs/shared.js +35 -0
- package/dist/quest/verbs/stage.d.ts +39 -0
- package/dist/quest/verbs/stage.js +506 -0
- package/dist/quest/verbs/structural.d.ts +23 -0
- package/dist/quest/verbs/structural.js +310 -0
- package/dist/quest/verbs/tree-ops.d.ts +20 -0
- package/dist/quest/verbs/tree-ops.js +289 -0
- package/dist/refs/index.d.ts +13 -0
- package/dist/refs/index.js +12 -0
- package/dist/refs/lookup.d.ts +53 -0
- package/dist/refs/lookup.js +102 -0
- package/dist/refs/register.d.ts +34 -0
- package/dist/refs/register.js +44 -0
- package/dist/refs/types.d.ts +81 -0
- package/dist/refs/types.js +17 -0
- package/dist/remote/index.d.ts +9 -0
- package/dist/remote/index.js +9 -0
- package/dist/remote/name.d.ts +22 -0
- package/dist/remote/name.js +30 -0
- package/dist/result/cite.d.ts +84 -0
- package/dist/result/cite.js +127 -0
- package/dist/result/counts.d.ts +15 -0
- package/dist/result/counts.js +17 -0
- package/dist/result/details.d.ts +61 -0
- package/dist/result/details.js +121 -0
- package/dist/result/digest.d.ts +37 -0
- package/dist/result/digest.js +227 -0
- package/dist/result/follow.d.ts +29 -0
- package/dist/result/follow.js +37 -0
- package/dist/result/index.d.ts +26 -0
- package/dist/result/index.js +26 -0
- package/dist/result/listing.d.ts +62 -0
- package/dist/result/listing.js +72 -0
- package/dist/result/location.d.ts +67 -0
- package/dist/result/location.js +125 -0
- package/dist/result/query.d.ts +67 -0
- package/dist/result/query.js +144 -0
- package/dist/result/spill.d.ts +41 -0
- package/dist/result/spill.js +121 -0
- package/dist/result/store.d.ts +83 -0
- package/dist/result/store.js +214 -0
- package/dist/result/view.d.ts +31 -0
- package/dist/result/view.js +38 -0
- package/dist/review/anchor.d.ts +84 -0
- package/dist/review/anchor.js +89 -0
- package/dist/review/ask/agents.d.ts +80 -0
- package/dist/review/ask/agents.js +296 -0
- package/dist/review/ask/anchorable.d.ts +35 -0
- package/dist/review/ask/anchorable.js +76 -0
- package/dist/review/ask/answer.d.ts +54 -0
- package/dist/review/ask/answer.js +209 -0
- package/dist/review/ask/audit.d.ts +71 -0
- package/dist/review/ask/audit.js +158 -0
- package/dist/review/ask/collect.d.ts +41 -0
- package/dist/review/ask/collect.js +82 -0
- package/dist/review/ask/council.d.ts +290 -0
- package/dist/review/ask/council.js +386 -0
- package/dist/review/ask/critique.d.ts +69 -0
- package/dist/review/ask/critique.js +157 -0
- package/dist/review/ask/harvest.d.ts +119 -0
- package/dist/review/ask/harvest.js +409 -0
- package/dist/review/ask/identity.d.ts +93 -0
- package/dist/review/ask/identity.js +134 -0
- package/dist/review/ask/judge.d.ts +37 -0
- package/dist/review/ask/judge.js +140 -0
- package/dist/review/ask/persona.d.ts +84 -0
- package/dist/review/ask/persona.js +127 -0
- package/dist/review/ask/progress.d.ts +117 -0
- package/dist/review/ask/progress.js +137 -0
- package/dist/review/ask/prompt.d.ts +131 -0
- package/dist/review/ask/prompt.js +242 -0
- package/dist/review/ask/roster.d.ts +94 -0
- package/dist/review/ask/roster.js +338 -0
- package/dist/review/ask/run.d.ts +435 -0
- package/dist/review/ask/run.js +340 -0
- package/dist/review/ask/span.d.ts +70 -0
- package/dist/review/ask/span.js +166 -0
- package/dist/review/ask/stack-round.d.ts +66 -0
- package/dist/review/ask/stack-round.js +125 -0
- package/dist/review/ask/start.d.ts +48 -0
- package/dist/review/ask/start.js +118 -0
- package/dist/review/ask/store.d.ts +83 -0
- package/dist/review/ask/store.js +226 -0
- package/dist/review/ask/wire.d.ts +89 -0
- package/dist/review/ask/wire.js +204 -0
- package/dist/review/attach.d.ts +161 -0
- package/dist/review/attach.js +357 -0
- package/dist/review/authoring.d.ts +84 -0
- package/dist/review/authoring.js +203 -0
- package/dist/review/backed.d.ts +90 -0
- package/dist/review/backed.js +168 -0
- package/dist/review/bind.d.ts +75 -0
- package/dist/review/bind.js +223 -0
- package/dist/review/budget.d.ts +133 -0
- package/dist/review/budget.js +278 -0
- package/dist/review/capabilities.d.ts +217 -0
- package/dist/review/capabilities.js +46 -0
- package/dist/review/change.d.ts +155 -0
- package/dist/review/change.js +15 -0
- package/dist/review/checks.d.ts +56 -0
- package/dist/review/checks.js +11 -0
- package/dist/review/config.d.ts +71 -0
- package/dist/review/config.js +125 -0
- package/dist/review/conventions.d.ts +35 -0
- package/dist/review/conventions.js +58 -0
- package/dist/review/conversation.d.ts +98 -0
- package/dist/review/conversation.js +16 -0
- package/dist/review/decided.d.ts +58 -0
- package/dist/review/decided.js +67 -0
- package/dist/review/diff.d.ts +116 -0
- package/dist/review/diff.js +237 -0
- package/dist/review/draft/continuation.d.ts +23 -0
- package/dist/review/draft/continuation.js +32 -0
- package/dist/review/draft/fanout.d.ts +57 -0
- package/dist/review/draft/fanout.js +46 -0
- package/dist/review/draft/handle.d.ts +55 -0
- package/dist/review/draft/handle.js +110 -0
- package/dist/review/draft/plan.d.ts +112 -0
- package/dist/review/draft/plan.js +343 -0
- package/dist/review/draft/publish.d.ts +38 -0
- package/dist/review/draft/publish.js +118 -0
- package/dist/review/draft/render.d.ts +32 -0
- package/dist/review/draft/render.js +100 -0
- package/dist/review/draft/state.d.ts +98 -0
- package/dist/review/draft/state.js +83 -0
- package/dist/review/draft/store.d.ts +33 -0
- package/dist/review/draft/store.js +100 -0
- package/dist/review/elsewhere.d.ts +27 -0
- package/dist/review/elsewhere.js +39 -0
- package/dist/review/engine.d.ts +106 -0
- package/dist/review/engine.js +243 -0
- package/dist/review/events.d.ts +59 -0
- package/dist/review/events.js +35 -0
- package/dist/review/failed.d.ts +46 -0
- package/dist/review/failed.js +56 -0
- package/dist/review/finding.d.ts +81 -0
- package/dist/review/finding.js +85 -0
- package/dist/review/fix.d.ts +147 -0
- package/dist/review/fix.js +175 -0
- package/dist/review/followup.d.ts +84 -0
- package/dist/review/followup.js +123 -0
- package/dist/review/index.d.ts +134 -0
- package/dist/review/index.js +80 -0
- package/dist/review/keys.d.ts +23 -0
- package/dist/review/keys.js +40 -0
- package/dist/review/landing.d.ts +37 -0
- package/dist/review/landing.js +68 -0
- package/dist/review/lenses.d.ts +132 -0
- package/dist/review/lenses.js +430 -0
- package/dist/review/propose-from.d.ts +76 -0
- package/dist/review/propose-from.js +86 -0
- package/dist/review/provider.d.ts +306 -0
- package/dist/review/provider.js +16 -0
- package/dist/review/providers/git/index.d.ts +23 -0
- package/dist/review/providers/git/index.js +214 -0
- package/dist/review/providers/github/authoring.d.ts +22 -0
- package/dist/review/providers/github/authoring.js +350 -0
- package/dist/review/providers/github/claims.d.ts +49 -0
- package/dist/review/providers/github/claims.js +136 -0
- package/dist/review/providers/github/conversation.d.ts +18 -0
- package/dist/review/providers/github/conversation.js +455 -0
- package/dist/review/providers/github/fields.d.ts +30 -0
- package/dist/review/providers/github/fields.js +47 -0
- package/dist/review/providers/github/index.d.ts +15 -0
- package/dist/review/providers/github/index.js +110 -0
- package/dist/review/providers/github/proposals.d.ts +14 -0
- package/dist/review/providers/github/proposals.js +298 -0
- package/dist/review/providers/github/queue.d.ts +46 -0
- package/dist/review/providers/github/queue.js +122 -0
- package/dist/review/providers/github/stacking.d.ts +20 -0
- package/dist/review/providers/github/stacking.js +107 -0
- package/dist/review/queue.d.ts +43 -0
- package/dist/review/queue.js +56 -0
- package/dist/review/reactable.d.ts +93 -0
- package/dist/review/reactable.js +140 -0
- package/dist/review/register.d.ts +52 -0
- package/dist/review/register.js +53 -0
- package/dist/review/resolve.d.ts +58 -0
- package/dist/review/resolve.js +150 -0
- package/dist/review/retarget.d.ts +73 -0
- package/dist/review/retarget.js +82 -0
- package/dist/review/revisited.d.ts +77 -0
- package/dist/review/revisited.js +121 -0
- package/dist/review/stack.d.ts +110 -0
- package/dist/review/stack.js +52 -0
- package/dist/sections/block.d.ts +9 -0
- package/dist/sections/block.js +42 -0
- package/dist/sections/detect.d.ts +31 -0
- package/dist/sections/detect.js +67 -0
- package/dist/sections/gate.d.ts +21 -0
- package/dist/sections/gate.js +22 -0
- package/dist/sections/index.d.ts +5 -0
- package/dist/sections/index.js +5 -0
- package/dist/sections/sanctioned.d.ts +13 -0
- package/dist/sections/sanctioned.js +21 -0
- package/dist/shell/index.d.ts +8 -0
- package/dist/shell/index.js +8 -0
- package/dist/shell/parse.d.ts +125 -0
- package/dist/shell/parse.js +298 -0
- package/dist/slack/api/channels.d.ts +12 -0
- package/dist/slack/api/channels.js +28 -0
- package/dist/slack/api/client.d.ts +94 -0
- package/dist/slack/api/client.js +272 -0
- package/dist/slack/api/files.d.ts +95 -0
- package/dist/slack/api/files.js +223 -0
- package/dist/slack/api/index.d.ts +11 -0
- package/dist/slack/api/index.js +11 -0
- package/dist/slack/api/messages.d.ts +98 -0
- package/dist/slack/api/messages.js +292 -0
- package/dist/slack/api/reactions.d.ts +47 -0
- package/dist/slack/api/reactions.js +50 -0
- package/dist/slack/api/resolve-conversations.d.ts +43 -0
- package/dist/slack/api/resolve-conversations.js +130 -0
- package/dist/slack/api/resolve-messages.d.ts +29 -0
- package/dist/slack/api/resolve-messages.js +93 -0
- package/dist/slack/api/resolve-users.d.ts +27 -0
- package/dist/slack/api/resolve-users.js +73 -0
- package/dist/slack/api/search.d.ts +86 -0
- package/dist/slack/api/search.js +186 -0
- package/dist/slack/api/users.d.ts +12 -0
- package/dist/slack/api/users.js +33 -0
- package/dist/slack/auth/browser-extract.d.ts +33 -0
- package/dist/slack/auth/browser-extract.js +201 -0
- package/dist/slack/auth/browser.d.ts +5 -0
- package/dist/slack/auth/browser.js +25 -0
- package/dist/slack/auth/credentials.d.ts +14 -0
- package/dist/slack/auth/credentials.js +24 -0
- package/dist/slack/auth/errors.d.ts +9 -0
- package/dist/slack/auth/errors.js +19 -0
- package/dist/slack/auth/extract.d.ts +23 -0
- package/dist/slack/auth/extract.js +44 -0
- package/dist/slack/auth/index.d.ts +12 -0
- package/dist/slack/auth/index.js +11 -0
- package/dist/slack/auth/oauth-app.d.ts +11 -0
- package/dist/slack/auth/oauth-app.js +20 -0
- package/dist/slack/auth/oauth.d.ts +31 -0
- package/dist/slack/auth/oauth.js +82 -0
- package/dist/slack/auth/server.d.ts +14 -0
- package/dist/slack/auth/server.js +75 -0
- package/dist/slack/auth/store.d.ts +17 -0
- package/dist/slack/auth/store.js +27 -0
- package/dist/slack/block-message.d.ts +9 -0
- package/dist/slack/block-message.js +30 -0
- package/dist/slack/blocks.d.ts +94 -0
- package/dist/slack/blocks.js +765 -0
- package/dist/slack/content-gate.d.ts +12 -0
- package/dist/slack/content-gate.js +22 -0
- package/dist/slack/detect.d.ts +31 -0
- package/dist/slack/detect.js +125 -0
- package/dist/slack/index.d.ts +18 -0
- package/dist/slack/index.js +17 -0
- package/dist/slack/paths.d.ts +28 -0
- package/dist/slack/paths.js +46 -0
- package/dist/slack/renderers/channel.d.ts +6 -0
- package/dist/slack/renderers/channel.js +27 -0
- package/dist/slack/renderers/index.d.ts +9 -0
- package/dist/slack/renderers/index.js +9 -0
- package/dist/slack/renderers/message.d.ts +21 -0
- package/dist/slack/renderers/message.js +214 -0
- package/dist/slack/renderers/reactions.d.ts +8 -0
- package/dist/slack/renderers/reactions.js +43 -0
- package/dist/slack/renderers/search.d.ts +6 -0
- package/dist/slack/renderers/search.js +39 -0
- package/dist/slack/renderers/user.d.ts +6 -0
- package/dist/slack/renderers/user.js +32 -0
- package/dist/slack/resolvers/cache.d.ts +29 -0
- package/dist/slack/resolvers/cache.js +70 -0
- package/dist/slack/resolvers/conversation-cache.d.ts +42 -0
- package/dist/slack/resolvers/conversation-cache.js +128 -0
- package/dist/slack/resolvers/conversation.d.ts +44 -0
- package/dist/slack/resolvers/conversation.js +229 -0
- package/dist/slack/resolvers/index.d.ts +8 -0
- package/dist/slack/resolvers/index.js +8 -0
- package/dist/slack/resolvers/target.d.ts +19 -0
- package/dist/slack/resolvers/target.js +45 -0
- package/dist/slack/resolvers/url.d.ts +20 -0
- package/dist/slack/resolvers/url.js +22 -0
- package/dist/slack/resolvers/user.d.ts +54 -0
- package/dist/slack/resolvers/user.js +134 -0
- package/dist/slack/types.d.ts +180 -0
- package/dist/slack/types.js +13 -0
- package/dist/tdd/attest.d.ts +21 -0
- package/dist/tdd/attest.js +21 -0
- package/dist/tdd/discipline.d.ts +11 -0
- package/dist/tdd/discipline.js +28 -0
- package/dist/tdd/index.d.ts +14 -0
- package/dist/tdd/index.js +13 -0
- package/dist/tdd/machine.d.ts +48 -0
- package/dist/tdd/machine.js +139 -0
- package/dist/tdd/presentation.d.ts +34 -0
- package/dist/tdd/presentation.js +38 -0
- package/dist/tdd/queries.d.ts +10 -0
- package/dist/tdd/queries.js +22 -0
- package/dist/terminal/index.d.ts +12 -0
- package/dist/terminal/index.js +11 -0
- package/dist/terminal/register.d.ts +21 -0
- package/dist/terminal/register.js +31 -0
- package/dist/terminal/resolve.d.ts +63 -0
- package/dist/terminal/resolve.js +117 -0
- package/dist/terminal/types.d.ts +134 -0
- package/dist/terminal/types.js +19 -0
- package/dist/thinking/index.d.ts +20 -0
- package/dist/thinking/index.js +27 -0
- package/dist/title/block.d.ts +9 -0
- package/dist/title/block.js +32 -0
- package/dist/title/detect.d.ts +25 -0
- package/dist/title/detect.js +154 -0
- package/dist/title/gate.d.ts +19 -0
- package/dist/title/gate.js +21 -0
- package/dist/title/index.d.ts +3 -0
- package/dist/title/index.js +3 -0
- package/dist/tree/index.d.ts +18 -0
- package/dist/tree/index.js +17 -0
- package/dist/tree/register.d.ts +21 -0
- package/dist/tree/register.js +31 -0
- package/dist/tree/resolve.d.ts +20 -0
- package/dist/tree/resolve.js +31 -0
- package/dist/tree/types.d.ts +83 -0
- package/dist/tree/types.js +12 -0
- package/dist/ui/count.d.ts +29 -0
- package/dist/ui/count.js +35 -0
- package/dist/ui/path.d.ts +25 -0
- package/dist/ui/path.js +40 -0
- package/dist/verify/index.d.ts +17 -0
- package/dist/verify/index.js +14 -0
- package/dist/verify/project.d.ts +21 -0
- package/dist/verify/project.js +49 -0
- package/dist/verify/resolve.d.ts +26 -0
- package/dist/verify/resolve.js +27 -0
- package/dist/verify/run.d.ts +31 -0
- package/dist/verify/run.js +145 -0
- package/dist/web/a11y/announcements.d.ts +67 -0
- package/dist/web/a11y/announcements.js +116 -0
- package/dist/web/a11y/budget.d.ts +75 -0
- package/dist/web/a11y/budget.js +97 -0
- package/dist/web/a11y/focus.d.ts +37 -0
- package/dist/web/a11y/focus.js +106 -0
- package/dist/web/a11y/index.d.ts +19 -0
- package/dist/web/a11y/index.js +25 -0
- package/dist/web/a11y/naming.d.ts +23 -0
- package/dist/web/a11y/naming.js +55 -0
- package/dist/web/a11y/outline.d.ts +23 -0
- package/dist/web/a11y/outline.js +42 -0
- package/dist/web/a11y/reading.d.ts +12 -0
- package/dist/web/a11y/reading.js +101 -0
- package/dist/web/a11y/scope.d.ts +23 -0
- package/dist/web/a11y/scope.js +99 -0
- package/dist/web/a11y/states.d.ts +22 -0
- package/dist/web/a11y/states.js +53 -0
- package/dist/web/a11y/tree.d.ts +124 -0
- package/dist/web/a11y/tree.js +269 -0
- package/dist/web/a11y/walk.d.ts +225 -0
- package/dist/web/a11y/walk.js +568 -0
- package/dist/web/a11y/walkprobe.d.ts +44 -0
- package/dist/web/a11y/walkprobe.js +365 -0
- package/dist/web/audit/axe.d.ts +219 -0
- package/dist/web/audit/axe.js +322 -0
- package/dist/web/audit/behind.d.ts +63 -0
- package/dist/web/audit/behind.js +142 -0
- package/dist/web/audit/capture.d.ts +43 -0
- package/dist/web/audit/capture.js +185 -0
- package/dist/web/audit/colour.d.ts +85 -0
- package/dist/web/audit/colour.js +189 -0
- package/dist/web/audit/contrast.d.ts +74 -0
- package/dist/web/audit/contrast.js +104 -0
- package/dist/web/audit/health.d.ts +27 -0
- package/dist/web/audit/health.js +57 -0
- package/dist/web/audit/index.d.ts +22 -0
- package/dist/web/audit/index.js +22 -0
- package/dist/web/audit/pair.d.ts +55 -0
- package/dist/web/audit/pair.js +157 -0
- package/dist/web/audit/probe.d.ts +31 -0
- package/dist/web/audit/probe.js +189 -0
- package/dist/web/audit/report.d.ts +22 -0
- package/dist/web/audit/report.js +250 -0
- package/dist/web/audit/structure.d.ts +126 -0
- package/dist/web/audit/structure.js +595 -0
- package/dist/web/audit/sweep.d.ts +66 -0
- package/dist/web/audit/sweep.js +117 -0
- package/dist/web/audit/target.d.ts +89 -0
- package/dist/web/audit/target.js +168 -0
- package/dist/web/audit/verdict.d.ts +48 -0
- package/dist/web/audit/verdict.js +52 -0
- package/dist/web/audit/visual.d.ts +161 -0
- package/dist/web/audit/visual.js +297 -0
- package/dist/web/browser.d.ts +213 -0
- package/dist/web/browser.js +927 -0
- package/dist/web/compare/images.d.ts +45 -0
- package/dist/web/compare/images.js +101 -0
- package/dist/web/compare/index.d.ts +15 -0
- package/dist/web/compare/index.js +15 -0
- package/dist/web/compare/provenance.d.ts +48 -0
- package/dist/web/compare/provenance.js +86 -0
- package/dist/web/compare/regions.d.ts +78 -0
- package/dist/web/compare/regions.js +211 -0
- package/dist/web/cookies/extract.d.ts +26 -0
- package/dist/web/cookies/extract.js +167 -0
- package/dist/web/cookies/index.d.ts +8 -0
- package/dist/web/cookies/index.js +7 -0
- package/dist/web/cookies/inject.d.ts +13 -0
- package/dist/web/cookies/inject.js +27 -0
- package/dist/web/cookies/setup.d.ts +31 -0
- package/dist/web/cookies/setup.js +94 -0
- package/dist/web/design/index.d.ts +9 -0
- package/dist/web/design/index.js +9 -0
- package/dist/web/design/inventory.d.ts +126 -0
- package/dist/web/design/inventory.js +324 -0
- package/dist/web/design/probe.d.ts +24 -0
- package/dist/web/design/probe.js +88 -0
- package/dist/web/element/actionable.d.ts +34 -0
- package/dist/web/element/actionable.js +48 -0
- package/dist/web/element/animations.d.ts +48 -0
- package/dist/web/element/animations.js +74 -0
- package/dist/web/element/box.d.ts +53 -0
- package/dist/web/element/box.js +58 -0
- package/dist/web/element/hover.d.ts +75 -0
- package/dist/web/element/hover.js +172 -0
- package/dist/web/element/index.d.ts +17 -0
- package/dist/web/element/index.js +17 -0
- package/dist/web/element/listeners.d.ts +72 -0
- package/dist/web/element/listeners.js +98 -0
- package/dist/web/element/measure.d.ts +40 -0
- package/dist/web/element/measure.js +118 -0
- package/dist/web/element/probes.d.ts +108 -0
- package/dist/web/element/probes.js +195 -0
- package/dist/web/element/pseudo.d.ts +51 -0
- package/dist/web/element/pseudo.js +96 -0
- package/dist/web/element/view.d.ts +30 -0
- package/dist/web/element/view.js +117 -0
- package/dist/web/element/visibility.d.ts +42 -0
- package/dist/web/element/visibility.js +67 -0
- package/dist/web/envelope/artifacts.d.ts +23 -0
- package/dist/web/envelope/artifacts.js +45 -0
- package/dist/web/envelope/index.d.ts +9 -0
- package/dist/web/envelope/index.js +9 -0
- package/dist/web/envelope/naming.d.ts +23 -0
- package/dist/web/envelope/naming.js +43 -0
- package/dist/web/envelope/paged.d.ts +42 -0
- package/dist/web/envelope/paged.js +99 -0
- package/dist/web/envelope/sink.d.ts +43 -0
- package/dist/web/envelope/sink.js +67 -0
- package/dist/web/environment/devices.d.ts +65 -0
- package/dist/web/environment/devices.js +82 -0
- package/dist/web/environment/emulation.d.ts +124 -0
- package/dist/web/environment/emulation.js +258 -0
- package/dist/web/environment/index.d.ts +15 -0
- package/dist/web/environment/index.js +15 -0
- package/dist/web/environment/probes.d.ts +18 -0
- package/dist/web/environment/probes.js +40 -0
- package/dist/web/environment/shaping.d.ts +90 -0
- package/dist/web/environment/shaping.js +141 -0
- package/dist/web/environment/status.d.ts +51 -0
- package/dist/web/environment/status.js +109 -0
- package/dist/web/environment/storage.d.ts +55 -0
- package/dist/web/environment/storage.js +142 -0
- package/dist/web/environment/tabs.d.ts +32 -0
- package/dist/web/environment/tabs.js +47 -0
- package/dist/web/environment/view.d.ts +10 -0
- package/dist/web/environment/view.js +42 -0
- package/dist/web/evaluate/index.d.ts +6 -0
- package/dist/web/evaluate/index.js +6 -0
- package/dist/web/evaluate/outcome.d.ts +74 -0
- package/dist/web/evaluate/outcome.js +91 -0
- package/dist/web/evaluate/probe.d.ts +31 -0
- package/dist/web/evaluate/probe.js +303 -0
- package/dist/web/index.d.ts +47 -0
- package/dist/web/index.js +47 -0
- package/dist/web/input/index.d.ts +11 -0
- package/dist/web/input/index.js +11 -0
- package/dist/web/input/keys.d.ts +48 -0
- package/dist/web/input/keys.js +189 -0
- package/dist/web/input/pointer.d.ts +56 -0
- package/dist/web/input/pointer.js +77 -0
- package/dist/web/input/touch.d.ts +61 -0
- package/dist/web/input/touch.js +83 -0
- package/dist/web/mermaid.d.ts +69 -0
- package/dist/web/mermaid.js +223 -0
- package/dist/web/paths.d.ts +16 -0
- package/dist/web/paths.js +27 -0
- package/dist/web/perf/heap.d.ts +42 -0
- package/dist/web/perf/heap.js +73 -0
- package/dist/web/perf/index.d.ts +14 -0
- package/dist/web/perf/index.js +14 -0
- package/dist/web/perf/layers.d.ts +98 -0
- package/dist/web/perf/layers.js +165 -0
- package/dist/web/perf/probe.d.ts +26 -0
- package/dist/web/perf/probe.js +123 -0
- package/dist/web/perf/profile.d.ts +53 -0
- package/dist/web/perf/profile.js +97 -0
- package/dist/web/perf/trace.d.ts +152 -0
- package/dist/web/perf/trace.js +429 -0
- package/dist/web/perf/view.d.ts +6 -0
- package/dist/web/perf/view.js +86 -0
- package/dist/web/perf/vitals.d.ts +141 -0
- package/dist/web/perf/vitals.js +175 -0
- package/dist/web/reader.d.ts +131 -0
- package/dist/web/reader.js +340 -0
- package/dist/web/screenshot.d.ts +50 -0
- package/dist/web/screenshot.js +108 -0
- package/dist/web/search.d.ts +49 -0
- package/dist/web/search.js +137 -0
- package/dist/web/session/artifacts.d.ts +32 -0
- package/dist/web/session/artifacts.js +47 -0
- package/dist/web/session/emulation.d.ts +118 -0
- package/dist/web/session/emulation.js +307 -0
- package/dist/web/session/recording.d.ts +51 -0
- package/dist/web/session/recording.js +64 -0
- package/dist/web/session/settling.d.ts +42 -0
- package/dist/web/session/settling.js +104 -0
- package/dist/web/session/shaping.d.ts +48 -0
- package/dist/web/session/shaping.js +113 -0
- package/dist/web/session/sourcemaps.d.ts +64 -0
- package/dist/web/session/sourcemaps.js +135 -0
- package/dist/web/session/telemetry.d.ts +219 -0
- package/dist/web/session/telemetry.js +486 -0
- package/dist/web/session/wires.d.ts +22 -0
- package/dist/web/session/wires.js +11 -0
- package/dist/web/session.d.ts +1153 -0
- package/dist/web/session.js +3400 -0
- package/dist/web/snapshot/deep.d.ts +36 -0
- package/dist/web/snapshot/deep.js +91 -0
- package/dist/web/snapshot/flatten.d.ts +101 -0
- package/dist/web/snapshot/flatten.js +131 -0
- package/dist/web/snapshot/index.d.ts +8 -0
- package/dist/web/snapshot/index.js +10 -0
- package/dist/web/snapshot/presented.d.ts +32 -0
- package/dist/web/snapshot/presented.js +74 -0
- package/dist/web/snapshot/query.d.ts +67 -0
- package/dist/web/snapshot/query.js +136 -0
- package/dist/web/sourcemap/index.d.ts +9 -0
- package/dist/web/sourcemap/index.js +9 -0
- package/dist/web/sourcemap/mappings.d.ts +111 -0
- package/dist/web/sourcemap/mappings.js +218 -0
- package/dist/web/styles/capture.d.ts +49 -0
- package/dist/web/styles/capture.js +85 -0
- package/dist/web/styles/cascade.d.ts +107 -0
- package/dist/web/styles/cascade.js +275 -0
- package/dist/web/styles/curation.d.ts +45 -0
- package/dist/web/styles/curation.js +282 -0
- package/dist/web/styles/index.d.ts +10 -0
- package/dist/web/styles/index.js +10 -0
- package/dist/web/target/index.d.ts +7 -0
- package/dist/web/target/index.js +7 -0
- package/dist/web/target/refusals.d.ts +59 -0
- package/dist/web/target/refusals.js +305 -0
- package/dist/web/target/target.d.ts +59 -0
- package/dist/web/target/target.js +94 -0
- package/dist/web/telemetry/buffer.d.ts +35 -0
- package/dist/web/telemetry/buffer.js +72 -0
- package/dist/web/telemetry/console.d.ts +127 -0
- package/dist/web/telemetry/console.js +217 -0
- package/dist/web/telemetry/dialogs.d.ts +41 -0
- package/dist/web/telemetry/dialogs.js +38 -0
- package/dist/web/telemetry/downloads.d.ts +42 -0
- package/dist/web/telemetry/downloads.js +65 -0
- package/dist/web/telemetry/failure.d.ts +31 -0
- package/dist/web/telemetry/failure.js +72 -0
- package/dist/web/telemetry/har.d.ts +97 -0
- package/dist/web/telemetry/har.js +227 -0
- package/dist/web/telemetry/index.d.ts +18 -0
- package/dist/web/telemetry/index.js +18 -0
- package/dist/web/telemetry/lifecycle.d.ts +69 -0
- package/dist/web/telemetry/lifecycle.js +120 -0
- package/dist/web/telemetry/network.d.ts +152 -0
- package/dist/web/telemetry/network.js +130 -0
- package/dist/web/telemetry/requests.d.ts +31 -0
- package/dist/web/telemetry/requests.js +119 -0
- package/dist/web/telemetry/sockets.d.ts +56 -0
- package/dist/web/telemetry/sockets.js +101 -0
- package/dist/web/telemetry/view.d.ts +16 -0
- package/dist/web/telemetry/view.js +125 -0
- package/dist/web/wait/conditions.d.ts +87 -0
- package/dist/web/wait/conditions.js +100 -0
- package/dist/web/wait/index.d.ts +6 -0
- package/dist/web/wait/index.js +6 -0
- package/dist/web/wait/settle.d.ts +54 -0
- package/dist/web/wait/settle.js +84 -0
- package/dist/work/ask.d.ts +45 -0
- package/dist/work/ask.js +85 -0
- package/dist/work/author.d.ts +61 -0
- package/dist/work/author.js +144 -0
- package/dist/work/broker.d.ts +151 -0
- package/dist/work/broker.js +165 -0
- package/dist/work/events.d.ts +98 -0
- package/dist/work/events.js +57 -0
- package/dist/work/history.d.ts +69 -0
- package/dist/work/history.js +174 -0
- package/dist/work/index.d.ts +49 -0
- package/dist/work/index.js +33 -0
- package/dist/work/inplay.d.ts +43 -0
- package/dist/work/inplay.js +42 -0
- package/dist/work/memory.d.ts +84 -0
- package/dist/work/memory.js +203 -0
- package/dist/work/objection.d.ts +92 -0
- package/dist/work/objection.js +72 -0
- package/dist/work/provider.d.ts +79 -0
- package/dist/work/provider.js +45 -0
- package/dist/work/providers/git.d.ts +29 -0
- package/dist/work/providers/git.js +87 -0
- package/dist/work/publish.d.ts +53 -0
- package/dist/work/publish.js +139 -0
- package/dist/work/rebase.d.ts +78 -0
- package/dist/work/rebase.js +261 -0
- package/dist/work/reclaim.d.ts +56 -0
- package/dist/work/reclaim.js +52 -0
- package/dist/work/register.d.ts +29 -0
- package/dist/work/register.js +41 -0
- package/dist/work/stack.d.ts +126 -0
- package/dist/work/stack.js +243 -0
- package/dist/work/stacks.d.ts +156 -0
- package/dist/work/stacks.js +524 -0
- package/dist/work/survey.d.ts +52 -0
- package/dist/work/survey.js +58 -0
- package/dist/work/tidy.d.ts +147 -0
- package/dist/work/tidy.js +136 -0
- package/dist/work/tree.d.ts +120 -0
- package/dist/work/tree.js +69 -0
- package/dist/work/unattended.d.ts +40 -0
- package/dist/work/unattended.js +57 -0
- package/package.json +145 -0
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which lens each reviewer reads through, gathered from disk.
|
|
3
|
+
*
|
|
4
|
+
* A lens can come from two places now: a persona the operator wrote,
|
|
5
|
+
* which lives beside their config and travels with them, and an agent
|
|
6
|
+
* the repo under review defined for itself, which lives in the repo
|
|
7
|
+
* and does not. Binding a roster to charters means reading both and
|
|
8
|
+
* knowing which is which.
|
|
9
|
+
*
|
|
10
|
+
* Its own module because the composition is the part that has been
|
|
11
|
+
* wrong before. Four PRs in a row shipped a helper with tests and a
|
|
12
|
+
* call site without any, and the call site is where the bugs were: a
|
|
13
|
+
* glyph module two imports from a renderer still drawing the old
|
|
14
|
+
* marks, a spend recorder every test called directly and production
|
|
15
|
+
* never called at all. A composition inside a tool file can only be
|
|
16
|
+
* checked by reading it. Here it can be driven.
|
|
17
|
+
*/
|
|
18
|
+
import { readdir, readFile, realpath } from "node:fs/promises";
|
|
19
|
+
import { basename, join, resolve } from "node:path";
|
|
20
|
+
import { bindPersonas, discoverAgents, NAMESPACE, parsePersona, quotable, } from "./index.js";
|
|
21
|
+
/** How much repo-written text a refusal may repeat, and how often. */
|
|
22
|
+
const MOST_CHARACTERS = 200;
|
|
23
|
+
const MOST_LINES = 20;
|
|
24
|
+
/** Repo-written text, cut to a length a message can carry. */
|
|
25
|
+
function clipped(text) {
|
|
26
|
+
const flat = text.replace(/\s+/g, " ").trim();
|
|
27
|
+
return flat.length <= MOST_CHARACTERS
|
|
28
|
+
? flat
|
|
29
|
+
: `${flat.slice(0, MOST_CHARACTERS)}...`;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Where a repo keeps the agents somebody defined for it.
|
|
33
|
+
*
|
|
34
|
+
* Measured on this machine rather than guessed at: fifteen agent files
|
|
35
|
+
* across two repos live under `.claude/agents`, and a third keeps five
|
|
36
|
+
* review lenses in a plain `agents` directory at the root. Nothing
|
|
37
|
+
* else on disk holds any, so nothing else is looked in.
|
|
38
|
+
*/
|
|
39
|
+
const AGENT_DIRS = [join(".claude", "agents"), "agents"];
|
|
40
|
+
/**
|
|
41
|
+
* Where a repo writes down what it asks of its contributors.
|
|
42
|
+
*
|
|
43
|
+
* The three names pi's own documentation gives, in the order it gives
|
|
44
|
+
* them, since the point is to hand over deliberately what pi was
|
|
45
|
+
* picking up ambiently. An override wins outright, which is what the
|
|
46
|
+
* name means. A fourth was invented here for symmetry and put ahead of
|
|
47
|
+
* AGENTS.md, where it would have shadowed the real thing if any repo
|
|
48
|
+
* had happened to have one.
|
|
49
|
+
*/
|
|
50
|
+
const GUIDANCE_FILES = ["AGENTS.override.md", "AGENTS.md", "CLAUDE.md"];
|
|
51
|
+
/**
|
|
52
|
+
* How much of a repo's conventions to carry into a prompt.
|
|
53
|
+
*
|
|
54
|
+
* Measured against the file this repo ships, which is the one case to
|
|
55
|
+
* hand: 32,000 cut it, and cut the tail, which is where a file like
|
|
56
|
+
* this says what not to do. Raised past it with room, and the cut says
|
|
57
|
+
* where the rest is rather than pretending there is no rest.
|
|
58
|
+
*
|
|
59
|
+
* Characters, and the number is what it says it is: an earlier comment
|
|
60
|
+
* here said thirty thousand while the constant kept three times that,
|
|
61
|
+
* which is the kind of disagreement nobody notices until it matters.
|
|
62
|
+
*/
|
|
63
|
+
const MOST_GUIDANCE = 96_000;
|
|
64
|
+
/** Whether a path from a diff names this file at the repo root. */
|
|
65
|
+
function sameRootFile(path, name) {
|
|
66
|
+
const plain = path
|
|
67
|
+
.replace(/\\/g, "/")
|
|
68
|
+
.replace(/^\.\//, "")
|
|
69
|
+
.replace(/^[ab]\//, "");
|
|
70
|
+
return plain.toLowerCase() === name.toLowerCase();
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* What the repo under review asks of its contributors.
|
|
74
|
+
*
|
|
75
|
+
* Read from the tree the round reads, and handed to the prompt as
|
|
76
|
+
* quoted material. Before this it arrived by itself, because a pi
|
|
77
|
+
* child reads the context files in its working directory and a
|
|
78
|
+
* reviewer's working directory is a tree pinned to the commit under
|
|
79
|
+
* review. That put the change author's prose above the round's own
|
|
80
|
+
* instructions, unasked and unrecorded.
|
|
81
|
+
*/
|
|
82
|
+
export async function guidanceInRepo(tree, touched) {
|
|
83
|
+
if (tree.caveat !== undefined) {
|
|
84
|
+
// The tree is not the change's, so whatever sits at its root is
|
|
85
|
+
// somebody else's conventions, and the edited flag would be
|
|
86
|
+
// computed against a commit nobody read. Handing that over as "the
|
|
87
|
+
// repo's own text" is worse than handing over nothing: the caveat
|
|
88
|
+
// goes to the operator, and the reviewer never hears it.
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
91
|
+
const root = await realpath(tree.path).catch(() => resolve(tree.path));
|
|
92
|
+
for (const name of GUIDANCE_FILES) {
|
|
93
|
+
const at = join(tree.path, name);
|
|
94
|
+
let text;
|
|
95
|
+
let reads = name;
|
|
96
|
+
try {
|
|
97
|
+
// The same rule the agent files get, and for the same reason: a
|
|
98
|
+
// link is followed for its bytes, so without this a change could
|
|
99
|
+
// point AGENTS.md at any readable file on the machine and have it
|
|
100
|
+
// quoted into every reviewer's prompt. It was guarded one
|
|
101
|
+
// function along and not here.
|
|
102
|
+
const real = await realpath(at);
|
|
103
|
+
if (real !== resolve(at)) {
|
|
104
|
+
if (!real.startsWith(`${root}/`))
|
|
105
|
+
continue;
|
|
106
|
+
// And where it actually lands, so the question of whether the
|
|
107
|
+
// change wrote it is asked about the file the bytes came from.
|
|
108
|
+
// Asking it about the link's own name was the same mistake in
|
|
109
|
+
// its other half: guarded against a link out of the tree, and
|
|
110
|
+
// wide open to one inside it.
|
|
111
|
+
reads = real.slice(root.length + 1);
|
|
112
|
+
}
|
|
113
|
+
text = await readFile(at, "utf8");
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
// Most repos have one of these and none has all three.
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
if (text.trim() === "")
|
|
120
|
+
continue;
|
|
121
|
+
return {
|
|
122
|
+
path: name,
|
|
123
|
+
// Said as a field as well as in the text, so whoever records
|
|
124
|
+
// what this reviewer was given can tell a round that got the
|
|
125
|
+
// whole file from one that got the beginning of it.
|
|
126
|
+
...(text.length <= MOST_GUIDANCE ? {} : { cut: true }),
|
|
127
|
+
// Cut rather than refused, unlike a charter. A charter that
|
|
128
|
+
// arrives half-written is a lens nobody wrote; conventions are
|
|
129
|
+
// reference, and the first ninety-six thousand characters of
|
|
130
|
+
// them are worth more to a reviewer than none.
|
|
131
|
+
text: text.length <= MOST_GUIDANCE
|
|
132
|
+
? text
|
|
133
|
+
: `${text.slice(0, MOST_GUIDANCE)}\n\n[cut here at ${MOST_GUIDANCE} of ${text.length} characters. The rest is in ${reads} at the root of your working directory, and the end of one of these files is usually where it says what not to do.]`,
|
|
134
|
+
// Not knowing counts as edited, since the whole reason to say so
|
|
135
|
+
// is that the change may have written what the reviewer is about
|
|
136
|
+
// to read, and "we could not tell" is not "it did not".
|
|
137
|
+
//
|
|
138
|
+
// The comparison is against this file and not against any file
|
|
139
|
+
// whose name ends the same way. A repo with an AGENTS.md in a
|
|
140
|
+
// subdirectory, which is most of them, marked the root one as
|
|
141
|
+
// edited whenever the change touched the other.
|
|
142
|
+
edited: !Array.isArray(touched)
|
|
143
|
+
? "unknown"
|
|
144
|
+
: touched.some((path) => sameRootFile(path, name) || sameRootFile(path, reads))
|
|
145
|
+
? "yes"
|
|
146
|
+
: "no",
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* What the repo says about itself, shaped for a prompt input.
|
|
153
|
+
*
|
|
154
|
+
* The join between the reader and the prompts, which lived in the tool
|
|
155
|
+
* file where nothing could execute it: both halves had tests and the
|
|
156
|
+
* thing that puts them together had none. Spread into a prompt input
|
|
157
|
+
* so a round with no conventions to show says nothing at all rather
|
|
158
|
+
* than carrying an empty section.
|
|
159
|
+
*/
|
|
160
|
+
export async function guidanceFor(tree, diff) {
|
|
161
|
+
const guidance = await guidanceInRepo(tree, "unknown" in diff ? diff : touchedBy(diff));
|
|
162
|
+
return guidance === undefined ? {} : { guidance };
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* What a round handed its reviewers, in the shape a run records it.
|
|
166
|
+
*
|
|
167
|
+
* The counterpart of `readFrom`, and it takes the conditions rather
|
|
168
|
+
* than reading them, so the value recorded and the value passed to the
|
|
169
|
+
* spawn are one constant used twice rather than two that agree today.
|
|
170
|
+
*
|
|
171
|
+
* The path and the edited state, not the text. A reader chasing a
|
|
172
|
+
* finding needs to know which file was folded into that reviewer's
|
|
173
|
+
* prompt and whether the change under review had written it; the bytes
|
|
174
|
+
* are in the tree at the witness, and tens of thousands of characters
|
|
175
|
+
* per round would cost more than the whole ledger.
|
|
176
|
+
*/
|
|
177
|
+
export function givenBy(isolated, conventions) {
|
|
178
|
+
const guidance = conventions.guidance;
|
|
179
|
+
return {
|
|
180
|
+
given: {
|
|
181
|
+
isolated,
|
|
182
|
+
...(guidance === undefined
|
|
183
|
+
? {}
|
|
184
|
+
: {
|
|
185
|
+
quoted: {
|
|
186
|
+
path: guidance.path,
|
|
187
|
+
edited: guidance.edited,
|
|
188
|
+
...(guidance.cut === undefined ? {} : { cut: true }),
|
|
189
|
+
// What the prompt did with it, asked of the prompt.
|
|
190
|
+
// Derived from what was read, this would claim a
|
|
191
|
+
// quotation the reviewer never saw: text that cannot
|
|
192
|
+
// be fenced is named and not reproduced, since
|
|
193
|
+
// unquoted it would be indistinguishable from the
|
|
194
|
+
// round's own words.
|
|
195
|
+
...(quotable(guidance.text) ? {} : { withheld: true }),
|
|
196
|
+
},
|
|
197
|
+
}),
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Every charter the operator wrote, by persona id.
|
|
203
|
+
*
|
|
204
|
+
* Read once per round rather than per participant, since six reviewers
|
|
205
|
+
* naming three personas should not be six directory walks. A file that
|
|
206
|
+
* will not parse stops the round: a roster naming it would otherwise
|
|
207
|
+
* fail with "no such persona" while the file sits right there, which
|
|
208
|
+
* sends somebody looking in the wrong place.
|
|
209
|
+
*/
|
|
210
|
+
export async function chartersOnDisk(dir) {
|
|
211
|
+
const charters = new Map();
|
|
212
|
+
let names;
|
|
213
|
+
try {
|
|
214
|
+
names = await readdir(dir);
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
// No persona directory at all is the ordinary case for anybody who
|
|
218
|
+
// has never written one, and a roster naming no persona never
|
|
219
|
+
// asks. bindPersonas refuses if one is named.
|
|
220
|
+
return charters;
|
|
221
|
+
}
|
|
222
|
+
for (const name of names) {
|
|
223
|
+
if (!name.endsWith(".md"))
|
|
224
|
+
continue;
|
|
225
|
+
const id = basename(name, ".md");
|
|
226
|
+
const parsed = parsePersona(id, await readFile(join(dir, name), "utf8"));
|
|
227
|
+
if ("refusal" in parsed)
|
|
228
|
+
throw new Error(parsed.refusal);
|
|
229
|
+
charters.set(id, parsed.persona.charter);
|
|
230
|
+
}
|
|
231
|
+
return charters;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Lenses the repo under review already had, by namespaced id.
|
|
235
|
+
*
|
|
236
|
+
* Read from the tree the round will actually read, not from the
|
|
237
|
+
* session's directory, since those are two repos often enough to have
|
|
238
|
+
* cost $75.63 finding out.
|
|
239
|
+
*/
|
|
240
|
+
export async function agentsInRepo(treePath, touched) {
|
|
241
|
+
const files = [];
|
|
242
|
+
const unreadable = [];
|
|
243
|
+
const root = await realpath(treePath).catch(() => resolve(treePath));
|
|
244
|
+
for (const dir of AGENT_DIRS) {
|
|
245
|
+
let names;
|
|
246
|
+
try {
|
|
247
|
+
names = await readdir(join(treePath, dir));
|
|
248
|
+
}
|
|
249
|
+
catch {
|
|
250
|
+
// A repo with no agents is the ordinary case, and one of the two
|
|
251
|
+
// directories is absent even in a repo that has some.
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
for (const name of names) {
|
|
255
|
+
if (!name.endsWith(".md"))
|
|
256
|
+
continue;
|
|
257
|
+
try {
|
|
258
|
+
const at = join(treePath, dir, name);
|
|
259
|
+
// Where the read actually lands. A symlink means the path the
|
|
260
|
+
// diff check ran against and the file the charter came from
|
|
261
|
+
// need not be the same file, and the target need not be in the
|
|
262
|
+
// tree at all: the whole rule about the change not writing the
|
|
263
|
+
// reviewer's prompt reads a path nothing followed.
|
|
264
|
+
const real = await realpath(at);
|
|
265
|
+
if (real !== resolve(at) && !real.startsWith(`${root}/`)) {
|
|
266
|
+
unreadable.push({
|
|
267
|
+
path: join(dir, name),
|
|
268
|
+
why: "It is a link to a file outside the tree, so what the diff says about this path says nothing about what would be read.",
|
|
269
|
+
});
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
files.push({
|
|
273
|
+
path: join(dir, name),
|
|
274
|
+
// Where the bytes come from, when a link inside the tree
|
|
275
|
+
// means that is not where they appear to. Checking the diff
|
|
276
|
+
// against the link alone let a change edit the file behind
|
|
277
|
+
// it and leave the link untouched.
|
|
278
|
+
...(real === resolve(at)
|
|
279
|
+
? {}
|
|
280
|
+
: { reads: real.slice(root.length + 1) }),
|
|
281
|
+
text: await readFile(at, "utf8"),
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
catch (error) {
|
|
285
|
+
// The leniency was written for the parse and skipped for the
|
|
286
|
+
// read, and the read is the half that lives in the repo's
|
|
287
|
+
// control. A dangling symlink, a directory named `.md`, a file
|
|
288
|
+
// nobody may open: any one of them threw out of here, out of
|
|
289
|
+
// the round, and out of every other round against that repo,
|
|
290
|
+
// including rounds naming no repo lens at all.
|
|
291
|
+
unreadable.push({
|
|
292
|
+
path: join(dir, name),
|
|
293
|
+
why: `It could not be read: ${error instanceof Error ? error.message : String(error)}`,
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
const found = discoverAgents(files, touched);
|
|
299
|
+
return { agents: found.agents, skipped: [...unreadable, ...found.skipped] };
|
|
300
|
+
}
|
|
301
|
+
/** What the tree offered, for a refusal that would otherwise guess. */
|
|
302
|
+
function whatTheTreeSaid(inRepo) {
|
|
303
|
+
const said = [];
|
|
304
|
+
if (inRepo.agents.length > 0) {
|
|
305
|
+
said.push(`The repo under review offers ${inRepo.agents.map((one) => `"${one.id}"`).join(", ")}.`);
|
|
306
|
+
}
|
|
307
|
+
// Bounded in both directions. Each line is clipped because the words
|
|
308
|
+
// after the colon can be the repo's, and the count is capped because
|
|
309
|
+
// `agents` is a directory name plenty of repos use for source: one
|
|
310
|
+
// missing lens in a repo with a large one was a refusal measured in
|
|
311
|
+
// hundreds of kilobytes.
|
|
312
|
+
for (const missed of inRepo.skipped.slice(0, MOST_LINES)) {
|
|
313
|
+
said.push(`${clipped(missed.path)} was not read: ${clipped(missed.why)}`);
|
|
314
|
+
}
|
|
315
|
+
if (inRepo.skipped.length > MOST_LINES) {
|
|
316
|
+
said.push(`${inRepo.skipped.length - MOST_LINES} more were not read.`);
|
|
317
|
+
}
|
|
318
|
+
return said;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* What a change writes to, on either side of a rename, or why that is
|
|
322
|
+
* not known.
|
|
323
|
+
*
|
|
324
|
+
* A diff carrying no paths at all is the second answer and not the
|
|
325
|
+
* first. Every real change writes to something, so an empty list means
|
|
326
|
+
* the provider did not say, and reading that as "touches nothing" is
|
|
327
|
+
* the most permissive answer available for the one rule that keeps the
|
|
328
|
+
* change under review out of the reviewer's prompt.
|
|
329
|
+
*/
|
|
330
|
+
export function touchedBy(diff) {
|
|
331
|
+
const paths = diff.files.flatMap((file) => [
|
|
332
|
+
...(file.newPath === undefined ? [] : [file.newPath]),
|
|
333
|
+
...(file.oldPath === undefined ? [] : [file.oldPath]),
|
|
334
|
+
]);
|
|
335
|
+
return paths.length > 0
|
|
336
|
+
? paths
|
|
337
|
+
: {
|
|
338
|
+
unknown: "The diff for this change names no paths, which is not the same as a change that writes to nothing.",
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Each participant's charter, by participant id.
|
|
343
|
+
*
|
|
344
|
+
* Keyed by participant rather than by persona, because a round asks by
|
|
345
|
+
* participant id and the same lens can be on a roster twice at two
|
|
346
|
+
* thinking levels. A missing persona stops the round here, before
|
|
347
|
+
* anybody is asked, since a reviewer running without its lens files
|
|
348
|
+
* generic findings under a specialist's name.
|
|
349
|
+
*
|
|
350
|
+
* The repo's own agents are looked up alongside the personas and
|
|
351
|
+
* cannot shadow one: their ids carry a namespace, so asking for a
|
|
352
|
+
* repo's lens and asking for your own are different requests, and one
|
|
353
|
+
* can never quietly answer the other.
|
|
354
|
+
*/
|
|
355
|
+
export async function lensesFor(
|
|
356
|
+
// Narrowed to who this round asks before it arrives. Binding the
|
|
357
|
+
// whole roster was harmless while a lens was a file in a directory
|
|
358
|
+
// the operator owns. It stops being harmless once one can come from
|
|
359
|
+
// the repo: a judge-only round would refuse over a reviewer's
|
|
360
|
+
// missing lens, and that reviewer is somebody it will never ask.
|
|
361
|
+
roster, personaDir,
|
|
362
|
+
// Paths the change under review touches, so a lens the change itself
|
|
363
|
+
// wrote can be refused rather than obeyed.
|
|
364
|
+
touched,
|
|
365
|
+
// The tree itself rather than a path, so a round cannot hand this
|
|
366
|
+
// somewhere other than where it reads. A path parameter took
|
|
367
|
+
// `process.cwd()` without complaint, and a lens borrowed from the
|
|
368
|
+
// session's repo rather than the change's is the cheap version of
|
|
369
|
+
// the mistake that cost $75.63: a reviewer reading real code through
|
|
370
|
+
// a lens written for a codebase nobody is reviewing.
|
|
371
|
+
tree) {
|
|
372
|
+
const charters = await chartersOnDisk(personaDir);
|
|
373
|
+
for (const id of charters.keys()) {
|
|
374
|
+
// The namespace is reserved rather than deconflicted. Checking only
|
|
375
|
+
// where the two collide left a persona of your own answering a
|
|
376
|
+
// repo request whenever the repo had no agent of that name, which
|
|
377
|
+
// is the substitution the prefix exists to prevent, running the
|
|
378
|
+
// other way.
|
|
379
|
+
if (id.startsWith(NAMESPACE)) {
|
|
380
|
+
throw new Error(`A persona of your own is called "${id}", and "${NAMESPACE}" is reserved for lenses the repo under review defines. Rename it: while it exists, asking for a repo's lens can reach yours instead.`);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
// Only when somebody asked for one. Every round was walking and
|
|
384
|
+
// parsing every markdown file in a repo's agent directories,
|
|
385
|
+
// including rounds naming no repo lens, which is work nobody wanted
|
|
386
|
+
// and a surface nobody opened.
|
|
387
|
+
const wants = [
|
|
388
|
+
...roster.reviewers,
|
|
389
|
+
...(roster.judge === undefined ? [] : [roster.judge]),
|
|
390
|
+
].some((one) => one.persona?.startsWith(NAMESPACE) === true);
|
|
391
|
+
if (!wants) {
|
|
392
|
+
const plain = bindPersonas(roster, (id) => charters.get(id));
|
|
393
|
+
if ("refusal" in plain)
|
|
394
|
+
throw new Error(plain.refusal);
|
|
395
|
+
return byParticipant(plain.bindings);
|
|
396
|
+
}
|
|
397
|
+
// A lens is only as trustworthy as the claim about which commit the
|
|
398
|
+
// tree stands at, and a caveat is that claim failing. The refusal
|
|
399
|
+
// for a lens the diff touches is computed against the change's
|
|
400
|
+
// files, so on a tree that is not the change's it is checking the
|
|
401
|
+
// wrong thing against the wrong bytes.
|
|
402
|
+
if (tree.caveat !== undefined) {
|
|
403
|
+
throw new Error(`A participant asks for a lens from the repo under review, and this round is not reading a tree pinned to the commit under review: ${tree.caveat} Drop the repo lens, or run the round where a tree can be pinned.`);
|
|
404
|
+
}
|
|
405
|
+
if (!Array.isArray(touched)) {
|
|
406
|
+
throw new Error(`A participant asks for a lens from the repo under review, and what this change writes to is not known in full: ${touched.unknown} A lens is safe to read only where the change under review is known not to have written it.`);
|
|
407
|
+
}
|
|
408
|
+
const inRepo = await agentsInRepo(tree.path, touched);
|
|
409
|
+
for (const agent of inRepo.agents)
|
|
410
|
+
charters.set(agent.id, agent.charter);
|
|
411
|
+
const bound = bindPersonas(roster, (id) => charters.get(id));
|
|
412
|
+
if ("refusal" in bound) {
|
|
413
|
+
// The refusal knows the lens is missing and not why. What the tree
|
|
414
|
+
// offered and declined to offer is here, and saying it is the
|
|
415
|
+
// difference between "no such persona" and "the change you are
|
|
416
|
+
// reviewing edits that file" while the file sits right there.
|
|
417
|
+
throw new Error([bound.refusal, ...whatTheTreeSaid(inRepo)].join(" "));
|
|
418
|
+
}
|
|
419
|
+
return byParticipant(bound.bindings);
|
|
420
|
+
}
|
|
421
|
+
/** The charters, keyed the way a round asks for them. */
|
|
422
|
+
function byParticipant(bindings) {
|
|
423
|
+
const charters = new Map();
|
|
424
|
+
for (const binding of bindings) {
|
|
425
|
+
if (binding.charter !== undefined) {
|
|
426
|
+
charters.set(binding.participant.id, binding.charter);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
return charters;
|
|
430
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What to propose, worked out from the checkout you are standing in.
|
|
3
|
+
*
|
|
4
|
+
* Putting a branch up should not mean retyping three things git
|
|
5
|
+
* already knows. The branch you are on is the head, the trunk is the
|
|
6
|
+
* base, and the last commit's subject is a better title than most
|
|
7
|
+
* people write twice.
|
|
8
|
+
*
|
|
9
|
+
* The provider deliberately infers none of this: it is handed explicit
|
|
10
|
+
* values, because a layer that quietly overrules a caller who already
|
|
11
|
+
* decided is a layer nobody can predict. That is not a contradiction
|
|
12
|
+
* with what happens here, and the difference is worth stating, because
|
|
13
|
+
* it is the whole design.
|
|
14
|
+
*
|
|
15
|
+
* **A guess is fine when somebody sees it.** This runs at the tool
|
|
16
|
+
* layer, where the answer goes into a confirmation gate before
|
|
17
|
+
* anything is sent, so every inference is on screen with a person
|
|
18
|
+
* looking at it. That is why `guessed` exists and why it is not an
|
|
19
|
+
* implementation detail: the gate reads it out. What is unacceptable
|
|
20
|
+
* is a guess that reaches a backend without being shown, which is
|
|
21
|
+
* exactly what a provider inferring a base from the current directory
|
|
22
|
+
* would be.
|
|
23
|
+
*
|
|
24
|
+
* So it guesses freely and reports every guess, and refuses outright
|
|
25
|
+
* where a wrong guess is expensive rather than merely wrong.
|
|
26
|
+
*/
|
|
27
|
+
/** What the checkout can tell us. */
|
|
28
|
+
export interface CheckoutFacts {
|
|
29
|
+
/** The branch checked out, when the head is not detached. */
|
|
30
|
+
branch?: string;
|
|
31
|
+
/** The repo's trunk, when it is known. */
|
|
32
|
+
trunk?: string;
|
|
33
|
+
/**
|
|
34
|
+
* What the branch sits on, when a stack says it sits on anything.
|
|
35
|
+
*
|
|
36
|
+
* Preferred over the trunk, because a stacked branch proposed onto
|
|
37
|
+
* trunk shows every commit below it as part of this change. The
|
|
38
|
+
* reviewer is then reading three changes' worth of diff with no
|
|
39
|
+
* indication that two of them are already up for review
|
|
40
|
+
* separately, and the usual outcome is that they review all of it
|
|
41
|
+
* again. Absent when the branch sits directly on trunk or when
|
|
42
|
+
* nothing tracks a stack here, which are the same answer as far as
|
|
43
|
+
* the base is concerned.
|
|
44
|
+
*/
|
|
45
|
+
parent?: string;
|
|
46
|
+
/** The last commit's subject. */
|
|
47
|
+
subject?: string;
|
|
48
|
+
/** Anything the commits offer as a description. */
|
|
49
|
+
bodyFromCommits?: string;
|
|
50
|
+
/** Whether the tree has uncommitted work in it. */
|
|
51
|
+
dirty?: boolean;
|
|
52
|
+
}
|
|
53
|
+
/** What the caller already decided. */
|
|
54
|
+
export interface ProposalWanted {
|
|
55
|
+
base?: string;
|
|
56
|
+
head?: string;
|
|
57
|
+
title?: string;
|
|
58
|
+
body?: string;
|
|
59
|
+
}
|
|
60
|
+
/** Everything a propose call needs, and what was guessed. */
|
|
61
|
+
export interface ProposalFill {
|
|
62
|
+
base: string;
|
|
63
|
+
head: string;
|
|
64
|
+
title: string;
|
|
65
|
+
body: string;
|
|
66
|
+
/** Fields that came from the checkout, for the gate to show. */
|
|
67
|
+
guessed: string[];
|
|
68
|
+
/** Things worth saying before this goes up. */
|
|
69
|
+
warnings: string[];
|
|
70
|
+
}
|
|
71
|
+
/** Work out what to propose, or say what is missing. */
|
|
72
|
+
export declare function fillProposal(wanted: ProposalWanted, facts: CheckoutFacts): {
|
|
73
|
+
fill: ProposalFill;
|
|
74
|
+
} | {
|
|
75
|
+
refusal: string;
|
|
76
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What to propose, worked out from the checkout you are standing in.
|
|
3
|
+
*
|
|
4
|
+
* Putting a branch up should not mean retyping three things git
|
|
5
|
+
* already knows. The branch you are on is the head, the trunk is the
|
|
6
|
+
* base, and the last commit's subject is a better title than most
|
|
7
|
+
* people write twice.
|
|
8
|
+
*
|
|
9
|
+
* The provider deliberately infers none of this: it is handed explicit
|
|
10
|
+
* values, because a layer that quietly overrules a caller who already
|
|
11
|
+
* decided is a layer nobody can predict. That is not a contradiction
|
|
12
|
+
* with what happens here, and the difference is worth stating, because
|
|
13
|
+
* it is the whole design.
|
|
14
|
+
*
|
|
15
|
+
* **A guess is fine when somebody sees it.** This runs at the tool
|
|
16
|
+
* layer, where the answer goes into a confirmation gate before
|
|
17
|
+
* anything is sent, so every inference is on screen with a person
|
|
18
|
+
* looking at it. That is why `guessed` exists and why it is not an
|
|
19
|
+
* implementation detail: the gate reads it out. What is unacceptable
|
|
20
|
+
* is a guess that reaches a backend without being shown, which is
|
|
21
|
+
* exactly what a provider inferring a base from the current directory
|
|
22
|
+
* would be.
|
|
23
|
+
*
|
|
24
|
+
* So it guesses freely and reports every guess, and refuses outright
|
|
25
|
+
* where a wrong guess is expensive rather than merely wrong.
|
|
26
|
+
*/
|
|
27
|
+
/** Work out what to propose, or say what is missing. */
|
|
28
|
+
export function fillProposal(wanted, facts) {
|
|
29
|
+
const guessed = [];
|
|
30
|
+
const head = wanted.head ?? facts.branch;
|
|
31
|
+
if (head === undefined) {
|
|
32
|
+
return {
|
|
33
|
+
refusal: "There is no branch checked out here and no head was named, so there is nothing to propose. Name the branch holding the work.",
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (wanted.head === undefined)
|
|
37
|
+
guessed.push("head");
|
|
38
|
+
// The parent first. A branch in a stack merges into the branch
|
|
39
|
+
// below it, and only falls back to trunk when it is the bottom of
|
|
40
|
+
// one or there is no stack at all.
|
|
41
|
+
const base = wanted.base ?? facts.parent ?? facts.trunk;
|
|
42
|
+
if (base === undefined) {
|
|
43
|
+
// Not guessed at. A change proposed against something nobody
|
|
44
|
+
// meant asks the wrong people to look at it, and on a busy repo
|
|
45
|
+
// that is a notification to a team who now has to work out why.
|
|
46
|
+
return {
|
|
47
|
+
refusal: "This repo does not say what its trunk is, so there is nothing safe to target. Name the base this should merge into.",
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
if (wanted.base === undefined) {
|
|
51
|
+
// Named apart from an ordinary guess, because the two are wrong in
|
|
52
|
+
// different ways and the gate is where somebody catches it. A base
|
|
53
|
+
// taken from the trunk is the boring default; a base taken from a
|
|
54
|
+
// stack is a claim about what this branch sits on, and if the
|
|
55
|
+
// stack is stale that claim targets a branch that has moved.
|
|
56
|
+
guessed.push(facts.parent !== undefined && wanted.base === undefined
|
|
57
|
+
? `base (${facts.parent}, the branch it is stacked on)`
|
|
58
|
+
: "base");
|
|
59
|
+
}
|
|
60
|
+
if (base === head) {
|
|
61
|
+
return {
|
|
62
|
+
refusal: `A change from ${head} onto itself is not a change. Check out the branch holding the work, or name a different base.`,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const title = wanted.title ?? facts.subject;
|
|
66
|
+
if (title === undefined) {
|
|
67
|
+
return {
|
|
68
|
+
refusal: "There is no commit here to take a title from, so one has to be given. A title is the first thing a reviewer reads.",
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
if (wanted.title === undefined)
|
|
72
|
+
guessed.push("title");
|
|
73
|
+
const body = wanted.body ?? facts.bodyFromCommits ?? "";
|
|
74
|
+
if (wanted.body === undefined && facts.bodyFromCommits !== undefined) {
|
|
75
|
+
guessed.push("body");
|
|
76
|
+
}
|
|
77
|
+
const warnings = [];
|
|
78
|
+
if (facts.dirty === true) {
|
|
79
|
+
// A warning rather than a refusal, because proposing from a dirty
|
|
80
|
+
// tree is legitimate: what goes up is what was pushed. But
|
|
81
|
+
// somebody who forgot to commit wants to hear it now, not from a
|
|
82
|
+
// reviewer reading a diff missing the last thing they wrote.
|
|
83
|
+
warnings.push("This tree has uncommitted work in it, which will not be part of the change. What goes up is what has been pushed.");
|
|
84
|
+
}
|
|
85
|
+
return { fill: { base, head, title, body, guessed, warnings } };
|
|
86
|
+
}
|