audit-tools 0.32.6 → 0.32.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.
Files changed (134) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +2 -0
  3. package/dist/audit/cli/args.d.ts.map +1 -1
  4. package/dist/audit/cli/args.js +5 -5
  5. package/dist/audit/cli/args.js.map +1 -1
  6. package/dist/audit/cli/dispatch.d.ts.map +1 -1
  7. package/dist/audit/cli/dispatch.js +7 -1
  8. package/dist/audit/cli/dispatch.js.map +1 -1
  9. package/dist/audit/cli/rollingAuditDispatch.d.ts.map +1 -1
  10. package/dist/audit/cli/rollingAuditDispatch.js +26 -0
  11. package/dist/audit/cli/rollingAuditDispatch.js.map +1 -1
  12. package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
  13. package/dist/audit/cli/semanticReviewStep.js +8 -1
  14. package/dist/audit/cli/semanticReviewStep.js.map +1 -1
  15. package/dist/audit/extractors/fileInventory.d.ts.map +1 -1
  16. package/dist/audit/extractors/fileInventory.js +12 -2
  17. package/dist/audit/extractors/fileInventory.js.map +1 -1
  18. package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
  19. package/dist/audit/orchestrator/planningExecutors.js +1 -0
  20. package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
  21. package/dist/audit/quota/hostLimits.d.ts +3 -2
  22. package/dist/audit/quota/hostLimits.d.ts.map +1 -1
  23. package/dist/audit/quota/hostLimits.js +2 -2
  24. package/dist/audit/quota/hostLimits.js.map +1 -1
  25. package/dist/audit/quota/index.d.ts +16 -16
  26. package/dist/remediate/contractPipeline/changeClassification.d.ts +7 -4
  27. package/dist/remediate/contractPipeline/changeClassification.d.ts.map +1 -1
  28. package/dist/remediate/contractPipeline/changeClassification.js +37 -5
  29. package/dist/remediate/contractPipeline/changeClassification.js.map +1 -1
  30. package/dist/remediate/contractPipeline/derive.d.ts +34 -4
  31. package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
  32. package/dist/remediate/contractPipeline/derive.js +148 -4
  33. package/dist/remediate/contractPipeline/derive.js.map +1 -1
  34. package/dist/remediate/contractPipeline/phaseCut.d.ts +6 -4
  35. package/dist/remediate/contractPipeline/phaseCut.d.ts.map +1 -1
  36. package/dist/remediate/contractPipeline/phaseCut.js +83 -7
  37. package/dist/remediate/contractPipeline/phaseCut.js.map +1 -1
  38. package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts +3 -1
  39. package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts.map +1 -1
  40. package/dist/remediate/contractPipeline/phaseCutArtifact.js +3 -1
  41. package/dist/remediate/contractPipeline/phaseCutArtifact.js.map +1 -1
  42. package/dist/remediate/index.d.ts +5 -3
  43. package/dist/remediate/index.d.ts.map +1 -1
  44. package/dist/remediate/index.js +24 -6
  45. package/dist/remediate/index.js.map +1 -1
  46. package/dist/remediate/phases/close.d.ts.map +1 -1
  47. package/dist/remediate/phases/close.js +3 -2
  48. package/dist/remediate/phases/close.js.map +1 -1
  49. package/dist/remediate/quota/hostLimits.d.ts +3 -2
  50. package/dist/remediate/quota/hostLimits.d.ts.map +1 -1
  51. package/dist/remediate/quota/hostLimits.js +2 -2
  52. package/dist/remediate/quota/hostLimits.js.map +1 -1
  53. package/dist/remediate/riskSignal.d.ts +6 -3
  54. package/dist/remediate/riskSignal.d.ts.map +1 -1
  55. package/dist/remediate/riskSignal.js +6 -3
  56. package/dist/remediate/riskSignal.js.map +1 -1
  57. package/dist/remediate/steps/contractPipeline.d.ts +1 -2
  58. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  59. package/dist/remediate/steps/contractPipeline.js +83 -108
  60. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  61. package/dist/remediate/steps/contractPipelinePrompts.js +3 -3
  62. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  63. package/dist/remediate/steps/dispatch.d.ts.map +1 -1
  64. package/dist/remediate/steps/dispatch.js +26 -13
  65. package/dist/remediate/steps/dispatch.js.map +1 -1
  66. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  67. package/dist/remediate/steps/nextStep.js +10 -3
  68. package/dist/remediate/steps/nextStep.js.map +1 -1
  69. package/dist/remediate/steps/rollingSession.d.ts +67 -0
  70. package/dist/remediate/steps/rollingSession.d.ts.map +1 -1
  71. package/dist/remediate/steps/rollingSession.js +124 -1
  72. package/dist/remediate/steps/rollingSession.js.map +1 -1
  73. package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
  74. package/dist/remediate/validation/contractPipeline.js +62 -0
  75. package/dist/remediate/validation/contractPipeline.js.map +1 -1
  76. package/dist/shared/friction/frictionRecord.d.ts +31 -6
  77. package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
  78. package/dist/shared/friction/frictionRecord.js.map +1 -1
  79. package/dist/shared/friction/stepBoundaryCapture.d.ts +4 -1
  80. package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
  81. package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
  82. package/dist/shared/friction/triage.d.ts +30 -5
  83. package/dist/shared/friction/triage.d.ts.map +1 -1
  84. package/dist/shared/friction/triage.js +65 -19
  85. package/dist/shared/friction/triage.js.map +1 -1
  86. package/dist/shared/index.d.ts +6 -3
  87. package/dist/shared/index.d.ts.map +1 -1
  88. package/dist/shared/index.js +5 -2
  89. package/dist/shared/index.js.map +1 -1
  90. package/dist/shared/io/auditToolsPaths.d.ts +15 -1
  91. package/dist/shared/io/auditToolsPaths.d.ts.map +1 -1
  92. package/dist/shared/io/auditToolsPaths.js +23 -3
  93. package/dist/shared/io/auditToolsPaths.js.map +1 -1
  94. package/dist/shared/io/repoRoot.d.ts +28 -0
  95. package/dist/shared/io/repoRoot.d.ts.map +1 -0
  96. package/dist/shared/io/repoRoot.js +39 -0
  97. package/dist/shared/io/repoRoot.js.map +1 -0
  98. package/dist/shared/providers/openAiCompatibleProvider.d.ts.map +1 -1
  99. package/dist/shared/providers/openAiCompatibleProvider.js +68 -17
  100. package/dist/shared/providers/openAiCompatibleProvider.js.map +1 -1
  101. package/dist/shared/providers/providerFactory.d.ts +9 -2
  102. package/dist/shared/providers/providerFactory.d.ts.map +1 -1
  103. package/dist/shared/providers/providerFactory.js +19 -4
  104. package/dist/shared/providers/providerFactory.js.map +1 -1
  105. package/dist/shared/providers/types.d.ts +13 -0
  106. package/dist/shared/providers/types.d.ts.map +1 -1
  107. package/dist/shared/quota/capacity.d.ts +7 -7
  108. package/dist/shared/quota/codexHostConfig.d.ts +24 -0
  109. package/dist/shared/quota/codexHostConfig.d.ts.map +1 -0
  110. package/dist/shared/quota/codexHostConfig.js +49 -0
  111. package/dist/shared/quota/codexHostConfig.js.map +1 -0
  112. package/dist/shared/quota/hostLimits.d.ts +4 -7
  113. package/dist/shared/quota/hostLimits.d.ts.map +1 -1
  114. package/dist/shared/quota/hostLimits.js +18 -11
  115. package/dist/shared/quota/hostLimits.js.map +1 -1
  116. package/dist/shared/quota/types.d.ts +4 -4
  117. package/dist/shared/quota/types.d.ts.map +1 -1
  118. package/dist/shared/quota/types.js +7 -0
  119. package/dist/shared/quota/types.js.map +1 -1
  120. package/dist/shared/types/sessionConfig.d.ts +12 -0
  121. package/dist/shared/types/sessionConfig.d.ts.map +1 -1
  122. package/dist/shared/types/sessionConfig.js.map +1 -1
  123. package/docs/audit-pkg/contracts.md +4 -2
  124. package/docs/audit-pkg/development.md +11 -8
  125. package/docs/audit-pkg/operator-guide.md +3 -3
  126. package/docs/audit-pkg/product.md +1 -1
  127. package/docs/audit-pkg/release.md +15 -12
  128. package/package.json +8 -5
  129. package/remediate-code.mjs +3 -1
  130. package/skills/audit-code/SKILL.md +8 -4
  131. package/skills/audit-code/audit-code.prompt.md +15 -18
  132. package/skills/audit-code/opencode-command-template.txt +4 -5
  133. package/skills/remediate-code/remediate-code.prompt.md +9 -5
  134. package/wrapper/audit-code-wrapper-install-hosts.mjs +1 -1
