@agentskit/doc-bridge 1.7.44 → 1.7.45

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 (55) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/CONTRIBUTING.md +6 -4
  3. package/action.yml +1 -1
  4. package/dist/cli/program.js +378 -189
  5. package/dist/cli/program.js.map +1 -1
  6. package/dist/config/index.d.ts +1 -1
  7. package/dist/config/index.js +5 -3
  8. package/dist/config/index.js.map +1 -1
  9. package/dist/index-BUL0q7s8.d.ts +660 -0
  10. package/dist/index.d.ts +637 -2724
  11. package/dist/index.js +328 -149
  12. package/dist/index.js.map +1 -1
  13. package/docs/RELEASE.md +22 -8
  14. package/docs/agent-corpus/INDEX.md +2 -2
  15. package/docs/agent-corpus/chat.md +2 -2
  16. package/docs/agent-corpus/cli.md +2 -2
  17. package/docs/agent-corpus/conformance.md +2 -2
  18. package/docs/agent-corpus/doc-bridge.md +1 -1
  19. package/docs/agent-corpus/doctor.md +2 -2
  20. package/docs/agent-corpus/gates.md +2 -2
  21. package/docs/agent-corpus/mcp.md +2 -2
  22. package/docs/agent-corpus/memory.md +2 -2
  23. package/docs/agent-corpus/query.md +2 -2
  24. package/docs/knowledge-engine-runbook.md +13 -1
  25. package/docs/spec/benchmark-v1.md +6 -0
  26. package/docs/spec/config-v1.md +45 -0
  27. package/docs/validation-cycle-plan.md +19 -0
  28. package/docs/verification-harness.md +4 -0
  29. package/mcpb/manifest.json +1 -1
  30. package/package.json +68 -70
  31. package/scripts/check-ecosystem-upstream.mjs +3 -2
  32. package/scripts/report-visual-check.mjs +20 -3
  33. package/scripts/verification-harness.mjs +0 -1
  34. package/skills/doc-bridge-handoff/scripts/resolve-handoff.mjs +1 -1
  35. package/src/cli/demo.ts +2 -2
  36. package/src/cli/program.ts +15 -5
  37. package/src/config/load-config.ts +7 -1
  38. package/src/config/schema.ts +4 -2
  39. package/src/conformance/documentation-standard-v1.ts +14 -8
  40. package/src/discovery/documentation.ts +44 -18
  41. package/src/discovery/repository.ts +77 -28
  42. package/src/doctor/run-doctor.ts +2 -15
  43. package/src/federation/llms.ts +72 -20
  44. package/src/fixes/proposals.ts +4 -3
  45. package/src/index-builder/human-adapters/fumadocs.ts +1 -1
  46. package/src/index-builder/watch-index.ts +1 -1
  47. package/src/lib/bounded-text.ts +15 -10
  48. package/src/reconciliation/reconcile.ts +47 -5
  49. package/src/report/html.ts +21 -15
  50. package/src/rules/engine.ts +15 -2
  51. package/src/safety/repository.ts +1 -1
  52. package/src/schemas/knowledge.ts +5 -2
  53. package/src/validate.ts +7 -1
  54. package/src/version.ts +1 -1
  55. package/dist/index-C2PCQSrB.d.ts +0 -2251
package/docs/RELEASE.md CHANGED
@@ -32,29 +32,43 @@ pnpm changeset # if new entry needed
32
32
  pnpm version-packages # bumps package.json + CHANGELOG from .changeset/*
33
33
  ```
34
34
 
35
- Current track: **`1.2.1` stable** (alpha series ended at `0.1.0-alpha.5`).
35
+ Current track: **`1.7.45` stable**. The release includes the enterprise
36
+ knowledge-bridge, deterministic benchmark, scoped-package artifact fix, and
37
+ trusted-publishing workflow hardening.
36
38
 
37
39
  ## Publish (npm + GitHub)
38
40
 
39
- Stable packages are published only by `.github/workflows/release.yml` from an immutable semver tag. The workflow re-runs the complete security, test, coverage, packaged-smoke, dogfood, Marketplace-contract, and conformance matrix, publishes npm with provenance, verifies the registry result, uploads the tarball to a GitHub Release draft, and leaves final publication to the owner so the Marketplace fields can be completed first.
41
+ Routine releases use `.github/workflows/changesets.yml`: merging a changeset
42
+ opens the version PR, and merging that PR publishes through npm Trusted
43
+ Publishing (GitHub OIDC) without `NPM_TOKEN`. The workflow runs audit,
44
+ typecheck, tests, and build before versioning or publishing.
45
+
46
+ The existing `.github/workflows/release.yml` remains the guarded recovery path
47
+ for an immutable semver tag. It also uses npm Trusted Publishing and re-runs
48
+ the complete security, test, coverage, packaged-smoke, dogfood,
49
+ Marketplace-contract, and conformance matrix.
50
+
51
+ Before the first publish, configure npm Trusted Publishing for package
52
+ `@agentskit/doc-bridge` with owner `AgentsKit-io`, repository `doc-bridge`,
53
+ workflow `changesets.yml`, and GitHub environment `npm`.
40
54
 
41
55
  ```bash
