auditor-lambda 0.10.7 → 0.11.0

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 (46) hide show
  1. package/README.md +5 -0
  2. package/audit-code-wrapper-install-hosts.mjs +1 -1
  3. package/audit-code-wrapper-lib.mjs +5 -5
  4. package/audit-code-wrapper-opencode.mjs +2 -3
  5. package/dist/cli/advanceAuditCommand.js +2 -2
  6. package/dist/cli/args.d.ts +3 -3
  7. package/dist/cli/args.js +5 -8
  8. package/dist/cli/dispatch.d.ts +1 -0
  9. package/dist/cli/dispatch.js +24 -5
  10. package/dist/cli/nextStepCommand.js +2 -4
  11. package/dist/cli/prompts.js +7 -6
  12. package/dist/cli/resynthesizeCommand.d.ts +1 -0
  13. package/dist/cli/resynthesizeCommand.js +50 -0
  14. package/dist/cli/runToCompletion.js +2 -2
  15. package/dist/cli.js +5 -1
  16. package/dist/extractors/fsIntake.js +1 -1
  17. package/dist/extractors/pathPatterns.js +1 -1
  18. package/dist/io/artifacts.d.ts +3 -2
  19. package/dist/io/artifacts.js +6 -4
  20. package/dist/io/runArtifacts.js +1 -1
  21. package/dist/orchestrator/advance.js +6 -0
  22. package/dist/orchestrator/dependencyMap.js +7 -0
  23. package/dist/orchestrator/designReviewPrompt.js +31 -10
  24. package/dist/orchestrator/executors.js +6 -0
  25. package/dist/orchestrator/ingestionExecutors.js +29 -1
  26. package/dist/orchestrator/intentCheckpointExecutor.d.ts +3 -0
  27. package/dist/orchestrator/intentCheckpointExecutor.js +29 -0
  28. package/dist/orchestrator/lensSelection.d.ts +32 -0
  29. package/dist/orchestrator/lensSelection.js +69 -0
  30. package/dist/orchestrator/planningExecutors.js +18 -3
  31. package/dist/orchestrator.d.ts +1 -1
  32. package/dist/orchestrator.js +3 -4
  33. package/dist/prompts/renderWorkerPrompt.js +6 -0
  34. package/dist/providers/claudeCodeProvider.js +1 -1
  35. package/dist/quota/index.d.ts +5 -3
  36. package/dist/quota/index.js +1 -1
  37. package/dist/reporting/synthesis.d.ts +10 -0
  38. package/dist/reporting/synthesis.js +23 -0
  39. package/dist/reporting/synthesisNarrativePrompt.js +3 -1
  40. package/docs/development.md +6 -0
  41. package/package.json +2 -1
  42. package/schemas/audit_findings.schema.json +14 -1
  43. package/schemas/dispatch_quota.schema.json +86 -2
  44. package/schemas/finding.schema.json +14 -1
  45. package/scripts/postinstall.mjs +1 -2
  46. package/skills/audit-code/audit-code.prompt.md +1 -1
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "source": {
58
58
  "type": "string",
59
- "enum": ["explicit_config", "cli_flags", "known_metadata", "learned", "default"],
59
+ "enum": ["explicit_config", "cli_flags", "known_metadata", "provider_default", "learned", "default"],
60
60
  "description": "Where the resolved limits came from."
61
61
  },
