toolroll 0.9.75 → 0.9.77

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.
Files changed (129) hide show
  1. package/CHANGELOG.md +241 -0
  2. package/README.md +11 -4
  3. package/THIRD_PARTY_NOTICES.md +5 -5
  4. package/dist/agent-fence.js +36 -8
  5. package/dist/approval-authority.js +6 -2
  6. package/dist/approval-rules-ui.d.ts +11 -0
  7. package/dist/approval-rules-ui.js +13 -1
  8. package/dist/assignment.js +3 -0
  9. package/dist/batch-checks.js +3 -1
  10. package/dist/browser/THIRD_PARTY_NOTICES.txt +5 -5
  11. package/dist/browser/workspace.css +2 -2
  12. package/dist/browser/workspace.js +31 -31
  13. package/dist/builder.d.ts +14 -0
  14. package/dist/builder.js +141 -42
  15. package/dist/chat-decide.js +4 -0
  16. package/dist/check-failure.d.ts +92 -0
  17. package/dist/check-failure.js +267 -0
  18. package/dist/check-progress.d.ts +28 -1
  19. package/dist/check-progress.js +105 -6
  20. package/dist/check-report.d.ts +52 -6
  21. package/dist/check-report.js +193 -8
  22. package/dist/checkout-cleanup.js +2 -2
  23. package/dist/cli.js +8 -5
  24. package/dist/coding-handoff.d.ts +1 -0
  25. package/dist/coding-handoff.js +20 -11
  26. package/dist/coding-workspace.js +7 -5
  27. package/dist/commit-extract.d.ts +6 -0
  28. package/dist/commit-extract.js +63 -8
  29. package/dist/console-chrome.d.ts +41 -0
  30. package/dist/console-chrome.js +166 -0
  31. package/dist/contracts/console-api.d.ts +1 -0
  32. package/dist/contracts/console-api.js +1 -0
  33. package/dist/contracts/release-check.d.ts +12 -0
  34. package/dist/contracts/release-check.js +17 -0
  35. package/dist/contracts/verification-receipt.d.ts +20 -2
  36. package/dist/contracts/verification-receipt.js +15 -3
  37. package/dist/contracts/verification-view.d.ts +8 -0
  38. package/dist/controller-supervisor.d.ts +8 -0
  39. package/dist/controller-supervisor.js +33 -1
  40. package/dist/demo.js +3 -2
  41. package/dist/deploy-gate.d.ts +3 -0
  42. package/dist/deploy-gate.js +8 -2
  43. package/dist/desktop-update.d.ts +1 -1
  44. package/dist/discover.js +6 -1
  45. package/dist/dispose.d.ts +3 -0
  46. package/dist/dispose.js +6 -3
  47. package/dist/doctor.d.ts +7 -0
  48. package/dist/doctor.js +10 -2
  49. package/dist/envelope.js +2 -1
  50. package/dist/evidence.js +4 -1
  51. package/dist/exec.d.ts +7 -0
  52. package/dist/exec.js +7 -1
  53. package/dist/first-run.js +3 -1
  54. package/dist/git-floor.d.ts +16 -0
  55. package/dist/git-floor.js +36 -0
  56. package/dist/git-incident.d.ts +49 -0
  57. package/dist/git-incident.js +69 -0
  58. package/dist/git-views.d.ts +20 -0
  59. package/dist/git-views.js +120 -0
  60. package/dist/grant.js +7 -1
  61. package/dist/guides.js +4 -3
  62. package/dist/operate.d.ts +13 -0
  63. package/dist/operate.js +779 -319
  64. package/dist/planner.js +5 -1
  65. package/dist/prepared-evidence.d.ts +2 -1
  66. package/dist/prepared-evidence.js +8 -3
  67. package/dist/project-knowledge.js +6 -2
  68. package/dist/project-learning.js +23 -3
  69. package/dist/proof.js +6 -0
  70. package/dist/pull-request-flow.js +4 -0
  71. package/dist/read-executor-worker.js +8 -4
  72. package/dist/read-executor.d.ts +18 -1
  73. package/dist/read-executor.js +8 -0
  74. package/dist/release-adapters.d.ts +71 -2
  75. package/dist/release-adapters.js +471 -12
  76. package/dist/release-authority.d.ts +46 -0
  77. package/dist/release-authority.js +68 -0
  78. package/dist/release-auto.d.ts +184 -0
  79. package/dist/release-auto.js +612 -0
  80. package/dist/release-card.d.ts +15 -3
  81. package/dist/release-card.js +25 -9
  82. package/dist/release-ci-hold.d.ts +41 -0
  83. package/dist/release-ci-hold.js +53 -0
  84. package/dist/release-cli.js +77 -14
  85. package/dist/release-coverage.js +5 -2
  86. package/dist/release-recheck.d.ts +1 -1
  87. package/dist/release-recheck.js +6 -1
  88. package/dist/release.d.ts +207 -6
  89. package/dist/release.js +495 -20
  90. package/dist/repository-context.js +4 -6
  91. package/dist/result-follow-ups.js +3 -1
  92. package/dist/review-context.js +8 -6
  93. package/dist/runner.js +2 -1
  94. package/dist/sandbox-runtime.d.ts +8 -0
  95. package/dist/sandbox-runtime.js +14 -2
  96. package/dist/scope.d.ts +31 -2
  97. package/dist/scope.js +51 -4
  98. package/dist/scout.js +5 -1
  99. package/dist/secret-mint.d.ts +1 -0
  100. package/dist/secret-mint.js +14 -0
  101. package/dist/serve.js +101 -51
  102. package/dist/server/chat.js +5 -5
  103. package/dist/server/render-tasks.d.ts +12 -0
  104. package/dist/server/render-tasks.js +25 -14
  105. package/dist/server/request-context.d.ts +6 -0
  106. package/dist/server/route-table.js +3 -0
  107. package/dist/server/runtime.d.ts +2 -0
  108. package/dist/server/settings.js +29 -2
  109. package/dist/server/task-views.js +15 -2
  110. package/dist/setup-guide.d.ts +2 -2
  111. package/dist/storage.d.ts +5 -0
  112. package/dist/storage.js +28 -1
  113. package/dist/store.d.ts +11 -1
  114. package/dist/store.js +44 -5
  115. package/dist/task-base.d.ts +4 -0
  116. package/dist/task-base.js +22 -2
  117. package/dist/teardown-git.d.ts +90 -13
  118. package/dist/teardown-git.js +1027 -129
  119. package/dist/test-infra.d.ts +26 -0
  120. package/dist/test-infra.js +321 -0
  121. package/dist/up-processes.d.ts +137 -0
  122. package/dist/up-processes.js +165 -0
  123. package/dist/up-role-child.d.ts +1 -0
  124. package/dist/up-role-child.js +77 -0
  125. package/dist/verification-evidence.d.ts +1 -0
  126. package/dist/verification-evidence.js +13 -1
  127. package/dist/worktree.d.ts +4 -0
  128. package/dist/worktree.js +13 -7
  129. package/package.json +2 -1
