@behavproof/contract-registry 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -2
- package/dist/assurance.d.ts +59 -0
- package/dist/assurance.d.ts.map +1 -0
- package/dist/assurance.js +173 -0
- package/dist/assurance.js.map +1 -0
- package/dist/discovery.d.ts +20 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +233 -0
- package/dist/discovery.js.map +1 -0
- package/dist/documents.d.ts +15 -0
- package/dist/documents.d.ts.map +1 -0
- package/dist/documents.js +89 -0
- package/dist/documents.js.map +1 -0
- package/dist/graph.d.ts +29 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +61 -0
- package/dist/graph.js.map +1 -0
- package/dist/impact.d.ts +11 -0
- package/dist/impact.d.ts.map +1 -0
- package/dist/impact.js +110 -0
- package/dist/impact.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/probe.d.ts +79 -0
- package/dist/probe.d.ts.map +1 -0
- package/dist/probe.js +99 -0
- package/dist/probe.js.map +1 -0
- package/dist/registry.d.ts +69 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +189 -0
- package/dist/registry.js.map +1 -0
- package/package.json +30 -4
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type Contract, type Intent, type RegistrySnapshot, type Approval } from "@behavproof/core";
|
|
2
|
+
export type Change = {
|
|
3
|
+
type: string;
|
|
4
|
+
contractId?: string;
|
|
5
|
+
intentId?: string;
|
|
6
|
+
caseId?: string;
|
|
7
|
+
before?: unknown;
|
|
8
|
+
after?: unknown;
|
|
9
|
+
transitionHash: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function transitionHash(before: Contract, after: Contract | undefined): string;
|
|
12
|
+
export declare function intentTransitionHash(before: Intent, after: Intent | undefined, beforeContracts: readonly string[], afterContracts: readonly string[]): string;
|
|
13
|
+
/** verifyApproval is supplied by an independent trust boundary; data in the repository is not authority. */
|
|
14
|
+
export declare function reconcile(base: Pick<RegistrySnapshot, "contracts" | "intents">, head: Pick<RegistrySnapshot, "contracts" | "intents">, approvals?: readonly Approval[], verifyApproval?: (approval: Approval) => boolean): {
|
|
15
|
+
obligations: {
|
|
16
|
+
id: string;
|
|
17
|
+
kind: "external" | "examples" | "invariant" | "state_machine" | "api_contract";
|
|
18
|
+
intentIds: string[];
|
|
19
|
+
revisionHash: string;
|
|
20
|
+
sourceRef: string;
|
|
21
|
+
formal?: {
|
|
22
|
+
modelId: string;
|
|
23
|
+
modelHash: string;
|
|
24
|
+
propertyIds: string[];
|
|
25
|
+
driverHash?: string | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
caseIds?: string[] | undefined;
|
|
28
|
+
risk?: "basic" | "standard" | "critical" | undefined;
|
|
29
|
+
cases?: {
|
|
30
|
+
id: string;
|
|
31
|
+
input: import("zod").JSONType;
|
|
32
|
+
expected: import("zod").JSONType;
|
|
33
|
+
negative?: boolean | undefined;
|
|
34
|
+
}[] | undefined;
|
|
35
|
+
}[];
|
|
36
|
+
intentObligations: {
|
|
37
|
+
id: string;
|
|
38
|
+
statement: string;
|
|
39
|
+
risk: "basic" | "standard" | "critical";
|
|
40
|
+
contentHash: string;
|
|
41
|
+
origin: {
|
|
42
|
+
kind: "external" | "inline" | "manifest";
|
|
43
|
+
ref: string;
|
|
44
|
+
};
|
|
45
|
+
}[];
|
|
46
|
+
changes: Change[];
|
|
47
|
+
};
|
|
48
|
+
export type LifecycleAction = "approve" | "supersede" | "revoke";
|
|
49
|
+
export declare function lifecycleTransitionHash(kind: "intent" | "contract", id: string, from: string, action: "supersede" | "revoke", to: string | null): string;
|
|
50
|
+
export type LifecycleTransition = {
|
|
51
|
+
action: "approve";
|
|
52
|
+
approval: Approval;
|
|
53
|
+
} | {
|
|
54
|
+
action: "revoke";
|
|
55
|
+
approval: Approval;
|
|
56
|
+
} | {
|
|
57
|
+
action: "supersede";
|
|
58
|
+
toHash: string;
|
|
59
|
+
approval: Approval;
|
|
60
|
+
};
|
|
61
|
+
export declare function lifecycle(entity: Intent | Contract, transitions: readonly LifecycleTransition[], verify?: (approval: Approval) => boolean): {
|
|
62
|
+
state: "proposed" | "approved" | "superseded" | "revoked";
|
|
63
|
+
contentHash: string;
|
|
64
|
+
history: {
|
|
65
|
+
action: LifecycleAction;
|
|
66
|
+
approvalId: string;
|
|
67
|
+
}[];
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,kBAAkB,CAAC;AAC1B,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AACF,wBAAgB,cAAc,CAC5B,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,QAAQ,GAAG,SAAS,GAC1B,MAAM,CAMR;AACD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,eAAe,EAAE,SAAS,MAAM,EAAE,EAClC,cAAc,EAAE,SAAS,MAAM,EAAE,GAChC,MAAM,CASR;AACD,4GAA4G;AAC5G,wBAAgB,SAAS,CACvB,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,SAAS,CAAC,EACrD,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,SAAS,CAAC,EACrD,SAAS,GAAE,SAAS,QAAQ,EAAO,EACnC,cAAc,GAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyI9D;AACD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AACjE,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,QAAQ,GAAG,UAAU,EAC3B,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,WAAW,GAAG,QAAQ,EAC9B,EAAE,EAAE,MAAM,GAAG,IAAI,GAChB,MAAM,CAER;AACD,MAAM,MAAM,mBAAmB,GAC3B;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;CACpB,GACD;IACE,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB,GACD;IACE,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AACN,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,GAAG,QAAQ,EACzB,WAAW,EAAE,SAAS,mBAAmB,EAAE,EAC3C,MAAM,GAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAqB;;;;gBAO3C,eAAe;oBACX,MAAM;;EAmCrB"}
|
package/dist/registry.js
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { canonicalJson, hash, ApprovalSchema, } from "@behavproof/core";
|
|
2
|
+
export function transitionHash(before, after) {
|
|
3
|
+
return hash({
|
|
4
|
+
contractId: before.id,
|
|
5
|
+
before: before.revisionHash,
|
|
6
|
+
after: after?.revisionHash ?? null,
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
export function intentTransitionHash(before, after, beforeContracts, afterContracts) {
|
|
10
|
+
return hash({
|
|
11
|
+
kind: "intent",
|
|
12
|
+
id: before.id,
|
|
13
|
+
before: before.contentHash,
|
|
14
|
+
after: after?.contentHash ?? null,
|
|
15
|
+
beforeContracts: [...beforeContracts].sort(),
|
|
16
|
+
afterContracts: [...afterContracts].sort(),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/** verifyApproval is supplied by an independent trust boundary; data in the repository is not authority. */
|
|
20
|
+
export function reconcile(base, head, approvals = [], verifyApproval = () => false) {
|
|
21
|
+
const obligations = [];
|
|
22
|
+
const changes = [];
|
|
23
|
+
for (const old of base.contracts) {
|
|
24
|
+
const current = head.contracts.find((c) => c.id === old.id);
|
|
25
|
+
const th = transitionHash(old, current);
|
|
26
|
+
const changed = !current || current.revisionHash !== old.revisionHash;
|
|
27
|
+
const approved = changed &&
|
|
28
|
+
approvals.some((a) => ApprovalSchema.safeParse(a).success &&
|
|
29
|
+
a.status === "pass" &&
|
|
30
|
+
a.target.kind === "contract" &&
|
|
31
|
+
a.target.id === old.id &&
|
|
32
|
+
a.target.contentHash === th &&
|
|
33
|
+
verifyApproval(a) === true);
|
|
34
|
+
if (changed) {
|
|
35
|
+
if (old.kind !== "examples" || (current && current.kind !== "examples"))
|
|
36
|
+
changes.push({
|
|
37
|
+
type: "UNSUPPORTED_SEMANTIC_DIFF",
|
|
38
|
+
contractId: old.id,
|
|
39
|
+
before: old.kind,
|
|
40
|
+
after: current?.kind ?? null,
|
|
41
|
+
transitionHash: th,
|
|
42
|
+
});
|
|
43
|
+
if (!current)
|
|
44
|
+
changes.push({
|
|
45
|
+
type: "CONTRACT_REMOVED",
|
|
46
|
+
contractId: old.id,
|
|
47
|
+
transitionHash: th,
|
|
48
|
+
});
|
|
49
|
+
else {
|
|
50
|
+
for (const c of old.cases ?? []) {
|
|
51
|
+
const next = current.cases?.find((n) => n.id === c.id);
|
|
52
|
+
if (!next)
|
|
53
|
+
changes.push({
|
|
54
|
+
type: "CONTRACT_CASE_REMOVED",
|
|
55
|
+
contractId: old.id,
|
|
56
|
+
caseId: c.id,
|
|
57
|
+
transitionHash: th,
|
|
58
|
+
});
|
|
59
|
+
else if (canonicalJson(c.expected) !== canonicalJson(next.expected))
|
|
60
|
+
changes.push({
|
|
61
|
+
type: "CONTRACT_EXPECTED_CHANGED",
|
|
62
|
+
contractId: old.id,
|
|
63
|
+
caseId: c.id,
|
|
64
|
+
before: c.expected,
|
|
65
|
+
after: next.expected,
|
|
66
|
+
transitionHash: th,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
for (const c of current.cases ?? [])
|
|
70
|
+
if (!old.cases?.some((o) => o.id === c.id))
|
|
71
|
+
changes.push({
|
|
72
|
+
type: "CONTRACT_CASE_ADDED",
|
|
73
|
+
contractId: old.id,
|
|
74
|
+
caseId: c.id,
|
|
75
|
+
transitionHash: th,
|
|
76
|
+
});
|
|
77
|
+
if (old.risk !== current.risk)
|
|
78
|
+
changes.push({
|
|
79
|
+
type: "CONTRACT_RISK_CHANGED",
|
|
80
|
+
contractId: old.id,
|
|
81
|
+
before: old.risk,
|
|
82
|
+
after: current.risk,
|
|
83
|
+
transitionHash: th,
|
|
84
|
+
});
|
|
85
|
+
if (!changes.some((c) => c.contractId === old.id))
|
|
86
|
+
changes.push({
|
|
87
|
+
type: "CONTRACT_CHANGED",
|
|
88
|
+
contractId: old.id,
|
|
89
|
+
transitionHash: th,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (!approved)
|
|
94
|
+
obligations.push(old);
|
|
95
|
+
else if (current)
|
|
96
|
+
obligations.push(current);
|
|
97
|
+
}
|
|
98
|
+
for (const c of head.contracts)
|
|
99
|
+
if (!base.contracts.some((b) => b.id === c.id))
|
|
100
|
+
obligations.push(c);
|
|
101
|
+
const intentObligations = [];
|
|
102
|
+
const retainedContracts = new Set();
|
|
103
|
+
const refs = (contracts, id) => contracts
|
|
104
|
+
.filter((c) => c.intentIds.includes(id))
|
|
105
|
+
.map((c) => c.id)
|
|
106
|
+
.sort();
|
|
107
|
+
for (const old of base.intents) {
|
|
108
|
+
const current = head.intents.find((i) => i.id === old.id);
|
|
109
|
+
const beforeRefs = refs(base.contracts, old.id), afterRefs = refs(head.contracts, old.id);
|
|
110
|
+
const changed = !current ||
|
|
111
|
+
current.contentHash !== old.contentHash ||
|
|
112
|
+
canonicalJson(beforeRefs) !== canonicalJson(afterRefs);
|
|
113
|
+
const th = intentTransitionHash(old, current, beforeRefs, afterRefs);
|
|
114
|
+
const approved = changed &&
|
|
115
|
+
approvals.some((a) => ApprovalSchema.safeParse(a).success &&
|
|
116
|
+
a.status === "pass" &&
|
|
117
|
+
a.target.kind === "intent" &&
|
|
118
|
+
a.target.id === old.id &&
|
|
119
|
+
a.target.contentHash === th &&
|
|
120
|
+
verifyApproval(a) === true);
|
|
121
|
+
if (changed)
|
|
122
|
+
changes.push({
|
|
123
|
+
type: approved ? "INTENT_CHANGED" : "INTENT_CHANGED_UNAPPROVED",
|
|
124
|
+
intentId: old.id,
|
|
125
|
+
before: { statement: old.statement, contracts: beforeRefs },
|
|
126
|
+
after: current
|
|
127
|
+
? { statement: current.statement, contracts: afterRefs }
|
|
128
|
+
: null,
|
|
129
|
+
transitionHash: th,
|
|
130
|
+
});
|
|
131
|
+
if (!approved) {
|
|
132
|
+
intentObligations.push(old);
|
|
133
|
+
for (const id of beforeRefs)
|
|
134
|
+
if (!afterRefs.includes(id))
|
|
135
|
+
retainedContracts.add(id);
|
|
136
|
+
}
|
|
137
|
+
else if (current)
|
|
138
|
+
intentObligations.push(current);
|
|
139
|
+
}
|
|
140
|
+
for (const current of head.intents)
|
|
141
|
+
if (!base.intents.some((i) => i.id === current.id))
|
|
142
|
+
intentObligations.push(current);
|
|
143
|
+
// An intent approval is independently required to remove its executable edges.
|
|
144
|
+
for (const id of retainedContracts) {
|
|
145
|
+
const old = base.contracts.find((c) => c.id === id);
|
|
146
|
+
const index = obligations.findIndex((c) => c.id === id);
|
|
147
|
+
if (index === -1)
|
|
148
|
+
obligations.push(old);
|
|
149
|
+
else
|
|
150
|
+
obligations[index] = old;
|
|
151
|
+
}
|
|
152
|
+
return { obligations, intentObligations, changes };
|
|
153
|
+
}
|
|
154
|
+
export function lifecycleTransitionHash(kind, id, from, action, to) {
|
|
155
|
+
return hash({ kind, id, from, action, to });
|
|
156
|
+
}
|
|
157
|
+
export function lifecycle(entity, transitions, verify = () => false) {
|
|
158
|
+
const kind = "revisionHash" in entity ? "contract" : "intent";
|
|
159
|
+
const contentHash = "revisionHash" in entity ? entity.revisionHash : entity.contentHash;
|
|
160
|
+
let state = "proposed";
|
|
161
|
+
const history = [];
|
|
162
|
+
for (const t of transitions) {
|
|
163
|
+
const a = ApprovalSchema.safeParse(t.approval);
|
|
164
|
+
if (!a.success ||
|
|
165
|
+
a.data.status !== "pass" ||
|
|
166
|
+
a.data.target.kind !== kind ||
|
|
167
|
+
a.data.target.id !== entity.id ||
|
|
168
|
+
!verify(a.data))
|
|
169
|
+
continue;
|
|
170
|
+
const target = t.action === "approve"
|
|
171
|
+
? contentHash
|
|
172
|
+
: lifecycleTransitionHash(kind, entity.id, contentHash, t.action, t.action === "supersede" ? t.toHash : null);
|
|
173
|
+
if (a.data.target.contentHash !== target)
|
|
174
|
+
continue;
|
|
175
|
+
if (t.action === "approve" && state === "proposed")
|
|
176
|
+
state = "approved";
|
|
177
|
+
else if (t.action === "supersede" &&
|
|
178
|
+
state === "approved" &&
|
|
179
|
+
/^[a-f0-9]{64}$/.test(t.toHash))
|
|
180
|
+
state = "superseded";
|
|
181
|
+
else if (t.action === "revoke" && state === "approved")
|
|
182
|
+
state = "revoked";
|
|
183
|
+
else
|
|
184
|
+
continue;
|
|
185
|
+
history.push({ action: t.action, approvalId: a.data.id });
|
|
186
|
+
}
|
|
187
|
+
return { state, contentHash, history };
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0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AAM,KAAK,SAAS,IAAI,KAAK,KAAK,UAAU;YAAE,KAAK,GAAG,UAAU,CAAC;aAClE,IACH,CAAC,CAAC,MAAM,KAAK,WAAW;YACxB,KAAK,KAAK,UAAU;YACpB,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;YAE/B,KAAK,GAAG,YAAY,CAAC;aAClB,IAAI,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,KAAK,KAAK,UAAU;YAAE,KAAK,GAAG,SAAS,CAAC;;YACrE,SAAS;QACd,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AACzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@behavproof/contract-registry",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.js"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@behavproof/core": "0.1.0",
|
|
13
|
+
"typescript-parser": "npm:typescript@5.9.3"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": "24.x"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/kanoi-y/BehavProof.git",
|
|
24
|
+
"directory": "packages/contract-registry"
|
|
25
|
+
},
|
|
26
|
+
"license": "UNLICENSED",
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public",
|
|
29
|
+
"registry": "https://registry.npmjs.org/"
|
|
30
|
+
},
|
|
31
|
+
"description": "BehavProof contract-registry: authenticated behavioral evidence for protected development workflows"
|
|
32
|
+
}
|