@kvell007/embed-labs-protocol 0.1.0-alpha.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 ADDED
@@ -0,0 +1,81 @@
1
+ # @embed-labs/protocol
2
+
3
+ Shared TypeScript contracts for Embed Labs Cloud clients, services, the CLI,
4
+ and the local bridge.
5
+
6
+ ## Package Status
7
+
8
+ This package is a publish candidate, but it is not ready for public npm publish
9
+ yet. The workspace manifest intentionally remains marked `private: true` until
10
+ package names, license, npm scope ownership, support URLs, and release approval
11
+ are complete.
12
+
13
+ ## What It Provides
14
+
15
+ - API success and failure envelopes.
16
+ - Cloud task, project, event, artifact, and validation evidence contracts.
17
+ - Server build template, workspace, resource lease, and execution mode
18
+ contracts.
19
+ - Local bridge device, serial, probe, job, approval, and flash plan contracts.
20
+ - Board Pack manifest and validation matrix types.
21
+ - Small `ok()` and `fail()` helpers for consistent API responses.
22
+
23
+ The package is types-first and has no direct hardware, network, filesystem, or
24
+ process side effects.
25
+
26
+ ## Install
27
+
28
+ After the package is approved for public release:
29
+
30
+ ```bash
31
+ npm install @embed-labs/protocol
32
+ ```
33
+
34
+ Internal workspace packages consume it through the monorepo dependency graph.
35
+
36
+ ## Usage
37
+
38
+ ```ts
39
+ import {
40
+ fail,
41
+ ok,
42
+ type DeviceScanResult,
43
+ type FlashPlan,
44
+ type TaskStatus
45
+ } from "@embed-labs/protocol";
46
+
47
+ export function health() {
48
+ return ok({ service: "example", status: "ok" });
49
+ }
50
+
51
+ export function missingTask(taskId: string) {
52
+ return fail("task_not_found", `No task found for ${taskId}.`, {
53
+ retryable: false
54
+ });
55
+ }
56
+ ```
57
+
58
+ ## Hardware Support Boundary
59
+
60
+ This package only defines data contracts. Board identifiers, flash plan fields,
61
+ and validation matrix types are not hardware support claims by themselves.
62
+ Hardware detection, probing, and guarded flash behavior live in
63
+ `@embed-labs/local-bridge`.
64
+
65
+ Destructive TaishanPi flashing is not enabled by these contracts. The current
66
+ local bridge can produce guarded planning evidence, but real TaishanPi flashing
67
+ remains blocked until the relevant hardware profile and Board Pack command
68
+ templates are accepted.
69
+
70
+ ## Runtime Requirements
71
+
72
+ - Node.js 20 or newer for packages that execute the compiled ESM output.
73
+ - TypeScript consumers should import the exported types from the package root.
74
+
75
+ ## Publish Readiness
76
+
77
+ Before public publish, confirm the runbook checklist in
78
+ `docs/runbooks/CLI_NPM_PACKAGING.md`, including approved SPDX license metadata,
79
+ repository, issue tracker, homepage, support metadata, changelog or release
80
+ notes, final npm scope ownership, and removal of `private: true` only in an
81
+ approved metadata task.
@@ -0,0 +1,1227 @@
1
+ export type TaskState = "created" | "queued" | "planning" | "awaiting_approval" | "running" | "blocked" | "cancel_requested" | "succeeded" | "failed" | "cancelled" | "expired";
2
+ export type Severity = "info" | "warning" | "error";
3
+ export interface ErrorEnvelope {
4
+ code: string;
5
+ message: string;
6
+ retryable?: boolean;
7
+ remediation?: string;
8
+ details?: Record<string, unknown>;
9
+ }
10
+ export interface ApiSuccess<T> {
11
+ ok: true;
12
+ data: T;
13
+ }
14
+ export interface ApiFailure {
15
+ ok: false;
16
+ error: ErrorEnvelope;
17
+ }
18
+ export type ApiResponse<T> = ApiSuccess<T> | ApiFailure;
19
+ export interface TaskEvent {
20
+ event_id: string;
21
+ task_id: string;
22
+ type: string;
23
+ stage?: string;
24
+ message?: string;
25
+ severity?: Severity;
26
+ created_at: string;
27
+ data?: Record<string, unknown>;
28
+ }
29
+ export interface ArtifactMetadata {
30
+ artifact_id: string;
31
+ task_id?: string;
32
+ account_id?: string;
33
+ project_id?: string;
34
+ kind: "firmware" | "image" | "patch" | "log" | "manifest" | "screenshot" | "evidence" | "report" | "other";
35
+ name: string;
36
+ content_type?: string;
37
+ size_bytes?: number;
38
+ sha256?: string;
39
+ path?: string;
40
+ producer: "cloud" | "local_bridge" | "board" | "user";
41
+ created_at: string;
42
+ }
43
+ export interface ArtifactDownloadResult {
44
+ artifact_id: string;
45
+ output_path: string;
46
+ size_bytes: number;
47
+ }
48
+ export interface BoardDeployRequest {
49
+ board_id: "taishanpi" | (string & {});
50
+ host: string;
51
+ user?: string;
52
+ artifact_path: string;
53
+ remote_path?: string;
54
+ run?: boolean;
55
+ timeout_seconds?: number;
56
+ approved?: boolean;
57
+ }
58
+ export interface BoardDeployResult {
59
+ board_id: string;
60
+ host: string;
61
+ user: string;
62
+ artifact_path: string;
63
+ artifact_size_bytes?: number;
64
+ remote_path: string;
65
+ deployed: boolean;
66
+ ran: boolean;
67
+ remote_pid?: string;
68
+ log_path?: string;
69
+ exit_code?: number | null;
70
+ stdout?: string;
71
+ stderr?: string;
72
+ output_tail?: string[];
73
+ observed_at: string;
74
+ }
75
+ export type TaishanPiDeployRequest = BoardDeployRequest;
76
+ export type TaishanPiDeployResult = BoardDeployResult;
77
+ export interface ValidationEvidence {
78
+ evidence_id: string;
79
+ task_id?: string;
80
+ board_id?: string;
81
+ variant_id?: string;
82
+ hardware_profile_id?: string;
83
+ method: "build_log" | "flash_plan" | "serial_log" | "ssh_probe" | "screenshot" | "hash_check" | "test_report" | "probe";
84
+ summary: string;
85
+ observed_at: string;
86
+ artifact_ids?: string[];
87
+ verdict: "pass" | "fail" | "inconclusive";
88
+ }
89
+ export interface TaskStatus {
90
+ task_id: string;
91
+ state: TaskState;
92
+ kind: string;
93
+ account_id?: string;
94
+ project_id?: string;
95
+ workspace_id?: string;
96
+ progress_stage?: string;
97
+ progress_text?: string;
98
+ progress_percent?: number;
99
+ output_tail?: string[];
100
+ artifacts?: ArtifactMetadata[];
101
+ evidence?: ValidationEvidence[];
102
+ error?: ErrorEnvelope;
103
+ created_at: string;
104
+ updated_at: string;
105
+ }
106
+ export interface ProjectStatus {
107
+ project_id: string;
108
+ name: string;
109
+ board_id?: string;
110
+ workspace_path?: string;
111
+ created_at: string;
112
+ updated_at: string;
113
+ }
114
+ export interface ProjectCreateRequest {
115
+ name: string;
116
+ board_id?: string;
117
+ workspace_path?: string;
118
+ }
119
+ export interface AccountStatus {
120
+ account_id: string;
121
+ email: string;
122
+ display_name?: string;
123
+ created_at: string;
124
+ updated_at: string;
125
+ }
126
+ export interface AccountCreateRequest {
127
+ email: string;
128
+ display_name?: string;
129
+ }
130
+ export type AuthContextInfo = {
131
+ kind: "admin";
132
+ } | {
133
+ kind: "api_key";
134
+ account_id: string;
135
+ api_key_id: string;
136
+ };
137
+ export interface ApiKeySummary {
138
+ api_key_id: string;
139
+ account_id: string;
140
+ name?: string;
141
+ key_prefix: string;
142
+ created_at: string;
143
+ last_used_at?: string;
144
+ revoked_at?: string;
145
+ }
146
+ export interface ApiKeyCreateRequest {
147
+ name?: string;
148
+ }
149
+ export interface ApiKeyCreateResult {
150
+ api_key: string;
151
+ api_key_record: ApiKeySummary;
152
+ }
153
+ export interface TokenUsageRecord {
154
+ usage_id: string;
155
+ account_id: string;
156
+ api_key_id: string;
157
+ provider?: string;
158
+ model: string;
159
+ operation?: string;
160
+ input_tokens: number;
161
+ output_tokens: number;
162
+ total_tokens: number;
163
+ task_id?: string;
164
+ request_id?: string;
165
+ created_at: string;
166
+ }
167
+ export interface TokenUsageCreateRequest {
168
+ api_key?: string;
169
+ api_key_id?: string;
170
+ provider?: string;
171
+ model: string;
172
+ operation?: string;
173
+ input_tokens: number;
174
+ output_tokens: number;
175
+ task_id?: string;
176
+ request_id?: string;
177
+ created_at?: string;
178
+ }
179
+ export interface TokenUsageModelSummary {
180
+ model: string;
181
+ input_tokens: number;
182
+ output_tokens: number;
183
+ total_tokens: number;
184
+ event_count: number;
185
+ }
186
+ export interface TokenUsageSummary {
187
+ account_id?: string;
188
+ api_key_id?: string;
189
+ from?: string;
190
+ to?: string;
191
+ input_tokens: number;
192
+ output_tokens: number;
193
+ total_tokens: number;
194
+ event_count: number;
195
+ by_model: TokenUsageModelSummary[];
196
+ }
197
+ export interface TokenUsageEventList {
198
+ account_id: string;
199
+ api_key_id?: string;
200
+ from?: string;
201
+ to?: string;
202
+ limit?: number;
203
+ usage_events: TokenUsageRecord[];
204
+ }
205
+ export interface BillingStatementLine {
206
+ provider?: string;
207
+ model: string;
208
+ input_tokens: number;
209
+ output_tokens: number;
210
+ total_tokens: number;
211
+ event_count: number;
212
+ input_cost_microusd: number;
213
+ output_cost_microusd: number;
214
+ total_cost_microusd: number;
215
+ }
216
+ export interface BillingStatement {
217
+ account_id: string;
218
+ from?: string;
219
+ to?: string;
220
+ currency: "USD";
221
+ rate_source: "env";
222
+ input_microusd_per_token: number;
223
+ output_microusd_per_token: number;
224
+ input_tokens: number;
225
+ output_tokens: number;
226
+ total_tokens: number;
227
+ event_count: number;
228
+ input_cost_microusd: number;
229
+ output_cost_microusd: number;
230
+ total_cost_microusd: number;
231
+ line_items: BillingStatementLine[];
232
+ generated_at: string;
233
+ }
234
+ export interface BillingSnapshot {
235
+ billing_snapshot_id: string;
236
+ account_id: string;
237
+ from?: string;
238
+ to?: string;
239
+ currency: "USD";
240
+ rate_source: "env";
241
+ input_microusd_per_token: number;
242
+ output_microusd_per_token: number;
243
+ input_tokens: number;
244
+ output_tokens: number;
245
+ total_tokens: number;
246
+ event_count: number;
247
+ input_cost_microusd: number;
248
+ output_cost_microusd: number;
249
+ total_cost_microusd: number;
250
+ line_items: BillingStatementLine[];
251
+ statement_generated_at: string;
252
+ created_at: string;
253
+ }
254
+ export type BillingPaymentProvider = "mock" | "stripe" | "onchain";
255
+ export type BillingRechargeSessionStatus = "pending" | "confirming" | "paid" | "expired" | "cancelled" | "manual_review";
256
+ export interface AccountCreditBalance {
257
+ account_id: string;
258
+ currency: "USD";
259
+ balance_cents: number;
260
+ pending_recharge_cents: number;
261
+ updated_at: string;
262
+ source: "local";
263
+ }
264
+ export type TokenLedgerEntryKind = "recharge_credit" | "model_usage_debit" | "storage_debit";
265
+ export interface AccountTokenBalance {
266
+ account_id: string;
267
+ balance_tokens: number;
268
+ updated_at: string;
269
+ source: "local";
270
+ }
271
+ export interface TokenLedgerEntry {
272
+ ledger_entry_id: string;
273
+ account_id: string;
274
+ kind: TokenLedgerEntryKind;
275
+ token_delta: number;
276
+ balance_after_tokens: number;
277
+ created_at: string;
278
+ idempotency_key: string;
279
+ usage_id?: string;
280
+ api_key_id?: string;
281
+ provider?: string;
282
+ model?: string;
283
+ task_id?: string;
284
+ workspace_id?: string;
285
+ metered_from?: string;
286
+ metered_to?: string;
287
+ description?: string;
288
+ }
289
+ export interface TokenLedgerEntryList {
290
+ entries: TokenLedgerEntry[];
291
+ }
292
+ export interface WorkspaceStorageUsage {
293
+ workspace_id: string;
294
+ account_id: string;
295
+ project_id: string;
296
+ template_id: string;
297
+ quota_mb: number;
298
+ allocated_bytes: number;
299
+ used_bytes: number;
300
+ age_seconds: number;
301
+ storage_token_rate_per_gb_hour: number;
302
+ accrued_storage_tokens: number;
303
+ created_at: string;
304
+ updated_at: string;
305
+ last_storage_settled_at?: string;
306
+ observed_at: string;
307
+ }
308
+ export interface AccountStorageSummary {
309
+ account_id: string;
310
+ quota_mb: number;
311
+ allocated_mb: number;
312
+ allocated_bytes: number;
313
+ used_bytes: number;
314
+ workspace_count: number;
315
+ storage_token_rate_per_gb_hour: number;
316
+ accrued_storage_tokens: number;
317
+ observed_at: string;
318
+ workspaces: WorkspaceStorageUsage[];
319
+ }
320
+ export interface StorageSettlementRequest {
321
+ dry_run?: boolean;
322
+ }
323
+ export interface StorageSettlementWorkspaceLine {
324
+ workspace_id: string;
325
+ project_id: string;
326
+ template_id: string;
327
+ quota_mb: number;
328
+ metered_from: string;
329
+ metered_to: string;
330
+ duration_seconds: number;
331
+ storage_token_rate_per_gb_hour: number;
332
+ tokens: number;
333
+ }
334
+ export interface StorageSettlementResult {
335
+ account_id: string;
336
+ dry_run: boolean;
337
+ settled_at: string;
338
+ balance_before_tokens: number;
339
+ balance_after_tokens: number;
340
+ tokens_debited: number;
341
+ ledger_entries: TokenLedgerEntry[];
342
+ workspaces: StorageSettlementWorkspaceLine[];
343
+ }
344
+ export interface BillingRechargeSessionCreateRequest {
345
+ account_id?: string;
346
+ amount_cents?: number;
347
+ amount_usd?: string | number;
348
+ currency?: "USD";
349
+ provider?: BillingPaymentProvider;
350
+ chain?: string;
351
+ token_symbol?: string;
352
+ success_url?: string;
353
+ cancel_url?: string;
354
+ }
355
+ export interface BillingOnchainPaymentDetails {
356
+ chain: string;
357
+ chain_id?: string;
358
+ token_symbol: string;
359
+ token_contract?: string;
360
+ token_decimals: number;
361
+ token_amount: string;
362
+ token_amount_units: string;
363
+ receive_address: string;
364
+ payment_uri: string;
365
+ required_confirmations: number;
366
+ tx_hash?: string;
367
+ received_at?: string;
368
+ confirmed_at?: string;
369
+ explorer_url?: string;
370
+ }
371
+ export interface BillingRechargeSessionTxSubmitRequest {
372
+ tx_hash?: string;
373
+ transaction_hash?: string;
374
+ }
375
+ export interface BillingRechargeSession {
376
+ recharge_session_id: string;
377
+ account_id: string;
378
+ provider: BillingPaymentProvider;
379
+ amount_cents: number;
380
+ currency: "USD";
381
+ status: BillingRechargeSessionStatus;
382
+ checkout_url: string;
383
+ qr_payload: string;
384
+ supported_payment_method_policy: "provider_dynamic" | "onchain_wallet_only";
385
+ provider_session_id?: string;
386
+ onchain?: BillingOnchainPaymentDetails;
387
+ created_at: string;
388
+ expires_at: string;
389
+ paid_at?: string;
390
+ }
391
+ export interface BillingRechargeSessionList {
392
+ recharge_sessions: BillingRechargeSession[];
393
+ }
394
+ export interface BuildTemplateWorkspace {
395
+ root_kind: string;
396
+ seed_relative_path: string;
397
+ user_workspace_relative_path: string;
398
+ artifact_relative_path: string;
399
+ cache_relative_path: string;
400
+ copy_strategy: string;
401
+ ignored_names?: string[];
402
+ }
403
+ export interface BuildTemplateDockerMount {
404
+ name: string;
405
+ container_path: string;
406
+ mode: "ro" | "rw" | string;
407
+ }
408
+ export interface BuildTemplateDocker {
409
+ image: string;
410
+ dockerfile: string;
411
+ workdir: string;
412
+ network: string;
413
+ run_as: string;
414
+ mounts: BuildTemplateDockerMount[];
415
+ }
416
+ export interface BuildTemplateResourceLimits {
417
+ cpu: number;
418
+ memory_mb: number;
419
+ timeout_seconds: number;
420
+ disk_mb: number;
421
+ }
422
+ export interface BuildTemplateValidation {
423
+ support_level_after_template_validation: string;
424
+ required_before_l1: string[];
425
+ required_before_l3: string[];
426
+ }
427
+ export interface BuildTemplate {
428
+ schema_version: string;
429
+ template_id: string;
430
+ display_name: string;
431
+ board_id: string;
432
+ variant_id: string;
433
+ hardware_profile_id: string;
434
+ default_build_profile_id: string;
435
+ image_build_profile_id?: string;
436
+ workspace: BuildTemplateWorkspace;
437
+ docker: BuildTemplateDocker;
438
+ resource_limits: BuildTemplateResourceLimits;
439
+ outputs: string[];
440
+ validation: BuildTemplateValidation;
441
+ }
442
+ export interface BuildTemplateList {
443
+ templates: BuildTemplate[];
444
+ }
445
+ export type BoardKnowledgeSource = "board_pack" | "build_template" | "registry";
446
+ export interface BoardKnowledgeFileSummary {
447
+ source: BoardKnowledgeSource;
448
+ path: string;
449
+ title: string;
450
+ kind: "markdown" | "json" | "text" | "other";
451
+ content_type: string;
452
+ size_bytes: number;
453
+ sha256: string;
454
+ }
455
+ export interface BoardKnowledgeFile {
456
+ template_id: string;
457
+ board_id: string;
458
+ variant_id: string;
459
+ file: BoardKnowledgeFileSummary;
460
+ encoding: "base64";
461
+ content_base64: string;
462
+ observed_at: string;
463
+ }
464
+ export type BoardServerMethodOperation = "workspace.provision" | "source.list" | "source.read" | "source.write" | "app.build" | "app.compile" | "image.build" | "artifact.download" | "workspace.release";
465
+ export interface BoardServerMethodSummary {
466
+ method_id: string;
467
+ operation: BoardServerMethodOperation;
468
+ display_name: string;
469
+ description: string;
470
+ runtime: "cloud_api" | "scheduler_worker" | "local_bridge";
471
+ http_method: "GET" | "POST";
472
+ path: string;
473
+ requires_workspace: boolean;
474
+ destructive: boolean;
475
+ requires_approval: boolean;
476
+ status: "available" | "mvp_stub" | "mvp_direct" | "planned";
477
+ input_schema: Record<string, unknown>;
478
+ output_artifact_kinds?: ArtifactMetadata["kind"][];
479
+ notes?: string[];
480
+ }
481
+ export interface BoardServerProfile {
482
+ template_id: string;
483
+ board_id: string;
484
+ variant_id: string;
485
+ hardware_profile_id: string;
486
+ display_name: string;
487
+ support_level: string;
488
+ build_template: BuildTemplate;
489
+ knowledge_files: BoardKnowledgeFileSummary[];
490
+ methods: BoardServerMethodSummary[];
491
+ observed_at: string;
492
+ }
493
+ export interface BoardServerProfileList {
494
+ observed_at: string;
495
+ profiles: BoardServerProfile[];
496
+ }
497
+ export type BuildWorkspaceCopyMode = "auto" | "copy" | "symlink" | "skeleton";
498
+ export interface BuildWorkspaceProvisionRequest {
499
+ account_id: string;
500
+ project_id: string;
501
+ template_id?: string;
502
+ copy_mode?: BuildWorkspaceCopyMode;
503
+ require_seed?: boolean;
504
+ dry_run?: boolean;
505
+ }
506
+ export interface BuildWorkspaceProvisionResult {
507
+ workspace_id?: string;
508
+ template_id: string;
509
+ board_id: string;
510
+ variant_id: string;
511
+ hardware_profile_id: string;
512
+ account_id: string;
513
+ project_id: string;
514
+ build_root: string;
515
+ workspace_path: string;
516
+ source_path: string;
517
+ artifact_path: string;
518
+ cache_path: string;
519
+ seed_path: string;
520
+ seed_found: boolean;
521
+ copy_mode: BuildWorkspaceCopyMode;
522
+ storage_quota_mb?: number;
523
+ dry_run: boolean;
524
+ commands: string[];
525
+ created_at?: string;
526
+ updated_at?: string;
527
+ }
528
+ export interface BuildWorkspaceRecord {
529
+ workspace_id: string;
530
+ template_id: string;
531
+ board_id: string;
532
+ variant_id: string;
533
+ hardware_profile_id: string;
534
+ account_id: string;
535
+ project_id: string;
536
+ build_root: string;
537
+ workspace_path: string;
538
+ source_path: string;
539
+ artifact_path: string;
540
+ cache_path: string;
541
+ seed_path: string;
542
+ seed_found: boolean;
543
+ copy_mode: BuildWorkspaceCopyMode;
544
+ storage_quota_mb: number;
545
+ created_at: string;
546
+ updated_at: string;
547
+ storage_settled_at?: string;
548
+ released_at?: string;
549
+ }
550
+ export interface BuildWorkspaceList {
551
+ workspaces: BuildWorkspaceRecord[];
552
+ }
553
+ export interface BuildWorkspaceReleaseRequest {
554
+ dry_run?: boolean;
555
+ settle_storage?: boolean;
556
+ }
557
+ export interface BuildWorkspaceReleaseResult {
558
+ workspace_id: string;
559
+ account_id: string;
560
+ project_id: string;
561
+ dry_run: boolean;
562
+ released_at?: string;
563
+ deleted_paths: string[];
564
+ storage_settlement?: StorageSettlementResult;
565
+ }
566
+ export interface BuildWorkspaceSourceFile {
567
+ path: string;
568
+ content_base64: string;
569
+ size_bytes?: number;
570
+ sha256?: string;
571
+ }
572
+ export interface BuildWorkspaceSourceSyncRequest {
573
+ account_id?: string;
574
+ files: BuildWorkspaceSourceFile[];
575
+ }
576
+ export interface BuildWorkspaceSourceSyncResult {
577
+ workspace_id: string;
578
+ source_path: string;
579
+ file_count: number;
580
+ total_bytes: number;
581
+ written_files: string[];
582
+ updated_at: string;
583
+ }
584
+ export interface BuildWorkspaceSourceListResult {
585
+ workspace_id: string;
586
+ source_path: string;
587
+ file_count: number;
588
+ files: Array<{
589
+ path: string;
590
+ size_bytes: number;
591
+ sha256: string;
592
+ }>;
593
+ updated_at: string;
594
+ }
595
+ export interface BuildWorkspaceSourceReadResult {
596
+ workspace_id: string;
597
+ source_path: string;
598
+ path: string;
599
+ content_base64: string;
600
+ size_bytes: number;
601
+ sha256: string;
602
+ updated_at: string;
603
+ }
604
+ export interface BuildWorkspaceSourceSearchRequest {
605
+ query: string;
606
+ glob?: string;
607
+ max_results?: number;
608
+ }
609
+ export interface BuildWorkspaceSourceSearchMatch {
610
+ path: string;
611
+ line: number;
612
+ column: number;
613
+ line_text: string;
614
+ context_before: string[];
615
+ context_after: string[];
616
+ size_bytes: number;
617
+ sha256: string;
618
+ }
619
+ export interface BuildWorkspaceSourceSearchResult {
620
+ workspace_id: string;
621
+ source_path: string;
622
+ query: string;
623
+ glob?: string;
624
+ max_results: number;
625
+ result_count: number;
626
+ truncated: boolean;
627
+ scanned_files: number;
628
+ skipped_files: number;
629
+ matches: BuildWorkspaceSourceSearchMatch[];
630
+ updated_at: string;
631
+ }
632
+ export interface BuildWorkspaceSourcePatchFile {
633
+ path: string;
634
+ content_base64?: string;
635
+ delete?: boolean;
636
+ size_bytes?: number;
637
+ sha256?: string;
638
+ }
639
+ export interface BuildWorkspaceSourcePatchRequest {
640
+ account_id?: string;
641
+ patch?: string;
642
+ files?: BuildWorkspaceSourcePatchFile[];
643
+ }
644
+ export interface BuildWorkspaceSourcePatchedFile {
645
+ path: string;
646
+ operation: "created" | "updated" | "deleted";
647
+ size_bytes?: number;
648
+ sha256?: string;
649
+ }
650
+ export interface BuildWorkspaceSourcePatchResult {
651
+ workspace_id: string;
652
+ source_path: string;
653
+ file_count: number;
654
+ modified_files: BuildWorkspaceSourcePatchedFile[];
655
+ updated_at: string;
656
+ }
657
+ export type BuildExecutionMode = "cloud_worker" | "local_bridge" | "dry_run";
658
+ export type BuildResourceLeaseStatus = "active" | "released" | "expired";
659
+ export interface BuildResourceLeaseRequest {
660
+ workspace_id: string;
661
+ account_id?: string;
662
+ task_id?: string;
663
+ execution_mode?: BuildExecutionMode;
664
+ ttl_seconds?: number;
665
+ worker_pool?: string;
666
+ purpose?: string;
667
+ }
668
+ export interface BuildResourceLeaseIsolation {
669
+ workspace_path: string;
670
+ source_path: string;
671
+ artifact_path: string;
672
+ cache_path: string;
673
+ docker_image: string;
674
+ docker_workdir: string;
675
+ docker_network: string;
676
+ docker_run_as: string;
677
+ mounts: BuildTemplateDockerMount[];
678
+ resource_limits: BuildTemplateResourceLimits;
679
+ }
680
+ export interface BuildResourceLeaseRecord {
681
+ lease_id: string;
682
+ status: BuildResourceLeaseStatus;
683
+ execution_mode: BuildExecutionMode;
684
+ account_id: string;
685
+ project_id: string;
686
+ workspace_id: string;
687
+ template_id: string;
688
+ task_id?: string;
689
+ worker_pool?: string;
690
+ purpose?: string;
691
+ isolation: BuildResourceLeaseIsolation;
692
+ created_at: string;
693
+ expires_at: string;
694
+ released_at?: string;
695
+ }
696
+ export interface BuildResourceLeaseReleaseRequest {
697
+ reason?: string;
698
+ }
699
+ export interface BuildApplicationStubRequest {
700
+ workspace_id: string;
701
+ account_id?: string;
702
+ }
703
+ export type BuildApplicationCompileMode = "server_direct" | "docker_worker" | "dry_run";
704
+ export type BuildApplicationCompiler = "auto" | "cc" | "gcc" | "clang" | "aarch64-linux-gnu-gcc";
705
+ export interface BuildApplicationCompileRequest {
706
+ workspace_id: string;
707
+ account_id?: string;
708
+ source_path?: string;
709
+ output_name?: string;
710
+ execution_mode?: BuildApplicationCompileMode;
711
+ compiler?: BuildApplicationCompiler;
712
+ }
713
+ export type AgentProvider = "stub" | "openai" | "bai" | "claude-code";
714
+ export type AgentProviderInput = AgentProvider | "b.ai" | "cc";
715
+ export type ModelProviderStatus = "available" | "configured" | "not_configured" | "not_implemented";
716
+ export interface ModelProviderSummary {
717
+ provider: AgentProvider;
718
+ display_name: string;
719
+ model: string;
720
+ status: ModelProviderStatus;
721
+ default: boolean;
722
+ supports_tools: boolean;
723
+ supports_streaming: boolean;
724
+ notes?: string[];
725
+ }
726
+ export interface ModelCatalog {
727
+ default_provider: AgentProvider;
728
+ default_model: string;
729
+ models: ModelProviderSummary[];
730
+ observed_at: string;
731
+ }
732
+ export interface ModelDefault {
733
+ provider: AgentProvider;
734
+ model: string;
735
+ status: ModelProviderStatus;
736
+ observed_at: string;
737
+ }
738
+ export type ServiceModeId = "managed-model-token" | "bring-your-own-model" | "resource-only";
739
+ export type ServiceModeStatus = "available" | "not_configured" | "planned";
740
+ export type ServiceModeModelTokenSource = "embed_labs" | "user" | "none";
741
+ export type ServiceModeMeter = "managed_model_tokens" | "workspace_storage_tokens" | "build_compute_tokens" | "artifact_storage_tokens" | "subscription";
742
+ export interface ServiceModeSummary {
743
+ mode: ServiceModeId;
744
+ display_name: string;
745
+ status: ServiceModeStatus;
746
+ default: boolean;
747
+ model_token_source: ServiceModeModelTokenSource;
748
+ includes_model_gateway: boolean;
749
+ includes_server_build_resources: boolean;
750
+ supports_external_cli_agents: boolean;
751
+ meters: ServiceModeMeter[];
752
+ notes?: string[];
753
+ }
754
+ export interface ServiceModeCatalog {
755
+ default_mode: ServiceModeId;
756
+ observed_at: string;
757
+ modes: ServiceModeSummary[];
758
+ boundaries: {
759
+ model_gateway: string;
760
+ server_resource_orchestration: string;
761
+ local_bridge: string;
762
+ };
763
+ }
764
+ export interface BuildApplicationGenerateRequest {
765
+ workspace_id: string;
766
+ account_id?: string;
767
+ prompt: string;
768
+ target_path?: string;
769
+ provider?: AgentProviderInput;
770
+ model?: string;
771
+ }
772
+ export interface BuildImageGenerateRequest {
773
+ workspace_id: string;
774
+ account_id?: string;
775
+ prompt: string;
776
+ image_profile_id?: string;
777
+ provider?: AgentProviderInput;
778
+ model?: string;
779
+ execution_mode?: BuildExecutionMode;
780
+ worker_pool?: string;
781
+ }
782
+ export interface AgentTaskCreateRequest {
783
+ prompt: string;
784
+ project_id?: string;
785
+ board_id?: string;
786
+ kind?: string;
787
+ }
788
+ export interface DeviceLocator {
789
+ transport: "usb" | "serial" | "ssh" | "usbecm" | "uf2-volume" | "rockusb" | "unknown";
790
+ path?: string;
791
+ host?: string;
792
+ port?: number;
793
+ interface_name?: string;
794
+ volume_path?: string;
795
+ }
796
+ export interface UsbDeviceInfo {
797
+ vendor_id?: string;
798
+ product_id?: string;
799
+ vendor_name?: string;
800
+ product_name?: string;
801
+ serial_number?: string;
802
+ location_id?: string;
803
+ raw?: Record<string, unknown>;
804
+ }
805
+ export interface SerialPortInfo {
806
+ path: string;
807
+ display_name?: string;
808
+ vendor_id?: string;
809
+ product_id?: string;
810
+ serial_number?: string;
811
+ available: boolean;
812
+ }
813
+ export interface DeviceSummary {
814
+ device_id: string;
815
+ board_id?: string;
816
+ variant_id?: string;
817
+ hardware_profile_id?: string;
818
+ display_name: string;
819
+ status: "connected" | "disconnected" | "bootloader" | "unknown" | "not_ready";
820
+ locators: DeviceLocator[];
821
+ usb?: UsbDeviceInfo;
822
+ serial?: SerialPortInfo;
823
+ observed_at: string;
824
+ summary_for_user: string;
825
+ evidence?: ValidationEvidence[];
826
+ }
827
+ export interface DeviceScanResult {
828
+ devices: DeviceSummary[];
829
+ usb: UsbDeviceInfo[];
830
+ serial: SerialPortInfo[];
831
+ observed_at: string;
832
+ warnings?: ErrorEnvelope[];
833
+ }
834
+ export interface DeviceProbeRequest {
835
+ host?: string;
836
+ ports?: number[];
837
+ serial_paths?: string[];
838
+ timeout_ms?: number;
839
+ }
840
+ export interface TcpProbeEvidence {
841
+ transport: "tcp";
842
+ host: string;
843
+ port: number;
844
+ reachable: boolean;
845
+ duration_ms: number;
846
+ observed_at: string;
847
+ error_code?: string;
848
+ error_message?: string;
849
+ }
850
+ export interface SerialPathProbeEvidence {
851
+ transport: "serial-path";
852
+ path: string;
853
+ exists: boolean;
854
+ path_type: "character_device" | "file" | "directory" | "other" | "unknown";
855
+ readable?: boolean;
856
+ writable?: boolean;
857
+ observed_at: string;
858
+ error_code?: string;
859
+ error_message?: string;
860
+ }
861
+ export interface DeviceProbeResult {
862
+ observed_at: string;
863
+ timeout_ms: number;
864
+ tcp: TcpProbeEvidence[];
865
+ serial_paths: SerialPathProbeEvidence[];
866
+ summary_for_user: string;
867
+ warnings?: ErrorEnvelope[];
868
+ }
869
+ export type DebugToolId = "openocd" | "probe-rs" | "pyocd" | "jlink-commander" | "jlink-gdb-server" | (string & {});
870
+ export type DebugToolEvidenceKind = "path_lookup" | "version_command";
871
+ export interface DebugToolEvidence {
872
+ evidence_id: string;
873
+ tool_id: DebugToolId;
874
+ kind: DebugToolEvidenceKind;
875
+ command: string;
876
+ args?: string[];
877
+ observed_at: string;
878
+ available?: boolean;
879
+ resolved_path?: string;
880
+ exit_code?: number | null;
881
+ timed_out?: boolean;
882
+ stdout_tail?: string[];
883
+ stderr_tail?: string[];
884
+ error_code?: string;
885
+ error_message?: string;
886
+ summary: string;
887
+ }
888
+ export interface DebugToolSummary {
889
+ tool_id: DebugToolId;
890
+ display_name: string;
891
+ command: string;
892
+ available: boolean;
893
+ version?: string;
894
+ evidence: DebugToolEvidence[];
895
+ summary_for_user: string;
896
+ }
897
+ export interface DebugToolScanResult {
898
+ tools: DebugToolSummary[];
899
+ observed_at: string;
900
+ summary_for_user: string;
901
+ warnings?: ErrorEnvelope[];
902
+ }
903
+ export type ToolRuntime = "local_bridge" | "cloud" | "mcp" | "hosted";
904
+ export type ToolCapabilityId = "debug.tools.scan" | "device.scan" | "device.probe" | "taishanpi.deploy" | (string & {});
905
+ export interface ToolCapabilitySummary {
906
+ capability_id: ToolCapabilityId;
907
+ display_name: string;
908
+ description: string;
909
+ runtime: ToolRuntime;
910
+ category: string;
911
+ destructive: boolean;
912
+ requires_approval: boolean;
913
+ input_schema: Record<string, unknown>;
914
+ }
915
+ export interface ToolCapabilityList {
916
+ capabilities: ToolCapabilitySummary[];
917
+ observed_at: string;
918
+ }
919
+ export interface ToolInvokeRequest {
920
+ capability_id: ToolCapabilityId;
921
+ input?: Record<string, unknown>;
922
+ approved?: boolean;
923
+ }
924
+ export interface ToolInvokeResult {
925
+ capability_id: ToolCapabilityId;
926
+ result: unknown;
927
+ observed_at: string;
928
+ }
929
+ export interface AgentLocalToolRunRequest {
930
+ prompt: string;
931
+ account_id?: string;
932
+ workspace_id?: string;
933
+ provider?: AgentProviderInput;
934
+ model?: string;
935
+ max_tool_calls?: number;
936
+ tool_inputs?: Record<string, Record<string, unknown>>;
937
+ tools: ToolCapabilitySummary[];
938
+ }
939
+ export interface AgentLocalToolCall {
940
+ tool_call_id: string;
941
+ capability_id: ToolCapabilityId;
942
+ input: Record<string, unknown>;
943
+ requires_approval: boolean;
944
+ reason: string;
945
+ }
946
+ export interface AgentLocalToolPlan {
947
+ plan_id: string;
948
+ request_id: string;
949
+ account_id?: string;
950
+ workspace_id?: string;
951
+ provider: AgentProvider;
952
+ model: string;
953
+ prompt: string;
954
+ prompt_sha256: string;
955
+ assistant_message: string;
956
+ tool_calls: AgentLocalToolCall[];
957
+ created_at: string;
958
+ expires_at: string;
959
+ }
960
+ export interface AgentLocalToolResultItem {
961
+ tool_call_id: string;
962
+ capability_id: ToolCapabilityId;
963
+ ok: boolean;
964
+ output?: unknown;
965
+ error?: ErrorEnvelope;
966
+ }
967
+ export interface AgentLocalToolCompleteRequest {
968
+ plan_id: string;
969
+ prompt: string;
970
+ account_id?: string;
971
+ workspace_id?: string;
972
+ provider?: AgentProviderInput;
973
+ model?: string;
974
+ tool_results: AgentLocalToolResultItem[];
975
+ }
976
+ export interface AgentLocalToolCompleteResult {
977
+ plan_id: string;
978
+ request_id: string;
979
+ usage_id?: string;
980
+ provider: AgentProvider;
981
+ model: string;
982
+ answer: string;
983
+ tool_results: AgentLocalToolResultItem[];
984
+ input_tokens: number;
985
+ output_tokens: number;
986
+ created_at: string;
987
+ }
988
+ export type DoctorCheckStatus = "ready" | "not_ready" | "unreachable" | "warning";
989
+ export type DoctorCheckId = "cli_runtime" | "auth" | "bridge_health" | "device_scan" | "debug_tools" | "cloud_api_health" | (string & {});
990
+ export interface DoctorCheck<T = unknown> {
991
+ id: DoctorCheckId;
992
+ label: string;
993
+ status: DoctorCheckStatus;
994
+ summary: string;
995
+ observed_at: string;
996
+ target?: string;
997
+ duration_ms?: number;
998
+ http_status?: number;
999
+ data?: T;
1000
+ error?: ErrorEnvelope;
1001
+ }
1002
+ export interface DoctorResult {
1003
+ status: "ready" | "not_ready";
1004
+ observed_at: string;
1005
+ summary_for_user: string;
1006
+ checks: DoctorCheck[];
1007
+ }
1008
+ export interface BridgeJob {
1009
+ local_job_id: string;
1010
+ state: TaskState;
1011
+ kind: string;
1012
+ progress_stage?: string;
1013
+ progress_text?: string;
1014
+ progress_percent?: number;
1015
+ output_tail?: string[];
1016
+ result?: Record<string, unknown>;
1017
+ error?: ErrorEnvelope;
1018
+ created_at: string;
1019
+ updated_at: string;
1020
+ }
1021
+ export interface ApprovalRecord {
1022
+ approval_id: string;
1023
+ task_id?: string;
1024
+ requested_action: string;
1025
+ risk_level: "low" | "medium" | "high" | "destructive";
1026
+ plan_summary: string;
1027
+ affected_device_id?: string;
1028
+ affected_artifacts?: string[];
1029
+ expires_at?: string;
1030
+ decision?: "approved" | "rejected" | "expired";
1031
+ decided_by?: string;
1032
+ decided_at?: string;
1033
+ }
1034
+ export interface FlashPartitionPlan {
1035
+ partition: string;
1036
+ image_path: string;
1037
+ required: boolean;
1038
+ size_bytes?: number;
1039
+ sha256?: string;
1040
+ }
1041
+ export interface FlashPlan {
1042
+ plan_id: string;
1043
+ board_id: string;
1044
+ variant_id?: string;
1045
+ hardware_profile_id?: string;
1046
+ profile_id: string;
1047
+ destructive: boolean;
1048
+ approval_required: boolean;
1049
+ ready: boolean;
1050
+ summary: string;
1051
+ partitions?: FlashPartitionPlan[];
1052
+ artifact_path?: string;
1053
+ target_volume_path?: string;
1054
+ required_tools?: string[];
1055
+ missing_tools?: string[];
1056
+ missing_files?: string[];
1057
+ warnings?: ErrorEnvelope[];
1058
+ }
1059
+ export interface FlashPlanRequest {
1060
+ board_id: string;
1061
+ variant_id?: string;
1062
+ hardware_profile_id?: string;
1063
+ profile_id?: string;
1064
+ image_dir?: string;
1065
+ artifact_path?: string;
1066
+ target_volume_path?: string;
1067
+ }
1068
+ export interface FlashRunRequest extends FlashPlanRequest {
1069
+ approved: boolean;
1070
+ }
1071
+ export type BoardPackExecutionPlane = "cloud" | "local_bridge" | "board" | (string & {});
1072
+ export interface BoardPackVariant {
1073
+ variant_id: string;
1074
+ display_name: string;
1075
+ hardware_profiles?: string[];
1076
+ [key: string]: unknown;
1077
+ }
1078
+ export interface BoardPackProfileBase {
1079
+ profile_id: string;
1080
+ display_name?: string;
1081
+ description?: string;
1082
+ status?: string;
1083
+ notes?: string;
1084
+ [key: string]: unknown;
1085
+ }
1086
+ export interface BoardPackBuildProfile extends BoardPackProfileBase {
1087
+ kind?: string;
1088
+ execution_plane?: BoardPackExecutionPlane;
1089
+ outputs?: string[];
1090
+ }
1091
+ export interface BoardPackFlashProfile extends BoardPackProfileBase {
1092
+ execution_plane?: BoardPackExecutionPlane;
1093
+ destructive?: boolean;
1094
+ approval_required?: boolean;
1095
+ required_files?: string[];
1096
+ required_tools?: string[];
1097
+ artifact_extensions?: string[];
1098
+ target?: string;
1099
+ }
1100
+ export interface BoardPackDebugProfile extends BoardPackProfileBase {
1101
+ execution_plane?: BoardPackExecutionPlane;
1102
+ transports?: string[];
1103
+ }
1104
+ export interface BoardPackImageProfile extends BoardPackProfileBase {
1105
+ required_outputs?: string[];
1106
+ }
1107
+ export type BoardPackValidationOperationMode = "planned" | "dry_run" | "executed" | "executed_non_destructive" | "executed_destructive" | "destructive" | (string & {});
1108
+ export type BoardPackValidationApprovalRequirement = boolean | "required_for_destructive_only" | "required_for_flash_or_image_deployment" | (string & {});
1109
+ export type BoardPackValidationDestructiveOperation = boolean | "mixed" | (string & {});
1110
+ export interface BoardPackValidationScopeVariant {
1111
+ variant_id: string;
1112
+ hardware_profiles?: string[];
1113
+ [key: string]: unknown;
1114
+ }
1115
+ export interface BoardPackValidationScope {
1116
+ board_id?: string;
1117
+ variants?: BoardPackValidationScopeVariant[];
1118
+ variant_ids?: string[];
1119
+ hardware_profile_ids?: string[];
1120
+ hardware_evidence_granularity?: string;
1121
+ profile_ids?: string[];
1122
+ capability_ids?: string[];
1123
+ [key: string]: unknown;
1124
+ }
1125
+ export interface BoardPackValidationEvidenceClass {
1126
+ id: BoardPackValidationOperationMode;
1127
+ meaning: string;
1128
+ [key: string]: unknown;
1129
+ }
1130
+ export interface BoardPackValidationEvidenceRequirement {
1131
+ id?: string;
1132
+ evidence_id?: string;
1133
+ evidence_class?: BoardPackValidationOperationMode;
1134
+ kind?: string;
1135
+ summary?: string;
1136
+ description?: string;
1137
+ profile_id?: string;
1138
+ profile_ids?: string[];
1139
+ required?: boolean;
1140
+ operation_modes?: BoardPackValidationOperationMode[];
1141
+ fields?: string[];
1142
+ artifact_kinds?: ArtifactMetadata["kind"][];
1143
+ scope?: BoardPackValidationScope;
1144
+ [key: string]: unknown;
1145
+ }
1146
+ export interface BoardPackValidationApprovalRule {
1147
+ approval_required: boolean;
1148
+ default_allowed?: boolean;
1149
+ requirements?: string[];
1150
+ [key: string]: unknown;
1151
+ }
1152
+ export interface BoardPackValidationApprovalPolicy {
1153
+ [operation_mode: string]: BoardPackValidationApprovalRule;
1154
+ }
1155
+ export interface BoardPackValidationSupportClaimPolicy {
1156
+ current_claim?: string;
1157
+ higher_levels_not_claimed?: string[];
1158
+ rule?: string;
1159
+ evidence_storage?: string;
1160
+ [key: string]: unknown;
1161
+ }
1162
+ export interface BoardPackValidationDestructiveOperationPolicy {
1163
+ allowed: boolean;
1164
+ approval_required?: boolean;
1165
+ operation_modes?: BoardPackValidationOperationMode[];
1166
+ summary?: string;
1167
+ [key: string]: unknown;
1168
+ }
1169
+ export interface BoardPackValidationResidualRisk {
1170
+ risk_id?: string;
1171
+ summary: string;
1172
+ severity?: Severity;
1173
+ mitigation?: string;
1174
+ [key: string]: unknown;
1175
+ }
1176
+ export interface BoardPackValidationGate {
1177
+ gate_id: string;
1178
+ display_name?: string;
1179
+ support_level?: string;
1180
+ applicable?: boolean;
1181
+ claim_status?: string;
1182
+ scope?: BoardPackValidationScope;
1183
+ destructive_operation?: BoardPackValidationDestructiveOperation;
1184
+ approval_required?: BoardPackValidationApprovalRequirement;
1185
+ not_applicable_reason?: string;
1186
+ required_evidence: BoardPackValidationEvidenceRequirement[];
1187
+ destructive_operations?: BoardPackValidationDestructiveOperationPolicy;
1188
+ residual_risks?: Array<string | BoardPackValidationResidualRisk>;
1189
+ [key: string]: unknown;
1190
+ }
1191
+ export interface BoardPackValidationMatrix {
1192
+ schema_version?: string;
1193
+ board_id: string;
1194
+ display_name?: string;
1195
+ matrix_status?: string;
1196
+ source_manifest?: string;
1197
+ current_support_level?: string;
1198
+ support_level?: string;
1199
+ support_claim_policy?: BoardPackValidationSupportClaimPolicy;
1200
+ validation_scope?: BoardPackValidationScope;
1201
+ evidence_classes?: BoardPackValidationEvidenceClass[];
1202
+ approval_policy?: BoardPackValidationApprovalPolicy;
1203
+ gates: BoardPackValidationGate[];
1204
+ task_evidence_fields?: string[];
1205
+ required_task_evidence_fields?: string[];
1206
+ guardrails?: string[];
1207
+ residual_risks?: Array<string | BoardPackValidationResidualRisk>;
1208
+ [key: string]: unknown;
1209
+ }
1210
+ export interface BoardPackManifest {
1211
+ board_id: string;
1212
+ display_name: string;
1213
+ vendor: string;
1214
+ family: string;
1215
+ variants: BoardPackVariant[];
1216
+ support_level: string;
1217
+ capabilities: string[];
1218
+ default_build_profile?: string;
1219
+ default_flash_profile?: string;
1220
+ default_debug_profile?: string;
1221
+ build_profiles?: BoardPackBuildProfile[];
1222
+ flash_profiles?: BoardPackFlashProfile[];
1223
+ debug_profiles?: BoardPackDebugProfile[];
1224
+ image_profiles?: BoardPackImageProfile[];
1225
+ }
1226
+ export declare function ok<T>(data: T): ApiSuccess<T>;
1227
+ export declare function fail(code: string, message: string, options?: Omit<ErrorEnvelope, "code" | "message">): ApiFailure;
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ export function ok(data) {
2
+ return { ok: true, data };
3
+ }
4
+ export function fail(code, message, options = {}) {
5
+ return { ok: false, error: { code, message, ...options } };
6
+ }
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAu5CA,MAAM,UAAU,EAAE,CAAI,IAAO;IAC3B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,IAAY,EAAE,OAAe,EAAE,UAAmD,EAAE;IACvG,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,CAAC;AAC7D,CAAC"}
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@kvell007/embed-labs-protocol",
3
+ "version": "0.1.0-alpha.0",
4
+ "description": "Shared TypeScript protocol contracts for Embed Labs Cloud. Experimental npm publish.",
5
+ "private": false,
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "files": [
10
+ "dist",
11
+ "README.md"
12
+ ],
13
+ "engines": {
14
+ "node": ">=20"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public",
18
+ "registry": "https://registry.npmjs.org/"
19
+ }
20
+ }