62
62
  "host_concurrency_limit": {
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "source": {
77
77
  "type": "string",
78
- "enum": ["cli_flags", "session_config", "environment"]
78
+ "enum": ["cli_flags", "host_reported", "session_config", "environment"]
79
79
  },
80
80
  "description": {
81
81
  "type": "string",
@@ -98,6 +98,90 @@
98
98
  "format": "date-time",
99
99
  "description": "If non-null, the host should wait until this timestamp before launching the next wave."
100
100
  },
101
+ "binding_cap": {
102
+ "type": "string",
103
+ "enum": ["rpm", "tpm", "learned", "fallback", "first_contact", "cooldown", "host_concurrency", "none"],
104
+ "description": "The most constraining cap across capacity pools."
105
+ },
106
+ "capacity_pools": {
107
+ "type": "array",
108
+ "description": "Per-pool allocation summaries when dispatch capacity was computed across one or more pools.",
109
+ "items": {
110
+ "type": "object",
111
+ "required": [
112
+ "pool_id",
113
+ "slots",
114
+ "model",
115
+ "confidence",
116
+ "source",
117
+ "resolved_limits",
118
+ "host_concurrency_limit",
119
+ "cooldown_until",
120
+ "estimated_wave_tokens",
121
+ "binding_cap"
122
+ ],
123
+ "additionalProperties": false,
124
+ "properties": {
125
+ "pool_id": { "type": "string", "minLength": 1 },
126
+ "slots": { "type": "integer", "minimum": 1 },
127
+ "model": { "type": ["string", "null"] },
128
+ "confidence": { "type": "string", "enum": ["high", "medium", "low"] },
129
+ "source": {
130
+ "type": "string",
131
+ "enum": ["explicit_config", "cli_flags", "known_metadata", "provider_default", "learned", "default"]
132
+ },
133
+ "resolved_limits": {
134
+ "type": "object",
135
+ "required": [
136
+ "context_tokens",
137
+ "output_tokens",
138
+ "requests_per_minute",
139
+ "input_tokens_per_minute",
140
+ "output_tokens_per_minute"
141
+ ],
142
+ "additionalProperties": false,
143
+ "properties": {
144
+ "context_tokens": { "type": "integer", "minimum": 1 },
145
+ "output_tokens": { "type": "integer", "minimum": 1 },
146
+ "requests_per_minute": { "type": ["integer", "null"], "minimum": 1 },
147
+ "input_tokens_per_minute": { "type": ["integer", "null"], "minimum": 1 },
148
+ "output_tokens_per_minute": { "type": ["integer", "null"], "minimum": 1 }
149
+ }
150
+ },
151
+ "host_concurrency_limit": {
152
+ "type": ["object", "null"],
153
+ "required": ["active_subagents", "source", "description"],
154
+ "additionalProperties": false,
155
+ "properties": {
156
+ "active_subagents": { "type": "integer", "minimum": 1 },
157
+ "source": {
158
+ "type": "string",
159
+ "enum": ["cli_flags", "host_reported", "session_config", "environment"]
160
+ },
161
+ "description": { "type": "string", "minLength": 1 }
162
+ }
163
+ },
164
+ "cooldown_until": { "type": ["string", "null"], "format": "date-time" },
165
+ "estimated_wave_tokens": { "type": "integer", "minimum": 0 },
166
+ "binding_cap": {
167
+ "type": "string",
168
+ "enum": ["rpm", "tpm", "learned", "fallback", "first_contact", "cooldown", "host_concurrency", "none"]
169
+ },
170
+ "quota_source_snapshot": {
171
+ "type": ["object", "null"],
172
+ "additionalProperties": false,
173
+ "properties": {
174
+ "remaining_pct": { "type": ["number", "null"] },
175
+ "reset_at": { "type": ["string", "null"], "format": "date-time" },
176
+ "requests_remaining": { "type": ["integer", "null"] },
177
+ "tokens_remaining": { "type": ["integer", "null"] },
178
+ "captured_at": { "type": "string", "format": "date-time" },
179
+ "source": { "type": "string" }
180
+ }
181
+ }
182
+ }
183
+ }
184
+ },
101
185
  "quota_source_snapshot": {
102
186
  "type": ["object", "null"],
103
187
  "description": "Real-time usage snapshot from a QuotaSource, if available.",
@@ -59,7 +59,20 @@
59
59
  "minItems": 1,
60
60
  "items": { "type": "string" }
61
61
  },
62
- "theme_id": { "type": "string" }
62
+ "theme_id": { "type": "string" },
63
+ "contract_goal_id": { "type": "string" },
64
+ "contract_obligation_ids": {
65
+ "type": "array",
66
+ "items": { "type": "string" }
67
+ },
68
+ "verification_obligation_ids": {
69
+ "type": "array",
70
+ "items": { "type": "string" }
71
+ },
72
+ "targeted_commands": {
73
+ "type": "array",
74
+ "items": { "type": "string" }
75
+ }
63
76
  },
64
77
  "additionalProperties": false
65
78
  }
@@ -41,8 +41,7 @@ const OPENCODE_AUDIT_EXTERNAL_DIRECTORY_PERMISSION = { '*': 'allow' };
41
41
  const OPENCODE_AUDIT_EDIT_PERMISSION = {
42
42
  '*': 'ask',
43
43
  '.audit-code/**': 'allow',
44
- '.audit-artifacts/**': 'allow',
45
- 'audit-report.md': 'allow',
44
+ '.audit-tools/**': 'allow',
46
45
  };
47
46
 
48
47
  const OPENCODE_AUDIT_BASH_PERMISSION = {
@@ -58,7 +58,7 @@ If the returned step is a dispatch step, before launching subagents check
58
58
  immediately.
59
59
 
60
60
  After the **first** `next-step` (the intake step) completes, confirm the audit
61
- scope before proceeding. Read `scope_summary.json` from the `.audit-artifacts/`
61
+ scope before proceeding. Read `scope_summary.json` from the `.audit-tools/audit/`
62
62
  directory. It contains `repo_root`, `auditable_file_count`, `git_available`, and
63
63
  `mis_scope_smells`. Then:
64
64