@ramme-io/shared 4.0.0 → 4.2.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/dist/index.cjs CHANGED
@@ -107,6 +107,7 @@ __export(index_exports, {
107
107
  DEVICE_TTL_SECONDS: () => DEVICE_TTL_SECONDS,
108
108
  DEVICE_UNKNOWN_GLYPH: () => DEVICE_UNKNOWN_GLYPH,
109
109
  DEVICE_VITALS_FIELDS: () => DEVICE_VITALS_FIELDS,
110
+ DEVICE_VOICE_CLIP: () => DEVICE_VOICE_CLIP,
110
111
  DISPLAY_FACE_MIN_PX: () => DISPLAY_FACE_MIN_PX,
111
112
  DISPLAY_NAME_MAX: () => DISPLAY_NAME_MAX,
112
113
  DeliveredAppSchema: () => DeliveredAppSchema,
@@ -128,6 +129,7 @@ __export(index_exports, {
128
129
  DeviceStatusSchema: () => DeviceStatusSchema,
129
130
  DeviceThemeSchema: () => DeviceThemeSchema,
130
131
  DeviceVitalsSchema: () => DeviceVitalsSchema,
132
+ DeviceVoiceReplySchema: () => DeviceVoiceReplySchema,
131
133
  DisplayNameSchema: () => DisplayNameSchema,
132
134
  EdgeSchema: () => EdgeSchema,
133
135
  EmblemSchema: () => EmblemSchema,
@@ -1515,8 +1517,33 @@ var DEVICE_PROTOCOL = {
1515
1517
  * GET `?id=&hash=<sha256>` → 200 raw bytes, 404 for anything it may not
1516
1518
  * have. Only a hash an app on the board names; the board keeps the file.
1517
1519
  */
1518
- photo: { method: "GET", path: "/api/device/photo" }
1520
+ photo: { method: "GET", path: "/api/device/photo" },
1521
+ /**
1522
+ * POST `?id=` with a clip (`DEVICE_VOICE_CLIP`) as the raw body → 200
1523
+ * `DeviceVoiceReply`. Only while the talk button is held: a board never
1524
+ * listens on its own. 501 means this server has no transcriber, which a
1525
+ * board shows as "voice is off here" rather than an error; 403 that this
1526
+ * board may not use it; 413 a clip over the limit.
1527
+ *
1528
+ * Which machine turns speech into text is the server's business, not the
1529
+ * board's (docs/superpowers/specs/ramme-lab.md, "Voice"): a home server runs
1530
+ * a local model, ramme.io a metered cloud one. The board sends the same clip
1531
+ * to either.
1532
+ */
1533
+ voice: { method: "POST", path: "/api/device/voice" }
1519
1534
  };
1535
+ var DEVICE_VOICE_CLIP = {
1536
+ contentType: "audio/wav",
1537
+ sampleRate: 16e3,
1538
+ bitsPerSample: 16,
1539
+ channels: 1,
1540
+ maxSeconds: 15,
1541
+ /** The 44-byte header plus fifteen seconds of samples. */
1542
+ maxBytes: 44 + 16e3 * 2 * 15
1543
+ };
1544
+ var DeviceVoiceReplySchema = import_zod12.z.object({
1545
+ text: import_zod12.z.string().max(2e3)
1546
+ });
1520
1547
  var DEVICE_POLL_QUERY = {
1521
1548
  id: "the board id (required)",
1522
1549
  since: "the revision on the glass now",
@@ -2375,11 +2402,12 @@ var ACCESS_REQUEST_TTL_SECONDS = 60 * 60 * 24 * 90;
2375
2402
 
2376
2403
  // src/auth/accessTokens.ts
2377
2404
  var import_zod18 = require("zod");
2378
- var ACCESS_TOKEN_SCOPES = ["boards:read", "boards:send"];
2405
+ var ACCESS_TOKEN_SCOPES = ["boards:read", "boards:send", "boards:configure"];
2379
2406
  var AccessTokenScopeSchema = import_zod18.z.enum(ACCESS_TOKEN_SCOPES);
2380
2407
  var ACCESS_TOKEN_SCOPE_LABELS = {
2381
2408
  "boards:read": "See my boards",
2382
- "boards:send": "Send apps to my boards"
2409
+ "boards:send": "Send apps to my boards",
2410
+ "boards:configure": "Change my boards\u2019 settings"
2383
2411
  };
2384
2412
  var ACCESS_TOKEN_PREFIX = "rmk_";
2385
2413
  var ACCESS_TOKEN_LIFETIMES_DAYS = [7, 30, 90, 365];
@@ -2492,6 +2520,7 @@ var NewAccessTokenSchema = import_zod18.z.object({
2492
2520
  DEVICE_TTL_SECONDS,
2493
2521
  DEVICE_UNKNOWN_GLYPH,
2494
2522
  DEVICE_VITALS_FIELDS,
2523
+ DEVICE_VOICE_CLIP,
2495
2524
  DISPLAY_FACE_MIN_PX,
2496
2525
  DISPLAY_NAME_MAX,
2497
2526
  DeliveredAppSchema,
@@ -2513,6 +2542,7 @@ var NewAccessTokenSchema = import_zod18.z.object({
2513
2542
  DeviceStatusSchema,
2514
2543
  DeviceThemeSchema,
2515
2544
  DeviceVitalsSchema,
2545
+ DeviceVoiceReplySchema,
2516
2546
  DisplayNameSchema,
2517
2547
  EdgeSchema,
2518
2548
  EmblemSchema,
package/dist/index.d.cts CHANGED
@@ -31460,7 +31460,7 @@ type ShelfEdit = z.infer<typeof ShelfEditSchema>;
31460
31460
  * ARCHITECTURAL ROLE:
31461
31461
  * A board talks to ramme.io, or to a Ramme someone runs at home — whichever
31462
31462
  * address its setup page names (hardware/ramme-device/src/ServerHost.h). For
31463
- * that to work, both servers must answer the same four calls the same way,
31463
+ * that to work, both servers must answer the same five calls the same way,
31464
31464
  * and the firmware must ask nothing else. This file is that agreement:
31465
31465
  * docs/superpowers/specs/home-device-protocol.md made concrete, and step 2 of
31466
31466
  * "Ramme local" in docs/superpowers/community-platform-plan.md.
@@ -31480,7 +31480,7 @@ type ShelfEdit = z.infer<typeof ShelfEditSchema>;
31480
31480
  * Zod schemas, inferred types and const registries only. No functions.
31481
31481
  */
31482
31482
  /**
31483
- * The four addresses, relative to the server a board is pointed at. Every one
31483
+ * The five addresses, relative to the server a board is pointed at. Every one
31484
31484
  * takes the board's id as `?id=`, except register, which carries it in the
31485
31485
  * body. Nothing here needs an account: a board proves presence with the code
31486
31486
  * on its screen, and only a sender has to present that.
@@ -31513,7 +31513,47 @@ declare const DEVICE_PROTOCOL: {
31513
31513
  readonly method: "GET";
31514
31514
  readonly path: "/api/device/photo";
31515
31515
  };
31516
+ /**
31517
+ * POST `?id=` with a clip (`DEVICE_VOICE_CLIP`) as the raw body → 200
31518
+ * `DeviceVoiceReply`. Only while the talk button is held: a board never
31519
+ * listens on its own. 501 means this server has no transcriber, which a
31520
+ * board shows as "voice is off here" rather than an error; 403 that this
31521
+ * board may not use it; 413 a clip over the limit.
31522
+ *
31523
+ * Which machine turns speech into text is the server's business, not the
31524
+ * board's (docs/superpowers/specs/ramme-lab.md, "Voice"): a home server runs
31525
+ * a local model, ramme.io a metered cloud one. The board sends the same clip
31526
+ * to either.
31527
+ */
31528
+ readonly voice: {
31529
+ readonly method: "POST";
31530
+ readonly path: "/api/device/voice";
31531
+ };
31532
+ };
31533
+ /**
31534
+ * The clip a board sends to `voice`: a WAV file, 16 kHz, 16-bit, mono — what
31535
+ * the black board's codec records (proven 2026-10-25) and what speech models
31536
+ * take without resampling. Capped at fifteen seconds, which is a sentence or
31537
+ * two of prompt; anything longer is a recording, not a command.
31538
+ */
31539
+ declare const DEVICE_VOICE_CLIP: {
31540
+ readonly contentType: "audio/wav";
31541
+ readonly sampleRate: 16000;
31542
+ readonly bitsPerSample: 16;
31543
+ readonly channels: 1;
31544
+ readonly maxSeconds: 15;
31545
+ /** The 44-byte header plus fifteen seconds of samples. */
31546
+ readonly maxBytes: number;
31516
31547
  };
31548
+ /** What a board reads back from `voice`: the words it heard, to show and to act on. */
31549
+ declare const DeviceVoiceReplySchema: z.ZodObject<{
31550
+ text: z.ZodString;
31551
+ }, "strip", z.ZodTypeAny, {
31552
+ text: string;
31553
+ }, {
31554
+ text: string;
31555
+ }>;
31556
+ type DeviceVoiceReply = z.infer<typeof DeviceVoiceReplySchema>;
31517
31557
  /**
31518
31558
  * What a board says about itself on the poll's query string. All optional —
31519
31559
  * older firmware sends fewer — and a server reads them loosely: a malformed
@@ -54256,11 +54296,18 @@ declare const ACCESS_REQUEST_TTL_SECONDS: number;
54256
54296
  * What a token may do. Each route names the one it needs; a token without it
54257
54297
  * is refused, whatever else it can do.
54258
54298
  *
54259
- * boards:read list your boards and read each one's vitals and history
54260
- * boards:send send an app to one of your boards
54299
+ * boards:read list your boards and read each one's vitals and history
54300
+ * boards:send send an app to one of your boards
54301
+ * boards:configure rename a board, swap its light and dark, choose which of
54302
+ * its apps is on show and how often they rotate
54303
+ *
54304
+ * What no scope reaches, on purpose: claiming or releasing a board, and
54305
+ * installing firmware. Those stay with the owner on the board's page — new
54306
+ * firmware is new code on a device in somebody's house, and an agent may
54307
+ * suggest it but never press Install.
54261
54308
  */
54262
- declare const ACCESS_TOKEN_SCOPES: readonly ["boards:read", "boards:send"];
54263
- declare const AccessTokenScopeSchema: z.ZodEnum<["boards:read", "boards:send"]>;
54309
+ declare const ACCESS_TOKEN_SCOPES: readonly ["boards:read", "boards:send", "boards:configure"];
54310
+ declare const AccessTokenScopeSchema: z.ZodEnum<["boards:read", "boards:send", "boards:configure"]>;
54264
54311
  /** What a scope is for, in the words the settings page uses. */
54265
54312
  declare const ACCESS_TOKEN_SCOPE_LABELS: Record<z.infer<typeof AccessTokenScopeSchema>, string>;
54266
54313
  /**
@@ -54281,7 +54328,7 @@ declare const AccessTokenRecordSchema: z.ZodObject<{
54281
54328
  accountId: z.ZodString;
54282
54329
  /** What the owner called it: "laptop", "Claude Code". */
54283
54330
  name: z.ZodString;
54284
- scopes: z.ZodArray<z.ZodEnum<["boards:read", "boards:send"]>, "many">;
54331
+ scopes: z.ZodArray<z.ZodEnum<["boards:read", "boards:send", "boards:configure"]>, "many">;
54285
54332
  createdAt: z.ZodNumber;
54286
54333
  expiresAt: z.ZodNumber;
54287
54334
  /** Moved forward at most once a day, so using a token is not a write per request. */
@@ -54292,7 +54339,7 @@ declare const AccessTokenRecordSchema: z.ZodObject<{
54292
54339
  accountId: string;
54293
54340
  expiresAt: number;
54294
54341
  tokenId: string;
54295
- scopes: ("boards:read" | "boards:send")[];
54342
+ scopes: ("boards:read" | "boards:send" | "boards:configure")[];
54296
54343
  lastUsedAt: number | null;
54297
54344
  }, {
54298
54345
  name: string;
@@ -54300,7 +54347,7 @@ declare const AccessTokenRecordSchema: z.ZodObject<{
54300
54347
  accountId: string;
54301
54348
  expiresAt: number;
54302
54349
  tokenId: string;
54303
- scopes: ("boards:read" | "boards:send")[];
54350
+ scopes: ("boards:read" | "boards:send" | "boards:configure")[];
54304
54351
  lastUsedAt?: number | null | undefined;
54305
54352
  }>;
54306
54353
  /** What the owner is shown about a token: never the token, never its hash. */
@@ -54310,7 +54357,7 @@ declare const PublicAccessTokenSchema: z.ZodObject<Omit<{
54310
54357
  accountId: z.ZodString;
54311
54358
  /** What the owner called it: "laptop", "Claude Code". */
54312
54359
  name: z.ZodString;
54313
- scopes: z.ZodArray<z.ZodEnum<["boards:read", "boards:send"]>, "many">;
54360
+ scopes: z.ZodArray<z.ZodEnum<["boards:read", "boards:send", "boards:configure"]>, "many">;
54314
54361
  createdAt: z.ZodNumber;
54315
54362
  expiresAt: z.ZodNumber;
54316
54363
  /** Moved forward at most once a day, so using a token is not a write per request. */
@@ -54320,28 +54367,28 @@ declare const PublicAccessTokenSchema: z.ZodObject<Omit<{
54320
54367
  createdAt: number;
54321
54368
  expiresAt: number;
54322
54369
  tokenId: string;
54323
- scopes: ("boards:read" | "boards:send")[];
54370
+ scopes: ("boards:read" | "boards:send" | "boards:configure")[];
54324
54371
  lastUsedAt: number | null;
54325
54372
  }, {
54326
54373
  name: string;
54327
54374
  createdAt: number;
54328
54375
  expiresAt: number;
54329
54376
  tokenId: string;
54330
- scopes: ("boards:read" | "boards:send")[];
54377
+ scopes: ("boards:read" | "boards:send" | "boards:configure")[];
54331
54378
  lastUsedAt?: number | null | undefined;
54332
54379
  }>;
54333
54380
  /** A request to make one. */
54334
54381
  declare const NewAccessTokenSchema: z.ZodObject<{
54335
54382
  name: z.ZodString;
54336
- scopes: z.ZodArray<z.ZodEnum<["boards:read", "boards:send"]>, "many">;
54383
+ scopes: z.ZodArray<z.ZodEnum<["boards:read", "boards:send", "boards:configure"]>, "many">;
54337
54384
  days: z.ZodUnion<[z.ZodLiteral<7>, z.ZodLiteral<30>, z.ZodLiteral<90>, z.ZodLiteral<365>]>;
54338
54385
  }, "strip", z.ZodTypeAny, {
54339
54386
  name: string;
54340
- scopes: ("boards:read" | "boards:send")[];
54387
+ scopes: ("boards:read" | "boards:send" | "boards:configure")[];
54341
54388
  days: 90 | 30 | 7 | 365;
54342
54389
  }, {
54343
54390
  name: string;
54344
- scopes: ("boards:read" | "boards:send")[];
54391
+ scopes: ("boards:read" | "boards:send" | "boards:configure")[];
54345
54392
  days: 90 | 30 | 7 | 365;
54346
54393
  }>;
54347
54394
  type AccessTokenScope = z.infer<typeof AccessTokenScopeSchema>;
@@ -54349,4 +54396,4 @@ type AccessTokenRecord = z.infer<typeof AccessTokenRecordSchema>;
54349
54396
  type PublicAccessToken = z.infer<typeof PublicAccessTokenSchema>;
54350
54397
  type NewAccessToken = z.infer<typeof NewAccessTokenSchema>;
54351
54398
 
54352
- export { ACCESS_REQUEST_TTL_SECONDS, ACCESS_TOKEN_LIFETIMES_DAYS, ACCESS_TOKEN_MAX_PER_ACCOUNT, ACCESS_TOKEN_PREFIX, ACCESS_TOKEN_RATE_PER_MINUTE, ACCESS_TOKEN_SCOPES, ACCESS_TOKEN_SCOPE_LABELS, ACCOUNT_TTL_SECONDS, type AIKeyManifest, AIKeyManifestSchema, type AITheme, AIThemeSchema, AI_ROSTER, AI_TOOLS, APP_DOCUMENT_EDIT_PREFIX, APP_DOCUMENT_SYSTEM_PROMPT, ASSISTANT_MODEL, ASSISTANT_PROVIDER, type AccessRequest, type AccessRequestRecord, AccessRequestRecordSchema, AccessRequestSchema, type AccessRequestStatus, AccessRequestStatusSchema, type AccessTokenRecord, AccessTokenRecordSchema, type AccessTokenScope, AccessTokenScopeSchema, type AccountId, AccountIdSchema, type AccountRecord, AccountRecordSchema, type AccountRole, AccountRoleSchema, type AccountStatus, AccountStatusSchema, type AccountTheme, AccountThemeSchema, type ActionDefinition, ActionSchema, type AgentRoleConfig, type AgentRoleKey, AircraftAppConfigSchema, type AppAlign, AppAlignSchema, AppBarSchema, type AppBinding, AppBindingSchema, type AppBlock, AppBlockSchema, type AppColor, AppColorSchema, type AppColorToken, AppColorTokenSchema, type AppCompute, AppComputeSchema, type AppCondition, AppConditionSchema, AppDialSchema, type AppDocument, AppDocumentSchema, type AppGroup, AppGroupSchema, type AppIcon, AppIconSchema, type AppImage, AppImageSchema, type AppLeaf, AppLeafSchema, type AppOperand, AppOperandSchema, AppRgbSchema, type AppScreenSize, AppScreenSizeSchema, AppSignalSchema, type AppSource, AppSourceSchema, AppSparklineSchema, type AppSpecification, AppSpecificationSchema, AppSpriteSchema, AppStatusSchema, type AppStyleRule, AppStyleRuleSchema, AppTextSchema, type AppTextSize, AppTextSizeSchema, AssetHashSchema, AuthStrategySchema, type Block, BlockSchema, BoardFontSchema, BoardPaletteHexSchema, schema as Bodewell, CLAIMED_DEVICE_TTL_SECONDS, CONTROL_STATES, CONTROL_STATE_MEANINGS, type CaseFamily, CaseFamilySchema, ClockAppConfigSchema, ComponentSchema, type ControlState, DEFAULT_CHAT_MODEL, DEFAULT_DEVICE_CONFIG, DEFAULT_PRO_MODEL, DEFAULT_SCHEMA_MODEL, DEFAULT_THEME_TOKENS, DEVICE_AP_SSID_PREFIX, DEVICE_ENDPOINTS, DEVICE_FEATURES, DEVICE_FEATURE_STATE_LABELS, DEVICE_FRESH_MS, DEVICE_GLYPHS, DEVICE_LABEL_MAX, DEVICE_PALETTE, DEVICE_POLL_QUERY, DEVICE_PROTOCOL, DEVICE_STALE_MS, DEVICE_TIMEZONES, DEVICE_TIMEZONE_FALLBACK, DEVICE_TTL_SECONDS, DEVICE_UNKNOWN_GLYPH, DEVICE_VITALS_FIELDS, DISPLAY_FACE_MIN_PX, DISPLAY_NAME_MAX, type DeliveredApp, DeliveredAppSchema, type DeviceAppId, DeviceAppIdSchema, DeviceAppsSchema, type DeviceConfig, DeviceConfigSchema, DeviceDisplayConfigSchema, DeviceFeatureKeySchema, type DeviceFeatureState, DeviceFeatureStateSchema, type DeviceFeatures, DeviceFeaturesSchema, type DeviceGlyph, type DeviceId, DeviceIdSchema, type DeviceKind, DeviceKindSchema, type DevicePollReply, DevicePollReplySchema, type DeviceProtocolCall, type DeviceReading, DeviceReadingSchema, type DeviceRecord, DeviceRecordSchema, type DeviceRegistration, DeviceRegistrationSchema, type DeviceReport, DeviceReportSchema, type DeviceSeen, DeviceSeenSchema, type DeviceStatus, DeviceStatusSchema, DeviceThemeSchema, type DeviceTimeZone, type DeviceVitals, DeviceVitalsSchema, DisplayNameSchema, EdgeSchema, EmblemSchema, type EntityDefinition, EntitySchema, FIRMWARE_UPDATE_ATTEMPTS, FIRMWARE_UPDATE_PREFIX, FULL_COLOUR_FRAME_MAX, FULL_RENDITION, type FamilyChoice, FamilyChoiceSchema, FamilyOptionSchema, type FieldDefinition, FieldSchema, type FirmwareUpdate, FirmwareUpdateSchema, FlexButtonSchema, type FloraTelemetry, FloraTelemetrySchema, GENESIS_LIBRARY_CONTEXT, GENESIS_VALID_COMPONENTS, type GenesisComponentType, type HardwareManifest, HardwareManifestSchema, ICON_GRID, ICON_SIZE_PX, ICON_STROKE, IMAGE_MAX_DRAWN, IMAGE_MAX_SCALE, INVITE_TTL_SECONDS, InterfaceSchema, type InviteRecord, InviteRecordSchema, MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH, type ManifestComponent, type ManifestEdge, type ManifestEmblem, type ManifestFlexButton, type ManifestInterface, type ManifestMountHoles, type ManifestPlacement, MountHolesSchema, type NewAccessToken, NewAccessTokenSchema, ORIGINAL_MAX_BYTES, ORIGINAL_MAX_SIDE, type OwnedSendRequest, OwnedSendRequestSchema, PANEL_SIZE, PHOTOS_PER_ACCOUNT, PHOTO_UPLOADS_PER_HOUR, PROVIDER_DEFAULT_MODEL, type PageDefinition, PageSchema, type PageSection, PageSectionSchema, type PairCode, PairCodeSchema, type PanelOrientation, PanelOrientationSchema, type PhotoCrop, PhotoCropSchema, PhotoFullSchema, type PhotoSummary, PhotoSummarySchema, type PhotoUpload, PhotoUploadSchema, PlacementSchema, type PrinterProfile, PrinterProfileSchema, type ProviderDefaultModelKey, type ProvisioningState, ProvisioningStateSchema, type PublicAccessToken, PublicAccessTokenSchema, type PublicAccount, PublicAccountSchema, RETRO_RENDITION, type ResourceDefinition, ResourceSchema, SCRYPT_PARAMS, SESSION_COOKIE_NAME, SESSION_TTL_SECONDS, SHELF_MAX_APPS, SHELF_MAX_BYTES, SHELF_ROTATE_MINUTES, SIGNAL_DOMAINS, SIGNAL_KINDS, SIGNAL_KIND_LABELS, SIGNAL_SOURCES, SMOOTH_FACES, SMOOTH_FONT_ADVANCES, SPRITE_MAX_BASE64, SPRITE_MAX_ROW_BYTES, SPRITE_MAX_SIDE, SPR_FORMAT, SPR_MAX_BYTES, type ScryptHash, ScryptHashSchema, type SendRequest, SendRequestSchema, SensorAppConfigSchema, type SessionRecord, SessionRecordSchema, type Shelf, type ShelfEdit, ShelfEditSchema, ShelfSchema, type Signal, type SignalArray, SignalArraySchema, type SignalDefinition, type SignalDomain, type SignalKind, SignalKindSchema, type SignalPacket, SignalPacketSchema, SignalSchema, type SignalSource, SignalSourceSchema, type SmoothFace, THEME_PALETTE_TOKENS, THEME_PRESETS, THEME_RADII, THEME_SYSTEM_PROMPT, type TelemetryGraphParams, type ThemeFonts, ThemeFontsSchema, type ThemeLettering, ThemeLetteringSchema, type ThemeOverrides, ThemeOverridesSchema, type ThemePalette7, ThemePaletteSchema, type ThemePreset, ThemeRgbSchema, type ThemeTokens, ThemeTokensSchema, type ToolCall, type ToolDefinition, TriggerSchema, type User, UserSchema, type VitalSource, VitalSourceSchema, WEATHER_CODES, WEATHER_ICONS, WEATHER_ICON_NAMES, WeatherAppConfigSchema, type WeatherIcon, type WorkflowDefinition, WorkflowSchema, telemetryGraphParameters };
54399
+ export { ACCESS_REQUEST_TTL_SECONDS, ACCESS_TOKEN_LIFETIMES_DAYS, ACCESS_TOKEN_MAX_PER_ACCOUNT, ACCESS_TOKEN_PREFIX, ACCESS_TOKEN_RATE_PER_MINUTE, ACCESS_TOKEN_SCOPES, ACCESS_TOKEN_SCOPE_LABELS, ACCOUNT_TTL_SECONDS, type AIKeyManifest, AIKeyManifestSchema, type AITheme, AIThemeSchema, AI_ROSTER, AI_TOOLS, APP_DOCUMENT_EDIT_PREFIX, APP_DOCUMENT_SYSTEM_PROMPT, ASSISTANT_MODEL, ASSISTANT_PROVIDER, type AccessRequest, type AccessRequestRecord, AccessRequestRecordSchema, AccessRequestSchema, type AccessRequestStatus, AccessRequestStatusSchema, type AccessTokenRecord, AccessTokenRecordSchema, type AccessTokenScope, AccessTokenScopeSchema, type AccountId, AccountIdSchema, type AccountRecord, AccountRecordSchema, type AccountRole, AccountRoleSchema, type AccountStatus, AccountStatusSchema, type AccountTheme, AccountThemeSchema, type ActionDefinition, ActionSchema, type AgentRoleConfig, type AgentRoleKey, AircraftAppConfigSchema, type AppAlign, AppAlignSchema, AppBarSchema, type AppBinding, AppBindingSchema, type AppBlock, AppBlockSchema, type AppColor, AppColorSchema, type AppColorToken, AppColorTokenSchema, type AppCompute, AppComputeSchema, type AppCondition, AppConditionSchema, AppDialSchema, type AppDocument, AppDocumentSchema, type AppGroup, AppGroupSchema, type AppIcon, AppIconSchema, type AppImage, AppImageSchema, type AppLeaf, AppLeafSchema, type AppOperand, AppOperandSchema, AppRgbSchema, type AppScreenSize, AppScreenSizeSchema, AppSignalSchema, type AppSource, AppSourceSchema, AppSparklineSchema, type AppSpecification, AppSpecificationSchema, AppSpriteSchema, AppStatusSchema, type AppStyleRule, AppStyleRuleSchema, AppTextSchema, type AppTextSize, AppTextSizeSchema, AssetHashSchema, AuthStrategySchema, type Block, BlockSchema, BoardFontSchema, BoardPaletteHexSchema, schema as Bodewell, CLAIMED_DEVICE_TTL_SECONDS, CONTROL_STATES, CONTROL_STATE_MEANINGS, type CaseFamily, CaseFamilySchema, ClockAppConfigSchema, ComponentSchema, type ControlState, DEFAULT_CHAT_MODEL, DEFAULT_DEVICE_CONFIG, DEFAULT_PRO_MODEL, DEFAULT_SCHEMA_MODEL, DEFAULT_THEME_TOKENS, DEVICE_AP_SSID_PREFIX, DEVICE_ENDPOINTS, DEVICE_FEATURES, DEVICE_FEATURE_STATE_LABELS, DEVICE_FRESH_MS, DEVICE_GLYPHS, DEVICE_LABEL_MAX, DEVICE_PALETTE, DEVICE_POLL_QUERY, DEVICE_PROTOCOL, DEVICE_STALE_MS, DEVICE_TIMEZONES, DEVICE_TIMEZONE_FALLBACK, DEVICE_TTL_SECONDS, DEVICE_UNKNOWN_GLYPH, DEVICE_VITALS_FIELDS, DEVICE_VOICE_CLIP, DISPLAY_FACE_MIN_PX, DISPLAY_NAME_MAX, type DeliveredApp, DeliveredAppSchema, type DeviceAppId, DeviceAppIdSchema, DeviceAppsSchema, type DeviceConfig, DeviceConfigSchema, DeviceDisplayConfigSchema, DeviceFeatureKeySchema, type DeviceFeatureState, DeviceFeatureStateSchema, type DeviceFeatures, DeviceFeaturesSchema, type DeviceGlyph, type DeviceId, DeviceIdSchema, type DeviceKind, DeviceKindSchema, type DevicePollReply, DevicePollReplySchema, type DeviceProtocolCall, type DeviceReading, DeviceReadingSchema, type DeviceRecord, DeviceRecordSchema, type DeviceRegistration, DeviceRegistrationSchema, type DeviceReport, DeviceReportSchema, type DeviceSeen, DeviceSeenSchema, type DeviceStatus, DeviceStatusSchema, DeviceThemeSchema, type DeviceTimeZone, type DeviceVitals, DeviceVitalsSchema, type DeviceVoiceReply, DeviceVoiceReplySchema, DisplayNameSchema, EdgeSchema, EmblemSchema, type EntityDefinition, EntitySchema, FIRMWARE_UPDATE_ATTEMPTS, FIRMWARE_UPDATE_PREFIX, FULL_COLOUR_FRAME_MAX, FULL_RENDITION, type FamilyChoice, FamilyChoiceSchema, FamilyOptionSchema, type FieldDefinition, FieldSchema, type FirmwareUpdate, FirmwareUpdateSchema, FlexButtonSchema, type FloraTelemetry, FloraTelemetrySchema, GENESIS_LIBRARY_CONTEXT, GENESIS_VALID_COMPONENTS, type GenesisComponentType, type HardwareManifest, HardwareManifestSchema, ICON_GRID, ICON_SIZE_PX, ICON_STROKE, IMAGE_MAX_DRAWN, IMAGE_MAX_SCALE, INVITE_TTL_SECONDS, InterfaceSchema, type InviteRecord, InviteRecordSchema, MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH, type ManifestComponent, type ManifestEdge, type ManifestEmblem, type ManifestFlexButton, type ManifestInterface, type ManifestMountHoles, type ManifestPlacement, MountHolesSchema, type NewAccessToken, NewAccessTokenSchema, ORIGINAL_MAX_BYTES, ORIGINAL_MAX_SIDE, type OwnedSendRequest, OwnedSendRequestSchema, PANEL_SIZE, PHOTOS_PER_ACCOUNT, PHOTO_UPLOADS_PER_HOUR, PROVIDER_DEFAULT_MODEL, type PageDefinition, PageSchema, type PageSection, PageSectionSchema, type PairCode, PairCodeSchema, type PanelOrientation, PanelOrientationSchema, type PhotoCrop, PhotoCropSchema, PhotoFullSchema, type PhotoSummary, PhotoSummarySchema, type PhotoUpload, PhotoUploadSchema, PlacementSchema, type PrinterProfile, PrinterProfileSchema, type ProviderDefaultModelKey, type ProvisioningState, ProvisioningStateSchema, type PublicAccessToken, PublicAccessTokenSchema, type PublicAccount, PublicAccountSchema, RETRO_RENDITION, type ResourceDefinition, ResourceSchema, SCRYPT_PARAMS, SESSION_COOKIE_NAME, SESSION_TTL_SECONDS, SHELF_MAX_APPS, SHELF_MAX_BYTES, SHELF_ROTATE_MINUTES, SIGNAL_DOMAINS, SIGNAL_KINDS, SIGNAL_KIND_LABELS, SIGNAL_SOURCES, SMOOTH_FACES, SMOOTH_FONT_ADVANCES, SPRITE_MAX_BASE64, SPRITE_MAX_ROW_BYTES, SPRITE_MAX_SIDE, SPR_FORMAT, SPR_MAX_BYTES, type ScryptHash, ScryptHashSchema, type SendRequest, SendRequestSchema, SensorAppConfigSchema, type SessionRecord, SessionRecordSchema, type Shelf, type ShelfEdit, ShelfEditSchema, ShelfSchema, type Signal, type SignalArray, SignalArraySchema, type SignalDefinition, type SignalDomain, type SignalKind, SignalKindSchema, type SignalPacket, SignalPacketSchema, SignalSchema, type SignalSource, SignalSourceSchema, type SmoothFace, THEME_PALETTE_TOKENS, THEME_PRESETS, THEME_RADII, THEME_SYSTEM_PROMPT, type TelemetryGraphParams, type ThemeFonts, ThemeFontsSchema, type ThemeLettering, ThemeLetteringSchema, type ThemeOverrides, ThemeOverridesSchema, type ThemePalette7, ThemePaletteSchema, type ThemePreset, ThemeRgbSchema, type ThemeTokens, ThemeTokensSchema, type ToolCall, type ToolDefinition, TriggerSchema, type User, UserSchema, type VitalSource, VitalSourceSchema, WEATHER_CODES, WEATHER_ICONS, WEATHER_ICON_NAMES, WeatherAppConfigSchema, type WeatherIcon, type WorkflowDefinition, WorkflowSchema, telemetryGraphParameters };
package/dist/index.d.ts CHANGED
@@ -31460,7 +31460,7 @@ type ShelfEdit = z.infer<typeof ShelfEditSchema>;
31460
31460
  * ARCHITECTURAL ROLE:
31461
31461
  * A board talks to ramme.io, or to a Ramme someone runs at home — whichever
31462
31462
  * address its setup page names (hardware/ramme-device/src/ServerHost.h). For
31463
- * that to work, both servers must answer the same four calls the same way,
31463
+ * that to work, both servers must answer the same five calls the same way,
31464
31464
  * and the firmware must ask nothing else. This file is that agreement:
31465
31465
  * docs/superpowers/specs/home-device-protocol.md made concrete, and step 2 of
31466
31466
  * "Ramme local" in docs/superpowers/community-platform-plan.md.
@@ -31480,7 +31480,7 @@ type ShelfEdit = z.infer<typeof ShelfEditSchema>;
31480
31480
  * Zod schemas, inferred types and const registries only. No functions.
31481
31481
  */
31482
31482
  /**
31483
- * The four addresses, relative to the server a board is pointed at. Every one
31483
+ * The five addresses, relative to the server a board is pointed at. Every one
31484
31484
  * takes the board's id as `?id=`, except register, which carries it in the
31485
31485
  * body. Nothing here needs an account: a board proves presence with the code
31486
31486
  * on its screen, and only a sender has to present that.
@@ -31513,7 +31513,47 @@ declare const DEVICE_PROTOCOL: {
31513
31513
  readonly method: "GET";
31514
31514
  readonly path: "/api/device/photo";
31515
31515
  };
31516
+ /**
31517
+ * POST `?id=` with a clip (`DEVICE_VOICE_CLIP`) as the raw body → 200
31518
+ * `DeviceVoiceReply`. Only while the talk button is held: a board never
31519
+ * listens on its own. 501 means this server has no transcriber, which a
31520
+ * board shows as "voice is off here" rather than an error; 403 that this
31521
+ * board may not use it; 413 a clip over the limit.
31522
+ *
31523
+ * Which machine turns speech into text is the server's business, not the
31524
+ * board's (docs/superpowers/specs/ramme-lab.md, "Voice"): a home server runs
31525
+ * a local model, ramme.io a metered cloud one. The board sends the same clip
31526
+ * to either.
31527
+ */
31528
+ readonly voice: {
31529
+ readonly method: "POST";
31530
+ readonly path: "/api/device/voice";
31531
+ };
31532
+ };
31533
+ /**
31534
+ * The clip a board sends to `voice`: a WAV file, 16 kHz, 16-bit, mono — what
31535
+ * the black board's codec records (proven 2026-10-25) and what speech models
31536
+ * take without resampling. Capped at fifteen seconds, which is a sentence or
31537
+ * two of prompt; anything longer is a recording, not a command.
31538
+ */
31539
+ declare const DEVICE_VOICE_CLIP: {
31540
+ readonly contentType: "audio/wav";
31541
+ readonly sampleRate: 16000;
31542
+ readonly bitsPerSample: 16;
31543
+ readonly channels: 1;
31544
+ readonly maxSeconds: 15;
31545
+ /** The 44-byte header plus fifteen seconds of samples. */
31546
+ readonly maxBytes: number;
31516
31547
  };
31548
+ /** What a board reads back from `voice`: the words it heard, to show and to act on. */
31549
+ declare const DeviceVoiceReplySchema: z.ZodObject<{
31550
+ text: z.ZodString;
31551
+ }, "strip", z.ZodTypeAny, {
31552
+ text: string;
31553
+ }, {
31554
+ text: string;
31555
+ }>;
31556
+ type DeviceVoiceReply = z.infer<typeof DeviceVoiceReplySchema>;
31517
31557
  /**
31518
31558
  * What a board says about itself on the poll's query string. All optional —
31519
31559
  * older firmware sends fewer — and a server reads them loosely: a malformed
@@ -54256,11 +54296,18 @@ declare const ACCESS_REQUEST_TTL_SECONDS: number;
54256
54296
  * What a token may do. Each route names the one it needs; a token without it
54257
54297
  * is refused, whatever else it can do.
54258
54298
  *
54259
- * boards:read list your boards and read each one's vitals and history
54260
- * boards:send send an app to one of your boards
54299
+ * boards:read list your boards and read each one's vitals and history
54300
+ * boards:send send an app to one of your boards
54301
+ * boards:configure rename a board, swap its light and dark, choose which of
54302
+ * its apps is on show and how often they rotate
54303
+ *
54304
+ * What no scope reaches, on purpose: claiming or releasing a board, and
54305
+ * installing firmware. Those stay with the owner on the board's page — new
54306
+ * firmware is new code on a device in somebody's house, and an agent may
54307
+ * suggest it but never press Install.
54261
54308
  */
54262
- declare const ACCESS_TOKEN_SCOPES: readonly ["boards:read", "boards:send"];
54263
- declare const AccessTokenScopeSchema: z.ZodEnum<["boards:read", "boards:send"]>;
54309
+ declare const ACCESS_TOKEN_SCOPES: readonly ["boards:read", "boards:send", "boards:configure"];
54310
+ declare const AccessTokenScopeSchema: z.ZodEnum<["boards:read", "boards:send", "boards:configure"]>;
54264
54311
  /** What a scope is for, in the words the settings page uses. */
54265
54312
  declare const ACCESS_TOKEN_SCOPE_LABELS: Record<z.infer<typeof AccessTokenScopeSchema>, string>;
54266
54313
  /**
@@ -54281,7 +54328,7 @@ declare const AccessTokenRecordSchema: z.ZodObject<{
54281
54328
  accountId: z.ZodString;
54282
54329
  /** What the owner called it: "laptop", "Claude Code". */
54283
54330
  name: z.ZodString;
54284
- scopes: z.ZodArray<z.ZodEnum<["boards:read", "boards:send"]>, "many">;
54331
+ scopes: z.ZodArray<z.ZodEnum<["boards:read", "boards:send", "boards:configure"]>, "many">;
54285
54332
  createdAt: z.ZodNumber;
54286
54333
  expiresAt: z.ZodNumber;
54287
54334
  /** Moved forward at most once a day, so using a token is not a write per request. */
@@ -54292,7 +54339,7 @@ declare const AccessTokenRecordSchema: z.ZodObject<{
54292
54339
  accountId: string;
54293
54340
  expiresAt: number;
54294
54341
  tokenId: string;
54295
- scopes: ("boards:read" | "boards:send")[];
54342
+ scopes: ("boards:read" | "boards:send" | "boards:configure")[];
54296
54343
  lastUsedAt: number | null;
54297
54344
  }, {
54298
54345
  name: string;
@@ -54300,7 +54347,7 @@ declare const AccessTokenRecordSchema: z.ZodObject<{
54300
54347
  accountId: string;
54301
54348
  expiresAt: number;
54302
54349
  tokenId: string;
54303
- scopes: ("boards:read" | "boards:send")[];
54350
+ scopes: ("boards:read" | "boards:send" | "boards:configure")[];
54304
54351
  lastUsedAt?: number | null | undefined;
54305
54352
  }>;
54306
54353
  /** What the owner is shown about a token: never the token, never its hash. */
@@ -54310,7 +54357,7 @@ declare const PublicAccessTokenSchema: z.ZodObject<Omit<{
54310
54357
  accountId: z.ZodString;
54311
54358
  /** What the owner called it: "laptop", "Claude Code". */
54312
54359
  name: z.ZodString;
54313
- scopes: z.ZodArray<z.ZodEnum<["boards:read", "boards:send"]>, "many">;
54360
+ scopes: z.ZodArray<z.ZodEnum<["boards:read", "boards:send", "boards:configure"]>, "many">;
54314
54361
  createdAt: z.ZodNumber;
54315
54362
  expiresAt: z.ZodNumber;
54316
54363
  /** Moved forward at most once a day, so using a token is not a write per request. */
@@ -54320,28 +54367,28 @@ declare const PublicAccessTokenSchema: z.ZodObject<Omit<{
54320
54367
  createdAt: number;
54321
54368
  expiresAt: number;
54322
54369
  tokenId: string;
54323
- scopes: ("boards:read" | "boards:send")[];
54370
+ scopes: ("boards:read" | "boards:send" | "boards:configure")[];
54324
54371
  lastUsedAt: number | null;
54325
54372
  }, {
54326
54373
  name: string;
54327
54374
  createdAt: number;
54328
54375
  expiresAt: number;
54329
54376
  tokenId: string;
54330
- scopes: ("boards:read" | "boards:send")[];
54377
+ scopes: ("boards:read" | "boards:send" | "boards:configure")[];
54331
54378
  lastUsedAt?: number | null | undefined;
54332
54379
  }>;
54333
54380
  /** A request to make one. */
54334
54381
  declare const NewAccessTokenSchema: z.ZodObject<{
54335
54382
  name: z.ZodString;
54336
- scopes: z.ZodArray<z.ZodEnum<["boards:read", "boards:send"]>, "many">;
54383
+ scopes: z.ZodArray<z.ZodEnum<["boards:read", "boards:send", "boards:configure"]>, "many">;
54337
54384
  days: z.ZodUnion<[z.ZodLiteral<7>, z.ZodLiteral<30>, z.ZodLiteral<90>, z.ZodLiteral<365>]>;
54338
54385
  }, "strip", z.ZodTypeAny, {
54339
54386
  name: string;
54340
- scopes: ("boards:read" | "boards:send")[];
54387
+ scopes: ("boards:read" | "boards:send" | "boards:configure")[];
54341
54388
  days: 90 | 30 | 7 | 365;
54342
54389
  }, {
54343
54390
  name: string;
54344
- scopes: ("boards:read" | "boards:send")[];
54391
+ scopes: ("boards:read" | "boards:send" | "boards:configure")[];
54345
54392
  days: 90 | 30 | 7 | 365;
54346
54393
  }>;
54347
54394
  type AccessTokenScope = z.infer<typeof AccessTokenScopeSchema>;
@@ -54349,4 +54396,4 @@ type AccessTokenRecord = z.infer<typeof AccessTokenRecordSchema>;
54349
54396
  type PublicAccessToken = z.infer<typeof PublicAccessTokenSchema>;
54350
54397
  type NewAccessToken = z.infer<typeof NewAccessTokenSchema>;
54351
54398
 
54352
- export { ACCESS_REQUEST_TTL_SECONDS, ACCESS_TOKEN_LIFETIMES_DAYS, ACCESS_TOKEN_MAX_PER_ACCOUNT, ACCESS_TOKEN_PREFIX, ACCESS_TOKEN_RATE_PER_MINUTE, ACCESS_TOKEN_SCOPES, ACCESS_TOKEN_SCOPE_LABELS, ACCOUNT_TTL_SECONDS, type AIKeyManifest, AIKeyManifestSchema, type AITheme, AIThemeSchema, AI_ROSTER, AI_TOOLS, APP_DOCUMENT_EDIT_PREFIX, APP_DOCUMENT_SYSTEM_PROMPT, ASSISTANT_MODEL, ASSISTANT_PROVIDER, type AccessRequest, type AccessRequestRecord, AccessRequestRecordSchema, AccessRequestSchema, type AccessRequestStatus, AccessRequestStatusSchema, type AccessTokenRecord, AccessTokenRecordSchema, type AccessTokenScope, AccessTokenScopeSchema, type AccountId, AccountIdSchema, type AccountRecord, AccountRecordSchema, type AccountRole, AccountRoleSchema, type AccountStatus, AccountStatusSchema, type AccountTheme, AccountThemeSchema, type ActionDefinition, ActionSchema, type AgentRoleConfig, type AgentRoleKey, AircraftAppConfigSchema, type AppAlign, AppAlignSchema, AppBarSchema, type AppBinding, AppBindingSchema, type AppBlock, AppBlockSchema, type AppColor, AppColorSchema, type AppColorToken, AppColorTokenSchema, type AppCompute, AppComputeSchema, type AppCondition, AppConditionSchema, AppDialSchema, type AppDocument, AppDocumentSchema, type AppGroup, AppGroupSchema, type AppIcon, AppIconSchema, type AppImage, AppImageSchema, type AppLeaf, AppLeafSchema, type AppOperand, AppOperandSchema, AppRgbSchema, type AppScreenSize, AppScreenSizeSchema, AppSignalSchema, type AppSource, AppSourceSchema, AppSparklineSchema, type AppSpecification, AppSpecificationSchema, AppSpriteSchema, AppStatusSchema, type AppStyleRule, AppStyleRuleSchema, AppTextSchema, type AppTextSize, AppTextSizeSchema, AssetHashSchema, AuthStrategySchema, type Block, BlockSchema, BoardFontSchema, BoardPaletteHexSchema, schema as Bodewell, CLAIMED_DEVICE_TTL_SECONDS, CONTROL_STATES, CONTROL_STATE_MEANINGS, type CaseFamily, CaseFamilySchema, ClockAppConfigSchema, ComponentSchema, type ControlState, DEFAULT_CHAT_MODEL, DEFAULT_DEVICE_CONFIG, DEFAULT_PRO_MODEL, DEFAULT_SCHEMA_MODEL, DEFAULT_THEME_TOKENS, DEVICE_AP_SSID_PREFIX, DEVICE_ENDPOINTS, DEVICE_FEATURES, DEVICE_FEATURE_STATE_LABELS, DEVICE_FRESH_MS, DEVICE_GLYPHS, DEVICE_LABEL_MAX, DEVICE_PALETTE, DEVICE_POLL_QUERY, DEVICE_PROTOCOL, DEVICE_STALE_MS, DEVICE_TIMEZONES, DEVICE_TIMEZONE_FALLBACK, DEVICE_TTL_SECONDS, DEVICE_UNKNOWN_GLYPH, DEVICE_VITALS_FIELDS, DISPLAY_FACE_MIN_PX, DISPLAY_NAME_MAX, type DeliveredApp, DeliveredAppSchema, type DeviceAppId, DeviceAppIdSchema, DeviceAppsSchema, type DeviceConfig, DeviceConfigSchema, DeviceDisplayConfigSchema, DeviceFeatureKeySchema, type DeviceFeatureState, DeviceFeatureStateSchema, type DeviceFeatures, DeviceFeaturesSchema, type DeviceGlyph, type DeviceId, DeviceIdSchema, type DeviceKind, DeviceKindSchema, type DevicePollReply, DevicePollReplySchema, type DeviceProtocolCall, type DeviceReading, DeviceReadingSchema, type DeviceRecord, DeviceRecordSchema, type DeviceRegistration, DeviceRegistrationSchema, type DeviceReport, DeviceReportSchema, type DeviceSeen, DeviceSeenSchema, type DeviceStatus, DeviceStatusSchema, DeviceThemeSchema, type DeviceTimeZone, type DeviceVitals, DeviceVitalsSchema, DisplayNameSchema, EdgeSchema, EmblemSchema, type EntityDefinition, EntitySchema, FIRMWARE_UPDATE_ATTEMPTS, FIRMWARE_UPDATE_PREFIX, FULL_COLOUR_FRAME_MAX, FULL_RENDITION, type FamilyChoice, FamilyChoiceSchema, FamilyOptionSchema, type FieldDefinition, FieldSchema, type FirmwareUpdate, FirmwareUpdateSchema, FlexButtonSchema, type FloraTelemetry, FloraTelemetrySchema, GENESIS_LIBRARY_CONTEXT, GENESIS_VALID_COMPONENTS, type GenesisComponentType, type HardwareManifest, HardwareManifestSchema, ICON_GRID, ICON_SIZE_PX, ICON_STROKE, IMAGE_MAX_DRAWN, IMAGE_MAX_SCALE, INVITE_TTL_SECONDS, InterfaceSchema, type InviteRecord, InviteRecordSchema, MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH, type ManifestComponent, type ManifestEdge, type ManifestEmblem, type ManifestFlexButton, type ManifestInterface, type ManifestMountHoles, type ManifestPlacement, MountHolesSchema, type NewAccessToken, NewAccessTokenSchema, ORIGINAL_MAX_BYTES, ORIGINAL_MAX_SIDE, type OwnedSendRequest, OwnedSendRequestSchema, PANEL_SIZE, PHOTOS_PER_ACCOUNT, PHOTO_UPLOADS_PER_HOUR, PROVIDER_DEFAULT_MODEL, type PageDefinition, PageSchema, type PageSection, PageSectionSchema, type PairCode, PairCodeSchema, type PanelOrientation, PanelOrientationSchema, type PhotoCrop, PhotoCropSchema, PhotoFullSchema, type PhotoSummary, PhotoSummarySchema, type PhotoUpload, PhotoUploadSchema, PlacementSchema, type PrinterProfile, PrinterProfileSchema, type ProviderDefaultModelKey, type ProvisioningState, ProvisioningStateSchema, type PublicAccessToken, PublicAccessTokenSchema, type PublicAccount, PublicAccountSchema, RETRO_RENDITION, type ResourceDefinition, ResourceSchema, SCRYPT_PARAMS, SESSION_COOKIE_NAME, SESSION_TTL_SECONDS, SHELF_MAX_APPS, SHELF_MAX_BYTES, SHELF_ROTATE_MINUTES, SIGNAL_DOMAINS, SIGNAL_KINDS, SIGNAL_KIND_LABELS, SIGNAL_SOURCES, SMOOTH_FACES, SMOOTH_FONT_ADVANCES, SPRITE_MAX_BASE64, SPRITE_MAX_ROW_BYTES, SPRITE_MAX_SIDE, SPR_FORMAT, SPR_MAX_BYTES, type ScryptHash, ScryptHashSchema, type SendRequest, SendRequestSchema, SensorAppConfigSchema, type SessionRecord, SessionRecordSchema, type Shelf, type ShelfEdit, ShelfEditSchema, ShelfSchema, type Signal, type SignalArray, SignalArraySchema, type SignalDefinition, type SignalDomain, type SignalKind, SignalKindSchema, type SignalPacket, SignalPacketSchema, SignalSchema, type SignalSource, SignalSourceSchema, type SmoothFace, THEME_PALETTE_TOKENS, THEME_PRESETS, THEME_RADII, THEME_SYSTEM_PROMPT, type TelemetryGraphParams, type ThemeFonts, ThemeFontsSchema, type ThemeLettering, ThemeLetteringSchema, type ThemeOverrides, ThemeOverridesSchema, type ThemePalette7, ThemePaletteSchema, type ThemePreset, ThemeRgbSchema, type ThemeTokens, ThemeTokensSchema, type ToolCall, type ToolDefinition, TriggerSchema, type User, UserSchema, type VitalSource, VitalSourceSchema, WEATHER_CODES, WEATHER_ICONS, WEATHER_ICON_NAMES, WeatherAppConfigSchema, type WeatherIcon, type WorkflowDefinition, WorkflowSchema, telemetryGraphParameters };
54399
+ export { ACCESS_REQUEST_TTL_SECONDS, ACCESS_TOKEN_LIFETIMES_DAYS, ACCESS_TOKEN_MAX_PER_ACCOUNT, ACCESS_TOKEN_PREFIX, ACCESS_TOKEN_RATE_PER_MINUTE, ACCESS_TOKEN_SCOPES, ACCESS_TOKEN_SCOPE_LABELS, ACCOUNT_TTL_SECONDS, type AIKeyManifest, AIKeyManifestSchema, type AITheme, AIThemeSchema, AI_ROSTER, AI_TOOLS, APP_DOCUMENT_EDIT_PREFIX, APP_DOCUMENT_SYSTEM_PROMPT, ASSISTANT_MODEL, ASSISTANT_PROVIDER, type AccessRequest, type AccessRequestRecord, AccessRequestRecordSchema, AccessRequestSchema, type AccessRequestStatus, AccessRequestStatusSchema, type AccessTokenRecord, AccessTokenRecordSchema, type AccessTokenScope, AccessTokenScopeSchema, type AccountId, AccountIdSchema, type AccountRecord, AccountRecordSchema, type AccountRole, AccountRoleSchema, type AccountStatus, AccountStatusSchema, type AccountTheme, AccountThemeSchema, type ActionDefinition, ActionSchema, type AgentRoleConfig, type AgentRoleKey, AircraftAppConfigSchema, type AppAlign, AppAlignSchema, AppBarSchema, type AppBinding, AppBindingSchema, type AppBlock, AppBlockSchema, type AppColor, AppColorSchema, type AppColorToken, AppColorTokenSchema, type AppCompute, AppComputeSchema, type AppCondition, AppConditionSchema, AppDialSchema, type AppDocument, AppDocumentSchema, type AppGroup, AppGroupSchema, type AppIcon, AppIconSchema, type AppImage, AppImageSchema, type AppLeaf, AppLeafSchema, type AppOperand, AppOperandSchema, AppRgbSchema, type AppScreenSize, AppScreenSizeSchema, AppSignalSchema, type AppSource, AppSourceSchema, AppSparklineSchema, type AppSpecification, AppSpecificationSchema, AppSpriteSchema, AppStatusSchema, type AppStyleRule, AppStyleRuleSchema, AppTextSchema, type AppTextSize, AppTextSizeSchema, AssetHashSchema, AuthStrategySchema, type Block, BlockSchema, BoardFontSchema, BoardPaletteHexSchema, schema as Bodewell, CLAIMED_DEVICE_TTL_SECONDS, CONTROL_STATES, CONTROL_STATE_MEANINGS, type CaseFamily, CaseFamilySchema, ClockAppConfigSchema, ComponentSchema, type ControlState, DEFAULT_CHAT_MODEL, DEFAULT_DEVICE_CONFIG, DEFAULT_PRO_MODEL, DEFAULT_SCHEMA_MODEL, DEFAULT_THEME_TOKENS, DEVICE_AP_SSID_PREFIX, DEVICE_ENDPOINTS, DEVICE_FEATURES, DEVICE_FEATURE_STATE_LABELS, DEVICE_FRESH_MS, DEVICE_GLYPHS, DEVICE_LABEL_MAX, DEVICE_PALETTE, DEVICE_POLL_QUERY, DEVICE_PROTOCOL, DEVICE_STALE_MS, DEVICE_TIMEZONES, DEVICE_TIMEZONE_FALLBACK, DEVICE_TTL_SECONDS, DEVICE_UNKNOWN_GLYPH, DEVICE_VITALS_FIELDS, DEVICE_VOICE_CLIP, DISPLAY_FACE_MIN_PX, DISPLAY_NAME_MAX, type DeliveredApp, DeliveredAppSchema, type DeviceAppId, DeviceAppIdSchema, DeviceAppsSchema, type DeviceConfig, DeviceConfigSchema, DeviceDisplayConfigSchema, DeviceFeatureKeySchema, type DeviceFeatureState, DeviceFeatureStateSchema, type DeviceFeatures, DeviceFeaturesSchema, type DeviceGlyph, type DeviceId, DeviceIdSchema, type DeviceKind, DeviceKindSchema, type DevicePollReply, DevicePollReplySchema, type DeviceProtocolCall, type DeviceReading, DeviceReadingSchema, type DeviceRecord, DeviceRecordSchema, type DeviceRegistration, DeviceRegistrationSchema, type DeviceReport, DeviceReportSchema, type DeviceSeen, DeviceSeenSchema, type DeviceStatus, DeviceStatusSchema, DeviceThemeSchema, type DeviceTimeZone, type DeviceVitals, DeviceVitalsSchema, type DeviceVoiceReply, DeviceVoiceReplySchema, DisplayNameSchema, EdgeSchema, EmblemSchema, type EntityDefinition, EntitySchema, FIRMWARE_UPDATE_ATTEMPTS, FIRMWARE_UPDATE_PREFIX, FULL_COLOUR_FRAME_MAX, FULL_RENDITION, type FamilyChoice, FamilyChoiceSchema, FamilyOptionSchema, type FieldDefinition, FieldSchema, type FirmwareUpdate, FirmwareUpdateSchema, FlexButtonSchema, type FloraTelemetry, FloraTelemetrySchema, GENESIS_LIBRARY_CONTEXT, GENESIS_VALID_COMPONENTS, type GenesisComponentType, type HardwareManifest, HardwareManifestSchema, ICON_GRID, ICON_SIZE_PX, ICON_STROKE, IMAGE_MAX_DRAWN, IMAGE_MAX_SCALE, INVITE_TTL_SECONDS, InterfaceSchema, type InviteRecord, InviteRecordSchema, MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH, type ManifestComponent, type ManifestEdge, type ManifestEmblem, type ManifestFlexButton, type ManifestInterface, type ManifestMountHoles, type ManifestPlacement, MountHolesSchema, type NewAccessToken, NewAccessTokenSchema, ORIGINAL_MAX_BYTES, ORIGINAL_MAX_SIDE, type OwnedSendRequest, OwnedSendRequestSchema, PANEL_SIZE, PHOTOS_PER_ACCOUNT, PHOTO_UPLOADS_PER_HOUR, PROVIDER_DEFAULT_MODEL, type PageDefinition, PageSchema, type PageSection, PageSectionSchema, type PairCode, PairCodeSchema, type PanelOrientation, PanelOrientationSchema, type PhotoCrop, PhotoCropSchema, PhotoFullSchema, type PhotoSummary, PhotoSummarySchema, type PhotoUpload, PhotoUploadSchema, PlacementSchema, type PrinterProfile, PrinterProfileSchema, type ProviderDefaultModelKey, type ProvisioningState, ProvisioningStateSchema, type PublicAccessToken, PublicAccessTokenSchema, type PublicAccount, PublicAccountSchema, RETRO_RENDITION, type ResourceDefinition, ResourceSchema, SCRYPT_PARAMS, SESSION_COOKIE_NAME, SESSION_TTL_SECONDS, SHELF_MAX_APPS, SHELF_MAX_BYTES, SHELF_ROTATE_MINUTES, SIGNAL_DOMAINS, SIGNAL_KINDS, SIGNAL_KIND_LABELS, SIGNAL_SOURCES, SMOOTH_FACES, SMOOTH_FONT_ADVANCES, SPRITE_MAX_BASE64, SPRITE_MAX_ROW_BYTES, SPRITE_MAX_SIDE, SPR_FORMAT, SPR_MAX_BYTES, type ScryptHash, ScryptHashSchema, type SendRequest, SendRequestSchema, SensorAppConfigSchema, type SessionRecord, SessionRecordSchema, type Shelf, type ShelfEdit, ShelfEditSchema, ShelfSchema, type Signal, type SignalArray, SignalArraySchema, type SignalDefinition, type SignalDomain, type SignalKind, SignalKindSchema, type SignalPacket, SignalPacketSchema, SignalSchema, type SignalSource, SignalSourceSchema, type SmoothFace, THEME_PALETTE_TOKENS, THEME_PRESETS, THEME_RADII, THEME_SYSTEM_PROMPT, type TelemetryGraphParams, type ThemeFonts, ThemeFontsSchema, type ThemeLettering, ThemeLetteringSchema, type ThemeOverrides, ThemeOverridesSchema, type ThemePalette7, ThemePaletteSchema, type ThemePreset, ThemeRgbSchema, type ThemeTokens, ThemeTokensSchema, type ToolCall, type ToolDefinition, TriggerSchema, type User, UserSchema, type VitalSource, VitalSourceSchema, WEATHER_CODES, WEATHER_ICONS, WEATHER_ICON_NAMES, WeatherAppConfigSchema, type WeatherIcon, type WorkflowDefinition, WorkflowSchema, telemetryGraphParameters };
package/dist/index.js CHANGED
@@ -1290,8 +1290,33 @@ var DEVICE_PROTOCOL = {
1290
1290
  * GET `?id=&hash=<sha256>` → 200 raw bytes, 404 for anything it may not
1291
1291
  * have. Only a hash an app on the board names; the board keeps the file.
1292
1292
  */
1293
- photo: { method: "GET", path: "/api/device/photo" }
1293
+ photo: { method: "GET", path: "/api/device/photo" },
1294
+ /**
1295
+ * POST `?id=` with a clip (`DEVICE_VOICE_CLIP`) as the raw body → 200
1296
+ * `DeviceVoiceReply`. Only while the talk button is held: a board never
1297
+ * listens on its own. 501 means this server has no transcriber, which a
1298
+ * board shows as "voice is off here" rather than an error; 403 that this
1299
+ * board may not use it; 413 a clip over the limit.
1300
+ *
1301
+ * Which machine turns speech into text is the server's business, not the
1302
+ * board's (docs/superpowers/specs/ramme-lab.md, "Voice"): a home server runs
1303
+ * a local model, ramme.io a metered cloud one. The board sends the same clip
1304
+ * to either.
1305
+ */
1306
+ voice: { method: "POST", path: "/api/device/voice" }
1294
1307
  };
1308
+ var DEVICE_VOICE_CLIP = {
1309
+ contentType: "audio/wav",
1310
+ sampleRate: 16e3,
1311
+ bitsPerSample: 16,
1312
+ channels: 1,
1313
+ maxSeconds: 15,
1314
+ /** The 44-byte header plus fifteen seconds of samples. */
1315
+ maxBytes: 44 + 16e3 * 2 * 15
1316
+ };
1317
+ var DeviceVoiceReplySchema = z12.object({
1318
+ text: z12.string().max(2e3)
1319
+ });
1295
1320
  var DEVICE_POLL_QUERY = {
1296
1321
  id: "the board id (required)",
1297
1322
  since: "the revision on the glass now",
@@ -2150,11 +2175,12 @@ var ACCESS_REQUEST_TTL_SECONDS = 60 * 60 * 24 * 90;
2150
2175
 
2151
2176
  // src/auth/accessTokens.ts
2152
2177
  import { z as z18 } from "zod";
2153
- var ACCESS_TOKEN_SCOPES = ["boards:read", "boards:send"];
2178
+ var ACCESS_TOKEN_SCOPES = ["boards:read", "boards:send", "boards:configure"];
2154
2179
  var AccessTokenScopeSchema = z18.enum(ACCESS_TOKEN_SCOPES);
2155
2180
  var ACCESS_TOKEN_SCOPE_LABELS = {
2156
2181
  "boards:read": "See my boards",
2157
- "boards:send": "Send apps to my boards"
2182
+ "boards:send": "Send apps to my boards",
2183
+ "boards:configure": "Change my boards\u2019 settings"
2158
2184
  };
2159
2185
  var ACCESS_TOKEN_PREFIX = "rmk_";
2160
2186
  var ACCESS_TOKEN_LIFETIMES_DAYS = [7, 30, 90, 365];
@@ -2266,6 +2292,7 @@ export {
2266
2292
  DEVICE_TTL_SECONDS,
2267
2293
  DEVICE_UNKNOWN_GLYPH,
2268
2294
  DEVICE_VITALS_FIELDS,
2295
+ DEVICE_VOICE_CLIP,
2269
2296
  DISPLAY_FACE_MIN_PX,
2270
2297
  DISPLAY_NAME_MAX,
2271
2298
  DeliveredAppSchema,
@@ -2287,6 +2314,7 @@ export {
2287
2314
  DeviceStatusSchema,
2288
2315
  DeviceThemeSchema,
2289
2316
  DeviceVitalsSchema,
2317
+ DeviceVoiceReplySchema,
2290
2318
  DisplayNameSchema,
2291
2319
  EdgeSchema,
2292
2320
  EmblemSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramme-io/shared",
3
- "version": "4.0.0",
3
+ "version": "4.2.0",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "type": "module",