42
- git tag v1.2.1
43
- git push origin v1.2.1
56
+ git tag v1.7.45
57
+ git push origin v1.7.45
44
58
  ```
45
59
 
46
60
  For recovery of an existing immutable tag, use the guarded manual dispatch. Never move or recreate a release tag.
47
61
 
48
62
  ```bash
49
- gh workflow run release.yml --ref master -f tag=v1.2.1
63
+ gh workflow run release.yml --ref master -f tag=v1.7.45
50
64
  ```
51
65
 
52
66
  Confirm:
53
67
 
54
68
  ```bash
55
- npm view @agentskit/doc-bridge@1.2.1 version dist.integrity
56
- npx ak-docs@1.2.1 --version
57
- gh release view v1.2.1 --json isDraft
69
+ npm view @agentskit/doc-bridge@1.7.45 version dist.integrity
70
+ npx ak-docs@1.7.45 --version
71
+ gh release view v1.7.45 --json isDraft
58
72
  ```
59
73
 
60
74
  GitHub Pages must remain configured for GitHub Actions; `.github/workflows/pages.yml` builds and deploys the Fumadocs portal from `apps/docs`.
@@ -1,6 +1,6 @@
1
1
  ---
2
- type: package
3
- package: doc-bridge-index
2
+ type: module
3
+ id: doc-bridge-index
4
4
  editRoot: src/index-builder
5
5
  humanDoc: /docs/recipes/index-pipeline
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
- type: package
3
- package: doc-bridge-chat
2
+ type: module
3
+ id: doc-bridge-chat
4
4
  editRoot: src/intelligence
5
5
  humanDoc: /docs/chat-and-rag
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
- type: package
3
- package: doc-bridge-cli
2
+ type: module
3
+ id: doc-bridge-cli
4
4
  editRoot: src/cli
5
5
  humanDoc: /docs/spec/cli
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
- type: package
3
- package: doc-bridge-conformance
2
+ type: module
3
+ id: doc-bridge-conformance
4
4
  editRoot: src/conformance
5
5
  humanDoc: /docs/spec/documentation-standard-v1
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  type: package
3
- package: doc-bridge
3
+ package: '@agentskit/doc-bridge'
4
4
  editRoot: src
5
5
  humanDoc: /docs/POSITIONING
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
- type: package
3
- package: doc-bridge-doctor
2
+ type: module
3
+ id: doc-bridge-doctor
4
4
  editRoot: src/doctor
5
5
  humanDoc: /docs/spec/documentation-standard-v1
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
- type: package
3
- package: doc-bridge-gates
2
+ type: module
3
+ id: doc-bridge-gates
4
4
  editRoot: src/gates
5
5
  humanDoc: /docs/spec/documentation-standard-v1
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
- type: package
3
- package: doc-bridge-mcp
2
+ type: module
3
+ id: doc-bridge-mcp
4
4
  editRoot: src/mcp
5
5
  humanDoc: /docs/mcp
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
- type: package
3
- package: doc-bridge-memory
2
+ type: module
3
+ id: doc-bridge-memory
4
4
  editRoot: src/memory
5
5
  humanDoc: /docs/schemas/memory-candidate-v1
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
- type: package
3
- package: doc-bridge-query
2
+ type: module
3
+ id: doc-bridge-query
4
4
  editRoot: src/query
5
5
  humanDoc: /docs/query
6
6
  ---
@@ -16,6 +16,8 @@ ak-docs map --html --output .doc-bridge/report.html
16
16
 
17
17
  Expected artifacts are under `.doc-bridge/workflow/`: `manifest.json`, immutable stage artifacts, `transitions.jsonl`, and `last-known-good.json`. The HTML report is standalone and can be opened directly without a server or network.
18
18
 
19
+ The safe repository walk excludes common generated trees, including `dist`, `build`, `.next`, `out`, `.turbo`, `.svelte-kit`, `.mcpb-build`, and `.mcpb-output`, so generated output is reported as a coverage boundary rather than mistaken for source architecture. Add a project-specific `safety.exclude` pattern when another tool generates code outside these conventions.
20
+
19
21
  ## Safe fixes
20
22
 
21
23
  ```bash
@@ -56,13 +58,16 @@ Missing declarations are configurable because not every implementation import is
56
58
  {
57
59
  "reconciliation": {
58
60
  "scope": "package",
59
- "requiredRelationKinds": ["imports", "re-exports", "depends-on"]
61
+ "requiredRelationKinds": ["imports", "re-exports", "depends-on"],
62
+ "requiredRelationTargets": "internal"
60
63
  }
61
64
  }
