@getbourdon/conformance 0.1.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 (70) hide show
  1. package/LICENSE +157 -0
  2. package/README.md +26 -0
  3. package/dist/index.cjs +65 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +36 -0
  6. package/dist/index.d.ts +36 -0
  7. package/dist/index.js +36 -0
  8. package/dist/index.js.map +1 -0
  9. package/fixtures/README.md +61 -0
  10. package/fixtures/fed_seed_library/agents/claude-code.l5.yaml +63 -0
  11. package/fixtures/fed_seed_library/agents/codex.l5.yaml +35 -0
  12. package/fixtures/l5_manifests/invalid/bad-agent-type-enum.json +8 -0
  13. package/fixtures/l5_manifests/invalid/bad-spec-version-pattern.json +8 -0
  14. package/fixtures/l5_manifests/invalid/entity-bad-visibility-enum.json +14 -0
  15. package/fixtures/l5_manifests/invalid/entity-missing-name.json +13 -0
  16. package/fixtures/l5_manifests/invalid/missing-required-last_updated.json +7 -0
  17. package/fixtures/l5_manifests/invalid/reasons.json +75 -0
  18. package/fixtures/l5_manifests/valid/full.json +60 -0
  19. package/fixtures/l5_manifests/valid/minimal.json +8 -0
  20. package/fixtures/l5_manifests/valid/team-and-private.json +51 -0
  21. package/fixtures/l5_schema.json +209 -0
  22. package/fixtures/l5_todict.json +253 -0
  23. package/fixtures/leak_cases.json +229 -0
  24. package/fixtures/manifest.json +304 -0
  25. package/fixtures/mcp_snapshots/_normalizer.json +134 -0
  26. package/fixtures/mcp_snapshots/commit_to_federation.req.json +19 -0
  27. package/fixtures/mcp_snapshots/commit_to_federation.res.json +12 -0
  28. package/fixtures/mcp_snapshots/compile_codex_turn.req.json +7 -0
  29. package/fixtures/mcp_snapshots/compile_codex_turn.res.json +5 -0
  30. package/fixtures/mcp_snapshots/export_agents.req.json +4 -0
  31. package/fixtures/mcp_snapshots/export_agents.res.json +73 -0
  32. package/fixtures/mcp_snapshots/find_entity.req.json +7 -0
  33. package/fixtures/mcp_snapshots/find_entity.res.json +24 -0
  34. package/fixtures/mcp_snapshots/get_cross_agent_summary.req.json +7 -0
  35. package/fixtures/mcp_snapshots/get_cross_agent_summary.res.json +42 -0
  36. package/fixtures/mcp_snapshots/get_deeper_context.req.json +7 -0
  37. package/fixtures/mcp_snapshots/get_deeper_context.res.json +7 -0
  38. package/fixtures/mcp_snapshots/list_agents.req.json +4 -0
  39. package/fixtures/mcp_snapshots/list_agents.res.json +6 -0
  40. package/fixtures/mcp_snapshots/list_recent_work.req.json +8 -0
  41. package/fixtures/mcp_snapshots/list_recent_work.res.json +38 -0
  42. package/fixtures/mcp_snapshots/prepare_recognition_context.req.json +7 -0
  43. package/fixtures/mcp_snapshots/prepare_recognition_context.res.json +19 -0
  44. package/fixtures/mcp_snapshots/query_agent_memory.req.json +8 -0
  45. package/fixtures/mcp_snapshots/query_agent_memory.res.json +25 -0
  46. package/fixtures/mcp_snapshots/seed_library.json +24 -0
  47. package/fixtures/native_stores/README.json +24 -0
  48. package/fixtures/native_stores/claude_code/expected_l5.json +72 -0
  49. package/fixtures/native_stores/claude_code/store/auto_memory/MEMORY.md +3 -0
  50. package/fixtures/native_stores/claude_code/store/auto_memory/clyde.md +7 -0
  51. package/fixtures/native_stores/claude_code/store/auto_memory/ry-guy.md +6 -0
  52. package/fixtures/native_stores/claude_code/store/brain/LOG/2026-06-28-pc.md +3 -0
  53. package/fixtures/native_stores/claude_code/store/brain/PROJECTS/Bourdon/OVERVIEW.md +3 -0
  54. package/fixtures/native_stores/claude_code/store/brain/PROJECTS/OldThing/OVERVIEW.md +5 -0
  55. package/fixtures/native_stores/claude_code/store/knowledge_graph/memory.jsonl +3 -0
  56. package/fixtures/native_stores/github_copilot/cache/github-copilot/payload.json +21 -0
  57. package/fixtures/native_stores/github_copilot/expected_l5.json +67 -0
  58. package/fixtures/native_stores/hermes/expected_l5.json +108 -0
  59. package/fixtures/native_stores/hermes/store/.hermes/memories/memory.md +2 -0
  60. package/fixtures/native_stores/hermes/store/.hermes/memories/user.md +2 -0
  61. package/fixtures/native_stores/hermes/store/.hermes/state.db +0 -0
  62. package/fixtures/on_disk/audit.jsonl +5 -0
  63. package/fixtures/on_disk/auth_vectors.json +55 -0
  64. package/fixtures/on_disk/federation.yaml +22 -0
  65. package/fixtures/recognition_golden_v1.yaml +106 -0
  66. package/fixtures/recognition_vectors.json +448 -0
  67. package/fixtures/redaction_battery.json +473 -0
  68. package/fixtures/tier_matrix.json +398 -0
  69. package/fixtures/turn_compiler_vectors.json +645 -0
  70. package/package.json +39 -0
