solidity-argus 0.5.9 → 0.6.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.
- package/AGENTS.md +9 -2
- package/README.md +28 -21
- package/package.json +2 -2
- package/skills/INVENTORY.md +14 -1
- package/skills/README.md +4 -2
- package/skills/references/attack-vector-deck/SKILL.md +62 -0
- package/skills/specialist-profiles/access-control-specialist/SKILL.md +31 -0
- package/skills/specialist-profiles/economic-security/SKILL.md +31 -0
- package/skills/specialist-profiles/execution-trace/SKILL.md +31 -0
- package/skills/specialist-profiles/first-principles/SKILL.md +31 -0
- package/skills/specialist-profiles/invariant/SKILL.md +31 -0
- package/skills/specialist-profiles/math-precision/SKILL.md +31 -0
- package/skills/specialist-profiles/periphery/SKILL.md +31 -0
- package/skills/specialist-profiles/vector-scan/SKILL.md +28 -0
- package/src/agents/argus-prompt.ts +48 -7
- package/src/agents/audit-specialist-prompt.ts +76 -0
- package/src/agents/pythia-prompt.ts +1 -1
- package/src/agents/scribe-prompt.ts +5 -0
- package/src/agents/sentinel-prompt.ts +5 -0
- package/src/agents/themis-prompt.ts +3 -0
- package/src/config/schema.ts +2 -0
- package/src/constants/defaults.ts +1 -0
- package/src/create-hooks.ts +18 -8
- package/src/create-tools.ts +2 -0
- package/src/features/audit-enforcer/audit-enforcer.ts +2 -16
- package/src/features/persistent-state/run-finalizer.ts +94 -1
- package/src/hooks/config-handler.ts +23 -0
- package/src/hooks/system-prompt-hook.ts +56 -2
- package/src/hooks/tool-tracking-hook.ts +75 -6
- package/src/shared/agent-names.ts +1 -0
- package/src/shared/key-tools.ts +9 -2
- package/src/state/adapters.ts +1 -1
- package/src/state/projectors.ts +50 -0
- package/src/state/schemas.ts +86 -1
- package/src/state/types.ts +24 -1
- package/src/tools/forge-coverage-tool.ts +31 -1
- package/src/tools/record-finding-tool.ts +7 -1
- package/src/tools/report-generator-tool.ts +28 -2
- package/src/tools/slither-tool.ts +6 -22
- package/src/tools/themis-disposition-tool.ts +46 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type ToolContext, tool } from "@opencode-ai/plugin"
|
|
2
|
+
|
|
3
|
+
type ThemisDispositionStatus = "approved" | "remediated" | "overridden"
|
|
4
|
+
|
|
5
|
+
type ThemisDispositionArgs = {
|
|
6
|
+
status: ThemisDispositionStatus
|
|
7
|
+
verdict_json: string
|
|
8
|
+
notes?: string
|
|
9
|
+
justification?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function parseVerdict(verdictJson: string): unknown {
|
|
13
|
+
try {
|
|
14
|
+
return JSON.parse(verdictJson)
|
|
15
|
+
} catch (error) {
|
|
16
|
+
const message = error instanceof Error ? error.message : String(error)
|
|
17
|
+
throw new Error(`Invalid Themis verdict JSON: ${message}`)
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function executeThemisDisposition(args: ThemisDispositionArgs, context: ToolContext) {
|
|
22
|
+
context.metadata({ title: `Themis disposition: ${args.status}` })
|
|
23
|
+
return {
|
|
24
|
+
success: true,
|
|
25
|
+
themisDisposition: {
|
|
26
|
+
status: args.status,
|
|
27
|
+
verdict: parseVerdict(args.verdict_json),
|
|
28
|
+
...(args.notes ? { notes: args.notes } : {}),
|
|
29
|
+
...(args.justification ? { justification: args.justification } : {}),
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const themisDispositionTool = tool({
|
|
35
|
+
description:
|
|
36
|
+
"Record Argus' resolved disposition for a Themis quality-gate verdict: approved, remediated, or overridden.",
|
|
37
|
+
args: {
|
|
38
|
+
status: tool.schema.enum(["approved", "remediated", "overridden"]),
|
|
39
|
+
verdict_json: tool.schema.string(),
|
|
40
|
+
notes: tool.schema.string().optional(),
|
|
41
|
+
justification: tool.schema.string().optional(),
|
|
42
|
+
},
|
|
43
|
+
async execute(args, context) {
|
|
44
|
+
return JSON.stringify(executeThemisDisposition(args, context))
|
|
45
|
+
},
|
|
46
|
+
})
|