@jeger-ai/opengantry 3.0.1 → 3.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 (116) hide show
  1. package/LICENSE +10 -27
  2. package/README.md +64 -16
  3. package/dist/cli/commands/attest.d.ts +8 -0
  4. package/dist/cli/commands/attest.d.ts.map +1 -0
  5. package/dist/cli/commands/attest.js +19 -0
  6. package/dist/cli/commands/attest.js.map +1 -0
  7. package/dist/cli/commands/doctor.d.ts +4 -2
  8. package/dist/cli/commands/doctor.d.ts.map +1 -1
  9. package/dist/cli/commands/doctor.js +1 -1
  10. package/dist/cli/commands/doctor.js.map +1 -1
  11. package/dist/cli/lib/attest-mission.d.ts +13 -0
  12. package/dist/cli/lib/attest-mission.d.ts.map +1 -0
  13. package/dist/cli/lib/attest-mission.js +22 -0
  14. package/dist/cli/lib/attest-mission.js.map +1 -0
  15. package/dist/cli/lib/attestation-receipt.d.ts +40 -0
  16. package/dist/cli/lib/attestation-receipt.d.ts.map +1 -0
  17. package/dist/cli/lib/attestation-receipt.js +110 -0
  18. package/dist/cli/lib/attestation-receipt.js.map +1 -0
  19. package/dist/cli/lib/canonical-json.d.ts +3 -0
  20. package/dist/cli/lib/canonical-json.d.ts.map +1 -0
  21. package/dist/cli/lib/canonical-json.js +13 -0
  22. package/dist/cli/lib/canonical-json.js.map +1 -0
  23. package/dist/cli/lib/constants.d.ts +2 -0
  24. package/dist/cli/lib/constants.d.ts.map +1 -1
  25. package/dist/cli/lib/constants.js +2 -0
  26. package/dist/cli/lib/constants.js.map +1 -1
  27. package/dist/cli/lib/doctor-core.d.ts +1 -1
  28. package/dist/cli/lib/doctor-core.d.ts.map +1 -1
  29. package/dist/cli/lib/doctor-core.js +25 -3
  30. package/dist/cli/lib/doctor-core.js.map +1 -1
  31. package/dist/cli/lib/draft-token.d.ts +1 -2
  32. package/dist/cli/lib/draft-token.d.ts.map +1 -1
  33. package/dist/cli/lib/draft-token.js +2 -12
  34. package/dist/cli/lib/draft-token.js.map +1 -1
  35. package/dist/cli/lib/flight-telemetry-doctor.d.ts +3 -0
  36. package/dist/cli/lib/flight-telemetry-doctor.d.ts.map +1 -0
  37. package/dist/cli/lib/flight-telemetry-doctor.js +25 -0
  38. package/dist/cli/lib/flight-telemetry-doctor.js.map +1 -0
  39. package/dist/cli/lib/gxt-config.d.ts +11 -0
  40. package/dist/cli/lib/gxt-config.d.ts.map +1 -1
  41. package/dist/cli/lib/gxt-config.js +10 -0
  42. package/dist/cli/lib/gxt-config.js.map +1 -1
  43. package/dist/cli/lib/kpi-advisory-findings.d.ts +5 -0
  44. package/dist/cli/lib/kpi-advisory-findings.d.ts.map +1 -0
  45. package/dist/cli/lib/kpi-advisory-findings.js +16 -0
  46. package/dist/cli/lib/kpi-advisory-findings.js.map +1 -0
  47. package/dist/cli/lib/kpi-engine.d.ts +2 -1
  48. package/dist/cli/lib/kpi-engine.d.ts.map +1 -1
  49. package/dist/cli/lib/kpi-engine.js +36 -20
  50. package/dist/cli/lib/kpi-engine.js.map +1 -1
  51. package/dist/cli/lib/mcp-attest.d.ts +6 -0
  52. package/dist/cli/lib/mcp-attest.d.ts.map +1 -0
  53. package/dist/cli/lib/mcp-attest.js +15 -0
  54. package/dist/cli/lib/mcp-attest.js.map +1 -0
  55. package/dist/cli/lib/mcp-tools-register.d.ts.map +1 -1
  56. package/dist/cli/lib/mcp-tools-register.js +13 -0
  57. package/dist/cli/lib/mcp-tools-register.js.map +1 -1
  58. package/dist/cli/lib/policy-digest-doctor.d.ts +11 -0
  59. package/dist/cli/lib/policy-digest-doctor.d.ts.map +1 -0
  60. package/dist/cli/lib/policy-digest-doctor.js +37 -0
  61. package/dist/cli/lib/policy-digest-doctor.js.map +1 -0
  62. package/dist/cli/lib/receipt-signing.d.ts +12 -0
  63. package/dist/cli/lib/receipt-signing.d.ts.map +1 -0
  64. package/dist/cli/lib/receipt-signing.js +150 -0
  65. package/dist/cli/lib/receipt-signing.js.map +1 -0
  66. package/dist/cli/lib/runtime-exec.d.ts +1 -0
  67. package/dist/cli/lib/runtime-exec.d.ts.map +1 -1
  68. package/dist/cli/lib/runtime-exec.js +21 -17
  69. package/dist/cli/lib/runtime-exec.js.map +1 -1
  70. package/dist/cli/lib/types.d.ts +1 -0
  71. package/dist/cli/lib/types.d.ts.map +1 -1
  72. package/dist/cli/lib/verify-engine.d.ts +2 -1
  73. package/dist/cli/lib/verify-engine.d.ts.map +1 -1
  74. package/dist/cli/lib/verify-engine.js +13 -2
  75. package/dist/cli/lib/verify-engine.js.map +1 -1
  76. package/dist/cli/lib/verify-options.d.ts +4 -0
  77. package/dist/cli/lib/verify-options.d.ts.map +1 -1
  78. package/dist/cli/lib/verify-options.js.map +1 -1
  79. package/dist/cli/lib/verify-payload.d.ts +1 -0
  80. package/dist/cli/lib/verify-payload.d.ts.map +1 -1
  81. package/dist/cli/lib/verify-payload.js +4 -0
  82. package/dist/cli/lib/verify-payload.js.map +1 -1
  83. package/dist/cli/lib/verify-presenters.d.ts +10 -5
  84. package/dist/cli/lib/verify-presenters.d.ts.map +1 -1
  85. package/dist/cli/lib/verify-presenters.js +22 -26
  86. package/dist/cli/lib/verify-presenters.js.map +1 -1
  87. package/dist/cli/lib/verify-receipt.d.ts +11 -0
  88. package/dist/cli/lib/verify-receipt.d.ts.map +1 -0
  89. package/dist/cli/lib/verify-receipt.js +40 -0
  90. package/dist/cli/lib/verify-receipt.js.map +1 -0
  91. package/dist/cli/lib/verify-run.d.ts.map +1 -1
  92. package/dist/cli/lib/verify-run.js +44 -6
  93. package/dist/cli/lib/verify-run.js.map +1 -1
  94. package/dist/cli/lib/version.gen.d.ts +1 -1
  95. package/dist/cli/lib/version.gen.js +1 -1
  96. package/dist/cli/lib/working-digests.d.ts +8 -0
  97. package/dist/cli/lib/working-digests.d.ts.map +1 -0
  98. package/dist/cli/lib/working-digests.js +21 -0
  99. package/dist/cli/lib/working-digests.js.map +1 -0
  100. package/dist/cli/program-core.d.ts.map +1 -1
  101. package/dist/cli/program-core.js +8 -2
  102. package/dist/cli/program-core.js.map +1 -1
  103. package/dist/cli/program-workflow.d.ts.map +1 -1
  104. package/dist/cli/program-workflow.js +21 -0
  105. package/dist/cli/program-workflow.js.map +1 -1
  106. package/package.json +2 -2
  107. package/templates/.gitagent/config.json +3 -0
  108. package/templates/.gitagent/foreman/SUBSTRATE.version.json +1 -1
  109. package/templates/.gitagent/planner/KPI-REPORT.schema.yaml +4 -0
  110. package/templates/.gitagent/planner/PERFORMANCE.md +18 -0
  111. package/templates/.gitagent/planner/PERFORMANCE_RUBRIC.template.md +32 -0
  112. package/templates/.githooks/pre-push +5 -5
  113. package/templates/.github/workflows/gxt-validate.yml +7 -4
  114. package/templates/integrations/compatibility.json +1 -1
  115. package/templates/scripts/lib/trusted-automation.mjs +56 -9
  116. package/templates/scripts/verify-pr-missions.sh +3 -3