@@ -6,14 +6,24 @@ export declare const TEARDOWN_FLAGS: readonly string[];
6
6
  /** Exit code of a refused command (git's own fatal code, so no caller reads it as "not found" or "no"). */
7
7
  export declare const REFUSED_CODE = 128;
8
8
  /** The command-running setting a `git config --list --show-scope -z` listing sets, or null. Only local and worktree
9
- * scope count: teardown commands never read system or global config. */
10
- export declare function commandSetting(listing: string): string | null;
9
+ * scope count: teardown commands never read system or global config. `lfsChecked`: the caller refuses a checkout whose
10
+ * `.lfsconfig` names a git-lfs extension (lfsExtensionIn), so git-lfs's own exact filters may stand (runsCommand).
11
+ * Fails closed: a listing that can't be classified names a setting. */
12
+ export declare function commandSetting(listing: string, options?: {
13
+ lfsChecked?: boolean;
14
+ }): string | null;
11
15
  /** The `-c` settings that carry the operator's own values (CARRIED_VALUES, LFS_FILTER) from a global/system listing. */
12
16
  export declare function carriedSettings(listing: string): string[];
13
17
  /** Why a teardown command was refused, or null when `result` isn't a refusal. */
14
18
  export declare function refusal(result: ExecResult): string | null;
