@conarium-ai/core 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 (188) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/LICENSE +21 -0
  3. package/README.md +387 -0
  4. package/SECURITY.md +226 -0
  5. package/bin/conarium-anchor-service.mjs +77 -0
  6. package/bin/conarium-anchor-upgrade.mjs +108 -0
  7. package/bin/conarium-coverage.mjs +425 -0
  8. package/bin/conarium-doctor.mjs +480 -0
  9. package/bin/conarium-init.mjs +184 -0
  10. package/bin/conarium-reconcile.mjs +441 -0
  11. package/bin/conarium-stamp.mjs +161 -0
  12. package/bin/conarium-verify.mjs +610 -0
  13. package/conarium.config.json +43 -0
  14. package/deploy/anchor-service/README.md +79 -0
  15. package/deploy/anchor-service/conarium-anchor.service +21 -0
  16. package/deploy/anchor-service/dry-run.mjs +122 -0
  17. package/deploy/anchor-service/ecosystem.config.cjs +21 -0
  18. package/deploy/anchor-service/env.example +11 -0
  19. package/dist/anchor-service.d.ts +39 -0
  20. package/dist/anchor-service.d.ts.map +1 -0
  21. package/dist/anchor-service.js +278 -0
  22. package/dist/anchor-service.js.map +1 -0
  23. package/dist/anchor.d.ts +123 -0
  24. package/dist/anchor.d.ts.map +1 -0
  25. package/dist/anchor.js +246 -0
  26. package/dist/anchor.js.map +1 -0
  27. package/dist/audit-hash.d.ts +4 -0
  28. package/dist/audit-hash.d.ts.map +1 -0
  29. package/dist/audit-hash.js +12 -0
  30. package/dist/audit-hash.js.map +1 -0
  31. package/dist/audit.d.ts +104 -0
  32. package/dist/audit.d.ts.map +1 -0
  33. package/dist/audit.js +391 -0
  34. package/dist/audit.js.map +1 -0
  35. package/dist/config.d.ts +273 -0
  36. package/dist/config.d.ts.map +1 -0
  37. package/dist/config.js +44 -0
  38. package/dist/config.js.map +1 -0
  39. package/dist/connectors/docs.d.ts +23 -0
  40. package/dist/connectors/docs.d.ts.map +1 -0
  41. package/dist/connectors/docs.js +140 -0
  42. package/dist/connectors/docs.js.map +1 -0
  43. package/dist/connectors/index.d.ts +10 -0
  44. package/dist/connectors/index.d.ts.map +1 -0
  45. package/dist/connectors/index.js +37 -0
  46. package/dist/connectors/index.js.map +1 -0
  47. package/dist/connectors/jira.d.ts +16 -0
  48. package/dist/connectors/jira.d.ts.map +1 -0
  49. package/dist/connectors/jira.js +67 -0
  50. package/dist/connectors/jira.js.map +1 -0
  51. package/dist/connectors/openapi.d.ts +28 -0
  52. package/dist/connectors/openapi.d.ts.map +1 -0
  53. package/dist/connectors/openapi.js +447 -0
  54. package/dist/connectors/openapi.js.map +1 -0
  55. package/dist/connectors/postgres.d.ts +17 -0
  56. package/dist/connectors/postgres.d.ts.map +1 -0
  57. package/dist/connectors/postgres.js +131 -0
  58. package/dist/connectors/postgres.js.map +1 -0
  59. package/dist/connectors/slack.d.ts +16 -0
  60. package/dist/connectors/slack.d.ts.map +1 -0
  61. package/dist/connectors/slack.js +65 -0
  62. package/dist/connectors/slack.js.map +1 -0
  63. package/dist/connectors/supabase_rest.d.ts +35 -0
  64. package/dist/connectors/supabase_rest.d.ts.map +1 -0
  65. package/dist/connectors/supabase_rest.js +153 -0
  66. package/dist/connectors/supabase_rest.js.map +1 -0
  67. package/dist/connectors/zion.d.ts +24 -0
  68. package/dist/connectors/zion.d.ts.map +1 -0
  69. package/dist/connectors/zion.js +76 -0
  70. package/dist/connectors/zion.js.map +1 -0
  71. package/dist/console.d.ts +30 -0
  72. package/dist/console.d.ts.map +1 -0
  73. package/dist/console.js +257 -0
  74. package/dist/console.js.map +1 -0
  75. package/dist/coverage.d.ts +100 -0
  76. package/dist/coverage.d.ts.map +1 -0
  77. package/dist/coverage.js +175 -0
  78. package/dist/coverage.js.map +1 -0
  79. package/dist/executor.d.ts +12 -0
  80. package/dist/executor.d.ts.map +1 -0
  81. package/dist/executor.js +77 -0
  82. package/dist/executor.js.map +1 -0
  83. package/dist/governance.d.ts +124 -0
  84. package/dist/governance.d.ts.map +1 -0
  85. package/dist/governance.js +977 -0
  86. package/dist/governance.js.map +1 -0
  87. package/dist/http.d.ts +48 -0
  88. package/dist/http.d.ts.map +1 -0
  89. package/dist/http.js +221 -0
  90. package/dist/http.js.map +1 -0
  91. package/dist/index.d.ts +3 -0
  92. package/dist/index.d.ts.map +1 -0
  93. package/dist/index.js +25 -0
  94. package/dist/index.js.map +1 -0
  95. package/dist/keys.d.ts +51 -0
  96. package/dist/keys.d.ts.map +1 -0
  97. package/dist/keys.js +174 -0
  98. package/dist/keys.js.map +1 -0
  99. package/dist/license.d.ts +35 -0
  100. package/dist/license.d.ts.map +1 -0
  101. package/dist/license.js +122 -0
  102. package/dist/license.js.map +1 -0
  103. package/dist/llm-gate.d.ts +17 -0
  104. package/dist/llm-gate.d.ts.map +1 -0
  105. package/dist/llm-gate.js +19 -0
  106. package/dist/llm-gate.js.map +1 -0
  107. package/dist/openapi_connector.d.ts +6 -0
  108. package/dist/openapi_connector.d.ts.map +1 -0
  109. package/dist/openapi_connector.js +145 -0
  110. package/dist/openapi_connector.js.map +1 -0
  111. package/dist/pseudonymize.d.ts +19 -0
  112. package/dist/pseudonymize.d.ts.map +1 -0
  113. package/dist/pseudonymize.js +25 -0
  114. package/dist/pseudonymize.js.map +1 -0
  115. package/dist/rate_limit.d.ts +41 -0
  116. package/dist/rate_limit.d.ts.map +1 -0
  117. package/dist/rate_limit.js +66 -0
  118. package/dist/rate_limit.js.map +1 -0
  119. package/dist/receipt.d.ts +161 -0
  120. package/dist/receipt.d.ts.map +1 -0
  121. package/dist/receipt.js +210 -0
  122. package/dist/receipt.js.map +1 -0
  123. package/dist/scripts/discover_schema.d.ts +2 -0
  124. package/dist/scripts/discover_schema.d.ts.map +1 -0
  125. package/dist/scripts/discover_schema.js +75 -0
  126. package/dist/scripts/discover_schema.js.map +1 -0
  127. package/dist/scripts/dogfood_prove.d.ts +2 -0
  128. package/dist/scripts/dogfood_prove.d.ts.map +1 -0
  129. package/dist/scripts/dogfood_prove.js +41 -0
  130. package/dist/scripts/dogfood_prove.js.map +1 -0
  131. package/dist/search_policy.d.ts +23 -0
  132. package/dist/search_policy.d.ts.map +1 -0
  133. package/dist/search_policy.js +79 -0
  134. package/dist/search_policy.js.map +1 -0
  135. package/dist/server.d.ts +29 -0
  136. package/dist/server.d.ts.map +1 -0
  137. package/dist/server.js +379 -0
  138. package/dist/server.js.map +1 -0
  139. package/dist/tokens.d.ts +14 -0
  140. package/dist/tokens.d.ts.map +1 -0
  141. package/dist/tokens.js +58 -0
  142. package/dist/tokens.js.map +1 -0
  143. package/dist/types.d.ts +132 -0
  144. package/dist/types.d.ts.map +1 -0
  145. package/dist/types.js +2 -0
  146. package/dist/types.js.map +1 -0
  147. package/docs/ARCHITECTURE.md +42 -0
  148. package/docs/CONSENT-BINDING-SPEC.md +136 -0
  149. package/docs/CONSENT-BINDING-SPEC.md.anchors.jsonl +1 -0
  150. package/docs/PRIOR-ART.md +213 -0
  151. package/docs/PRIOR-ART.md.anchors.jsonl +3 -0
  152. package/docs/RECEIPT-SPEC.md +301 -0
  153. package/docs/RECEIPT-SPEC.md.anchors.jsonl +1 -0
  154. package/docs/dogfood/2026-07-31-anchor.anchors.jsonl +1 -0
  155. package/docs/dogfood/2026-08-06-reconcile.md +140 -0
  156. package/docs/plans/2026-07-02-redteam-harness.md +416 -0
  157. package/docs/specs/2026-07-02-redteam-harness-design.md +90 -0
  158. package/docs/superpowers/TODO-gate1-f4.md +23 -0
  159. package/docs/superpowers/plans/2026-07-29-conarium-receipt-plan.md +200 -0
  160. package/docs/superpowers/plans/2026-07-29-katman0-kapanis-plan.md +231 -0
  161. package/docs/superpowers/plans/2026-07-31-per-user-identity.md +667 -0
  162. package/docs/superpowers/specs/2026-07-29-conarium-receipt-design.md +202 -0
  163. package/docs/superpowers/specs/2026-07-31-per-user-identity-design.md +144 -0
  164. package/docs/superpowers/specs/2026-08-01-coverage-proof-design.md +139 -0
  165. package/docs/superpowers/specs/2026-08-05-receipt-meta-provenance-design.md +116 -0
  166. package/examples/claude-desktop-config.json +9 -0
  167. package/examples/cursor-mcp-settings.json +10 -0
  168. package/package.json +99 -0
  169. package/scripts/audit-chain-check.mjs +119 -0
  170. package/scripts/conarium_sabah_brief.mjs +107 -0
  171. package/scripts/gen-test-vectors.mjs +193 -0
  172. package/scripts/pg-snapshot.sql +27 -0
  173. package/scripts/start-mcp-c1.mjs +70 -0
  174. package/test-vectors/001-single-receipt/receipts.jsonl +1 -0
  175. package/test-vectors/002-chain-of-three/receipts.jsonl +3 -0
  176. package/test-vectors/003-tampered-field/receipts.jsonl +1 -0
  177. package/test-vectors/004-prevhash-break/receipts.jsonl +2 -0
  178. package/test-vectors/005-seq-gap/receipts.jsonl +2 -0
  179. package/test-vectors/006-bad-signature/receipts.jsonl +1 -0
  180. package/test-vectors/007-schema-invalid/receipts.jsonl +1 -0
  181. package/test-vectors/008-unsigned-no-pubkey/receipts.jsonl +1 -0
  182. package/test-vectors/009-unsigned-but-pubkey-given/receipts.jsonl +1 -0
  183. package/test-vectors/README.md +92 -0
  184. package/test-vectors/expected-hashes.json +24 -0
  185. package/test-vectors/keys/vector-key.SECRET-TEST-ONLY.pem +6 -0
  186. package/test-vectors/keys/vector-key.pub.pem +3 -0
  187. package/test-vectors/keys/vector-key.pub.pem.keyid +1 -0
  188. package/test-vectors/manifest.json +95 -0