package/LICENSE CHANGED
@@ -203,33 +203,16 @@
203
203
 
204
204
  END OF TERMS AND CONDITIONS
205
205
 
206
+ Copyright 2026 Juergen Eger
206
207
 
207
- APPENDIX: How to apply the Apache License to your work.
208
+ Licensed under the Apache License, Version 2.0 (the "License");
209
+ you may not use this file except in compliance with the License.
210
+ You may obtain a copy of the License at
208
211
 
212
+ http://www.apache.org/licenses/LICENSE-2.0
209
213
 
210
- To apply the Apache License to your work, attach the following
211
- boilerplate notice, with the fields enclosed by brackets "[]"
212
- replaced with your own identifying information. (Don't include
213
- the brackets!) The text should be enclosed in the appropriate
214
- comment syntax for the file format. We also recommend that a
215
- file or class name and description of purpose be included on the
216
- same "printed page" as the copyright notice for easier
217
- identification within third-party archives.
218
-
219
-
220
- Copyright [yyyy] [name of copyright owner]
221
-
222
-
223
- Licensed under the Apache License, Version 2.0 (the "License");
224
- you may not use this file except in compliance with the License.
225
- You may obtain a copy of the License at
226
-
227
-
228
- http://www.apache.org/licenses/LICENSE-2.0
229
-
230
-
231
- Unless required by applicable law or agreed to in writing, software
232
- distributed under the License is distributed on an "AS IS" BASIS,
233
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
234
- See the License for the specific language governing permissions and
235
- limitations under the License.
214
+ Unless required by applicable law or agreed to in writing, software
215
+ distributed under the License is distributed on an "AS IS" BASIS,
216
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
217
+ See the License for the specific language governing permissions and
218
+ limitations under the License.
package/README.md CHANGED
@@ -6,11 +6,56 @@
6
6
 
7
7
  ## The one-line pitch
8
8
 
9
- **OpenGantry is a local-first, Git-native governance layer for autonomous agents.** It does not write your code or content for you. It negotiates the contract before work starts, enforces deterministic boundaries during execution, and emits machine-readable verdicts when something fails.
9
+ **OpenGantry is the deterministic runtime and governance engine for AI agents.** It is a local-first CLI that scopes agent edits, runs your shell gates, and returns structured failure JSON so agents can retry without a human watching the terminal. It does not write your code or content for you. It replaces humans babysitting AI coding assistants not your tests, not your CI, not your code review.
10
10
 