62
65
  ```
63
66
 
64
67
  Omit the option to preserve the original all-relation behavior. Use an empty list for low-friction adoption when package/app coverage and explicitly declared claims matter more than documenting every module, test, or external-library import. Existing declarations are still checked for stale, conflicting, and unresolved references.
65
68
 
69
+ With `requiredRelationTargets: "internal"`, external-library relations remain in the canonical graph and evidence trail but do not require a Markdown declaration. Internal project relations still require declarations and remain subject to stale, conflicting, and unresolved checks.
70
+
66
71
  Package health is not inferred from coverage presence alone. A covered package
67
72
  is `fresh` only when its relevant relations are verified; undocumented or
68
73
  not-analyzed relations make it `unverified`, while conflicting declarations
@@ -72,3 +77,10 @@ large architecture/documentation gap.
72
77
  The reconciliation summary also includes deterministic `diagnosticsByCode` and
73
78
  `diagnosticsByStatus` rollups. Use them for triage and dashboards, but keep the
74
79
  canonical diagnostics and their evidence as the source of truth.
80
+
81
+ Document counts are intentionally split by classification. The total document
82
+ inventory includes human, agent, project, archive, and unclassified Markdown;
83
+ it is not the denominator for agent-corpus coverage. Compare
84
+ `documentClassificationCounts.agent` with
85
+ `documentedDocumentClassificationCounts.agent` for the configured agent-doc
86
+ surface, and inspect the remaining classifications separately.
@@ -28,3 +28,9 @@ The fixture contains only stable identifiers and explicitly supported cases:
28
28
  The observation contains the same three sets, plus optional evidence identifiers and finding-category counts. The result reports true positives, false positives, false negatives, precision, recall, duplicate observations, evidence ratio, finding density, excluded cases, thresholds, and regressions. Excluded cases are removed from denominators only because they are explicitly listed and their counts remain visible.
29
29
 
30
30
  Benchmark output is aggregate by default: it does not include repository contents, prompts, credentials, or the member lists used to calculate the result. Baselines are not changed by `benchmark` or by a verification run. Use the verification harness's explicit audited baseline command when a new baseline is intentionally approved.
31
+
32
+ ## Semantic reconciliation gate
33
+
34
+ The semantic gate runs labeled, synthetic cases through the real reconciliation implementation. The required v1 cases are `confirmed`, `undocumented`, `stale`, `not-analyzed`, `conflict`, and `unresolved`. Each case declares its exact expected diagnostic-code set and requires every emitted diagnostic to contain evidence.
35
+
36
+ The gate is passing only when finding precision, finding recall, and evidence ratio are all `1.000`, with no regressions. The conflict case may legitimately emit the additional `RELATION_CONFIRMED` and `RELATION_NOT_ANALYZED` diagnostics because both declarations are evaluated independently; the expected set records that behavior explicitly. These cases prove classifier behavior, not coverage of every language analyzer or runtime-only relationship.
@@ -38,6 +38,12 @@ package.json → "docBridge" field (subset, JSON only)
38
38
 
39
39
  TypeScript/JavaScript configs are static in v0.1 alpha: `defineConfig` imports are supported, but arbitrary imports are not. YAML config files are planned.
40
40
 
41
+ Dynamic-loading coverage is evidence-backed. Literal strings, constant aliases,
42
+ parenthesized strings, and string concatenations are resolved without executing
43
+ repository code. Runtime-dependent `import()` and `require()` expressions remain
44
+ `partial`/`not-analyzed`, and the coverage entry records representative
45
+ file-and-line evidence for each observed loading site (up to the schema limit).
46
+
41
47
  ## TypeScript shape (authoritative)
42
48
 
43
49
  ```ts
@@ -410,6 +416,8 @@ type ReconciliationConfig = {
410
416
  scope?: 'file' | 'module' | 'package'
411
417
  /** Observed relation kinds that require documentation declarations. */
412
418
  requiredRelationKinds?: string[]
419
+ /** Limit missing-declaration findings to relations between internal project entities. */
420
+ requiredRelationTargets?: 'all' | 'internal'
413
421
  /** Emit info findings for documentation with no observed package/module join. */
414
422
  includeOrphanedDocuments?: boolean
415
423
  }
