deepbom 1.98.0 → 1.99.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepbom",
3
- "version": "1.98.0",
3
+ "version": "1.99.2",
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",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema": "deepbom.npm_release.v1",
3
- "version": "1.98.0",
3
+ "version": "1.99.2",
4
4
  "source": {
5
- "git_commit": "46636ebe3cfdd43fcd782178862073ecbdd5c760",
5
+ "git_commit": "d5bd6ab2e7b2e599ac4a82cf1deb7cfa4d7a8cac",
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": 169,
21
+ "public_bundle_input_count": 170,
22
22
  "supported_inputs": [
23
23
  "tflite",
24
24
  "onnx",
@@ -9,19 +9,19 @@ Run DEEPBOM locally for files in the workspace. Never upload artifact bytes or i
9
9
 
10
10
  ## Resolve a verified runtime first
11
11
 
12
- Run `scripts/verify-deepbom.mjs` from this Skill directory before choosing an invocation. It checks, in order, `DEEPBOM_BIN`, the analyzer bundled with an npm installation, and an exact-version `deepbom` already on `PATH`. It does not access a package registry by default.
12
+ Run `scripts/verify-deepbom.mjs` from this Skill directory before choosing an invocation. It checks, in order, `DEEPBOM_BIN`, the analyzer bundled with an npm installation, and a contract-compatible `deepbom` already on `PATH`. It does not access a package registry by default.
13
13
 
14
- If no exact local installation is available, ask before running:
14
+ If no compatible local installation is available, ask before running:
15
15
 
16
16
  ```bash
17
17
  node "<skill-root>/scripts/verify-deepbom.mjs" --allow-download
18
18
  ```
19
19
 
20
- That explicit fallback may download `deepbom@1.98.0` through npm. Use the returned `invocation.command` and `invocation.prefix_args` for subsequent commands. Do not silently replace a version mismatch or network failure with an unverified executable.
20
+ That explicit fallback may download `deepbom@latest` through npm. The resolver accepts it only when it declares Agent contract `deepbom.agent_contract.v1` version `1.0.0` and evidence contract `deepbom.artifact_evidence_envelope.v1` version `1.0.0`. Use the returned `invocation.command` and `invocation.prefix_args` for subsequent commands. Do not silently replace a contract mismatch or network failure with an unverified executable.
21
21
 
22
22
  ## Start with discovery
23
23
 
24
- After resolving the exact release pinned by this Skill, discover its machine contract:
24
+ After resolving an engine compatible with the contract pinned by this Skill, discover its machine contract:
25
25
 
26
26
  ```bash
27
27
  deepbom capabilities --format agent-json
@@ -6,5 +6,5 @@
6
6
  4. For a large GGUF or SafeTensors file, retry with `--scan structure` when the question does not require payload integrity.
7
7
  5. For remote input, require an immutable identity: a full Hugging Face commit, GCS object generation, or HTTPS SHA-256 fragment.
8
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.
10
- 8. Registry download is opt-in. Prefer a verified exact-version installation; use `npx -y deepbom@1.98.0` only after network and installation permission is clear.
9
+ 7. If no shell, local MCP, or local file access exists, explain that actual analysis cannot run in that client and provide the contract-checked `npx` command.
10
+ 8. Registry download is opt-in. Prefer a verified contract-compatible installation; use `npx -y deepbom@latest` only after network and installation permission is clear. Record the resolved engine version in the answer.
@@ -6,30 +6,42 @@ import path from "node:path";
6
6
  import process from "node:process";
7
7
  import { fileURLToPath } from "node:url";
8
8
 
9
- const VERSION = "1.98.0";
9
+ const AGENT_CONTRACT = {"id":"deepbom.agent_contract.v1","version":"1.0.0","compatibility":"backward_compatible_within_v1"};
10
+ const EVIDENCE_CONTRACT = {"id":"deepbom.artifact_evidence_envelope.v1","version":"1.0.0","compatibility":"additive_fields_only_within_v1","required_top_level_fields":["schema","generated_at","identity","artifact_set","conversion_receipt","cpu_cost_target_binding","accelerator_profile_binding","accelerator_bindings","policy_identity","capabilities","interfaces","graph","external_files","metadata","findings","format_extensions","provenance","evidence_boundary","envelope_sha256"],"conditional_top_level_fields":["llm_token_budget_scenario","structured_details"],"semantic_boundaries":["artifact_defects_cautions_and_evidence_gaps_remain_distinct","static_predictions_are_not_runtime_observations","unknown_and_not_assessable_are_not_coerced_to_absence_or_zero"]};
11
+ const REGISTRY_PACKAGE = "deepbom@latest";
10
12
  const allowDownload = process.argv.slice(2).includes("--allow-download");
11
13
  const attempts = [];
12
14
  const candidates = localCandidates();
13
- if (allowDownload) candidates.push({ source: "npm_exact_version", command: process.platform === "win32" ? "npx.cmd" : "npx", prefix_args: ["-y", `deepbom@${VERSION}`], network: true });
15
+ if (allowDownload) candidates.push({ source: "npm_contract_candidate", command: process.platform === "win32" ? "npx.cmd" : "npx", prefix_args: ["-y", REGISTRY_PACKAGE], network: true });
14
16
 
15
17
  for (const candidate of candidates) {
16
18
  const versionRun = invoke(candidate, ["--version"]);
17
- if (versionRun.status !== 0 || versionRun.stdout.trim() !== VERSION) {
18
- attempts.push({ source: candidate.source, status: versionRun.status, observed_version: versionRun.stdout.trim() || null, error: bounded(versionRun.stderr) });
19
+ const observedVersion = versionRun.stdout.trim();
20
+ if (versionRun.status !== 0 || !/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(observedVersion)) {
21
+ attempts.push({ source: candidate.source, status: versionRun.status, observed_version: observedVersion || null, error: bounded(versionRun.stderr) });
22
+ continue;
23
+ }
24
+ const capabilitiesRun = invoke(candidate, ["capabilities", "--format", "agent-json", "--compact"]);
25
+ let capabilities;
26
+ try { capabilities = JSON.parse(capabilitiesRun.stdout); } catch {}
27
+ if (capabilitiesRun.status !== 0 || capabilities?.schema !== "deepbom.agent_capabilities.v1"
28
+ || capabilities?.agent_contract?.id !== AGENT_CONTRACT.id || capabilities?.agent_contract?.version !== AGENT_CONTRACT.version
29
+ || capabilities?.evidence_schema_contract?.id !== EVIDENCE_CONTRACT.id || capabilities?.evidence_schema_contract?.version !== EVIDENCE_CONTRACT.version) {
30
+ attempts.push({ source: candidate.source, status: capabilitiesRun.status, observed_version: observedVersion, observed_agent_contract: capabilities?.agent_contract || null, observed_evidence_contract: capabilities?.evidence_schema_contract || null, error: bounded(capabilitiesRun.stderr || capabilitiesRun.stdout || "public contract mismatch") });
19
31
  continue;
20
32
  }
21
33
  const selfTest = invoke(candidate, ["self-test", "--compact"]);
22
34
  try {
23
35
  const document = JSON.parse(selfTest.stdout);
24
- if (selfTest.status !== 0 || document.schema !== "deepbom.cli_self_test.v1" || document.status !== "pass" || document.version !== VERSION) throw new Error("self-test contract mismatch");
25
- process.stdout.write(`${JSON.stringify({ schema: "deepbom.skill_runtime_resolution.v1", version: VERSION, status: "pass", source: candidate.source, network_used: candidate.network, invocation: { command: candidate.command, prefix_args: candidate.prefix_args }, self_test: document })}\n`);
36
+ if (selfTest.status !== 0 || document.schema !== "deepbom.cli_self_test.v1" || document.status !== "pass" || document.version !== observedVersion || capabilities.version !== observedVersion) throw new Error("self-test or analyzer identity mismatch");
37
+ process.stdout.write(`${JSON.stringify({ schema: "deepbom.skill_runtime_resolution.v1", version: observedVersion, agent_contract: AGENT_CONTRACT, evidence_contract: EVIDENCE_CONTRACT, status: "pass", source: candidate.source, network_used: candidate.network, invocation: { command: candidate.command, prefix_args: candidate.prefix_args }, self_test: document })}\n`);
26
38
  process.exit(0);
27
39
  } catch (error) {
28
- attempts.push({ source: candidate.source, status: selfTest.status, error: bounded(selfTest.stderr || selfTest.stdout || error.message) });
40
+ attempts.push({ source: candidate.source, status: selfTest.status, observed_version: observedVersion, error: bounded(selfTest.stderr || selfTest.stdout || error.message) });
29
41
  }
30
42
  }
31
43
 
32
- process.stderr.write(`${JSON.stringify({ schema: "deepbom.skill_runtime_resolution.v1", version: VERSION, status: "unavailable", registry_download_attempted: allowDownload, attempts, suggested_action: allowDownload ? "Review the recorded installation or network error; do not claim an analysis ran." : "Install the exact release or rerun with --allow-download only after registry access is authorized." })}\n`);
44
+ process.stderr.write(`${JSON.stringify({ schema: "deepbom.skill_runtime_resolution.v1", agent_contract: AGENT_CONTRACT, evidence_contract: EVIDENCE_CONTRACT, status: "unavailable", registry_download_attempted: allowDownload, attempts, suggested_action: allowDownload ? "Review the recorded installation, compatibility, or network error; do not claim an analysis ran." : "Install a contract-compatible release or rerun with --allow-download only after registry access is authorized." })}\n`);
33
45
  process.exit(3);
34
46
 
35
47
  function localCandidates() {