@agenticprimitives/admission 0.0.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 +21 -0
- package/README.md +63 -0
- package/dist/digests.d.ts +46 -0
- package/dist/digests.d.ts.map +1 -0
- package/dist/digests.js +164 -0
- package/dist/digests.js.map +1 -0
- package/dist/engine.d.ts +51 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +224 -0
- package/dist/engine.js.map +1 -0
- package/dist/execution.d.ts +53 -0
- package/dist/execution.d.ts.map +1 -0
- package/dist/execution.js +166 -0
- package/dist/execution.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/invariants.d.ts +80 -0
- package/dist/invariants.d.ts.map +1 -0
- package/dist/invariants.js +288 -0
- package/dist/invariants.js.map +1 -0
- package/dist/ports.d.ts +149 -0
- package/dist/ports.d.ts.map +1 -0
- package/dist/ports.js +9 -0
- package/dist/ports.js.map +1 -0
- package/dist/request-proof.d.ts +61 -0
- package/dist/request-proof.d.ts.map +1 -0
- package/dist/request-proof.js +175 -0
- package/dist/request-proof.js.map +1 -0
- package/dist/transport-policy.d.ts +47 -0
- package/dist/transport-policy.d.ts.map +1 -0
- package/dist/transport-policy.js +95 -0
- package/dist/transport-policy.js.map +1 -0
- package/dist/types.d.ts +430 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +28 -0
- package/dist/types.js.map +1 -0
- package/package.json +54 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
export declare const PACKAGE_NAME: "@agenticprimitives/admission";
|
|
2
|
+
export declare const SPEC_REF: "specs/339-agentic-primitives-edge-https-admission.md";
|
|
3
|
+
/** A2A HTTP binding (spec 339 §8.2). */
|
|
4
|
+
export type A2AProtocolBinding = 'HTTP+JSON' | 'JSONRPC';
|
|
5
|
+
/**
|
|
6
|
+
* How much the TRANSPORT proved. Strictly additive evidence.
|
|
7
|
+
*
|
|
8
|
+
* There is no `NONE`: HTTPS is required, so the floor is `HTTPS`. And there is no level that means
|
|
9
|
+
* "authorized" — climbing this ladder never removes an admission stage (ADR-0057).
|
|
10
|
+
*/
|
|
11
|
+
export type TransportAssurance = 'HTTPS' | 'MTLS' | 'SPIFFE_MTLS';
|
|
12
|
+
/** A published A2A endpoint. `url` is typed to reject a plaintext origin at compile time. */
|
|
13
|
+
export interface A2AHttpsEndpoint {
|
|
14
|
+
endpointId: string;
|
|
15
|
+
url: `https://${string}`;
|
|
16
|
+
protocolBinding: A2AProtocolBinding;
|
|
17
|
+
protocolVersion: string;
|
|
18
|
+
securityProfileId: string;
|
|
19
|
+
admissionProfileId: string;
|
|
20
|
+
}
|
|
21
|
+
export type ApplicationAuthenticationMethod = 'OAUTH' | 'OIDC_SESSION' | 'AGENTIC_REQUEST_PROOF' | 'BOUND_WORKLOAD';
|
|
22
|
+
/**
|
|
23
|
+
* A validated access token, reduced to what admission may read.
|
|
24
|
+
*
|
|
25
|
+
* `scopes` is carried but is NOT authority: a scope says what an OAuth client asked for, never what a
|
|
26
|
+
* principal delegated (ADR-0041). Only the token DIGEST travels — an admission record that quoted the
|
|
27
|
+
* bearer would turn the audit log into a credential store.
|
|
28
|
+
*/
|
|
29
|
+
export interface OAuthEvidence {
|
|
30
|
+
issuer: string;
|
|
31
|
+
subject: string;
|
|
32
|
+
audience: string[];
|
|
33
|
+
clientId?: string;
|
|
34
|
+
authorizedParty?: string;
|
|
35
|
+
scopes: string[];
|
|
36
|
+
tokenDigest: string;
|
|
37
|
+
issuedAt?: string;
|
|
38
|
+
expiresAt: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* What a signed Agentic request proof commits to (spec 339 §13).
|
|
42
|
+
*
|
|
43
|
+
* The binding set is the point: method + authority + path + BODY HASH means a captured proof cannot be
|
|
44
|
+
* moved to another host, path, or payload; `replayId` means it cannot be used twice; `accessTokenSha256`
|
|
45
|
+
* ties it to the very token it travelled with, so a stolen proof cannot be paired with a different one.
|
|
46
|
+
*/
|
|
47
|
+
export interface AgenticRequestProofClaims {
|
|
48
|
+
schemaVersion: '1';
|
|
49
|
+
principalAgentId: string;
|
|
50
|
+
actingAgentId: string;
|
|
51
|
+
runtimeId: string;
|
|
52
|
+
sessionKeyId: string;
|
|
53
|
+
delegationRefs: string[];
|
|
54
|
+
audience: string;
|
|
55
|
+
issuedAt: number;
|
|
56
|
+
expiresAt: number;
|
|
57
|
+
replayId: string;
|
|
58
|
+
http: {
|
|
59
|
+
method: string;
|
|
60
|
+
authority: string;
|
|
61
|
+
pathAndQuery: string;
|
|
62
|
+
bodySha256: string;
|
|
63
|
+
};
|
|
64
|
+
a2a: {
|
|
65
|
+
protocolVersion: string;
|
|
66
|
+
protocolBinding: A2AProtocolBinding;
|
|
67
|
+
operation: string;
|
|
68
|
+
taskId?: string;
|
|
69
|
+
contextId?: string;
|
|
70
|
+
requestedCapabilityId?: string;
|
|
71
|
+
a2aSkillId?: string;
|
|
72
|
+
};
|
|
73
|
+
accessTokenSha256?: string;
|
|
74
|
+
/** RFC 8705 certificate binding. Present only on the optional mTLS profile. */
|
|
75
|
+
transportConfirmation?: {
|
|
76
|
+
type: 'x5t#S256';
|
|
77
|
+
certificateThumbprint: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export interface RequestProofEvidence {
|
|
81
|
+
keyId: string;
|
|
82
|
+
proofDigest: string;
|
|
83
|
+
replayId: string;
|
|
84
|
+
issuedAt: string;
|
|
85
|
+
expiresAt: string;
|
|
86
|
+
claims: AgenticRequestProofClaims;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* How a RUNTIME is identified operationally. Provider-neutral on purpose: the core must never learn
|
|
90
|
+
* what SPIFFE is (spec 339 §23.4, and the `check:optional-package-boundaries` gate).
|
|
91
|
+
*/
|
|
92
|
+
export type WorkloadIdentifier = {
|
|
93
|
+
type: 'SPIFFEIdentifier';
|
|
94
|
+
value: `spiffe://${string}`;
|
|
95
|
+
} | {
|
|
96
|
+
type: 'X509SpkiSha256';
|
|
97
|
+
value: string;
|
|
98
|
+
} | {
|
|
99
|
+
type: 'CloudServiceIdentity';
|
|
100
|
+
value: string;
|
|
101
|
+
provider: string;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* The record that connects an operational workload to a canonical agent.
|
|
105
|
+
*
|
|
106
|
+
* THIS IS THE WHOLE REASON SPIFFE IS NOT IDENTITY. A SPIFFE ID names a process. Which agent that
|
|
107
|
+
* process may act as is a claim someone has to have MADE and SIGNED — that claim is this record.
|
|
108
|
+
* Without it, a trust-domain path would be silently interpreted as ownership, which is inference, not
|
|
109
|
+
* authority (ADR-0057).
|
|
110
|
+
*/
|
|
111
|
+
export interface WorkloadIdentityBinding {
|
|
112
|
+
schemaVersion: '1';
|
|
113
|
+
bindingId: string;
|
|
114
|
+
bindsAgentId: string;
|
|
115
|
+
bindsRuntimeId: string;
|
|
116
|
+
bindsDeploymentId?: string;
|
|
117
|
+
identifier: WorkloadIdentifier;
|
|
118
|
+
environment: string;
|
|
119
|
+
issuerAgentId: string;
|
|
120
|
+
/** What authorized the issuer to bind this workload to this agent. */
|
|
121
|
+
issuerAuthorityRef: string;
|
|
122
|
+
status: 'ACTIVE' | 'SUSPENDED' | 'REVOKED' | 'EXPIRED';
|
|
123
|
+
validFrom: string;
|
|
124
|
+
validUntil?: string;
|
|
125
|
+
revision: number;
|
|
126
|
+
proofRef: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Transport evidence, when there is any beyond HTTPS.
|
|
130
|
+
*
|
|
131
|
+
* Every `validation` flag is OPTIONAL and three-valued in practice (true / false / absent). Absent
|
|
132
|
+
* means "not checked", and a consumer MUST treat that as not-proven rather than defaulting it true —
|
|
133
|
+
* the difference between "we verified the peer" and "we never looked" is the entire value of the field.
|
|
134
|
+
*/
|
|
135
|
+
export interface OptionalTransportEvidence {
|
|
136
|
+
transportAssurance: TransportAssurance;
|
|
137
|
+
mtls: boolean;
|
|
138
|
+
clientCertificateSha256?: string;
|
|
139
|
+
clientPublicKeySpkiSha256?: string;
|
|
140
|
+
certificateNotBefore?: string;
|
|
141
|
+
certificateNotAfter?: string;
|
|
142
|
+
workloadIdentifier?: WorkloadIdentifier;
|
|
143
|
+
workloadBinding?: WorkloadIdentityBinding;
|
|
144
|
+
validation: {
|
|
145
|
+
certificateValid?: boolean;
|
|
146
|
+
expectedPeerMatched?: boolean;
|
|
147
|
+
tokenCertificateBindingMatched?: boolean;
|
|
148
|
+
workloadBindingValid?: boolean;
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* What the edge asserts to a private origin (spec 339 §14).
|
|
153
|
+
*
|
|
154
|
+
* `resolvedHint` is named a HINT deliberately. The origin re-resolves and re-authorizes; if it trusted
|
|
155
|
+
* these fields, compromising the edge would be equivalent to compromising every origin behind it,
|
|
156
|
+
* which is exactly the collapse ADR-0043 exists to prevent.
|
|
157
|
+
*/
|
|
158
|
+
export interface AgenticEdgeAssertionClaims {
|
|
159
|
+
schemaVersion: '1';
|
|
160
|
+
issuerBoundaryId: string;
|
|
161
|
+
audienceServiceId: string;
|
|
162
|
+
issuedAt: number;
|
|
163
|
+
expiresAt: number;
|
|
164
|
+
replayId: string;
|
|
165
|
+
request: {
|
|
166
|
+
method: string;
|
|
167
|
+
authority: string;
|
|
168
|
+
pathAndQuery: string;
|
|
169
|
+
bodySha256: string;
|
|
170
|
+
contentType?: string;
|
|
171
|
+
};
|
|
172
|
+
applicationAuthentication: {
|
|
173
|
+
method: ApplicationAuthenticationMethod;
|
|
174
|
+
issuer?: string;
|
|
175
|
+
subject?: string;
|
|
176
|
+
clientId?: string;
|
|
177
|
+
tokenDigest?: string;
|
|
178
|
+
requestProofDigest?: string;
|
|
179
|
+
};
|
|
180
|
+
transport: {
|
|
181
|
+
/** Literal `true`: there is no admitted plaintext path. */
|
|
182
|
+
https: true;
|
|
183
|
+
mtls: boolean;
|
|
184
|
+
clientCertificateSha256?: string;
|
|
185
|
+
workloadBindingId?: string;
|
|
186
|
+
transportAssurance: TransportAssurance;
|
|
187
|
+
};
|
|
188
|
+
resolvedHint: {
|
|
189
|
+
principalAgentId?: string;
|
|
190
|
+
actingAgentId?: string;
|
|
191
|
+
runtimeId?: string;
|
|
192
|
+
};
|
|
193
|
+
edgePolicyVersion: string;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Who is actually acting, after resolution.
|
|
197
|
+
*
|
|
198
|
+
* The distinction the rest of the system depends on:
|
|
199
|
+
* principal — on whose behalf (the authority flows from here)
|
|
200
|
+
* acting — which agent is doing it
|
|
201
|
+
* runtime — which deployment is executing it
|
|
202
|
+
*
|
|
203
|
+
* A design that collapses these cannot express "this runtime was compromised, revoke it, but the
|
|
204
|
+
* agent and its principal are untouched" — which is the normal incident, not the exotic one.
|
|
205
|
+
*/
|
|
206
|
+
export interface CanonicalActorContext {
|
|
207
|
+
principalAgentId: string;
|
|
208
|
+
actingAgentId: string;
|
|
209
|
+
runtimeId: string;
|
|
210
|
+
ownerAgentId?: string;
|
|
211
|
+
operatorAgentId?: string;
|
|
212
|
+
organizationAgentId?: string;
|
|
213
|
+
applicationIdentityBindingId?: string;
|
|
214
|
+
workloadIdentityBindingId?: string;
|
|
215
|
+
signingKeyBindingId?: string;
|
|
216
|
+
authenticationMethods: ApplicationAuthenticationMethod[];
|
|
217
|
+
resolvedAt: string;
|
|
218
|
+
cacheUntil: string;
|
|
219
|
+
evidenceRefs: string[];
|
|
220
|
+
}
|
|
221
|
+
/** The circumstances a policy may consider. Facts, never conclusions. */
|
|
222
|
+
export interface AdmissionSituation {
|
|
223
|
+
timestamp: string;
|
|
224
|
+
environment: string;
|
|
225
|
+
tenant?: string;
|
|
226
|
+
purpose?: string;
|
|
227
|
+
dataClassification?: string;
|
|
228
|
+
sourceRegion?: string;
|
|
229
|
+
targetRegion?: string;
|
|
230
|
+
jurisdiction?: string;
|
|
231
|
+
transactionValue?: string;
|
|
232
|
+
currency?: string;
|
|
233
|
+
riskScore?: number;
|
|
234
|
+
incidentMode?: string;
|
|
235
|
+
humanPresent?: boolean;
|
|
236
|
+
humanApprovalRef?: string;
|
|
237
|
+
budgetRef?: string;
|
|
238
|
+
rateBucket?: string;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Everything an admission decision may read.
|
|
242
|
+
*
|
|
243
|
+
* Authority arrives as REFERENCES, never as inline payload. A request that carried a delegation
|
|
244
|
+
* document would invite deciding from the copy in hand instead of the live, revocable original — the
|
|
245
|
+
* failure ADR-0013 calls out and ADR-0041 forbids on this exact hop.
|
|
246
|
+
*/
|
|
247
|
+
export interface AdmissionRequest {
|
|
248
|
+
schemaVersion: '1';
|
|
249
|
+
requestId: string;
|
|
250
|
+
receivedAt: string;
|
|
251
|
+
boundaryId: string;
|
|
252
|
+
targetAgentId: string;
|
|
253
|
+
targetRuntimeId: string;
|
|
254
|
+
actor: CanonicalActorContext;
|
|
255
|
+
transport: {
|
|
256
|
+
/** Literal, not a union: a non-HTTPS request is not admitted, it is unrepresentable. */
|
|
257
|
+
protocol: 'HTTPS';
|
|
258
|
+
mtls: boolean;
|
|
259
|
+
assurance: TransportAssurance;
|
|
260
|
+
clientCertificateSha256?: string;
|
|
261
|
+
};
|
|
262
|
+
authentication: {
|
|
263
|
+
oauth?: OAuthEvidence;
|
|
264
|
+
requestProof?: RequestProofEvidence;
|
|
265
|
+
optionalTransportEvidence?: OptionalTransportEvidence;
|
|
266
|
+
};
|
|
267
|
+
a2a: {
|
|
268
|
+
protocolVersion: string;
|
|
269
|
+
protocolBinding: A2AProtocolBinding;
|
|
270
|
+
operation: string;
|
|
271
|
+
taskId?: string;
|
|
272
|
+
contextId?: string;
|
|
273
|
+
requestedCapabilityId?: string;
|
|
274
|
+
a2aSkillId?: string;
|
|
275
|
+
};
|
|
276
|
+
relationshipRefs: string[];
|
|
277
|
+
delegationRefs: string[];
|
|
278
|
+
entitlementRefs: string[];
|
|
279
|
+
situation: AdmissionSituation;
|
|
280
|
+
}
|
|
281
|
+
export type AdmissionEffect = 'ADMIT' | 'ADMIT_CONSTRAINED' | 'CHALLENGE' | 'DENY'
|
|
282
|
+
/** Answer nothing. For traffic where even a refusal is information. */
|
|
283
|
+
| 'DROP';
|
|
284
|
+
export interface AdmissionConstraint {
|
|
285
|
+
key: string;
|
|
286
|
+
operator: 'EQUALS' | 'IN' | 'MAX' | 'MIN' | 'BEFORE' | 'AFTER' | 'REQUIRED';
|
|
287
|
+
value: unknown;
|
|
288
|
+
}
|
|
289
|
+
/** Something that MUST happen for the admission to remain valid — not advice. */
|
|
290
|
+
export interface AdmissionObligation {
|
|
291
|
+
obligationId: string;
|
|
292
|
+
kind: 'AUDIT' | 'HUMAN_APPROVAL' | 'VALIDATOR_ATTESTATION' | 'DATA_MINIMIZATION' | 'REDACTION' | 'RATE_ACCOUNTING' | 'BUDGET_ACCOUNTING' | 'EXACT_INVOCATION_PROOF' | 'OTHER';
|
|
293
|
+
parameters?: Readonly<Record<string, unknown>>;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* One evaluator's opinion.
|
|
297
|
+
*
|
|
298
|
+
* `INDETERMINATE` exists so an evaluator that could not decide says so instead of returning ALLOW.
|
|
299
|
+
* The engine treats it as not-allowed; an evaluator is never permitted to abstain INTO admission.
|
|
300
|
+
*/
|
|
301
|
+
export interface AdmissionPolicyContribution {
|
|
302
|
+
contributorId: string;
|
|
303
|
+
policyVersion: string;
|
|
304
|
+
effect: 'ALLOW' | 'DENY' | 'CHALLENGE' | 'INDETERMINATE';
|
|
305
|
+
reasonCodes: string[];
|
|
306
|
+
constraints?: AdmissionConstraint[];
|
|
307
|
+
obligations?: AdmissionObligation[];
|
|
308
|
+
evidenceRefs?: string[];
|
|
309
|
+
evaluatedAt: string;
|
|
310
|
+
cacheUntil?: string;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Permission to INTERACT — and nothing else.
|
|
314
|
+
*
|
|
315
|
+
* Read `permittedCapabilityIds` carefully: it is the ceiling on what may later be requested, not a set
|
|
316
|
+
* of pre-authorized calls. Every actual invocation is authorized again at the gateway against exact
|
|
317
|
+
* arguments and live delegation (`ExactMcpInvocationRequest`). A grant is a door, not a key.
|
|
318
|
+
*
|
|
319
|
+
* The four digests make the decision auditable without storing what was decided FROM: an auditor can
|
|
320
|
+
* confirm which evidence, identity resolution, authority set and policy snapshot produced this grant,
|
|
321
|
+
* while none of that material sits in the grant itself.
|
|
322
|
+
*/
|
|
323
|
+
export interface AdmissionGrant {
|
|
324
|
+
schemaVersion: '1';
|
|
325
|
+
grantId: string;
|
|
326
|
+
principalAgentId: string;
|
|
327
|
+
actingAgentId: string;
|
|
328
|
+
runtimeId: string;
|
|
329
|
+
targetAgentId: string;
|
|
330
|
+
targetRuntimeId: string;
|
|
331
|
+
boundaryId: string;
|
|
332
|
+
audience: string;
|
|
333
|
+
protocol: 'A2A';
|
|
334
|
+
protocolVersion: string;
|
|
335
|
+
protocolBinding: A2AProtocolBinding;
|
|
336
|
+
operations: string[];
|
|
337
|
+
permittedCapabilityIds: string[];
|
|
338
|
+
taskId?: string;
|
|
339
|
+
contextId?: string;
|
|
340
|
+
constraints: AdmissionConstraint[];
|
|
341
|
+
obligations: AdmissionObligation[];
|
|
342
|
+
transportAssurance: TransportAssurance;
|
|
343
|
+
authenticationEvidenceDigest: string;
|
|
344
|
+
identityResolutionDigest: string;
|
|
345
|
+
authorityEvidenceDigest: string;
|
|
346
|
+
policySnapshotDigest: string;
|
|
347
|
+
issuedAt: string;
|
|
348
|
+
expiresAt: string;
|
|
349
|
+
replayId: string;
|
|
350
|
+
issuerBoundaryId: string;
|
|
351
|
+
signature: string;
|
|
352
|
+
}
|
|
353
|
+
/** "Not yet" with a stated remedy — distinct from DENY, which is "no". */
|
|
354
|
+
export interface AdmissionChallenge {
|
|
355
|
+
challengeId: string;
|
|
356
|
+
audience: string;
|
|
357
|
+
requiredEvidenceKinds: string[];
|
|
358
|
+
requiredAuthorityKinds: string[];
|
|
359
|
+
expiresAt: string;
|
|
360
|
+
}
|
|
361
|
+
export interface AdmissionDecision {
|
|
362
|
+
decisionId: string;
|
|
363
|
+
effect: AdmissionEffect;
|
|
364
|
+
reasonCodes: string[];
|
|
365
|
+
grant?: AdmissionGrant;
|
|
366
|
+
challenge?: AdmissionChallenge;
|
|
367
|
+
contributions: AdmissionPolicyContribution[];
|
|
368
|
+
/** REQUIRED. A decision that was not recorded did not happen (spec 339 §28). */
|
|
369
|
+
receiptRef: string;
|
|
370
|
+
evaluatedAt: string;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* One exact call at the private MCP gateway (spec 339 §21.4).
|
|
374
|
+
*
|
|
375
|
+
* `canonicalArgumentsDigest`, not the arguments: the gateway authorizes a specific call, and a digest
|
|
376
|
+
* proves "these exact arguments" without the authority record accumulating payload data.
|
|
377
|
+
*
|
|
378
|
+
* The gateway MUST NOT authorize from the grant alone. `admissionGrantId` says the caller got through
|
|
379
|
+
* the door; delegation and entitlement are re-checked here, live, because they can be revoked between
|
|
380
|
+
* admission and invocation — and that gap is precisely when revocation matters most.
|
|
381
|
+
*/
|
|
382
|
+
export interface ExactMcpInvocationRequest {
|
|
383
|
+
invocationId: string;
|
|
384
|
+
admissionGrantId: string;
|
|
385
|
+
principalAgentId: string;
|
|
386
|
+
actingAgentId: string;
|
|
387
|
+
runtimeId: string;
|
|
388
|
+
sessionKeyId: string;
|
|
389
|
+
operationKind: 'TOOL_CALL' | 'RESOURCE_READ' | 'RESOURCE_WRITE' | 'RESOURCE_SUBSCRIBE' | 'PROMPT_GET' | 'TASK_OPERATION';
|
|
390
|
+
operationName: string;
|
|
391
|
+
canonicalArgumentsDigest: string;
|
|
392
|
+
resourceId?: string;
|
|
393
|
+
purpose?: string;
|
|
394
|
+
dataClassification?: string;
|
|
395
|
+
delegationRefs: string[];
|
|
396
|
+
entitlementRefs: string[];
|
|
397
|
+
idempotencyKey?: string;
|
|
398
|
+
requestedAt: string;
|
|
399
|
+
}
|
|
400
|
+
export interface ExecutionDecision {
|
|
401
|
+
decisionId: string;
|
|
402
|
+
effect: 'ALLOW' | 'DENY' | 'CHALLENGE';
|
|
403
|
+
reasonCodes: string[];
|
|
404
|
+
obligations: AdmissionObligation[];
|
|
405
|
+
receiptRef: string;
|
|
406
|
+
evaluatedAt: string;
|
|
407
|
+
}
|
|
408
|
+
/** Hash-chained so a deleted or reordered decision is detectable, not merely unlikely. */
|
|
409
|
+
export interface AdmissionReceipt {
|
|
410
|
+
receiptId: string;
|
|
411
|
+
requestId: string;
|
|
412
|
+
decisionId: string;
|
|
413
|
+
boundaryId: string;
|
|
414
|
+
principalAgentId: string;
|
|
415
|
+
actingAgentId: string;
|
|
416
|
+
targetAgentId: string;
|
|
417
|
+
authenticationEvidenceDigest: string;
|
|
418
|
+
optionalTransportEvidenceDigest?: string;
|
|
419
|
+
identityResolutionDigest: string;
|
|
420
|
+
authorityEvidenceDigest: string;
|
|
421
|
+
policySnapshotDigest: string;
|
|
422
|
+
grantDigest?: string;
|
|
423
|
+
effect: AdmissionEffect;
|
|
424
|
+
reasonCodes: string[];
|
|
425
|
+
evaluatedAt: string;
|
|
426
|
+
recordHash: string;
|
|
427
|
+
previousRecordHash?: string;
|
|
428
|
+
signature?: string;
|
|
429
|
+
}
|
|
430
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,YAAY,EAAG,8BAAuC,CAAC;AACpE,eAAO,MAAM,QAAQ,EAAG,sDAA+D,CAAC;AAIxF,wCAAwC;AACxC,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,SAAS,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GA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,EAAE,MAAM,CAAC;CACrB;AAED,0FAA0F;AAC1F,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IAEnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IAEtB,4BAA4B,EAAE,MAAM,CAAC;IACrC,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,wBAAwB,EAAE,MAAM,CAAC;IACjC,uBAAuB,EAAE,MAAM,CAAC;IAChC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,MAAM,EAAE,eAAe,CAAC;IACxB,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Agentic Primitives Edge — admission contracts (spec 339, ADR-0057).
|
|
2
|
+
//
|
|
3
|
+
// THE ONE SENTENCE THIS PACKAGE EXISTS TO ENFORCE:
|
|
4
|
+
//
|
|
5
|
+
// TLS protects the connection. OAuth / a signed request proof / a bound workload credential
|
|
6
|
+
// authenticates the calling EXECUTION CONTEXT. Admission decides whether the canonical principal
|
|
7
|
+
// and agent may establish this interaction and exercise this capability.
|
|
8
|
+
//
|
|
9
|
+
// Those are three different questions, and nearly every real-world agent-security failure is one of
|
|
10
|
+
// them being mistaken for another. The type system is where that mistake gets caught cheaply, so the
|
|
11
|
+
// shapes below keep them in separate fields that cannot substitute for one another:
|
|
12
|
+
//
|
|
13
|
+
// transport evidence → `OptionalTransportEvidence` (never sufficient alone)
|
|
14
|
+
// app authentication → `OAuthEvidence` / `RequestProofEvidence`
|
|
15
|
+
// canonical identity → `CanonicalActorContext` (resolved, never claimed)
|
|
16
|
+
// authority → relationship/delegation/entitlement refs, evaluated by policy
|
|
17
|
+
//
|
|
18
|
+
// WHY THIS IS A SEPARATE PACKAGE FROM `edge-runtime`. `edge-runtime` answers "is this HTTP request
|
|
19
|
+
// well-formed enough to be worth looking at" — route, headers, body size, abuse limit. That is the
|
|
20
|
+
// INGRESS question, and it is deliberately Cloudflare-shaped. This package answers "may this actor do
|
|
21
|
+
// this thing", which is semantic, transport-free, and must not acquire a runtime dependency. Merging
|
|
22
|
+
// them would let edge concerns leak into authority decisions, which is what ADR-0043 forbids.
|
|
23
|
+
//
|
|
24
|
+
// NOTHING HERE PERFORMS I/O. Every contract is a type or a port. Implementations live in the edge, the
|
|
25
|
+
// gateway, and the apps.
|
|
26
|
+
export const PACKAGE_NAME = '@agenticprimitives/admission';
|
|
27
|
+
export const SPEC_REF = 'specs/339-agentic-primitives-edge-https-admission.md';
|
|
28
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,EAAE;AACF,mDAAmD;AACnD,EAAE;AACF,8FAA8F;AAC9F,mGAAmG;AACnG,2EAA2E;AAC3E,EAAE;AACF,oGAAoG;AACpG,qGAAqG;AACrG,oFAAoF;AACpF,EAAE;AACF,kFAAkF;AAClF,oEAAoE;AACpE,mFAAmF;AACnF,yFAAyF;AACzF,EAAE;AACF,mGAAmG;AACnG,mGAAmG;AACnG,sGAAsG;AACtG,qGAAqG;AACrG,8FAA8F;AAC9F,EAAE;AACF,uGAAuG;AACvG,yBAAyB;AAEzB,MAAM,CAAC,MAAM,YAAY,GAAG,8BAAuC,CAAC;AACpE,MAAM,CAAC,MAAM,QAAQ,GAAG,sDAA+D,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agenticprimitives/admission",
|
|
3
|
+
"version": "0.0.0-alpha.1",
|
|
4
|
+
"description": "Agentic Primitives Edge admission contracts: transport evidence, application authentication, canonical actor resolution, admission grants, and exact MCP invocation authorization. Zero runtime dependencies; admission is never authority.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/agentictrustlabs/agenticprimitives.git",
|
|
9
|
+
"directory": "packages/admission"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/agentictrustlabs/agenticprimitives/tree/master/packages/admission",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/agentictrustlabs/agenticprimitives/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"LICENSE",
|
|
26
|
+
"dist",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"vitest": "^4.1.8",
|
|
34
|
+
"@agenticprimitives/types": "1.0.0-alpha.20"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"agentic",
|
|
38
|
+
"primitives",
|
|
39
|
+
"admission",
|
|
40
|
+
"a2a",
|
|
41
|
+
"edge",
|
|
42
|
+
"authorization"
|
|
43
|
+
],
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"@agenticprimitives/types": "1.0.0-alpha.20"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "tsc -p tsconfig.build.json",
|
|
49
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"test:unit": "vitest run test/unit --passWithNoTests",
|
|
52
|
+
"clean": "rm -rf dist"
|
|
53
|
+
}
|
|
54
|
+
}
|