@capaxle/runtime 0.1.0-alpha.1
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/LICENSE +202 -0
- package/README.md +5 -0
- package/dist/authorization.d.ts +12 -0
- package/dist/authorization.d.ts.map +1 -0
- package/dist/authorization.js +23 -0
- package/dist/authorization.js.map +1 -0
- package/dist/base64url.d.ts +4 -0
- package/dist/base64url.d.ts.map +1 -0
- package/dist/base64url.js +11 -0
- package/dist/base64url.js.map +1 -0
- package/dist/confirmation-types.d.ts +255 -0
- package/dist/confirmation-types.d.ts.map +1 -0
- package/dist/confirmation-types.js +2 -0
- package/dist/confirmation-types.js.map +1 -0
- package/dist/confirmation.d.ts +6 -0
- package/dist/confirmation.d.ts.map +1 -0
- package/dist/confirmation.js +1205 -0
- package/dist/confirmation.js.map +1 -0
- package/dist/idempotency-types.d.ts +130 -0
- package/dist/idempotency-types.d.ts.map +1 -0
- package/dist/idempotency-types.js +2 -0
- package/dist/idempotency-types.js.map +1 -0
- package/dist/idempotency.d.ts +4 -0
- package/dist/idempotency.d.ts.map +1 -0
- package/dist/idempotency.js +798 -0
- package/dist/idempotency.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/ingress.d.ts +33 -0
- package/dist/ingress.d.ts.map +1 -0
- package/dist/ingress.js +325 -0
- package/dist/ingress.js.map +1 -0
- package/dist/kernel.d.ts +5 -0
- package/dist/kernel.d.ts.map +1 -0
- package/dist/kernel.js +2872 -0
- package/dist/kernel.js.map +1 -0
- package/dist/principal.d.ts +7 -0
- package/dist/principal.d.ts.map +1 -0
- package/dist/principal.js +130 -0
- package/dist/principal.js.map +1 -0
- package/dist/rate-limit.d.ts +12 -0
- package/dist/rate-limit.d.ts.map +1 -0
- package/dist/rate-limit.js +82 -0
- package/dist/rate-limit.js.map +1 -0
- package/dist/redaction.d.ts +19 -0
- package/dist/redaction.d.ts.map +1 -0
- package/dist/redaction.js +338 -0
- package/dist/redaction.js.map +1 -0
- package/dist/registry.d.ts +23 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +188 -0
- package/dist/registry.js.map +1 -0
- package/dist/types.d.ts +401 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +33 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PrincipalSnapshot } from "@capaxle/core";
|
|
2
|
+
import type { InvocationResult, RuntimeCapability } from "./types.js";
|
|
3
|
+
export type ProviderOutcome = {
|
|
4
|
+
readonly value: unknown;
|
|
5
|
+
} | {
|
|
6
|
+
readonly failed: true;
|
|
7
|
+
} | InvocationResult;
|
|
8
|
+
/** Private trusted-chain evaluator: every member independently restricts access. */
|
|
9
|
+
export declare function authorizePrincipals(principals: readonly PrincipalSnapshot[], permissions: RuntimeCapability["access"]["permissions"], evaluate?: (principal: PrincipalSnapshot) => Promise<ProviderOutcome>): Promise<{
|
|
10
|
+
readonly kind: "allow" | "deny" | "failed";
|
|
11
|
+
} | InvocationResult>;
|
|
12
|
+
//# sourceMappingURL=authorization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization.d.ts","sourceRoot":"","sources":["../src/authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEtE,MAAM,MAAM,eAAe,GACzB;IAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAA;CAAE,GAAG,gBAAgB,CAAC;AAC7E,oFAAoF;AACpF,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,SAAS,iBAAiB,EAAE,EACxC,WAAW,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,EACvD,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,OAAO,CAAC,eAAe,CAAC,GACpE,OAAO,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;CAAE,GAAG,gBAAgB,CAAC,CA0B5E"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Private trusted-chain evaluator: every member independently restricts access. */
|
|
2
|
+
export async function authorizePrincipals(principals, permissions, evaluate) {
|
|
3
|
+
for (const principal of principals) {
|
|
4
|
+
if (permissions.public !== true &&
|
|
5
|
+
((permissions.allOf?.some((permission) => !principal.scopes.includes(permission)) ??
|
|
6
|
+
false) ||
|
|
7
|
+
(permissions.anyOf &&
|
|
8
|
+
!permissions.anyOf.some((permission) => principal.scopes.includes(permission)))))
|
|
9
|
+
return { kind: "deny" };
|
|
10
|
+
if (evaluate) {
|
|
11
|
+
const outcome = await evaluate(principal);
|
|
12
|
+
if ("ok" in outcome)
|
|
13
|
+
return outcome;
|
|
14
|
+
if ("failed" in outcome ||
|
|
15
|
+
(outcome.value !== true && outcome.value !== false))
|
|
16
|
+
return { kind: "failed" };
|
|
17
|
+
if (outcome.value === false)
|
|
18
|
+
return { kind: "deny" };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return { kind: "allow" };
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=authorization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization.js","sourceRoot":"","sources":["../src/authorization.ts"],"names":[],"mappings":"AAKA,oFAAoF;AACpF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,UAAwC,EACxC,WAAuD,EACvD,QAAqE;IAErE,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IACE,WAAW,CAAC,MAAM,KAAK,IAAI;YAC3B,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CACvB,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CACvD;gBACC,KAAK,CAAC;gBACN,CAAC,WAAW,CAAC,KAAK;oBAChB,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CACrC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CACtC,CAAC,CAAC;YAEP,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAC1B,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,SAAS,CAAC,CAAC;YAC1C,IAAI,IAAI,IAAI,OAAO;gBAAE,OAAO,OAAO,CAAC;YACpC,IACE,QAAQ,IAAI,OAAO;gBACnB,CAAC,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK,CAAC;gBAEnD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;YAC5B,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK;gBAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QACvD,CAAC;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base64url.d.ts","sourceRoot":"","sources":["../src/base64url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,gFAAgF;AAChF,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAOlE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
/** Strict canonical unpadded base64url decoding for 256-bit security values. */
|
|
3
|
+
export function decodeCanonicalBase64Url256(value) {
|
|
4
|
+
if (typeof value !== "string" || !/^[A-Za-z0-9_-]{43}$/.test(value))
|
|
5
|
+
throw new TypeError("Invalid canonical 256-bit base64url value.");
|
|
6
|
+
const bytes = Buffer.from(value, "base64url");
|
|
7
|
+
if (bytes.length !== 32 || bytes.toString("base64url") !== value)
|
|
8
|
+
throw new TypeError("Invalid canonical 256-bit base64url value.");
|
|
9
|
+
return bytes;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=base64url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base64url.js","sourceRoot":"","sources":["../src/base64url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,gFAAgF;AAChF,MAAM,UAAU,2BAA2B,CAAC,KAAc;IACxD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC;QACjE,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAC;IACpE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAC9C,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE,IAAI,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,KAAK;QAC9D,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAC;IACpE,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import type { JsonValue } from "@capaxle/ir";
|
|
2
|
+
interface ConfirmationActionBase {
|
|
3
|
+
readonly irHash: string;
|
|
4
|
+
readonly capabilityId: string;
|
|
5
|
+
readonly version: string;
|
|
6
|
+
readonly impact: string;
|
|
7
|
+
readonly summary: string;
|
|
8
|
+
readonly kernelInvocationId?: string;
|
|
9
|
+
readonly input: JsonValue;
|
|
10
|
+
readonly idempotencyKey?: string;
|
|
11
|
+
readonly correlationId?: string;
|
|
12
|
+
readonly sourceChain?: JsonValue;
|
|
13
|
+
}
|
|
14
|
+
export interface ConfirmationAction extends ConfirmationActionBase {
|
|
15
|
+
readonly requesterFingerprint: string;
|
|
16
|
+
readonly tenantFingerprint: string;
|
|
17
|
+
readonly fingerprintGenerationId: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ConfirmationError {
|
|
20
|
+
readonly code: string;
|
|
21
|
+
readonly status: "failed_precondition" | "unavailable" | "unauthenticated" | "permission_denied" | "invalid_argument";
|
|
22
|
+
readonly message: string;
|
|
23
|
+
readonly retryable: boolean;
|
|
24
|
+
}
|
|
25
|
+
export type ConfirmationResult<T> = ({
|
|
26
|
+
readonly ok: true;
|
|
27
|
+
} & T) | {
|
|
28
|
+
readonly ok: false;
|
|
29
|
+
readonly error: ConfirmationError;
|
|
30
|
+
};
|
|
31
|
+
export interface ConfirmationChallenge {
|
|
32
|
+
readonly challenge: string;
|
|
33
|
+
readonly capability: {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly version: string;
|
|
36
|
+
};
|
|
37
|
+
readonly summary: string;
|
|
38
|
+
readonly impact: string;
|
|
39
|
+
readonly expiresAt: string;
|
|
40
|
+
}
|
|
41
|
+
declare const receiptBrand: unique symbol;
|
|
42
|
+
declare const attemptBrand: unique symbol;
|
|
43
|
+
export interface ConfirmationReceipt {
|
|
44
|
+
readonly [receiptBrand]: true;
|
|
45
|
+
readonly recordId: string;
|
|
46
|
+
readonly confirmationRef: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ConfirmationAttempt extends ConfirmationReceipt {
|
|
49
|
+
readonly [attemptBrand]: true;
|
|
50
|
+
readonly executionAttemptId: string;
|
|
51
|
+
}
|
|
52
|
+
export interface ConfirmationApprovalContext {
|
|
53
|
+
readonly providerAuthenticated: boolean;
|
|
54
|
+
readonly approvalAuthorized: boolean;
|
|
55
|
+
readonly approverRef: string;
|
|
56
|
+
readonly assurance: string;
|
|
57
|
+
}
|
|
58
|
+
/** Executable, independently authenticating host boundary. Never invocation assertions. */
|
|
59
|
+
export interface ConfirmationApprovalProvider {
|
|
60
|
+
authenticate(request: unknown, challenge: Readonly<ConfirmationChallenge>): Promise<ConfirmationApprovalContext> | ConfirmationApprovalContext;
|
|
61
|
+
}
|
|
62
|
+
export type ConfirmationEventType = "challenge_issued" | "approval_granted" | "approval_denied" | "challenge_expired" | "challenge_revoked" | "verification_rejected" | "evidence_consumed" | "generation_retired" | "generation_revoked" | "provider_failed" | "execution_audit_started" | "execution_audit_completed";
|
|
63
|
+
export interface ConfirmationEvent {
|
|
64
|
+
readonly eventId: string;
|
|
65
|
+
readonly eventType: ConfirmationEventType;
|
|
66
|
+
readonly protocolVersion: "1";
|
|
67
|
+
readonly occurredAt: number;
|
|
68
|
+
readonly stage: string;
|
|
69
|
+
readonly outcome: string;
|
|
70
|
+
readonly service: string;
|
|
71
|
+
readonly deployment: string;
|
|
72
|
+
readonly ownerType: "confirmation_record" | "execution_attempt" | "key_generation" | "kernel_invocation";
|
|
73
|
+
readonly ownerId: string;
|
|
74
|
+
readonly transitionOrdinal: number;
|
|
75
|
+
readonly context: Readonly<Record<string, JsonValue>>;
|
|
76
|
+
}
|
|
77
|
+
export interface ConfirmationGeneration {
|
|
78
|
+
id: string;
|
|
79
|
+
key: Uint8Array;
|
|
80
|
+
state: "ACTIVE" | "RETIRED" | "REVOKED";
|
|
81
|
+
retired: boolean;
|
|
82
|
+
revoked: boolean;
|
|
83
|
+
quarantined: boolean;
|
|
84
|
+
pendingTransition?: "RETIRED" | "REVOKED";
|
|
85
|
+
ownerId: string;
|
|
86
|
+
}
|
|
87
|
+
export interface ConfirmationStoredAction {
|
|
88
|
+
irHash: string;
|
|
89
|
+
capabilityId: string;
|
|
90
|
+
version: string;
|
|
91
|
+
impact: string;
|
|
92
|
+
summary: string;
|
|
93
|
+
requesterFingerprint: string;
|
|
94
|
+
tenantFingerprint: string;
|
|
95
|
+
correlationId?: string;
|
|
96
|
+
sourceChain?: JsonValue;
|
|
97
|
+
}
|
|
98
|
+
export interface ConfirmationRecord {
|
|
99
|
+
id: string;
|
|
100
|
+
confirmationRef: string;
|
|
101
|
+
state: "PENDING" | "APPROVED" | "CONSUMED" | "DENIED" | "EXPIRED" | "REVOKED";
|
|
102
|
+
challengeLookup: string;
|
|
103
|
+
evidenceLookup?: string;
|
|
104
|
+
challengeHandleGeneration: string;
|
|
105
|
+
bindingFingerprintGeneration: string;
|
|
106
|
+
evidenceHandleGeneration?: string;
|
|
107
|
+
auditReferenceGeneration: string;
|
|
108
|
+
bindingDigest: string;
|
|
109
|
+
inputFingerprint: string;
|
|
110
|
+
idempotencyFingerprint?: string;
|
|
111
|
+
summaryDigest: string;
|
|
112
|
+
nonce: string;
|
|
113
|
+
issuedAt: number;
|
|
114
|
+
expiresAt: number;
|
|
115
|
+
purgeAt: number;
|
|
116
|
+
action: ConfirmationStoredAction;
|
|
117
|
+
approver?: ConfirmationApprovalContext;
|
|
118
|
+
expiryEventId?: string;
|
|
119
|
+
executionAttemptId?: string;
|
|
120
|
+
}
|
|
121
|
+
export interface ConfirmationExecution {
|
|
122
|
+
id: string;
|
|
123
|
+
recordId: string;
|
|
124
|
+
state: "HANDLER_ENTRY_AUTHORIZED" | "COMPLETION_PENDING" | "COMPLETED";
|
|
125
|
+
completion?: "succeeded" | "failed" | "ambiguous_after_handler_entry";
|
|
126
|
+
}
|
|
127
|
+
export interface ConfirmationState {
|
|
128
|
+
service: string;
|
|
129
|
+
deployment: string;
|
|
130
|
+
timeFloor: number;
|
|
131
|
+
unhealthy: boolean;
|
|
132
|
+
unhealthyReason?: string;
|
|
133
|
+
activeGeneration: string;
|
|
134
|
+
generations: Record<string, ConfirmationGeneration>;
|
|
135
|
+
records: Record<string, ConfirmationRecord>;
|
|
136
|
+
challengeIndex: Record<string, string>;
|
|
137
|
+
evidenceIndex: Record<string, string>;
|
|
138
|
+
executions: Record<string, ConfirmationExecution>;
|
|
139
|
+
randomReservations: Record<string, true>;
|
|
140
|
+
pendingEvents: Record<string, ConfirmationEvent>;
|
|
141
|
+
durableEvents: Record<string, true>;
|
|
142
|
+
/** Retained authoritative journal completion proofs, independent of challenge purge. */
|
|
143
|
+
completionProofs: Record<string, {
|
|
144
|
+
recordId: string;
|
|
145
|
+
confirmationRef: string;
|
|
146
|
+
outcome: "succeeded" | "failed" | "ambiguous_after_handler_entry";
|
|
147
|
+
}>;
|
|
148
|
+
}
|
|
149
|
+
/** Host MUST persist each atomic callback linearizably and durably across instances.
|
|
150
|
+
* State, pendingEvents, timeFloor, reservations, quarantine and completion barriers
|
|
151
|
+
* survive journal/export failure and process loss. No process-local production default.
|
|
152
|
+
* commitJournal durably deduplicates by eventId; external export is separate.
|
|
153
|
+
* incident uses storage-owned unique identity/time, never failed engine providers.
|
|
154
|
+
*/
|
|
155
|
+
export interface ConfirmationIncident {
|
|
156
|
+
readonly service: string;
|
|
157
|
+
readonly deployment: string;
|
|
158
|
+
readonly protocolVersion: "1";
|
|
159
|
+
readonly eventType: "provider_failed";
|
|
160
|
+
readonly stage: "confirmation";
|
|
161
|
+
readonly outcome: "unavailable";
|
|
162
|
+
readonly providerKind: "confirmation" | "identity_fingerprint";
|
|
163
|
+
readonly operation: string;
|
|
164
|
+
readonly reason: string;
|
|
165
|
+
}
|
|
166
|
+
export interface IdentityFingerprintFailureIncident {
|
|
167
|
+
readonly providerKind: "identity_fingerprint";
|
|
168
|
+
readonly operation: "fingerprint";
|
|
169
|
+
readonly reason: "provider_missing" | "provider_failed" | "provider_malformed";
|
|
170
|
+
}
|
|
171
|
+
export interface ConfirmationStore {
|
|
172
|
+
/** Immediately before durable commit linearization, call trusted
|
|
173
|
+
* refreshCancellation when present, then check the genuine private signal and
|
|
174
|
+
* deadline. Reject queued canceled work without mutation/append. A commit
|
|
175
|
+
* accepted while live may acknowledge later; never undo an accepted barrier.
|
|
176
|
+
* This same checkpoint is mandatory for commitJournal. */
|
|
177
|
+
atomic<T>(operation: (state: ConfirmationState) => T, controls?: ConfirmationOperationControls): Promise<T>;
|
|
178
|
+
commitJournal(events: readonly ConfirmationEvent[], controls?: ConfirmationOperationControls): Promise<void>;
|
|
179
|
+
/** Persists full provider_failed base event using storage-owned unique marker,
|
|
180
|
+
* monotonic time and owner-derived cape1 ID independent of engine providers. */
|
|
181
|
+
incident(incident: ConfirmationIncident, controls?: ConfirmationOperationControls): Promise<void>;
|
|
182
|
+
}
|
|
183
|
+
export interface ConfirmationProviderOptions {
|
|
184
|
+
readonly store: ConfirmationStore;
|
|
185
|
+
readonly bearerDescriptors?: readonly unknown[];
|
|
186
|
+
readonly service: string;
|
|
187
|
+
readonly deployment: string;
|
|
188
|
+
readonly ttlMs: number;
|
|
189
|
+
readonly maxClockSkewMs: number;
|
|
190
|
+
readonly approvalProvider: ConfirmationApprovalProvider;
|
|
191
|
+
readonly clock?: () => number;
|
|
192
|
+
readonly randomBytes?: (length: number) => Uint8Array;
|
|
193
|
+
readonly summaryRenderer?: {
|
|
194
|
+
readonly pointers: readonly string[];
|
|
195
|
+
readonly render: (leaves: Readonly<Record<string, JsonValue>>) => unknown;
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
export interface ConfirmationOperationControls {
|
|
199
|
+
/** Trusted kernel closure snapshots native caller/ancestor cancellation into
|
|
200
|
+
* the private signal. Never accept this callback from an external carrier.
|
|
201
|
+
* Engines and durable hosts call it before checking signal/deadline at every
|
|
202
|
+
* pre-handler checkpoint and actual commit linearization. Throwing fails closed.
|
|
203
|
+
* Post-entry completion and recovery do not inherit invocation controls. */
|
|
204
|
+
readonly refreshCancellation?: () => void;
|
|
205
|
+
readonly signal?: AbortSignal;
|
|
206
|
+
readonly deadlineMs?: number;
|
|
207
|
+
readonly kernelInvocationId?: string;
|
|
208
|
+
readonly correlationId?: string;
|
|
209
|
+
}
|
|
210
|
+
export interface ConfirmationProvider {
|
|
211
|
+
/** Optional independent ADR-0004 incident boundary. Implementations must not
|
|
212
|
+
* derive incident identity or time from the failed fingerprint provider. */
|
|
213
|
+
reportProviderFailure?(incident: Readonly<IdentityFingerprintFailureIncident>, controls?: ConfirmationOperationControls): void | Promise<void>;
|
|
214
|
+
/** Read-only durable proof for the exact original attempt, reference and outcome.
|
|
215
|
+
* Does not grant invocation trust, consume approval, or create execution. */
|
|
216
|
+
queryExecutionCompletion(linkage: {
|
|
217
|
+
readonly recordId: string;
|
|
218
|
+
readonly confirmationRef: string;
|
|
219
|
+
readonly executionAttemptId: string;
|
|
220
|
+
}, outcome: "succeeded" | "failed"): Promise<ConfirmationResult<{
|
|
221
|
+
completed: boolean;
|
|
222
|
+
}>>;
|
|
223
|
+
allocateKernelInvocationId(controls?: ConfirmationOperationControls): Promise<ConfirmationResult<{
|
|
224
|
+
kernelInvocationId: string;
|
|
225
|
+
}>>;
|
|
226
|
+
issue(action: ConfirmationAction, controls?: ConfirmationOperationControls): Promise<ConfirmationResult<{
|
|
227
|
+
challenge: ConfirmationChallenge;
|
|
228
|
+
}>>;
|
|
229
|
+
decideConfirmation(command: {
|
|
230
|
+
readonly challenge: unknown;
|
|
231
|
+
readonly decision: unknown;
|
|
232
|
+
}, approvalRequest: unknown, controls?: ConfirmationOperationControls): Promise<ConfirmationResult<{
|
|
233
|
+
outcome: "approved";
|
|
234
|
+
confirmationToken: string;
|
|
235
|
+
expiresAt: string;
|
|
236
|
+
} | {
|
|
237
|
+
outcome: "denied";
|
|
238
|
+
}>>;
|
|
239
|
+
consume(action: ConfirmationAction, evidence: unknown, controls?: ConfirmationOperationControls): Promise<ConfirmationResult<{
|
|
240
|
+
receipt: ConfirmationReceipt;
|
|
241
|
+
}>>;
|
|
242
|
+
beginExecution(receipt: ConfirmationReceipt, controls?: ConfirmationOperationControls): Promise<ConfirmationResult<{
|
|
243
|
+
attempt: ConfirmationAttempt;
|
|
244
|
+
}>>;
|
|
245
|
+
completeExecution(attempt: ConfirmationAttempt, outcome: "succeeded" | "failed"): Promise<ConfirmationResult<Record<never, never>>>;
|
|
246
|
+
transitionGeneration(id: string, transition: "RETIRED" | "REVOKED"): Promise<ConfirmationResult<Record<never, never>>>;
|
|
247
|
+
revoke(challenge: unknown): Promise<ConfirmationResult<Record<never, never>>>;
|
|
248
|
+
/** Recovery caller must fence listed lost attempts against their original process. */
|
|
249
|
+
reconcile(options?: {
|
|
250
|
+
readonly lostExecutionAttemptIds?: readonly string[];
|
|
251
|
+
}): Promise<ConfirmationResult<Record<never, never>>>;
|
|
252
|
+
health(): Promise<boolean>;
|
|
253
|
+
}
|
|
254
|
+
export {};
|
|
255
|
+
//# sourceMappingURL=confirmation-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmation-types.d.ts","sourceRoot":"","sources":["../src/confirmation-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,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
|
1
|
+
import type { ConfirmationGeneration, ConfirmationProvider, ConfirmationProviderOptions, ConfirmationState } from "./confirmation-types.js";
|
|
2
|
+
/** Initializes data for a host's durable store; this is not a persistence implementation.
|
|
3
|
+
* Keys and generation owner IDs must be securely provisioned by the host. */
|
|
4
|
+
export declare function createConfirmationState(service: string, deployment: string, generations: readonly ConfirmationGeneration[], activeGeneration: string): ConfirmationState;
|
|
5
|
+
export declare function createConfirmationProvider(options: ConfirmationProviderOptions): ConfirmationProvider;
|
|
6
|
+
//# sourceMappingURL=confirmation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmation.d.ts","sourceRoot":"","sources":["../src/confirmation.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAOV,sBAAsB,EAEtB,oBAAoB,EACpB,2BAA2B,EAK3B,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AA8LjC;6EAC6E;AAC7E,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,SAAS,sBAAsB,EAAE,EAC9C,gBAAgB,EAAE,MAAM,GACvB,iBAAiB,CAqCnB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,2BAA2B,GACnC,oBAAoB,CAooCtB"}
|