deepbom 1.96.14 → 1.97.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/README.md +15 -8
- package/bin/deepbom.mjs +107 -67
- package/package.json +2 -1
- package/pkg/release-manifest.json +3 -3
- package/skills/deepbom/SKILL.md +83 -0
- package/skills/deepbom/agents/openai.yaml +7 -0
- package/skills/deepbom/references/capability-selection.md +16 -0
- package/skills/deepbom/references/evidence-semantics.md +20 -0
- package/skills/deepbom/references/failure-recovery.md +9 -0
- package/skills/deepbom/scripts/verify-deepbom.mjs +19 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deepbom",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.97.0",
|
|
4
4
|
"mcpName": "io.github.JunHwan-Kwon/deepbom",
|
|
5
5
|
"description": "Local multi-format deployment-artifact analysis for on-device AI models",
|
|
6
6
|
"type": "module",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"bin/",
|
|
12
12
|
"pkg/",
|
|
13
|
+
"skills/deepbom/",
|
|
13
14
|
"README.md",
|
|
14
15
|
"LICENSE"
|
|
15
16
|
],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "deepbom.npm_release.v1",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.97.0",
|
|
4
4
|
"source": {
|
|
5
|
-
"git_commit": "
|
|
5
|
+
"git_commit": "95b2218267ba6eeaf54945344aa3d7c945ef7fdd",
|
|
6
6
|
"git_state": "clean",
|
|
7
7
|
"distribution": "public_channel"
|
|
8
8
|
},
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"spdx": "Apache-2.0",
|
|
19
19
|
"file": "LICENSE"
|
|
20
20
|
},
|
|
21
|
-
"public_bundle_input_count":
|
|
21
|
+
"public_bundle_input_count": 157,
|
|
22
22
|
"supported_inputs": [
|
|
23
23
|
"tflite",
|
|
24
24
|
"onnx",
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deepbom
|
|
3
|
+
description: Statically audit serialized AI deployment artifacts with the local DEEPBOM CLI. Use for TFLite, ONNX, Core ML, ExecuTorch, GGUF, or SafeTensors deployment review; MAC and symbolic-shape coverage; quantization contracts; memory feasibility; accelerator eligibility; artifact diff; graph export; SARIF; or CycloneDX 1.7 ML-BOM generation. Do not use for training checkpoints, measured latency, task accuracy, or claims about actual runtime placement without imported evidence.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Audit deployment artifacts with DEEPBOM
|
|
7
|
+
|
|
8
|
+
Run DEEPBOM locally. Never upload artifact bytes or invent a hosted DEEPBOM endpoint.
|
|
9
|
+
|
|
10
|
+
## Start with discovery
|
|
11
|
+
|
|
12
|
+
Use the release pinned by this skill:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx -y deepbom@1.97.0 capabilities --format agent-json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Treat that machine document as authoritative for commands, supported inputs, scan modes, targets, outputs, and exit codes. Read `references/capability-selection.md` when deciding whether the task belongs to DEEPBOM.
|
|
19
|
+
|
|
20
|
+
## Audit
|
|
21
|
+
|
|
22
|
+
Start with the bounded human result:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx -y deepbom@1.97.0 audit "./model.onnx" --summary
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Then request only the evidence needed by the question:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx -y deepbom@1.97.0 audit "./model.onnx" --section quantization --json
|
|
32
|
+
npx -y deepbom@1.97.0 audit "./model.onnx" --pointer /mac_assessment --json
|
|
33
|
+
npx -y deepbom@1.97.0 audit "./model.onnx" --output-format envelope
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
For a large GGUF or SafeTensors artifact, use `--scan structure` for inventory questions. Use `integrity` or `full` only when payload evidence is necessary.
|
|
37
|
+
|
|
38
|
+
For a concise GGUF tensor table without nested numerical-integrity ledgers, use the bounded projection (it defaults to a structure scan):
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx -y deepbom@1.97.0 gguf "./model.gguf" --tensors
|
|
42
|
+
npx -y deepbom@1.97.0 gguf "./model.gguf" --tensors --compact
|
|
43
|
+
npx -y deepbom@1.97.0 gguf "./model.gguf" --tensors --compact --tensor-offset 100 --tensor-limit 100
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Before relying on a newly fetched package, run:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx -y deepbom@1.97.0 self-test --compact
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Interpret the result
|
|
53
|
+
|
|
54
|
+
Keep `artifact_defect`, `caution`, and `evidence_gap` separate. An evidence gap is not a defect. Preserve `NOT_APPLICABLE`, `NOT_ASSESSABLE`, and `NOT_ASSESSED_YET` instead of converting them to zero or absence.
|
|
55
|
+
|
|
56
|
+
Read `references/evidence-semantics.md` before summarizing findings or target projections. Report at least:
|
|
57
|
+
|
|
58
|
+
- artifact filename and SHA-256
|
|
59
|
+
- analyzer version
|
|
60
|
+
- artifact format
|
|
61
|
+
- target and binding source when target-dependent evidence is used
|
|
62
|
+
- assessed coverage and unresolved evidence
|
|
63
|
+
- defects, cautions, and evidence gaps as separate groups
|
|
64
|
+
- the exact reproduction command
|
|
65
|
+
|
|
66
|
+
Never infer actual accelerator assignment, latency, energy, thermal behavior, task accuracy, clinical validity, or device fit from static output alone.
|
|
67
|
+
|
|
68
|
+
## Compare or explain
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npx -y deepbom@1.97.0 diff "./baseline.onnx" "./candidate.onnx" --summary
|
|
72
|
+
npx -y deepbom@1.97.0 diff "./baseline.gguf" "./candidate.gguf" --tensors --render markdown
|
|
73
|
+
npx -y deepbom@1.97.0 verify "./model.onnx" --bom "./supplied.cdx.json" --render markdown
|
|
74
|
+
npx -y deepbom@1.97.0 contract capture "./model.onnx" -o "./baseline.interface-contract.json"
|
|
75
|
+
npx -y deepbom@1.97.0 explain-rule <rule-id> --json
|
|
76
|
+
npx -y deepbom@1.97.0 graph "./model.onnx" --view structure --format svg -o graph.svg
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Use matching serialized deployment formats for diff. Treat `verify --bom` as a reconciliation of the selected component with artifact-observable facts, not a complete BOM or compliance verdict. An automatically captured contract is an artifact-derived baseline until it is separately reviewed and approved. Do not deserialize `.pth`, `.pt`, or `.h5`; bind a conversion receipt to the deployed artifact instead.
|
|
80
|
+
|
|
81
|
+
## Handle failure
|
|
82
|
+
|
|
83
|
+
Read `references/failure-recovery.md` when an invocation fails, exceeds a resource boundary, or returns exit code 2 or 3. Do not weaken a size, path, hash, or evidence boundary merely to force a complete result.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "DEEPBOM Artifact Audit"
|
|
3
|
+
short_description: "Audit serialized AI deployment artifacts locally"
|
|
4
|
+
default_prompt: "Statically audit this deployment artifact with DEEPBOM and report bounded evidence, unresolved gaps, and the reproduction command."
|
|
5
|
+
|
|
6
|
+
policy:
|
|
7
|
+
allow_implicit_invocation: true
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Capability selection
|
|
2
|
+
|
|
3
|
+
Use DEEPBOM when the subject is a serialized deployment artifact and the question can be answered from artifact bytes, an explicit target profile, or an imported evidence document.
|
|
4
|
+
|
|
5
|
+
| Task | Use DEEPBOM | Boundary |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| TFLite, ONNX, Core ML, or ExecuTorch graph and tensor audit | Yes | Static artifact evidence only |
|
|
8
|
+
| GGUF or SafeTensors storage, quantization, architecture, or memory lower bound | Yes | No executable graph is invented |
|
|
9
|
+
| MAC and symbolic shape coverage | Yes | Preserve partial or symbolic status |
|
|
10
|
+
| Quantization contract review | Yes | Do not infer task accuracy |
|
|
11
|
+
| Accelerator eligibility or selected-build evidence | Yes | Eligibility is not observed assignment |
|
|
12
|
+
| Artifact version diff | Yes | Inputs must use the same supported format |
|
|
13
|
+
| PyTorch or HDF5 training checkpoint execution | No | Convert safely and bind a conversion receipt |
|
|
14
|
+
| Measured latency, energy, temperature, or accuracy | No | Import runtime evidence or use the appropriate benchmark system |
|
|
15
|
+
|
|
16
|
+
Prefer `summary` first. Request an envelope for cross-format automation, format-specific JSON for a narrow field, SARIF for CI findings, or CycloneDX 1.7 for supply-chain exchange.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Evidence semantics
|
|
2
|
+
|
|
3
|
+
Preserve DEEPBOM's evidence class and applicability state in the answer.
|
|
4
|
+
|
|
5
|
+
- `OBSERVED` describes serialized artifact facts.
|
|
6
|
+
- `SOURCE_BACKED` identifies a source-pinned rule or compatibility statement.
|
|
7
|
+
- `DERIVED` is deterministically calculated from declared inputs.
|
|
8
|
+
- `PREDICTED` and `ESTIMATED` are model-dependent, not runtime observations.
|
|
9
|
+
- `MEASURED` is valid only when an imported measurement is identity-bound.
|
|
10
|
+
- `NOT_APPLICABLE` means the domain does not apply to this artifact.
|
|
11
|
+
- `NOT_ASSESSABLE` means required evidence is absent or insufficient.
|
|
12
|
+
- `NOT_ASSESSED_YET` means analysis has not been requested or completed.
|
|
13
|
+
|
|
14
|
+
Finding kinds are independent from evidence classes:
|
|
15
|
+
|
|
16
|
+
- `artifact_defect`: a contradiction or defect found in the artifact.
|
|
17
|
+
- `caution`: a bounded condition that merits review but is not a defect.
|
|
18
|
+
- `evidence_gap`: a claim the artifact cannot settle alone.
|
|
19
|
+
|
|
20
|
+
When a target is present, report whether its binding source is a default assumption, explicit ID, or profile file. `host_observed: false` means the host was not measured.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Failure recovery
|
|
2
|
+
|
|
3
|
+
1. Exit `1`: report invocation, input, artifact, or output failure. Read structured stderr with `--error-format json` before changing the command.
|
|
4
|
+
2. Exit `2`: report a policy or verification block. The evidence document may still be valid and should be retained.
|
|
5
|
+
3. Exit `3`: report an incomplete verification binding. Do not call it a tool crash or an artifact defect.
|
|
6
|
+
4. For a large GGUF or SafeTensors file, retry with `--scan structure` when the question does not require payload integrity.
|
|
7
|
+
5. For remote input, require an immutable identity: a full Hugging Face commit, GCS object generation, or HTTPS SHA-256 fragment.
|
|
8
|
+
6. Do not raise download, response, or memory limits without explaining the cost and obtaining user approval.
|
|
9
|
+
7. If no shell, local MCP, or local file access exists, explain that actual analysis cannot run in that client and provide the pinned `npx` command.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
|
|
5
|
+
const VERSION = "1.97.0";
|
|
6
|
+
const executable = process.platform === "win32" ? process.env.ComSpec || "cmd.exe" : "npx";
|
|
7
|
+
const args = process.platform === "win32"
|
|
8
|
+
? ["/d", "/s", "/c", "npx.cmd", "-y", `deepbom@${VERSION}`, "self-test", "--compact"]
|
|
9
|
+
: ["-y", `deepbom@${VERSION}`, "self-test", "--compact"];
|
|
10
|
+
const result = spawnSync(executable, args, { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] });
|
|
11
|
+
if (result.status !== 0) {
|
|
12
|
+
process.stderr.write(result.stderr || result.stdout || `DEEPBOM self-test exited ${result.status}.\n`);
|
|
13
|
+
process.exit(result.status || 1);
|
|
14
|
+
}
|
|
15
|
+
const document = JSON.parse(result.stdout);
|
|
16
|
+
if (document.schema !== "deepbom.cli_self_test.v1" || document.status !== "pass") {
|
|
17
|
+
throw new Error("DEEPBOM self-test did not return a passing deepbom.cli_self_test.v1 document.");
|
|
18
|
+
}
|
|
19
|
+
process.stdout.write(`${JSON.stringify(document)}\n`);
|