@@ -72,6 +72,18 @@ export interface OpenAiCompatibleConfig {
72
72
  * provider retries once without it, so leaving it on is safe for any endpoint.
73
73
  */
74
74
  response_format_json?: boolean;
75
+ /**
76
+ * Plumb the worker's canonical JSON Schema into the request as a per-field
77
+ * emit-time constraint (`response_format: {type:"json_schema"}` for OpenAI /
78
+ * vLLM structured outputs, plus `guided_json` / `nvext.guided_json` for NIM /
79
+ * vLLM guided decoding) whenever the dispatch site supplies a schema (CE-004
80
+ * build lever). ON by default (nullish: enabled unless explicitly `false`) — it
81
+ * is ADDITIVE and degrades cleanly: if the endpoint rejects the schema form
82
+ * (HTTP 400/422) the provider retries with a plain `json_object`, then without
83
+ * any `response_format`, so leaving it on is safe for any endpoint. Set `false`
84
+ * to force the weaker `json_object`-only behavior.
85
+ */
86
+ guided_json?: boolean;
75
87
  /** Inline current contents of prompt-referenced files so edits are grounded. Default true. */
76
88
  include_referenced_files?: boolean;
77
89
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sessionConfig.d.ts","sourceRoot":"","sources":["../../../src/shared/types/sessionConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,eAAO,MAAM,cAAc,qJAUjB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3D,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAEjE,eAAO,MAAM,gBAAgB,kCAAmC,CAAC;AACjE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B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C,aAAa,EAAE,aAAa;IAC5B,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,mBAAmB,EAAE,mBAAmB;IACxC,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,aAAa;CAClB,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,mBAAmB;IACnB,OAAO;IACP,UAAU;IACV,kBAAkB;IAClB,qBAAqB;CACb,CAAC;AAuLX;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM;IACN,WAAW;IACX,WAAW;IACX,MAAM;IACN,MAAM;CACE,CAAC;AACX,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"sessionConfig.js","sourceRoot":"","sources":["../../../src/shared/types/sessionConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM;IACN,kBAAkB;IAClB,qBAAqB;IACrB,aAAa;IACb,OAAO;IACP,UAAU;IACV,mBAAmB;IACnB,aAAa;IACb,aAAa;CACL,CAAC;AAIX,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,UAAU,CAAU,CAAC;AAyGjE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,qBAAqB,EAAE,qBAAqB;IAC5C,aAAa,EAAE,aAAa;IAC5B,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,mBAAmB,EAAE,mBAAmB;IACxC,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,aAAa;CAClB,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,mBAAmB;IACnB,OAAO;IACP,UAAU;IACV,kBAAkB;IAClB,qBAAqB;CACb,CAAC;AAuLX;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM;IACN,WAAW;IACX,WAAW;IACX,MAAM;IACN,MAAM;CACE,CAAC;AACX,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC"}
@@ -56,7 +56,9 @@ audit-code validate-results --results /path/to/results.json
56
56
 
57
57
  ## Artifact bundle
58
58
 
59
- The backend stores resumable artifacts under `.audit-tools/audit/`, including:
59
+ The backend stores resumable artifacts under `.audit-tools/audit/`. A
60
+ non-exhaustive sample; the complete registry-backed list (all 32 entries) lives
61
+ in [`spec/audit/artifact-contract.md`](../../spec/audit/artifact-contract.md):
60
62
 
61
63
  - `repo_manifest.json`
62
64
  - `file_disposition.json`
@@ -116,7 +118,7 @@ artifacts are shaped by:
116
118
  Normal packet flow:
117
119
 
118
120
  ```text
119
- audit-code next-step --host-can-dispatch-subagents true
121
+ audit-code next-step --host-can-dispatch-subagents
120
122
  backend prepares dispatch-plan.json
121
123
  conversation launches one worker per dispatch-plan entry
122
124
  worker reads entry.prompt_path
@@ -7,8 +7,9 @@
7
7
  - `examples/`: validated artifact examples
8
8
  - `skills/audit-code/`: canonical prompt and skill-facing instructions
9
9
  - `dispatch/`: packet-dispatch support data
10
- - `tests/`: Node test suite and regression coverage
11
- - `dist/`: checked-in compiled runtime used by packaged installs
10
+ - `tests/`: vitest-based test suite and regression coverage
11
+ - `dist/`: build output (gitignored, not checked in) produced by `npm run build` / the `prepack` script;
12
+ shipped only in the packed npm tarball
12
13
 
13
14
  ## Agent handoff
14
15
 
@@ -102,10 +103,12 @@ ecosystem-specific parser.
102
103
 
103
104
  Before treating a build as production-ready, verify the full review loop in one
104
105
  real host (`prepare-dispatch` → worker reviews each packet → `submit-packet` →
105
- `merge-and-ingest` → `validate`), then run `npm run verify:release` from a clean
106
- checkout. On Windows, runtime validation runs package-manager shims (`npm`,
107
- `npx`, `pnpm`, `yarn`) through the command shell so `.cmd` wrappers execute
108
- reliablykeep that covered when changing runtime command execution. If the
109
- final `audit-report.md` cannot be copied into the target repo due to local
110
- permissions, completion still succeeds and the artifact copy is authoritative.
106
+ `merge-and-ingest` → `validate`), then run the release gate from a clean
107
+ checkout (see [`release.md`](release.md) for what `npm run verify:release`
108
+ covers and when to run it). Keep runtime command execution covered when
109
+ changing it including the Windows package-manager-shim path (see the Windows
110
+ notes in [`operator-guide.md`](operator-guide.md)). If the
111
+ final `audit-report.md` cannot be promoted from `.audit-tools/audit/` to
112
+ `.audit-tools/audit-report.md` due to local permissions, completion still succeeds and the
113
+ pre-promotion copy under `.audit-tools/audit/` is authoritative.
111
114
  </content>
@@ -199,9 +199,9 @@ and `yarn` through the Windows command shell automatically. A runtime
199
199
  `not_confirmed` result can still be environmental when the target repo command
200
200
  starts but cannot write its own build output.
201
201
 
202
- If final report promotion to `<repo-root>/audit-report.md` is blocked by local
203
- permissions, the audit can still complete. Use the artifact-bundle copy of
204
- `audit-report.md` and run `audit-code validate`.
202
+ If final report promotion to `.audit-tools/audit-report.md` is blocked by local
203
+ permissions, the audit can still complete. Use the copy at `.audit-tools/audit/audit-report.md`
204
+ and run `audit-code validate`.
205
205
 
206
206
  Run `audit-code validate` after editing session config so command-template
207
207
  issues fail before a long audit run.
@@ -30,7 +30,7 @@ The supported user-facing surfaces are:
30
30
  5. `audit-code install` for explicit repair or force refresh
31
31
  6. `audit-code` as the repo-local backend fallback
32
32
 
33
- Anything below `dist/index.js` is backend or development interface.
33
+ Anything below `dist/` is backend or development interface.
34
34
 
35
35
  ## Product model
36
36
 
@@ -11,12 +11,15 @@ npm run verify:release
11
11
 
12
12
  `verify:release` covers:
13
13
 
14
- - TypeScript typecheck
15
- - full automated test suite
16
- - linked-install `audit-code` smoke coverage
17
- - packaged-install `audit-code` smoke coverage
18
- - tarball contract verification for shipped assets and runtime entrypoints
19
- - packaged and linked verification of bootstrap install behavior
14
+ - TypeScript typecheck (`check`)
15
+ - dead-code export gate (`check:deadcode`)
16
+ - doc-manifest reconciliation gate (`check:doc-manifest`)
17
+ - full automated test suite (`test`)
18
+ - host-install verification for both bins (`verify:hosts`, `verify:remediate-hosts`)
19
+ - packaged-install smoke coverage for both bins (`smoke:packaged-audit-code`, `smoke:packaged-remediate-code`)
20
+
21
+ Linked-install smoke coverage (`smoke:linked-audit-code`, `smoke:linked-remediate-code`) is available as a
22
+ standalone command but is not part of the `verify:release` chain.
20
23
 
21
24
  For live child-process output while debugging smoke tests:
22
25
 
@@ -42,8 +45,7 @@ Workflow:
42
45
  The workflow:
43
46
 
44
47
  - requests `id-token: write` for npm OIDC exchange
45
- - pins Node `22.14.0`
46
- - pins npm to `11.5.1`
48
+ - pins the Node and npm versions declared in `.github/workflows/publish-package.yml`
47
49
  - runs `npm run verify:release`
48
50
  - previews the packed tarball with `npm pack --dry-run`
49
51
  - publishes with public access and provenance
@@ -51,7 +53,7 @@ The workflow:
51
53
  - verifies that the published version resolves from the registry
52
54
  - uploads `*-npm-logs` artifacts on failure
53
55
 
54
- Routine CI exercises Node `20` and Node `22`.
56
+ Routine CI exercises the Node majors matrixed in `.github/workflows/*.yml` (currently Node `20` and Node `22`).
55
57
 
56
58
  ## Version bump helpers
57
59
 
@@ -75,9 +77,10 @@ Full maintainer flow:
75
77
  npm run release:patch:publish
76
78
  ```
77
79
 
78
- That command checks the worktree, runs the release gate, bumps the version,
79
- commits, tags, pushes `main` and the tag, creates the GitHub Release, waits for
80
- `publish-package.yml`, and confirms the new npm version resolves.
80
+ That command checks the worktree, runs a fast local typecheck gate (`npm run check` — not the full
81
+ `verify:release` suite, which already ran via CI/the `/ship` preflight), bumps the version, commits,
82
+ tags, pushes `main` and the tag, creates the GitHub Release, waits for `publish-package.yml`, and
83
+ confirms the new npm version resolves.
81
84
 
82
85
  Minor and major publish variants:
83
86
 
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "audit-tools",
3
- "version": "0.32.6",
3
+ "version": "0.32.8",
4
4
  "private": false,
5
+ "license": "ISC",
5
6
  "description": "Portable hybrid code auditing + remediation orchestrators for arbitrary repositories.",
6
7
  "type": "module",
7
8
  "bin": {
@@ -38,9 +39,11 @@
38
39
  "postinstall": "node scripts/postinstall.mjs",
39
40
  "build": "tsc -p tsconfig.json",
40
41
  "check": "tsc -p tsconfig.json --noEmit",
42
+ "test:doc-contract": "vitest run tests/audit/release-contract.test.mjs tests/audit/priority-chain-doc-sync.test.mjs tests/audit/file-lock-doc-sync.test.mjs tests/audit/host-asset-renderer-drift.test.mjs",
41
43
  "test": "npm run build && vitest run",
42
44
  "test:single": "npm run build && vitest run",
43
- "verify:release": "npm run check && npm run check:deadcode && npm run check:doc-manifest && npm test && npm run verify:hosts && npm run verify:remediate-hosts && npm run smoke:packaged-audit-code && npm run smoke:packaged-remediate-code",
45
+ "verify:checks": "npm run check && npm run check:deadcode && npm run check:doc-manifest && npm run build && npm run verify:hosts && npm run verify:remediate-hosts && npm run smoke:packaged-audit-code && npm run smoke:packaged-remediate-code",
46
+ "verify:release": "npm run verify:checks && vitest run",
44
47
  "check:deadcode": "knip --no-config-hints",
45
48
  "check:doc-manifest": "node scripts/check-doc-manifest.mjs",
46
49
  "verify:hosts": "node scripts/audit/verify-hosts.mjs",
@@ -68,7 +71,8 @@
68
71
  "commander": "^13.0.0",
69
72
  "smol-toml": "^1.6.1",
70
73
  "yaml": "^2.9.0",
71
- "zod": "^3.25.76"
74
+ "zod": "^3.25.76",
75
+ "zod-to-json-schema": "^3.24.6"
72
76
  },
73
77
  "devDependencies": {
74
78
  "@types/node": "^24.3.0",
@@ -78,8 +82,7 @@
78
82
  "tsx": "^4.19.0",
79
83
  "typescript": "^5.9.2",
80
84
  "vitest": "^3.0.0",
81
- "web-tree-sitter": "^0.25.10",
82
- "zod-to-json-schema": "^3.24.6"
85
+ "web-tree-sitter": "^0.25.10"
83
86
  },
84
87
  "repository": {
85
88
  "type": "git",
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  // Thin wrapper: locates the built dist and delegates to it.
3
- // Supports: run, install, ensure, validate
3
+ // Interprets the installer verbs (install, ensure, verify-install, install-host)
4
+ // locally via the B2 bootstrap; every other verb (e.g. next-step) is forwarded
5
+ // to dist/remediate/index.js.
4
6
 
5
7
  import { fileURLToPath } from "url";
6
8
  import { pathToFileURL } from "url";
@@ -66,19 +66,17 @@ can dispatch to *right now* on every `next-step` call so the backend sizes revie
66
66
  packets to your real model instead of a conservative 32k floor.
67
67
 
68
68
  ```bash
69
- audit-code next-step --host-max-active-subagents 4 --host-models '[{"rank":"small","context_tokens":32000,"output_tokens":8000},{"rank":"standard","context_tokens":200000,"output_tokens":32000},{"rank":"deep","context_tokens":200000,"output_tokens":64000}]'
69
+ audit-code next-step --host-models '[{"rank":"small","context_tokens":32000,"output_tokens":8000},{"rank":"standard","context_tokens":200000,"output_tokens":32000},{"rank":"deep","context_tokens":200000,"output_tokens":64000}]'
70
70
  ```
71
71
 
72
72
  Or with a single dispatch model:
73
73
 
74
74
  ```bash
75
- audit-code next-step --host-max-active-subagents 4 --host-context-tokens 200000 --host-output-tokens 32000
75
+ audit-code next-step --host-context-tokens 200000 --host-output-tokens 32000
76
76
  ```
77
77
 
78
78
  Key flags:
79
79
 
80
- - `--host-max-active-subagents` — parallel subagent capacity (via the `Agent`/`task`
81
- tool). Without it the backend assumes serial dispatch.
82
80
  - `--host-models` — ordered JSON array (lowest rank first) of models you can dispatch
83
81
  subagents to *right now*, one entry per relative rank
84
82
  (`"small"`, `"standard"`, `"deep"`). Ranks are relative capability labels — never
@@ -87,6 +85,12 @@ Key flags:
87
85
  - `--host-context-tokens` / `--host-output-tokens` — single-model shorthand. When
88
86
  `--host-models` is also given, the roster wins.
89
87
 
88
+ Do **not** report a parallel-subagent count — the backend owns concurrency (its
89
+ token-budget gate plus any hard host cap it can detect, e.g. Codex
90
+ `[agents].max_threads`), and runs uncapped when it detects none. An operator with
91
+ a genuine fixed machine limit may pass `--host-max-active-subagents N` as an
92
+ optional override; it is never a value to guess.
93
+
90
94
  When a step prompt tells you to continue, repeat `audit-code next-step` with the
91
95
  same capability flags and follow only the newly returned `prompt_path`. Stop when
92
96
  the current step prompt tells you to stop.
@@ -29,9 +29,6 @@ handshake**: report what you can dispatch to *right now* on every `next-step`
29
29
  call, so the backend sizes review packets to your real model instead of a
30
30
  conservative 32k floor. Report:
31
31
 
32
- - `--host-max-active-subagents` — how many review subagents you can run in
33
- parallel (via the `Agent`/`task` tool). Without it the backend assumes serial
34
- dispatch and sizes waves to one packet at a time.
35
32
  - `--host-models` — an ordered JSON array (lowest rank first) of the models you
36
33
  can dispatch subagents to *right now*, one entry per relative rank:
37
34
  `{"rank": "small"|"standard"|"deep", "context_tokens": N, "output_tokens": N}`.
@@ -48,25 +45,31 @@ conservative 32k floor. Report:
48
45
  model. When `--host-models` is also given, the roster wins. Omit both and
49
46
  dispatch falls back to the conservative 32k default (many tiny packets).
50
47
 
48
+ Do **not** report a parallel-subagent count. The backend owns concurrency: it
49
+ sizes how many subagents run at once from its own token-budget gate and from any
50
+ hard host cap it can detect (e.g. Codex's `~/.codex/config.toml`
51
+ `[agents].max_threads`). When it detects no hard cap it runs without one — you
52
+ never supply or guess a number. (An operator with a genuine fixed parallel limit
53
+ for this machine may pass `--host-max-active-subagents N` as an optional
54
+ override; it is not part of the handshake and is never something to invent.)
55
+
51
56
  ```bash
52
- audit-code next-step --host-max-active-subagents 4 --host-models '[{"rank":"small","context_tokens":32000,"output_tokens":8000},{"rank":"standard","context_tokens":200000,"output_tokens":32000},{"rank":"deep","context_tokens":200000,"output_tokens":64000}]'
57
+ audit-code next-step --host-models '[{"rank":"small","context_tokens":32000,"output_tokens":8000},{"rank":"standard","context_tokens":200000,"output_tokens":32000},{"rank":"deep","context_tokens":200000,"output_tokens":64000}]'
53
58
  ```
54
59
 
55
60
  Or with a single dispatch model:
56
61
 
57
62
  ```bash
58
- audit-code next-step --host-max-active-subagents 4 --host-context-tokens 200000 --host-output-tokens 32000
63
+ audit-code next-step --host-context-tokens 200000 --host-output-tokens 32000
59
64
  ```
60
65
 
61
- `4` is a safe concurrency default for this host; raise it for more parallelism or
62
- lower it under rate-limit pressure. The backend's learned quota adapts from
63
- there. The token values should match the window of the model(s) dispatching the
64
- packets (e.g. 200000 / 32000 for a 200k-context model).
66
+ The token values should match the window of the model(s) dispatching the packets
67
+ (e.g. 200000 / 32000 for a 200k-context model).
65
68
 
66
69
  When developing `audit-tools` itself, from the repo root use:
67
70
 
68
71
  ```bash
69
- node audit-code.mjs next-step --host-max-active-subagents 4 --host-context-tokens 200000 --host-output-tokens 32000
72
+ node audit-code.mjs next-step --host-context-tokens 200000 --host-output-tokens 32000
70
73
  ```
71
74
 
72
75
  Read the returned JSON only far enough to find `prompt_path`, then read and
@@ -98,14 +101,8 @@ directory. It contains `repo_root`, `auditable_file_count`, `git_available`, and
98
101
  - If `mis_scope_smells` is empty, the echo is informational only — continue
99
102
  automatically without interrupting the workflow.
100
103
 
101
- Use MCP tools only as a compatibility adapter when direct shell access to
102
- `audit-code next-step` is unavailable. The MCP `start_audit` and
103
- `continue_audit` tools return the same one-step contract; they are not a
104
- separate orchestration path.
105
-
106
104
  When a step prompt tells you to continue, run `audit-code next-step` again with
107
- the same capability flags (`--host-max-active-subagents`, `--host-models`,
108
- `--host-context-tokens`, `--host-output-tokens`) and follow only the newly
109
- returned `prompt_path`.
105
+ the same capability flags (`--host-models`, `--host-context-tokens`,
106
+ `--host-output-tokens`) and follow only the newly returned `prompt_path`.
110
107
 
111
108
  Stop when the current step prompt tells you to stop.
@@ -3,11 +3,10 @@
3
3
  Use `audit-code next-step` as the primary interface to the audit workflow.
4
4
 
5
5
  1. Run `audit-code next-step` directly when shell access is available.
6
- 2. If MCP is your only available interface, call `start_audit` or `continue_audit`; both return the same one-step contract.
7
- 3. Read `prompt_content` in the response and follow it.
8
- 4. When a step completes (not blocked), run `audit-code next-step` again or call `continue_audit` as the compatibility adapter.
9
- 5. Stop when the step instructions say to stop.
6
+ 2. Read `prompt_content` in the response and follow it.
7
+ 3. When a step completes (not blocked), run `audit-code next-step` again.
8
+ 4. Stop when the step instructions say to stop.
10
9
 
11
10
  Use the `task` tool or equivalent for subagent dispatch when the step tells you to fan out review work.
12
11
 
13
- If neither shell access nor `start_audit` is available, stop and report that no next-step interface is connected.
12
+ If shell access to `audit-code next-step` is unavailable, stop and report that no next-step interface is connected.
@@ -55,9 +55,13 @@ Every `next-step` call is also the **capability handshake**: report what you can
55
55
  dispatch to *right now* so the backend sizes remediation waves and per-worker
56
56
  context to your real model instead of a conservative 32k floor. Report:
57
57
 
58
- - `--host-can-dispatch-subagents` / `--host-max-concurrent` — whether you can run
59
- callable subagents and how many in parallel. Without them the backend assumes
60
- serial dispatch.
58
+ - `--host-can-dispatch-subagents` — whether you can run callable subagents at all
59
+ (via the `Agent`/`task` tool). Without it the backend runs remediation serially.
60
+ Do **not** report a parallel-worker count: the backend owns concurrency (its
61
+ token-budget gate plus any hard host cap it can detect, e.g. Codex
62
+ `[agents].max_threads`) and runs uncapped when it detects none. An operator with
63
+ a genuine fixed machine limit may pass `--host-max-concurrent N` as an optional
64
+ override; it is never a value to guess.
61
65
  - `--host-models` — an ordered JSON array (lowest rank first) of the models you
62
66
  can dispatch workers to *right now*, one entry per relative rank:
63
67
  `{"rank": "small"|"standard"|"deep", "context_tokens": N, "output_tokens": N}`.
@@ -74,13 +78,13 @@ context to your real model instead of a conservative 32k floor. Report:
74
78
  value.
75
79
 
76
80
  ```bash
77
- remediate-code next-step --input <path> --host-max-concurrent 4 --host-models '[{"rank":"standard","context_tokens":200000,"output_tokens":32000},{"rank":"deep","context_tokens":200000,"output_tokens":64000}]'
81
+ remediate-code next-step --input <path> --host-can-dispatch-subagents --host-models '[{"rank":"standard","context_tokens":200000,"output_tokens":32000},{"rank":"deep","context_tokens":200000,"output_tokens":64000}]'
78
82
  ```
79
83
 
80
84
  Or with a single dispatch model:
81
85
 
82
86
  ```bash
83
- remediate-code next-step --input <path> --host-max-concurrent 4 --host-context-tokens 200000 --host-output-tokens 32000
87
+ remediate-code next-step --input <path> --host-can-dispatch-subagents --host-context-tokens 200000 --host-output-tokens 32000
84
88
  ```
85
89
 
86
90
  Read the returned JSON only far enough to find `prompt_path`, then read and
@@ -104,7 +104,7 @@ function toRepoRelativePath(root, targetPath) {
104
104
  return value.length > 0 ? value : '.';
105
105
  }
106
106
 
107
- function buildInstallDirective(relativePromptPath) {
107
+ export function buildInstallDirective(relativePromptPath) {
108
108
  return [
109
109
  INSTALL_MARKER_START,
110
110
  '## /audit-code',