auditor-lambda 0.3.4 → 0.3.5

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.
@@ -59,7 +59,9 @@ Current implementation note:
59
59
 
60
60
  - `claude-code`, `opencode`, `subprocess-template`, and `vscode-task` are backend compatibility bridges
61
61
  - they are not the intended default owner of semantic review when the active conversation agent can handle the work directly
62
- - to activate one of those bridges for semantic review, re-run the wrapper with an explicit `--provider <name>` flag
62
+ - to activate one of those bridges for semantic review, either set `provider`
63
+ in this file intentionally or re-run the wrapper with an explicit
64
+ `--provider <name>` flag
63
65
 
64
66
  ### `timeout_ms`
65
67
 
@@ -141,11 +143,17 @@ This remains the safest fallback default while the semantic-review workflow is b
141
143
  Fields:
142
144
 
143
145
  - `command`: optional override for the Claude Code executable
144
- - `extra_args`: optional extra arguments appended before the built-in permission-skipping flag
146
+ - `extra_args`: optional extra arguments for Claude Code
147
+ - `dangerously_skip_permissions`: optional trusted-automation opt-in. When
148
+ `true`, the bridge appends `--dangerously-skip-permissions`. Leave this
149
+ unset for the safer default.
145
150
 
146
151
  Current implementation support only.
147
152
 
148
- Use this only when you intentionally want the backend fallback CLI to bridge review into an external Claude Code process, together with `audit-code --provider claude-code`.
153
+ Use this only when you intentionally want the backend fallback CLI to bridge
154
+ review into an external Claude Code process, either by setting
155
+ `provider: "claude-code"` in this file or by running
156
+ `audit-code --provider claude-code`.
149
157
 
150
158
  ### `opencode`
151
159
 
@@ -63,9 +63,11 @@ audit-code --provider subprocess-template
63
63
  audit-code --provider vscode-task
64
64
  ```
65
65
 
66
- Those `--provider` invocations are the explicit bridge handoff point.
67
- Without an explicit `--provider` flag, the backend stops at the semantic-review
68
- boundary and exposes scoped task artifacts for the slash-command orchestrator.
66
+ Those `--provider` invocations are an explicit bridge handoff point.
67
+ Without an explicit `--provider` flag or a non-local provider in
68
+ `.audit-artifacts/session-config.json`, the backend stops at the
69
+ semantic-review boundary and exposes scoped task artifacts for the
70
+ slash-command orchestrator.
69
71
 
70
72
  ## Auto resolution rule
71
73
 
@@ -15,7 +15,8 @@ The implemented design is a compatibility-preserving packet layer:
15
15
  - group related task records into worker-facing review packets
16
16
  - make each worker read a coherent file set once and review multiple lenses in
17
17
  one pass
18
- - write one validated result file per underlying task
18
+ - submit packet results through the backend so only assigned result files are
19
+ written
19
20
 
20
21
  ## Current Product Model
21
22
 
@@ -42,9 +43,11 @@ The refactor now includes:
42
43
  - packet-first pending-task ordering for provider-assisted batches
43
44
  - tiny homogeneous test-file batching before dispatch
44
45
  - graph-edge expansion from import, call, and reference edges
45
- - packet prompts that assign multiple task outputs to one worker
46
+ - packet prompts that assign multiple task results to one worker
47
+ - backend-owned packet submission that validates before writing result files
48
+ - isolated large-file packet mode with mechanical anchors for targeted review
46
49
  - validation and merge checks for missing, duplicate, unknown, malformed, or
47
- out-of-scope task results
50
+ out-of-scope task results, including swapped result files
48
51
  - compact `prepare-dispatch` and `merge-and-ingest` JSON envelopes
49
52
  - terse worker completion convention:
50
53
  `valid: <packet_id>, findings=<n>`
@@ -75,7 +78,10 @@ Packet mode adds or updates these artifacts:
75
78
  - `review_packets.json`
76
79
  - `audit_plan_metrics.json`
77
80
  - `<artifacts_dir>/runs/<run_id>/dispatch-plan.json`
81
+ - `<artifacts_dir>/runs/<run_id>/dispatch-result-map.json`
78
82
  - `<artifacts_dir>/runs/<run_id>/task-results/*.prompt.md`
83
+ - `<artifacts_dir>/runs/<run_id>/task-results/*.anchors.json`, only for
84
+ isolated large-file packets
79
85
  - `<artifacts_dir>/runs/<run_id>/task-results/*.json`
80
86
  - `<artifacts_dir>/runs/<run_id>/dispatch-warnings.json`, only when needed
81
87
 
@@ -86,7 +92,7 @@ remain backend-owned.
86
92
 
87
93
  Current in-repo verification:
88
94
 
89
- - `npm test` passes with 143 tests.
95
+ - `npm test` passes with 148 tests.
90
96
 
91
97
  Relevant test coverage:
92
98
 
@@ -95,8 +101,11 @@ Relevant test coverage:
95
101
  - graph-connected packet merging
96
102
  - tiny test-file batching
97
103
  - packet prompt generation
98
- - packet merge compatibility with the legacy result array
104
+ - packet submission and merge compatibility with the legacy result array
99
105
  - missing-result blocking
106
+ - swapped-result blocking
107
+ - collision-proof assigned result paths
108
+ - isolated large-file anchor generation
100
109
  - path-heuristic regressions
101
110
  - graph extraction from source contents
102
111
  - selective deepening triggers and packet refresh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auditor-lambda",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "private": false,
5
5
  "description": "Portable hybrid code-auditing framework for arbitrary repositories.",
6
6
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Autonomous local loop code auditing - advances deterministic audit state, delegates bounded review tasks, and ingests validated results
3
3
  argument-hint: [target-dir]
4
- allowed-tools: [Read, Write, Bash, Glob, Grep, Agent]
4
+ allowed-tools: [Read, Bash, Glob, Grep, Agent]
5
5
  ---
6
6
 
7
7
  # `/audit-code` Execution Directive
@@ -81,14 +81,19 @@ In a single message, launch one Agent/subagent call per dispatch-plan entry:
81
81
  Agent({ description: entry.description, prompt: "Read and follow the audit instructions in: " + entry.prompt_path })
82
82
  ```
83
83
 
84
+ If the host supports per-subagent tool restrictions, give review subagents no
85
+ Write tool and allow shell access only for the `audit-code submit-packet`
86
+ command printed in their prompt.
87
+
84
88
  All subagent calls should be launched together. Wait for them to finish.
85
89
 
86
90
  Subagents own bounded semantic review. They must read only their prompt and
87
- assigned files, write exactly the requested audit result JSON to `output_path`,
88
- run the validation command in their prompt, retry up to 3 times if validation
89
- fails, and stop. They must not edit source files, remediate findings, create
90
- extra task results, run unrelated audits, or write the worker `result.json`
91
- control envelope.
91
+ assigned files, produce the requested `AuditResult[]`, pipe it to the
92
+ `submit-packet` command in their prompt, retry up to 3 times if submission
93
+ fails, and stop. The backend command validates and writes the packet-owned
94
+ result artifacts. They must not use direct file writes, edit source files,
95
+ remediate findings, create extra task results, run unrelated audits, or write
96
+ the worker `result.json` control envelope.
92
97
 
93
98
  Then run:
94
99