@emilia-protocol/sdk 0.1.0 → 0.9.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.
@@ -0,0 +1,508 @@
1
+ /** Every recognizable entity category in EP. */
2
+ export type EntityType = 'agent' | 'merchant' | 'service_provider' | 'github_app' | 'github_action' | 'mcp_server' | 'npm_package' | 'chrome_extension' | 'shopify_app' | 'marketplace_plugin' | 'agent_tool';
3
+ /** Observable behavioral outcomes — the strongest Phase 1 signal. */
4
+ export type AgentBehavior = 'completed' | 'retried_same' | 'retried_different' | 'abandoned' | 'disputed';
5
+ /** Categories of transactions that can generate receipts. */
6
+ export type TransactionType = 'purchase' | 'service' | 'task_completion' | 'delivery' | 'return';
7
+ /** Named trust policy families. */
8
+ export type TrustPolicy = 'strict' | 'standard' | 'permissive' | 'discovery' | 'github_private_repo_safe_v1' | 'npm_buildtime_safe_v1' | 'browser_extension_safe_v1' | 'mcp_server_safe_v1';
9
+ /** The action output of a trust gate evaluation. */
10
+ export type TrustDecision = 'allow' | 'review' | 'deny';
11
+ /** Lifecycle states of an EP Commit. */
12
+ export type CommitStatus = 'active' | 'revoked' | 'expired' | 'fulfilled';
13
+ /** Action types for EP Commit. */
14
+ export type ActionType = 'install' | 'connect' | 'delegate' | 'transact';
15
+ /** Recognized grounds for filing a dispute. */
16
+ export type DisputeReason = 'fraudulent_receipt' | 'inaccurate_signals' | 'identity_dispute' | 'context_mismatch' | 'duplicate_transaction' | 'coerced_receipt' | 'other';
17
+ /** Lifecycle states of a dispute. */
18
+ export type DisputeStatus = 'pending' | 'responded' | 'under_review' | 'upheld' | 'reversed' | 'dismissed';
19
+ /** Trust domains for domain-specific scoring (EP domain scores). */
20
+ export type TrustDomain = 'financial' | 'code_execution' | 'communication' | 'delegation' | 'infrastructure' | 'content_creation' | 'data_access';
21
+ /** Report classification for human trust reports. */
22
+ export type ReportType = 'wrongly_downgraded' | 'harmed_by_trusted_entity' | 'fraudulent_entity' | 'inaccurate_profile' | 'other';
23
+ /** Confidence tiers in order of increasing evidence strength. */
24
+ export type ConfidenceTier = 'pending' | 'insufficient' | 'provisional' | 'emerging' | 'confident';
25
+ /**
26
+ * Optional context passed to trust evaluations.
27
+ * All fields are optional — supply only what is relevant to the action.
28
+ */
29
+ export interface TrustContext {
30
+ /** Broad task category, e.g. "data_analysis", "payment", "code_review" */
31
+ task_type?: string;
32
+ /** Merchant/product category, e.g. "furniture", "software", "grocery" */
33
+ category?: string;
34
+ /** ISO 3166-1 alpha-2 or sub-region, e.g. "US", "US-CA", "EU" */
35
+ geo?: string;
36
+ /** Interaction channel, e.g. "api", "chat", "browser" */
37
+ modality?: string;
38
+ /** Transaction value bucket, e.g. "low", "medium", "high", "enterprise" */
39
+ value_band?: string;
40
+ /** Risk class label for regulated contexts */
41
+ risk_class?: string;
42
+ /** Install-specific context fields */
43
+ host?: string;
44
+ install_scope?: string;
45
+ permission_class?: string;
46
+ data_sensitivity?: string;
47
+ execution_mode?: string;
48
+ [key: string]: string | undefined;
49
+ }
50
+ /** Structured boolean claims attached to a receipt. */
51
+ export interface ReceiptClaims {
52
+ /** Was the item or result delivered? */
53
+ delivered?: boolean;
54
+ /** Was it delivered on time? */
55
+ on_time?: boolean;
56
+ /** Was the originally stated price honored? */
57
+ price_honored?: boolean;
58
+ /** Did the result match the description? */
59
+ as_described?: boolean;
60
+ [key: string]: boolean | undefined;
61
+ }
62
+ /** Aggregate behavioral rates derived from receipt history. */
63
+ export interface BehavioralProfile {
64
+ /** Percentage of interactions that completed successfully (0-100) */
65
+ completion_rate?: number;
66
+ /** Percentage that required retry with the same approach (0-100) */
67
+ retry_rate?: number;
68
+ /** Percentage abandoned before completion (0-100) */
69
+ abandon_rate?: number;
70
+ /** Percentage that resulted in a dispute (0-100) */
71
+ dispute_rate?: number;
72
+ }
73
+ /** Quality-weighted signal averages across receipt dimensions. */
74
+ export interface SignalProfile {
75
+ /** Weighted average delivery accuracy score (0-100) */
76
+ delivery_accuracy?: number;
77
+ /** Weighted average product/result accuracy score (0-100) */
78
+ product_accuracy?: number;
79
+ /** Weighted average price integrity score (0-100) */
80
+ price_integrity?: number;
81
+ /** Weighted average return/resolution processing score (0-100) */
82
+ return_processing?: number;
83
+ /** Cross-submitter signal consistency (0-1) */
84
+ consistency?: number;
85
+ }
86
+ /** Breakdown of receipt provenance by verification tier. */
87
+ export interface ProvenanceProfile {
88
+ /** Map of tier name → fractional share (e.g. { bilateral: 0.6, self_attested: 0.4 }) */
89
+ breakdown: Record<string, number>;
90
+ /** Proportion of receipts with bilateral confirmation (0-100) */
91
+ bilateral_rate?: number;
92
+ }
93
+ /** The nested trust profile returned inside EntityTrustProfile. */
94
+ export interface TrustProfile {
95
+ behavioral?: BehavioralProfile;
96
+ signals?: SignalProfile;
97
+ /** Overall cross-submitter consistency score (0-1) */
98
+ consistency?: number;
99
+ provenance?: ProvenanceProfile;
100
+ }
101
+ /** Summary of dispute activity attached to an entity's profile. */
102
+ export interface DisputeSummary {
103
+ /** Total disputes ever filed */
104
+ total: number;
105
+ /** Currently open disputes */
106
+ active: number;
107
+ /** Disputes decided in favor of the disputer */
108
+ reversed: number;
109
+ }
110
+ /** Anomaly detection result surfaced on a trust profile. */
111
+ export interface AnomalyAlert {
112
+ /** Anomaly classification, e.g. "sudden_drop", "burst_receipts" */
113
+ type: string;
114
+ /** Magnitude of the change in score/confidence */
115
+ delta: number;
116
+ /** Human-readable alert message */
117
+ alert: string;
118
+ }
119
+ /** Full trust profile for an entity — the canonical EP read surface. */
120
+ export interface EntityTrustProfile {
121
+ entity_id: string;
122
+ display_name: string;
123
+ entity_type: EntityType;
124
+ /** Current confidence tier based on quality-gated evidence */
125
+ current_confidence: ConfidenceTier;
126
+ /** Whether the entity has established historical evidence */
127
+ historical_establishment: boolean;
128
+ /** Quality-gated effective evidence count for current window */
129
+ effective_evidence_current: number;
130
+ /** Quality-gated effective evidence count for historical window */
131
+ effective_evidence_historical: number;
132
+ /** Raw receipt count (all time) */
133
+ receipt_count?: number;
134
+ /** Number of distinct entities that have submitted receipts */
135
+ unique_submitters?: number;
136
+ /** Nested behavioral, signal, consistency, and provenance data */
137
+ trust_profile?: TrustProfile;
138
+ /** Dispute summary */
139
+ disputes?: DisputeSummary;
140
+ /** Present only when an anomaly is detected */
141
+ anomaly?: AnomalyAlert;
142
+ /** Legacy 0-100 compatibility score — use trust_profile for decisions */
143
+ compat_score: number;
144
+ }
145
+ /** Result of evaluating an entity against a named trust policy. */
146
+ export interface TrustEvaluation {
147
+ entity_id: string;
148
+ display_name: string;
149
+ /** The policy that was applied */
150
+ policy_used: string;
151
+ /** Canonical trust decision — the primary evaluation field */
152
+ decision: 'allow' | 'review' | 'deny';
153
+ /**
154
+ * @deprecated Derived compatibility field — use `decision` instead.
155
+ * Equivalent to `decision === 'allow'`.
156
+ */
157
+ pass: boolean;
158
+ confidence: ConfidenceTier;
159
+ /** Context key used for context-aware evaluation */
160
+ context_used?: TrustContext;
161
+ /** Human-readable reasons for the decision */
162
+ reasons: string[];
163
+ /** Specific failure reasons (non-empty when decision !== 'allow') */
164
+ failures?: string[];
165
+ /** Non-blocking warnings */
166
+ warnings?: string[];
167
+ /** URL path for disputes/appeals */
168
+ appeal_path: string;
169
+ }
170
+ /** A single receipt record. */
171
+ export interface Receipt {
172
+ receipt_id: string;
173
+ entity_id: string;
174
+ /** SHA-256 hash of the canonical receipt payload */
175
+ receipt_hash: string;
176
+ transaction_ref: string;
177
+ transaction_type: TransactionType;
178
+ agent_behavior?: AgentBehavior;
179
+ /** ISO 8601 creation timestamp */
180
+ created_at: string;
181
+ /** Whether this receipt has been anchored to a Merkle root */
182
+ anchored?: boolean;
183
+ /** Whether the Merkle proof verified successfully */
184
+ verified?: boolean;
185
+ }
186
+ /** Input shape for submitting a single receipt. */
187
+ export interface SubmitReceiptInput {
188
+ /** Entity this receipt is about */
189
+ entity_id: string;
190
+ /** External transaction ID — required, must be unique per entity */
191
+ transaction_ref: string;
192
+ transaction_type: TransactionType;
193
+ /** Observable behavioral outcome — the strongest EP signal */
194
+ agent_behavior?: AgentBehavior;
195
+ /** Delivery accuracy score 0-100 */
196
+ delivery_accuracy?: number;
197
+ /** Product/result accuracy score 0-100 */
198
+ product_accuracy?: number;
199
+ /** Price integrity score 0-100 */
200
+ price_integrity?: number;
201
+ /** Return/resolution processing score 0-100 */
202
+ return_processing?: number;
203
+ /** Structured boolean claims */
204
+ claims?: ReceiptClaims;
205
+ /** Freeform supporting evidence references */
206
+ evidence?: Record<string, unknown>;
207
+ /** Context for context-aware trust scoring */
208
+ context?: TrustContext;
209
+ }
210
+ /** Response from submitting a single receipt. */
211
+ export interface SubmitReceiptResult {
212
+ receipt: Receipt;
213
+ }
214
+ /** Entity summary returned from search results. */
215
+ export interface EntitySearchResult {
216
+ entity_id: string;
217
+ display_name: string;
218
+ entity_type: EntityType;
219
+ confidence?: ConfidenceTier;
220
+ effective_evidence?: number;
221
+ }
222
+ /** A single dispute record. */
223
+ export interface Dispute {
224
+ dispute_id: string;
225
+ receipt_id: string;
226
+ status: DisputeStatus;
227
+ reason: DisputeReason;
228
+ description?: string;
229
+ /** Party that filed the dispute */
230
+ filed_by?: {
231
+ display_name: string;
232
+ };
233
+ filed_by_type?: string;
234
+ /** Entity the dispute is about */
235
+ entity?: {
236
+ entity_id: string;
237
+ display_name: string;
238
+ };
239
+ /** Response from the receipt submitter */
240
+ response?: string;
241
+ /** Resolution decision: "upheld" | "reversed" | "dismissed" */
242
+ resolution?: string;
243
+ /** Rationale for the resolution */
244
+ resolution_rationale?: string;
245
+ /** ISO 8601 deadline for the respondent to reply */
246
+ response_deadline?: string;
247
+ }
248
+ /** A single entry in the entity leaderboard. */
249
+ export interface LeaderboardEntry {
250
+ rank: number;
251
+ entity_id: string;
252
+ display_name: string;
253
+ entity_type: EntityType;
254
+ confidence?: ConfidenceTier;
255
+ }
256
+ /** Result of a pre-action trust gate check. */
257
+ export interface TrustGateResult {
258
+ entity_id: string;
259
+ /** The action that was checked */
260
+ action: string;
261
+ /** Gate decision */
262
+ decision: TrustDecision;
263
+ /** Policy applied */
264
+ policy_used: string;
265
+ confidence: ConfidenceTier;
266
+ /** Whether a delegation was verified as part of this check */
267
+ delegation_verified?: boolean;
268
+ /** Reasons for the decision (especially useful for non-allow decisions) */
269
+ reasons?: string[];
270
+ /** Path to appeal a deny decision */
271
+ appeal_path?: string;
272
+ }
273
+ /** A delegation record authorizing an agent to act for a principal. */
274
+ export interface DelegationRecord {
275
+ delegation_id: string;
276
+ /** The authorizing principal's ID */
277
+ principal_id: string;
278
+ /** The EP entity ID of the authorized agent */
279
+ agent_entity_id: string;
280
+ /** Action scope details (structured object, not array) */
281
+ scope: Record<string, unknown>;
282
+ /** Maximum permitted transaction value in USD */
283
+ max_value_usd?: number;
284
+ /** ISO 8601 expiry timestamp */
285
+ expires_at: string;
286
+ status: 'active' | 'expired' | 'revoked';
287
+ /** Additional structured constraints on the delegation */
288
+ constraints?: Record<string, unknown>;
289
+ }
290
+ /** Domain-specific trust score for a single domain. */
291
+ export interface DomainScore {
292
+ confidence?: ConfidenceTier;
293
+ evidence_count?: number;
294
+ completion_rate?: number;
295
+ dispute_rate?: number;
296
+ }
297
+ /** Domain-specific trust scores for an entity across multiple domains. */
298
+ export interface DomainScoreResult {
299
+ entity_id: string;
300
+ domains: Partial<Record<TrustDomain, DomainScore>>;
301
+ }
302
+ /** Result of a software pre-action enforcement check (experimental). */
303
+ export interface InstallPreflightResult {
304
+ entity_id: string;
305
+ display_name: string;
306
+ /** Install decision */
307
+ decision: 'allow' | 'review' | 'deny';
308
+ policy_used: string;
309
+ confidence: ConfidenceTier;
310
+ /** Reasons for the decision */
311
+ reasons?: string[];
312
+ /** Publisher and provenance metadata */
313
+ software_meta?: {
314
+ publisher_verified: boolean;
315
+ provenance_verified: boolean;
316
+ permission_class?: string;
317
+ };
318
+ /** Legacy compatibility score — prefer decision field */
319
+ score: number;
320
+ }
321
+ /** A principal — the enduring actor behind one or more entities. */
322
+ export interface Principal {
323
+ principal_id: string;
324
+ display_name: string;
325
+ principal_type: string;
326
+ status: string;
327
+ bootstrap_verified?: boolean;
328
+ }
329
+ /** Full principal lookup result including controlled entities and bindings. */
330
+ export interface PrincipalLookupResult {
331
+ principal: Principal;
332
+ /** EP entities controlled by this principal */
333
+ entities?: Array<{
334
+ entity_id: string;
335
+ display_name: string;
336
+ entity_type: EntityType;
337
+ }>;
338
+ /** Verified identity bindings (e.g. GitHub org, domain) */
339
+ bindings?: Array<{
340
+ binding_type: string;
341
+ binding_target: string;
342
+ status: string;
343
+ provenance: string;
344
+ }>;
345
+ /** History of identity continuity claims made by or about this principal */
346
+ continuity_claims?: Array<{
347
+ old_entity_id: string;
348
+ new_entity_id: string;
349
+ reason: string;
350
+ status: string;
351
+ }>;
352
+ }
353
+ /** Entity lineage — predecessor and successor relationships. */
354
+ export interface LineageResult {
355
+ entity_id: string;
356
+ predecessors?: Array<{
357
+ from: string;
358
+ reason: string;
359
+ status: string;
360
+ transfer_policy?: string;
361
+ }>;
362
+ successors?: Array<{
363
+ to: string;
364
+ reason: string;
365
+ status: string;
366
+ transfer_policy?: string;
367
+ }>;
368
+ }
369
+ /** Result of a batch receipt submission. */
370
+ export interface BatchReceiptResult {
371
+ results: Array<{
372
+ entity_id: string;
373
+ success: boolean;
374
+ receipt_id?: string;
375
+ error?: string;
376
+ }>;
377
+ }
378
+ /** Result of a bilateral receipt confirmation. */
379
+ export interface ConfirmReceiptResult {
380
+ receipt_id: string;
381
+ confirmed: boolean;
382
+ recorded_at: string;
383
+ }
384
+ /** A trust policy as returned from the policy registry. */
385
+ export interface TrustPolicyDefinition {
386
+ name: string;
387
+ family: string;
388
+ description: string;
389
+ min_confidence?: ConfidenceTier;
390
+ }
391
+ /** Public proof metrics from /api/stats. */
392
+ export interface EPStats {
393
+ total_entities: number;
394
+ trust_surfaces: number;
395
+ automated_checks: number;
396
+ trust_policies: number;
397
+ mcp_tools: number;
398
+ }
399
+ /** Request shape for issuing an EP Commit. */
400
+ export interface EPCommitRequest {
401
+ action_type: ActionType;
402
+ entity_id: string;
403
+ principal_id?: string;
404
+ counterparty_entity_id?: string;
405
+ delegation_id?: string;
406
+ scope?: Record<string, unknown>;
407
+ max_value_usd?: number;
408
+ context?: Record<string, unknown>;
409
+ policy?: string;
410
+ }
411
+ /** A signed EP Commit — the pre-action commitment record. */
412
+ export interface EPCommit {
413
+ commit_id: string;
414
+ action_type: ActionType;
415
+ entity_id: string;
416
+ principal_id?: string;
417
+ counterparty_entity_id?: string;
418
+ delegation_id?: string;
419
+ scope?: Record<string, unknown>;
420
+ max_value_usd?: number;
421
+ context?: Record<string, unknown>;
422
+ policy?: string;
423
+ decision: TrustDecision;
424
+ status: CommitStatus;
425
+ expires_at: string;
426
+ created_at: string;
427
+ receipt_id?: string;
428
+ appeal_path?: string;
429
+ signature?: string;
430
+ }
431
+ /** Result of verifying an EP Commit. Minimum disclosure — no scope, entity_id, or action_type. */
432
+ export interface EPCommitVerification {
433
+ valid: boolean;
434
+ status: CommitStatus;
435
+ decision: TrustDecision;
436
+ expires_at?: string;
437
+ reasons: string[];
438
+ }
439
+ /** Response from issuing an EP Commit. */
440
+ export interface EPCommitIssueResult {
441
+ decision: TrustDecision;
442
+ commit: EPCommit;
443
+ }
444
+ /** Response from getting an EP Commit's status. */
445
+ export interface EPCommitStatusResult {
446
+ commit: EPCommit;
447
+ }
448
+ /** Response from revoking an EP Commit. */
449
+ export interface EPCommitRevokeResult {
450
+ commit_id: string;
451
+ status: 'revoked';
452
+ revoked_at: string;
453
+ }
454
+ /** Response from binding a receipt to an EP Commit. */
455
+ export interface EPCommitReceiptResult {
456
+ commit_id: string;
457
+ status: 'fulfilled';
458
+ receipt_id: string;
459
+ }
460
+ /** Configuration options for EPClient. */
461
+ export interface EPClientOptions {
462
+ /**
463
+ * EP API base URL.
464
+ * Defaults to https://emiliaprotocol.ai.
465
+ * Can also be set via the EP_BASE_URL environment variable.
466
+ */
467
+ baseUrl?: string;
468
+ /**
469
+ * EP API key (ep_live_...).
470
+ * Required for authenticated endpoints (submitReceipt, fileDispute, etc.).
471
+ * Can also be set via the EP_API_KEY environment variable.
472
+ */
473
+ apiKey?: string;
474
+ /**
475
+ * Request timeout in milliseconds.
476
+ * Defaults to 30000 (30 seconds).
477
+ */
478
+ timeout?: number;
479
+ /**
480
+ * Custom fetch implementation.
481
+ * Useful for testing or environments without native fetch.
482
+ */
483
+ fetchImpl?: typeof fetch;
484
+ }
485
+ /**
486
+ * Thrown when the EP API returns a non-2xx response or a network error occurs.
487
+ *
488
+ * @example
489
+ * try {
490
+ * await ep.trustProfile('unknown-entity');
491
+ * } catch (err) {
492
+ * if (err instanceof EPError && err.status === 404) {
493
+ * console.log('Entity not found');
494
+ * }
495
+ * }
496
+ */
497
+ export declare class EPError extends Error {
498
+ /** HTTP status code, if available */
499
+ readonly status?: number | undefined;
500
+ /** API-level error code, if provided */
501
+ readonly code?: string | undefined;
502
+ constructor(message: string,
503
+ /** HTTP status code, if available */
504
+ status?: number | undefined,
505
+ /** API-level error code, if provided */
506
+ code?: string | undefined);
507
+ }
508
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAQA,gDAAgD;AAChD,MAAM,MAAM,UAAU,GAClB,OAAO,GACP,UAAU,GACV,kBAAkB,GAClB,YAAY,GACZ,eAAe,GACf,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,aAAa,GACb,oBAAoB,GACpB,YAAY,CAAC;AAEjB,qEAAqE;AACrE,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,cAAc,GACd,mBAAmB,GACnB,WAAW,GACX,UAAU,CAAC;AAEf,6DAA6D;AAC7D,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,UAAU,GACV,QAAQ,CAAC;AAEb,mCAAmC;AACnC,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,UAAU,GACV,YAAY,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;aACrB,MAAM,CAAC,EAAE,MAAM;IAC/B,wCAAwC;aACxB,IAAI,CAAC,EAAE,MAAM;gBAJ7B,OAAO,EAAE,MAAM;IACf,qCAAqC;IACrB,MAAM,CAAC,EAAE,MAAM,YAAA;IAC/B,wCAAwC;IACxB,IAAI,CAAC,EAAE,MAAM,YAAA;CAOhC"}
package/dist/types.js ADDED
@@ -0,0 +1,35 @@
1
+ // ============================================================================
2
+ // EMILIA Protocol — TypeScript Type Definitions
3
+ // ============================================================================
4
+ // ----------------------------------------------------------------------------
5
+ // Error class
6
+ // ----------------------------------------------------------------------------
7
+ /**
8
+ * Thrown when the EP API returns a non-2xx response or a network error occurs.
9
+ *
10
+ * @example
11
+ * try {
12
+ * await ep.trustProfile('unknown-entity');
13
+ * } catch (err) {
14
+ * if (err instanceof EPError && err.status === 404) {
15
+ * console.log('Entity not found');
16
+ * }
17
+ * }
18
+ */
19
+ export class EPError extends Error {
20
+ status;
21
+ code;
22
+ constructor(message,
23
+ /** HTTP status code, if available */
24
+ status,
25
+ /** API-level error code, if provided */
26
+ code) {
27
+ super(message);
28
+ this.status = status;
29
+ this.code = code;
30
+ this.name = 'EPError';
31
+ // Maintain proper prototype chain in environments targeting ES5
32
+ Object.setPrototypeOf(this, new.target.prototype);
33
+ }
34
+ }
35
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,gDAAgD;AAChD,+EAA+E;AAgmB/E,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK;IAId;IAEA;IALlB,YACE,OAAe;IACf,qCAAqC;IACrB,MAAe;IAC/B,wCAAwC;IACxB,IAAa;QAE7B,KAAK,CAAC,OAAO,CAAC,CAAC;QAJC,WAAM,GAAN,MAAM,CAAS;QAEf,SAAI,GAAJ,IAAI,CAAS;QAG7B,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;QACtB,gEAAgE;QAChE,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;CACF"}
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@emilia-protocol/sdk",
3
- "version": "0.1.0",
4
- "description": "TypeScript SDK for EMILIA Protocol (EP) the trust layer for agentic commerce.",
5
- "license": "Apache-2.0",
3
+ "version": "0.9.0",
4
+ "description": "Minimal TypeScript SDK for the EMILIA Protocol — 5 core endpoints + signoff.",
6
5
  "type": "module",
