thinkpool-pair 0.7.333 → 0.7.334
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/bridge.mjs +4 -4
- package/package.json +1 -1
- package/review-check.mjs +19 -7
- package/thinkpool-capabilities.json +3 -3
package/bridge.mjs
CHANGED
|
@@ -92,7 +92,7 @@ function stopFlowPreviews (flowId, laneId = null) {
|
|
|
92
92
|
}
|
|
93
93
|
import { FLOW_REVIEWER_PROMPT, FLOW_CODEX_REVIEWER_PROMPT, revertLane, parseReviewVerdict, reviewVerdictToReflection } from './flow-review.mjs'
|
|
94
94
|
import { reviewGateDecision } from './flow-review-gate.mjs'
|
|
95
|
-
import {
|
|
95
|
+
import { IMMUTABLE_REVIEW_READ_TOOL_EXTRAS, UNSANDBOXED_REVIEW_CHECK_TOOL_EXTRAS, readReviewFile, runReviewCheck } from './review-check.mjs'
|
|
96
96
|
import { pairAdjudicationPrompt, reviewReflectionDecision, REVIEW_DEFAULTS } from './flow-review-reflect.mjs'
|
|
97
97
|
import { mergeWorktrees, inlineSingleHtml, initRepo } from './flow-assembly.mjs'
|
|
98
98
|
import { canDispatch, FLOW_LIMITS, makeBudget, recordSpend, killSwitchEnv } from './flow-budget.mjs'
|
|
@@ -3032,13 +3032,13 @@ function openStructured({ id, runtime = 'claude', model, models, effort, resume,
|
|
|
3032
3032
|
'Read one regular file from the declared immutable review target. This always reads the target’s pinned Git object, never a live worktree; target and path are validated and the response is byte-bounded.',
|
|
3033
3033
|
{ target: z.string(), path: z.string() },
|
|
3034
3034
|
async (args) => ({ content: [{ type: 'text', text: JSON.stringify(await readReviewFile({ target: args?.target, filePath: args?.path, snapshots: entry.flowReviewSnapshots })) }] }),
|
|
3035
|
-
|
|
3035
|
+
IMMUTABLE_REVIEW_READ_TOOL_EXTRAS,
|
|
3036
3036
|
), tool(
|
|
3037
3037
|
'run_review_check',
|
|
3038
|
-
'Run one fixed verification check against an immutable git-archived review target. This accepts only the declared target and a fixed check id
|
|
3038
|
+
'Run one fixed verification check against an immutable git-archived review target. This accepts only the declared target and a fixed check id, but executes target-defined code in a scratch archive that is not an OS filesystem/network sandbox. It can require approval and must be refused by approvalPolicy=never reviewers.',
|
|
3039
3039
|
{ target: z.string(), checkId: z.string() },
|
|
3040
3040
|
async (args) => ({ content: [{ type: 'text', text: JSON.stringify(await runReviewCheck({ target: args?.target, checkId: args?.checkId, snapshots: entry.flowReviewSnapshots })) }] }),
|
|
3041
|
-
|
|
3041
|
+
UNSANDBOXED_REVIEW_CHECK_TOOL_EXTRAS,
|
|
3042
3042
|
)] : []),
|
|
3043
3043
|
],
|
|
3044
3044
|
})
|
package/package.json
CHANGED
package/review-check.mjs
CHANGED
|
@@ -17,13 +17,10 @@ const CHECKS = Object.freeze({
|
|
|
17
17
|
})
|
|
18
18
|
const OUTPUT_CAP = 512 * 1024
|
|
19
19
|
|
|
20
|
-
// Codex's native read-only/review mode never raises approval cards.
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
// for both source reads and fixed scratch checks: neither mutates the reviewed
|
|
25
|
-
// target, neither reaches the open world, and repeating either is safe.
|
|
26
|
-
export const IMMUTABLE_REVIEW_TOOL_EXTRAS = Object.freeze({
|
|
20
|
+
// Codex's native read-only/review mode never raises approval cards. Mark only
|
|
21
|
+
// the pinned Git-blob reader as approval-free: it cannot execute target code,
|
|
22
|
+
// mutate the target, or reach the open world.
|
|
23
|
+
export const IMMUTABLE_REVIEW_READ_TOOL_EXTRAS = Object.freeze({
|
|
27
24
|
annotations: Object.freeze({
|
|
28
25
|
readOnlyHint: true,
|
|
29
26
|
destructiveHint: false,
|
|
@@ -32,6 +29,21 @@ export const IMMUTABLE_REVIEW_TOOL_EXTRAS = Object.freeze({
|
|
|
32
29
|
}),
|
|
33
30
|
})
|
|
34
31
|
|
|
32
|
+
// Fixed check ids prevent command injection, but the selected check still runs
|
|
33
|
+
// target-defined code. The scratch archive protects the reviewed worktree; it
|
|
34
|
+
// is not an OS filesystem/network sandbox. Advertise that boundary honestly so
|
|
35
|
+
// approvalPolicy=never reviewers refuse execution instead of silently granting
|
|
36
|
+
// host/open-world authority. Sandboxed runners can still expose this behind an
|
|
37
|
+
// explicit approval in runtimes that support one.
|
|
38
|
+
export const UNSANDBOXED_REVIEW_CHECK_TOOL_EXTRAS = Object.freeze({
|
|
39
|
+
annotations: Object.freeze({
|
|
40
|
+
readOnlyHint: false,
|
|
41
|
+
destructiveHint: true,
|
|
42
|
+
idempotentHint: false,
|
|
43
|
+
openWorldHint: true,
|
|
44
|
+
}),
|
|
45
|
+
})
|
|
46
|
+
|
|
35
47
|
export function reviewCheckCommand(checkId) {
|
|
36
48
|
if (!Object.hasOwn(CHECKS, checkId)) throw new Error('unapproved review check')
|
|
37
49
|
const [command, args] = CHECKS[checkId]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"bundleVersion":
|
|
3
|
+
"bundleVersion": 16,
|
|
4
4
|
"contracts": [
|
|
5
5
|
{
|
|
6
6
|
"id": "room-coordination",
|
|
@@ -130,13 +130,13 @@
|
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
"id": "flow-completion",
|
|
133
|
-
"version":
|
|
133
|
+
"version": 2,
|
|
134
134
|
"routes": [
|
|
135
135
|
{
|
|
136
136
|
"id": "flow-completion",
|
|
137
137
|
"tools": ["submit_flow_plan", "mark_flow_done", "submit_flow_review", "read_review_file", "run_review_check"],
|
|
138
138
|
"trigger": "\\b(flow|submit_flow_plan|mark_flow_done|submit_flow_review|read_review_file|run_review_check)\\b",
|
|
139
|
-
"prompt": "Managed Flow roles use only their exposed completion and
|
|
139
|
+
"prompt": "Managed Flow roles use only their exposed completion and review tools: submit_flow_plan, mark_flow_done, submit_flow_review, read_review_file, and run_review_check. read_review_file is approval-free pinned-source access. run_review_check executes target-defined code without OS filesystem or network isolation and therefore remains subject to the runtime's normal approval boundary; approvalPolicy=never reviewers must not call it and must report the skipped check."
|
|
140
140
|
}
|
|
141
141
|
],
|
|
142
142
|
"impact": [
|