@@ -0,0 +1,108 @@
1
+ {
2
+ "spec_version": "0.1",
3
+ "agent": {
4
+ "id": "hermes",
5
+ "type": "code-assistant",
6
+ "spec_version_compat": "0.1",
7
+ "role_narrative": "General-purpose tool-calling assistant (Nous Research). Operates across CLI, TUI, and messaging gateways (Slack/Telegram/Discord/WhatsApp); runs terminal, file, web, and delegation toolsets. Carries durable cross-session memory and a curated skill library. Federates session + memory context, not vendor account."
8
+ },
9
+ "last_updated": "2026-06-29T00:00:00+00:00",
10
+ "capabilities": [
11
+ "memories_dir",
12
+ "state_db"
13
+ ],
14
+ "recent_sessions": [
15
+ {
16
+ "date": "2026-06-19",
17
+ "cwd": "/projects/bourdon",
18
+ "project_focus": [
19
+ "bourdon"
20
+ ],
21
+ "key_actions": [
22
+ "Refactor auth flow",
23
+ "Tools: patch, read_file, terminal"
24
+ ],
25
+ "visibility": "team"
26
+ },
27
+ {
28
+ "date": "2026-06-19",
29
+ "cwd": "/projects/bourdon",
30
+ "project_focus": [
31
+ "bourdon"
32
+ ],
33
+ "key_actions": [
34
+ "Fix flaky tests",
35
+ "2 tool call(s)"
36
+ ],
37
+ "visibility": "team"
38
+ }
39
+ ],
40
+ "known_entities": [
41
+ {
42
+ "name": "Bourdon",
43
+ "type": "project",
44
+ "aliases": [
45
+ "bourdon"
46
+ ],
47
+ "summary": "Workspace observed across 2 Hermes session(s).",
48
+ "last_touched": "2026-06-19",
49
+ "tags": [
50
+ "hermes-project"
51
+ ],
52
+ "visibility": "team"
53
+ },
54
+ {
55
+ "name": "Project uses pytest with xdist",
56
+ "type": "fact",
57
+ "summary": "Project uses pytest with xdist",
58
+ "tags": [
59
+ "hermes-memory"
60
+ ],
61
+ "visibility": "team"
62
+ },
63
+ {
64
+ "name": "[redacted credential-like text]",
65
+ "type": "fact",
66
+ "summary": "[redacted credential-like text]",
67
+ "tags": [
68
+ "hermes-memory"
69
+ ],
70
+ "visibility": "team"
71
+ },
72
+ {
73
+ "name": "Prefers concise answers",
74
+ "type": "preference",
75
+ "summary": "Prefers concise answers",
76
+ "tags": [
77
+ "hermes-user-memory"
78
+ ],
79
+ "visibility": "team"
80
+ },
81
+ {
82
+ "name": "Works in the Pacific timezone",
83
+ "type": "preference",
84
+ "summary": "Works in the Pacific timezone",
85
+ "tags": [
86
+ "hermes-user-memory"
87
+ ],
88
+ "visibility": "team"
89
+ }
90
+ ],
91
+ "visibility_policy": {
92
+ "default": "team",
93
+ "private_tags": [
94
+ "personal",
95
+ "financial",
96
+ "credential",
97
+ "secret",
98
+ "health",
99
+ "family",
100
+ "legal"
101
+ ],
102
+ "team_tags": [
103
+ "hermes-memory",
104
+ "hermes-session",
105
+ "hermes-project"
106
+ ]
107
+ }
108
+ }
@@ -0,0 +1,2 @@
1
+ - Project uses pytest with xdist
2
+ - The bearer token is stored in .env
@@ -0,0 +1,2 @@
1
+ - Prefers concise answers
2
+ - Works in the Pacific timezone
@@ -0,0 +1,5 @@
1
+ {"ts": "2026-06-29T00:00:00.000000Z", "agent": "openclaw", "op": "find_entity", "namespace": "claude-code", "decision": "allow"}
2
+ {"ts": "2026-06-29T00:00:01.000000Z", "agent": "openclaw", "op": "query_agent_memory", "namespace": "codex", "decision": "deny", "detail": "namespace 'codex' not granted"}
3
+ {"ts": "2026-06-29T00:00:02.000000Z", "agent": "openclaw", "op": "commit_to_federation", "namespace": "openclaw", "decision": "allow", "detail": "staged"}
4
+ {"ts": "2026-06-29T00:00:03.000000Z", "agent": "operator", "op": "list_agents", "namespace": "*", "decision": "allow"}
5
+ {"ts": "2026-06-29T00:00:04.000000Z", "agent": "openclaw", "op": "get_cross_agent_summary", "namespace": "*", "decision": "deny", "detail": "tier 'quarantined' may not call this tool"}
@@ -0,0 +1,55 @@
1
+ {
2
+ "_doc": "Synthetic bdn_ tokens (fragment arrays -- join at load, NEVER a real secret) + the oracle authenticate() result against on_disk/federation.yaml. Oracle: FederationRegistry.authenticate (sha256 of the joined token, constant-time compare; revoked rows and the empty token resolve to null). The TS parser must reproduce each `expect`.",
3
+ "registry_file": "federation.yaml",
4
+ "vectors": [
5
+ {
6
+ "name": "trusted_member",
7
+ "token_fragments": [
8
+ "bdn_",
9
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
10
+ ],
11
+ "expect": {
12
+ "agent_id": "claude-code",
13
+ "tier": "trusted",
14
+ "grants": []
15
+ }
16
+ },
17
+ {
18
+ "name": "quarantined_member",
19
+ "token_fragments": [
20
+ "bdn_",
21
+ "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
22
+ ],
23
+ "expect": {
24
+ "agent_id": "openclaw",
25
+ "tier": "quarantined",
26
+ "grants": [
27
+ "claude-code"
28
+ ]
29
+ }
30
+ },
31
+ {
32
+ "name": "revoked_member",
33
+ "token_fragments": [
34
+ "bdn_",
35
+ "cccccccccccccccccccccccccccccccccccccccccccccccc"
36
+ ],
37
+ "expect": null
38
+ },
39
+ {
40
+ "name": "unknown_token",
41
+ "token_fragments": [
42
+ "bdn_",
43
+ "ffffffffffffffffffffffffffffffffffffffffffffffff"
44
+ ],
45
+ "expect": null
46
+ },
47
+ {
48
+ "name": "empty_token",
49
+ "token_fragments": [
50
+ ""
51
+ ],
52
+ "expect": null
53
+ }
54
+ ]
55
+ }
@@ -0,0 +1,22 @@
1
+ agents:
2
+ claude-code:
3
+ created_at: '2026-06-29T00:00:00Z'
4
+ grants: []
5
+ revoked: false
6
+ tier: trusted
7
+ token_sha256: 80c71ecc7b197ed7bd5bdcd41e42cfe5af208bb098d29fbb9c0b523f13b98b35
8
+ openclaw:
9
+ created_at: '2026-06-29T00:00:00Z'
10
+ grants:
11
+ - claude-code
12
+ revoked: false
13
+ tier: quarantined
14
+ token_sha256: bf87f09f006e25f14839dbf9e8ebdfa04f5a2a5e50384ab6df00e36d24f3423c
15
+ retired:
16
+ created_at: '2026-06-29T00:00:00Z'
17
+ grants: []
18
+ revoked: true
19
+ revoked_at: '2026-06-29T00:05:00Z'
20
+ tier: trusted
21
+ token_sha256: 7d65ddc8d41109dad18817a3b193db09185a0dedd066da5438efb530e1cababf
22
+ version: 1
@@ -0,0 +1,106 @@
1
+ # Recognition golden dataset — labeled ground truth for the eval harness.
2
+ #
3
+ # Each case is self-contained: it carries its own manifest so the harness has no
4
+ # external dependencies and runs deterministically in CI. Cases deliberately
5
+ # cover the behaviors the runtime must not regress:
6
+ # - single + multi-entity recognition
7
+ # - alias matching
8
+ # - negative controls (must match NOTHING)
9
+ # - the short-name false-positive guard ("ILTTed" must not match "ILTT")
10
+ # - visibility filtering (private entities never surface)
11
+ # - confidence buckets (top-anchor parity contract)
12
+ #
13
+ # Scored by core.recognition_eval. Run: bourdon recognition eval
14
+ version: recognition-eval/v1
15
+ cases:
16
+ - id: single-exact
17
+ prompt: "tell me about Bourdon"
18
+ manifest:
19
+ known_entities:
20
+ - {name: Bourdon, type: project}
21
+ expected_entities: [Bourdon]
22
+ expected_confidence: medium
23
+
24
+ - id: single-case-insensitive
25
+ prompt: "what is happening with omnivour today"
26
+ manifest:
27
+ known_entities:
28
+ - {name: OMNIvour, type: project}
29
+ expected_entities: [OMNIvour]
30
+
31
+ - id: alias-match
32
+ prompt: "any update on if_lift_then_that"
33
+ manifest:
34
+ known_entities:
35
+ - {name: ILTT, type: product, aliases: [if_lift_then_that]}
36
+ expected_entities: [ILTT]
37
+
38
+ - id: multi-entity
39
+ prompt: "compare Bourdon and OMNIvour for me"
40
+ manifest:
41
+ known_entities:
42
+ - {name: Bourdon, type: project}
43
+ - {name: OMNIvour, type: project}
44
+ - {name: Unrelated, type: project}
45
+ expected_entities: [Bourdon, OMNIvour]
46
+
47
+ - id: negative-control-weather
48
+ prompt: "what's the weather like today"
49
+ manifest:
50
+ known_entities:
51
+ - {name: Bourdon, type: project}
52
+ - {name: OMNIvour, type: project}
53
+ expected_entities: []
54
+
55
+ - id: negative-control-empty-manifest
56
+ prompt: "tell me about anything at all"
57
+ manifest:
58
+ known_entities: []
59
+ expected_entities: []
60
+
61
+ - id: short-name-guard
62
+ prompt: "the build ILTTed yesterday and broke"
63
+ manifest:
64
+ known_entities:
65
+ - {name: ILTT, type: product}
66
+ expected_entities: []
67
+
68
+ - id: substring-not-token
69
+ prompt: "i deployed to a NAS box, the bananas were fine"
70
+ manifest:
71
+ known_entities:
72
+ - {name: NAS, type: hardware}
73
+ expected_entities: [NAS]
74
+
75
+ - id: visibility-private-hidden
76
+ prompt: "tell me about SecretSauce and PublicProj"
77
+ access_level: team
78
+ manifest:
79
+ known_entities:
80
+ - {name: PublicProj, type: project}
81
+ - {name: SecretSauce, type: project, visibility: private}
82
+ expected_entities: [PublicProj]
83
+
84
+ - id: multi-word-entity
85
+ prompt: "where are we on the Multi Word Project"
86
+ manifest:
87
+ known_entities:
88
+ - {name: Multi Word Project, type: project}
89
+ expected_entities: [Multi Word Project]
90
+
91
+ - id: archived-entity-still-recognized
92
+ prompt: "remind me what Coolculator was"
93
+ manifest:
94
+ known_entities:
95
+ - {name: Coolculator, type: project, valid_to: "2026-01-01"}
96
+ expected_entities: [Coolculator]
97
+
98
+ - id: three-entities
99
+ prompt: "status on Alpha, Beta, and Gamma please"
100
+ manifest:
101
+ known_entities:
102
+ - {name: Alpha}
103
+ - {name: Beta}
104
+ - {name: Gamma}
105
+ - {name: Delta}
106
+ expected_entities: [Alpha, Beta, Gamma]