11
- Think of it as a **court of law** for agentic work: binary rules, reproducible checks, audit trail in Git.
11
+ > **Not [Gantry.io](https://gantry.io)?** OpenGantry is the open-source **`gantry` CLI** for local-first, Git-native agent enforcement in your repository, not a hosted observability dashboard. Product home: [opengantry.ai](https://opengantry.ai).
12
12
 
13
- > **Not [Gantry.io](https://gantry.io)?** OpenGantry is the open-source **`gantry` CLI** for local-first, Git-native governance in your repository, not a hosted observability dashboard. Product home: [opengantry.ai](https://opengantry.ai).
13
+ ### Local control, unmonitored loops, tamper-evident proof
14
+
15
+ Three engineering problems show up today, calendar or no calendar:
16
+
17
+ | Problem | What goes wrong | OpenGantry answer |
18
+ |---------|-----------------|-------------------|
19
+ | **Local developer control** | Source and credentials leave the machine for a vendor console to "govern" agents | Execution stays on-machine; verify is offline; optional future hub is digests only |
20
+ | **Unmonitored agent loops** | Agents thrash on unstructured stderr, wander outside declared paths, or keep retrying without a structured verdict | Mission YAML + TMVC + `findings[]` so the loop is scoped and machine-readable |
21
+ | **Tamper-evident auditability** | "It passed locally" with no citeable trail | Planner stamps, `EXECUTOR_LOG.md` quotes, optional SSH/GPG attestation receipts |
22
+
23
+ **Hybrid model:** free local CLI (spoke) for developers; optional metadata plane (hub) later for team-wide audit aggregation. Source trees and gate stdout never leave via GXT export paths.
24
+
25
+ Deep dive: [`docs/SECURITY.md`](docs/SECURITY.md) · [`docs/FEATURES.md`](docs/FEATURES.md) · [opengantry.ai](https://opengantry.ai)
26
+
27
+ ---
28
+
29
+ ## In plain English
30
+
31
+ OpenGantry uses product terms that sound abstract. Here is what the CLI actually runs:
32
+
33
+ | Term you will see | What it actually is |
34
+ |-------------------|---------------------|
35
+ | **Contract** | Mission YAML under `.gitagent/missions/` — allowed paths, forbidden paths, and a required `gate_command` (shell) |
36
+ | **Legislate** | `gantry legislate` / Mission Architect writes that YAML; a Planner commit locks it in Git before work |
37
+ | **Governance** | Hooks + `gantry verify` that fail closed if scope or gates are violated — not a process committee |
38
+ | **Verdict** | Deterministic pass/fail from shell gates + trace checks; on fail, a `findings[]` JSON envelope |
39
+
40
+ **"Contract" is not design-by-contract (DbC).** It is not pre/post conditions in source code. It is the Git-locked work order that tells the agent where it may edit and which shell command must pass before merge.
41
+
42
+ ---
43
+
44
+ ## Why not just TDD and CI?
45
+
46
+ You already have `npm test` and GitHub Actions. OpenGantry does not replace them — it makes them usable when an **AI agent** runs the loop.
47
+
48
+ | Who runs the loop | What happens on failure |
49
+ |-------------------|-------------------------|
50
+ | **Human developer** | Reads stderr, parses the stack trace, rewrites code |
51
+ | **AI agent + raw TDD/CI** | Chokes on unstructured stderr, hallucinates fixes, spins in retry loops — a senior still babysits |
52
+ | **AI agent + OpenGantry** | Same gates you already trust; `gantry verify --json` returns `findings[]` with file, line, and hint so the agent can self-correct |
53
+
54
+ | Already have | Still missing for autonomous agents | OpenGantry adds |
55
+ |--------------|-------------------------------------|-----------------|
56
+ | `npm test` / GH Actions | Structured failure for model retry | `findings[]` envelope |
57
+ | PR CI | Declared edit blast radius | TMVC + forbidden zones in mission YAML |
58
+ | Code review | Proof the agent stayed in scope | Git mission + `EXECUTOR_LOG.md` quotes |
14
59
 
15
60
  ---
16
61
 
@@ -21,9 +66,9 @@ Most AI agent tooling optimizes for *speed of generation*. OpenGantry optimizes
21
66
  - **Scope before execution:** no silent edits to governance files, no wandering outside approved paths
22
67
  - **Deterministic verification:** gates are shell commands with pass/fail outcomes, not LLM opinions
23
68
  - **Forensic trace:** every mission ties to `[MSN-XXXX]` commits and verbatim quotes in `EXECUTOR_LOG.md`
24
- - **Domain-agnostic** (v3.0.0): the same loop governs TypeScript imports *and* brand/compliance copy
69
+ - **Domain-agnostic:** the same loop governs TypeScript imports *and* brand/compliance copy
25
70
 
26
- The long-term bet: external executors (Cursor agents, Hermes, CI bots) do the work; **OpenGantry owns the contract and the verdict**. That separation is what makes agentic delivery auditable in regulated or security-sensitive environments.
71
+ The long-term bet: external executors (Cursor agents, Hermes, CI bots) do the work; **OpenGantry owns the mission YAML and the verify output**. That separation is what makes agentic delivery auditable in regulated or security-sensitive environments.
27
72
 
28
73
  ---
29
74
 
@@ -47,7 +92,7 @@ Everything revolves around a **mission**:
47
92
 
48
93
  ```mermaid
49
94
  flowchart LR
50
- A[Planner legislates MSN-XXXX] --> B[Executor works in TMVC scope]
95
+ A[Planner commits mission YAML] --> B[Executor works in TMVC scope]
51
96
  B --> C[Trace in EXECUTOR_LOG.md]
52
97
  C --> D[gantry verify]
53
98
  D -->|fail| E[findings JSON → agent retries]
@@ -56,7 +101,7 @@ flowchart LR
56
101
 
57
102
  **Roles:**
58
103
 
59
- - **Planner:** human (or Mission Architect in chat) approves mission YAML before execution
104
+ - **Planner:** human (or Mission Architect in chat) commits mission YAML via `gantry legislate` before execution
60
105
  - **Executor:** agent or developer edits within TMVC roots; forbidden zones respected
61
106
  - **Verifier:** `gantry verify` checks gate output and trace mapping
62
107
 
@@ -72,9 +117,9 @@ flowchart LR
72
117
 
73
118
  ---
74
119
 
75
- ## v3.0.0: Three phases, any domain
120
+ ## Three phases, any domain
76
121
 
77
- v3.0.0 reframes the product as a **universal governance layer**, not just a TypeScript linter:
122
+ OpenGantry is a **domain-neutral verify loop**, not just a TypeScript linter:
78
123
 
79
124
  | Phase | Command | Output |
80
125
  |-------|---------|--------|
@@ -91,7 +136,7 @@ v3.0.0 reframes the product as a **universal governance layer**, not just a Type
91
136
 
92
137
  List them: `gantry domains`
93
138
 
94
- **Court-of-law principle:** enforcement is always binary. Content discovery uses exact-match boilerplate only; it does not infer "dominant terminology" from statistics that would flip on unrelated edits.
139
+ **Binary enforcement:** pass/fail only no LLM opinions at the gate. Content discovery uses exact-match boilerplate only; it does not infer "dominant terminology" from statistics that would flip on unrelated edits.
95
140
 
96
141
  See [`docs/DOMAINS.md`](docs/DOMAINS.md) for adapter details and [`docs/AGENT-LOOP.md`](docs/AGENT-LOOP.md) for external executor integration.
97
142
 
@@ -119,7 +164,7 @@ Emits a proposal with evidence-anchored conventions and anomalies (`file:line` s
119
164
 
120
165
  **Speed:** the discovery scanner uses streaming regex per file, not a whole-repo AST. It is budgeted to finish a **5,000-file monorepo in under five seconds** (pinned in CI). OpenGantry ingests repository context in seconds without loading the tree into a heavy compiler graph or spiking RAM. Enterprise teams do not have to wait minutes for a governance tool to "understand" the repo before the agent loop starts.
121
166
 
122
- ### 3. Blueprint: negotiate the contract
167
+ ### 3. Blueprint: lock rules and gate commands
123
168
 
124
169
  ```bash
125
170
  gantry blueprint --domain content --yes
@@ -189,14 +234,14 @@ See [`examples/content-governance/`](examples/content-governance/). Ad copy with
189
234
 
190
235
  - **Not an agent:** it does not chat, plan features, or generate PRs by itself
191
236
  - **Not Gantry.io:** no hosted observability dashboard; everything runs in your repo
192
- - **Not an LLM judge** (yet): AI performance judge is deferred to v3.1; gates stay deterministic
237
+ - **Not an LLM judge for merge:** gates stay deterministic; optional LLM evidence is committed separately via `gantry scan`
193
238
 
194
239
  ---
195
240
 
196
241
  ## Mental model for adopters
197
242
 
198
243
  ```
199
- OpenGantry = contract negotiator + court + audit log
244
+ OpenGantry = scoped work order + shell gates + structured verify output
200
245
  Executor agent = worker (Cursor, Hermes, human dev)
201
246
  ```
202
247
 
@@ -206,15 +251,18 @@ You adopt OpenGantry when agent velocity is valuable but **unreviewed scope cree
206
251
 
207
252
  ## Documentation map {#documentation-map-start-here}
208
253
 
209
- Full doc index: [`docs/index.md`](docs/index.md) — adopters, contributors, ADRs, and planning.
254
+ Full doc index: [`docs/index.md`](docs/index.md) — organized by **how**, **what**, and **why**.
210
255
 
211
256
  ## Where to go next
212
257
 
213
258
  | Goal | Doc |
214
259
  |------|-----|
215
260
  | All documentation | [`docs/index.md`](docs/index.md) |
216
- | 5-minute adoption | [`docs/ADOPTION.md`](docs/ADOPTION.md) |
217
- | Domain adapters deep dive | [`docs/DOMAINS.md`](docs/DOMAINS.md) |
261
+ | What it helps with | [`docs/USE-CASES.md`](docs/USE-CASES.md) |
262
+ | Why features exist | [`docs/FEATURES.md`](docs/FEATURES.md) |
263
+ | Adoption runbook | [`docs/ADOPTION.md`](docs/ADOPTION.md) |
264
+ | Release history | [`docs/CHANGELOG.md`](docs/CHANGELOG.md) |
265
+ | Domain adapters | [`docs/DOMAINS.md`](docs/DOMAINS.md) |
218
266
  | External agent integration | [`docs/AGENT-LOOP.md`](docs/AGENT-LOOP.md) |
219
267
  | Contributing / dogfooding this repo | [`docs/DEVELOPMENT.md`](docs/DEVELOPMENT.md) |
220
268
  | Content walkthrough | [`examples/content-governance/`](examples/content-governance/) |
@@ -0,0 +1,8 @@
1
+ export interface AttestOptions {
2
+ mission: string;
3
+ out?: string;
4
+ sign?: boolean;
5
+ json?: boolean;
6
+ }
7
+ export declare function runAttest(options: AttestOptions): void;
8
+ //# sourceMappingURL=attest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attest.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/attest.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAYtD"}
@@ -0,0 +1,19 @@
1
+ import { logInfo, setExitCode } from "../lib/cli-io.js";
2
+ import { attestMission } from "../lib/attest-mission.js";
3
+ import { GantryUserError, reportUserFacingError } from "../lib/errors.js";
4
+ export function runAttest(options) {
5
+ try {
6
+ const result = attestMission(options);
7
+ if (options.json) {
8
+ logInfo(JSON.stringify(result, null, 2));
9
+ }
10
+ else {
11
+ logInfo(`gantry attest: wrote ${result.receipt_path}`);
12
+ }
13
+ }
14
+ catch (e) {
15
+ reportUserFacingError(e);
16
+ setExitCode(e instanceof GantryUserError ? e.exitCode : 2);
17
+ }
18
+ }
19
+ //# sourceMappingURL=attest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attest.js","sourceRoot":"","sources":["../../../src/cli/commands/attest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAS1E,MAAM,UAAU,SAAS,CAAC,OAAsB;IAC9C,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,wBAAwB,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACzB,WAAW,CAAC,CAAC,YAAY,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;AACH,CAAC"}
@@ -5,8 +5,10 @@ export interface DoctorReport {
5
5
  next_step: string | null;
6
6
  exit_code: number;
7
7
  }
8
- export declare function runDoctor(options?: {
8
+ export interface DoctorOptions {
9
9
  json?: boolean;
10
10
  audience?: OutputAudience;
11
- }): void;
11
+ policy?: string;
12
+ }
13
+ export declare function runDoctor(options?: DoctorOptions): void;
12
14
  //# sourceMappingURL=doctor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAA2C,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG5F,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AA+BD,wBAAgB,SAAS,CAAC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,cAAc,CAAA;CAAO,GAAG,IAAI,CAe3F"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAA2C,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG5F,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA+BD,wBAAgB,SAAS,CAAC,OAAO,GAAE,aAAkB,GAAG,IAAI,CAe3D"}
@@ -28,7 +28,7 @@ function emitDoctor(lines, nextStep, hasFail, json, audience) {
28
28
  export function runDoctor(options = {}) {
29
29
  try {
30
30
  const { root, manifest } = loadWorkspace();
31
- const report = collectDoctorReport(root, manifest);
31
+ const report = collectDoctorReport(root, manifest, undefined, options.policy);
32
32
  emitDoctor(report.lines, report.nextStep, doctorLinesHasFail(report.lines), options.json, options.audience);
33
33
  }
34
34
  catch (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EACL,oBAAoB,EACpB,4BAA4B,GAE7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAmB,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQpD,SAAS,UAAU,CACjB,KAAmB,EACnB,QAAuB,EACvB,OAAgB,EAChB,IAAyB,EACzB,QAAyB;IAEzB,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACxF,CAAC;SAAM,CAAC;QACN,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,OAAO,CAAC,GAAG,IA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AAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChC,OAAO,CAAC,GAAG,OAAO,GAAG,CAAC,CAAC;YACvB,KAAK,MAAM,IAAI,IAAI,KAAK;gBAAE,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QACjD,CAAC;aAAM,IAAI,QAAQ,EAAE,CAAC;YACpB,OAAO,CAAC,SAAS,QAAQ,EAAE,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IACD,IAAI,OAAO;QAAE,WAAW,CAAC,CAAC,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,UAAyB,EAAE;IACnD,IAAI,CAAC;QACH,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAC;QAC3C,MAAM,MAAM,GAAG,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAC9E,UAAU,CACR,MAAM,CAAC,KAAK,EACZ,MAAM,CAAC,QAAQ,EACf,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,EAChC,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,QAAQ,CACjB,CAAC;IACJ,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,GAAG,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QAC5B,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5F,CAAC;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type AttestationReceipt } from "./attestation-receipt.js";
2
+ export interface AttestMissionOptions {
3
+ mission: string;
4
+ out?: string;
5
+ sign?: boolean;
6
+ }
7
+ export interface AttestMissionResult {
8
+ repo_root: string;
9
+ receipt: AttestationReceipt;
10
+ receipt_path: string;
11
+ }
12
+ export declare function attestMission(options: AttestMissionOptions): AttestMissionResult;
13
+ //# sourceMappingURL=attest-mission.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attest-mission.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/attest-mission.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAKlC,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CAgBhF"}
@@ -0,0 +1,22 @@
1
+ import { buildAttestationReceipt, writeAttestationReceipt, } from "./attestation-receipt.js";
2
+ import { GantryUserError } from "./errors.js";
3
+ import { assertMissionGatePresent, parseMissionFile } from "./missions/parser.js";
4
+ import { loadWorkspace } from "./workspace.js";
5
+ export function attestMission(options) {
6
+ if (!options.mission?.trim()) {
7
+ throw new GantryUserError("INVALID_ARGUMENT", "gantry attest: --mission is required", undefined, 2);
8
+ }
9
+ const { root } = loadWorkspace();
10
+ const mission = parseMissionFile(root, options.mission);
11
+ assertMissionGatePresent(mission);
12
+ const receipt = buildAttestationReceipt({
13
+ root,
14
+ mission,
15
+ missionArg: options.mission,
16
+ verifyStatus: "attest_only",
17
+ sign: options.sign === true,
18
+ });
19
+ const receipt_path = writeAttestationReceipt(root, receipt, options.out);
20
+ return { repo_root: root, receipt, receipt_path };
21
+ }
22
+ //# sourceMappingURL=attest-mission.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attest-mission.js","sourceRoot":"","sources":["../../../src/cli/lib/attest-mission.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,GAExB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAc/C,MAAM,UAAU,aAAa,CAAC,OAA6B;IACzD,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;QAC7B,MAAM,IAAI,eAAe,CAAC,kBAAkB,EAAE,sCAAsC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;IACtG,CAAC;IACD,MAAM,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,CAAC;IACjC,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAClC,MAAM,OAAO,GAAG,uBAAuB,CAAC;QACtC,IAAI;QACJ,OAAO;QACP,UAAU,EAAE,OAAO,CAAC,OAAO;QAC3B,YAAY,EAAE,aAAa;QAC3B,IAAI,EAAE,OAAO,CAAC,IAAI,KAAK,IAAI;KAC5B,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,uBAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACzE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;AACpD,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { type ReceiptSignature, type ReceiptSignatureVerifyStatus } from "./receipt-signing.js";
2
+ import type { ParsedMission } from "./types.js";
3
+ export declare const ATTESTATION_RECEIPT_SCHEMA_VERSION: "0.1.0";
4
+ export type AttestationVerifyStatus = "passed" | "failed" | "attest_only";
5
+ export interface PlannerStampReceipt {
6
+ commit: string;
7
+ subject: string;
8
+ author_email: string;
9
+ }
10
+ export interface AttestationReceipt {
11
+ schema_version: typeof ATTESTATION_RECEIPT_SCHEMA_VERSION;
12
+ msn_id: string;
13
+ mission_rel: string;
14
+ mission_sha256: string;
15
+ manifest_sha256: string | null;
16
+ target_architecture_sha256: string | null;
17
+ config_sha256: string | null;
18
+ git_head: string;
19
+ planner_stamp: PlannerStampReceipt | null;
20
+ verify_status: AttestationVerifyStatus;
21
+ error_code?: string;
22
+ issued_at: string;
23
+ receipt_sha256: string;
24
+ signature?: ReceiptSignature;
25
+ }
26
+ export interface BuildAttestationReceiptInput {
27
+ root: string;
28
+ mission: ParsedMission;
29
+ missionArg: string;
30
+ verifyStatus: AttestationVerifyStatus;
31
+ errorCode?: string;
32
+ sign?: boolean;
33
+ }
34
+ export declare function resolvePlannerStampForReceipt(root: string, msnId: string): PlannerStampReceipt | null;
35
+ export declare function computeReceiptSha256(payload: Omit<AttestationReceipt, "receipt_sha256" | "signature">): string;
36
+ export declare function buildAttestationReceipt(input: BuildAttestationReceiptInput): AttestationReceipt;
37
+ export declare function defaultReceiptPath(root: string, msnId: string, receiptSha256: string): string;
38
+ export declare function writeAttestationReceipt(root: string, receipt: AttestationReceipt, outPath?: string): string;
39
+ export type { ReceiptSignatureVerifyStatus };
40
+ //# sourceMappingURL=attestation-receipt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attestation-receipt.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/attestation-receipt.ts"],"names":[],"mappings":"AAgBA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,4BAA4B,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,eAAO,MAAM,kCAAkC,EAAG,OAAgB,CAAC;AAEnE,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE1E,MAAM,WAAW,mBAAmB;IAClC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M,GAAG,MAAM,CAG7F;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kBAAkB,EAC3B,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CAOR;AAED,YAAY,EAAE,4BAA4B,EAAE,CAAC"}
@@ -0,0 +1,110 @@
1
+ import crypto from "node:crypto";
2
+ import fs from "node:fs";
3
+ import path from "node:path";
4
+ import { canonicalJson } from "./canonical-json.js";
5
+ import { logWarn } from "./cli-io.js";
6
+ import { CLI_NAME, REL_RECEIPTS_DIR } from "./constants.js";
7
+ import { GantryUserError } from "./errors.js";
8
+ import { listMsnSubjectCommits, missionPathRepoRelative, } from "./git-proof.js";
9
+ import { gitRevParse } from "./git.js";
10
+ import { loadGxtConfig, resolveReceiptSignatureTier } from "./gxt-config.js";
11
+ import { resolvePlannerEmails } from "./planner-identity.js";
12
+ import { signReceiptHash, verifyReceiptSignature, } from "./receipt-signing.js";
13
+ import { computeWorkingDigests } from "./working-digests.js";
14
+ export const ATTESTATION_RECEIPT_SCHEMA_VERSION = "0.1.0";
15
+ function sha256Bytes(buf) {
16
+ return crypto.createHash("sha256").update(buf).digest("hex");
17
+ }
18
+ function isPlannerStamp(row, plannerEmails) {
19
+ return plannerEmails.includes(row.authorEmail.trim().toLowerCase());
20
+ }
21
+ export function resolvePlannerStampForReceipt(root, msnId) {
22
+ const plannerEmails = resolvePlannerEmails(root).emails;
23
+ if (plannerEmails.length === 0)
24
+ return null;
25
+ const rows = listMsnSubjectCommits(root, msnId);
26
+ const stamp = rows.find((row) => isPlannerStamp(row, plannerEmails));
27
+ if (!stamp)
28
+ return null;
29
+ return {
30
+ commit: stamp.hash,
31
+ subject: stamp.subject,
32
+ author_email: stamp.authorEmail,
33
+ };
34
+ }
35
+ function unsignedReceiptPayload(input) {
36
+ const { receipt_sha256: _receiptSha, signature: _signature, ...rest } = input;
37
+ return { ...rest };
38
+ }
39
+ export function computeReceiptSha256(payload) {
40
+ return crypto.createHash("sha256").update(canonicalJson(unsignedReceiptPayload(payload)), "utf8").digest("hex");
41
+ }
42
+ export function buildAttestationReceipt(input) {
43
+ const missionAbs = path.resolve(input.root, input.missionArg);
44
+ const missionRel = missionPathRepoRelative(input.root, missionAbs);
45
+ const msnId = input.mission.msnId;
46
+ if (!msnId) {
47
+ throw new GantryUserError("INVALID_ARGUMENT", "mission is missing msn_id", undefined, 2);
48
+ }
49
+ const digests = computeWorkingDigests(input.root);
50
+ if (digests.manifest_sha256 === null) {
51
+ throw new GantryUserError("MANIFEST_MISSING", "attestation receipt requires .gitagent/foreman/MANIFEST.json", "run gantry init or restore MANIFEST.json", 2);
52
+ }
53
+ const base = {
54
+ schema_version: ATTESTATION_RECEIPT_SCHEMA_VERSION,
55
+ msn_id: msnId,
56
+ mission_rel: missionRel,
57
+ mission_sha256: sha256Bytes(fs.readFileSync(missionAbs)),
58
+ manifest_sha256: digests.manifest_sha256,
59
+ target_architecture_sha256: digests.target_architecture_sha256,
60
+ config_sha256: digests.config_sha256,
61
+ git_head: gitRevParse(input.root, "HEAD") ?? "no-head",
62
+ planner_stamp: resolvePlannerStampForReceipt(input.root, msnId),
63
+ verify_status: input.verifyStatus,
64
+ issued_at: new Date().toISOString(),
65
+ };
66
+ if (input.errorCode) {
67
+ base.error_code = input.errorCode;
68
+ }
69
+ const receipt_sha256 = computeReceiptSha256(base);
70
+ const receipt = { ...base, receipt_sha256 };
71
+ const config = loadGxtConfig(input.root);
72
+ const tier = resolveReceiptSignatureTier(config);
73
+ const shouldSign = input.sign === true || tier === "require" || tier === "warn";
74
+ if (!shouldSign)
75
+ return receipt;
76
+ const signature = signReceiptHash(input.root, receipt_sha256);
77
+ if (!signature) {
78
+ if (tier === "require") {
79
+ throw new GantryUserError("RECEIPT_SIGNATURE_REQUIRED", "receipt_signature=require but no local SSH/GPG signing key is configured", "configure user.signingkey and gpg.format, or pass receipt_signature off", 2);
80
+ }
81
+ if (tier === "warn") {
82
+ logWarn(`${CLI_NAME} attest: receipt unsigned — no local SSH/GPG signing key is configured`);
83
+ }
84
+ return receipt;
85
+ }
86
+ const verifyStatus = verifyReceiptSignature(input.root, receipt_sha256, signature);
87
+ if (tier === "warn" && verifyStatus !== "good") {
88
+ logWarn(`${CLI_NAME} attest: receipt signature verify_status=${verifyStatus}`);
89
+ }
90
+ return {
91
+ ...receipt,
92
+ signature: {
93
+ ...signature,
94
+ verify_status: verifyStatus,
95
+ },
96
+ };
97
+ }
98
+ export function defaultReceiptPath(root, msnId, receiptSha256) {
99
+ const suffix = receiptSha256.slice(0, 12);
100
+ return path.join(root, REL_RECEIPTS_DIR, `${msnId}-${suffix}.json`);
101
+ }
102
+ export function writeAttestationReceipt(root, receipt, outPath) {
103
+ const target = outPath
104
+ ? path.resolve(root, outPath)
105
+ : defaultReceiptPath(root, receipt.msn_id, receipt.receipt_sha256);
106
+ fs.mkdirSync(path.dirname(target), { recursive: true });
107
+ fs.writeFileSync(target, `${JSON.stringify(receipt, null, 2)}\n`, "utf8");
108
+ return target;
109
+ }
110
+ //# sourceMappingURL=attestation-receipt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attestation-receipt.js","sourceRoot":"","sources":["../../../src/cli/lib/attestation-receipt.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,qBAAqB,EACrB,uBAAuB,GAExB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,aAAa,EAA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,KAAK,CAAC,IAAI,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;IACnF,IAAI,IAAI,KAAK,MAAM,IAAI,YAAY,KAAK,MAAM,EAAE,CAAC;QAC/C,OAAO,CAAC,GAAG,QAAQ,4CAA4C,YAAY,EAAE,CAAC,CAAC;IACjF,CAAC;IACD,OAAO;QACL,GAAG,OAAO;QACV,SAAS,EAAE;YACT,GAAG,SAAS;YACZ,aAAa,EAAE,YAAY;SAC5B;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,KAAa,EAAE,aAAqB;IACnF,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE,GAAG,KAAK,IAAI,MAAM,OAAO,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,IAAY,EACZ,OAA2B,EAC3B,OAAgB;IAEhB,MAAM,MAAM,GAAG,OAAO;QACpB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;QAC7B,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACrE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1E,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Deterministic JSON with sorted object keys (recursive). */
2
+ export declare function canonicalJson(value: unknown): string;
3
+ //# sourceMappingURL=canonical-json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonical-json.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/canonical-json.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAUpD"}
@@ -0,0 +1,13 @@
1
+ /** Deterministic JSON with sorted object keys (recursive). */
2
+ export function canonicalJson(value) {
3
+ if (value === null || typeof value !== "object") {
4
+ return JSON.stringify(value);
5
+ }
6
+ if (Array.isArray(value)) {
7
+ return `[${value.map((v) => canonicalJson(v)).join(",")}]`;
8
+ }
9
+ const obj = value;
10
+ const keys = Object.keys(obj).sort();
11
+ return `{${keys.map((k) => `${JSON.stringify(k)}:${canonicalJson(obj[k])}`).join(",")}}`;
12
+ }
13
+ //# sourceMappingURL=canonical-json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonical-json.js","sourceRoot":"","sources":["../../../src/cli/lib/canonical-json.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAC7D,CAAC;IACD,MAAM,GAAG,GAAG,KAAgC,CAAC;IAC7C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IACrC,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AAC3F,CAAC"}
@@ -13,6 +13,8 @@ export declare const REL_KPI_REPORT_SCHEMA: ".gitagent/planner/KPI-REPORT.schema
13
13
  export declare const DEFAULT_KPI_REPORT_DIR: ".gitagent/kpi";
14
14
  export declare const REL_MISSION_TEMPLATE: ".gitagent/planner/MISSION.template.md";
15
15
  export declare const REL_HISTORY_DIR: ".gitagent/history";
16
+ /** Git-ignored attestation receipts for optional hub ingestion. */
17
+ export declare const REL_RECEIPTS_DIR: ".gitagent/history/receipts";
16
18
  /** Git-ignored machine-readable runtime error (see templates/.gitignore.gxt). */
17
19
  export declare const REL_AGENT_ERROR_FILE: ".gitagent/history/.ignored-last-error.json";
18
20
  /** Git-ignored verify failure remediation feed for IDE/agent loops (atomic swap writes). */
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/constants.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,eAAO,MAAM,YAAY,EAAG,iCAA0C,CAAC;AACvE,sEAAsE;AACtE,eAAO,MAAM,wBAAwB,EAAG,qCAA8C,CAAC;AACvF,2EAA2E;AAC3E,eAAO,MAAM,6BAA6B,EAAG,0CAAmD,CAAC;AACjG,mGAAmG;AACnG,eAAO,MAAM,gCAAgC,EAAG,6CAAsD,CAAC;AACvG,oFAAoF;AACpF,eAAO,MAAM,gCAAgC,EAAG,+BAAwC,CAAC;AACzF,eAAO,MAAM,kBAAkB,EAAG,uCAAgD,CAAC;AACnF,eAAO,MAAM,qBAAqB,EAAG,0CAAmD,CAAC;AACzF,eAAO,MAAM,sBAAsB,EAAG,eAAwB,CAAC;AAC/D,eAAO,MAAM,oBAAoB,EAAG,uCAAgD,CAAC;AACrF,eAAO,MAAM,eAAe,EAAG,mBAA4B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AAC;AAC/D,eAAO,MAAM,oBAAoB,EAAG,uCAAgD,CAAC;AACrF,eAAO,MAAM,eAAe,EAAG,mBAA4B,CAAC;AAC5D,mEAAmE;AACnE,eAAO,MAAM,gBAAgB,EAAG,4BAAqC,CAAC;AACtE,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,EAAG,4CAAqD,CAAC;AAC1F,4FAA4F;AAC5F,eAAO,MAAM,oBAAoB,EAAG,qCAA8C,CAAC;AACnF,iGAAiG;AACjG,eAAO,MAAM,mBAAmB,EAAG,oBAA6B,CAAC;AACjE,sGAAsG;AACtG,eAAO,MAAM,oBAAoB,EAAG,wBAAiC,CAAC;AACtE,eAAO,MAAM,eAAe,EAAG,QAAiB,CAAC;AACjD,eAAO,MAAM,qBAAqB,EAAG,iBAA0B,CAAC;AAChE,mFAAmF;AACnF,eAAO,MAAM,2BAA2B,EACtC,+DAAwE,CAAC;AAC3E,+GAA+G;AAC/G,eAAO,MAAM,sBAAsB,EAAG,sCAA+C,CAAC;AAEtF,qDAAqD;AACrD,eAAO,MAAM,cAAc,QAAgB,CAAC;AAE5C,eAAO,MAAM,QAAQ,WAAW,CAAC;AACjC,eAAO,MAAM,eAAe,WAAW,CAAC;AACxC,eAAO,MAAM,sBAAsB,EAAG,uBAAgC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -13,6 +13,8 @@ export const REL_KPI_REPORT_SCHEMA = ".gitagent/planner/KPI-REPORT.schema.yaml";
13
13
  export const DEFAULT_KPI_REPORT_DIR = ".gitagent/kpi";
14
14
  export const REL_MISSION_TEMPLATE = ".gitagent/planner/MISSION.template.md";
15
15
  export const REL_HISTORY_DIR = ".gitagent/history";
16
+ /** Git-ignored attestation receipts for optional hub ingestion. */
17
+ export const REL_RECEIPTS_DIR = ".gitagent/history/receipts";
16
18
  /** Git-ignored machine-readable runtime error (see templates/.gitignore.gxt). */
17
19
  export const REL_AGENT_ERROR_FILE = ".gitagent/history/.ignored-last-error.json";
18
20
  /** Git-ignored verify failure remediation feed for IDE/agent loops (atomic swap writes). */
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/cli/lib/constants.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,MAAM,CAAC,MAAM,YAAY,GAAG,iCAA0C,CAAC;AACvE,sEAAsE;AACtE,MAAM,CAAC,MAAM,wBAAwB,GAAG,qCAA8C,CAAC;AACvF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,6BAA6B,GAAG,0CAAmD,CAAC;AACjG,mGAAmG;AACnG,MAAM,CAAC,MAAM,gCAAgC,GAAG,6CAAsD,CAAC;AACvG,oFAAoF;AACpF,MAAM,CAAC,MAAM,gCAAgC,GAAG,+BAAwC,CAAC;AACzF,MAAM,CAAC,MAAM,kBAAkB,GAAG,uCAAgD,CAAC;AACnF,MAAM,CAAC,MAAM,qBAAqB,GAAG,0CAAmD,CAAC;AACzF,MAAM,CAAC,MAAM,sBAAsB,GAAG,eAAwB,CAAC;AAC/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,uCAAgD,CAAC;AACrF,MAAM,CAAC,MAAM,eAAe,GAAG,mBAA4B,CAAC;AAC5D,iFAAiF;AACjF,MAAM,CAAC,MAAM,oBAAoB,GAAG,4CAAqD,CAAC;AAC1F,4FAA4F;AAC5F,MAAM,CAAC,MAAM,oBAAoB,GAAG,qCAA8C,CAAC;AACnF,iGAAiG;AACjG,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAA6B,CAAC;AACjE,sGAAsG;AACtG,MAAM,CAAC,MAAM,oBAAoB,GAAG,wBAAiC,CAAC;AACtE,MAAM,CAAC,MAAM,eAAe,GAAG,QAAiB,CAAC;AACjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAA0B,CAAC;AAChE,mFAAmF;AACnF,MAAM,CAAC,MAAM,2BAA2B,GACtC,+DAAwE,CAAC;AAC3E,+GAA+G;AAC/G,MAAM,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AAC,MAAM,mBAAmB,GAAG,oBAA6B,CAAC;AACjE,sGAAsG;AACtG,MAAM,CAAC,MAAM,oBAAoB,GAAG,wBAAiC,CAAC;AACtE,MAAM,CAAC,MAAM,eAAe,GAAG,QAAiB,CAAC;AACjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAA0B,CAAC;AAChE,mFAAmF;AACnF,MAAM,CAAC,MAAM,2BAA2B,GACtC,+DAAwE,CAAC;AAC3E,+GAA+G;AAC/G,MAAM,CAAC,MAAM,sBAAsB,GAAG,sCAA+C,CAAC;AAEtF,qDAAqD;AACrD,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC;AACjC,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,uBAAgC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Manifest } from "./types.js";
2
2
  import { type DoctorCheckResult, type DoctorReport } from "./doctor-types.js";
3
3
  export declare function runDoctorChecks(root: string, manifest: Manifest): DoctorCheckResult;
4
- export declare function collectDoctorReport(root: string, manifest: Manifest, templatesRoot?: string): DoctorReport;
4
+ export declare function collectDoctorReport(root: string, manifest: Manifest, templatesRoot?: string, policyPath?: string): DoctorReport;
5
5
  //# sourceMappingURL=doctor-core.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctor-core.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/doctor-core.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAGL,KAAK,iBAAiB,EAEtB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAsI3B,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,iBAAiB,CA8BnF;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,CAAC,EAAE,MAAM,GACrB,YAAY,CA2Bd"}
1
+ {"version":3,"file":"doctor-core.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/doctor-core.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAGL,KAAK,iBAAiB,EAEtB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AA6I3B,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,iBAAiB,CA+BnF;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,CAAC,EAAE,MAAM,EACtB,UAAU,CAAC,EAAE,MAAM,GAClB,YAAY,CAyCd"}