15
- /** The one way teardown runs git, including the target checkout immediately before removal. */
16
- export declare function teardownGit(runner?: Runner): Git;
19
+ /** The one way teardown runs git, including the target checkout immediately before removal. Every command runs
20
+ * against a write view of its repository (gitView), whose config is the one inspected and whose info is a copy, so a
21
+ * setting or attributes file an agent adds after the inspection is never read (a build's process can outlive its turn:
22
+ * on macOS containment is observational, src/containment.ts, and a sibling build shares the repository). A removal's
23
+ * target is bound to the same repository as the folder it is removed from. A removal without --force runs under the
24
+ * target's own view (its own config.worktree folded in), so git's last check of whether it is clean reads it as the
25
+ * target itself would. `binding.repo`: the project's main checkout, from the plane's records, when the caller has it. */
26
+ export declare function teardownGit(runner?: Runner, binding?: GitBinding): Git;
17
27
  /**
18
28
  * Git on a build's checkout, as the plane runs it outside every fence (staging, committing and inspecting the build's
19
29
  * work): the same fixed hardening as teardown (no hooks, fsmonitor, ext transport, credential helpers or automatic
@@ -28,15 +38,25 @@ export declare function teardownGit(runner?: Runner): Git;
28
38
  * git at any file, a pipe that never ends among them. Each file is read only as the regular file it is, bounded; one
29
39
  * that can't be read so counts as including.
30
40
  */
31
- export declare function checkoutIncludes(checkout: string): boolean;
41
+ export declare function checkoutIncludes(checkout: string, gitFile?: string): boolean;
42
+ export type GitBinding = {
43
+ repo?: string | null;
44
+ };
45
+ /** Settings fixed on every write through a view: `worktree add` records absolute paths (relative ones would need a
46
+ * config write, which a view keeps); no transport at all (a caller that fetches allows its one protocol by name, as the
47
+ * nightly check's local fetch does with protocol.file.allow); and no split index (its shared index files would be
48
+ * written in the plane's GIT_DIR). */
49
+ export declare const WRITE_VIEW_FLAGS: readonly string[];
32
50
  /** Whether the checkout's .lfsconfig (read as git parses it, that file only) sets any git-lfs key that could name a
33
51
  * program (anything but INERT_LFS). A file that
34
52
  * isn't a plain one, or doesn't parse, counts as naming one. */
35
- export declare function lfsExtensionIn(checkout: string): boolean;
36
- /** `mode` "read" is for reading a checkout an agent may still be writing (the code page): every command also takes
37
- * readFlags() and runs against the checkout's readView, so neither its config nor its info/attributes can change
38
- * between the inspection and the run. */
39
- export declare function checkoutGit(inner?: Runner, mode?: "build" | "read"): Runner;
53
+ export declare function lfsExtensionIn(checkout: string, gitFile?: string): boolean;
54
+ /** Every command runs against a view of the checkout's repository (gitView) whose config and info are copies the
55
+ * plane made, inspected there, so neither can change between the inspection and the run. `mode` "read" is for reading
56
+ * a checkout an agent may still be writing (the code page): every command also takes readFlags(), and the view holds
57
+ * no info/attributes. "build" is the plane's staging and committing of a build's work, which writes the repository
58
+ * through the view (gitView). */
59
+ export declare function checkoutGit(inner?: Runner, mode?: "build" | "read", binding?: GitBinding): Runner;
40
60
  /**
41
61
  * Flags for reading a checkout an agent writes while a page waits (docs/plans/get-side-effects.md). Command-line
42
62
  * settings win over anything the checkout's config says, even one changed after it was inspected: no fsmonitor, hooks,
@@ -47,16 +67,73 @@ export declare const PAGE_READ_FLAGS: readonly string[];
47
67
  /** The read flags, for every read of an agent-written checkout, whatever the HTTP method (security review of
48
68
  * 01bf3114): the worktree's attributes come from the empty tree. Git still reads the repository's info/attributes and
49
69
  * its config as it starts, so the flags alone don't stop a filter planted in both after the inspection: every read
50
- * also runs against the checkout's readView (checkoutGitSync, checkoutGit "read"), whose config and info are the plane's. The cost is cosmetic: a checkout's line-ending or encoding rules are not applied, so
70
+ * also runs against a view of the checkout's repository (gitView; checkoutGitSync, checkoutGit "read"), whose config and info are the plane's. The cost is cosmetic: a checkout's line-ending or encoding rules are not applied, so
51
71
  * a file they would normalize can read as changed (fail closed: shipping then asks for a clean commit). */