7
6
  "main": "dist/index.js",
8
7
  "types": "dist/index.d.ts",
@@ -12,22 +11,40 @@
12
11
  "types": "./dist/index.d.ts"
13
12
  }
14
13
  },
15
- "files": ["dist", "README.md"],
14
+ "files": [
15
+ "dist",
16
+ "src",
17
+ "README.md"
18
+ ],
19
+ "sideEffects": false,
16
20
  "scripts": {
17
- "build": "tsc",
18
- "prepublishOnly": "npm run build"
21
+ "build": "tsc -p tsconfig.json",
22
+ "clean": "rm -rf dist",
23
+ "prepare": "npm run clean && npm run build",
24
+ "typecheck": "tsc --noEmit",
25
+ "test": "vitest run"
19
26
  },
20
- "devDependencies": {
21
- "typescript": "^5.5.0"
27
+ "engines": {
28
+ "node": ">=18"
22
29
  },
23
30
  "keywords": [
24
- "emilia", "trust", "reputation", "ai-agents", "agentic-commerce",
25
- "mcp", "a2a", "ucp", "receipts"
31
+ "trust",
32
+ "ai-agents",
33
+ "emilia-protocol",
34
+ "handshake",
35
+ "trust-gate",
36
+ "signoff"
26
37
  ],
38
+ "license": "Apache-2.0",
27
39
  "repository": {
28
40
  "type": "git",
29
41
  "url": "https://github.com/emiliaprotocol/emilia-protocol",
30
42
  "directory": "sdks/typescript"
31
43
  },
32
- "homepage": "https://emiliaprotocol.ai"
44
+ "homepage": "https://emiliaprotocol.ai",
45
+ "devDependencies": {
46
+ "@types/node": "^25.6.0",
47
+ "typescript": "^6.0.3",
48
+ "vitest": "^4.1.5"
49
+ }
33
50
  }