@@ -417,6 +425,8 @@ type ReconciliationConfig = {
417
425
 
418
426
  Use `scope: 'package'` for monorepos where file imports should be compared as package-level architecture evidence. Omit `requiredRelationKinds` to require all observed kinds; an empty array intentionally disables undocumented-relation findings and must be treated as an explicit exemption.
419
427
 
428
+ Use `requiredRelationTargets: 'internal'` when the repository wants package or module architecture declarations without requiring Markdown to enumerate every external library import. External relations remain in the raw snapshot and report as evidence; they simply do not generate missing-declaration findings.
429
+
420
430
  The reconciliation documentation summary reports package health separately from
421
431
  relation findings: `fresh` means the package has coverage documentation and no
422
432
  known discrepancy; `stale` means a declared relation conflicts with observed
@@ -426,6 +436,15 @@ could not be verified. Package-level aggregation preserves the relation
426
436
  endpoints used for this classification, so an undocumented relation cannot be
427
437
  reported alongside a falsely `fresh` package.
428
438
 
439
+ The same summary keeps document inventory separate from coverage claims:
440
+ `documentCount` and `documentClassificationCounts` describe every discovered
441
+ Markdown document, while `documentedDocumentCount` and
442
+ `documentedDocumentClassificationCounts` describe documents that declare a
443
+ knowledge relation. The classification keys are analyzer output (for example
444
+ `agent`, `human`, `project`, `archive`, and `unclassified`); consumers must not
445
+ interpret total repository Markdown coverage as agent-corpus coverage. Use the
446
+ `agent` pair when measuring the configured agent documentation surface.
447
+
429
448
  ## `report` (optional)
430
449
 
431
450
  ```ts
@@ -437,6 +456,27 @@ report?: {
437
456
 
438
457
  `private` is the default and keeps local evidence useful for debugging. `anonymized` is intended for reports shared outside the repository: it preserves counts, relation kinds, topology, and coverage status while removing project-specific identity and evidence content. The generated HTML and every lazy chunk use the same mode.
439
458
 
459
+ ## `safety` (optional)
460
+
461
+ ```ts
462
+ type RepositorySafetyConfig = {
463
+ /** Additional project-relative glob patterns excluded from repository discovery. */
464
+ exclude?: string[]
465
+ maxFiles?: number
466
+ maxBytes?: number
467
+ maxTimeMs?: number
468
+ maxMemoryMb?: number
469
+ redactSecrets?: boolean
470
+ }
471
+ ```
472
+
473
+ Discovery always excludes unsafe or generated trees by default, including
474
+ `.git`, `node_modules`, `dist`, `build`, `coverage`, `.doc-bridge`, `.next`,
475
+ `out`, `.turbo`, `.svelte-kit`, `.mcpb-build`, and `.mcpb-output`, plus common
476
+ secret files. `safety.exclude` adds project-specific patterns; it does not
477
+ replace the built-in safety boundary. Excluded files remain outside the
478
+ snapshot and are represented by analyzer coverage when relevant.
479
+
440
480
  ## `analysis` (optional)
441
481
 
442
482
  ```ts
@@ -467,6 +507,11 @@ When a configured method receives an identifier bound to a
467
507
  static import, Doc Bridge records a `runtime-wiring` relation with
468
508
  `metadata.detection: 'runtime-wiring-static'`. Reflective, computed, or
469
509
  otherwise unbound targets remain explicit `not-analyzed` coverage entries.
510
+ Dynamic `import()` and `require()` targets are resolved when their specifier is
511
+ a literal, a `const` string binding, a parenthesized static expression, or a
512
+ concatenation of other statically known strings. Expressions that depend on
513
+ runtime values remain explicit `not-analyzed` coverage entries; Doc Bridge does
514
+ not execute repository code to guess their targets.
470
515
  Test/spec modules are excluded from this signal by default because their
471
516
  registrations usually construct fixtures rather than production architecture;
472
517
  set `includeTestRuntimeWiring: true` when test wiring is part of the contract.
@@ -102,6 +102,21 @@ This plan is a validation contract. A green result from one cycle never substitu
102
102
  - the known-case fixture matrix has 100% detection of expected findings and 0 unsupported findings;
103
103
  - the real target report does not show zero findings merely because reconciliation was disabled.
104
104
 
105
+ ### Phase 3 — Real-artifact documentation inventory
106
+
107
+ The first AKOS audit exposed that the repository contains multiple documentation
108
+ surfaces. A single `documentedDocumentCount / documentCount` ratio mixed the 27
109
+ agent-corpus documents with human guides, project files, archives, and
110
+ unclassified Markdown. Doc Bridge now reports deterministic document counts by
111
+ classification and marks `docs-archive` as `archive`; the report highlights the
112
+ agent-corpus ratio separately. This keeps the metric useful without hiding the
113
+ full inventory.
114
+
115
+ The phase gate is satisfied only when the real AKOS artifact reports the
116
+ classification totals, the agent-corpus numerator/denominator, and evidence for
117
+ the classification rule. A changed source revision or configuration invalidates
118
+ the evidence and requires a new workflow and verification run.
119
+
105
120
  ### Cycle 5 — Registry agent quality
106
121
 
107
122
  **Purpose:** validate the configured agent from the AgentsKit Registry as an evidence-grounded assistant to discovery and classification.
@@ -234,3 +249,7 @@ Cycle 7 shipped Doc Bridge `1.7.28` to `agentskit-os` and made the large-report
234
249
  - the current verification contract covers the package dogfood target, not the complete Doc Bridge enterprise objective.
235
250
 
236
251
  The current run is `AWAITING_HUMAN_APPROVAL`, not complete. Discovery, package-level reconciliation, Registry-agent proof, documentation cohesion, export accuracy, CLI execution, and measured efficiency passed. The benchmark baseline was not replaced. After human approval, the next cycle should use these numbers as the comparison point and focus on classifying the remaining 9 production runtime-wiring candidates and improving documentation usefulness rather than report transport performance.
252
+
253
+ ### Phase 2 — Semantic classification measurement
254
+
255
+ The next cycle adds a small, deterministic labeled benchmark around the real reconciliation function. It covers confirmed, undocumented, stale, not-analyzed, conflicting, and unresolved declarations. The acceptance threshold is exact per-case diagnostic classification with non-empty evidence, plus `1.000` finding precision, `1.000` finding recall, and `1.000` evidence ratio. The AKOS verification contract runs this gate directly against the checked-out Doc Bridge source so a later change cannot silently preserve only the aggregate report counts.
@@ -52,6 +52,10 @@ Checks may emit one final JSON line with `status` set to `passed`, `failed`, or
52
52
 
53
53
  Visual checks must use a real browser or an explicitly configured equivalent. A passing build is not visual approval. Endpoint, database, CLI, and MCP checks must execute their real artifact when the contract marks that surface as required.
54
54
 
55
+ UI checks fail closed unless the check declares the `real-browser` and `screenshot` capabilities and its final structured result contains `capability: "real-browser"`, screenshot artifacts with project-relative paths, SHA-256 hashes and viewports, plus a passing result for every contract outcome mapped to that check. Missing files, stale hashes, placeholder pending results, and unmapped criteria block the run before human approval is available.
56
+
57
+ Delegated work does not weaken the gate. Subagents receive the parent contract hash, assigned criterion IDs, allowed scope, required capabilities, and expected evidence. Their output remains provisional until the orchestrator reruns this harness against the combined current source revision.
58
+
55
59
  The final evidence ledger must distinguish `validated`, `partially validated`, `not analyzed`, `blocked`, and `not applicable`. Counts such as indexed documents, package presence, or rendered reports do not prove semantic documentation/code agreement, stale-content detection, runtime wiring, or UI behavior.
56
60
 
57
61
  When a report is shared outside its repository, configure `report.privacy: 'anonymized'`. This is separate from `safety.redactSecrets`: secret redaction does not anonymize project names, paths, identifiers, snippets, or finding messages. The privacy check must inspect the generated HTML and all lazy chunks, not only the configuration.
@@ -2,7 +2,7 @@
2
2
  "manifest_version": "0.3",
3
3
  "name": "doc-bridge",
4
4
  "display_name": "Doc Bridge",
5
- "version": "1.7.44",
5
+ "version": "1.7.45",
6
6
  "description": "Deterministic repository handoffs for coding agents, running locally without an LLM or API key.",
7
7
  "long_description": "Doc Bridge turns a repository's own documentation and ownership metadata into deterministic handoffs: where an agent should start, which paths it may edit, which checks it must run, and when a human must take over. The local connector exposes the same read-only contract available through Doc Bridge CLI and CI.",
8
8
  "author": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentskit/doc-bridge",
3
- "version": "1.7.44",
3
+ "version": "1.7.45",
4
4
  "mcpName": "io.github.AgentsKit-io/doc-bridge",
5
5
  "description": "Human↔agent documentation bridge — deterministic handoffs, doc-site links, memory→docs, optional AgentsKit RAG/chat.",
6
6
  "type": "module",
@@ -46,51 +46,6 @@
46
46
  "src",
47
47
  "skills"
48
48
  ],
