lighthouse-cli 0.36.0__tar.gz → 0.38.0__tar.gz

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 (82) hide show
  1. {lighthouse_cli-0.36.0/lighthouse_cli.egg-info → lighthouse_cli-0.38.0}/PKG-INFO +1 -1
  2. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/__init__.py +1 -1
  3. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/connect.py +27 -2
  4. lighthouse_cli-0.38.0/lighthouse/commands/verify.py +506 -0
  5. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/locales/ar.json +11 -1
  6. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/locales/de.json +11 -1
  7. lighthouse_cli-0.38.0/lighthouse/locales/en-US.json +440 -0
  8. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/locales/en.json +11 -1
  9. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/locales/es.json +11 -1
  10. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/locales/fr.json +11 -1
  11. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/locales/ga.json +11 -1
  12. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/locales/it.json +11 -1
  13. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/locales/ja.json +11 -1
  14. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/locales/nl.json +11 -1
  15. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/locales/pt.json +11 -1
  16. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/locales/zh-Hans.json +11 -1
  17. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/locales/zh-Hant.json +11 -1
  18. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/sealing.py +84 -7
  19. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0/lighthouse_cli.egg-info}/PKG-INFO +1 -1
  20. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse_cli.egg-info/SOURCES.txt +2 -0
  21. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/pyproject.toml +1 -1
  22. lighthouse_cli-0.38.0/tests/test_sealing_hybrid.py +193 -0
  23. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_verify.py +165 -0
  24. lighthouse_cli-0.38.0/tests/test_verify_hybrid.py +138 -0
  25. lighthouse_cli-0.36.0/lighthouse/commands/verify.py +0 -275
  26. lighthouse_cli-0.36.0/lighthouse/locales/en-US.json +0 -430
  27. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/LICENSE +0 -0
  28. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/NOTICE +0 -0
  29. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/README.md +0 -0
  30. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/__main__.py +0 -0
  31. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/__init__.py +0 -0
  32. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/agents.py +0 -0
  33. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/approvals.py +0 -0
  34. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/builds.py +0 -0
  35. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/collectors.py +0 -0
  36. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/connections.py +0 -0
  37. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/datasets.py +0 -0
  38. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/evals.py +0 -0
  39. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/kb.py +0 -0
  40. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/language.py +0 -0
  41. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/limits.py +0 -0
  42. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/login.py +0 -0
  43. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/models.py +0 -0
  44. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/offline.py +0 -0
  45. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/runs.py +0 -0
  46. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/spend.py +0 -0
  47. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/stack.py +0 -0
  48. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/terms.py +0 -0
  49. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/commands/whoami.py +0 -0
  50. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/config.py +0 -0
  51. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/credentials.py +0 -0
  52. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/device.py +0 -0
  53. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/exits.py +0 -0
  54. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/flags.py +0 -0
  55. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/http.py +0 -0
  56. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/i18n.py +0 -0
  57. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/main.py +0 -0
  58. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/out.py +0 -0
  59. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse/py.typed +0 -0
  60. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse_cli.egg-info/dependency_links.txt +0 -0
  61. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse_cli.egg-info/entry_points.txt +0 -0
  62. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse_cli.egg-info/requires.txt +0 -0
  63. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/lighthouse_cli.egg-info/top_level.txt +0 -0
  64. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/setup.cfg +0 -0
  65. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_approvals.py +0 -0
  66. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_ci_credential.py +0 -0
  67. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_collectors.py +0 -0
  68. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_commands.py +0 -0
  69. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_connect_erp_hr.py +0 -0
  70. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_connect_finav.py +0 -0
  71. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_connect_library.py +0 -0
  72. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_datasets.py +0 -0
  73. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_dev_surface.py +0 -0
  74. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_fixtures.py +0 -0
  75. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_golden.py +0 -0
  76. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_i18n.py +0 -0
  77. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_installers.py +0 -0
  78. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_offline.py +0 -0
  79. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_plumbing.py +0 -0
  80. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_sealing.py +0 -0
  81. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_stack.py +0 -0
  82. {lighthouse_cli-0.36.0 → lighthouse_cli-0.38.0}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lighthouse-cli
3
- Version: 0.36.0
3
+ Version: 0.38.0
4
4
  Summary: The LightHouse command line: sign in, connect your estate, deploy agents, watch runs
5
5
  License-Expression: Apache-2.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -3,4 +3,4 @@
3
3
  """The `lighthouse-ai` command line for LightHouse."""
4
4
  from __future__ import annotations
5
5
 
6
- __version__ = "0.36.0"
6
+ __version__ = "0.38.0"
@@ -333,6 +333,12 @@ def _sealer(ctx: Context, client: Any, provider: Provider) -> dict[str, Any] | N
333
333
  ready = [d for d in info.get("deployments") or [] if d.get("ready") and d.get("sealing")
334
334
  and (wanted is None or d.get("deployment") == wanted)]
335
335
  if provider.name not in (info.get("connectors") or []) or not ready:
336
+ if info.get("require_hybrid") and provider.name in (info.get("connectors") or []) and any(
337
+ d.get("sealing") for d in info.get("deployments") or []):
338
+ # 1.55: refused here rather than sent in the clear to be refused there.
339
+ raise CliError("your organisation requires post-quantum seals, and your deployment "
340
+ "does not advertise a hybrid sealing key yet; nothing was sent",
341
+ code=FAILED, error="hybrid_seal_required")
336
342
  if pinned is not None:
337
343
  why = next((d.get("why") for d in info.get("deployments") or [] if d.get("why")), "")
