kiokuko-dsh 0.2.21 → 0.2.22

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 (113) hide show
  1. package/dist/dsh/clarification-context.d.ts +24 -0
  2. package/dist/dsh/clarification-context.d.ts.map +1 -0
  3. package/dist/dsh/clarification-context.js +31 -0
  4. package/dist/dsh/clarification-context.js.map +1 -0
  5. package/dist/dsh/coding-question.d.ts +26 -0
  6. package/dist/dsh/coding-question.d.ts.map +1 -0
  7. package/dist/dsh/coding-question.js +48 -0
  8. package/dist/dsh/coding-question.js.map +1 -0
  9. package/dist/dsh/coding-workflow/contracts.d.ts +2 -2
  10. package/dist/dsh/coding-workflow/host.d.ts +2 -4
  11. package/dist/dsh/coding-workflow/host.d.ts.map +1 -1
  12. package/dist/dsh/coding-workflow/host.js +13 -29
  13. package/dist/dsh/coding-workflow/host.js.map +1 -1
  14. package/dist/dsh/coding-workflow/intent.d.ts.map +1 -1
  15. package/dist/dsh/coding-workflow/intent.js +2 -1
  16. package/dist/dsh/coding-workflow/intent.js.map +1 -1
  17. package/dist/dsh/coding-workflow/service.d.ts +6 -6
  18. package/dist/dsh/coding-workflow/service.d.ts.map +1 -1
  19. package/dist/dsh/coding-workflow/service.js +5 -3
  20. package/dist/dsh/coding-workflow/service.js.map +1 -1
  21. package/dist/dsh/guardrail/contracts.d.ts +33 -1
  22. package/dist/dsh/guardrail/contracts.d.ts.map +1 -1
  23. package/dist/dsh/guardrail/contracts.js +1 -1
  24. package/dist/dsh/guardrail/contracts.js.map +1 -1
  25. package/dist/dsh/guardrail/engine.d.ts +2 -0
  26. package/dist/dsh/guardrail/engine.d.ts.map +1 -1
  27. package/dist/dsh/guardrail/engine.js +18 -7
  28. package/dist/dsh/guardrail/engine.js.map +1 -1
  29. package/dist/dsh/guardrail/evidence.d.ts.map +1 -1
  30. package/dist/dsh/guardrail/evidence.js +29 -1
  31. package/dist/dsh/guardrail/evidence.js.map +1 -1
  32. package/dist/dsh/guardrail/service.d.ts +2 -0
  33. package/dist/dsh/guardrail/service.d.ts.map +1 -1
  34. package/dist/dsh/guardrail/service.js +44 -2
  35. package/dist/dsh/guardrail/service.js.map +1 -1
  36. package/dist/dsh/lisp/ci.d.ts +7 -0
  37. package/dist/dsh/lisp/ci.d.ts.map +1 -1
  38. package/dist/dsh/lisp/ci.js +27 -10
  39. package/dist/dsh/lisp/ci.js.map +1 -1
  40. package/dist/dsh/lisp/coding-choice.d.ts +2 -0
  41. package/dist/dsh/lisp/coding-choice.d.ts.map +1 -1
  42. package/dist/dsh/lisp/coding-choice.js +5 -1
  43. package/dist/dsh/lisp/coding-choice.js.map +1 -1
  44. package/dist/dsh/lisp/coding-preparation.d.ts +4 -5
  45. package/dist/dsh/lisp/coding-preparation.d.ts.map +1 -1
  46. package/dist/dsh/lisp/coding-preparation.js +57 -18
  47. package/dist/dsh/lisp/coding-preparation.js.map +1 -1
  48. package/dist/dsh/lisp/manager.d.ts +3 -0
  49. package/dist/dsh/lisp/manager.d.ts.map +1 -1
  50. package/dist/dsh/lisp/manager.js +114 -13
  51. package/dist/dsh/lisp/manager.js.map +1 -1
  52. package/dist/dsh/lisp/surface.d.ts.map +1 -1
  53. package/dist/dsh/lisp/surface.js +36 -18
  54. package/dist/dsh/lisp/surface.js.map +1 -1
  55. package/dist/dsh/lisp/worker.d.ts +10 -2
  56. package/dist/dsh/lisp/worker.d.ts.map +1 -1
  57. package/dist/dsh/lisp/worker.js +21 -11
  58. package/dist/dsh/lisp/worker.js.map +1 -1
  59. package/dist/dsh/managed-operation-journal.d.ts +115 -0
  60. package/dist/dsh/managed-operation-journal.d.ts.map +1 -0
  61. package/dist/dsh/managed-operation-journal.js +336 -0
  62. package/dist/dsh/managed-operation-journal.js.map +1 -0
  63. package/dist/dsh/managed-operation-runner.d.ts +33 -0
  64. package/dist/dsh/managed-operation-runner.d.ts.map +1 -0
  65. package/dist/dsh/managed-operation-runner.js +104 -0
  66. package/dist/dsh/managed-operation-runner.js.map +1 -0
  67. package/dist/dsh/models/vendor/opencode-adapter.d.ts.map +1 -1
  68. package/dist/dsh/models/vendor/opencode-adapter.js +2 -0
  69. package/dist/dsh/models/vendor/opencode-adapter.js.map +1 -1
  70. package/dist/dsh/on-demand-intake.d.ts +5 -0
  71. package/dist/dsh/on-demand-intake.d.ts.map +1 -1
  72. package/dist/dsh/on-demand-intake.js +30 -8
  73. package/dist/dsh/on-demand-intake.js.map +1 -1
  74. package/dist/dsh/owned-execution.d.ts +2 -0
  75. package/dist/dsh/owned-execution.d.ts.map +1 -1
  76. package/dist/dsh/owned-execution.js +242 -110
  77. package/dist/dsh/owned-execution.js.map +1 -1
  78. package/dist/dsh/request-interpretation-guidance.d.ts +26 -0
  79. package/dist/dsh/request-interpretation-guidance.d.ts.map +1 -0
  80. package/dist/dsh/request-interpretation-guidance.js +35 -0
  81. package/dist/dsh/request-interpretation-guidance.js.map +1 -0
  82. package/dist/dsh/task-completion-guidance.d.ts +25 -0
  83. package/dist/dsh/task-completion-guidance.d.ts.map +1 -0
  84. package/dist/dsh/task-completion-guidance.js +36 -0
  85. package/dist/dsh/task-completion-guidance.js.map +1 -0
  86. package/dist/dsh/task-completion-host.d.ts.map +1 -1
  87. package/dist/dsh/task-completion-host.js +17 -7
  88. package/dist/dsh/task-completion-host.js.map +1 -1
  89. package/dist/dsh/task-completion.d.ts +26 -2
  90. package/dist/dsh/task-completion.d.ts.map +1 -1
  91. package/dist/dsh/task-completion.js +27 -13
  92. package/dist/dsh/task-completion.js.map +1 -1
  93. package/dist/enno-oduno/coding-workflow.d.ts +1 -1
  94. package/dist/locale/en.json +1 -1
  95. package/dist/locale/ja.json +1 -1
  96. package/dist/locale/ko.json +1 -1
  97. package/dist/locale/zh-CN.json +1 -1
  98. package/docs/guardrail.md +11 -4
  99. package/docs/lisp-prototype-planning.md +1 -1
  100. package/docs/lisp.md +1 -1
  101. package/docs/managed-operation-journal.md +21 -0
  102. package/guardrail/aarch64-apple-darwin/kiokuko-guardrail +0 -0
  103. package/guardrail/aarch64-apple-darwin/manifest.json +14 -18
  104. package/guardrail/aarch64-unknown-linux-musl/kiokuko-guardrail +0 -0
  105. package/guardrail/aarch64-unknown-linux-musl/manifest.json +14 -16
  106. package/guardrail/build-records.json +198 -0
  107. package/guardrail/manifest.json +25 -137
  108. package/guardrail/x86_64-unknown-linux-musl/kiokuko-guardrail +0 -0
  109. package/guardrail/x86_64-unknown-linux-musl/manifest.json +14 -15
  110. package/migrations/047_managed_operation_journal.sql +21 -0
  111. package/package.json +2 -2
  112. package/scripts/guardrail-artifacts.d.mts +3 -0
  113. package/scripts/guardrail-artifacts.mjs +34 -2