49
- "scripts": {
50
- "prebuild": "node scripts/sync-version.mjs",
51
- "build": "tsup",
52
- "test": "vitest run && pnpm test:cursor-plugin && pnpm test:claude-plugin && pnpm test:copilot-plugin && pnpm test:portable-skill",
53
- "test:watch": "vitest",
54
- "coverage": "vitest run --coverage",
55
- "check:ecosystem-upstream": "node scripts/check-ecosystem-upstream.mjs",
56
- "check:no-legacy-chat-imports": "node scripts/check-no-legacy-chat-imports.mjs",
57
- "typecheck": "tsc --noEmit",
58
- "smoke:packaged": "node scripts/smoke-packaged.mjs",
59
- "smoke:docsites": "node scripts/smoke-docsites.mjs",
60
- "smoke:real-docsites": "node scripts/smoke-real-docsites.mjs",
61
- "smoke:ollama": "node scripts/smoke-ollama.mjs",
62
- "mcpb:stage": "npm run build && node scripts/build-mcpb.mjs stage",
63
- "mcpb:validate": "node scripts/build-mcpb.mjs validate",
64
- "mcpb:smoke": "node scripts/smoke-mcpb.mjs",
65
- "mcpb:pack": "npm run mcpb:stage && npm run mcpb:smoke && node scripts/build-mcpb.mjs pack",
66
- "test:mcpb": "node --test scripts/mcpb-contract.test.mjs",
67
- "test:cursor-plugin": "node --test scripts/cursor-plugin-contract.test.mjs",
68
- "test:claude-plugin": "node --test scripts/claude-plugin-contract.test.mjs",
69
- "test:copilot-plugin": "node --test scripts/copilot-plugin-contract.test.mjs",
70
- "test:portable-skill": "node --test scripts/portable-skill-contract.test.mjs",
71
- "coverage:badge": "node scripts/update-coverage-badge.mjs",
72
- "changeset": "changeset",
73
- "version-packages": "changeset version && node scripts/sync-version.mjs",
74
- "release": "npm run build && npm test && changeset publish",
75
- "version": "node scripts/sync-version.mjs && git add package.json src/version.ts action.yml",
76
- "prepublishOnly": "npm run build && npm test",
77
- "prepare": "node scripts/prepare.mjs",
78
- "prepack": "npm run build",
79
- "docs:dev": "cd apps/docs && next dev",
80
- "docs:artifacts": "node scripts/build-docs-artifacts.mjs",
81
- "docs:build": "pnpm build && node bin/ak-docs.js index && pnpm docs:artifacts && cd apps/docs && next build",
82
- "docs:typecheck": "cd apps/docs && fumadocs-mdx && tsc --noEmit",
83
- "docs:e2e": "playwright test",
84
- "report:visual": "node scripts/report-visual-check.mjs",
85
- "test:verification-harness": "node --test scripts/verification-harness.test.mjs",
86
- "docs:lighthouse": "lhci autorun",
87
- "test:readme-standard": "node --test scripts/readme-standard.test.mjs",
88
- "test:marketplace": "node --test scripts/marketplace-contract.test.mjs",
89
- "check:marketplace": "node scripts/check-marketplace-contract.mjs",
90
- "test:docs-artifacts": "node --test scripts/docs-artifacts-contract.test.mjs",
91
- "check:readme-standard": "node scripts/check-readme-standard.mjs",
92
- "check:docs": "pnpm check:readme-standard && node bin/ak-docs.js gate run && node bin/ak-docs.js conformance run documentation-standard-v1 --text && pnpm docs:typecheck && pnpm docs:build && pnpm test:docs-artifacts"
93
- },
94
49
  "keywords": [
95
50
  "agentskit",
96
51
  "documentation",
@@ -120,10 +75,10 @@
120
75
  },