package/package.json ADDED
@@ -0,0 +1,99 @@
1
+ {
2
+ "name": "@conarium-ai/core",
3
+ "version": "0.1.0",
4
+ "//files": "Pakete NE gireceginin izin listesi. Liste olmadan npm her seyi gonderiyordu: 296 dosya / 1.5 MB — CI workflowlari, gitleaks ayari, 137 KB pazarlama gorseli, sitenin api/chat.js dosyasi. Bir bankanin guvenlik ekibi tarball'i acip bunlari gorur. scripts/ BILEREK var: conarium-reconcile calisirken scripts/pg-snapshot.sql'e atif yapiyor, olmazsa kullanici destek maili yazar.",
5
+ "files": [
6
+ "dist",
7
+ "bin",
8
+ "scripts",
9
+ "docs",
10
+ "examples",
11
+ "test-vectors",
12
+ "deploy",
13
+ "conarium.config.json",
14
+ "README.md",
15
+ "LICENSE",
16
+ "SECURITY.md",
17
+ "CHANGELOG.md"
18
+ ],
19
+ "description": "Governed MCP gateway for AI data access: policy enforcement and PII masking, an Ed25519-signed receipt per access that a third party verifies offline, coverage reconciliation against the database's own query counters to surface access that bypassed the gateway, and conformance vectors so the receipt format can be implemented without us. Self-hosted, MIT.",
20
+ "keywords": [
21
+ "mcp",
22
+ "ai",
23
+ "coding-assistant",
24
+ "governance",
25
+ "data-governance",
26
+ "audit",
27
+ "audit-log",
28
+ "verifiable-receipts",
29
+ "tamper-evident",
30
+ "ed25519",
31
+ "bypass-detection",
32
+ "reconciliation",
33
+ "eu-ai-act",
34
+ "pii",
35
+ "cursor",
36
+ "copilot",
37
+ "claude",
38
+ "self-hosted",
39
+ "conformance-vectors",
40
+ "opentimestamps",
41
+ "codex"
42
+ ],
43
+ "homepage": "https://github.com/dogrucanemek-alt/conarium",
44
+ "license": "MIT",
45
+ "type": "module",
46
+ "main": "./dist/index.js",
47
+ "bin": {
48
+ "conarium": "dist/index.js",
49
+ "conarium-doctor": "bin/conarium-doctor.mjs",
50
+ "conarium-init": "bin/conarium-init.mjs",
51
+ "conarium-verify": "bin/conarium-verify.mjs",
52
+ "conarium-coverage": "bin/conarium-coverage.mjs",
53
+ "conarium-reconcile": "bin/conarium-reconcile.mjs",
54
+ "conarium-stamp": "bin/conarium-stamp.mjs",
55
+ "conarium-anchor-upgrade": "bin/conarium-anchor-upgrade.mjs"
56
+ },
57
+ "scripts": {
58
+ "build": "tsc",
59
+ "test": "vitest run",
60
+ "test:anchor-verify": "npm run build && node test/anchor_verify.mjs",
61
+ "test:checks": "npm run build && node test/doctor.mjs && node test/init.mjs && node test/connectors.mjs && node test/governance_lineage_adversarial.mjs && node test/governance_security_regression.mjs && node test/security_hardening_14.mjs && node test/anchor_verify.mjs && node test/spec_exitcode_drift.mjs && node test/vectors_run.mjs",
62
+ "test:all": "npm run lint && npm run test && npm run test:checks",
63
+ "dev": "tsx watch src/index.ts",
64
+ "start": "node dist/index.js",
65
+ "lint": "tsc --noEmit",
66
+ "prepublishOnly": "npm run build",
67
+ "test:vectors": "node test/vectors_run.mjs"
68
+ },
69
+ "dependencies": {
70
+ "@modelcontextprotocol/sdk": "^1.0.0",
71
+ "express": "^5.2.1",
72
+ "js-yaml": "^5.2.3",
73
+ "node-fetch": "^3.3.2",
74
+ "pgsql-ast-parser": "^12.0.2",
75
+ "postgres": "^3.4.4",
76
+ "zod": "^3.23.8"
77
+ },
78
+ "devDependencies": {
79
+ "@types/express": "^5.0.6",
80
+ "@types/js-yaml": "^4.0.9",
81
+ "@types/node": "^22.20.0",
82
+ "supertest": "^7.2.2",
83
+ "tsx": "^4.16.0",
84
+ "typescript": "^5.5.0",
85
+ "vitest": "^2.0.0",
86
+ "javascript-opentimestamps": "^0.4.5"
87
+ },
88
+ "engines": {
89
+ "node": ">=18"
90
+ },
91
+ "peerDependencies": {
92
+ "javascript-opentimestamps": "^0.4.5"
93
+ },
94
+ "peerDependenciesMeta": {
95
+ "javascript-opentimestamps": {
96
+ "optional": true
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,119 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Salt-oku audit zincir doğrulayıcı.
4
+ * Hash kuralı = src/audit-hash.ts / validateChain (hash+signature hariç JSON → sha256).
5
+ *
6
+ * Usage: node scripts/audit-chain-check.mjs <sink.jsonl>
7
+ * exit 0 temiz · exit 1 kırık/self-hash · exit 2 kullanım
8
+ */
9
+ import { createHash } from 'crypto'
10
+ import { existsSync, readFileSync, statSync } from 'fs'
11
+ import { resolve } from 'path'
12
+
13
+ const GENESIS = '0'.repeat(64)
14
+
15
+ function computeEntryHash(entry) {
16
+ const signed = { ...entry }
17
+ delete signed.hash
18
+ delete signed.signature
19
+ return createHash('sha256').update(JSON.stringify(signed)).digest('hex')
20
+ }
21
+
22
+ function check(sinkPath) {
23
+ const abs = resolve(sinkPath)
24
+ const result = {
25
+ sink: abs,
26
+ exists: existsSync(abs),
27
+ bytes: 0,
28
+ lines: 0,
29
+ prevHashBreaks: [],
30
+ selfHashMismatches: [],
31
+ ok: true,
32
+ }
33
+ if (!result.exists) {
34
+ result.ok = true
35
+ result.note = 'sink yok — genesis kabul'
36
+ return result
37
+ }
38
+ result.bytes = statSync(abs).size
39
+ const raw = readFileSync(abs, 'utf-8').trim()
40
+ if (!raw) {
41
+ result.note = 'boş sink'
42
+ return result
43
+ }
44
+ const lines = raw.split('\n').filter(Boolean)
45
+ result.lines = lines.length
46
+ let previous = GENESIS
47
+ for (let i = 0; i < lines.length; i++) {
48
+ let entry
49
+ try {
50
+ entry = JSON.parse(lines[i])
51
+ } catch (e) {
52
+ result.ok = false
53
+ result.prevHashBreaks.push({
54
+ index: i,
55
+ timestamp: null,
56
+ error: `invalid JSON: ${e.message}`,
57
+ })
58
+ continue
59
+ }
60
+ if (entry.prevHash !== previous) {
61
+ result.ok = false
62
+ result.prevHashBreaks.push({
63
+ index: i,
64
+ timestamp: entry.timestamp || null,
65
+ expectedPrev: previous,
66
+ actualPrev: entry.prevHash || null,
67
+ entryHash: entry.hash || null,
68
+ })
69
+ }
70
+ if (!entry.hash) {
71
+ result.ok = false
72
+ result.selfHashMismatches.push({
73
+ index: i,
74
+ timestamp: entry.timestamp || null,
75
+ error: 'missing hash',
76
+ })
77
+ } else {
78
+ const expected = computeEntryHash(entry)
79
+ if (entry.hash !== expected) {
80
+ result.ok = false
81
+ result.selfHashMismatches.push({
82
+ index: i,
83
+ timestamp: entry.timestamp || null,
84
+ expected,
85
+ actual: entry.hash,
86
+ })
87
+ }
88
+ }
89
+ if (entry.hash) previous = entry.hash
90
+ }
91
+ return result
92
+ }
93
+
94
+ function human(r) {
95
+ const lines = [
96
+ `sink: ${r.sink}`,
97
+ `exists: ${r.exists} · bytes: ${r.bytes} · lines: ${r.lines}`,
98
+ `prevHash breaks: ${r.prevHashBreaks.length}`,
99
+ `self-hash mismatches (tamper şüphesi): ${r.selfHashMismatches.length}`,
100
+ `ok: ${r.ok}`,
101
+ ]
102
+ if (r.prevHashBreaks[0]) {
103
+ const b = r.prevHashBreaks[0]
104
+ lines.push(
105
+ `first break: index=${b.index} ts=${b.timestamp} expectedPrev=${(b.expectedPrev || '').slice(0, 12)}… actualPrev=${(b.actualPrev || '').slice(0, 12)}…`,
106
+ )
107
+ }
108
+ return lines.join('\n')
109
+ }
110
+
111
+ const sink = process.argv[2]
112
+ if (!sink) {
113
+ console.error('Usage: node scripts/audit-chain-check.mjs <sink.jsonl>')
114
+ process.exit(2)
115
+ }
116
+ const r = check(sink)
117
+ console.log(JSON.stringify(r, null, 2))
118
+ console.error(human(r))
119
+ process.exit(r.ok ? 0 : 1)
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Conarium sabah brief — zion-rest queries → markdown file.
3
+ * Usage: node scripts/conarium_sabah_brief.mjs
4
+ * Writes: AI_GOVERNANCE/cursor_memory/sabah_conarium.md (no secrets)
5
+ */
6
+ import { spawn } from 'child_process'
7
+ import { writeFileSync, mkdirSync, existsSync } from 'fs'
8
+ import { join } from 'path'
9
+
10
+ const launcher = join(
11
+ 'C:/Users/emek.dogru/Desktop/projeler/Documents/conarium-public/scripts/start-mcp-c1.mjs'
12
+ )
13
+ const outDir = 'C:/Users/emek.dogru/AI_GOVERNANCE/cursor_memory'
14
+ const outFile = join(outDir, 'sabah_conarium.md')
15
+ const nodeExe = 'C:/Program Files/nodejs/node.exe'
16
+
17
+ function rpc(id, method, params) {
18
+ return JSON.stringify({ jsonrpc: '2.0', id, method, params }) + '\n'
19
+ }
20
+
21
+ function runMcp(messages) {
22
+ return new Promise((resolve, reject) => {
23
+ const p = spawn(nodeExe, [launcher], { stdio: ['pipe', 'pipe', 'pipe'] })
24
+ let out = '', err = ''
25
+ p.stdout.on('data', d => (out += d))
26
+ p.stderr.on('data', d => (err += d))
27
+ p.on('error', reject)
28
+ setTimeout(() => {
29
+ for (const m of messages) p.stdin.write(m)
30
+ p.stdin.end()
31
+ }, 200)
32
+ setTimeout(() => {
33
+ try { p.kill() } catch {}
34
+ resolve({ out, err })
35
+ }, 12000)
36
+ })
37
+ }
38
+
39
+ function parseToolResults(out) {
40
+ const map = {}
41
+ for (const line of out.split(/\r?\n/)) {
42
+ if (!line.trim()) continue
43
+ let o
44
+ try { o = JSON.parse(line) } catch { continue }
45
+ if (o.id == null || !o.result?.content?.[0]?.text) continue
46
+ const t = o.result.content[0].text
47
+ if (t.startsWith('Error:')) {
48
+ map[o.id] = { error: t }
49
+ continue
50
+ }
51
+ try { map[o.id] = JSON.parse(t) } catch { map[o.id] = { raw: t.slice(0, 500) } }
52
+ }
53
+ return map
54
+ }
55
+
56
+ function fmtRows(payload, max = 8) {
57
+ if (payload?.error) return `_Hata: ${payload.error}_\n`
58
+ const rows = payload?.rows || []
59
+ if (!rows.length) return '_boş_\n'
60
+ const keys = Object.keys(rows[0]).filter(k => !/phone|email|gsm|tckn/i.test(k)).slice(0, 6)
61
+ const lines = ['| ' + keys.join(' | ') + ' |', '| ' + keys.map(() => '---').join(' | ') + ' |']
62
+ for (const r of rows.slice(0, max)) {
63
+ lines.push('| ' + keys.map(k => String(r[k] ?? '')).join(' | ') + ' |')
64
+ }
65
+ return lines.join('\n') + '\n'
66
+ }
67
+
68
+ const { out, err } = await runMcp([
69
+ rpc(1, 'initialize', { protocolVersion: '2024-11-05', capabilities: {}, clientInfo: { name: 'sabah', version: '1' } }),
70
+ JSON.stringify({ jsonrpc: '2.0', method: 'notifications/initialized' }) + '\n',
71
+ rpc(2, 'tools/call', { name: 'query', arguments: { connector: 'zion-rest', sql: 'SELECT * FROM zion.v_dead_stock_summary LIMIT 1' } }),
72
+ rpc(3, 'tools/call', { name: 'query', arguments: { connector: 'zion-rest', sql: 'SELECT * FROM zion.v_branch_summary LIMIT 10' } }),
73
+ rpc(4, 'tools/call', { name: 'query', arguments: { connector: 'zion-rest', sql: 'SELECT * FROM zion.v_stock_runout LIMIT 10' } }),
74
+ rpc(5, 'tools/call', { name: 'query', arguments: { connector: 'zion-rest', sql: 'SELECT * FROM zion.v_ship_summary LIMIT 1' } }),
75
+ ])
76
+
77
+ const r = parseToolResults(out)
78
+ const now = new Date().toISOString()
79
+ const md = `# Conarium sabah — ${now}
80
+
81
+ > Kaynak: zion-rest (Codes sync aynası). Canlı Codes değil. PII maskeli alanlar atlandı.
82
+
83
+ ## 1) Ölü stok
84
+ ${fmtRows(r[2], 3)}
85
+
86
+ ## 2) Şube özet
87
+ ${fmtRows(r[3], 10)}
88
+
89
+ ## 3) Stock runout
90
+ ${fmtRows(r[4], 10)}
91
+
92
+ ## 4) Sevk özet
93
+ ${fmtRows(r[5], 3)}
94
+
95
+ ## Not
96
+ - |marj| uçuksa önce maliyet/veri_hatası hipotezi.
97
+ - 3 hamleyi Agent skill \`conarium-sabah\` ile yorumla.
98
+
99
+ ## stderr (kısa)
100
+ \`\`\`
101
+ ${err.split('\\n').filter(l => /allow=|Connected|running|Fatal/.test(l)).slice(0, 8).join('\\n')}
102
+ \`\`\`
103
+ `
104
+
105
+ if (!existsSync(outDir)) mkdirSync(outDir, { recursive: true })
106
+ writeFileSync(outFile, md, 'utf8')
107
+ console.error('[sabah] wrote', outFile)
@@ -0,0 +1,193 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * gen-test-vectors — build the frozen conformance vectors under test-vectors/.
4
+ *
5
+ * Run ONCE to create the vectors, then leave them alone. They are a contract:
6
+ * if a change to this repo makes them fail, the format changed, and that is
7
+ * exactly what the vectors exist to surface. Regenerating them to make a red
8
+ * test go green defeats their entire purpose.
9
+ *
10
+ * Everything here is deterministic — fixed key, fixed ids, fixed timestamps —
11
+ * so a second implementation can reproduce byte-identical output.
12
+ *
13
+ * Usage: npm run build && node scripts/gen-test-vectors.mjs
14
+ */
15
+ import { mkdirSync, writeFileSync, existsSync, readFileSync } from 'fs'
16
+ import { join } from 'path'
17
+ import { createPrivateKey } from 'crypto'
18
+ import { generateKeyPair } from '../dist/keys.js'
19
+ import { buildReceipt, RECEIPT_GENESIS_HASH } from '../dist/receipt.js'
20
+
21
+ const ROOT = 'test-vectors'
22
+ const KEY_DIR = join(ROOT, 'keys')
23
+ const KEY_ID = 'cnr-vectors'
24
+ const PRIV = join(KEY_DIR, 'vector-key.SECRET-TEST-ONLY.pem')
25
+ const PUB = join(KEY_DIR, 'vector-key.pub.pem')
26
+
27
+ mkdirSync(KEY_DIR, { recursive: true })
28
+
29
+ // The key is generated once and then frozen. Ed25519 signing is deterministic
30
+ // (RFC 8032), so the same key over the same hash always yields the same
31
+ // signature — which is what lets a second implementation check its producer,
32
+ // not just its verifier.
33
+ if (!existsSync(PRIV)) {
34
+ const kp = generateKeyPair(KEY_ID)
35
+ writeFileSync(
36
+ PRIV,
37
+ '# TEST VECTOR KEY — PUBLISHED ON PURPOSE, NEVER USE FOR ANYTHING REAL.\n' +
38
+ '# Anyone reading this repository has the private half. It signs nothing\n' +
39
+ '# but the frozen vectors in this directory.\n' +
40
+ kp.privatePem,
41
+ )
42
+ writeFileSync(PUB, kp.publicPem)
43
+ writeFileSync(PUB + '.keyid', KEY_ID + '\n')
44
+ console.log(`generated frozen vector key: ${PRIV}`)
45
+ }
46
+
47
+ const privatePem = readFileSync(PRIV, 'utf-8').replace(/^#[^\n]*\n/gm, '')
48
+ const key = { keyId: KEY_ID, privateKey: createPrivateKey(privatePem) }
49
+
50
+ /** A receipt body with every field pinned — no clock, no randomness. */
51
+ function input(n, overrides = {}) {
52
+ return {
53
+ id: `01JVECTOR00000000000000${String(n).padStart(3, '0')}`,
54
+ ts: `2026-01-0${n}T00:00:00.000Z`,
55
+ period: { start: `2026-01-0${n}T00:00:00.000Z`, end: `2026-01-0${n}T00:00:01.000Z` },
56
+ actor: { id: 'vector-service', type: 'service', assurance: 'shared-token' },
57
+ request: { tool: 'query', argsHash: `sha256:${'ab'.repeat(32)}` },
58
+ dataRefs: [{ source: 'vectors', object: 'public.demo', fields: ['id', 'name'] }],
59
+ policy: { id: 'conarium.policy/vectors', decision: 'allow', rules: ['mask:name'] },
60
+ flags: [],
61
+ masking: { pii: 1 },
62
+ outcome: { status: 'complete', rows: 2 },
63
+ ...overrides,
64
+ }
65
+ }
66
+
67
+ const cases = []
68
+ function emit(name, description, files, expect) {
69
+ const dir = join(ROOT, name)
70
+ mkdirSync(dir, { recursive: true })
71
+ for (const [file, content] of Object.entries(files)) {
72
+ writeFileSync(join(dir, file), content)
73
+ }
74
+ cases.push({ name, description, ...expect })
75
+ console.log(` ${name} -> exit ${expect.exitCode}`)
76
+ }
77
+
78
+ const line = (r) => JSON.stringify(r) + '\n'
79
+
80
+ // --- 001: one valid receipt ------------------------------------------------
81
+ const r1 = buildReceipt(input(1), { seq: 1, prevHash: RECEIPT_GENESIS_HASH }, key)
82
+ emit('001-single-receipt', 'One valid signed receipt. The smallest passing case.', {
83
+ 'receipts.jsonl': line(r1),
84
+ }, { exitCode: 0, args: ['--pubkey', 'KEYS/vector-key.pub.pem'] })
85
+
86
+ // --- 002: a chain of three -------------------------------------------------
87
+ const r2 = buildReceipt(input(2), { seq: 2, prevHash: r1.chain.hash }, key)
88
+ const r3 = buildReceipt(input(3), { seq: 3, prevHash: r2.chain.hash }, key)
89
+ emit('002-chain-of-three', 'Three receipts linked by prevHash. Contiguous, all signed.', {
90
+ 'receipts.jsonl': line(r1) + line(r2) + line(r3),
91
+ }, { exitCode: 0, args: ['--pubkey', 'KEYS/vector-key.pub.pem'] })
92
+
93
+ // --- 003: a field was edited after signing --------------------------------
94
+ const tampered = JSON.parse(JSON.stringify(r1))
95
+ tampered.outcome.rows = 999
96
+ emit('003-tampered-field', 'outcome.rows changed from 2 to 999 after signing. The stored hash no longer matches the body.', {
97
+ 'receipts.jsonl': line(tampered),
98
+ }, { exitCode: 10, args: ['--pubkey', 'KEYS/vector-key.pub.pem'] })
99
+
100
+ // --- 004: a receipt was removed from the middle ---------------------------
101
+ emit('004-prevhash-break', 'The middle receipt of the chain was deleted. #3 points at a hash that is no longer present.', {
102
+ 'receipts.jsonl': line(r1) + line(r3),
103
+ }, { exitCode: 11, args: ['--pubkey', 'KEYS/vector-key.pub.pem'] })
104
+
105
+ // --- 005: sequence numbers jump -------------------------------------------
106
+ const gap = buildReceipt(input(4), { seq: 7, prevHash: r1.chain.hash }, key)
107
+ emit('005-seq-gap', 'seq jumps 1 -> 7. prevHash still links, so only the counter reveals the gap.', {
108
+ 'receipts.jsonl': line(r1) + line(gap),
109
+ }, { exitCode: 12, args: ['--pubkey', 'KEYS/vector-key.pub.pem'] })
110
+
111
+ // --- 006: signature does not verify ---------------------------------------
112
+ const badSig = JSON.parse(JSON.stringify(r1))
113
+ badSig.sig.value = Buffer.from(Buffer.from(badSig.sig.value, 'base64').map((b, i) => (i === 0 ? b ^ 0xff : b))).toString('base64')
114
+ emit('006-bad-signature', 'First byte of the signature flipped. Body and hash are untouched — only the signature is wrong.', {
115
+ 'receipts.jsonl': line(badSig),
116
+ }, { exitCode: 13, args: ['--pubkey', 'KEYS/vector-key.pub.pem'] })
117
+
118
+ // --- 007: not a receipt at all --------------------------------------------
119
+ const broken = JSON.parse(JSON.stringify(r1))
120
+ delete broken.policy
121
+ emit('007-schema-invalid', 'policy removed. The verifier must reject the shape before it trusts anything else in the file.', {
122
+ 'receipts.jsonl': line(broken),
123
+ }, { exitCode: 20, args: ['--pubkey', 'KEYS/vector-key.pub.pem'] })
124
+
125
+ // --- 008: unsigned, no key offered ----------------------------------------
126
+ // Producing an unsigned receipt is refused unless the operator says so out loud.
127
+ // That refusal is itself part of the format's contract, so it is exercised here.
128
+ process.env.CONARIUM_AUDIT_UNSIGNED = '1'
129
+ const unsigned = buildReceipt(input(5), { seq: 1, prevHash: RECEIPT_GENESIS_HASH }, null)
130
+ delete process.env.CONARIUM_AUDIT_UNSIGNED
131
+ // Written expecting 0 — the verifier said 13, and the verifier was right.
132
+ // There is no mode in which it reports success without checking a signature,
133
+ // even when the caller never asked for one. Frozen here so that property can
134
+ // never be quietly relaxed.
135
+ emit('008-unsigned-no-pubkey', 'An unsigned receipt, verified without --pubkey. Hash and chain are intact, yet the answer is still 13: the verifier never reports success on a signature it did not check.', {
136
+ 'receipts.jsonl': line(unsigned),
137
+ }, { exitCode: 13, args: [] })
138
+
139
+ // --- 009: signature demanded but absent -----------------------------------
140
+ emit('009-unsigned-but-pubkey-given', 'The same unsigned receipt, but the caller asked for signature verification. Fail-closed: a missing signature is not a passing signature.', {
141
+ 'receipts.jsonl': line(unsigned),
142
+ }, { exitCode: 13, args: ['--pubkey', 'KEYS/vector-key.pub.pem'] })
143
+
144
+ // --- canonical hashes ------------------------------------------------------
145
+ // The private key is NOT published (see test-vectors/README.md), so a second
146
+ // implementation cannot byte-compare signatures against ours. It does not need
147
+ // to: signing is RFC 8032 and well covered elsewhere. The part that is ours —
148
+ // and the part that silently breaks — is JCS canonicalisation and the hash
149
+ // derived from it. These are the numbers to match.
150
+ writeFileSync(
151
+ join(ROOT, 'expected-hashes.json'),
152
+ JSON.stringify(
153
+ {
154
+ note: 'Canonicalise the receipt with JCS (RFC 8785) excluding chain.hash, sig and anchor, then SHA-256. If your hash matches, your canonical form matches byte for byte.',
155
+ genesisPrevHash: RECEIPT_GENESIS_HASH,
156
+ receipts: [
157
+ { case: '001-single-receipt', seq: 1, prevHash: r1.chain.prevHash, hash: r1.chain.hash },
158
+ { case: '002-chain-of-three', seq: 2, prevHash: r2.chain.prevHash, hash: r2.chain.hash },
159
+ { case: '002-chain-of-three', seq: 3, prevHash: r3.chain.prevHash, hash: r3.chain.hash },
160
+ ],
161
+ },
162
+ null,
163
+ 2,
164
+ ) + '\n',
165
+ )
166
+
167
+ // --- manifest --------------------------------------------------------------
168
+ writeFileSync(
169
+ join(ROOT, 'manifest.json'),
170
+ JSON.stringify(
171
+ {
172
+ format: 'conarium-receipt',
173
+ versionUnderTest: r1.v,
174
+ keyId: KEY_ID,
175
+ publicKey: 'keys/vector-key.pub.pem',
176
+ note: 'Frozen conformance vectors. Run each case through your verifier and compare the exit code. KEYS/ in args resolves to the keys/ directory at the root of test-vectors.',
177
+ exitCodes: {
178
+ 0: 'chain intact, signatures valid',
179
+ 10: 'hash mismatch — record altered',
180
+ 11: 'prevHash break — deleted or inserted',
181
+ 12: 'seq gap / non-increasing',
182
+ 13: 'signature invalid or missing while a pubkey was supplied',
183
+ 20: 'schema invalid',
184
+ },
185
+ cases,
186
+ },
187
+ null,
188
+ 2,
189
+ ) + '\n',
190
+ )
191
+
192
+ console.log(`\n${cases.length} cases written to ${ROOT}/`)
193
+ console.log(`chain hashes: ${r1.chain.hash} -> ${r2.chain.hash} -> ${r3.chain.hash}`)
@@ -0,0 +1,27 @@
1
+ -- scripts/pg-snapshot.sql
2
+ -- Produces one conarium-dbsnapshot/0.1 JSON document for conarium-reconcile.
3
+ --
4
+ -- Prerequisites:
5
+ -- * pg_stat_statements enabled (Supabase: on by default)
6
+ -- * Conarium connects with a DEDICATED role (e.g. conarium_c2) so the
7
+ -- role's counters contain Conarium traffic and nothing else. Reconciling
8
+ -- a shared role's counters will blame Conarium for other clients' queries.
9
+ --
10
+ -- Usage: replace :role, run, save the single-row output as before.json /
11
+ -- after.json. Take `before` at window start and `after` at window end.
12
+ -- If pg_stat_statements is reset mid-window, conarium-reconcile refuses the
13
+ -- window (exit 20) — take fresh snapshots instead of arguing with it.
14
+ select json_build_object(
15
+ 'v', 'conarium-dbsnapshot/0.1',
16
+ 'ts', to_char(now() at time zone 'utc', 'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"'),
17
+ 'role', :'role',
18
+ 'source', 'pg_stat_statements',
19
+ 'entries', coalesce(json_agg(json_build_object(
20
+ 'queryid', s.queryid::text,
21
+ 'query', s.query,
22
+ 'calls', s.calls
23
+ )), '[]'::json)
24
+ ) as snapshot
25
+ from pg_stat_statements s
26
+ join pg_roles r on r.oid = s.userid
27
+ where r.rolname = :'role';
@@ -0,0 +1,70 @@
1
+ /**
2
+ * C1 launcher — same-process (no nested spawn; Cursor MCP-safe).
3
+ * Loads Supabase URL/key from jarvis-web .env.local, never prints secrets.
4
+ */
5
+ import { readFileSync, existsSync } from 'fs'
6
+ import { pathToFileURL } from 'url'
7
+ import { dirname, join } from 'path'
8
+ import { fileURLToPath } from 'url'
9
+
10
+ const __dirname = dirname(fileURLToPath(import.meta.url))
11
+ const root = join(__dirname, '..')
12
+ const dist = join(root, 'dist', 'index.js')
13
+ const configPath = join(root, 'conarium.config.c1.json')
14
+ const envPath = process.env.CONARIUM_ENV_FILE ||
15
+ 'C:/Users/emek.dogru/Desktop/1/X/jarvis-web/.env.local'
16
+
17
+ function loadEnvFile(path) {
18
+ if (!existsSync(path)) throw new Error(`env file missing: ${path}`)
19
+ const out = {}
20
+ for (const line of readFileSync(path, 'utf8').replace(/^\uFEFF/, '').split(/\r?\n/)) {
21
+ const t = line.trim()
22
+ if (!t || t.startsWith('#') || !t.includes('=')) continue
23
+ const i = t.indexOf('=')
24
+ const k = t.slice(0, i).trim()
25
+ let v = t.slice(i + 1).trim()
26
+ if ((v.startsWith('"') && v.endsWith('"')) || (v.startsWith("'") && v.endsWith("'"))) {
27
+ v = v.slice(1, -1)
28
+ }
29
+ out[k] = v
30
+ }
31
+ return out
32
+ }
33
+
34
+ if (!existsSync(dist)) {
35
+ console.error('[conarium-c1] dist/index.js missing — run npm run build')
36
+ process.exit(1)
37
+ }
38
+ if (!existsSync(configPath)) {
39
+ console.error('[conarium-c1] conarium.config.c1.json missing')
40
+ process.exit(1)
41
+ }
42
+
43
+ const fileEnv = loadEnvFile(envPath)
44
+ const url = fileEnv.NEXT_PUBLIC_SUPABASE_URL || fileEnv.SUPABASE_URL
45
+ const key = fileEnv.SUPABASE_SERVICE_ROLE_KEY
46
+ if (!url || !key) {
47
+ console.error('[conarium-c1] NEXT_PUBLIC_SUPABASE_URL / SUPABASE_SERVICE_ROLE_KEY missing')
48
+ process.exit(1)
49
+ }
50
+
51
+ process.env.CONARIUM_SUPABASE_URL = url
52
+ process.env.CONARIUM_SUPABASE_KEY = key
53
+
54
+ // Ensure dist/index.js sees --config (it reads process.argv)
55
+ process.argv = [process.argv[0], dist, '--config', configPath]
56
+
57
+ // Prove which policy file this process loaded (Cursor stale-process debug).
58
+ try {
59
+ const cfg = JSON.parse(readFileSync(configPath, 'utf8'))
60
+ const zion = (cfg.connectors || []).find(c => c.name === 'zion-rest')
61
+ const n = (zion?.config?.allowTables || '').split(',').filter(Boolean).length
62
+ const p = (cfg.policy?.allowTables || []).filter(t => String(t).startsWith('zion.')).length
63
+ console.error(`[conarium-c1] config=${configPath}`)
64
+ console.error(`[conarium-c1] zion connector allow=${n} policy zion allow=${p}`)
65
+ } catch (e) {
66
+ console.error('[conarium-c1] config probe failed:', e.message)
67
+ }
68
+
69
+ console.error('[conarium-c1] starting MCP same-process (zion-rest + docs)')
70
+ await import(pathToFileURL(dist).href)
@@ -0,0 +1 @@
1
+ {"v":"conarium-receipt/0.3","id":"01JVECTOR00000000000000001","ts":"2026-01-01T00:00:00.000Z","period":{"start":"2026-01-01T00:00:00.000Z","end":"2026-01-01T00:00:01.000Z"},"actor":{"type":"service","id":"vector-service","assurance":"shared-token"},"model":{"source":"undeclared","provider":null,"name":null,"version":null},"client":{"source":"undeclared","name":null,"version":null},"request":{"tool":"query","argsHash":"sha256:abababababababababababababababababababababababababababababababab"},"dataRefs":[{"source":"vectors","object":"public.demo","fields":["id","name"]}],"policy":{"id":"conarium.policy/vectors","decision":"allow","rules":["mask:name"]},"flags":[],"masking":{"pii":1},"outcome":{"status":"complete","rows":2},"consentRef":null,"chain":{"seq":1,"prevHash":"sha256:0000000000000000000000000000000000000000000000000000000000000000","hash":"sha256:dbbbd3139923cdf7f854283b495386526de0629a71dc4d5407a3a810ee3e1847"},"sig":{"alg":"Ed25519","keyId":"cnr-vectors","value":"TVapCMZcuMJpg5IwxVmzU5MCH3c9qDZOTdyeW+HqCQ42tNzkEq1pnlVheI6KQoAZ+2BLYik69iEnFyXYydA9AQ=="},"anchor":null}
@@ -0,0 +1,3 @@
1
+ {"v":"conarium-receipt/0.3","id":"01JVECTOR00000000000000001","ts":"2026-01-01T00:00:00.000Z","period":{"start":"2026-01-01T00:00:00.000Z","end":"2026-01-01T00:00:01.000Z"},"actor":{"type":"service","id":"vector-service","assurance":"shared-token"},"model":{"source":"undeclared","provider":null,"name":null,"version":null},"client":{"source":"undeclared","name":null,"version":null},"request":{"tool":"query","argsHash":"sha256:abababababababababababababababababababababababababababababababab"},"dataRefs":[{"source":"vectors","object":"public.demo","fields":["id","name"]}],"policy":{"id":"conarium.policy/vectors","decision":"allow","rules":["mask:name"]},"flags":[],"masking":{"pii":1},"outcome":{"status":"complete","rows":2},"consentRef":null,"chain":{"seq":1,"prevHash":"sha256:0000000000000000000000000000000000000000000000000000000000000000","hash":"sha256:dbbbd3139923cdf7f854283b495386526de0629a71dc4d5407a3a810ee3e1847"},"sig":{"alg":"Ed25519","keyId":"cnr-vectors","value":"TVapCMZcuMJpg5IwxVmzU5MCH3c9qDZOTdyeW+HqCQ42tNzkEq1pnlVheI6KQoAZ+2BLYik69iEnFyXYydA9AQ=="},"anchor":null}
2
+ {"v":"conarium-receipt/0.3","id":"01JVECTOR00000000000000002","ts":"2026-01-02T00:00:00.000Z","period":{"start":"2026-01-02T00:00:00.000Z","end":"2026-01-02T00:00:01.000Z"},"actor":{"type":"service","id":"vector-service","assurance":"shared-token"},"model":{"source":"undeclared","provider":null,"name":null,"version":null},"client":{"source":"undeclared","name":null,"version":null},"request":{"tool":"query","argsHash":"sha256:abababababababababababababababababababababababababababababababab"},"dataRefs":[{"source":"vectors","object":"public.demo","fields":["id","name"]}],"policy":{"id":"conarium.policy/vectors","decision":"allow","rules":["mask:name"]},"flags":[],"masking":{"pii":1},"outcome":{"status":"complete","rows":2},"consentRef":null,"chain":{"seq":2,"prevHash":"sha256:dbbbd3139923cdf7f854283b495386526de0629a71dc4d5407a3a810ee3e1847","hash":"sha256:56937472179de1567fee9f0b863c7c5d16d8d6b7a8e613e9bf50fb321f82433c"},"sig":{"alg":"Ed25519","keyId":"cnr-vectors","value":"eBG61Vp7IQMm5uGcmABFwzVkzwxNr/8N2Ry5y1sbGRmb8dBKegWUlzAGyPVGAJHEg6rGGXasYWfQ5DQIlm4NCA=="},"anchor":null}
3
+ {"v":"conarium-receipt/0.3","id":"01JVECTOR00000000000000003","ts":"2026-01-03T00:00:00.000Z","period":{"start":"2026-01-03T00:00:00.000Z","end":"2026-01-03T00:00:01.000Z"},"actor":{"type":"service","id":"vector-service","assurance":"shared-token"},"model":{"source":"undeclared","provider":null,"name":null,"version":null},"client":{"source":"undeclared","name":null,"version":null},"request":{"tool":"query","argsHash":"sha256:abababababababababababababababababababababababababababababababab"},"dataRefs":[{"source":"vectors","object":"public.demo","fields":["id","name"]}],"policy":{"id":"conarium.policy/vectors","decision":"allow","rules":["mask:name"]},"flags":[],"masking":{"pii":1},"outcome":{"status":"complete","rows":2},"consentRef":null,"chain":{"seq":3,"prevHash":"sha256:56937472179de1567fee9f0b863c7c5d16d8d6b7a8e613e9bf50fb321f82433c","hash":"sha256:a06a30c3fb4bdbd46bb9400da0815fb3a7007b703cc9cb41208be08413e254c7"},"sig":{"alg":"Ed25519","keyId":"cnr-vectors","value":"sUI6DnZW7flqFmBmaluQdbz1TEDanuRt1Y0p/qeY/h2uBBg0tOynawZUoB8lW5zWOSKql5H/C2x8x8PtUvSuDw=="},"anchor":null}
@@ -0,0 +1 @@
1
+ {"v":"conarium-receipt/0.3","id":"01JVECTOR00000000000000001","ts":"2026-01-01T00:00:00.000Z","period":{"start":"2026-01-01T00:00:00.000Z","end":"2026-01-01T00:00:01.000Z"},"actor":{"type":"service","id":"vector-service","assurance":"shared-token"},"model":{"source":"undeclared","provider":null,"name":null,"version":null},"client":{"source":"undeclared","name":null,"version":null},"request":{"tool":"query","argsHash":"sha256:abababababababababababababababababababababababababababababababab"},"dataRefs":[{"source":"vectors","object":"public.demo","fields":["id","name"]}],"policy":{"id":"conarium.policy/vectors","decision":"allow","rules":["mask:name"]},"flags":[],"masking":{"pii":1},"outcome":{"status":"complete","rows":999},"consentRef":null,"chain":{"seq":1,"prevHash":"sha256:0000000000000000000000000000000000000000000000000000000000000000","hash":"sha256:dbbbd3139923cdf7f854283b495386526de0629a71dc4d5407a3a810ee3e1847"},"sig":{"alg":"Ed25519","keyId":"cnr-vectors","value":"TVapCMZcuMJpg5IwxVmzU5MCH3c9qDZOTdyeW+HqCQ42tNzkEq1pnlVheI6KQoAZ+2BLYik69iEnFyXYydA9AQ=="},"anchor":null}
@@ -0,0 +1,2 @@
1
+ {"v":"conarium-receipt/0.3","id":"01JVECTOR00000000000000001","ts":"2026-01-01T00:00:00.000Z","period":{"start":"2026-01-01T00:00:00.000Z","end":"2026-01-01T00:00:01.000Z"},"actor":{"type":"service","id":"vector-service","assurance":"shared-token"},"model":{"source":"undeclared","provider":null,"name":null,"version":null},"client":{"source":"undeclared","name":null,"version":null},"request":{"tool":"query","argsHash":"sha256:abababababababababababababababababababababababababababababababab"},"dataRefs":[{"source":"vectors","object":"public.demo","fields":["id","name"]}],"policy":{"id":"conarium.policy/vectors","decision":"allow","rules":["mask:name"]},"flags":[],"masking":{"pii":1},"outcome":{"status":"complete","rows":2},"consentRef":null,"chain":{"seq":1,"prevHash":"sha256:0000000000000000000000000000000000000000000000000000000000000000","hash":"sha256:dbbbd3139923cdf7f854283b495386526de0629a71dc4d5407a3a810ee3e1847"},"sig":{"alg":"Ed25519","keyId":"cnr-vectors","value":"TVapCMZcuMJpg5IwxVmzU5MCH3c9qDZOTdyeW+HqCQ42tNzkEq1pnlVheI6KQoAZ+2BLYik69iEnFyXYydA9AQ=="},"anchor":null}
2
+ {"v":"conarium-receipt/0.3","id":"01JVECTOR00000000000000003","ts":"2026-01-03T00:00:00.000Z","period":{"start":"2026-01-03T00:00:00.000Z","end":"2026-01-03T00:00:01.000Z"},"actor":{"type":"service","id":"vector-service","assurance":"shared-token"},"model":{"source":"undeclared","provider":null,"name":null,"version":null},"client":{"source":"undeclared","name":null,"version":null},"request":{"tool":"query","argsHash":"sha256:abababababababababababababababababababababababababababababababab"},"dataRefs":[{"source":"vectors","object":"public.demo","fields":["id","name"]}],"policy":{"id":"conarium.policy/vectors","decision":"allow","rules":["mask:name"]},"flags":[],"masking":{"pii":1},"outcome":{"status":"complete","rows":2},"consentRef":null,"chain":{"seq":3,"prevHash":"sha256:56937472179de1567fee9f0b863c7c5d16d8d6b7a8e613e9bf50fb321f82433c","hash":"sha256:a06a30c3fb4bdbd46bb9400da0815fb3a7007b703cc9cb41208be08413e254c7"},"sig":{"alg":"Ed25519","keyId":"cnr-vectors","value":"sUI6DnZW7flqFmBmaluQdbz1TEDanuRt1Y0p/qeY/h2uBBg0tOynawZUoB8lW5zWOSKql5H/C2x8x8PtUvSuDw=="},"anchor":null}
@@ -0,0 +1,2 @@
1
+ {"v":"conarium-receipt/0.3","id":"01JVECTOR00000000000000001","ts":"2026-01-01T00:00:00.000Z","period":{"start":"2026-01-01T00:00:00.000Z","end":"2026-01-01T00:00:01.000Z"},"actor":{"type":"service","id":"vector-service","assurance":"shared-token"},"model":{"source":"undeclared","provider":null,"name":null,"version":null},"client":{"source":"undeclared","name":null,"version":null},"request":{"tool":"query","argsHash":"sha256:abababababababababababababababababababababababababababababababab"},"dataRefs":[{"source":"vectors","object":"public.demo","fields":["id","name"]}],"policy":{"id":"conarium.policy/vectors","decision":"allow","rules":["mask:name"]},"flags":[],"masking":{"pii":1},"outcome":{"status":"complete","rows":2},"consentRef":null,"chain":{"seq":1,"prevHash":"sha256:0000000000000000000000000000000000000000000000000000000000000000","hash":"sha256:dbbbd3139923cdf7f854283b495386526de0629a71dc4d5407a3a810ee3e1847"},"sig":{"alg":"Ed25519","keyId":"cnr-vectors","value":"TVapCMZcuMJpg5IwxVmzU5MCH3c9qDZOTdyeW+HqCQ42tNzkEq1pnlVheI6KQoAZ+2BLYik69iEnFyXYydA9AQ=="},"anchor":null}
2
+ {"v":"conarium-receipt/0.3","id":"01JVECTOR00000000000000004","ts":"2026-01-04T00:00:00.000Z","period":{"start":"2026-01-04T00:00:00.000Z","end":"2026-01-04T00:00:01.000Z"},"actor":{"type":"service","id":"vector-service","assurance":"shared-token"},"model":{"source":"undeclared","provider":null,"name":null,"version":null},"client":{"source":"undeclared","name":null,"version":null},"request":{"tool":"query","argsHash":"sha256:abababababababababababababababababababababababababababababababab"},"dataRefs":[{"source":"vectors","object":"public.demo","fields":["id","name"]}],"policy":{"id":"conarium.policy/vectors","decision":"allow","rules":["mask:name"]},"flags":[],"masking":{"pii":1},"outcome":{"status":"complete","rows":2},"consentRef":null,"chain":{"seq":7,"prevHash":"sha256:dbbbd3139923cdf7f854283b495386526de0629a71dc4d5407a3a810ee3e1847","hash":"sha256:c7eca03a00a015d17a1b08c1acea50cf619dc97c2be46e9a1589c20423fe9c3f"},"sig":{"alg":"Ed25519","keyId":"cnr-vectors","value":"qxMLDMePMRQeEVpWdT082dNzMMuOp0KeUWwZQrIwok+sc+rsHQyhtJK/e/N4w+L2VGNhgl78w7vWJ3qQvHqeBw=="},"anchor":null}