@@ -0,0 +1,198 @@
1
+ {
2
+ "schema": 1,
3
+ "sourceSha256": "969f1ba962a89ae5131c3a0dcf51311785536b13add3b4bec26b13b03b4008d6",
4
+ "scope": "Observed unsigned local build records; not an independent or signed attestation.",
5
+ "targets": {
6
+ "x86_64-unknown-linux-musl": {
7
+ "builderSha256": "08d11e39c450c0515fe68d9a23901ff18ab2f0421ae92c32cd4a9720b80c94a9",
8
+ "target": "x86_64-unknown-linux-musl",
9
+ "sourceSha256": "969f1ba962a89ae5131c3a0dcf51311785536b13add3b4bec26b13b03b4008d6",
10
+ "binarySha256": "828126da26891c8afa4cab9a8446fb6ff4a1883fd45a4556626942f0535b1f5d",
11
+ "packageSha256": "ec5f9b19deb93b4ce6530081efba7db209296965633feae6942482ab808dacc9",
12
+ "independentBuildsEqual": true,
13
+ "nativeSmoke": "passed",
14
+ "cargoSha256": "a670e02cfa39ac2e53f77a2d911ca1fc9e2c479b0603ec956625be1daf24e3af",
15
+ "rustcSha256": "b53b780f77f952062f8ca8a3b70aef2390b1e45ad91939be94afdc9543026853",
16
+ "linkerSha256": "a23ecab8ff08f09ad8c80602c2c5df7f49e09c25905cb8975902e101bf72635f",
17
+ "builds": [
18
+ {
19
+ "startedAt": "2026-10-23T00:35:51.485383+00:00",
20
+ "finishedAt": "2026-10-23T00:35:59.459126+00:00",
21
+ "exitCode": 0,
22
+ "binarySha256": "828126da26891c8afa4cab9a8446fb6ff4a1883fd45a4556626942f0535b1f5d",
23
+ "stdoutSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
24
+ "stderrSha256": "7045c86392225cf581d03a890ef12657603e871c0b79605027dc63ca52100a21",
25
+ "command": [
26
+ "CARGO",
27
+ "build",
28
+ "--manifest-path",
29
+ "SOURCE/Cargo.toml",
30
+ "--locked",
31
+ "--offline",
32
+ "--release",
33
+ "--target",
34
+ "x86_64-unknown-linux-musl"
35
+ ],
36
+ "compilerArguments": [
37
+ "--remap-path-prefix=SOURCE=kiokuko-guardrail",
38
+ "--remap-path-prefix=TEMP=build"
39
+ ]
40
+ },
41
+ {
42
+ "startedAt": "2026-10-23T00:35:59.462570+00:00",
43
+ "finishedAt": "2026-10-23T00:36:06.773213+00:00",
44
+ "exitCode": 0,
45
+ "binarySha256": "828126da26891c8afa4cab9a8446fb6ff4a1883fd45a4556626942f0535b1f5d",
46
+ "stdoutSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
47
+ "stderrSha256": "7aa8fe01514f9c3db6d2916eb61cf730b6f6d120db9d6bffa73e5b1717bad9b7",
48
+ "command": [
49
+ "CARGO",
50
+ "build",
51
+ "--manifest-path",
52
+ "SOURCE/Cargo.toml",
53
+ "--locked",
54
+ "--offline",
55
+ "--release",
56
+ "--target",
57
+ "x86_64-unknown-linux-musl"
58
+ ],
59
+ "compilerArguments": [
60
+ "--remap-path-prefix=SOURCE=kiokuko-guardrail",
61
+ "--remap-path-prefix=TEMP=build"
62
+ ]
63
+ }
64
+ ],
65
+ "scope": "Observed local build process and output hashes; unsigned, not an independent attestation. Cross-built outputs are not native-tested."
66
+ },
67
+ "aarch64-unknown-linux-musl": {
68
+ "builderSha256": "08d11e39c450c0515fe68d9a23901ff18ab2f0421ae92c32cd4a9720b80c94a9",
69
+ "target": "aarch64-unknown-linux-musl",
70
+ "sourceSha256": "969f1ba962a89ae5131c3a0dcf51311785536b13add3b4bec26b13b03b4008d6",
71
+ "binarySha256": "9b2fa78a3f13fbb4efd2dd5cf3f80892bf70ad30ee26c9b995ab2d2ebb203cf3",
72
+ "packageSha256": "bba8060d03dc3759acbdff31f480b031a63c0596a66df6c435b9211eaebda9bf",
73
+ "independentBuildsEqual": true,
74
+ "nativeSmoke": "not run",
75
+ "cargoSha256": "a670e02cfa39ac2e53f77a2d911ca1fc9e2c479b0603ec956625be1daf24e3af",
76
+ "rustcSha256": "b53b780f77f952062f8ca8a3b70aef2390b1e45ad91939be94afdc9543026853",
77
+ "linkerSha256": "9b6f51f983a8184f5d47d224e336cdb35171ad5b138981bc62a22e6d65e7b214",
78
+ "builds": [
79
+ {
80
+ "startedAt": "2026-10-23T00:35:51.510883+00:00",
81
+ "finishedAt": "2026-10-23T00:35:58.903705+00:00",
82
+ "exitCode": 0,
83
+ "binarySha256": "9b2fa78a3f13fbb4efd2dd5cf3f80892bf70ad30ee26c9b995ab2d2ebb203cf3",
84
+ "stdoutSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
85
+ "stderrSha256": "6a13e5ec1693ea9a1d3b4765bae1aaed1d9d8b74eeef1ed70b45a9d54347eb3b",
86
+ "command": [
87
+ "CARGO",
88
+ "build",
89
+ "--manifest-path",
90
+ "SOURCE/Cargo.toml",
91
+ "--locked",
92
+ "--offline",
93
+ "--release",
94
+ "--target",
95
+ "aarch64-unknown-linux-musl"
96
+ ],
97
+ "compilerArguments": [
98
+ "--remap-path-prefix=SOURCE=kiokuko-guardrail",
99
+ "--remap-path-prefix=TEMP=build",
100
+ "-C",
101
+ "linker-flavor=ld.lld",
102
+ "-C",
103
+ "link-self-contained=yes"
104
+ ]
105
+ },
106
+ {
107
+ "startedAt": "2026-10-23T00:35:58.910429+00:00",
108
+ "finishedAt": "2026-10-23T00:36:06.485552+00:00",
109
+ "exitCode": 0,
110
+ "binarySha256": "9b2fa78a3f13fbb4efd2dd5cf3f80892bf70ad30ee26c9b995ab2d2ebb203cf3",
111
+ "stdoutSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
112
+ "stderrSha256": "8585afc7adbaa104b28541d2aa8954fd42b6e074d49a06405aa33866ca399e47",
113
+ "command": [
114
+ "CARGO",
115
+ "build",
116
+ "--manifest-path",
117
+ "SOURCE/Cargo.toml",
118
+ "--locked",
119
+ "--offline",
120
+ "--release",
121
+ "--target",
122
+ "aarch64-unknown-linux-musl"
123
+ ],
124
+ "compilerArguments": [
125
+ "--remap-path-prefix=SOURCE=kiokuko-guardrail",
126
+ "--remap-path-prefix=TEMP=build",
127
+ "-C",
128
+ "linker-flavor=ld.lld",
129
+ "-C",
130
+ "link-self-contained=yes"
131
+ ]
132
+ }
133
+ ],
134
+ "scope": "Observed local build process and output hashes; unsigned, not an independent attestation. Cross-built outputs are not native-tested."
135
+ },
136
+ "aarch64-apple-darwin": {
137
+ "builderSha256": "08d11e39c450c0515fe68d9a23901ff18ab2f0421ae92c32cd4a9720b80c94a9",
138
+ "target": "aarch64-apple-darwin",
139
+ "sourceSha256": "969f1ba962a89ae5131c3a0dcf51311785536b13add3b4bec26b13b03b4008d6",
140
+ "binarySha256": "5e08acf36e6648c34f1fe317ff9806a76cbddd37434b41db5395e95dee0571fc",
141
+ "packageSha256": "267f330c690afc47b023fcd0fdbd68618e4c4fd77b8fdfccf68b13348888f551",
142
+ "independentBuildsEqual": true,
143
+ "nativeSmoke": "not run",
144
+ "cargoSha256": "a670e02cfa39ac2e53f77a2d911ca1fc9e2c479b0603ec956625be1daf24e3af",
145
+ "rustcSha256": "b53b780f77f952062f8ca8a3b70aef2390b1e45ad91939be94afdc9543026853",
146
+ "linkerSha256": "7c61539af19fa4082c94848f1c2b57b89e76dc6cfd5bd4c57764c3caf8f82272",
147
+ "builds": [
148
+ {
149
+ "startedAt": "2026-10-23T00:35:51.682721+00:00",
150
+ "finishedAt": "2026-10-23T00:36:03.586468+00:00",
151
+ "exitCode": 0,
152
+ "binarySha256": "5e08acf36e6648c34f1fe317ff9806a76cbddd37434b41db5395e95dee0571fc",
153
+ "stdoutSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
154
+ "stderrSha256": "564dc867aee91f90930d27c9a0678a511f7d69dd7ffbe855037378f5e7287741",
155
+ "command": [
156
+ "CARGO",
157
+ "build",
158
+ "--manifest-path",
159
+ "SOURCE/Cargo.toml",
160
+ "--locked",
161
+ "--offline",
162
+ "--release",
163
+ "--target",
164
+ "aarch64-apple-darwin"
165
+ ],
166
+ "compilerArguments": [
167
+ "--remap-path-prefix=SOURCE=kiokuko-guardrail",
168
+ "--remap-path-prefix=TEMP=build"
169
+ ]
170
+ },
171
+ {
172
+ "startedAt": "2026-10-23T00:36:03.607150+00:00",
173
+ "finishedAt": "2026-10-23T00:36:14.341218+00:00",
174
+ "exitCode": 0,
175
+ "binarySha256": "5e08acf36e6648c34f1fe317ff9806a76cbddd37434b41db5395e95dee0571fc",
176
+ "stdoutSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
177
+ "stderrSha256": "2e5c362a940ae334d3655e64dbf56d99da75266159942111261e2e4620eadcba",
178
+ "command": [
179
+ "CARGO",
180
+ "build",
181
+ "--manifest-path",
182
+ "SOURCE/Cargo.toml",
183
+ "--locked",
184
+ "--offline",
185
+ "--release",
186
+ "--target",
187
+ "aarch64-apple-darwin"
188
+ ],
189
+ "compilerArguments": [
190
+ "--remap-path-prefix=SOURCE=kiokuko-guardrail",
191
+ "--remap-path-prefix=TEMP=build"
192
+ ]
193
+ }
194
+ ],
195
+ "scope": "Observed local build process and output hashes; unsigned, not an independent attestation. Cross-built outputs are not native-tested."
196
+ }
197
+ }
198
+ }
@@ -2,6 +2,7 @@
2
2
  "schema": 1,
