@agentplat/inference-control 0.3.0-alpha.3 → 0.3.0-alpha.5
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 +41 -11
- package/dist/trust.d.ts +246 -0
- package/dist/trust.d.ts.map +1 -0
- package/dist/trust.js +989 -0
- package/dist/trust.js.map +1 -0
- package/package.json +11 -6
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @agentplat/inference-control
|
|
2
2
|
|
|
3
3
|
Opt-in, provider-neutral control boundaries for inference, released output,
|
|
4
|
-
external actions and outbound messages. Alpha
|
|
4
|
+
external actions and outbound messages. Alpha 4 is a developer preview.
|
|
5
5
|
|
|
6
6
|
```sh
|
|
7
7
|
pnpm add @agentplat/inference-control@next
|
|
@@ -20,6 +20,8 @@ pnpm add @agentplat/inference-control@next
|
|
|
20
20
|
ledger and gateway.
|
|
21
21
|
- `@agentplat/inference-control/messages` — explicit outbound-message attempt
|
|
22
22
|
ledger and gateway.
|
|
23
|
+
- `@agentplat/inference-control/trust` — content-free outcome-to-Claim
|
|
24
|
+
conversion plus opt-in legacy and authenticated state-backed Trust gates.
|
|
23
25
|
|
|
24
26
|
The root entry point has no Node runtime dependency and imports only
|
|
25
27
|
`@agentplat/core`. Adapter subpaths depend only on public AgentPlat contracts
|
|
@@ -35,13 +37,13 @@ boundary to `ControlledModelExecutorV1`:
|
|
|
35
37
|
import {
|
|
36
38
|
CapabilityRegistryV1,
|
|
37
39
|
createContextEntryV1,
|
|
38
|
-
} from
|
|
39
|
-
import { ControlledModelExecutorV1 } from
|
|
40
|
+
} from "@agentplat/inference-control";
|
|
41
|
+
import { ControlledModelExecutorV1 } from "@agentplat/inference-control/model";
|
|
40
42
|
|
|
41
43
|
const registry = new CapabilityRegistryV1();
|
|
42
44
|
const capability = registry.register({
|
|
43
45
|
descriptor: localDescriptor,
|
|
44
|
-
wrapperInstanceId:
|
|
46
|
+
wrapperInstanceId: "instance:primary",
|
|
45
47
|
});
|
|
46
48
|
|
|
47
49
|
const executor = new ControlledModelExecutorV1({
|
|
@@ -51,26 +53,26 @@ const executor = new ControlledModelExecutorV1({
|
|
|
51
53
|
capabilityRegistry: registry,
|
|
52
54
|
resolvePolicy: (id, version) => localPolicies.get(`${id}:${version}`),
|
|
53
55
|
},
|
|
54
|
-
mode:
|
|
55
|
-
outputRisk:
|
|
56
|
+
mode: "buffered",
|
|
57
|
+
outputRisk: "high",
|
|
56
58
|
assessor: localAssessor,
|
|
57
59
|
});
|
|
58
60
|
|
|
59
61
|
const result = await executor.generate(
|
|
60
62
|
{
|
|
61
63
|
schemaVersion: 1,
|
|
62
|
-
runId:
|
|
63
|
-
tenantId:
|
|
64
|
-
policyId:
|
|
64
|
+
runId: "run:example",
|
|
65
|
+
tenantId: "tenant:example",
|
|
66
|
+
policyId: "policy:example",
|
|
65
67
|
policyVersion: 1,
|
|
66
68
|
capabilityHandleId: capability.capabilityHandleId,
|
|
67
|
-
contextEntryIds: [
|
|
69
|
+
contextEntryIds: ["context:policy", "context:user"],
|
|
68
70
|
model: null,
|
|
69
71
|
tools: [],
|
|
70
72
|
options: null,
|
|
71
73
|
scope: null,
|
|
72
74
|
},
|
|
73
|
-
{ tenant: { tenantId:
|
|
75
|
+
{ tenant: { tenantId: "tenant:example" } },
|
|
74
76
|
);
|
|
75
77
|
```
|
|
76
78
|
|
|
@@ -99,3 +101,31 @@ grant or message attempt. The gateway calls it once to consume the assessment
|
|
|
99
101
|
and again at the final local pre-effect boundary; cancellation, generation
|
|
100
102
|
advance or revocation between those checks must make the second call return
|
|
101
103
|
`false`.
|
|
104
|
+
|
|
105
|
+
## State-backed Trust gates
|
|
106
|
+
|
|
107
|
+
The `./trust` subpath can restrict model, Action and outbound-message
|
|
108
|
+
delegation using the current local Trust Profile. This path accepts only an
|
|
109
|
+
opaque runtime token created by strict protected-snapshot restore. Its bound
|
|
110
|
+
runtime source must return that token together with the exact current external
|
|
111
|
+
rollback anchor on every synchronous check. Raw state, cloned tokens, replaced
|
|
112
|
+
generations, clock rewind and stale dependency heads are unavailable.
|
|
113
|
+
|
|
114
|
+
That current source is part of the application's trusted computing base. It
|
|
115
|
+
must atomically read the durable Trust high-water anchor on every check and
|
|
116
|
+
must not serve a cached head. A process cannot infer an unseen successor from a
|
|
117
|
+
valid older anchor; returning one as the first sample is a source-boundary
|
|
118
|
+
violation that must be prevented by the durable adapter.
|
|
119
|
+
|
|
120
|
+
The full eligibility configuration is bound to the current
|
|
121
|
+
`profile_resolver` and operation boundary, including policy, subject mapping,
|
|
122
|
+
runtime-source identity, request template and the real base implementation
|
|
123
|
+
digest. Model execution uses a captured model-boundary object that receives the
|
|
124
|
+
same immutable target evaluated by Trust; Action and Message targets are
|
|
125
|
+
derived from their real permits and inputs. `restrict` delegates only for
|
|
126
|
+
`eligible`; `observe` preserves the base call and emits a redacted diagnostic.
|
|
127
|
+
|
|
128
|
+
These gates remain opt-in and point-in-time. They do not issue assessments or
|
|
129
|
+
grants, replace idempotency/fencing, or claim atomic revocation after an
|
|
130
|
+
external effect has started. The legacy synchronous-resolver helpers remain
|
|
131
|
+
available unchanged for Alpha 3 compatibility.
|
package/dist/trust.d.ts
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { type EvidenceClaimV1, type EvidenceOutcomeV1, type EvidenceReferenceV1, type EvidenceScopeV1, type EvidenceTrustRestoreOptionsV1, type EvidenceTrustRollbackAnchorV1, type EvidenceTrustSnapshotProtectorV1, type EvidenceTrustSnapshotV1, type TrustEligibilityRequirementV1, type TrustReasonCodeV1, type TrustSubjectV1 } from "@agentplat/trust";
|
|
2
|
+
import type { AssessmentRequestV1, InferenceAssessmentV1 } from "./types.js";
|
|
3
|
+
import { type ActionBinding, type ActionDispatcher, type ActionGrant } from "./tools.js";
|
|
4
|
+
import { type OutboundMessageAttempt, type OutboundMessageDispatcher } from "./messages.js";
|
|
5
|
+
/**
|
|
6
|
+
* Local mapping from an accepted Inference Control outcome to a Trust Claim.
|
|
7
|
+
* It contains no model, action, or message content.
|
|
8
|
+
*/
|
|
9
|
+
export interface InferenceControlTrustClaimMappingV1 {
|
|
10
|
+
readonly schemaVersion: 1;
|
|
11
|
+
readonly mappingId: string;
|
|
12
|
+
readonly mappingVersion: number;
|
|
13
|
+
readonly mappingDigest: string;
|
|
14
|
+
readonly sourceId: string;
|
|
15
|
+
readonly subject: TrustSubjectV1;
|
|
16
|
+
readonly scope: EvidenceScopeV1;
|
|
17
|
+
readonly criterionId: string;
|
|
18
|
+
readonly outcome: EvidenceOutcomeV1;
|
|
19
|
+
}
|
|
20
|
+
export interface CreateInferenceControlTrustClaimMappingInputV1 {
|
|
21
|
+
readonly schemaVersion: 1;
|
|
22
|
+
readonly mappingId: string;
|
|
23
|
+
readonly mappingVersion: number;
|
|
24
|
+
readonly sourceId: string;
|
|
25
|
+
readonly subject: TrustSubjectV1;
|
|
26
|
+
readonly scope: EvidenceScopeV1;
|
|
27
|
+
readonly criterionId: string;
|
|
28
|
+
readonly outcome: EvidenceOutcomeV1;
|
|
29
|
+
}
|
|
30
|
+
export interface AcceptedInferenceOutcomeClaimInputV1 {
|
|
31
|
+
readonly schemaVersion: 1;
|
|
32
|
+
readonly assessmentRequest: AssessmentRequestV1;
|
|
33
|
+
readonly assessment: InferenceAssessmentV1;
|
|
34
|
+
readonly assessorBindingDigest: string;
|
|
35
|
+
readonly dependencyBindingDigest: string;
|
|
36
|
+
readonly mapping: InferenceControlTrustClaimMappingV1;
|
|
37
|
+
readonly observedAt: string | null;
|
|
38
|
+
}
|
|
39
|
+
export interface AcceptedActionDispatchClaimInputV1 extends AcceptedInferenceOutcomeClaimInputV1 {
|
|
40
|
+
readonly grant: ActionGrant;
|
|
41
|
+
readonly binding: ActionBinding;
|
|
42
|
+
readonly dispatcher: ActionDispatcher;
|
|
43
|
+
}
|
|
44
|
+
export interface AcceptedOutboundMessageClaimInputV1 extends AcceptedInferenceOutcomeClaimInputV1 {
|
|
45
|
+
readonly attempt: OutboundMessageAttempt;
|
|
46
|
+
readonly dispatcher: OutboundMessageDispatcher;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Returns an exact, content-free reference to the accepted assessment request.
|
|
50
|
+
* The reference digest commits to the whole request record, including its
|
|
51
|
+
* target and scope, but the Claim only carries this digest and identifiers.
|
|
52
|
+
*/
|
|
53
|
+
export declare function createAssessmentRequestReferenceV1(request: AssessmentRequestV1): EvidenceReferenceV1;
|
|
54
|
+
/**
|
|
55
|
+
* Creates a local Claim candidate only; callers decide whether to admit it to
|
|
56
|
+
* Trust state. Candidate references intentionally bind identifiers and
|
|
57
|
+
* digests, never prompts, output, arguments, or message payloads.
|
|
58
|
+
*/
|
|
59
|
+
export declare function createClaimCandidateFromAcceptedInferenceOutcomeV1(input: AcceptedInferenceOutcomeClaimInputV1): EvidenceClaimV1;
|
|
60
|
+
/**
|
|
61
|
+
* Converts a terminal, dispatched Action Gateway outcome to a local Claim
|
|
62
|
+
* candidate. It verifies an already accepted assessment; it never creates or
|
|
63
|
+
* consumes an Action Grant.
|
|
64
|
+
*/
|
|
65
|
+
export declare function createClaimCandidateFromAcceptedActionDispatchV1(input: AcceptedActionDispatchClaimInputV1): EvidenceClaimV1;
|
|
66
|
+
/**
|
|
67
|
+
* Converts a terminal, sent outbound-message outcome to a local Claim
|
|
68
|
+
* candidate. It references digests only and never copies the message body.
|
|
69
|
+
*/
|
|
70
|
+
export declare function createClaimCandidateFromAcceptedOutboundMessageV1(input: AcceptedOutboundMessageClaimInputV1): EvidenceClaimV1;
|
|
71
|
+
export declare function createInferenceControlTrustClaimMappingV1(input: CreateInferenceControlTrustClaimMappingInputV1): InferenceControlTrustClaimMappingV1;
|
|
72
|
+
export type TrustEligibilityModeV1 = "observe" | "restrict";
|
|
73
|
+
export type TrustEligibilityStatusV1 = "eligible" | "restricted" | "unavailable" | "stale" | "mismatch" | "quarantined";
|
|
74
|
+
export type TrustEligibilityOperationV1 = "model" | "action" | "outbound_message";
|
|
75
|
+
/** A content-free subject for an opt-in eligibility lookup. */
|
|
76
|
+
export interface TrustEligibilityTargetV1 {
|
|
77
|
+
readonly schemaVersion: 1;
|
|
78
|
+
readonly operation: TrustEligibilityOperationV1;
|
|
79
|
+
readonly tenantId: string;
|
|
80
|
+
readonly runId: string;
|
|
81
|
+
readonly scopeDigest: string;
|
|
82
|
+
readonly targetDigest: string;
|
|
83
|
+
}
|
|
84
|
+
export interface TrustEligibilityDecisionV1 {
|
|
85
|
+
readonly schemaVersion: 1;
|
|
86
|
+
readonly status: TrustEligibilityStatusV1;
|
|
87
|
+
readonly policyDigest: string;
|
|
88
|
+
readonly resolverDigest: string;
|
|
89
|
+
readonly mappingDigest: string;
|
|
90
|
+
readonly scopeDigest: string;
|
|
91
|
+
readonly targetDigest: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* This is deliberately synchronous. Wrappers invoke it immediately before
|
|
95
|
+
* delegation, leaving no asynchronous gap after their final revalidation.
|
|
96
|
+
*/
|
|
97
|
+
export interface TrustEligibilityResolverV1 {
|
|
98
|
+
readonly resolverId: string;
|
|
99
|
+
readonly resolverVersion: number;
|
|
100
|
+
readonly resolverDigest: string;
|
|
101
|
+
resolve(target: TrustEligibilityTargetV1): TrustEligibilityDecisionV1;
|
|
102
|
+
}
|
|
103
|
+
export interface TrustEligibilityPolicyBindingV1 {
|
|
104
|
+
readonly policyId: string;
|
|
105
|
+
readonly policyVersion: number;
|
|
106
|
+
readonly policyDigest: string;
|
|
107
|
+
readonly mode: TrustEligibilityModeV1;
|
|
108
|
+
}
|
|
109
|
+
export interface TrustEligibilityMappingBindingV1 {
|
|
110
|
+
readonly mappingId: string;
|
|
111
|
+
readonly mappingVersion: number;
|
|
112
|
+
readonly mappingDigest: string;
|
|
113
|
+
}
|
|
114
|
+
export interface TrustEligibilityIntegrationV1 {
|
|
115
|
+
readonly policy: TrustEligibilityPolicyBindingV1;
|
|
116
|
+
readonly resolver: TrustEligibilityResolverV1;
|
|
117
|
+
readonly mapping: TrustEligibilityMappingBindingV1;
|
|
118
|
+
readonly onDiagnostic?: (diagnostic: TrustEligibilityDiagnosticV1) => void;
|
|
119
|
+
}
|
|
120
|
+
/** Model-boundary bindings must be explicit because no dispatcher is present. */
|
|
121
|
+
export interface TrustModelEligibilityIntegrationV1 extends TrustEligibilityIntegrationV1 {
|
|
122
|
+
readonly modelBindingDigest: string;
|
|
123
|
+
}
|
|
124
|
+
export interface TrustEligibilityDiagnosticV1 {
|
|
125
|
+
readonly schemaVersion: 1;
|
|
126
|
+
readonly operation: TrustEligibilityOperationV1;
|
|
127
|
+
readonly mode: TrustEligibilityModeV1;
|
|
128
|
+
readonly status: TrustEligibilityStatusV1;
|
|
129
|
+
readonly bindingDigest: string;
|
|
130
|
+
}
|
|
131
|
+
export interface TrustBoundActionDispatcherV1 extends ActionDispatcher {
|
|
132
|
+
readonly trustBindingDigest: string;
|
|
133
|
+
}
|
|
134
|
+
export interface TrustBoundOutboundMessageDispatcherV1 extends OutboundMessageDispatcher {
|
|
135
|
+
readonly trustBindingDigest: string;
|
|
136
|
+
}
|
|
137
|
+
export interface InferenceControlTrustModelBoundaryV1<T> {
|
|
138
|
+
readonly modelBoundaryId: string;
|
|
139
|
+
readonly modelBoundaryVersion: number;
|
|
140
|
+
readonly implementationDigest: string;
|
|
141
|
+
run(target: TrustEligibilityTargetV1): T;
|
|
142
|
+
}
|
|
143
|
+
export interface TrustBoundModelBoundaryV1<T> extends InferenceControlTrustModelBoundaryV1<T> {
|
|
144
|
+
readonly trustBindingDigest: string;
|
|
145
|
+
}
|
|
146
|
+
export interface InferenceControlTrustSubjectMappingInputV1 {
|
|
147
|
+
readonly controlTenantId: string;
|
|
148
|
+
readonly controlRunId: string;
|
|
149
|
+
readonly controlScopeDigest: string;
|
|
150
|
+
readonly trustSubject: TrustSubjectV1;
|
|
151
|
+
readonly trustScope: EvidenceScopeV1;
|
|
152
|
+
}
|
|
153
|
+
export interface InferenceControlTrustRuntimeSourceBindingInputV1 {
|
|
154
|
+
readonly sourceId: string;
|
|
155
|
+
readonly sourceVersion: number;
|
|
156
|
+
readonly protectorBindingDigest: string;
|
|
157
|
+
}
|
|
158
|
+
export interface InferenceControlTrustStateEligibilityConfigV1 extends InferenceControlTrustSubjectMappingInputV1 {
|
|
159
|
+
readonly schemaVersion: 1;
|
|
160
|
+
readonly operation: TrustEligibilityOperationV1;
|
|
161
|
+
readonly mode: TrustEligibilityModeV1;
|
|
162
|
+
readonly policyId: string;
|
|
163
|
+
readonly policyVersion: number;
|
|
164
|
+
readonly policyDigest: string;
|
|
165
|
+
readonly maximumProfileAgeMs: number;
|
|
166
|
+
readonly requirements: readonly TrustEligibilityRequirementV1[];
|
|
167
|
+
readonly subjectMappingDigest: string;
|
|
168
|
+
readonly runtimeSourceBindingDigest: string;
|
|
169
|
+
readonly profileResolverBindingDigest: string;
|
|
170
|
+
readonly boundaryBindingDigest: string;
|
|
171
|
+
readonly baseBindingDigest: string;
|
|
172
|
+
}
|
|
173
|
+
export interface InferenceControlTrustEligibilityRuntimeV1 {
|
|
174
|
+
readonly schemaVersion: 1;
|
|
175
|
+
readonly runtimeId: string;
|
|
176
|
+
}
|
|
177
|
+
export interface InferenceControlTrustEligibilityRuntimeSampleV1 {
|
|
178
|
+
readonly schemaVersion: 1;
|
|
179
|
+
readonly runtime: InferenceControlTrustEligibilityRuntimeV1;
|
|
180
|
+
readonly rollbackAnchor: EvidenceTrustRollbackAnchorV1;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Trusted-computing-base adapter for the application's durable Trust head.
|
|
184
|
+
* `current` must synchronously and atomically read the durable high-water
|
|
185
|
+
* anchor and return its exact restored token; it must not serve a cache.
|
|
186
|
+
*/
|
|
187
|
+
export interface InferenceControlTrustEligibilityRuntimeSourceV1 extends InferenceControlTrustRuntimeSourceBindingInputV1 {
|
|
188
|
+
readonly bindingDigest: string;
|
|
189
|
+
current(): InferenceControlTrustEligibilityRuntimeSampleV1;
|
|
190
|
+
}
|
|
191
|
+
export interface InferenceControlTrustStateIntegrationV1 {
|
|
192
|
+
readonly config: InferenceControlTrustStateEligibilityConfigV1;
|
|
193
|
+
readonly runtime: InferenceControlTrustEligibilityRuntimeSourceV1;
|
|
194
|
+
readonly onDiagnostic?: (diagnostic: TrustEligibilityDiagnosticV1) => void;
|
|
195
|
+
}
|
|
196
|
+
export interface InferenceControlTrustStateEligibilityResultV1 {
|
|
197
|
+
readonly status: "eligible" | "restricted" | "quarantined" | "unavailable";
|
|
198
|
+
readonly eligibilityDecisionId: string | null;
|
|
199
|
+
readonly reasonCodes: readonly TrustReasonCodeV1[];
|
|
200
|
+
}
|
|
201
|
+
export declare function digestInferenceControlTrustRuntimeSourceBindingV1(value: InferenceControlTrustRuntimeSourceBindingInputV1): string;
|
|
202
|
+
export declare function digestInferenceControlTrustSubjectMappingV1(value: InferenceControlTrustSubjectMappingInputV1): string;
|
|
203
|
+
export declare function createInferenceControlTrustStateEligibilityConfigV1(value: InferenceControlTrustStateEligibilityConfigV1): InferenceControlTrustStateEligibilityConfigV1;
|
|
204
|
+
export declare function digestInferenceControlTrustStateEligibilityConfigV1(value: InferenceControlTrustStateEligibilityConfigV1): string;
|
|
205
|
+
export declare function restoreInferenceControlTrustEligibilityRuntimeV1(snapshot: EvidenceTrustSnapshotV1, anchor: EvidenceTrustRollbackAnchorV1, protector: EvidenceTrustSnapshotProtectorV1, runtimeSourceBindingDigest: string, options?: EvidenceTrustRestoreOptionsV1): InferenceControlTrustEligibilityRuntimeV1;
|
|
206
|
+
/**
|
|
207
|
+
* Evaluates an exact Inference Control target against a current, strictly
|
|
208
|
+
* restored Trust snapshot. Runtime failures are projected as unavailable;
|
|
209
|
+
* malformed construction-time configuration remains a caller error.
|
|
210
|
+
*/
|
|
211
|
+
export declare function evaluateInferenceControlTrustStateEligibilityV1(integration: InferenceControlTrustStateIntegrationV1, target: TrustEligibilityTargetV1): InferenceControlTrustStateEligibilityResultV1;
|
|
212
|
+
/** Derives the model boundary binding from its local implementation identity. */
|
|
213
|
+
export declare function digestInferenceControlTrustModelBoundaryV1(boundary: Pick<InferenceControlTrustModelBoundaryV1<unknown>, "modelBoundaryId" | "modelBoundaryVersion" | "implementationDigest">): string;
|
|
214
|
+
/** Derives the real Action dispatcher binding from its public identity. */
|
|
215
|
+
export declare function digestActionDispatcherBindingV1(dispatcher: Pick<ActionDispatcher, "dispatcherId" | "dispatcherVersion" | "fencingMode">): string;
|
|
216
|
+
/** Derives the real Message dispatcher binding, including its dispatcher digest. */
|
|
217
|
+
export declare function digestOutboundMessageDispatcherBindingV1(dispatcher: Pick<OutboundMessageDispatcher, "dispatcherId" | "dispatcherVersion" | "dispatcherDigest" | "fencingMode">): string;
|
|
218
|
+
export declare function digestTrustEligibilityBindingV1(integration: TrustEligibilityIntegrationV1, baseBindingDigest: string): string;
|
|
219
|
+
/**
|
|
220
|
+
* Runs a model-boundary eligibility check before starting the supplied model
|
|
221
|
+
* operation. Existing executors remain untouched unless this helper is used.
|
|
222
|
+
*/
|
|
223
|
+
export declare function runWithTrustEligibilityV1<T>(integration: TrustModelEligibilityIntegrationV1, target: TrustEligibilityTargetV1, run: () => T): T;
|
|
224
|
+
export declare function wrapActionDispatcherWithTrustV1(dispatcher: ActionDispatcher, integration: TrustEligibilityIntegrationV1, mapTarget: (input: Parameters<ActionDispatcher["dispatch"]>[0]) => TrustEligibilityTargetV1): TrustBoundActionDispatcherV1;
|
|
225
|
+
export declare function wrapOutboundMessageDispatcherWithTrustV1(dispatcher: OutboundMessageDispatcher, integration: TrustEligibilityIntegrationV1, mapTarget: (input: Parameters<OutboundMessageDispatcher["send"]>[0]) => TrustEligibilityTargetV1): TrustBoundOutboundMessageDispatcherV1;
|
|
226
|
+
/**
|
|
227
|
+
* Runs a model operation only after sampling the current authenticated Trust
|
|
228
|
+
* runtime. No asynchronous gap is introduced between the final check and run.
|
|
229
|
+
*/
|
|
230
|
+
export declare function runWithTrustStateEligibilityV1<T>(integration: InferenceControlTrustStateIntegrationV1, target: TrustEligibilityTargetV1, boundary: InferenceControlTrustModelBoundaryV1<T>): T;
|
|
231
|
+
/**
|
|
232
|
+
* Construction-binds the model implementation and passes the exact target
|
|
233
|
+
* checked by Trust to that same boundary.
|
|
234
|
+
*/
|
|
235
|
+
export declare function wrapModelBoundaryWithTrustStateV1<T>(boundary: InferenceControlTrustModelBoundaryV1<T>, integration: InferenceControlTrustStateIntegrationV1): TrustBoundModelBoundaryV1<T>;
|
|
236
|
+
/**
|
|
237
|
+
* Adds a state-backed Trust predicate to an Action dispatcher without
|
|
238
|
+
* changing its grant, authority, reservation, or fencing contracts.
|
|
239
|
+
*/
|
|
240
|
+
export declare function wrapActionDispatcherWithTrustStateV1(dispatcher: ActionDispatcher, integration: InferenceControlTrustStateIntegrationV1): TrustBoundActionDispatcherV1;
|
|
241
|
+
/**
|
|
242
|
+
* Adds a state-backed Trust predicate to an outbound Message dispatcher while
|
|
243
|
+
* preserving the base dispatcher's attempt and fencing behavior.
|
|
244
|
+
*/
|
|
245
|
+
export declare function wrapOutboundMessageDispatcherWithTrustStateV1(dispatcher: OutboundMessageDispatcher, integration: InferenceControlTrustStateIntegrationV1): TrustBoundOutboundMessageDispatcherV1;
|
|
246
|
+
//# sourceMappingURL=trust.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trust.d.ts","sourceRoot":"","sources":["../src/trust.ts"],"names":[],"mappings":"AAAA,OAAO,EAeL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EAEpB,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAG5B,KAAK,6BAA6B,EAClC,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EACV,mBAAmB,EAEnB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EAGL,KA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