@ramme-io/shared 3.3.1 → 3.4.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 +28 -1
- package/dist/index.d.cts +69 -7
- package/dist/index.d.ts +69 -7
- package/dist/index.js +25 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -118,7 +118,10 @@ __export(index_exports, {
|
|
|
118
118
|
EntitySchema: () => EntitySchema,
|
|
119
119
|
EventBucketSizeSchema: () => EventBucketSizeSchema,
|
|
120
120
|
EventSourceSchema: () => EventSourceSchema,
|
|
121
|
+
FIRMWARE_UPDATE_ATTEMPTS: () => FIRMWARE_UPDATE_ATTEMPTS,
|
|
122
|
+
FIRMWARE_UPDATE_PREFIX: () => FIRMWARE_UPDATE_PREFIX,
|
|
121
123
|
FieldSchema: () => FieldSchema,
|
|
124
|
+
FirmwareUpdateSchema: () => FirmwareUpdateSchema,
|
|
122
125
|
FloraTelemetrySchema: () => FloraTelemetrySchema,
|
|
123
126
|
GENESIS_LIBRARY_CONTEXT: () => GENESIS_LIBRARY_CONTEXT,
|
|
124
127
|
GENESIS_VALID_COMPONENTS: () => GENESIS_VALID_COMPONENTS,
|
|
@@ -913,6 +916,15 @@ var DeviceRecordSchema = import_zod8.z.object({
|
|
|
913
916
|
var DEVICE_LABEL_MAX = 48;
|
|
914
917
|
var DEVICE_TTL_SECONDS = 60 * 60 * 24 * 30;
|
|
915
918
|
var CLAIMED_DEVICE_TTL_SECONDS = 60 * 60 * 24 * 400;
|
|
919
|
+
var FirmwareUpdateSchema = import_zod8.z.object({
|
|
920
|
+
version: import_zod8.z.string().min(1).max(40),
|
|
921
|
+
url: import_zod8.z.string().url().max(200),
|
|
922
|
+
sha256: import_zod8.z.string().regex(/^[0-9a-f]{64}$/),
|
|
923
|
+
bytes: import_zod8.z.number().int().positive(),
|
|
924
|
+
requestedAt: import_zod8.z.number().int().nonnegative()
|
|
925
|
+
});
|
|
926
|
+
var FIRMWARE_UPDATE_PREFIX = "https://www.ramme.io/firmware/weather-display/";
|
|
927
|
+
var FIRMWARE_UPDATE_ATTEMPTS = 3;
|
|
916
928
|
|
|
917
929
|
// src/apps/vitals.ts
|
|
918
930
|
var import_zod9 = require("zod");
|
|
@@ -952,7 +964,19 @@ var DeviceSeenSchema = import_zod9.z.object({
|
|
|
952
964
|
/** When the board last asked for its app. The freshest signal this system has. */
|
|
953
965
|
lastPollAt: import_zod9.z.number().int().nonnegative(),
|
|
954
966
|
/** The revision it reported drawing at that moment. */
|
|
955
|
-
drewRevision: import_zod9.z.number().int().nonnegative().optional()
|
|
967
|
+
drewRevision: import_zod9.z.number().int().nonnegative().optional(),
|
|
968
|
+
/**
|
|
969
|
+
* The firmware it is running, sent on every poll by builds that can update
|
|
970
|
+
* remotely — so its presence is also the answer to "can this board be
|
|
971
|
+
* updated from its page?". Registration reports the version too, but only
|
|
972
|
+
* every six hours; after a remote update this is what shows it took.
|
|
973
|
+
*/
|
|
974
|
+
firmware: import_zod9.z.string().max(40).optional(),
|
|
975
|
+
/** Photos its app names, and how many of those it holds in flash. */
|
|
976
|
+
photosWanted: import_zod9.z.number().int().nonnegative().optional(),
|
|
977
|
+
photosHeld: import_zod9.z.number().int().nonnegative().optional(),
|
|
978
|
+
/** What happened to the last firmware update it tried, in a few words. */
|
|
979
|
+
updateResult: import_zod9.z.string().max(80).optional()
|
|
956
980
|
});
|
|
957
981
|
var DEVICE_VITALS_FIELDS = [
|
|
958
982
|
{
|
|
@@ -1980,7 +2004,10 @@ var EXCLUDED_SOURCES = {
|
|
|
1980
2004
|
EntitySchema,
|
|
1981
2005
|
EventBucketSizeSchema,
|
|
1982
2006
|
EventSourceSchema,
|
|
2007
|
+
FIRMWARE_UPDATE_ATTEMPTS,
|
|
2008
|
+
FIRMWARE_UPDATE_PREFIX,
|
|
1983
2009
|
FieldSchema,
|
|
2010
|
+
FirmwareUpdateSchema,
|
|
1984
2011
|
FloraTelemetrySchema,
|
|
1985
2012
|
GENESIS_LIBRARY_CONTEXT,
|
|
1986
2013
|
GENESIS_VALID_COMPONENTS,
|
package/dist/index.d.cts
CHANGED
|
@@ -18813,6 +18813,48 @@ declare const DEVICE_TTL_SECONDS: number;
|
|
|
18813
18813
|
* itself every time it checks in.
|
|
18814
18814
|
*/
|
|
18815
18815
|
declare const CLAIMED_DEVICE_TTL_SECONDS: number;
|
|
18816
|
+
/**
|
|
18817
|
+
* A firmware update an owner has asked a board to install.
|
|
18818
|
+
*
|
|
18819
|
+
* Carried on the app row the board already polls, never fetched separately —
|
|
18820
|
+
* the poll is the one route whose cost scales with every board in existence.
|
|
18821
|
+
* The board installs it only from FIRMWARE_UPDATE_PREFIX, only if the bytes
|
|
18822
|
+
* hash to `sha256`, and gives up on a version after FIRMWARE_UPDATE_ATTEMPTS.
|
|
18823
|
+
*
|
|
18824
|
+
* WHY THIS DOES NOT BREAK "FIRMWARE MAY NOT BE SUBSCRIBED TO"
|
|
18825
|
+
*
|
|
18826
|
+
* That rule (docs/superpowers/device-network-plan.md) is about who may put
|
|
18827
|
+
* code on a board: whoever can post to a board must never be able to
|
|
18828
|
+
* reprogram it. Here only the board's owner can ask, and only for a build
|
|
18829
|
+
* Ramme's CI made and a reviewed pull request put in ramme.io's firmware
|
|
18830
|
+
* folder. A document still cannot carry code. What remains is the README's
|
|
18831
|
+
* point about signed images: until builds are signed, whoever controls the
|
|
18832
|
+
* ramme.io deployment controls what a board will install.
|
|
18833
|
+
*/
|
|
18834
|
+
declare const FirmwareUpdateSchema: z.ZodObject<{
|
|
18835
|
+
version: z.ZodString;
|
|
18836
|
+
url: z.ZodString;
|
|
18837
|
+
sha256: z.ZodString;
|
|
18838
|
+
bytes: z.ZodNumber;
|
|
18839
|
+
requestedAt: z.ZodNumber;
|
|
18840
|
+
}, "strip", z.ZodTypeAny, {
|
|
18841
|
+
version: string;
|
|
18842
|
+
url: string;
|
|
18843
|
+
sha256: string;
|
|
18844
|
+
bytes: number;
|
|
18845
|
+
requestedAt: number;
|
|
18846
|
+
}, {
|
|
18847
|
+
version: string;
|
|
18848
|
+
url: string;
|
|
18849
|
+
sha256: string;
|
|
18850
|
+
bytes: number;
|
|
18851
|
+
requestedAt: number;
|
|
18852
|
+
}>;
|
|
18853
|
+
type FirmwareUpdate = z.infer<typeof FirmwareUpdateSchema>;
|
|
18854
|
+
/** The only place a board will install firmware from. Both halves check it. */
|
|
18855
|
+
declare const FIRMWARE_UPDATE_PREFIX = "https://www.ramme.io/firmware/weather-display/";
|
|
18856
|
+
/** Tries a board makes at one version before giving up on it. */
|
|
18857
|
+
declare const FIRMWARE_UPDATE_ATTEMPTS = 3;
|
|
18816
18858
|
|
|
18817
18859
|
/**
|
|
18818
18860
|
* @file vitals.ts
|
|
@@ -18914,12 +18956,32 @@ declare const DeviceSeenSchema: z.ZodObject<{
|
|
|
18914
18956
|
lastPollAt: z.ZodNumber;
|
|
18915
18957
|
/** The revision it reported drawing at that moment. */
|
|
18916
18958
|
drewRevision: z.ZodOptional<z.ZodNumber>;
|
|
18959
|
+
/**
|
|
18960
|
+
* The firmware it is running, sent on every poll by builds that can update
|
|
18961
|
+
* remotely — so its presence is also the answer to "can this board be
|
|
18962
|
+
* updated from its page?". Registration reports the version too, but only
|
|
18963
|
+
* every six hours; after a remote update this is what shows it took.
|
|
18964
|
+
*/
|
|
18965
|
+
firmware: z.ZodOptional<z.ZodString>;
|
|
18966
|
+
/** Photos its app names, and how many of those it holds in flash. */
|
|
18967
|
+
photosWanted: z.ZodOptional<z.ZodNumber>;
|
|
18968
|
+
photosHeld: z.ZodOptional<z.ZodNumber>;
|
|
18969
|
+
/** What happened to the last firmware update it tried, in a few words. */
|
|
18970
|
+
updateResult: z.ZodOptional<z.ZodString>;
|
|
18917
18971
|
}, "strip", z.ZodTypeAny, {
|
|
18918
18972
|
lastPollAt: number;
|
|
18919
18973
|
drewRevision?: number | undefined;
|
|
18974
|
+
firmware?: string | undefined;
|
|
18975
|
+
photosWanted?: number | undefined;
|
|
18976
|
+
photosHeld?: number | undefined;
|
|
18977
|
+
updateResult?: string | undefined;
|
|
18920
18978
|
}, {
|
|
18921
18979
|
lastPollAt: number;
|
|
18922
18980
|
drewRevision?: number | undefined;
|
|
18981
|
+
firmware?: string | undefined;
|
|
18982
|
+
photosWanted?: number | undefined;
|
|
18983
|
+
photosHeld?: number | undefined;
|
|
18984
|
+
updateResult?: string | undefined;
|
|
18923
18985
|
}>;
|
|
18924
18986
|
type DeviceSeen = z.infer<typeof DeviceSeenSchema>;
|
|
18925
18987
|
type VitalSource = z.infer<typeof VitalSourceSchema>;
|
|
@@ -20573,12 +20635,12 @@ declare const EntityEventSchema: z.ZodObject<{
|
|
|
20573
20635
|
source: "mock" | "db";
|
|
20574
20636
|
title: string;
|
|
20575
20637
|
meta: Record<string, unknown> | null;
|
|
20638
|
+
url: string | null;
|
|
20576
20639
|
ticker: string;
|
|
20577
20640
|
subtype: string | null;
|
|
20578
20641
|
occurredAt: string;
|
|
20579
20642
|
precision: "second" | "day";
|
|
20580
20643
|
summary: string | null;
|
|
20581
|
-
url: string | null;
|
|
20582
20644
|
impact: number | null;
|
|
20583
20645
|
impactScale: "none" | "graded" | "binary" | "default";
|
|
20584
20646
|
sentiment: number | null;
|
|
@@ -20589,12 +20651,12 @@ declare const EntityEventSchema: z.ZodObject<{
|
|
|
20589
20651
|
source: "mock" | "db";
|
|
20590
20652
|
title: string;
|
|
20591
20653
|
meta: Record<string, unknown> | null;
|
|
20654
|
+
url: string | null;
|
|
20592
20655
|
ticker: string;
|
|
20593
20656
|
subtype: string | null;
|
|
20594
20657
|
occurredAt: string;
|
|
20595
20658
|
precision: "second" | "day";
|
|
20596
20659
|
summary: string | null;
|
|
20597
|
-
url: string | null;
|
|
20598
20660
|
impact: number | null;
|
|
20599
20661
|
impactScale: "none" | "graded" | "binary" | "default";
|
|
20600
20662
|
sentiment: number | null;
|
|
@@ -20637,12 +20699,12 @@ declare const PaginatedEntityEventsSchema: z.ZodObject<{
|
|
|
20637
20699
|
source: "mock" | "db";
|
|
20638
20700
|
title: string;
|
|
20639
20701
|
meta: Record<string, unknown> | null;
|
|
20702
|
+
url: string | null;
|
|
20640
20703
|
ticker: string;
|
|
20641
20704
|
subtype: string | null;
|
|
20642
20705
|
occurredAt: string;
|
|
20643
20706
|
precision: "second" | "day";
|
|
20644
20707
|
summary: string | null;
|
|
20645
|
-
url: string | null;
|
|
20646
20708
|
impact: number | null;
|
|
20647
20709
|
impactScale: "none" | "graded" | "binary" | "default";
|
|
20648
20710
|
sentiment: number | null;
|
|
@@ -20653,12 +20715,12 @@ declare const PaginatedEntityEventsSchema: z.ZodObject<{
|
|
|
20653
20715
|
source: "mock" | "db";
|
|
20654
20716
|
title: string;
|
|
20655
20717
|
meta: Record<string, unknown> | null;
|
|
20718
|
+
url: string | null;
|
|
20656
20719
|
ticker: string;
|
|
20657
20720
|
subtype: string | null;
|
|
20658
20721
|
occurredAt: string;
|
|
20659
20722
|
precision: "second" | "day";
|
|
20660
20723
|
summary: string | null;
|
|
20661
|
-
url: string | null;
|
|
20662
20724
|
impact: number | null;
|
|
20663
20725
|
impactScale: "none" | "graded" | "binary" | "default";
|
|
20664
20726
|
sentiment: number | null;
|
|
@@ -20674,12 +20736,12 @@ declare const PaginatedEntityEventsSchema: z.ZodObject<{
|
|
|
20674
20736
|
source: "mock" | "db";
|
|
20675
20737
|
title: string;
|
|
20676
20738
|
meta: Record<string, unknown> | null;
|
|
20739
|
+
url: string | null;
|
|
20677
20740
|
ticker: string;
|
|
20678
20741
|
subtype: string | null;
|
|
20679
20742
|
occurredAt: string;
|
|
20680
20743
|
precision: "second" | "day";
|
|
20681
20744
|
summary: string | null;
|
|
20682
|
-
url: string | null;
|
|
20683
20745
|
impact: number | null;
|
|
20684
20746
|
impactScale: "none" | "graded" | "binary" | "default";
|
|
20685
20747
|
sentiment: number | null;
|
|
@@ -20695,12 +20757,12 @@ declare const PaginatedEntityEventsSchema: z.ZodObject<{
|
|
|
20695
20757
|
source: "mock" | "db";
|
|
20696
20758
|
title: string;
|
|
20697
20759
|
meta: Record<string, unknown> | null;
|
|
20760
|
+
url: string | null;
|
|
20698
20761
|
ticker: string;
|
|
20699
20762
|
subtype: string | null;
|
|
20700
20763
|
occurredAt: string;
|
|
20701
20764
|
precision: "second" | "day";
|
|
20702
20765
|
summary: string | null;
|
|
20703
|
-
url: string | null;
|
|
20704
20766
|
impact: number | null;
|
|
20705
20767
|
impactScale: "none" | "graded" | "binary" | "default";
|
|
20706
20768
|
sentiment: number | null;
|
|
@@ -20964,4 +21026,4 @@ declare const DEFAULT_HORIZON_QUARTERS = 5;
|
|
|
20964
21026
|
*/
|
|
20965
21027
|
declare const EXCLUDED_SOURCES: Record<string, string>;
|
|
20966
21028
|
|
|
20967
|
-
export { ACCESS_REQUEST_TTL_SECONDS, 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 AccountId, AccountIdSchema, type AccountRecord, AccountRecordSchema, type AccountRole, AccountRoleSchema, type AccountStatus, AccountStatusSchema, 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 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, type ArchitectureReferenceParams, AssetHashSchema, AuthStrategySchema, type Block, BlockSchema, schema as Bodewell, CLAIMED_DEVICE_TTL_SECONDS, ClockAppConfigSchema, type CompanyNewsParams, type CompanyProfileParams, type CounterpartyGraphParams, type CounterpartyNode, CounterpartyNodeSchema, type CounterpartyResolution, CounterpartyResolutionSchema, type CounterpartyType, CounterpartyTypeSchema, DEFAULT_CHAT_MODEL, DEFAULT_DEVICE_CONFIG, DEFAULT_HORIZON_QUARTERS, DEFAULT_PRO_MODEL, DEFAULT_SCHEMA_MODEL, DEFAULT_THEME_TOKENS, DEVICE_AP_SSID_PREFIX, DEVICE_ENDPOINTS, DEVICE_FRESH_MS, DEVICE_GLYPHS, DEVICE_LABEL_MAX, DEVICE_PALETTE, DEVICE_STALE_MS, DEVICE_TIMEZONES, DEVICE_TIMEZONE_FALLBACK, DEVICE_TTL_SECONDS, DEVICE_UNKNOWN_GLYPH, DEVICE_VITALS_FIELDS, type DailyPricePoint, DailyPricePointSchema, type DeliveredApp, DeliveredAppSchema, type DeviceAppId, DeviceAppIdSchema, DeviceAppsSchema, type DeviceConfig, DeviceConfigSchema, DeviceDisplayConfigSchema, type DeviceGlyph, type DeviceId, DeviceIdSchema, type DeviceKind, DeviceKindSchema, type DeviceRecord, DeviceRecordSchema, type DeviceRegistration, DeviceRegistrationSchema, type DeviceSeen, DeviceSeenSchema, type DeviceStatus, DeviceStatusSchema, DeviceThemeSchema, type DeviceTimeZone, type DeviceVitals, DeviceVitalsSchema, type DivergenceMetric, DivergenceMetricSchema, type DivergenceMetricsParams, EVENT_KIND_LABELS, EXCLUDED_SOURCES, type EntityDefinition, type EntityEvent, type EntityEventDensity, type EntityEventDensityBucket, EntityEventDensityBucketSchema, EntityEventDensitySchema, type EntityEventFacet, EntityEventFacetSchema, type EntityEventFacets, EntityEventFacetsSchema, type EntityEventKind, EntityEventKindSchema, EntityEventSchema, type EntityPriceSeries, EntityPriceSeriesSchema, EntitySchema, type EventBucketSize, EventBucketSizeSchema, type EventSource, EventSourceSchema, type FieldDefinition, FieldSchema, type FloraTelemetry, FloraTelemetrySchema, GENESIS_LIBRARY_CONTEXT, GENESIS_VALID_COMPONENTS, type GenesisComponentType, IMAGE_MAX_DRAWN, IMAGE_MAX_SCALE, IMPACT_FLAG_THRESHOLD, INVITE_TTL_SECONDS, type ImpactScale, ImpactScaleSchema, type InviteRecord, InviteRecordSchema, type LiveQuoteParams, MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH, type NonPublicEntity, NonPublicEntitySchema, ORIGINAL_MAX_BYTES, ORIGINAL_MAX_SIDE, type OwnedSendRequest, OwnedSendRequestSchema, PHOTOS_PER_ACCOUNT, PHOTO_UPLOADS_PER_HOUR, PROVIDER_DEFAULT_MODEL, type PageDefinition, PageSchema, type PageSection, PageSectionSchema, type PaginatedEntityEvents, PaginatedEntityEventsSchema, type PairCode, PairCodeSchema, type PhotoSummary, PhotoSummarySchema, type PhotoUpload, PhotoUploadSchema, type ProviderDefaultModelKey, type ProvisioningState, ProvisioningStateSchema, type PublicAccount, PublicAccountSchema, RETRO_RENDITION, type RelationshipEdge, RelationshipEdgeSchema, type RelationshipEdgeType, RelationshipEdgeTypeSchema, type ResourceDefinition, ResourceSchema, SCRYPT_PARAMS, SENTIMENT_NEUTRAL, SESSION_COOKIE_NAME, SESSION_TTL_SECONDS, SIGNAL_DOMAINS, SIGNAL_KINDS, SIGNAL_KIND_LABELS, SIGNAL_SOURCES, 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 Signal, type SignalArray, SignalArraySchema, type SignalDefinition, type SignalDomain, type SignalKind, SignalKindSchema, type SignalPacket, SignalPacketSchema, SignalSchema, type SignalSource, SignalSourceSchema, type SignalWeight, SignalWeightSchema, type StockChartParams, THEME_PRESETS, THEME_SYSTEM_PROMPT, type TelemetryGraphParams, type ThemeFonts, ThemeFontsSchema, type ThemeOverrides, ThemeOverridesSchema, type ThemePreset, type ThemeTokens, ThemeTokensSchema, type TimestampPrecision, TimestampPrecisionSchema, type ToolCall, type ToolDefinition, TriggerSchema, type User, UserSchema, type VitalSource, VitalSourceSchema, WeatherAppConfigSchema, type WorkflowDefinition, WorkflowSchema, architectureReferenceParameters, companyNewsParameters, companyProfileParameters, counterpartyGraphParameters, divergenceMetricsParameters, liveQuoteParameters, stockChartParameters, telemetryGraphParameters };
|
|
21029
|
+
export { ACCESS_REQUEST_TTL_SECONDS, 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 AccountId, AccountIdSchema, type AccountRecord, AccountRecordSchema, type AccountRole, AccountRoleSchema, type AccountStatus, AccountStatusSchema, 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 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, type ArchitectureReferenceParams, AssetHashSchema, AuthStrategySchema, type Block, BlockSchema, schema as Bodewell, CLAIMED_DEVICE_TTL_SECONDS, ClockAppConfigSchema, type CompanyNewsParams, type CompanyProfileParams, type CounterpartyGraphParams, type CounterpartyNode, CounterpartyNodeSchema, type CounterpartyResolution, CounterpartyResolutionSchema, type CounterpartyType, CounterpartyTypeSchema, DEFAULT_CHAT_MODEL, DEFAULT_DEVICE_CONFIG, DEFAULT_HORIZON_QUARTERS, DEFAULT_PRO_MODEL, DEFAULT_SCHEMA_MODEL, DEFAULT_THEME_TOKENS, DEVICE_AP_SSID_PREFIX, DEVICE_ENDPOINTS, DEVICE_FRESH_MS, DEVICE_GLYPHS, DEVICE_LABEL_MAX, DEVICE_PALETTE, DEVICE_STALE_MS, DEVICE_TIMEZONES, DEVICE_TIMEZONE_FALLBACK, DEVICE_TTL_SECONDS, DEVICE_UNKNOWN_GLYPH, DEVICE_VITALS_FIELDS, type DailyPricePoint, DailyPricePointSchema, type DeliveredApp, DeliveredAppSchema, type DeviceAppId, DeviceAppIdSchema, DeviceAppsSchema, type DeviceConfig, DeviceConfigSchema, DeviceDisplayConfigSchema, type DeviceGlyph, type DeviceId, DeviceIdSchema, type DeviceKind, DeviceKindSchema, type DeviceRecord, DeviceRecordSchema, type DeviceRegistration, DeviceRegistrationSchema, type DeviceSeen, DeviceSeenSchema, type DeviceStatus, DeviceStatusSchema, DeviceThemeSchema, type DeviceTimeZone, type DeviceVitals, DeviceVitalsSchema, type DivergenceMetric, DivergenceMetricSchema, type DivergenceMetricsParams, EVENT_KIND_LABELS, EXCLUDED_SOURCES, type EntityDefinition, type EntityEvent, type EntityEventDensity, type EntityEventDensityBucket, EntityEventDensityBucketSchema, EntityEventDensitySchema, type EntityEventFacet, EntityEventFacetSchema, type EntityEventFacets, EntityEventFacetsSchema, type EntityEventKind, EntityEventKindSchema, EntityEventSchema, type EntityPriceSeries, EntityPriceSeriesSchema, EntitySchema, type EventBucketSize, EventBucketSizeSchema, type EventSource, EventSourceSchema, FIRMWARE_UPDATE_ATTEMPTS, FIRMWARE_UPDATE_PREFIX, type FieldDefinition, FieldSchema, type FirmwareUpdate, FirmwareUpdateSchema, type FloraTelemetry, FloraTelemetrySchema, GENESIS_LIBRARY_CONTEXT, GENESIS_VALID_COMPONENTS, type GenesisComponentType, IMAGE_MAX_DRAWN, IMAGE_MAX_SCALE, IMPACT_FLAG_THRESHOLD, INVITE_TTL_SECONDS, type ImpactScale, ImpactScaleSchema, type InviteRecord, InviteRecordSchema, type LiveQuoteParams, MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH, type NonPublicEntity, NonPublicEntitySchema, ORIGINAL_MAX_BYTES, ORIGINAL_MAX_SIDE, type OwnedSendRequest, OwnedSendRequestSchema, PHOTOS_PER_ACCOUNT, PHOTO_UPLOADS_PER_HOUR, PROVIDER_DEFAULT_MODEL, type PageDefinition, PageSchema, type PageSection, PageSectionSchema, type PaginatedEntityEvents, PaginatedEntityEventsSchema, type PairCode, PairCodeSchema, type PhotoSummary, PhotoSummarySchema, type PhotoUpload, PhotoUploadSchema, type ProviderDefaultModelKey, type ProvisioningState, ProvisioningStateSchema, type PublicAccount, PublicAccountSchema, RETRO_RENDITION, type RelationshipEdge, RelationshipEdgeSchema, type RelationshipEdgeType, RelationshipEdgeTypeSchema, type ResourceDefinition, ResourceSchema, SCRYPT_PARAMS, SENTIMENT_NEUTRAL, SESSION_COOKIE_NAME, SESSION_TTL_SECONDS, SIGNAL_DOMAINS, SIGNAL_KINDS, SIGNAL_KIND_LABELS, SIGNAL_SOURCES, 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 Signal, type SignalArray, SignalArraySchema, type SignalDefinition, type SignalDomain, type SignalKind, SignalKindSchema, type SignalPacket, SignalPacketSchema, SignalSchema, type SignalSource, SignalSourceSchema, type SignalWeight, SignalWeightSchema, type StockChartParams, THEME_PRESETS, THEME_SYSTEM_PROMPT, type TelemetryGraphParams, type ThemeFonts, ThemeFontsSchema, type ThemeOverrides, ThemeOverridesSchema, type ThemePreset, type ThemeTokens, ThemeTokensSchema, type TimestampPrecision, TimestampPrecisionSchema, type ToolCall, type ToolDefinition, TriggerSchema, type User, UserSchema, type VitalSource, VitalSourceSchema, WeatherAppConfigSchema, type WorkflowDefinition, WorkflowSchema, architectureReferenceParameters, companyNewsParameters, companyProfileParameters, counterpartyGraphParameters, divergenceMetricsParameters, liveQuoteParameters, stockChartParameters, telemetryGraphParameters };
|
package/dist/index.d.ts
CHANGED
|
@@ -18813,6 +18813,48 @@ declare const DEVICE_TTL_SECONDS: number;
|
|
|
18813
18813
|
* itself every time it checks in.
|
|
18814
18814
|
*/
|
|
18815
18815
|
declare const CLAIMED_DEVICE_TTL_SECONDS: number;
|
|
18816
|
+
/**
|
|
18817
|
+
* A firmware update an owner has asked a board to install.
|
|
18818
|
+
*
|
|
18819
|
+
* Carried on the app row the board already polls, never fetched separately —
|
|
18820
|
+
* the poll is the one route whose cost scales with every board in existence.
|
|
18821
|
+
* The board installs it only from FIRMWARE_UPDATE_PREFIX, only if the bytes
|
|
18822
|
+
* hash to `sha256`, and gives up on a version after FIRMWARE_UPDATE_ATTEMPTS.
|
|
18823
|
+
*
|
|
18824
|
+
* WHY THIS DOES NOT BREAK "FIRMWARE MAY NOT BE SUBSCRIBED TO"
|
|
18825
|
+
*
|
|
18826
|
+
* That rule (docs/superpowers/device-network-plan.md) is about who may put
|
|
18827
|
+
* code on a board: whoever can post to a board must never be able to
|
|
18828
|
+
* reprogram it. Here only the board's owner can ask, and only for a build
|
|
18829
|
+
* Ramme's CI made and a reviewed pull request put in ramme.io's firmware
|
|
18830
|
+
* folder. A document still cannot carry code. What remains is the README's
|
|
18831
|
+
* point about signed images: until builds are signed, whoever controls the
|
|
18832
|
+
* ramme.io deployment controls what a board will install.
|
|
18833
|
+
*/
|
|
18834
|
+
declare const FirmwareUpdateSchema: z.ZodObject<{
|
|
18835
|
+
version: z.ZodString;
|
|
18836
|
+
url: z.ZodString;
|
|
18837
|
+
sha256: z.ZodString;
|
|
18838
|
+
bytes: z.ZodNumber;
|
|
18839
|
+
requestedAt: z.ZodNumber;
|
|
18840
|
+
}, "strip", z.ZodTypeAny, {
|
|
18841
|
+
version: string;
|
|
18842
|
+
url: string;
|
|
18843
|
+
sha256: string;
|
|
18844
|
+
bytes: number;
|
|
18845
|
+
requestedAt: number;
|
|
18846
|
+
}, {
|
|
18847
|
+
version: string;
|
|
18848
|
+
url: string;
|
|
18849
|
+
sha256: string;
|
|
18850
|
+
bytes: number;
|
|
18851
|
+
requestedAt: number;
|
|
18852
|
+
}>;
|
|
18853
|
+
type FirmwareUpdate = z.infer<typeof FirmwareUpdateSchema>;
|
|
18854
|
+
/** The only place a board will install firmware from. Both halves check it. */
|
|
18855
|
+
declare const FIRMWARE_UPDATE_PREFIX = "https://www.ramme.io/firmware/weather-display/";
|
|
18856
|
+
/** Tries a board makes at one version before giving up on it. */
|
|
18857
|
+
declare const FIRMWARE_UPDATE_ATTEMPTS = 3;
|
|
18816
18858
|
|
|
18817
18859
|
/**
|
|
18818
18860
|
* @file vitals.ts
|
|
@@ -18914,12 +18956,32 @@ declare const DeviceSeenSchema: z.ZodObject<{
|
|
|
18914
18956
|
lastPollAt: z.ZodNumber;
|
|
18915
18957
|
/** The revision it reported drawing at that moment. */
|
|
18916
18958
|
drewRevision: z.ZodOptional<z.ZodNumber>;
|
|
18959
|
+
/**
|
|
18960
|
+
* The firmware it is running, sent on every poll by builds that can update
|
|
18961
|
+
* remotely — so its presence is also the answer to "can this board be
|
|
18962
|
+
* updated from its page?". Registration reports the version too, but only
|
|
18963
|
+
* every six hours; after a remote update this is what shows it took.
|
|
18964
|
+
*/
|
|
18965
|
+
firmware: z.ZodOptional<z.ZodString>;
|
|
18966
|
+
/** Photos its app names, and how many of those it holds in flash. */
|
|
18967
|
+
photosWanted: z.ZodOptional<z.ZodNumber>;
|
|
18968
|
+
photosHeld: z.ZodOptional<z.ZodNumber>;
|
|
18969
|
+
/** What happened to the last firmware update it tried, in a few words. */
|
|
18970
|
+
updateResult: z.ZodOptional<z.ZodString>;
|
|
18917
18971
|
}, "strip", z.ZodTypeAny, {
|
|
18918
18972
|
lastPollAt: number;
|
|
18919
18973
|
drewRevision?: number | undefined;
|
|
18974
|
+
firmware?: string | undefined;
|
|
18975
|
+
photosWanted?: number | undefined;
|
|
18976
|
+
photosHeld?: number | undefined;
|
|
18977
|
+
updateResult?: string | undefined;
|
|
18920
18978
|
}, {
|
|
18921
18979
|
lastPollAt: number;
|
|
18922
18980
|
drewRevision?: number | undefined;
|
|
18981
|
+
firmware?: string | undefined;
|
|
18982
|
+
photosWanted?: number | undefined;
|
|
18983
|
+
photosHeld?: number | undefined;
|
|
18984
|
+
updateResult?: string | undefined;
|
|
18923
18985
|
}>;
|
|
18924
18986
|
type DeviceSeen = z.infer<typeof DeviceSeenSchema>;
|
|
18925
18987
|
type VitalSource = z.infer<typeof VitalSourceSchema>;
|
|
@@ -20573,12 +20635,12 @@ declare const EntityEventSchema: z.ZodObject<{
|
|
|
20573
20635
|
source: "mock" | "db";
|
|
20574
20636
|
title: string;
|
|
20575
20637
|
meta: Record<string, unknown> | null;
|
|
20638
|
+
url: string | null;
|
|
20576
20639
|
ticker: string;
|
|
20577
20640
|
subtype: string | null;
|
|
20578
20641
|
occurredAt: string;
|
|
20579
20642
|
precision: "second" | "day";
|
|
20580
20643
|
summary: string | null;
|
|
20581
|
-
url: string | null;
|
|
20582
20644
|
impact: number | null;
|
|
20583
20645
|
impactScale: "none" | "graded" | "binary" | "default";
|
|
20584
20646
|
sentiment: number | null;
|
|
@@ -20589,12 +20651,12 @@ declare const EntityEventSchema: z.ZodObject<{
|
|
|
20589
20651
|
source: "mock" | "db";
|
|
20590
20652
|
title: string;
|
|
20591
20653
|
meta: Record<string, unknown> | null;
|
|
20654
|
+
url: string | null;
|
|
20592
20655
|
ticker: string;
|
|
20593
20656
|
subtype: string | null;
|
|
20594
20657
|
occurredAt: string;
|
|
20595
20658
|
precision: "second" | "day";
|
|
20596
20659
|
summary: string | null;
|
|
20597
|
-
url: string | null;
|
|
20598
20660
|
impact: number | null;
|
|
20599
20661
|
impactScale: "none" | "graded" | "binary" | "default";
|
|
20600
20662
|
sentiment: number | null;
|
|
@@ -20637,12 +20699,12 @@ declare const PaginatedEntityEventsSchema: z.ZodObject<{
|
|
|
20637
20699
|
source: "mock" | "db";
|
|
20638
20700
|
title: string;
|
|
20639
20701
|
meta: Record<string, unknown> | null;
|
|
20702
|
+
url: string | null;
|
|
20640
20703
|
ticker: string;
|
|
20641
20704
|
subtype: string | null;
|
|
20642
20705
|
occurredAt: string;
|
|
20643
20706
|
precision: "second" | "day";
|
|
20644
20707
|
summary: string | null;
|
|
20645
|
-
url: string | null;
|
|
20646
20708
|
impact: number | null;
|
|
20647
20709
|
impactScale: "none" | "graded" | "binary" | "default";
|
|
20648
20710
|
sentiment: number | null;
|
|
@@ -20653,12 +20715,12 @@ declare const PaginatedEntityEventsSchema: z.ZodObject<{
|
|
|
20653
20715
|
source: "mock" | "db";
|
|
20654
20716
|
title: string;
|
|
20655
20717
|
meta: Record<string, unknown> | null;
|
|
20718
|
+
url: string | null;
|
|
20656
20719
|
ticker: string;
|
|
20657
20720
|
subtype: string | null;
|
|
20658
20721
|
occurredAt: string;
|
|
20659
20722
|
precision: "second" | "day";
|
|
20660
20723
|
summary: string | null;
|
|
20661
|
-
url: string | null;
|
|
20662
20724
|
impact: number | null;
|
|
20663
20725
|
impactScale: "none" | "graded" | "binary" | "default";
|
|
20664
20726
|
sentiment: number | null;
|
|
@@ -20674,12 +20736,12 @@ declare const PaginatedEntityEventsSchema: z.ZodObject<{
|
|
|
20674
20736
|
source: "mock" | "db";
|
|
20675
20737
|
title: string;
|
|
20676
20738
|
meta: Record<string, unknown> | null;
|
|
20739
|
+
url: string | null;
|
|
20677
20740
|
ticker: string;
|
|
20678
20741
|
subtype: string | null;
|
|
20679
20742
|
occurredAt: string;
|
|
20680
20743
|
precision: "second" | "day";
|
|
20681
20744
|
summary: string | null;
|
|
20682
|
-
url: string | null;
|
|
20683
20745
|
impact: number | null;
|
|
20684
20746
|
impactScale: "none" | "graded" | "binary" | "default";
|
|
20685
20747
|
sentiment: number | null;
|
|
@@ -20695,12 +20757,12 @@ declare const PaginatedEntityEventsSchema: z.ZodObject<{
|
|
|
20695
20757
|
source: "mock" | "db";
|
|
20696
20758
|
title: string;
|
|
20697
20759
|
meta: Record<string, unknown> | null;
|
|
20760
|
+
url: string | null;
|
|
20698
20761
|
ticker: string;
|
|
20699
20762
|
subtype: string | null;
|
|
20700
20763
|
occurredAt: string;
|
|
20701
20764
|
precision: "second" | "day";
|
|
20702
20765
|
summary: string | null;
|
|
20703
|
-
url: string | null;
|
|
20704
20766
|
impact: number | null;
|
|
20705
20767
|
impactScale: "none" | "graded" | "binary" | "default";
|
|
20706
20768
|
sentiment: number | null;
|
|
@@ -20964,4 +21026,4 @@ declare const DEFAULT_HORIZON_QUARTERS = 5;
|
|
|
20964
21026
|
*/
|
|
20965
21027
|
declare const EXCLUDED_SOURCES: Record<string, string>;
|
|
20966
21028
|
|
|
20967
|
-
export { ACCESS_REQUEST_TTL_SECONDS, 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 AccountId, AccountIdSchema, type AccountRecord, AccountRecordSchema, type AccountRole, AccountRoleSchema, type AccountStatus, AccountStatusSchema, 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 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, type ArchitectureReferenceParams, AssetHashSchema, AuthStrategySchema, type Block, BlockSchema, schema as Bodewell, CLAIMED_DEVICE_TTL_SECONDS, ClockAppConfigSchema, type CompanyNewsParams, type CompanyProfileParams, type CounterpartyGraphParams, type CounterpartyNode, CounterpartyNodeSchema, type CounterpartyResolution, CounterpartyResolutionSchema, type CounterpartyType, CounterpartyTypeSchema, DEFAULT_CHAT_MODEL, DEFAULT_DEVICE_CONFIG, DEFAULT_HORIZON_QUARTERS, DEFAULT_PRO_MODEL, DEFAULT_SCHEMA_MODEL, DEFAULT_THEME_TOKENS, DEVICE_AP_SSID_PREFIX, DEVICE_ENDPOINTS, DEVICE_FRESH_MS, DEVICE_GLYPHS, DEVICE_LABEL_MAX, DEVICE_PALETTE, DEVICE_STALE_MS, DEVICE_TIMEZONES, DEVICE_TIMEZONE_FALLBACK, DEVICE_TTL_SECONDS, DEVICE_UNKNOWN_GLYPH, DEVICE_VITALS_FIELDS, type DailyPricePoint, DailyPricePointSchema, type DeliveredApp, DeliveredAppSchema, type DeviceAppId, DeviceAppIdSchema, DeviceAppsSchema, type DeviceConfig, DeviceConfigSchema, DeviceDisplayConfigSchema, type DeviceGlyph, type DeviceId, DeviceIdSchema, type DeviceKind, DeviceKindSchema, type DeviceRecord, DeviceRecordSchema, type DeviceRegistration, DeviceRegistrationSchema, type DeviceSeen, DeviceSeenSchema, type DeviceStatus, DeviceStatusSchema, DeviceThemeSchema, type DeviceTimeZone, type DeviceVitals, DeviceVitalsSchema, type DivergenceMetric, DivergenceMetricSchema, type DivergenceMetricsParams, EVENT_KIND_LABELS, EXCLUDED_SOURCES, type EntityDefinition, type EntityEvent, type EntityEventDensity, type EntityEventDensityBucket, EntityEventDensityBucketSchema, EntityEventDensitySchema, type EntityEventFacet, EntityEventFacetSchema, type EntityEventFacets, EntityEventFacetsSchema, type EntityEventKind, EntityEventKindSchema, EntityEventSchema, type EntityPriceSeries, EntityPriceSeriesSchema, EntitySchema, type EventBucketSize, EventBucketSizeSchema, type EventSource, EventSourceSchema, type FieldDefinition, FieldSchema, type FloraTelemetry, FloraTelemetrySchema, GENESIS_LIBRARY_CONTEXT, GENESIS_VALID_COMPONENTS, type GenesisComponentType, IMAGE_MAX_DRAWN, IMAGE_MAX_SCALE, IMPACT_FLAG_THRESHOLD, INVITE_TTL_SECONDS, type ImpactScale, ImpactScaleSchema, type InviteRecord, InviteRecordSchema, type LiveQuoteParams, MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH, type NonPublicEntity, NonPublicEntitySchema, ORIGINAL_MAX_BYTES, ORIGINAL_MAX_SIDE, type OwnedSendRequest, OwnedSendRequestSchema, PHOTOS_PER_ACCOUNT, PHOTO_UPLOADS_PER_HOUR, PROVIDER_DEFAULT_MODEL, type PageDefinition, PageSchema, type PageSection, PageSectionSchema, type PaginatedEntityEvents, PaginatedEntityEventsSchema, type PairCode, PairCodeSchema, type PhotoSummary, PhotoSummarySchema, type PhotoUpload, PhotoUploadSchema, type ProviderDefaultModelKey, type ProvisioningState, ProvisioningStateSchema, type PublicAccount, PublicAccountSchema, RETRO_RENDITION, type RelationshipEdge, RelationshipEdgeSchema, type RelationshipEdgeType, RelationshipEdgeTypeSchema, type ResourceDefinition, ResourceSchema, SCRYPT_PARAMS, SENTIMENT_NEUTRAL, SESSION_COOKIE_NAME, SESSION_TTL_SECONDS, SIGNAL_DOMAINS, SIGNAL_KINDS, SIGNAL_KIND_LABELS, SIGNAL_SOURCES, 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 Signal, type SignalArray, SignalArraySchema, type SignalDefinition, type SignalDomain, type SignalKind, SignalKindSchema, type SignalPacket, SignalPacketSchema, SignalSchema, type SignalSource, SignalSourceSchema, type SignalWeight, SignalWeightSchema, type StockChartParams, THEME_PRESETS, THEME_SYSTEM_PROMPT, type TelemetryGraphParams, type ThemeFonts, ThemeFontsSchema, type ThemeOverrides, ThemeOverridesSchema, type ThemePreset, type ThemeTokens, ThemeTokensSchema, type TimestampPrecision, TimestampPrecisionSchema, type ToolCall, type ToolDefinition, TriggerSchema, type User, UserSchema, type VitalSource, VitalSourceSchema, WeatherAppConfigSchema, type WorkflowDefinition, WorkflowSchema, architectureReferenceParameters, companyNewsParameters, companyProfileParameters, counterpartyGraphParameters, divergenceMetricsParameters, liveQuoteParameters, stockChartParameters, telemetryGraphParameters };
|
|
21029
|
+
export { ACCESS_REQUEST_TTL_SECONDS, 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 AccountId, AccountIdSchema, type AccountRecord, AccountRecordSchema, type AccountRole, AccountRoleSchema, type AccountStatus, AccountStatusSchema, 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 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, type ArchitectureReferenceParams, AssetHashSchema, AuthStrategySchema, type Block, BlockSchema, schema as Bodewell, CLAIMED_DEVICE_TTL_SECONDS, ClockAppConfigSchema, type CompanyNewsParams, type CompanyProfileParams, type CounterpartyGraphParams, type CounterpartyNode, CounterpartyNodeSchema, type CounterpartyResolution, CounterpartyResolutionSchema, type CounterpartyType, CounterpartyTypeSchema, DEFAULT_CHAT_MODEL, DEFAULT_DEVICE_CONFIG, DEFAULT_HORIZON_QUARTERS, DEFAULT_PRO_MODEL, DEFAULT_SCHEMA_MODEL, DEFAULT_THEME_TOKENS, DEVICE_AP_SSID_PREFIX, DEVICE_ENDPOINTS, DEVICE_FRESH_MS, DEVICE_GLYPHS, DEVICE_LABEL_MAX, DEVICE_PALETTE, DEVICE_STALE_MS, DEVICE_TIMEZONES, DEVICE_TIMEZONE_FALLBACK, DEVICE_TTL_SECONDS, DEVICE_UNKNOWN_GLYPH, DEVICE_VITALS_FIELDS, type DailyPricePoint, DailyPricePointSchema, type DeliveredApp, DeliveredAppSchema, type DeviceAppId, DeviceAppIdSchema, DeviceAppsSchema, type DeviceConfig, DeviceConfigSchema, DeviceDisplayConfigSchema, type DeviceGlyph, type DeviceId, DeviceIdSchema, type DeviceKind, DeviceKindSchema, type DeviceRecord, DeviceRecordSchema, type DeviceRegistration, DeviceRegistrationSchema, type DeviceSeen, DeviceSeenSchema, type DeviceStatus, DeviceStatusSchema, DeviceThemeSchema, type DeviceTimeZone, type DeviceVitals, DeviceVitalsSchema, type DivergenceMetric, DivergenceMetricSchema, type DivergenceMetricsParams, EVENT_KIND_LABELS, EXCLUDED_SOURCES, type EntityDefinition, type EntityEvent, type EntityEventDensity, type EntityEventDensityBucket, EntityEventDensityBucketSchema, EntityEventDensitySchema, type EntityEventFacet, EntityEventFacetSchema, type EntityEventFacets, EntityEventFacetsSchema, type EntityEventKind, EntityEventKindSchema, EntityEventSchema, type EntityPriceSeries, EntityPriceSeriesSchema, EntitySchema, type EventBucketSize, EventBucketSizeSchema, type EventSource, EventSourceSchema, FIRMWARE_UPDATE_ATTEMPTS, FIRMWARE_UPDATE_PREFIX, type FieldDefinition, FieldSchema, type FirmwareUpdate, FirmwareUpdateSchema, type FloraTelemetry, FloraTelemetrySchema, GENESIS_LIBRARY_CONTEXT, GENESIS_VALID_COMPONENTS, type GenesisComponentType, IMAGE_MAX_DRAWN, IMAGE_MAX_SCALE, IMPACT_FLAG_THRESHOLD, INVITE_TTL_SECONDS, type ImpactScale, ImpactScaleSchema, type InviteRecord, InviteRecordSchema, type LiveQuoteParams, MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH, type NonPublicEntity, NonPublicEntitySchema, ORIGINAL_MAX_BYTES, ORIGINAL_MAX_SIDE, type OwnedSendRequest, OwnedSendRequestSchema, PHOTOS_PER_ACCOUNT, PHOTO_UPLOADS_PER_HOUR, PROVIDER_DEFAULT_MODEL, type PageDefinition, PageSchema, type PageSection, PageSectionSchema, type PaginatedEntityEvents, PaginatedEntityEventsSchema, type PairCode, PairCodeSchema, type PhotoSummary, PhotoSummarySchema, type PhotoUpload, PhotoUploadSchema, type ProviderDefaultModelKey, type ProvisioningState, ProvisioningStateSchema, type PublicAccount, PublicAccountSchema, RETRO_RENDITION, type RelationshipEdge, RelationshipEdgeSchema, type RelationshipEdgeType, RelationshipEdgeTypeSchema, type ResourceDefinition, ResourceSchema, SCRYPT_PARAMS, SENTIMENT_NEUTRAL, SESSION_COOKIE_NAME, SESSION_TTL_SECONDS, SIGNAL_DOMAINS, SIGNAL_KINDS, SIGNAL_KIND_LABELS, SIGNAL_SOURCES, 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 Signal, type SignalArray, SignalArraySchema, type SignalDefinition, type SignalDomain, type SignalKind, SignalKindSchema, type SignalPacket, SignalPacketSchema, SignalSchema, type SignalSource, SignalSourceSchema, type SignalWeight, SignalWeightSchema, type StockChartParams, THEME_PRESETS, THEME_SYSTEM_PROMPT, type TelemetryGraphParams, type ThemeFonts, ThemeFontsSchema, type ThemeOverrides, ThemeOverridesSchema, type ThemePreset, type ThemeTokens, ThemeTokensSchema, type TimestampPrecision, TimestampPrecisionSchema, type ToolCall, type ToolDefinition, TriggerSchema, type User, UserSchema, type VitalSource, VitalSourceSchema, WeatherAppConfigSchema, type WorkflowDefinition, WorkflowSchema, architectureReferenceParameters, companyNewsParameters, companyProfileParameters, counterpartyGraphParameters, divergenceMetricsParameters, liveQuoteParameters, stockChartParameters, telemetryGraphParameters };
|
package/dist/index.js
CHANGED
|
@@ -723,6 +723,15 @@ var DeviceRecordSchema = z8.object({
|
|
|
723
723
|
var DEVICE_LABEL_MAX = 48;
|
|
724
724
|
var DEVICE_TTL_SECONDS = 60 * 60 * 24 * 30;
|
|
725
725
|
var CLAIMED_DEVICE_TTL_SECONDS = 60 * 60 * 24 * 400;
|
|
726
|
+
var FirmwareUpdateSchema = z8.object({
|
|
727
|
+
version: z8.string().min(1).max(40),
|
|
728
|
+
url: z8.string().url().max(200),
|
|
729
|
+
sha256: z8.string().regex(/^[0-9a-f]{64}$/),
|
|
730
|
+
bytes: z8.number().int().positive(),
|
|
731
|
+
requestedAt: z8.number().int().nonnegative()
|
|
732
|
+
});
|
|
733
|
+
var FIRMWARE_UPDATE_PREFIX = "https://www.ramme.io/firmware/weather-display/";
|
|
734
|
+
var FIRMWARE_UPDATE_ATTEMPTS = 3;
|
|
726
735
|
|
|
727
736
|
// src/apps/vitals.ts
|
|
728
737
|
import { z as z9 } from "zod";
|
|
@@ -762,7 +771,19 @@ var DeviceSeenSchema = z9.object({
|
|
|
762
771
|
/** When the board last asked for its app. The freshest signal this system has. */
|
|
763
772
|
lastPollAt: z9.number().int().nonnegative(),
|
|
764
773
|
/** The revision it reported drawing at that moment. */
|
|
765
|
-
drewRevision: z9.number().int().nonnegative().optional()
|
|
774
|
+
drewRevision: z9.number().int().nonnegative().optional(),
|
|
775
|
+
/**
|
|
776
|
+
* The firmware it is running, sent on every poll by builds that can update
|
|
777
|
+
* remotely — so its presence is also the answer to "can this board be
|
|
778
|
+
* updated from its page?". Registration reports the version too, but only
|
|
779
|
+
* every six hours; after a remote update this is what shows it took.
|
|
780
|
+
*/
|
|
781
|
+
firmware: z9.string().max(40).optional(),
|
|
782
|
+
/** Photos its app names, and how many of those it holds in flash. */
|
|
783
|
+
photosWanted: z9.number().int().nonnegative().optional(),
|
|
784
|
+
photosHeld: z9.number().int().nonnegative().optional(),
|
|
785
|
+
/** What happened to the last firmware update it tried, in a few words. */
|
|
786
|
+
updateResult: z9.string().max(80).optional()
|
|
766
787
|
});
|
|
767
788
|
var DEVICE_VITALS_FIELDS = [
|
|
768
789
|
{
|
|
@@ -1789,7 +1810,10 @@ export {
|
|
|
1789
1810
|
EntitySchema,
|
|
1790
1811
|
EventBucketSizeSchema,
|
|
1791
1812
|
EventSourceSchema,
|
|
1813
|
+
FIRMWARE_UPDATE_ATTEMPTS,
|
|
1814
|
+
FIRMWARE_UPDATE_PREFIX,
|
|
1792
1815
|
FieldSchema,
|
|
1816
|
+
FirmwareUpdateSchema,
|
|
1793
1817
|
FloraTelemetrySchema,
|
|
1794
1818
|
GENESIS_LIBRARY_CONTEXT,
|
|
1795
1819
|
GENESIS_VALID_COMPONENTS,
|