3
3
  "package": "kiokuko-guardrail",
4
4
  "version": "0.1.0",
5
+ "sourceSha256": "969f1ba962a89ae5131c3a0dcf51311785536b13add3b4bec26b13b03b4008d6",
5
6
  "protocol": {
6
7
  "path": "guardrail/protocols/coding-routine.lisp",
7
8
  "bytes": 948,
@@ -13,14 +14,15 @@
13
14
  "arch": "x64",
14
15
  "binary": "guardrail/x86_64-unknown-linux-musl/kiokuko-guardrail",
15
16
  "manifest": "guardrail/x86_64-unknown-linux-musl/manifest.json",
16
- "manifestSha256": "00e2c0ebf29867ff87e5c6e47c25e4c65d8884f70a8ace85f63717932356197c",
17
- "bytes": 516792,
18
- "sha256": "d262a712893945a1525dc9c8f19c806a44a832747879c1af8f6e33634b15636b",
17
+ "manifestSha256": "8e44a29510df7c251f2649fbc356ec52c2a32a83e024082111af67a9784086f9",
18
+ "bytes": 549560,
19
+ "sha256": "828126da26891c8afa4cab9a8446fb6ff4a1883fd45a4556626942f0535b1f5d",
19
20
  "verification": {
20
21
  "independent_builds_equal": true,
21
22
  "native_smoke": "passed",
22
- "package_sha256": "27273d1914e0c406425722973dec110da019c37ca6dd43afdff8f8c86013b868",
23
- "source_sha256": "c835782d88444f03f9bce01106b75b9c071fa18543d51e7fcb754f403ba6deab",
23
+ "source_sha256": "969f1ba962a89ae5131c3a0dcf51311785536b13add3b4bec26b13b03b4008d6",
24
+ "package_sha256": "ec5f9b19deb93b4ce6530081efba7db209296965633feae6942482ab808dacc9",
25
+ "status": "host smoke executed",
24
26
  "static_no_pt_interp": true
25
27
  }
26
28
  },
