@kvell007/embed-labs-protocol 0.1.0-alpha.9 → 0.1.0-alpha.90

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 CHANGED
@@ -62,10 +62,10 @@ and validation matrix types are not hardware support claims by themselves.
62
62
  Hardware detection, probing, and guarded flash behavior live in
63
63
  `@embed-labs/local-bridge`.
64
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.
65
+ Destructive TaishanPi flashing is enabled only by the Local Bridge guarded
66
+ runtime, not by these contracts alone. The bridge validates the installed SDK
67
+ image set, resolves `parameter.txt` offsets, and requires explicit user
68
+ approval before executing `rkdeveloptool`.
69
69
 
70
70
  ## Runtime Requirements
71
71
 
package/dist/index.d.ts CHANGED
@@ -51,6 +51,7 @@ export interface BoardDeployRequest {
51
51
  user?: string;
52
52
  artifact_path: string;
53
53
  remote_path?: string;
54
+ run_command?: string;
54
55
  run?: boolean;
55
56
  timeout_seconds?: number;
56
57
  approved?: boolean;
@@ -120,6 +121,7 @@ export interface AccountStatus {
120
121
  account_id: string;
121
122
  email: string;
122
123
  display_name?: string;
124
+ device_limit?: number;
123
125
  created_at: string;
124
126
  updated_at: string;
125
127
  }
@@ -138,12 +140,16 @@ export type AuthContextInfo = {
138
140
  kind: "api_key";
139
141
  account_id: string;
140
142
  api_key_id: string;
143
+ client_device_id?: string;
144
+ device_id?: string;
141
145
  };
142
146
  export interface ApiKeySummary {
143
147
  api_key_id: string;
144
148
  account_id: string;
145
149
  name?: string;
146
150
  key_prefix: string;
151
+ api_key?: string;
152
+ secret_available?: boolean;
147
153
  created_at: string;
148
154
  last_used_at?: string;
149
155
  revoked_at?: string;
@@ -159,6 +165,10 @@ export interface TokenUsageRecord {
159
165
  usage_id: string;
160
166
  account_id: string;
161
167
  api_key_id: string;
168
+ client_device_id?: string;
169
+ local_device_id?: string;
170
+ /** @deprecated Use client_device_id for account_devices rows. */
171
+ device_id?: string;
162
172
  provider?: string;
163
173
  model: string;
164
174
  operation?: string;
@@ -172,6 +182,10 @@ export interface TokenUsageRecord {
172
182
  export interface TokenUsageCreateRequest {
173
183
  api_key?: string;
174
184
  api_key_id?: string;
185
+ client_device_id?: string;
186
+ local_device_id?: string;
187
+ /** @deprecated Use client_device_id for account_devices rows or local_device_id for boards. */
188
+ device_id?: string;
175
189
  provider?: string;
176
190
  model: string;
177
191
  operation?: string;
@@ -186,6 +200,10 @@ export interface McpToolEventRecord {
186
200
  account_id?: string;
187
201
  user_id?: string;
188
202
  api_key_id?: string;
203
+ client_device_id?: string;
204
+ local_device_id?: string;
205
+ /** @deprecated Use client_device_id for account_devices rows. */
206
+ device_id?: string;
189
207
  client: string;
190
208
  tool_name: string;
191
209
  mode: string;
@@ -200,6 +218,10 @@ export interface McpToolEventRecord {
200
218
  }
201
219
  export interface McpToolEventCreateRequest {
202
220
  account_id?: string;
221
+ client_device_id?: string;
222
+ local_device_id?: string;
223
+ /** @deprecated Use client_device_id for account_devices rows or local_device_id for boards. */
224
+ device_id?: string;
203
225
  client?: string;
204
226
  tool_name: string;
205
227
  mode?: string;
@@ -212,6 +234,45 @@ export interface McpToolEventCreateRequest {
212
234
  metadata?: Record<string, unknown>;
213
235
  created_at?: string;
214
236
  }
237
+ export interface ClientDeviceContext {
238
+ device_id: string;
239
+ fingerprint_hash: string;
240
+ platform?: string;
241
+ arch?: string;
242
+ label?: string;
243
+ }
244
+ export interface ClientDeviceRegistrationRequest {
245
+ fingerprint_hash: string;
246
+ public_key: string;
247
+ label?: string;
248
+ platform?: string;
249
+ arch?: string;
250
+ hostname_hash?: string;
251
+ client_name?: string;
252
+ client_version?: string;
253
+ metadata?: Record<string, unknown>;
254
+ }
255
+ export interface AccountDeviceRecord {
256
+ device_id: string;
257
+ account_id: string;
258
+ api_key_id?: string;
259
+ fingerprint_hash: string;
260
+ public_key?: string;
261
+ label?: string;
262
+ platform?: string;
263
+ arch?: string;
264
+ hostname_hash?: string;
265
+ status: "active" | "revoked";
266
+ first_seen_at: string;
267
+ last_seen_at: string;
268
+ revoked_at?: string;
269
+ metadata?: Record<string, unknown>;
270
+ }
271
+ export interface ClientDeviceRegistrationResult {
272
+ device: AccountDeviceRecord;
273
+ device_limit: number;
274
+ active_device_count: number;
275
+ }
215
276
  export interface TokenUsageModelSummary {
216
277
  model: string;
217
278
  input_tokens: number;
@@ -518,7 +579,24 @@ export interface BoardKnowledgeFile {
518
579
  content_base64: string;
519
580
  observed_at: string;
520
581
  }
521
- export type BoardServerMethodOperation = "workspace.provision" | "source.list" | "source.read" | "source.write" | "app.build" | "app.compile" | "image.build" | "artifact.download" | "workspace.release";
582
+ export interface BoardKnowledgeSearchMatch {
583
+ source: BoardKnowledgeSource;
584
+ path: string;
585
+ title: string;
586
+ content_type: string;
587
+ sha256: string;
588
+ score: number;
589
+ excerpt: string;
590
+ }
591
+ export interface BoardKnowledgeSearchResult {
592
+ template_id: string;
593
+ board_id: string;
594
+ variant_id: string;
595
+ query: string;
596
+ matches: BoardKnowledgeSearchMatch[];
597
+ observed_at: string;
598
+ }
599
+ export type BoardServerMethodOperation = "workspace.provision" | "source.list" | "source.read" | "source.write" | "app.build" | "app.compile" | "image.build" | "artifact.download" | "workspace.release" | "local_toolchain.list" | "local_toolchain.latest" | "local_toolchain.install" | "local_toolchain.validate" | "local.compile" | "local.qt_smoke" | "board.status" | "board.deploy" | "image.logo.package" | "image.logo.compose" | "monitor.capabilities" | "monitor.status" | "monitor.gpio.read" | "monitor.gpio.write" | "monitor.uart.write" | "monitor.i2c.transfer" | "monitor.spi.transfer" | "monitor.logic.capture" | "monitor.logic.decode" | "monitor.wifi.manage" | "monitor.probe.debug" | "monitor.firmware.flash" | "initial_firmware.flash" | "flash.plan" | "flash.run";
522
600
  export type ProductAccessTier = "free_registered" | "paid_resource" | "paid_managed_model";
523
601
  export interface BoardServerMethodSummary {
524
602
  method_id: string;
@@ -869,7 +947,7 @@ export interface AgentTaskCreateRequest {
869
947
  kind?: string;
870
948
  }
871
949
  export interface DeviceLocator {
872
- transport: "usb" | "serial" | "ssh" | "usbecm" | "uf2-volume" | "rockusb" | "unknown";
950
+ transport: "usb" | "serial" | "tcp" | "ssh" | "usbecm" | "uf2-volume" | "rockusb" | "unknown";
873
951
  path?: string;
874
952
  host?: string;
875
953
  port?: number;
@@ -895,6 +973,7 @@ export interface SerialPortInfo {
895
973
  }
896
974
  export interface DeviceSummary {
897
975
  device_id: string;
976
+ local_device_id?: string;
898
977
  board_id?: string;
899
978
  variant_id?: string;
900
979
  hardware_profile_id?: string;
@@ -984,7 +1063,7 @@ export interface DebugToolScanResult {
984
1063
  warnings?: ErrorEnvelope[];
985
1064
  }
986
1065
  export type ToolRuntime = "local_bridge" | "cloud" | "mcp" | "hosted";
987
- export type ToolCapabilityId = "debug.tools.scan" | "device.scan" | "device.probe" | "wifi.scan" | "bluetooth.scan" | "chip.cpu.frequency" | "chip.temperature" | "qml.runtime.status" | "qml.runtime.start" | "flash.plan" | "flash.run" | "taishanpi.deploy" | (string & {});
1066
+ export type ToolCapabilityId = "debug.tools.scan" | "device.scan" | "device.probe" | "wifi.scan" | "bluetooth.scan" | "chip.cpu.frequency" | "chip.temperature" | "qml.runtime.status" | "qml.runtime.start" | "rp2350.monitor.capabilities" | "rp2350.monitor.status" | "rp2350.monitor.operation" | "rp2350.monitor.gpio.read" | "rp2350.monitor.gpio.write" | "rp2350.monitor.uart.write" | "rp2350.monitor.i2c.transfer" | "rp2350.monitor.logic.capture" | "rp2350.monitor.logic.decode" | "rp2350.monitor.spi.transfer" | "rp2350.monitor.wifi.manage" | "rp2350.monitor.probe.debug" | "rp2350.monitor.command" | "flash.plan" | "flash.run" | "taishanpi.deploy" | (string & {});
988
1067
  export interface ToolCapabilitySummary {
989
1068
  capability_id: ToolCapabilityId;
990
1069
  display_name: string;
@@ -1020,6 +1099,8 @@ export interface ToolInvokeResult {
1020
1099
  export interface AgentLocalToolRunRequest {
1021
1100
  prompt: string;
1022
1101
  account_id?: string;
1102
+ client_device_id?: string;
1103
+ local_device_id?: string;
1023
1104
  workspace_id?: string;
1024
1105
  provider?: AgentProviderInput;
1025
1106
  model?: string;
@@ -1038,6 +1119,11 @@ export interface AgentLocalToolPlan {
1038
1119
  plan_id: string;
1039
1120
  request_id: string;
1040
1121
  account_id?: string;
1122
+ api_key_id?: string;
1123
+ client_device_id?: string;
1124
+ local_device_id?: string;
1125
+ /** @deprecated Use client_device_id for account_devices rows. */
1126
+ device_id?: string;
1041
1127
  workspace_id?: string;
1042
1128
  provider: AgentProvider;
1043
1129
  model: string;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmkDA,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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmsDA,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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kvell007/embed-labs-protocol",
3
- "version": "0.1.0-alpha.9",
3
+ "version": "0.1.0-alpha.90",
4
4
  "description": "Shared TypeScript protocol contracts for Embed Labs Cloud. Experimental npm publish.",
5
5
  "private": false,
6
6
  "type": "module",