@emilia-protocol/sdk 0.1.0 → 0.10.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 +860 -0
- package/dist/client.d.ts +574 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +898 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +728 -172
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +458 -129
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +710 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +35 -0
- package/dist/types.js.map +1 -0
- package/package.json +29 -12
- package/src/client.ts +1128 -0
- package/src/index.ts +1332 -0
- package/src/types.ts +859 -0
package/dist/index.js
CHANGED
|
@@ -1,159 +1,488 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* TypeScript SDK for EMILIA Protocol (EP).
|
|
5
|
-
* The trust layer for agentic commerce.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* import { EmiliaClient } from '@emilia-protocol/sdk';
|
|
9
|
-
* const ep = new EmiliaClient({ apiKey: 'ep_live_...' });
|
|
10
|
-
* const score = await ep.getScore('rex-booking-v1');
|
|
11
|
-
*
|
|
12
|
-
* @license Apache-2.0
|
|
13
|
-
*/
|
|
14
|
-
export class EmiliaError extends Error {
|
|
1
|
+
/** EMILIA Protocol — Full SDK. Zero dependencies, native fetch. @license Apache-2.0 */
|
|
2
|
+
// -- Error ------------------------------------------------------------------
|
|
3
|
+
export class EPError extends Error {
|
|
15
4
|
status;
|
|
16
|
-
|
|
5
|
+
code;
|
|
6
|
+
constructor(message, status, code) {
|
|
17
7
|
super(message);
|
|
18
|
-
this.name = 'EmiliaError';
|
|
19
8
|
this.status = status;
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.name = 'EPError';
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
20
12
|
}
|
|
21
13
|
}
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
// -- Cloud Client -----------------------------------------------------------
|
|
15
|
+
export class EPCloudClient {
|
|
16
|
+
_request;
|
|
17
|
+
/** @internal */
|
|
18
|
+
constructor(_request) {
|
|
19
|
+
this._request = _request;
|
|
20
|
+
}
|
|
21
|
+
/** Get pending signoffs, optionally filtered by entity, scope, or status. */
|
|
22
|
+
async getPendingSignoffs(filters) {
|
|
23
|
+
const qs = this._buildQs(filters);
|
|
24
|
+
return this._request('GET', `/api/cloud/signoffs/pending${qs}`, undefined, true);
|
|
25
|
+
}
|
|
26
|
+
/** Get the signoff queue with optional filtering. */
|
|
27
|
+
async getSignoffQueue(filters) {
|
|
28
|
+
const qs = this._buildQs(filters);
|
|
29
|
+
return this._request('GET', `/api/cloud/signoffs/queue${qs}`, undefined, true);
|
|
30
|
+
}
|
|
31
|
+
/** Get a dashboard summary of signoff activity over a date range. */
|
|
32
|
+
async getSignoffDashboard(dateRange) {
|
|
33
|
+
const qs = this._buildDateRangeQs(dateRange);
|
|
34
|
+
return this._request('GET', `/api/cloud/signoffs/dashboard${qs}`, undefined, true);
|
|
35
|
+
}
|
|
36
|
+
/** Get analytics for signoff activity with optional granularity. */
|
|
37
|
+
async getSignoffAnalytics(dateRange, granularity) {
|
|
38
|
+
const params = {};
|
|
39
|
+
if (dateRange?.from)
|
|
40
|
+
params['from'] = dateRange.from;
|
|
41
|
+
if (dateRange?.to)
|
|
42
|
+
params['to'] = dateRange.to;
|
|
43
|
+
if (granularity)
|
|
44
|
+
params['granularity'] = granularity;
|
|
45
|
+
const qs = this._toQs(params);
|
|
46
|
+
return this._request('GET', `/api/cloud/signoffs/analytics${qs}`, undefined, true);
|
|
47
|
+
}
|
|
48
|
+
/** Escalate a signoff challenge to another entity. */
|
|
49
|
+
async escalateSignoff(challengeId, escalateTo, reason) {
|
|
50
|
+
return this._request('POST', `/api/cloud/signoffs/${encodeURIComponent(challengeId)}/escalate`, {
|
|
51
|
+
escalateTo,
|
|
52
|
+
reason,
|
|
53
|
+
}, true);
|
|
54
|
+
}
|
|
55
|
+
/** Send a notification about a signoff challenge via the specified channel. */
|
|
56
|
+
async notifySignoff(challengeId, channel) {
|
|
57
|
+
return this._request('POST', `/api/cloud/signoffs/${encodeURIComponent(challengeId)}/notify`, {
|
|
58
|
+
channel,
|
|
59
|
+
}, true);
|
|
60
|
+
}
|
|
61
|
+
/** Search audit events by query string and optional filters. */
|
|
62
|
+
async searchEvents(query, filters) {
|
|
63
|
+
return this._request('POST', '/api/cloud/events/search', {
|
|
64
|
+
query,
|
|
65
|
+
filters,
|
|
66
|
+
}, true);
|
|
67
|
+
}
|
|
68
|
+
/** Get a chronological timeline of events for a specific handshake. */
|
|
69
|
+
async getEventTimeline(handshakeId) {
|
|
70
|
+
return this._request('GET', `/api/cloud/events/timeline/${encodeURIComponent(handshakeId)}`, undefined, true);
|
|
71
|
+
}
|
|
72
|
+
/** Export audit data in the specified format. */
|
|
73
|
+
async exportAudit(params) {
|
|
74
|
+
return this._request('POST', '/api/cloud/audit/export', params, true);
|
|
75
|
+
}
|
|
76
|
+
/** Generate an audit report for the given type and date range. */
|
|
77
|
+
async getAuditReport(reportType, dateRange) {
|
|
78
|
+
return this._request('POST', '/api/cloud/audit/report', {
|
|
79
|
+
reportType,
|
|
80
|
+
dateRange,
|
|
81
|
+
}, true);
|
|
82
|
+
}
|
|
83
|
+
/** Run an integrity check on the protocol data store. */
|
|
84
|
+
async checkIntegrity() {
|
|
85
|
+
return this._request('POST', '/api/cloud/integrity/check', undefined, true);
|
|
86
|
+
}
|
|
87
|
+
/** Simulate a policy against a hypothetical context without persisting any state. */
|
|
88
|
+
async simulatePolicy(policyId, context) {
|
|
89
|
+
return this._request('POST', `/api/cloud/policies/${encodeURIComponent(policyId)}/simulate`, {
|
|
90
|
+
context,
|
|
91
|
+
}, true);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Roll out a specific policy version to an environment. The version is
|
|
95
|
+
* resolved against handshake_policies by the policy's policy_key. Immediate
|
|
96
|
+
* rollouts supersede the prior active rollout for that (policy_key,
|
|
97
|
+
* environment); canary rollouts coexist (canaryPct in 1–99).
|
|
98
|
+
*/
|
|
99
|
+
async rolloutPolicy(policyId, version, environment, strategy = 'immediate', canaryPct) {
|
|
100
|
+
return this._request('POST', `/api/cloud/policies/${encodeURIComponent(policyId)}/rollout`, {
|
|
101
|
+
version,
|
|
102
|
+
environment,
|
|
103
|
+
strategy,
|
|
104
|
+
...(strategy === 'canary' && canaryPct !== undefined ? { canary_pct: canaryPct } : {}),
|
|
105
|
+
}, true);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* List all versions of a policy. Versions are the handshake_policies rows
|
|
109
|
+
* sharing the policy's policy_key, returned newest-first inside an envelope.
|
|
110
|
+
*/
|
|
111
|
+
async getPolicyVersions(policyId) {
|
|
112
|
+
return this._request('GET', `/api/cloud/policies/${encodeURIComponent(policyId)}/versions`, undefined, true);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Diff two versions of a policy to see what changed between their rules.
|
|
116
|
+
* v1 and v2 are version numbers; the response includes both version rows and
|
|
117
|
+
* a semantic diff classified as loosening / tightening / neutral.
|
|
118
|
+
*/
|
|
119
|
+
async diffPolicyVersions(policyId, v1, v2) {
|
|
120
|
+
const qs = this._toQs({ v1: String(v1), v2: String(v2) });
|
|
121
|
+
return this._request('GET', `/api/cloud/policies/${encodeURIComponent(policyId)}/diff${qs}`, undefined, true);
|
|
122
|
+
}
|
|
123
|
+
/** @internal Build query string from SignoffFilters. */
|
|
124
|
+
_buildQs(filters) {
|
|
125
|
+
if (!filters)
|
|
126
|
+
return '';
|
|
127
|
+
const params = {};
|
|
128
|
+
if (filters.entityId)
|
|
129
|
+
params['entityId'] = filters.entityId;
|
|
130
|
+
if (filters.scope)
|
|
131
|
+
params['scope'] = filters.scope;
|
|
132
|
+
if (filters.status)
|
|
133
|
+
params['status'] = filters.status;
|
|
134
|
+
if (filters.limit !== undefined)
|
|
135
|
+
params['limit'] = String(filters.limit);
|
|
136
|
+
if (filters.offset !== undefined)
|
|
137
|
+
params['offset'] = String(filters.offset);
|
|
138
|
+
return this._toQs(params);
|
|
139
|
+
}
|
|
140
|
+
/** @internal Build query string from DateRange. */
|
|
141
|
+
_buildDateRangeQs(dateRange) {
|
|
142
|
+
if (!dateRange)
|
|
143
|
+
return '';
|
|
144
|
+
const params = {};
|
|
145
|
+
if (dateRange.from)
|
|
146
|
+
params['from'] = dateRange.from;
|
|
147
|
+
if (dateRange.to)
|
|
148
|
+
params['to'] = dateRange.to;
|
|
149
|
+
return this._toQs(params);
|
|
150
|
+
}
|
|
151
|
+
/** @internal Convert key-value pairs to a query string. */
|
|
152
|
+
_toQs(params) {
|
|
153
|
+
const entries = Object.entries(params).filter(([, v]) => v !== undefined && v !== '');
|
|
154
|
+
if (entries.length === 0)
|
|
155
|
+
return '';
|
|
156
|
+
return '?' + entries.map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`).join('&');
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
// -- Client -----------------------------------------------------------------
|
|
160
|
+
function trustReceiptBody(params) {
|
|
161
|
+
return {
|
|
162
|
+
organization_id: params.organizationId,
|
|
163
|
+
action_type: params.actionType,
|
|
164
|
+
target_resource_id: params.targetResourceId,
|
|
165
|
+
policy_id: params.policyId,
|
|
166
|
+
enforcement_mode: params.enforcementMode,
|
|
167
|
+
before_state: params.beforeState,
|
|
168
|
+
after_state: params.afterState,
|
|
169
|
+
target_changed_fields: params.targetChangedFields,
|
|
170
|
+
amount: params.amount,
|
|
171
|
+
currency: params.currency,
|
|
172
|
+
risk_flags: params.riskFlags,
|
|
173
|
+
actor_role: params.actorRole,
|
|
174
|
+
actor_department: params.actorDepartment,
|
|
175
|
+
business_hours: params.businessHours,
|
|
176
|
+
velocity_same_actor_24h: params.velocitySameActor24h,
|
|
177
|
+
prior_denials_actor_30d: params.priorDenialsActor30d,
|
|
178
|
+
prior_changes_target_30d: params.priorChangesTarget30d,
|
|
179
|
+
destination_age_days: params.destinationAgeDays,
|
|
180
|
+
quorum_policy: params.quorumPolicy,
|
|
181
|
+
metadata: params.metadata,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
export class EPClient {
|
|
26
185
|
baseUrl;
|
|
27
186
|
apiKey;
|
|
28
187
|
timeout;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
188
|
+
retries;
|
|
189
|
+
/** Cloud-specific endpoints (dashboards, analytics, audit, policy management). */
|
|
190
|
+
cloud;
|
|
191
|
+
constructor(options = {}) {
|
|
192
|
+
const env = typeof process !== 'undefined' && process.env ? process.env : {};
|
|
193
|
+
// Trim trailing slashes without a regex — avoids the polynomial-backtracking
|
|
194
|
+
// CodeQL flags on /\/+$/ for long all-slash inputs.
|
|
195
|
+
const rawBase = options.baseUrl ?? env.EP_BASE_URL ?? 'https://emiliaprotocol.ai';
|
|
196
|
+
let baseEnd = rawBase.length;
|
|
197
|
+
while (baseEnd > 0 && rawBase.charCodeAt(baseEnd - 1) === 47 /* '/' */)
|
|
198
|
+
baseEnd--;
|
|
199
|
+
this.baseUrl = rawBase.slice(0, baseEnd);
|
|
200
|
+
this.apiKey = options.apiKey ?? env.EP_API_KEY ?? '';
|
|
201
|
+
this.timeout = options.timeout ?? 10_000;
|
|
202
|
+
this.retries = options.retries ?? 2;
|
|
203
|
+
// Bind the internal request method for the cloud sub-client
|
|
204
|
+
this.cloud = new EPCloudClient(this.request.bind(this));
|
|
205
|
+
}
|
|
206
|
+
async request(method, path, body, auth = false) {
|
|
38
207
|
const url = `${this.baseUrl}${path}`;
|
|
39
208
|
const headers = {
|
|
40
209
|
'Content-Type': 'application/json',
|
|
210
|
+
'User-Agent': '@emilia-protocol/sdk/0.10.0',
|
|
41
211
|
};
|
|
42
|
-
if (
|
|
43
|
-
if (!this.apiKey) {
|
|
44
|
-
throw new EmiliaError('API key required for this operation. Pass apiKey in EmiliaClient config.', 401);
|
|
45
|
-
}
|
|
212
|
+
if (auth && this.apiKey) {
|
|
46
213
|
headers['Authorization'] = `Bearer ${this.apiKey}`;
|
|
47
214
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
215
|
+
let lastErr;
|
|
216
|
+
for (let attempt = 0; attempt <= this.retries; attempt++) {
|
|
217
|
+
const ctrl = new AbortController();
|
|
218
|
+
const timer = setTimeout(() => ctrl.abort(), this.timeout);
|
|
219
|
+
try {
|
|
220
|
+
const res = await fetch(url, {
|
|
221
|
+
method,
|
|
222
|
+
headers,
|
|
223
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
224
|
+
signal: ctrl.signal,
|
|
225
|
+
});
|
|
226
|
+
const data = await res.json().catch(() => undefined);
|
|
227
|
+
if (!res.ok) {
|
|
228
|
+
const p = data;
|
|
229
|
+
const msg = typeof p?.['error'] === 'string'
|
|
230
|
+
? p['error']
|
|
231
|
+
: typeof p?.['detail'] === 'string'
|
|
232
|
+
? p['detail']
|
|
233
|
+
: typeof p?.['title'] === 'string'
|
|
234
|
+
? p['title']
|
|
235
|
+
: `EP API error: ${res.status}`;
|
|
236
|
+
const code = typeof p?.['code'] === 'string'
|
|
237
|
+
? p['code']
|
|
238
|
+
: typeof p?.['type'] === 'string'
|
|
239
|
+
? p['type'].split('/').pop()
|
|
240
|
+
: undefined;
|
|
241
|
+
throw new EPError(msg, res.status, code);
|
|
242
|
+
}
|
|
243
|
+
return data;
|
|
244
|
+
}
|
|
245
|
+
catch (err) {
|
|
246
|
+
lastErr = err;
|
|
247
|
+
if (err instanceof EPError) {
|
|
248
|
+
// Only retry on 5xx
|
|
249
|
+
if (err.status && err.status < 500)
|
|
250
|
+
throw err;
|
|
251
|
+
}
|
|
252
|
+
if (err instanceof Error && err.name === 'AbortError') {
|
|
253
|
+
lastErr = new EPError(`Request timed out after ${this.timeout}ms`, undefined, 'timeout');
|
|
254
|
+
}
|
|
255
|
+
if (attempt === this.retries)
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
finally {
|
|
259
|
+
clearTimeout(timer);
|
|
60
260
|
}
|
|
61
|
-
return data;
|
|
62
|
-
}
|
|
63
|
-
finally {
|
|
64
|
-
clearTimeout(timer);
|
|
65
261
|
}
|
|
262
|
+
if (lastErr instanceof EPError)
|
|
263
|
+
throw lastErr;
|
|
264
|
+
throw new EPError(lastErr instanceof Error ? lastErr.message : 'Unknown network error', undefined, 'network_error');
|
|
66
265
|
}
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
//
|
|
70
|
-
/**
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
async getScore(entityId) {
|
|
75
|
-
return this.request(`/api/score/${encodeURIComponent(entityId)}`);
|
|
266
|
+
// ------------------------------------------------------------------
|
|
267
|
+
// Core protocol endpoints
|
|
268
|
+
// ------------------------------------------------------------------
|
|
269
|
+
/** List available trust policies. */
|
|
270
|
+
async listPolicies(params) {
|
|
271
|
+
const qs = params?.scope ? `?scope=${encodeURIComponent(params.scope)}` : '';
|
|
272
|
+
return this.request('GET', `/api/policies${qs}`);
|
|
76
273
|
}
|
|
77
|
-
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
*/
|
|
81
|
-
async submitReceipt(input) {
|
|
82
|
-
return this.request('/api/receipts/submit', {
|
|
83
|
-
method: 'POST',
|
|
84
|
-
auth: true,
|
|
85
|
-
body: input,
|
|
86
|
-
});
|
|
274
|
+
/** Initiate a trust handshake between parties. */
|
|
275
|
+
async initiateHandshake(params) {
|
|
276
|
+
return this.request('POST', '/api/handshake/initiate', params, true);
|
|
87
277
|
}
|
|
88
|
-
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*/
|
|
92
|
-
async registerEntity(input) {
|
|
93
|
-
return this.request('/api/entities/register', {
|
|
94
|
-
method: 'POST',
|
|
95
|
-
auth: true,
|
|
96
|
-
body: input,
|
|
97
|
-
});
|
|
278
|
+
/** Present credentials to a handshake. */
|
|
279
|
+
async present(handshakeId, params) {
|
|
280
|
+
return this.request('POST', `/api/handshake/${encodeURIComponent(handshakeId)}/present`, params, true);
|
|
98
281
|
}
|
|
99
|
-
/**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
*/
|
|
103
|
-
async verifyReceipt(receiptId) {
|
|
104
|
-
return this.request(`/api/verify/${encodeURIComponent(receiptId)}`);
|
|
282
|
+
/** Verify a handshake -- evaluate all presentations against policy. */
|
|
283
|
+
async verify(handshakeId) {
|
|
284
|
+
return this.request('POST', `/api/handshake/${encodeURIComponent(handshakeId)}/verify`, undefined, true);
|
|
105
285
|
}
|
|
106
|
-
/**
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
params.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
286
|
+
/** Pre-action trust gate. Returns allow/deny/review with commit ref. */
|
|
287
|
+
async gate(params) {
|
|
288
|
+
return this.request('POST', '/api/gate', {
|
|
289
|
+
entity_id: params.entityId,
|
|
290
|
+
action: params.action,
|
|
291
|
+
policy: params.policy ?? 'standard',
|
|
292
|
+
handshake_id: params.handshakeId,
|
|
293
|
+
value_usd: params.valueUsd,
|
|
294
|
+
delegation_id: params.delegationId,
|
|
295
|
+
}, true);
|
|
296
|
+
}
|
|
297
|
+
/** Retrieve details of a specific handshake by ID. */
|
|
298
|
+
async getHandshake(handshakeId) {
|
|
299
|
+
return this.request('GET', `/api/handshake/${encodeURIComponent(handshakeId)}`, undefined, true);
|
|
300
|
+
}
|
|
301
|
+
/** Revoke an active handshake, invalidating all associated state. */
|
|
302
|
+
async revokeHandshake(handshakeId) {
|
|
303
|
+
return this.request('POST', `/api/handshake/${encodeURIComponent(handshakeId)}/revoke`, undefined, true);
|
|
304
|
+
}
|
|
305
|
+
/** Consume a handshake -- finalize and optionally bind a receipt. */
|
|
306
|
+
async consume(handshakeId, params) {
|
|
307
|
+
return this.request('POST', `/api/handshake/${encodeURIComponent(handshakeId)}/consume`, params, true);
|
|
308
|
+
}
|
|
309
|
+
// ------------------------------------------------------------------
|
|
310
|
+
// v1 Trust Receipt Enforcement
|
|
311
|
+
// ------------------------------------------------------------------
|
|
312
|
+
/** Create a v1 pre-action trust receipt for a high-risk mutation. */
|
|
313
|
+
async createTrustReceipt(params) {
|
|
314
|
+
return this.request('POST', '/api/v1/trust-receipts', trustReceiptBody(params), true);
|
|
315
|
+
}
|
|
316
|
+
/** Read current receipt state from the append-only v1 audit timeline. */
|
|
317
|
+
async getTrustReceipt(receiptId) {
|
|
318
|
+
return this.request('GET', `/api/v1/trust-receipts/${encodeURIComponent(receiptId)}`, undefined, true);
|
|
319
|
+
}
|
|
320
|
+
/** Request human signoff for a receipt that requires approval. */
|
|
321
|
+
async requestSignoff(params) {
|
|
322
|
+
return this.request('POST', '/api/v1/signoffs/request', {
|
|
323
|
+
receipt_id: params.receiptId,
|
|
324
|
+
approver_id: params.approverId,
|
|
325
|
+
expires_in_minutes: params.expiresInMinutes,
|
|
326
|
+
comment: params.comment,
|
|
327
|
+
}, true);
|
|
328
|
+
}
|
|
329
|
+
/** Consume a receipt before mutation. If this fails, do not execute the write. */
|
|
330
|
+
async consumeTrustReceipt(receiptId, params) {
|
|
331
|
+
return this.request('POST', `/api/v1/trust-receipts/${encodeURIComponent(receiptId)}/consume`, {
|
|
332
|
+
action_hash: params.actionHash,
|
|
333
|
+
executing_system: params.executingSystem,
|
|
334
|
+
execution_reference_id: params.executionReferenceId,
|
|
335
|
+
}, true);
|
|
336
|
+
}
|
|
337
|
+
/** Emit the post-mutation execution attestation bound to the consumed receipt. */
|
|
338
|
+
async attestExecution(receiptId, params) {
|
|
339
|
+
return this.request('POST', `/api/v1/trust-receipts/${encodeURIComponent(receiptId)}/execution`, {
|
|
340
|
+
executed_action: params.executedAction,
|
|
341
|
+
executing_system: params.executingSystem,
|
|
342
|
+
execution_id: params.executionId,
|
|
343
|
+
executed_at: params.executedAt,
|
|
344
|
+
}, true);
|
|
345
|
+
}
|
|
346
|
+
/** Fetch the signed evidence packet, when the receipt is in a signable state. */
|
|
347
|
+
async getTrustReceiptEvidence(receiptId) {
|
|
348
|
+
return this.request('GET', `/api/v1/trust-receipts/${encodeURIComponent(receiptId)}/evidence`, undefined, true);
|
|
117
349
|
}
|
|
118
350
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*/
|
|
122
|
-
async getLeaderboard(options) {
|
|
123
|
-
const params = new URLSearchParams();
|
|
124
|
-
if (options?.limit)
|
|
125
|
-
params.set('limit', Math.min(options.limit, 50).toString());
|
|
126
|
-
if (options?.entityType)
|
|
127
|
-
params.set('type', options.entityType);
|
|
128
|
-
return this.request(`/api/leaderboard?${params}`);
|
|
129
|
-
}
|
|
130
|
-
// ---------------------------------------------------------------------------
|
|
131
|
-
// Convenience methods
|
|
132
|
-
// ---------------------------------------------------------------------------
|
|
133
|
-
/**
|
|
134
|
-
* Check if an entity meets a minimum trust threshold.
|
|
135
|
-
* Returns true if the entity's score >= minScore.
|
|
351
|
+
* Wrap a dangerous mutation in the v1 receipt lifecycle.
|
|
352
|
+
* The mutation runs only after create + consume succeed.
|
|
136
353
|
*/
|
|
137
|
-
async
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
354
|
+
async requireReceipt(params, mutate) {
|
|
355
|
+
const receipt = await this.createTrustReceipt(params);
|
|
356
|
+
if (receipt.decision === 'deny' || receipt.receipt_status === 'denied') {
|
|
357
|
+
throw new EPError('EMILIA denied the action before execution', 403, 'receipt_denied');
|
|
141
358
|
}
|
|
142
|
-
|
|
143
|
-
|
|
359
|
+
let signoff;
|
|
360
|
+
if (receipt.signoff_required) {
|
|
361
|
+
if (!params.approverId && !params.quorumPolicy) {
|
|
362
|
+
throw new EPError('Receipt requires signoff; pass approverId or quorumPolicy', 409, 'missing_approver_id');
|
|
363
|
+
}
|
|
364
|
+
signoff = await this.requestSignoff({
|
|
365
|
+
receiptId: receipt.receipt_id,
|
|
366
|
+
approverId: params.approverId,
|
|
367
|
+
expiresInMinutes: params.signoffExpiresInMinutes,
|
|
368
|
+
comment: params.signoffComment,
|
|
369
|
+
});
|
|
370
|
+
if (!params.onSignoffRequired) {
|
|
371
|
+
throw new EPError('Receipt requires human signoff before the mutation can run', 409, 'signoff_required');
|
|
372
|
+
}
|
|
373
|
+
const signoffResult = await params.onSignoffRequired({ client: this, receipt, signoff });
|
|
374
|
+
if (signoffResult === false || (typeof signoffResult === 'object' && signoffResult?.approved === false)) {
|
|
375
|
+
throw new EPError('Human signoff was not approved', 403, 'signoff_rejected');
|
|
376
|
+
}
|
|
144
377
|
}
|
|
378
|
+
const consume = await this.consumeTrustReceipt(receipt.receipt_id, {
|
|
379
|
+
actionHash: receipt.action_hash,
|
|
380
|
+
executingSystem: params.executingSystem,
|
|
381
|
+
executionReferenceId: params.executionReferenceId,
|
|
382
|
+
});
|
|
383
|
+
const result = await mutate({ receipt, consume });
|
|
384
|
+
const executedAction = typeof params.executedAction === 'function'
|
|
385
|
+
? params.executedAction({ receipt, result })
|
|
386
|
+
: params.executedAction ?? receipt.canonical_action;
|
|
387
|
+
const executionId = typeof params.executionId === 'function'
|
|
388
|
+
? params.executionId(result)
|
|
389
|
+
: params.executionId;
|
|
390
|
+
const execution = await this.attestExecution(receipt.receipt_id, {
|
|
391
|
+
executedAction,
|
|
392
|
+
executingSystem: params.executingSystem,
|
|
393
|
+
executionId,
|
|
394
|
+
});
|
|
395
|
+
const evidence = params.fetchEvidence
|
|
396
|
+
? await this.getTrustReceiptEvidence(receipt.receipt_id)
|
|
397
|
+
: undefined;
|
|
398
|
+
return { result, receipt, signoff, consume, execution, evidence };
|
|
145
399
|
}
|
|
146
|
-
/**
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const result = await this.submitReceipt(input);
|
|
152
|
-
return {
|
|
153
|
-
...result,
|
|
154
|
-
still_trusted: result.entity_score.emilia_score >= minScore,
|
|
400
|
+
/** Wrap an existing async function with requireReceipt(). */
|
|
401
|
+
withReceipt(params, mutate) {
|
|
402
|
+
return async (...args) => {
|
|
403
|
+
const resolved = typeof params === 'function' ? params(...args) : params;
|
|
404
|
+
return this.requireReceipt(resolved, () => mutate(...args));
|
|
155
405
|
};
|
|
156
406
|
}
|
|
407
|
+
// ------------------------------------------------------------------
|
|
408
|
+
// Signoff extension
|
|
409
|
+
// ------------------------------------------------------------------
|
|
410
|
+
/** Issue a signoff challenge for an entity. */
|
|
411
|
+
async issueChallenge(params) {
|
|
412
|
+
return this.request('POST', '/api/signoff/challenge', {
|
|
413
|
+
entity_id: params.entityId,
|
|
414
|
+
scope: params.scope,
|
|
415
|
+
context: params.context,
|
|
416
|
+
}, true);
|
|
417
|
+
}
|
|
418
|
+
/** Attest to a signoff challenge with a cryptographic signature. */
|
|
419
|
+
async attest(challengeId, params) {
|
|
420
|
+
return this.request('POST', `/api/signoff/${encodeURIComponent(challengeId)}/attest`, params, true);
|
|
421
|
+
}
|
|
422
|
+
/** Deny a signoff challenge with an optional reason. */
|
|
423
|
+
async denyChallenge(challengeId, reason) {
|
|
424
|
+
return this.request('POST', `/api/signoff/${encodeURIComponent(challengeId)}/deny`, reason !== undefined ? { reason } : undefined, true);
|
|
425
|
+
}
|
|
426
|
+
/** Revoke a previously granted signoff. */
|
|
427
|
+
async revokeSignoff(challengeId, options) {
|
|
428
|
+
return this.request('POST', `/api/signoff/${encodeURIComponent(challengeId)}/revoke`, options, true);
|
|
429
|
+
}
|
|
430
|
+
/** Consume a signoff -- mark it as used for a specific action. */
|
|
431
|
+
async consumeSignoff(signoffId, params) {
|
|
432
|
+
return this.request('POST', `/api/signoff/${encodeURIComponent(signoffId)}/consume`, params, true);
|
|
433
|
+
}
|
|
434
|
+
// ------------------------------------------------------------------
|
|
435
|
+
// Delegation
|
|
436
|
+
// ------------------------------------------------------------------
|
|
437
|
+
/** Create a trust delegation from one entity to another. */
|
|
438
|
+
async createDelegation(params) {
|
|
439
|
+
return this.request('POST', '/api/delegation', {
|
|
440
|
+
delegatorId: params.delegatorId,
|
|
441
|
+
delegateeId: params.delegateeId,
|
|
442
|
+
scope: params.scope,
|
|
443
|
+
policyId: params.policyId,
|
|
444
|
+
constraints: params.constraints,
|
|
445
|
+
expiresAt: params.expiresAt,
|
|
446
|
+
}, true);
|
|
447
|
+
}
|
|
448
|
+
/** Verify the validity of an existing delegation. */
|
|
449
|
+
async verifyDelegation(delegationId) {
|
|
450
|
+
return this.request('POST', `/api/delegation/${encodeURIComponent(delegationId)}/verify`, undefined, true);
|
|
451
|
+
}
|
|
452
|
+
// ------------------------------------------------------------------
|
|
453
|
+
// Commit
|
|
454
|
+
// ------------------------------------------------------------------
|
|
455
|
+
/** Issue a trust commit binding a handshake to a specific action. */
|
|
456
|
+
async issueCommit(params) {
|
|
457
|
+
return this.request('POST', '/api/commit', {
|
|
458
|
+
handshakeId: params.handshakeId,
|
|
459
|
+
action: params.action,
|
|
460
|
+
payload: params.payload,
|
|
461
|
+
binding: params.binding,
|
|
462
|
+
}, true);
|
|
463
|
+
}
|
|
464
|
+
/** Verify a previously issued commit. */
|
|
465
|
+
async verifyCommit(commitId) {
|
|
466
|
+
return this.request('POST', `/api/commit/${encodeURIComponent(commitId)}/verify`, undefined, true);
|
|
467
|
+
}
|
|
468
|
+
// ------------------------------------------------------------------
|
|
469
|
+
// Eye — Observation & Advisory
|
|
470
|
+
// ------------------------------------------------------------------
|
|
471
|
+
/** Record a behavioral or contextual observation for the Eye subsystem. */
|
|
472
|
+
async recordObservation(params) {
|
|
473
|
+
return this.request('POST', '/api/eye/observations', params, true);
|
|
474
|
+
}
|
|
475
|
+
/** Check an action against recorded observations and return an advisory. */
|
|
476
|
+
async checkAction(params) {
|
|
477
|
+
return this.request('POST', '/api/eye/check', params, true);
|
|
478
|
+
}
|
|
479
|
+
/** Retrieve an existing advisory by ID. */
|
|
480
|
+
async getAdvisory(advisoryId) {
|
|
481
|
+
return this.request('GET', `/api/eye/advisories/${encodeURIComponent(advisoryId)}`, undefined, true);
|
|
482
|
+
}
|
|
483
|
+
/** Create a suppression to exclude a reason code from future advisories. */
|
|
484
|
+
async createSuppression(params) {
|
|
485
|
+
return this.request('POST', '/api/eye/suppressions', params, true);
|
|
486
|
+
}
|
|
157
487
|
}
|
|
158
|
-
|
|
159
|
-
export default EmiliaClient;
|
|
488
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAirBvF,8EAA8E;AAE9E,MAAM,OAAO,OAAQ,SAAQ,KAAK;IAGd;IACA;IAHlB,YACE,OAAe,EACC,MAAe,EACf,IAAa;QAE7B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,WAAM,GAAN,MAAM,CAAS;QACf,SAAI,GAAJ,IAAI,CAAS;QAG7B,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;QACtB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;CACF;AAED,8EAA8E;AAE9E,MAAM,OAAO,aAAa;IAEK;IAD7B,gBAAgB;IAChB,YAA6B,QAAyF;QAAzF,aAAQ,GAAR,QAAQ,CAAiF;IAAG,CAAC;IAE1H,6EAA6E;IAC7E,KAAK,CAAC,kBAAkB,CAAC,OAAwB;QAC/C,MAAM,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC,QAAQ,CAA0B,KAAK,EAAE,8BAA8B,EAAE,EAAE,EAAE,SAA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