@lyupro/codex-bridge 0.6.6 → 0.6.8
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/CHANGELOG.md +79 -0
- package/README.md +7 -5
- package/bin/codex-bridge.mjs +186 -178
- package/cli/dispatcher-contract-record.mjs +51 -0
- package/cli/dispatcher-contract.mjs +90 -0
- package/cli/doctor-hooks.mjs +104 -114
- package/cli/doctor-installation.mjs +111 -111
- package/cli/doctor-runs.mjs +55 -55
- package/cli/doctor.mjs +53 -5
- package/cli/handback-witness-check.mjs +31 -0
- package/cli/hook-targets.mjs +14 -6
- package/cli/hook.mjs +32 -23
- package/cli/host-contract.mjs +145 -135
- package/cli/install.mjs +23 -17
- package/cli/launcher-probe.mjs +38 -0
- package/cli/probe-contract.mjs +55 -70
- package/cli/probe-rig.mjs +53 -0
- package/cli/probe-target.mjs +33 -0
- package/cli/run-launcher.mjs +17 -0
- package/cli/session-hosts.mjs +51 -0
- package/cli/settings-merge.mjs +42 -35
- package/cli/uninstall.mjs +16 -3
- package/cli/update.mjs +45 -16
- package/package.json +4 -4
- package/scripts/run-tests.mjs +7 -0
- package/src/agents/codex-advisor.md +3 -4
- package/src/agents/codex-build.md +5 -5
- package/src/agents/codex-review.md +3 -3
- package/src/agents/codex-scout.md +3 -4
- package/src/home/hooks/dispatcher-gate.mjs +132 -0
- package/src/home/hooks/guard-tries.mjs +5 -6
- package/src/home/hooks/live-runs.mjs +1 -0
- package/src/home/hooks/order-gate.mjs +20 -5
- package/src/home/hooks/reply-guard.mjs +95 -10
- package/src/home/hooks/reply-verdicts.mjs +5 -0
- package/src/home/hooks/worktree-lock.mjs +108 -107
- package/src/home/lib/atomic-json.mjs +21 -0
- package/src/home/lib/brand-home.mjs +6 -0
- package/src/home/lib/dispatcher-command.mjs +79 -0
- package/src/home/lib/dispatcher-gate.mjs +95 -0
- package/src/home/lib/dispatcher-order.mjs +30 -8
- package/src/home/lib/dispatcher-state.mjs +111 -0
- package/src/home/lib/dispatcher-stop.mjs +52 -0
- package/src/home/lib/handback-witness.mjs +70 -0
- package/src/home/lib/hook-definitions.mjs +10 -0
- package/src/home/lib/hook-entry.mjs +20 -0
- package/src/home/lib/host-observations.mjs +57 -0
- package/src/home/lib/host-version.mjs +27 -0
- package/src/home/lib/meta/advice-verdict.mjs +37 -21
- package/src/home/lib/required-inputs.mjs +1 -1
- package/src/home/lib/runner/codex-cmd.mjs +3 -2
- package/src/home/lib/runner/git-state.mjs +1 -1
- package/src/home/lib/runner/preflight.mjs +6 -3
- package/src/home/lib/runner/prompts.mjs +8 -7
- package/src/home/lib/runner/schemas.mjs +33 -7
|
@@ -150,6 +150,30 @@ const REVIEW_SCHEMA = {
|
|
|
150
150
|
},
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
+
// The 2026-09-24_094352_plan62-g1-dispatcher-gate run folded 3-5 citations into one advisor
|
|
154
|
+
// address; like the 2026-07-31 build changes[].file precedent, constrain a single location here.
|
|
155
|
+
export const EVIDENCE_LOCATION = {
|
|
156
|
+
type: 'object',
|
|
157
|
+
additionalProperties: false,
|
|
158
|
+
required: ['file', 'line_start', 'line_end'],
|
|
159
|
+
properties: {
|
|
160
|
+
file: {
|
|
161
|
+
type: 'string',
|
|
162
|
+
minLength: 1,
|
|
163
|
+
pattern: '^[^:;,*?{}\\r\\n]+$',
|
|
164
|
+
description: 'Exactly one repository-root-relative path. Spaces are allowed; lists, globs, drive letters and line suffixes are not — use a separate location object for each place.',
|
|
165
|
+
},
|
|
166
|
+
line_start: { type: 'integer', minimum: 1 },
|
|
167
|
+
line_end: { type: 'integer', minimum: 1 },
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const EVIDENCE_LIST = (minItems) => ({
|
|
172
|
+
type: 'array',
|
|
173
|
+
...(minItems === undefined ? {} : { minItems }),
|
|
174
|
+
items: EVIDENCE_LOCATION,
|
|
175
|
+
});
|
|
176
|
+
|
|
153
177
|
/** Plan_59: execution schemas stay static; schemaFor selects the advisor contract by phase. */
|
|
154
178
|
export const SCHEMAS = {
|
|
155
179
|
'codex-scout': SCOUT_SCHEMA,
|
|
@@ -220,11 +244,11 @@ export const PHASE_SCHEMAS = {
|
|
|
220
244
|
items: {
|
|
221
245
|
type: 'object',
|
|
222
246
|
additionalProperties: false,
|
|
223
|
-
required: ['claim', 'rating', '
|
|
247
|
+
required: ['claim', 'rating', 'evidence'],
|
|
224
248
|
properties: {
|
|
225
249
|
claim: { type: 'string' },
|
|
226
250
|
rating: { type: 'string', enum: ['VERIFIED', 'REASONABLE', 'FRAGILE'] },
|
|
227
|
-
|
|
251
|
+
evidence: EVIDENCE_LIST(),
|
|
228
252
|
},
|
|
229
253
|
},
|
|
230
254
|
},
|
|
@@ -233,11 +257,12 @@ export const PHASE_SCHEMAS = {
|
|
|
233
257
|
items: {
|
|
234
258
|
type: 'object',
|
|
235
259
|
additionalProperties: false,
|
|
236
|
-
required: ['risk_id', 'outcome', '
|
|
260
|
+
required: ['risk_id', 'outcome', 'note', 'evidence'],
|
|
237
261
|
properties: {
|
|
238
262
|
risk_id: { type: 'string' },
|
|
239
263
|
outcome: { type: 'string', enum: ['confirmed', 'refuted'] },
|
|
240
|
-
|
|
264
|
+
note: { type: 'string' },
|
|
265
|
+
evidence: EVIDENCE_LIST(1),
|
|
241
266
|
},
|
|
242
267
|
},
|
|
243
268
|
},
|
|
@@ -254,10 +279,11 @@ export const PHASE_SCHEMAS = {
|
|
|
254
279
|
early_check: {
|
|
255
280
|
type: 'object',
|
|
256
281
|
additionalProperties: false,
|
|
257
|
-
required: ['kind', 'target'],
|
|
282
|
+
required: ['kind', 'target', 'evidence'],
|
|
258
283
|
properties: {
|
|
259
284
|
kind: { type: 'string', enum: ['test', 'command', 'inspect'] },
|
|
260
285
|
target: { type: 'string', minLength: 3 },
|
|
286
|
+
evidence: EVIDENCE_LIST(),
|
|
261
287
|
},
|
|
262
288
|
},
|
|
263
289
|
},
|
|
@@ -271,8 +297,8 @@ export const PHASE_SCHEMAS = {
|
|
|
271
297
|
items: {
|
|
272
298
|
type: 'object',
|
|
273
299
|
additionalProperties: false,
|
|
274
|
-
required: ['check', '
|
|
275
|
-
properties: { check: { type: 'string' },
|
|
300
|
+
required: ['check', 'evidence'],
|
|
301
|
+
properties: { check: { type: 'string' }, evidence: EVIDENCE_LIST(1) },
|
|
276
302
|
},
|
|
277
303
|
},
|
|
278
304
|
},
|