121
76
  "dependencies": {
122
77
  "github-slugger": "^2.0.0",
123
- "mermaid": "^11.16.1",
78
+ "mermaid": "^11.17.2",
124
79
  "minimatch": "^10.2.6",
125
80
  "typescript": "^6.0.3",
126
- "zod": "^3.24.2"
81
+ "zod": "^4.4.3"
127
82
  },
128
83
  "peerDependencies": {
129
84
  "@agentskit/adapters": ">=0.12.0 <1",
@@ -154,30 +109,31 @@
154
109
  }
155
110
  },
156
111
  "devDependencies": {
157
- "@agentskit/chat": "0.4.0",
158
- "@agentskit/core": "1.12.3",
159
- "@agentskit/ink": "0.10.4",
112
+ "@agentskit/chat": "0.4.1",
113
+ "@agentskit/core": "1.12.8",
114
+ "@agentskit/ink": "0.10.9",
160
115
  "@agentskit/react": "0.7.4",
161
116
  "@anthropic-ai/mcpb": "2.1.2",
162
- "@changesets/cli": "^2.31.0",
117
+ "@changesets/cli": "^3.0.1",
163
118
  "@lhci/cli": "^0.15.1",
164
- "@playwright/test": "1.61.1",
165
- "@tailwindcss/postcss": "4.3.2",
166
- "@types/node": "^22.15.3",
167
- "@types/react": "19.2.17",
168
- "@types/react-dom": "19.2.3",
169
- "@vitest/coverage-v8": "4.1.10",
170
- "esbuild": "^0.28.1",
171
- "fumadocs-core": "15.6.5",
172
- "fumadocs-mdx": "11.6.4",
173
- "fumadocs-ui": "15.6.5",
174
- "lucide-react": "0.460.0",
175
- "next": "15.5.21",
176
- "react": "19.2.0",
177
- "react-dom": "19.2.0",
178
- "tailwindcss": "4.3.2",
119
+ "@playwright/test": "1.62.1",
120
+ "@tailwindcss/postcss": "4.3.3",
121
+ "@types/node": "^26.4.0",
122
+ "@types/react": "19.2.18",
123
+ "@types/react-dom": "19.2.5",
124
+ "@vitest/coverage-v8": "4.1.11",
125
+ "esbuild": "^0.28.2",
126
+ "fumadocs-core": "16.15.4",
127
+ "fumadocs-mdx": "15.4.0",
128
+ "fumadocs-ui": "16.15.4",
129
+ "lucide-react": "1.34.0",
130
+ "next": "16.3.3",
131
+ "proxy-agent": "8.0.2",
132
+ "react": "19.2.8",
133
+ "react-dom": "19.2.8",
134
+ "tailwindcss": "4.3.3",
179
135
  "tsup": "^8.5.0",
180
- "vitest": "^4.1.9"
136
+ "vitest": "^4.1.11"
181
137
  },