@@ -29,16 +31,16 @@
29
31
  "arch": "arm64",
30
32
  "binary": "guardrail/aarch64-unknown-linux-musl/kiokuko-guardrail",
31
33
  "manifest": "guardrail/aarch64-unknown-linux-musl/manifest.json",
32
- "manifestSha256": "2f1560bb9aa7b12ecba9000f0ae540598e433a06869138c861a68ecc26fd2787",
33
- "bytes": 445888,
34
- "sha256": "62b8f751d99e24c71d4223037221207ecd7877ddbf0ac3784e31df26c8af0beb",
34
+ "manifestSha256": "ae288c94f96eec22bdaa28ece87a97d7ca86209072fc825d510394b9b0e1b7f8",
35
+ "bytes": 468824,
36
+ "sha256": "9b2fa78a3f13fbb4efd2dd5cf3f80892bf70ad30ee26c9b995ab2d2ebb203cf3",
35
37
  "verification": {
36
38
  "independent_builds_equal": true,
37
39
  "native_smoke": "not run",
38
- "package_sha256": "9db094881a6fb18c3457f46e1c285dffe223414c982b2b4f5071babe182c5c02",
39
- "source_sha256": "c835782d88444f03f9bce01106b75b9c071fa18543d51e7fcb754f403ba6deab",
40
- "static_no_pt_interp": true,
41
- "status": "cross-built; not executed on ARM64 Linux"
40
+ "source_sha256": "969f1ba962a89ae5131c3a0dcf51311785536b13add3b4bec26b13b03b4008d6",
41
+ "package_sha256": "bba8060d03dc3759acbdff31f480b031a63c0596a66df6c435b9211eaebda9bf",
42
+ "status": "cross-built; native execution not run",
43
+ "static_no_pt_interp": true
42
44
  }
43
45
  },
44
46
  "aarch64-apple-darwin": {
@@ -46,137 +48,23 @@
46
48
  "arch": "arm64",
47
49
  "binary": "guardrail/aarch64-apple-darwin/kiokuko-guardrail",
48
50
  "manifest": "guardrail/aarch64-apple-darwin/manifest.json",
49
- "manifestSha256": "4e5e9e56dbfc3de7d70a703da3ec69c2ec4600cc9b5ae728606fe1ea47e85440",
50
- "bytes": 384672,
51
- "sha256": "c60cb16daa7a536d876017da01815fce3719bae16fc6cd42ea74df04f3e53af4",
51
+ "manifestSha256": "a810c8372c875efb7435931122aa3aa8a6afd556df61d9bf29d3b43656e44f29",
52
+ "bytes": 417712,
53
+ "sha256": "5e08acf36e6648c34f1fe317ff9806a76cbddd37434b41db5395e95dee0571fc",
52
54
  "verification": {
53
- "imports": [
54
- "/usr/lib/libSystem.B.dylib"
55
- ],
56
55
  "independent_builds_equal": true,
57
- "interpreter": "/usr/lib/dyld",
58
- "linker_ad_hoc_signature": true,
59
- "minimum_os": "13.0.0",
60
56
  "native_smoke": "not run",
61
- "package_sha256": "9ba9b967e8eae733972ce01d5841ddb432f1c863dd5f86792527266ddeb73530",
62
- "source_sha256": "c835782d88444f03f9bce01106b75b9c071fa18543d51e7fcb754f403ba6deab",
63
- "status": "cross-built; not executed on macOS"
57
+ "source_sha256": "969f1ba962a89ae5131c3a0dcf51311785536b13add3b4bec26b13b03b4008d6",
58
+ "package_sha256": "267f330c690afc47b023fcd0fdbd68618e4c4fd77b8fdfccf68b13348888f551",
59
+ "status": "cross-built; native execution not run"
64
60
  }
65
61
  }
66
62
  },
67
63
  "unavailableTargets": [],
