agents: the hosted witness for agent ledgers (sandbox on testnet 28001), its probe and negative control; crypto-inventory 0.4.1 resolves a minimum TLS version given through a constant or a ternary; proof-kinds and conformance gain the agent-witness-checkpoint kind; the reproduction scripts of the Shield recipes no longer carry a workstation path
This commit is contained in:
1 parent
0c8f1de3fd
commit
a654c3d522
27 files changed
+4737
-43
No files matched your search
@@ -29,6 +29,26 @@ const NUME_IN_SERVICIU = /^[a-z0-9][a-z0-9_-]{0,63}$/;
|
||||
const eRegula = (r) => typeof r === 'string' && /^[a-z][a-z0-9-]{0,63}$/.test(r);
|
||||
const eGrant = (g) => typeof g === 'string' && /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,63}$/.test(g);
|
||||
const eIdSauNull = (v) => v === null || (typeof v === 'string' && /^aere-id:[0-9a-f]{40}$/.test(v));
|
||||
const eRfc3339 = (v) => typeof v === 'string' && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?(Z|[+-]\d{2}:\d{2})$/.test(v) && !Number.isNaN(Date.parse(v));
|
||||
const eHash32 = (v) => typeof v === 'string' && /^0x[0-9a-f]{64}$/.test(v);
|
||||
|
||||
// 2026-10-19 (revizia adversariala B3, constatarea 8): VOCABULARUL capului de jurnal al martorului gazduit al agentilor, scris O SINGURA DATA
|
||||
// aici. Pana azi constructorul felului copia campurile ca atare (treeSize '5', maxMergeDelay 0, witness 'x' se construiau, iar plicul era
|
||||
// VALID la verificatorul AIP-23), in timp ce martorul (tools/agent-policy/martor-agenti.mjs, verificaPunct) judeca forma cu propria lui copie a
|
||||
// regulilor. Acum verificaPunct importa exact acest obiect, deci cele doua nu mai pot diverge. Valorile bune nu se schimba: vectorii
|
||||
// publicati raman octet cu octet aceiasi.
|
||||
export const AGENT_WITNESS_CHECKPOINT = Object.freeze({
|
||||
valori: Object.freeze({
|
||||
root: [eHash32, 'a 32-byte hash, 0x + 64 lowercase hex (the RFC 9162 root of the log)'],
|
||||
previous: [eHash32, 'the statementHash of the checkpoint before, 0x + 64 lowercase hex (absent on the first)'],
|
||||
log: [(v) => typeof v === 'string' && v.length >= 1 && v.length <= 256 && /^[\x21-\x7e]+$/.test(v), '1 to 256 printable ASCII characters without spaces (the log name)'],
|
||||
witness: [(v) => typeof v === 'string' && /^aere-witness:[0-9a-f]{40}$/.test(v), 'aere-witness: + 40 lowercase hex (derived from the ML-DSA-65 key of the witness)'],
|
||||
chainId: [(v) => Number.isSafeInteger(v) && v >= 1, 'a positive integer (the chain the checkpoints are notarized on)'],
|
||||
treeSize: [(v) => Number.isSafeInteger(v) && v >= 1, 'an integer >= 1 (the number of heads in the log)'],
|
||||
maxMergeDelay: [(v) => Number.isSafeInteger(v) && v >= 1, 'an integer number of seconds >= 1 (the maximum merge delay)'],
|
||||
createdAt: [eRfc3339, 'an RFC 3339 time'],
|
||||
}),
|
||||
});
|
||||
|
||||
// schema fiecarui fel: campuri de tip 'digest' (se hashuiesc), 'plain' (raman ca atare), 'bool', 'list'. Toate obligatorii daca in `req`.
|
||||
export const SCHEME = {
|
||||
@@ -81,6 +101,15 @@ export const SCHEME = {
|
||||
judged: [(v) => Array.isArray(v) && v.length <= 64 && v.every((x) => x && typeof x === 'object' && !Array.isArray(x) && Object.keys(x).sort().join(',') === 'grant,rules' && eGrant(x.grant) && Array.isArray(x.rules) && x.rules.length <= 64 && x.rules.every(eRegula)), 'a list of { grant, rules }, at most 64'],
|
||||
createdAt: [(v) => typeof v === 'string' && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?(Z|[+-]\d{2}:\d{2})$/.test(v) && !Number.isNaN(Date.parse(v)), 'an RFC 3339 time'],
|
||||
} },
|
||||
// 2026-10-19 (roadmap pista B, B3, linia Agents): CAPUL DE JURNAL al martorului gazduit al agentilor (tools/agent-policy/martor-agenti.mjs),
|
||||
// in forma unui checkpoint de jurnal transparent (C2SP tlog-checkpoint: numele jurnalului, marimea, radacina RFC 9162): marimea si radacina
|
||||
// arborelui capetelor de registru primite, capul de dinainte (statementHash-ul lui), numele jurnalului, id-ul martorului (derivat din cheia
|
||||
// lui ML-DSA-65, care semneaza plicul), lantul pe care se notarizeaza capetele (28001 in sandbox) si intarzierea maxima promisa intre primirea
|
||||
// unui cap si acoperirea lui de un cap notarizat (secunde, ca MMD-ul din RFC 9162). Nimic din vreun registru: frunzele sunt digesturi.
|
||||
// Felurile de dinainte nu se schimba cu nimic.
|
||||
// 2026-10-19 (revizia B3): cu vocabularul de mai sus (AGENT_WITNESS_CHECKPOINT), importat si de judecatorul martorului.
|
||||
'agent-witness-checkpoint': { hash: ['root', 'previous'], plain: { log: 'log', witness: 'witness', chainId: 'chainId', treeSize: 'treeSize', maxMergeDelay: 'maxMergeDelay' }, req: ['root', 'log', 'witness', 'chainId', 'treeSize', 'maxMergeDelay'],
|
||||
valori: AGENT_WITNESS_CHECKPOINT.valori },
|
||||
};
|
||||
export const KINDS = Object.keys(SCHEME);
|
||||
|
||||
|
||||
Reference in new issue
Block a user