338
344
  raise CliError("your deployment cannot keep this credential in your own store, so "
@@ -352,7 +358,21 @@ def _sealer(ctx: Context, client: Any, provider: Provider) -> dict[str, Any] | N
352
358
  + ("the deployment key you pinned" if pinned else
353
359
  "your deployment's registered key")
354
360
  + "; nothing was sent", code=FAILED, error="sealing_key_unverified")
355
- return {"deployment": dep["deployment"], "full": full, "public": dep["sealing"]["public"],
361
+ # 1.55: the hybrid key where the deployment offers one, signed by the same key.
362
+ hybrid = sealing.verify_hybrid(dep["sealing"], full, keys)
363
+ if hybrid is None and dep["sealing"].get("hybrid") is not None:
364
+ # Never a fallback to X25519 because a hybrid key failed to verify.
365
+ raise CliError("the post-quantum sealing key LightHouse relayed is not signed by "
366
+ + ("the deployment key you pinned" if pinned else
367
+ "your deployment's registered key")
368
+ + "; nothing was sent", code=FAILED, error="sealing_key_unverified")
369
+ if hybrid is None and info.get("require_hybrid"):
370
+ raise CliError("your organisation requires post-quantum seals, and your deployment "
371
+ "does not advertise a hybrid sealing key yet; nothing was sent",
372
+ code=FAILED, error="hybrid_seal_required")
373
+ return {"deployment": dep["deployment"], "full": full,
374
+ "public": hybrid["public"] if hybrid else dep["sealing"]["public"],
375
+ "suite": sealing.HYBRID_SUITE if hybrid else sealing.SUITE,
356
376
  "fingerprint_key": base64.b64decode(info.get("fingerprint_key") or ""),
357
377
  "pinned": pinned is not None}
358
378
 
@@ -365,7 +385,8 @@ def _sealed_body(where: dict[str, Any], provider: Provider, credential: str,
365
385
  raise CliError(str(e), code=USAGE, error="bad_credential") from None
366
386
  cid = sealing.connection_id()
367
387
  body = {"sealed": sealing.seal(where["public"], sealing.canonical(fields),
368
- deployment=where["full"], connector=provider.name, name=cid),
388
+ deployment=where["full"], connector=provider.name, name=cid,
389
+ suite=where.get("suite", sealing.SUITE)),
369
390
  "fingerprint": sealing.fingerprint(fields, where["fingerprint_key"]),
370
391
  "connection": cid, "deployment": where["deployment"], "target": target,
371
392
  "sealed_by": "cli"}
@@ -438,6 +459,10 @@ def _connect_token(ctx: Context, provider: Provider, credential: str | None = No
438
459
  "card": got.get("label"),
439
460
  "sealed_by": got.get("sealed_by") or ("cli" if where else None),
440
461
  "pinned": bool(where and where["pinned"]),
462
+ # 1.55: post-quantum (hybrid) or classical, where it was sealed to a deployment.
463
+ "seal_suite": got.get("seal_suite") or (
464
+ ("hybrid" if where.get("suite") == sealing.HYBRID_SUITE else "classical")
465
+ if where else None),
441
466
  "deployment": got.get("deployment"), "custody": got.get("custody"),
442
467
  "reason": got.get("reason") if pending else None,
443
468
  "command": (got.get("command") or {}).get("command_id") if pending else None}
@@ -0,0 +1,506 @@
1
+ # Copyright 2026 Atlantic Agentic Labs. All Rights Reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ """`lighthouse-ai verify-answer`: check an answer from Octy against its signed receipt.
4
+
5
+ lighthouse-ai verify-answer octy-receipt-oar_xyz.json
6
+ lighthouse-ai verify-answer octy-receipt-oar_xyz.json --answer answer.txt
7
+ lighthouse-ai verify-answer receipt.json --keys octy-keys.json
8
+
9
+ Every answer Octy gives on Atlantic's documentation and company site comes
10
+ with a receipt, downloadable from the answer's evidence panel: hashes of the
11
+ question and the answer, each cited passage's URL and SHA-256, the corpus
12
+ version, how the answer was produced, the time, and the id of the Ed25519 key
13
+ that signed it. This command checks the signature against Atlantic's
14
+ published keys and, with `--answer`, that the answer text is the one signed.
15
+
16
+ **Which keys.** For a public Octy's receipt (`profile` docs or site, or an
17
+ Octy profile's), the keys are read by default from Atlantic's well-known URL,
18
+ `https://ask.atlanticagenticlabs.com/.well-known/octy-keys.json`, and never
19
+ from a URL the receipt names: a forged receipt could name its forger's keys.
20
+ A receipt whose issuer is not Atlantic's is refused unless `--keys` is given.
21
+ For a client Octy's receipt (`profile` portal or deployment, #48) the keys
22
+ are the tenant's, `GET /api/v1/octy/keys` read with this CLI's credential:
23
+ a portal receipt must verify with LightHouse's key, a deployment receipt
24
+ with that deployment's own. `--keys` takes another URL (https only) or a
25
+ saved copy of the keys file, and needs no sign-in.
26
+
27
+ **Versions.** A version 1 receipt (#47, #48) and a version 2 receipt
28
+ (0.18.1, contract 1.41) both verify. Version 2 also signs the display name of
29
+ the model that decided the answer, the tokens, the escalations and the
30
+ recorded cost (US dollars, and euros at the ECB rate of the day it was
31
+ issued), which this command prints. A version 2 receipt without those fields,
32
+ or with one of the wrong type, is refused as malformed.
33
+
34
+ **Version 3 (contract 1.54).** A deployment's version 3 receipt is version 2
35
+ with provenance: each passage names its signed knowledge item (`item`, or null
36
+ for a document not yet attested) and the receipt names its corpus manifest
37
+ (`manifest`). `--provenance` takes a knowledge provenance export from
38
+ LightHouse (Knowledge → Provenance → Export JSON) and checks, offline, that
39
+ each item and the manifest the receipt names is in it, is signed by the
40
+ receipt's own deployment, names the receipt's tenant and deployment and (an
41
+ item) the passage's document. The export also carries the deployment's public
42
+ keys, so `--keys export.json --provenance export.json` checks everything with
43
+ nothing sent anywhere. `sigs`, added signatures over the same bytes, is left
44
+ out of the signed bytes with `sig`.
45
+
46
+ **Rotation.** A receipt verifies while the key that signed it is listed,
47
+ current or retired. A key taken off the list no longer verifies anything.
48
+
49
+ **The signed bytes** are the receipt without `sig` (and without `sigs`), as
50
+ canonical JSON: keys sorted, no whitespace, UTF-8 with non-ASCII characters
51
+ literal (RFC 8785 for the values a receipt holds).
52
+
53
+ **Hybrid signatures (contract 1.54).** A receipt may carry `sigs`, further
54
+ signatures over the same bytes: ML-DSA-65 today, checked against the
55
+ ML-DSA-65 keys published beside the Ed25519 ones (`kty: "AKP"`, `pub`) and
56
+ reported one by one. Each known signature must verify; an unknown algorithm
57
+ is reported, not failed. `--require-hybrid` (or a tenant key set whose
58
+ `policy` is `require-hybrid`) also requires a valid ML-DSA-65 signature.
59
+
60
+ No credential is needed for a public receipt, and nothing is sent anywhere
61
+ but the keys URL (or, for a client receipt, the tenant's keys route).
62
+ Exit 0 when the receipt verifies (and the answer matches, if given); exit 1
63
+ otherwise, with a reason.
64
+ """
65
+ from __future__ import annotations
66
+
67
+ import argparse
68
+ import base64
69
+ import hashlib
70
+ import json
71
+ import re
72
+ import sys
73
+ from decimal import Decimal
74
+ from pathlib import Path
75
+ from typing import Any
76
+
77
+ import httpx
78
+ from cryptography.exceptions import InvalidSignature
79
+ from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
80
+
81
+ from lighthouse.exits import FAILED, USAGE, CliError
82
+ from lighthouse.i18n import t
83
+ from lighthouse.main import Command, Context
84
+ from lighthouse.out import Out
85
+
86
+ ISSUER = "https://ask.atlanticagenticlabs.com"
87
+ CLIENT = ("portal", "deployment")
88
+ KEYS_URL = f"{ISSUER}/.well-known/octy-keys.json"
89
+ MAX_BYTES = 1024 * 1024
90
+ V2_FIELDS = ("model", "tokens_in", "tokens_out", "escalations", "cost_usd_nano", "cost_eur_nano", "fx_date")
91
+ ITEM_ID = re.compile(r"^ki_[0-9A-Za-z]{22}$")
92
+ MANIFEST_ID = re.compile(r"^km_[0-9A-Za-z]{22}$")
93
+ _SIGS_ALG = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]{0,31}$")
94
+ _KID16 = re.compile(r"^[0-9a-f]{16}$")
95
+ _B64U = re.compile(r"^[A-Za-z0-9_-]{1,8192}$")
96
+ _HEX64 = re.compile(r"^[0-9a-f]{64}$")
97
+ _LABEL = re.compile(r"^[^\x00-\x1f\x7f]{1,80}$")
98
+ _DATE = re.compile(r"^\d{4}-\d{2}-\d{2}$")
99
+
100
+
101
+ def _configure(ap: argparse.ArgumentParser) -> None:
102
+ ap.add_argument("receipt", metavar="RECEIPT",
103
+ help="the receipt file from the answer's evidence panel ('-' for standard input)")
104
+ ap.add_argument("--answer", metavar="FILE",
105
+ help="a file holding the answer's text, to check that it is the answer signed")
106
+ ap.add_argument("--keys", metavar="URL_OR_FILE",
107
+ help="the published keys, as an https URL or a saved file (default: Atlantic's well-known URL)")
108
+ ap.add_argument("--provenance", metavar="FILE",
109
+ help="a knowledge provenance export from LightHouse, to check a version 3 receipt's "
110
+ "knowledge items and corpus manifest offline")
111
+ ap.add_argument("--require-hybrid", action="store_true",
112
+ help="also require a valid ML-DSA-65 signature (post-quantum), not only Ed25519")
113
+
114
+
115
+ def _b64u(text: str) -> bytes:
116
+ return base64.urlsafe_b64decode(text + "=" * (-len(text) % 4))
117
+
118
+
119
+ def _integers_only(value: Any) -> None:
120
+ """A receipt holds no floats (its canonical form is defined for integers only)."""
121
+ if isinstance(value, float):
122
+ raise ValueError("float")
123
+ for v in value.values() if isinstance(value, dict) else value if isinstance(value, list) else ():
124
+ _integers_only(v)
125
+
126
+
127
+ def canonical(value: Any) -> bytes:
128
+ return json.dumps(value, sort_keys=True, separators=(",", ":"), ensure_ascii=False,
129
+ allow_nan=False).encode("utf-8")
130
+
131
+
132
+ def _count(v: Any) -> bool:
133
+ return isinstance(v, int) and not isinstance(v, bool) and v >= 0
134
+
135
+
136
+ def _sigs(v: Any) -> bool:
137
+ """`sigs` (contract 1.54): 1 to 4 `{alg, kid, sig}`, sorted by `alg`."""
138
+ if not (isinstance(v, list) and 1 <= len(v) <= 4):
139
+ return False
140
+ algs = []
141
+ for e in v:
142
+ if not (isinstance(e, dict) and set(e) == {"alg", "kid", "sig"}
143
+ and isinstance(e["alg"], str) and _SIGS_ALG.fullmatch(e["alg"])
144
+ and isinstance(e["kid"], str) and _KID16.fullmatch(e["kid"])
145
+ and isinstance(e["sig"], str) and _B64U.fullmatch(e["sig"])):
146
+ return False
147
+ algs.append(e["alg"])
148
+ return algs == sorted(algs)
149
+
150
+
151
+ def _nullable_id(v: Any, rx: re.Pattern[str]) -> bool:
152
+ return v is None or (isinstance(v, str) and rx.fullmatch(v) is not None)
153
+
154
+
155
+ def _v3_fields(receipt: dict[str, Any]) -> bool:
156
+ """Version 3 carries `manifest` and every passage's `item`, and may carry
157
+ `sigs`; versions 1 and 2 carry none of them (contract 1.54)."""
158
+ raw = receipt.get("passages")
159
+ passages: list[Any] = raw if isinstance(raw, list) else []
160
+ has_item = [isinstance(p, dict) and "item" in p for p in passages]
161
+ if receipt.get("v") != 3:
162
+ return "manifest" not in receipt and "sigs" not in receipt and not any(has_item)
163
+ return ("manifest" in receipt and _nullable_id(receipt["manifest"], MANIFEST_ID)
164
+ and all(has_item) and all(_nullable_id(p["item"], ITEM_ID) for p in passages)
165
+ and ("sigs" not in receipt or _sigs(receipt["sigs"])))
166
+
167
+
168
+ def signed_bytes(record: dict[str, Any]) -> bytes:
169
+ """What every signature on a receipt or signed record covers: without `sig` and `sigs`."""
170
+ return canonical({k: v for k, v in record.items() if k not in ("sig", "sigs")})
171
+
172
+
173
+ def _well_formed(receipt: dict[str, Any]) -> bool:
174
+ """Version 1 carries none of version 2's fields; version 2 carries all
175
+ seven with their types (contract 1.41); version 3 is version 2 with
176
+ provenance (contract 1.54)."""
177
+ v = receipt.get("v")
178
+ if isinstance(v, bool) or v not in (1, 2, 3) or not _v3_fields(receipt):
179
+ return False
180
+ if v == 1:
181
+ return not any(k in receipt for k in V2_FIELDS)
182
+ if any(k not in receipt for k in V2_FIELDS):
183
+ return False
184
+ m = receipt["model"]
185
+ if m is not None and not (isinstance(m, dict) and set(m) == {"provider", "name"}
186
+ and all(isinstance(m[k], str) and _LABEL.fullmatch(m[k]) for k in m)):
187
+ return False
188
+ if not all(_count(receipt[k]) for k in ("tokens_in", "tokens_out", "escalations", "cost_usd_nano")):
189
+ return False
190
+ eur, day = receipt["cost_eur_nano"], receipt["fx_date"]
191
+ if eur is None or day is None:
192
+ return eur is None and day is None
193
+ return _count(eur) and isinstance(day, str) and _DATE.fullmatch(day) is not None
194
+
195
+
196
+ def _amount(nanos: int) -> str:
197
+ """Billionths as a decimal, trailing zeros trimmed."""
198
+ if nanos == 0:
199
+ return "0"
200
+ return format(Decimal(nanos).scaleb(-9), "f").rstrip("0").rstrip(".")
201
+
202
+
203
+ def _read(ctx: Context, name: str) -> bytes:
204
+ try:
205
+ if name == "-":
206
+ stream = ctx.stdin or sys.stdin
207
+ raw = stream.buffer.read(MAX_BYTES + 1) if hasattr(stream, "buffer") else stream.read(MAX_BYTES + 1)
208
+ data = raw.encode() if isinstance(raw, str) else raw
209
+ else:
210
+ with Path(name).open("rb") as fh:
211
+ data = fh.read(MAX_BYTES + 1)
212
+ except OSError:
213
+ raise CliError(t("err.file_unreadable", name=name), code=USAGE, error="file_unreadable") from None
214
+ if len(data) > MAX_BYTES:
215
+ raise CliError(t("err.file_unreadable", name=name), code=USAGE, error="file_unreadable")
216
+ return data
217
+
218
+
219
+ def _load_receipt(ctx: Context, name: str) -> dict[str, Any]:
220
+ try:
221
+ doc = json.loads(_read(ctx, name))
222
+ except ValueError:
223
+ raise CliError(t("err.receipt_unreadable"), code=USAGE, error="receipt_unreadable") from None
224
+ # A saved response or fixture holds the receipt under "receipt".
225
+ if isinstance(doc, dict) and isinstance(doc.get("receipt"), dict):
226
+ doc = doc["receipt"]
227
+ if not isinstance(doc, dict) or doc.get("alg") != "Ed25519" or not isinstance(doc.get("sig"), str) \
228
+ or not isinstance(doc.get("kid"), str):
229
+ raise CliError(t("err.receipt_unreadable"), code=USAGE, error="receipt_unreadable")
230
+ if not _well_formed(doc):
231
+ raise CliError(t("err.receipt_malformed"), code=FAILED, error="receipt_malformed")
232
+ return doc
233
+
234
+
235
+ def _load_keys(ctx: Context, given: str | None, receipt: dict[str, Any]) -> tuple[dict[str, Any], str]:
236
+ if given is None and receipt.get("profile") in CLIENT:
237
+ doc = ctx.client().get("/api/v1/octy/keys")
238
+ if not isinstance(doc, dict) or not isinstance(doc.get("keys"), list):
239
+ raise CliError(t("err.keys_unavailable"), code=FAILED, error="keys_unavailable")
240
+ return dict(doc), "tenant"
241
+ if given is None and receipt.get("iss") != ISSUER:
242
+ raise CliError(t("err.receipt_issuer"), code=FAILED, error="receipt_issuer")
243
+ source = given or KEYS_URL
244
+ if source.startswith("https://"):
245
+ timeout = float(getattr(ctx.args, "timeout", None) or 20)
246
+ try:
247
+ with httpx.Client(transport=ctx.transport, timeout=timeout, follow_redirects=False) as h:
248
+ r = h.get(source, headers={"Accept": "application/json"})
249
+ if r.status_code != 200:
250
+ raise CliError(t("err.keys_unavailable"), code=FAILED, error="keys_unavailable")
251
+ doc = r.json()
252
+ except (httpx.HTTPError, ValueError):
253
+ raise CliError(t("err.keys_unavailable"), code=FAILED, error="keys_unavailable") from None
254
+ kind = "url"
255
+ elif "://" in source:
256
+ raise CliError(t("err.keys_unavailable"), code=USAGE, error="keys_unavailable")
257
+ else:
258
+ try:
259
+ doc = json.loads(_read(ctx, source))
260
+ except ValueError:
261
+ raise CliError(t("err.keys_unavailable"), code=FAILED, error="keys_unavailable") from None
262
+ kind = "file"
263
+ if not isinstance(doc, dict) or not isinstance(doc.get("keys"), list):
264
+ raise CliError(t("err.keys_unavailable"), code=FAILED, error="keys_unavailable")
265
+ return doc, kind
266
+
267
+
268
+ def verify_answer(ctx: Context) -> dict[str, Any]:
269
+ receipt = _load_receipt(ctx, ctx.args.receipt)
270
+ keys, source = _load_keys(ctx, ctx.args.keys, receipt)
271
+ candidates = [k for k in keys["keys"] if isinstance(k, dict) and k.get("kid") == receipt["kid"]]
272
+ # A client receipt names who signed it: LightHouse for the portal, the
273
+ # deployment itself for a deployment's answer. Any other key is refused.
274
+ if receipt.get("profile") == "portal":
275
+ candidates = [k for k in candidates if k.get("issuer") == "lighthouse"]
276
+ elif receipt.get("profile") == "deployment":
277
+ candidates = [k for k in candidates if k.get("issuer") == "deployment"
278
+ and k.get("deployment") == receipt.get("deployment")]
279
+ key = next((k for k in candidates if k.get("kty") == "OKP" and k.get("crv") == "Ed25519"), None)
280
+ if key is None:
281
+ raise CliError(t("err.receipt_key_unknown"), code=FAILED, error="receipt_key_unknown")
282
+ try:
283
+ _integers_only(receipt)
284
+ Ed25519PublicKey.from_public_bytes(_b64u(str(key["x"]))).verify(_b64u(receipt["sig"]), signed_bytes(receipt))
285
+ except (InvalidSignature, ValueError, TypeError):
286
+ raise CliError(t("err.receipt_invalid"), code=FAILED, error="receipt_invalid") from None
287
+ policy = "require-hybrid" if (getattr(ctx.args, "require_hybrid", False)
288
+ or keys.get("policy") == "require-hybrid") else "accept"
289
+ signatures = check_sigs(receipt, keys["keys"], signed_bytes(receipt), policy)
290
+ answer = "not_checked"
291
+ if ctx.args.answer is not None:
292
+ data = _read(ctx, ctx.args.answer)
293
+ # Exactly the answer, or the answer and the one newline an editor adds.
294
+ texts = {data, data[:-1] if data.endswith(b"\n") else data}
295
+ if receipt.get("answer_sha256") not in {hashlib.sha256(c).hexdigest() for c in texts}:
296
+ raise CliError(t("err.receipt_answer_mismatch"), code=FAILED, error="receipt_answer_mismatch")
297
+ answer = "matches"
298
+ body = {
299
+ "ok": True, "verified": True, "kid": receipt["kid"], "key_status": key.get("status") or "current",
300
+ "keys": source, "keys_url": (ctx.args.keys or KEYS_URL) if source == "url" else None,
301
+ "answer": answer, "policy": policy, "signatures": signatures,
302
+ "receipt": {"v": receipt["v"], "id": receipt.get("id"), "issuer": receipt.get("iss"),
303
+ "profile": receipt.get("profile"),
304
+ "kind": receipt.get("kind"), "produced": receipt.get("produced"),
305
+ "issued_at": receipt.get("issued_at"), "passages": len(receipt.get("passages") or []),
306
+ "reads": len(receipt.get("reads") or []), "corpus": receipt.get("corpus"),
307
+ "tenant": receipt.get("tenant"), "deployment": receipt.get("deployment")},
308
+ }
309
+ if receipt["v"] in (2, 3):
310
+ eur = receipt["cost_eur_nano"]
311
+ # Signed with the rest: the model's display name, tokens, escalations and cost.
312
+ body["receipt"].update({
313
+ "model": receipt["model"], "tokens_in": receipt["tokens_in"], "tokens_out": receipt["tokens_out"],
314
+ "escalations": receipt["escalations"], "cost_usd": _amount(receipt["cost_usd_nano"]),
315
+ "cost_eur": _amount(eur) if eur is not None else None, "fx_date": receipt["fx_date"]})
316
+ if receipt["v"] == 3:
317
+ body["receipt"]["manifest"] = receipt["manifest"]
318
+ body["receipt"]["items"] = [p["item"] for p in receipt["passages"]]
319
+ body["provenance"] = (_check_provenance(ctx, receipt, keys["keys"]) if ctx.args.provenance is not None
320
+ else None)
321
+ return body
322
+
323
+
324
+ # -- provenance (receipt v3, contract 1.54) -------------------------------------------------
325
+
326
+ _ITEM_KEYS = {"v", "type", "id", "iss", "tenant", "deployment", "doc_sha256", "content_sha256", "source",
327
+ "collected_at", "owner", "review_due", "reviewed_at", "issued_at", "alg", "kid", "sig"}
328
+ _MANIFEST_KEYS = {"v", "type", "id", "iss", "tenant", "deployment", "items", "items_sha256", "index_sha256",
329
+ "issued_at", "alg", "kid", "sig"}
330
+
331
+
332
+ def _load_provenance(ctx: Context, name: str) -> tuple[dict[str, dict[str, Any]], dict[str, dict[str, Any]]]:
333
+ """The signed items and manifests of a provenance export (or of one
334
+ attestation or manifest response), by id."""
335
+ try:
336
+ doc = json.loads(_read(ctx, name))
337
+ except ValueError:
338
+ raise CliError(t("err.provenance_unreadable"), code=USAGE, error="provenance_unreadable") from None
339
+ if isinstance(doc, dict) and doc.get("kind") == "aal.knowledge-provenance/v1":
340
+ items = [e.get("record") for e in doc.get("items") or [] if isinstance(e, dict)]
341
+ manifests = [e.get("record") for e in doc.get("manifests") or [] if isinstance(e, dict)]
342
+ elif isinstance(doc, dict) and isinstance(doc.get("record"), dict):
343
+ rec = doc["record"]
344
+ items, manifests = ([rec], []) if rec.get("type") == "knowledge_item" else ([], [rec])
345
+ else:
346
+ raise CliError(t("err.provenance_unreadable"), code=USAGE, error="provenance_unreadable")
347
+ by = lambda rs: {str(r["id"]): r for r in rs if isinstance(r, dict) and isinstance(r.get("id"), str)} # noqa: E731
348
+ return by(items), by(manifests)
349
+
350
+
351
+ def _record_state(record: dict[str, Any] | None, kind: str, receipt: dict[str, Any], keys: list[Any],
352
+ doc_sha256: str | None = None) -> str:
353
+ """`verified`, or why not: `missing`, `malformed`, `not_this_answer`,
354
+ `unknown_key`, `bad_signature`."""
355
+ if record is None:
356
+ return "missing"
357
+ shape = _ITEM_KEYS if kind == "knowledge_item" else _MANIFEST_KEYS
358
+ if set(record) - {"sigs"} != shape or record.get("type") != kind or record.get("alg") != "Ed25519" \
359
+ or not isinstance(record.get("sig"), str) or ("sigs" in record and not _sigs(record["sigs"])):
360
+ return "malformed"
361
+ if kind == "knowledge_item" and not (isinstance(record.get("doc_sha256"), str)
362
+ and _HEX64.fullmatch(record["doc_sha256"])):
363
+ return "malformed"
364
+ if record.get("tenant") != receipt.get("tenant") or record.get("deployment") != receipt.get("deployment") \
365
+ or record.get("iss") != receipt.get("iss") or (doc_sha256 is not None
366
+ and record.get("doc_sha256") != doc_sha256):
367
+ return "not_this_answer"
368
+ key = next((k for k in keys if isinstance(k, dict) and k.get("kid") == record.get("kid")
369
+ and k.get("issuer") == "deployment" and k.get("deployment") == record.get("deployment")
370
+ and k.get("kty") == "OKP" and k.get("crv") == "Ed25519"), None)
371
+ if key is None:
372
+ return "unknown_key"
373
+ try:
374
+ _integers_only(record)
375
+ Ed25519PublicKey.from_public_bytes(_b64u(str(key["x"]))).verify(_b64u(record["sig"]), signed_bytes(record))
376
+ except (InvalidSignature, ValueError, TypeError):
377
+ return "bad_signature"
378
+ return "verified"
379
+
380
+
381
+ def _check_provenance(ctx: Context, receipt: dict[str, Any], keys: list[Any]) -> dict[str, Any]:
382
+ """Each item and the manifest a version 3 receipt names, from the export,
383
+ against the deployment's keys. Any record named and not verified fails
384
+ the command; a passage with no item is reported as not attested."""
385
+ items, manifests = _load_provenance(ctx, ctx.args.provenance)
386
+ rows = []
387
+ for p in receipt["passages"]:
388
+ item = p["item"]
389
+ state = "not_attested" if item is None else _record_state(items.get(item), "knowledge_item", receipt, keys,
390
+ p.get("doc_sha256"))
391
+ rows.append({"n": p.get("n"), "item": item, "state": state})
392
+ m = receipt["manifest"]
393
+ mstate = "none" if m is None else _record_state(manifests.get(m), "corpus_manifest", receipt, keys)
394
+ out = {"manifest": {"id": m, "state": mstate}, "items": rows}
395
+ if mstate not in ("verified", "none") or any(r["state"] not in ("verified", "not_attested") for r in rows):
396
+ raise CliError(t("err.provenance_invalid"), code=FAILED, error="provenance_invalid", detail=out)
397
+ return out
398
+
399
+
400
+ MLDSA65 = "ML-DSA-65"
401
+ MLDSA65_SIG_BYTES = 3309
402
+ MLDSA65_PUBLIC_BYTES = 1952
403
+ _KID = re.compile(r"^[0-9a-f]{16}$")
404
+ _B64URL = re.compile(r"^[A-Za-z0-9_-]{1,8300}$")
405
+
406
+
407
+ def _mldsa_keys(receipt: dict[str, Any], keys: list[Any]) -> dict[str, bytes]:
408
+ """The published ML-DSA-65 keys of the receipt's own signer, by kid."""
409
+ out: dict[str, bytes] = {}
410
+ for k in keys:
411
+ if not (isinstance(k, dict) and k.get("kty") == "AKP" and k.get("alg") == MLDSA65
412
+ and isinstance(k.get("pub"), str) and isinstance(k.get("kid"), str)):
413
+ continue
414
+ if receipt.get("profile") == "portal" and k.get("issuer") != "lighthouse":
415
+ continue
416
+ if receipt.get("profile") == "deployment" and (k.get("issuer") != "deployment"
417
+ or k.get("deployment") != receipt.get("deployment")):
418
+ continue
419
+ try:
420
+ raw = _b64u(k["pub"])
421
+ except ValueError:
422
+ continue
423
+ if len(raw) == MLDSA65_PUBLIC_BYTES:
424
+ out[k["kid"]] = raw
425
+ return out
426
+
427
+
428
+ def check_sigs(receipt: dict[str, Any], keys: list[Any], data: bytes, policy: str) -> list[dict[str, Any]]:
429
+ """Each signature on the receipt, Ed25519 first (already verified), as
430
+ {alg, kid, status}: `verified`, `unknown_alg` or `unchecked` (no ML-DSA
431
+ key is published for the signer). A known signature that fails, a
432
+ malformed `sigs`, or `require-hybrid` without a valid ML-DSA-65 one is a
433
+ CliError (contract 1.54, the service's multisig.verify_sigs)."""
434
+ from cryptography.hazmat.primitives.asymmetric.mldsa import MLDSA65PublicKey
435
+ out: list[dict[str, Any]] = [{"alg": "Ed25519", "kid": receipt["kid"], "status": "verified"}]
436
+ sigs = receipt.get("sigs")
437
+ if sigs is not None:
438
+ if not isinstance(sigs, list) or not 1 <= len(sigs) <= 4:
439
+ raise CliError(t("err.receipt_malformed"), code=FAILED, error="receipt_malformed")
440
+ ring = _mldsa_keys(receipt, keys)
441
+ for e in sigs:
442
+ if not (isinstance(e, dict) and set(e) == {"alg", "kid", "sig"}
443
+ and all(isinstance(e[k], str) for k in e) and _KID.fullmatch(e["kid"])
444
+ and _B64URL.fullmatch(e["sig"]) and e["alg"] != "Ed25519"):
445
+ raise CliError(t("err.receipt_malformed"), code=FAILED, error="receipt_malformed")
446
+ if e["alg"] != MLDSA65:
447
+ out.append({"alg": e["alg"][:32], "kid": e["kid"], "status": "unknown_alg"})
448
+ continue
449
+ if not ring:
450
+ out.append({"alg": MLDSA65, "kid": e["kid"], "status": "unchecked"})
451
+ continue
452
+ public = ring.get(e["kid"])
453
+ if public is None:
454
+ raise CliError(t("err.receipt_key_unknown"), code=FAILED, error="receipt_key_unknown")
455
+ try:
456
+ raw = _b64u(e["sig"])
457
+ if len(raw) != MLDSA65_SIG_BYTES:
458
+ raise ValueError("length")
459
+ MLDSA65PublicKey.from_public_bytes(public).verify(raw, data)
460
+ except (InvalidSignature, ValueError):
461
+ raise CliError(t("err.receipt_invalid"), code=FAILED, error="receipt_invalid") from None
462
+ out.append({"alg": MLDSA65, "kid": e["kid"], "status": "verified"})
463
+ if policy == "require-hybrid" and not any(s["alg"] == MLDSA65 and s["status"] == "verified" for s in out):
464
+ raise CliError(t("err.receipt_hybrid_required"), code=FAILED, error="receipt_hybrid_required")
465
+ return out
466
+
467
+
468
+ def _show(out: Out, body: dict[str, Any]) -> None:
469
+ r = body["receipt"]
470
+ # A deployment's answer is signed with the deployment's own key, not Atlantic's.
471
+ out.done(t("verify.verified_deployment") if r["profile"] == "deployment" else t("verify.verified"))
472
+ out.pairs([("receipt", r["id"]),
473
+ ("issued", r["issued_at"]),
474
+ ("kind", r["kind"]),
475
+ ("passages", r["passages"]),
476
+ *(_signed_v2(r) if r.get("v") in (2, 3) else []),
477
+ *(_provenance_pairs(r, body.get("provenance")) if r.get("v") == 3 else []),
478
+ ("signed with key", f"{body['kid']} ({body['key_status']})"),
479
+ *[(f"signature {s['alg']}", f"{s['kid']} ({s['status']})") for s in body["signatures"][1:]],
480
+ ("answer", t("verify.answer_matches") if body["answer"] == "matches"
481
+ else t("verify.answer_not_checked"))])
482
+
483
+
484
+ def _provenance_pairs(r: dict[str, Any], prov: dict[str, Any] | None) -> list[tuple[str, Any]]:
485
+ if prov is None:
486
+ return [("manifest", r["manifest"] or "-"), ("knowledge items", t("verify.provenance_not_checked"))]
487
+ rows = prov["items"]
488
+ verified = sum(1 for x in rows if x["state"] == "verified")
489
+ return [("manifest", f"{r['manifest']} ({t('verify.provenance_verified')})" if r["manifest"] else "-"),
490
+ ("knowledge items", t("verify.provenance_items", verified=verified,
491
+ unattested=sum(1 for x in rows if x["state"] == "not_attested")))]
492
+
493
+
494
+ def _signed_v2(r: dict[str, Any]) -> list[tuple[str, Any]]:
495
+ m = r["model"]
496
+ cost = f"US${r['cost_usd']}"
497
+ if r["cost_eur"] is not None:
498
+ cost = f"€{r['cost_eur']} ({cost}, ECB {r['fx_date']})"
499
+ return [("model", f"{m['name']} · {m['provider']}" if m else None),
500
+ ("tokens in/out", f"{r['tokens_in']:,} / {r['tokens_out']:,}"),
501
+ ("escalations", r["escalations"]),
502
+ ("cost", cost)]
503
+
504
+
505
+ COMMANDS = (Command("verify-answer", "check that an answer from Octy was signed by Atlantic Agentic and is unchanged",
506
+ _configure, verify_answer, _show, anonymous=True),)
@@ -374,6 +374,7 @@
374
374
  "err.receipt_issuer": "لم تُصدر Atlantic Agentic هذا الإيصال؛ استخدم --keys للتحقق منه بمفاتيح أخرى",
375
375
  "err.keys_unavailable": "تعذّرت قراءة المفاتيح المنشورة",
376
376
  "err.receipt_key_unknown": "المفتاح الذي وقّع هذا الإيصال غير منشور",
377
+ "err.receipt_hybrid_required": "تشترط هذه المؤسسة أيضًا توقيعًا مقاومًا للحوسبة الكمّية (ML-DSA-65)، وهذا الإيصال لا يحمل توقيعًا صالحًا",
377
378
  "err.receipt_invalid": "التوقيع غير مطابق: تم تغيير الإيصال أو لم توقّعه Atlantic Agentic",
378
379
  "err.receipt_answer_mismatch": "الإجابة لا تطابق إيصالها",
379
380
  "verify.verified": "موقّع من Atlantic Agentic · تم التحقق",
@@ -426,5 +427,14 @@
426
427
  "label.until": "حتى",
427
428
  "label.by": "بواسطة",
428
429
  "label.source": "المصدر",
429
- "label.eligible": "مؤهَّل"
430
+ "label.eligible": "مؤهَّل",
431
+ "help.verify-answer.provenance": "تصدير مصدر المعرفة من LightHouse، للتحقق دون اتصال من عناصر المعرفة وبيان المجموعة لإيصال الإصدار 3",
432
+ "help.verify-answer.require_hybrid": "اشتراط توقيع ML-DSA-65 صالح أيضًا (مقاوم للحوسبة الكمّية)، وليس Ed25519 فقط",
433
+ "err.provenance_unreadable": "هذا ليس تصديرًا لمصدر المعرفة",
434
+ "err.provenance_invalid": "عنصر معرفة أو بيان مجموعة يسميه هذا الإيصال لا يمكن التحقق منه",
435
+ "verify.provenance_not_checked": "لم يُفحص (أعطِ --provenance)",
436
+ "verify.provenance_verified": "تم التحقق",
437
+ "verify.provenance_items": "{verified} تم التحقق · {unattested} غير مصادق عليها",
438
+ "label.manifest": "البيان",
439
+ "label.knowledge_items": "عناصر المعرفة"
430
440
  }
@@ -374,6 +374,7 @@
374
374
  "err.receipt_issuer": "der Beleg wurde nicht von Atlantic Agentic ausgestellt; geben Sie --keys an, um ihn mit anderen Schlüsseln zu prüfen",
375
375
  "err.keys_unavailable": "die veröffentlichten Schlüssel konnten nicht gelesen werden",
376
376
  "err.receipt_key_unknown": "der Schlüssel, der diesen Beleg signiert hat, ist nicht veröffentlicht",
377
+ "err.receipt_hybrid_required": "diese Organisation verlangt zusätzlich eine Post-Quanten-Signatur (ML-DSA-65), und dieser Beleg trägt keine gültige",
377
378
  "err.receipt_invalid": "die Signatur stimmt nicht: der Beleg wurde geändert oder nicht von Atlantic Agentic signiert",
378
379
  "err.receipt_answer_mismatch": "die Antwort stimmt nicht mit ihrem Beleg überein",
379
380
  "verify.verified": "Signiert von Atlantic Agentic · geprüft",
@@ -426,5 +427,14 @@
426
427
  "label.until": "bis",
427
428
  "label.by": "von",
428
429
  "label.source": "Quelle",
429
- "label.eligible": "berechtigt"
430
+ "label.eligible": "berechtigt",
431
+ "help.verify-answer.provenance": "ein Export der Wissensherkunft aus LightHouse, um die Wissenselemente und das Korpus-Manifest einer Quittung der Version 3 offline zu prüfen",
432
+ "help.verify-answer.require_hybrid": "zusätzlich eine gültige ML-DSA-65-Signatur (Post-Quanten) verlangen, nicht nur Ed25519",
433
+ "err.provenance_unreadable": "dies ist kein Export der Wissensherkunft",
434
+ "err.provenance_invalid": "ein Wissenselement oder Korpus-Manifest, das diese Quittung nennt, lässt sich nicht verifizieren",
435
+ "verify.provenance_not_checked": "nicht geprüft (--provenance angeben)",
436
+ "verify.provenance_verified": "verifiziert",
437
+ "verify.provenance_items": "{verified} verifiziert · {unattested} nicht bestätigt",
438
+ "label.manifest": "Manifest",
439
+ "label.knowledge_items": "Wissenselemente"
430
440
  }