68
- "scope": "Bundled artifact identity and declared build provenance only. Cross-built targets are not native execution evidence. No OS sandbox, signatures, deterministic inference, or restored Common Lisp heap is claimed.",
69
- "toolchainProvenance": {
70
- "toolchain-inputs": {
71
- "cc_binary_sha256": "a23ecab8ff08f09ad8c80602c2c5df7f49e09c25905cb8975902e101bf72635f",
72
- "cc_version": "cc (Debian 14.2.0-19) 14.2.0",
73
- "components": [
74
- {
75
- "sha256": "77171ba2a0345fdf2abc4fedda55d6de078dae7a68527c28be8c77dcc9604bd5",
76
- "url": "https://static.rust-lang.org/dist/2026-10-01/rustc-1.99.0-x86_64-unknown-linux-gnu.tar.xz"
77
- },
78
- {
79
- "sha256": "3e58dff2d0b72196b5ea4e90536e174d400de88564a52694686b81e091169933",
80
- "url": "https://static.rust-lang.org/dist/2026-10-01/rust-std-1.99.0-x86_64-unknown-linux-gnu.tar.xz"
81
- },
82
- {
83
- "sha256": "d7674918d28093097614cd9728b6ca60db9ea3038f640f0bd1e9a4188c7568ce",
84
- "url": "https://static.rust-lang.org/dist/2026-10-01/cargo-1.99.0-x86_64-unknown-linux-gnu.tar.xz"
85
- },
86
- {
87
- "sha256": "b22c09ab9e258ec5571da170d88bd1624a4ea602e6d70d95720c5b47494cadce",
88
- "url": "https://static.rust-lang.org/dist/2026-10-01/rustfmt-1.99.0-x86_64-unknown-linux-gnu.tar.xz"
89
- },
90
- {
91
- "sha256": "b106b0aa4565cc3525fd3161c69203a9e39044e6e6b4d618f261c3eeda14ad50",
92
- "url": "https://static.rust-lang.org/dist/2026-10-01/rust-std-1.99.0-x86_64-unknown-linux-musl.tar.xz"
93
- }
94
- ],
95
- "ld_binary_sha256": "d2766988b6a1b1d1518cdc09242e726d1f24e151e16410ada3092b11ffd9081b",
96
- "ld_version": "GNU ld (GNU Binutils for Debian) 2.44",
97
- "official_manifest_sha256": "ce6dddc886364f8d786514771212cebe9b731ba82d6b859951c6b0ccc516b6a2",
98
- "scope": "Recorded cloud toolchain inputs. This is not a fully isolated Guix derivation or a cross-platform deterministic inference claim."
99
- },
100
- "macos-cross-verification": {
101
- "components": [
102
- {
103
- "sha256": "1cbe9df9f27e6b78d14ccbca43b6703a404ef79ef1c463de901d7f088d4e2026",
104
- "url": "https://ziglang.org/download/0.17.0/zig-x86_64-linux-0.17.0.tar.xz"
105
- },
106
- {
107
- "sha256": "a7c6de8aa21e7c31163a7656295b321bb85f5dce55ed8ea95ac9ac561202bb5b",
108
- "url": "https://static.rust-lang.org/dist/2026-10-01/rust-std-1.99.0-aarch64-apple-darwin.tar.xz"
109
- },
110
- {
111
- "sha256": "18ee81961a73c3ae966ecb1e8f6096438c90aeefece8856201a6ecc17f5bc850",
112
- "url": "https://static.rust-lang.org/dist/2026-10-01/rust-std-1.99.0-x86_64-apple-darwin.tar.xz"
113
- }
114
- ],
115
- "macos": [
116
- {
117
- "binary_bytes": 384672,
118
- "binary_sha256": "c60cb16daa7a536d876017da01815fce3719bae16fc6cd42ea74df04f3e53af4",
119
- "imports": [
120
- "/usr/lib/libSystem.B.dylib"
121
- ],
122
- "independent_builds_equal": true,
123
- "interpreter": "/usr/lib/dyld",
124
- "linker_ad_hoc_signature": true,
125
- "minimum_os": "13.0.0",
126
- "native_smoke": "not run",
127
- "package_sha256": "9ba9b967e8eae733972ce01d5841ddb432f1c863dd5f86792527266ddeb73530",
128
- "source_sha256": "c835782d88444f03f9bce01106b75b9c071fa18543d51e7fcb754f403ba6deab",
129
- "status": "cross-built; not executed on macOS",
130
- "target": "aarch64-apple-darwin"
131
- },
132
- {
133
- "binary_bytes": 414856,
134
- "binary_sha256": "673e9b26eda59ba18e217034c6502daa65a2ab10f22403685c4aaf42181631f0",
135
- "imports": [
136
- "/usr/lib/libSystem.B.dylib"
137
- ],
138
- "independent_builds_equal": true,
139
- "interpreter": "/usr/lib/dyld",
140
- "linker_ad_hoc_signature": false,
141
- "minimum_os": "13.0.0",
142
- "native_smoke": "not run",
143
- "package_sha256": "fb3a2c767f2a077dbe86af44814b93ae9ef81722359423882c029db0f5afdcb3",
144
- "source_sha256": "c835782d88444f03f9bce01106b75b9c071fa18543d51e7fcb754f403ba6deab",
145
- "status": "cross-built; not executed on macOS",
146
- "target": "x86_64-apple-darwin"
147
- }
148
- ],
149
- "scope": "Cloud cross-build and Mach-O structural/import/reproducibility checks only. No native macOS execution, notarization, or external-effect determinism claim.",
150
- "zig_binary_sha256": "7c61539af19fa4082c94848f1c2b57b89e76dc6cfd5bd4c57764c3caf8f82272",
151
- "zig_version": "0.17.0"
152
- },
153
- "arm-cross-verification": {
154
- "component": {
155
- "sha256": "ea8fd309578a09c9e12401621a470e6d6b1047f25933207fb8a39d66647d4561",
156
- "url": "https://static.rust-lang.org/dist/2026-10-01/rust-std-1.99.0-aarch64-unknown-linux-musl.tar.xz"
157
- },
158
- "linker_binary_sha256": "4739514e3484915747c34b35007cd990235cc6b490b2d0525a61ac402ca16af9",
159
- "linker_version": "LLD 23.1.1 (/checkout/src/llvm-project/llvm 1b9c0d5ff9bbe7634aead059efe6b11a7eeba145) (compatible with GNU linkers)",
160
- "linux_arm64": {
161
- "binary_bytes": 445888,
162
- "binary_sha256": "62b8f751d99e24c71d4223037221207ecd7877ddbf0ac3784e31df26c8af0beb",
163
- "independent_builds_equal": true,
164
- "native_smoke": "not run",
165
- "package_sha256": "9db094881a6fb18c3457f46e1c285dffe223414c982b2b4f5071babe182c5c02",
166
- "source_sha256": "c835782d88444f03f9bce01106b75b9c071fa18543d51e7fcb754f403ba6deab",
167
- "static_no_pt_interp": true,
168
- "status": "cross-built; not executed on ARM64 Linux",
169
- "target": "aarch64-unknown-linux-musl"
170
- },
171
- "macos_ad_hoc_signature_checks": [
172
- {
173
- "native_execution": "not run",
174
- "sha256": "c60cb16daa7a536d876017da01815fce3719bae16fc6cd42ea74df04f3e53af4",
175
- "sha256_code_pages_verified": true,
176
- "target": "aarch64-apple-darwin"
177
- }
178
- ],
179
- "scope": "Cross-build and ELF/Mach-O structural/hash verification only; ARM64 Linux and macOS native execution not run."
180
- }
64
+ "scope": "Current-source distribution integrity and observed unsigned build processes. Cross-built ARM64 targets have no native execution claim.",
65
+ "buildRecords": {
66
+ "path": "guardrail/build-records.json",
67
+ "sha256": "eed06a954d2ec6e26bfc3bf5ce1135715916b5a7301ed5b511a7590370bce61d",
68
+ "bytes": 8574
181
69
  }
182
70
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "artifacts": {
3
3
  "README.md": {
4
- "bytes": 10748,
5
- "sha256": "4b5d7c785121c865945f6379de31565c6aa9218f9d4333519ce3d450e85d0c55"
4
+ "bytes": 12849,
5
+ "sha256": "485609fcb1a844bdc7b9098da622001a0c15430f835c33ba9e6ea5c1458b1cdb"
6
6
  },
7
7
  "bin/kiokuko-guardrail": {
8
- "bytes": 516792,
9
- "sha256": "d262a712893945a1525dc9c8f19c806a44a832747879c1af8f6e33634b15636b"
8
+ "bytes": 549560,
9
+ "sha256": "828126da26891c8afa4cab9a8446fb6ff4a1883fd45a4556626942f0535b1f5d"
10
10
  },
11
11
  "protocols/coding-routine.lisp": {
12
12
  "bytes": 948,
@@ -14,12 +14,9 @@
14
14
  }
15
15
  },
16
16
  "build_inputs": {
17
- "cargo_sha256": "e951141cc55a6cd7b9876d187bd30a3720e6086b99413af95e3b8de1cdd72f14",
18
- "cargo_version": "cargo 1.99.0 (5f94df478 2026-08-27)",
17
+ "cargo_sha256": "a670e02cfa39ac2e53f77a2d911ca1fc9e2c479b0603ec956625be1daf24e3af",
18
+ "cargo_version": "cargo 1.99.1 (5f94df478 2026-08-27)",
19
19
  "command": [
20
- "env",
21
- "SOURCE_DATE_EPOCH=0",
22
- "RUSTFLAGS=--remap-path-prefix=SOURCE=kiokuko-guardrail --remap-path-prefix=TEMP=build",
23
20
  "cargo",
24
21
  "build",
25
22
  "--manifest-path",
@@ -30,34 +27,36 @@
30
27
  "--target",
31
28
  "x86_64-unknown-linux-musl"
32
29
  ],
33
- "rustc_sha256": "f3834d26669b03f6855fa54bd2381443123e860167bc0c7a8dd137e5cf6e5e4f",
34
- "rustc_version": "rustc 1.99.0 (b940084d7 2026-09-28)\nbinary: rustc\ncommit-hash: b940084d7eb6a299eb4bfeb8e34901bc051e7ac4\ncommit-date: 2026-09-28\nhost: x86_64-unknown-linux-gnu\nrelease: 1.99.0\nLLVM version: 23.1.1",
30
+ "rustc_sha256": "b53b780f77f952062f8ca8a3b70aef2390b1e45ad91939be94afdc9543026853",
31
+ "rustc_version": "rustc 1.99.1 (58cf8f9c3 2026-10-13)\nbinary: rustc\ncommit-hash: 58cf8f9c35b355199727627d07ae34a4e2846d67\ncommit-date: 2026-10-13\nhost: x86_64-unknown-linux-gnu\nrelease: 1.99.1\nLLVM version: 23.1.1",
35
32
  "source_date_epoch": 0,
36
33
  "target": "x86_64-unknown-linux-musl"
37
34
  },
38
35
  "package": "kiokuko-guardrail",
39
36
  "schema": 1,
40
37
  "scope": "Declared source/compiler/build inputs and artifact identity. This is not a signature, sandbox, or a claim of deterministic model inference or identical binaries across target operating systems.",
41
- "source_sha256": "c835782d88444f03f9bce01106b75b9c071fa18543d51e7fcb754f403ba6deab",
38
+ "source_sha256": "969f1ba962a89ae5131c3a0dcf51311785536b13add3b4bec26b13b03b4008d6",
42
39
  "sources": {
43
40
  "BOOTSTRAP.md": "b9d0db4c38561d6173e2396bfca979743c66fe64dc15f8c10931d5ae02800a95",
44
41
  "Cargo.lock": "16f51b3ffc20349a69b4b580ea59d2354c9d496911c7e530509492d9b46ecb3a",
45
42
  "Cargo.toml": "1cc0b8df18413f925841e6acddfe14a49f7e8dd4236660eb9d822f1ccdcc9d4e",
46
- "README.md": "4b5d7c785121c865945f6379de31565c6aa9218f9d4333519ce3d450e85d0c55",
43
+ "README.md": "485609fcb1a844bdc7b9098da622001a0c15430f835c33ba9e6ea5c1458b1cdb",
47
44
  "examples/coding-routine.lisp": "82b56af81d12a8cab8352b0825c913f00f73708b2339a9b567cc6f4d4e52da49",
48
45
  "scripts/package.py": "159b8cdda58b422a60aee95554eb0febc3b520d7ef5d5a4bac1cdd046a514e16",
49
46
  "scripts/test.py": "d8ed547d0943f8b23838b146c6e1d31ad9004c525868d19a2fffafef67e6b6c9",
50
47
  "src/digest.rs": "a46aa8ac0ba3f8e29e268a495723b6d49a4741399bb595c34a3d021dc295c800",
51
48
  "src/eval.rs": "7742caeeac426783647363242d93845369c018b00528312573f1cdc668c22ec3",
52
- "src/host.rs": "de9f34ad6ce8246e6f80cbf3d4f56bb07ed8043b17232135755a5e3ee5602cf5",
49
+ "src/host.rs": "a8a850ff7b41bd6169ed79bf745fe0b1d8854545ceb6a745cb96428472489eac",
53
50
  "src/lib.rs": "2f591de0e7520a313da9668491da106d904bb19ef2384c717e87cd06bac665a3",
54
51
  "src/main.rs": "16a3a42d8338ca20e66173648c0a407b24724eeb1a4b3710c8a3b90b5aade10f",
55
52
  "src/protocol.rs": "d9009f5977707141f3547902a07f2f2c5455e4b9516b01a9ba4eb22a82af2a39",
56
53
  "src/reader.rs": "7bc1ff7aece72fc44ac43d5a207a3c8f2fd009eae41cb4b4dadb4eb9436d15f3",
57
- "tests/cli.rs": "22955ba315007b4a18409b31439345eb84ce0a62b88658cf440d513b10811357",
54
+ "tests/cli.rs": "d07df01919bdbcc78f6960ace69b3df38cb90bd4a28fb51de1d004382ac2cec9",
58
55
  "tests/digest.rs": "63a3a1b4963ef03260cae4ff9bfeed3596a445dc8df74ecc91b5750d3a6fa28d",
59
56
  "tests/edge_contract.rs": "4f9c7b068db44e9beceb811ceac4a5e8d6cf7cda51eee5a2449f29ab0fa6ade9",
60
57
  "tests/evaluator.rs": "a09c811494615b01e19ccef78491b8bbfee07fede8dcbee59f384fe59e145401",
58
+ "tests/evidence_schema.rs": "4f8e24d88c5148b6782edb06977d6ffa352fa27bd51a53589e92360ffa7013bc",
59
+ "tests/fixtures/schema2-green.lisp": "ce937e565ccb9c6c7d5e00afe516f222a226e2a2b8152e41e1d8776f89602745",
61
60
  "tests/packaging.rs": "61ae1bfed0d4f31748ce2af58953387045f4231370d46cb809f26e93aea1e033",
62
61
  "tests/protocol.rs": "8f6b7ad5842f5b596efe8da01bba84f39fcd8d6426fde6932cb2a5cbb44d589f",
63
62
  "tests/reader.rs": "249092f56768a6511dbb15825be55f4cf0105269cb9dba1d6f8169ff66d44ab5",
@@ -0,0 +1,21 @@
1
+ -- Separate from owned execution: covers only plugin-observed managed boundaries.
2
+ CREATE TABLE dsh_managed_journal_keys (id INTEGER PRIMARY KEY CHECK(id=1), secret TEXT NOT NULL);
3
+ CREATE TABLE dsh_managed_scopes (
4
+ scope_id TEXT PRIMARY KEY, scope_json TEXT NOT NULL, sealed INTEGER NOT NULL DEFAULT 0,
5
+ collector_complete INTEGER NOT NULL DEFAULT 1, created_at INTEGER NOT NULL
6
+ );
7
+ CREATE TABLE dsh_managed_operations (
8
+ operation_id TEXT PRIMARY KEY, scope_id TEXT NOT NULL REFERENCES dsh_managed_scopes(scope_id),
9
+ sequence INTEGER NOT NULL, state TEXT NOT NULL, operation_json TEXT NOT NULL,
10
+ UNIQUE(scope_id,sequence)
11
+ );
12
+ CREATE TABLE dsh_managed_transitions (
13
+ operation_id TEXT NOT NULL REFERENCES dsh_managed_operations(operation_id),
14
+ sequence INTEGER NOT NULL, transition_json TEXT NOT NULL, PRIMARY KEY(operation_id,sequence)
15
+ );
16
+ CREATE TABLE dsh_managed_snapshots (
17
+ snapshot_id TEXT PRIMARY KEY, scope_id TEXT NOT NULL REFERENCES dsh_managed_scopes(scope_id),
18
+ snapshot_json TEXT NOT NULL, created_at INTEGER NOT NULL, retained INTEGER NOT NULL DEFAULT 0
19
+ );
20
+ CREATE INDEX dsh_managed_operations_scope ON dsh_managed_operations(scope_id);
21
+ CREATE UNIQUE INDEX dsh_managed_operations_original ON dsh_managed_operations(json_extract(operation_json,'$.originalRef')) WHERE json_extract(operation_json,'$.originalRef') IS NOT NULL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiokuko-dsh",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "Kiokuko plugin for DeepSeek Harness",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -346,7 +346,7 @@
346
346
  },
347
347
  "guardrail": {
348
348
  "manifest": "guardrail/manifest.json",
349
- "manifestSha256": "8da49d55f6bb7b8ccf2717f6680e439adda3d7347fb77de39f77566dd6a6d2b1",
349
+ "manifestSha256": "d001ddccda7a8c47abcb6ea2f5b67c1fd4452593e3750c3bd20ffa087a773297",
350
350
  "availability": "Bundled Linux x64/arm64 static musl and macOS Apple Silicon (ARM64). Intel Mac is unsupported. Only Linux x64 native smoke was recorded for the bundled release. Missing or invalid host artifact blocks protocol enrollment.",
351
351
  "verification": "npm run verify:guardrail validates bundled identities without executing cross-built binaries; npm run check:guardrail checks current host availability."
352
352
  }
@@ -11,3 +11,6 @@ export interface ResolvedGuardrail {
11
11
  }
12
12
  /** Verify bundled file identities and format synchronously; no execution or network fallback. */
13
13
  export function resolveGuardrail(root: string, options?: GuardrailResolveOptions): ResolvedGuardrail
14
+
15
+ /** Verify the frozen source and release provenance in a repository checkout. */
16
+ export function verifyGuardrailSource(root: string): string
@@ -1,4 +1,4 @@
1
- import { constants, closeSync, fstatSync, lstatSync, openSync, readFileSync, realpathSync } from 'node:fs'
1
+ import { constants, closeSync, fstatSync, lstatSync, openSync, readFileSync, readdirSync, existsSync, realpathSync } from 'node:fs'
2
2
  import { createHash } from 'node:crypto'
3
3
  import { dirname, join, resolve } from 'node:path'
4
4
  import { fileURLToPath } from 'node:url'
@@ -93,6 +93,7 @@ function indexAt(root) {
93
93
  if (digest(bytes) !== metadata.guardrail.manifestSha256) fail('package manifest digest integrity mismatch')
94
94
  const index = json(bytes, 'guardrail manifest')
95
95
  if (index.schema !== 1 || index.package !== 'kiokuko-guardrail' || typeof index.version !== 'string' || !/^[0-9]+\.[0-9]+\.[0-9]+(?:[-+][a-zA-Z0-9.-]+)?$/u.test(index.version) || !record(index.targets) || !record(index.protocol) || index.protocol.path !== 'guardrail/protocols/coding-routine.lisp') fail('guardrail manifest identity/schema mismatch')
96
+ if (!hex(index.sourceSha256) || !record(index.buildRecords) || index.buildRecords.path !== 'guardrail/build-records.json' || !hex(index.buildRecords.sha256)) fail('missing release source/build record identity')
96
97
  if (Object.keys(index.targets).length === 0) fail('guardrail manifest declares no bundled targets')
97
98
  if (!Array.isArray(index.unavailableTargets) || Object.keys(index.targets).some(target => !Object.values(targets).includes(target)) || index.unavailableTargets.some(target => !Object.values(targets).includes(target) || target in index.targets)) fail('guardrail manifest target declaration mismatch')
98
99
  return { index, manifestDigest: digest(bytes) }
@@ -111,15 +112,45 @@ export function resolveGuardrail(root, options = {}) {
111
112
  const releaseBytes = regularBytes(root, entry.manifest, 1024 * 1024)
112
113
  if (digest(releaseBytes) !== entry.manifestSha256) fail('target manifest digest integrity mismatch')
113
114
  const release = json(releaseBytes, 'target manifest')
114
- if (release.schema !== 1 || release.package !== index.package || release.target !== target || release.version !== index.version || release.build_inputs?.target !== target || !hex(release.source_sha256)) fail('release manifest identity mismatch')
115
+ if (release.schema !== 1 || release.package !== index.package || release.target !== target || release.version !== index.version || release.build_inputs?.target !== target || release.source_sha256 !== index.sourceSha256) fail('release manifest identity mismatch')
115
116
  const binary = regularBytes(root, entry.binary, 16 * 1024 * 1024, true)
116
117
  matches(binary, entry, 'engine'); matches(binary, release.artifacts?.['bin/kiokuko-guardrail'], 'release engine')
117
118
  executableHeader(binary, target)
119
+ const recordsBytes = regularBytes(root, index.buildRecords.path, 1024 * 1024)
120
+ matches(recordsBytes, index.buildRecords, 'build records')
121
+ const records = json(recordsBytes, 'build records'), build = records.targets?.[target]
122
+ if (records.schema !== 1 || records.sourceSha256 !== index.sourceSha256 || !record(build) || build.sourceSha256 !== index.sourceSha256 || build.target !== target || build.binarySha256 !== digest(binary) || build.packageSha256 !== entry.verification?.package_sha256 || build.independentBuildsEqual !== true || !Array.isArray(build.builds) || build.builds.length !== 2 || build.builds.some(run => !record(run) || run.exitCode !== 0 || run.binarySha256 !== digest(binary) || !hex(run.stdoutSha256) || !hex(run.stderrSha256)) || build.nativeSmoke !== entry.verification?.native_smoke || entry.verification?.source_sha256 !== index.sourceSha256 || !hex(build.builderSha256) || !hex(build.linkerSha256) || build.cargoSha256 !== release.build_inputs.cargo_sha256 || build.rustcSha256 !== release.build_inputs.rustc_sha256) fail('build record/source/output integrity mismatch')
118
123
  const protocol = regularBytes(root, index.protocol.path, 256 * 1024)
119
124
  matches(protocol, index.protocol, 'protocol'); matches(protocol, release.artifacts?.['protocols/coding-routine.lisp'], 'release protocol')
120
125
  return { binary: join(root, entry.binary), protocol: join(root, index.protocol.path), engineDigest: digest(binary), protocolFileDigest: digest(protocol), manifestDigest, version: index.version, target }
121
126
  }
122
127
 
128
+ /** Repository-only source check. Packaged consumers deliberately do not carry Rust source. */
129
+ export function verifyGuardrailSource(root) {
130
+ root = resolve(root)
131
+ const { index } = indexAt(root)
132
+ const crate = join(root, 'crates/guardrail')
133
+ if (!existsSync(crate)) fail('source verification requires the repository crate')
134
+ function walk(prefix = '') {
135
+ return readdirSync(join(crate, prefix), { withFileTypes: true }).flatMap(entry => {
136
+ const path = prefix ? `${prefix}/${entry.name}` : entry.name
137
+ if (entry.isSymbolicLink()) fail(`source symlink is forbidden: ${path}`)
138
+ return entry.isDirectory() ? walk(path) : [path]
139
+ }).sort()
140
+ }
141
+ const source = json(regularBytes(root, 'crates/guardrail-release/source-manifest.json', 1024 * 1024), 'source manifest')
142
+ const files = Object.fromEntries(walk().map(path => [path, digest(regularBytes(crate, path, 1024 * 1024))]))
143
+ if (JSON.stringify(files) !== JSON.stringify(source.files) || digest(JSON.stringify(files)) !== source.sourceSha256 || source.sourceSha256 !== index.sourceSha256) fail('current source identity mismatch')
144
+ const provenance = json(regularBytes(root, 'crates/guardrail-release/release-provenance.json', 1024 * 1024), 'release provenance')
145
+ if (provenance.source_sha256 !== source.sourceSha256 || provenance.build_records_sha256 !== index.buildRecords.sha256) fail('release provenance source/build record mismatch')
146
+ if (provenance.build_runner_sha256 !== digest(regularBytes(root, 'crates/guardrail-release/release.py', 1024 * 1024))) fail('build runner identity mismatch')
147
+ for (const [target, entry] of Object.entries(index.targets)) {
148
+ const releaseBytes = regularBytes(root, entry.manifest, 1024 * 1024), release = json(releaseBytes, 'target manifest')
149
+ if (JSON.stringify(release.sources) !== JSON.stringify(files) || release.source_sha256 !== source.sourceSha256 || provenance.package_manifests?.[target]?.sha256 !== digest(releaseBytes)) fail('target current source/provenance mismatch')
150
+ }
151
+ return source.sourceSha256
152
+ }
153
+
123
154
  if (process.argv[1] && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) {
124
155
  try {
125
156
  const root = resolve(dirname(fileURLToPath(import.meta.url)), '..')
@@ -128,6 +159,7 @@ if (process.argv[1] && realpathSync(process.argv[1]) === fileURLToPath(import.me
128
159
  if (process.argv[2] === '--check-host') console.log(JSON.stringify(resolveGuardrail(root)))
129
160
  else {
130
161
  const { index } = indexAt(root)
162
+ if (existsSync(join(root, 'crates/guardrail'))) verifyGuardrailSource(root)
131
163
  for (const entry of Object.values(index.targets)) resolveGuardrail(root, { platform: entry.platform, arch: entry.arch })
132
164
  if (!quiet) console.log(JSON.stringify({ verifiedTargets: Object.keys(index.targets), unavailableTargets: index.unavailableTargets, nativeExecutionClaim: false, verification: Object.fromEntries(Object.entries(index.targets).map(([target, entry]) => [target, entry.verification])) }))
133
165
  }