52
- export declare function readFlags(): readonly string[];
72
+ export declare function readFlags(gitFile?: string): readonly string[];
53
73
  /**
54
74
  * checkoutGit, synchronously, for reads a page shows from a checkout an agent writes (docs/plans/get-side-effects.md):
55
75
  * the same refusals (an include, an .lfsconfig extension, a config key that can run a command), no system or global
56
- * config, the operator's own values carried, PAGE_READ_FLAGS and the checkout's readView (which hold even if its config
76
+ * config, the operator's own values carried, PAGE_READ_FLAGS and a view of the checkout's repository (gitView: they hold even if its config
57
77
  * or info/attributes change after they were read), submodules skipped, bounded. A refusal throws.
58
78
  */
59
79
  export declare function checkoutGitSync(cwd: string, args: readonly string[], options?: {
60
80
  timeoutMs?: number;
61
81
  maxBuffer?: number;
82
+ binding?: GitBinding;
62
83
  }): string;
84
+ /**
85
+ * checkoutGitSync's run, answering git's exit status instead of throwing on a non-zero one (a refusal, or a repository
86
+ * that changed while git ran, still throws): for reads whose "no" is an exit code (`merge-base --is-ancestor`), and,
87
+ * with `buffer`, for blobs read as bytes (their output is never rewritten).
88
+ */
89
+ export declare function viewedGitSync(cwd: string, args: readonly string[], options: {
90
+ timeoutMs?: number;
91
+ maxBuffer?: number;
92
+ binding?: GitBinding;
93
+ }): {
94
+ status: number | null;
95
+ stdout: string;
96
+ };
97
+ export declare function viewedGitSync(cwd: string, args: readonly string[], options: {
98
+ timeoutMs?: number;
99
+ maxBuffer?: number;
100
+ binding?: GitBinding;
101
+ buffer: true;
102
+ input?: Buffer;
103
+ git?: string;
104
+ }): {
105
+ status: number | null;
106
+ stdout: Buffer;
107
+ };
108
+ /**
109
+ * checkoutGit ("build": the repository written through its view) for callers that name the repository with a leading
110
+ * `git -C <dir>` instead of a cwd: worktree add and remove in a project's repository, a merge in a checkout of it.
111
+ * The project's repository is shared with every build, which can write its config, info and hooks; nothing here runs
112
+ * what they name. Anything but git goes to `inner` as given.
113
+ */
114
+ export declare function hardenedGit(inner?: Runner, mode?: "build" | "read", binding?: GitBinding): Runner;
115
+ /** Asked once per git executable (eval-harness review 2, follow-up): a fixed git given to viewedGitSync is probed
116
+ * itself, never answered for by the one PATH names. */
117
+ export declare function lazyFetchSupported(gitFile?: string): boolean;
118
+ /** For tests: forget the probes' answers, or set one for every executable (null forgets). */
119
+ export declare function setLazyFetchSupportedForTest(value: boolean | null): void;
120
+ /** The words for a partial clone refused on a git without `--no-lazy-fetch`. */
121
+ export declare const PARTIAL_CLONE_REFUSAL = "this project is a partial clone; protected reads need git 2.45 or newer";
122
+ /** `--no-lazy-fetch` where the installed git has it, else nothing (and lazyFetchSetting refuses partial clones). */
123
+ export declare function noLazyFetch(): readonly string[];
124
+ /**
125
+ * The repository setting (local or worktree scope of a `git config --list --show-scope -z` listing) that makes lazy
126
+ * fetching possible, or null: `extensions.partialClone` set at all, any `remote.<name>.promisor` not plainly false, or
127
+ * any `remote.<name>.partialCloneFilter` set (git makes that remote a promisor). Fails closed: a listing that can't be
128
+ * read names a setting. `remote.<name>.vcs` (a foreign-VCS helper) is named too, though the classifier already refuses
129
+ * it (commandSetting: not in the remote allowlist), as it does every `protocol.*` key and every include.
130
+ */
131
+ export declare function lazyFetchSetting(listing: string): string | null;
132
+ /**
133
+ * For the reads that run git directly on a repository rather than through a view: with `--no-lazy-fetch` they run as
134
+ * they always have (the flag stops any fetch). Without it, they must not check a repository's config and then run git
135
+ * on it (the config could change in between, or an include could set what the check never saw): `inner`, wrapped so
136
+ * every git command runs through a frozen read view (checkoutGit "read"), whose own config listing (includes refused,
137
+ * command and protocol settings refused, a partial clone refused) is the config git then runs with.
138
+ */
139
+ export declare function lazyFetchSafeGit(inner?: Runner): Runner;