182
138
  "directories": {
183
139
  "doc": "docs",
@@ -188,5 +144,47 @@
188
144
  "bugs": {
189
145
  "url": "https://github.com/AgentsKit-io/doc-bridge/issues"
190
146
  },
191
- "homepage": "https://doc-bridge.agentskit.io/"
192
- }
147
+ "homepage": "https://doc-bridge.agentskit.io/",
148
+ "scripts": {
149
+ "prebuild": "node scripts/sync-version.mjs",
150
+ "build": "tsup",
151
+ "test": "vitest run && pnpm test:cursor-plugin && pnpm test:claude-plugin && pnpm test:copilot-plugin && pnpm test:portable-skill",
152
+ "test:watch": "vitest",
153
+ "coverage": "vitest run --coverage",
154
+ "check:ecosystem-upstream": "node scripts/check-ecosystem-upstream.mjs",
155
+ "check:no-legacy-chat-imports": "node scripts/check-no-legacy-chat-imports.mjs",
156
+ "typecheck": "tsc --noEmit",
157
+ "smoke:packaged": "node scripts/smoke-packaged.mjs",
158
+ "smoke:docsites": "node scripts/smoke-docsites.mjs",
159
+ "smoke:real-docsites": "node scripts/smoke-real-docsites.mjs",
160
+ "smoke:ollama": "node scripts/smoke-ollama.mjs",
161
+ "mcpb:stage": "npm run build && node scripts/build-mcpb.mjs stage",
162
+ "mcpb:validate": "node scripts/build-mcpb.mjs validate",
163
+ "mcpb:smoke": "node scripts/smoke-mcpb.mjs",
164
+ "mcpb:pack": "npm run mcpb:stage && npm run mcpb:smoke && node scripts/build-mcpb.mjs pack",
165
+ "test:mcpb": "node --test scripts/mcpb-contract.test.mjs",
166
+ "test:cursor-plugin": "node --test scripts/cursor-plugin-contract.test.mjs",
167
+ "test:claude-plugin": "node --test scripts/claude-plugin-contract.test.mjs",
168
+ "test:copilot-plugin": "node --test scripts/copilot-plugin-contract.test.mjs",
169
+ "test:portable-skill": "node --test scripts/portable-skill-contract.test.mjs",
170
+ "coverage:badge": "node scripts/update-coverage-badge.mjs",
171
+ "changeset": "changeset",
172
+ "version-packages": "changeset version && node scripts/sync-version.mjs",
173
+ "release": "npm run build && npm test && changeset publish",
174
+ "version": "node scripts/sync-version.mjs && git add package.json src/version.ts action.yml",
175
+ "docs:dev": "cd apps/docs && next dev",
176
+ "docs:artifacts": "node scripts/build-docs-artifacts.mjs",
177
+ "docs:build": "pnpm build && node bin/ak-docs.js index && pnpm docs:artifacts && cd apps/docs && next build",
178
+ "docs:typecheck": "cd apps/docs && fumadocs-mdx && tsc --noEmit",
179
+ "docs:e2e": "playwright test",
180
+ "report:visual": "node scripts/report-visual-check.mjs",
181
+ "test:verification-harness": "node --test scripts/verification-harness.test.mjs",
182
+ "docs:lighthouse": "lhci autorun",
183
+ "test:readme-standard": "node --test scripts/readme-standard.test.mjs",
184
+ "test:marketplace": "node --test scripts/marketplace-contract.test.mjs",
185
+ "check:marketplace": "node scripts/check-marketplace-contract.mjs",
186
+ "test:docs-artifacts": "node --test scripts/docs-artifacts-contract.test.mjs",
187
+ "check:readme-standard": "node scripts/check-readme-standard.mjs",
188
+ "check:docs": "pnpm check:readme-standard && node bin/ak-docs.js gate run && node bin/ak-docs.js conformance run documentation-standard-v1 --text && pnpm docs:typecheck && pnpm docs:build && pnpm test:docs-artifacts"
189
+ }
190
+ }
@@ -41,8 +41,9 @@ for (const file of requiredFiles) {
41
41
  if (localDigest !== expectedDigest) {
42
42
  throw new Error(`${file} differs from its recorded upstream SHA-256 digest.`)
43
43
  }
44
- const url = `https://raw.githubusercontent.com/${metadata.repository}/${metadata.ref}/${file}`
45
- const upstream = await fetchText(url)
44
+ const url = new URL(`https://raw.githubusercontent.com/${metadata.repository}/${metadata.ref}/${file}`)
45
+ if (url.hostname !== 'raw.githubusercontent.com') throw new Error('Unexpected upstream host.')
46
+ const upstream = await fetchText(url.href)
46
47
  if (sha256(upstream) !== expectedDigest || upstream !== local) {
47
48
  throw new Error(`${file} is stale against ${metadata.repository}@${metadata.ref}. Sync the canonical snapshot and digest.`)
48
49
  }
@@ -94,6 +94,12 @@ const inspect = async (frame, width, height) => frame.evaluate(({ width: viewpor
94
94
  diagnosticCount: typeof globalThis.__DOC_BRIDGE_DATA__?.diagnosticCount === 'number'
95
95
  ? globalThis.__DOC_BRIDGE_DATA__.diagnosticCount
96
96
  : Number.parseInt(document.querySelector('#finding-count')?.textContent ?? '', 10) || document.querySelectorAll('.finding').length,
97
+ actionableCount: typeof globalThis.__DOC_BRIDGE_DATA__?.actionableCount === 'number'
98
+ ? globalThis.__DOC_BRIDGE_DATA__.actionableCount
99
+ : Number.parseInt((document.querySelector('#finding-count')?.textContent ?? '').match(/(\d+) actionable findings/)?.[1] ?? '0', 10),
100
+ confirmedCount: typeof globalThis.__DOC_BRIDGE_DATA__?.confirmedCount === 'number'
101
+ ? globalThis.__DOC_BRIDGE_DATA__.confirmedCount
102
+ : Number.parseInt((document.querySelector('#finding-count')?.textContent ?? '').match(/(\d+) confirmed checks/)?.[1] ?? '0', 10),
97
103
  unnamedButtonCount: unnamedButtons.length,
98
104
  visibleOverflowCount: visibleOverflow.length,
99
105
  contrastFailures,
@@ -157,7 +163,8 @@ const exercise = async (frame, result) => {
157
163
  if (await load.count()) await load.click()
158
164
  else if (result.diagnosticCount > 0 && await frame.locator('.finding-group').count() === 0) throw new Error('finding loader is missing while findings are present')
159
165
  }, async () => {
160
- if (result.diagnosticCount > 0) {
166
+ const evidenceView = await frame.locator('body').getAttribute('data-report-view') === 'coverage'
167
+ if (result.actionableCount > 0 || (evidenceView && result.confirmedCount > 0)) {
161
168
  await poll(() => frame.locator('.finding-group').count(), (count) => count > 0, 'finding groups')
162
169
  } else if (await frame.locator('.finding-group').count() !== 0) {
163
170
  throw new Error('finding groups rendered despite zero findings')
@@ -280,6 +287,16 @@ const result = {
280
287
  : 'Automated checks passed; screenshots require human visual review. Re-run with --human-approved only after review.',
281
288
  }
282
289
  writeFileSync(join(outputDir, 'result.json'), `${JSON.stringify(result, null, 2)}\n`, 'utf8')
283
- console.log(JSON.stringify(result, null, 2))
284
- console.log(JSON.stringify(result))
290
+ console.log(JSON.stringify({
291
+ status,
292
+ capability: result.capability,
293
+ artifacts: result.artifacts,
294
+ criteria: result.criteria,
295
+ reportPath: result.reportPath,
296
+ outputDir: result.outputDir,
297
+ viewports: result.viewports,
298
+ themes: result.themes,
299
+ failures: result.failures,
300
+ note: result.note,
301
+ }))
285
302
  if (status === 'failed') process.exitCode = 1
@@ -10,7 +10,6 @@ import {
10
10
  readdirSync,
11
11
  renameSync,
12
12
  rmSync,
13
- statSync,
14
13
  writeFileSync,
15
14
  } from 'node:fs'
16
15
  import { dirname, join, relative, resolve, sep } from 'node:path'
@@ -3,7 +3,7 @@
3
3
  import { spawnSync } from 'node:child_process'
4
4
  import { isAbsolute } from 'node:path'
5
5
 
6
- const VERSION = '1.7.44'
6
+ const VERSION = '1.7.45'
7
7
  const kinds = new Set(['package', 'ownership'])
8
8
  const args = process.argv.slice(2)
9
9
  const id = args[0]
package/src/cli/demo.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync } from 'node:fs'
1
+ import { cpSync, existsSync, mkdtempSync, readFileSync, rmSync } from 'node:fs'
2
2
  import { tmpdir } from 'node:os'
3
3
  import { dirname, join, resolve } from 'node:path'
4
4
  import { fileURLToPath } from 'node:url'
@@ -140,4 +140,4 @@ export const withDemoWorkspace = (
140
140
  } finally {
141
141
  rmSync(dir, { recursive: true, force: true })
142
142
  }
143
- }
143
+ }