@objectstack/runtime 6.8.1 → 7.0.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.d.cts CHANGED
@@ -93,7 +93,6 @@ declare const StandaloneStackConfigSchema: z.ZodObject<{
93
93
  postgres: "postgres";
94
94
  sqlite: "sqlite";
95
95
  "sqlite-wasm": "sqlite-wasm";
96
- turso: "turso";
97
96
  mongodb: "mongodb";
98
97
  }>>;
99
98
  environmentId: z.ZodOptional<z.ZodString>;
@@ -225,6 +224,8 @@ declare class AppPlugin implements Plugin {
225
224
  version?: string;
226
225
  private bundle;
227
226
  private projectContext?;
227
+ /** When true, init/start become no-ops — env has no app payload. */
228
+ private readonly empty;
228
229
  constructor(bundle: any, projectContext?: AppPluginProjectContext);
229
230
  init: (ctx: PluginContext) => Promise<void>;
230
231
  start: (ctx: PluginContext) => Promise<void>;
@@ -1486,7 +1487,7 @@ declare class HttpDispatcher {
1486
1487
  * Handle AI service routes (/ai/chat, /ai/models, /ai/conversations, etc.)
1487
1488
  * Resolves the AI service and its built-in route handlers, then dispatches.
1488
1489
  */
1489
- handleAI(subPath: string, method: string, body: any, query: any, _context: HttpProtocolContext): Promise<HttpDispatcherResult>;
1490
+ handleAI(subPath: string, method: string, body: any, query: any, context: HttpProtocolContext): Promise<HttpDispatcherResult>;
1490
1491
  /**
1491
1492
  * Main Dispatcher Entry Point
1492
1493
  * Routes the request to the appropriate handler based on path and precedence
@@ -1929,11 +1930,22 @@ interface MarketplaceProxyPluginConfig {
1929
1930
  * explaining marketplace is unavailable in this runtime.
1930
1931
  */
1931
1932
  controlPlaneUrl?: string;
1933
+ /**
1934
+ * Disable the in-memory response cache (testing / debugging).
1935
+ * Defaults to the value of `OS_MARKETPLACE_CACHE` (anything in
1936
+ * {"off","false","0","no"} disables).
1937
+ */
1938
+ cacheDisabled?: boolean;
1939
+ /**
1940
+ * Override the LRU upper bound. Defaults to 200 entries.
1941
+ */
1942
+ cacheMaxEntries?: number;
1932
1943
  }
1933
1944
  declare class MarketplaceProxyPlugin implements Plugin {
1934
1945
  readonly name = "com.objectstack.runtime.marketplace-proxy";
1935
1946
  readonly version = "1.0.0";
1936
1947
  private readonly cloudUrl;
1948
+ private readonly cache;
1937
1949
  constructor(config?: MarketplaceProxyPluginConfig);
1938
1950
  init: (_ctx: PluginContext) => Promise<void>;
1939
1951
  start: (ctx: PluginContext) => Promise<void>;
@@ -1985,6 +1997,29 @@ declare class MarketplaceInstallLocalPlugin implements Plugin {
1985
1997
  * dev / single-tenant runtimes. Stricter checks can be layered on
1986
1998
  * via a middleware in cloud-hosted multi-tenant deployments.
1987
1999
  */
2000
+ /**
2001
+ * POST /api/v1/marketplace/install-local/:manifestId/reseed-sample-data
2002
+ *
2003
+ * Re-runs SeedLoaderService against the cached manifest's `data` arrays.
2004
+ * Idempotent (upsert by id). Useful when:
2005
+ * • The user installed an app and skipped sample data
2006
+ * • A purge was undone
2007
+ * • The user wants a clean baseline back after editing demo rows
2008
+ *
2009
+ * Multi-tenant: requires an active organization on the session (same
2010
+ * rule as install seed path).
2011
+ */
2012
+ private handleReseed;
2013
+ /**
2014
+ * POST /api/v1/marketplace/install-local/:manifestId/purge-sample-data
2015
+ *
2016
+ * Deletes every record whose id is declared in the cached manifest's
2017
+ * seed datasets. Uses the `driver` service directly to bypass ACL /
2018
+ * lifecycle hooks (same pattern as cloud purge). User-created records
2019
+ * are never touched — only ids declared in the package's bundled
2020
+ * datasets are removed. Already-deleted rows count as `skipped`.
2021
+ */
2022
+ private handlePurge;
1988
2023
  /**
1989
2024
  * Replicate the start-time side-effects that AppPlugin runs for
1990
2025
  * statically-declared apps but the `manifest` service does NOT:
@@ -2065,6 +2100,15 @@ interface RuntimeConfigPluginConfig {
2065
2100
  * multi-tenant ObjectOS.
2066
2101
  */
2067
2102
  singleEnvironment?: boolean;
2103
+ /**
2104
+ * Product name shown in browser title, splash screen, and other
2105
+ * client chrome. Operators can override per-deployment (white-label,
2106
+ * regional rebrands). Falls back to `OS_PRODUCT_NAME` env var, then
2107
+ * to the default `'ObjectOS'`.
2108
+ */
2109
+ productName?: string;
2110
+ /** Short product name (PWA shortName, compact spots). Defaults to productName. */
2111
+ productShortName?: string;
2068
2112
  }
2069
2113
  declare class RuntimeConfigPlugin implements Plugin {
2070
2114
  readonly name = "com.objectstack.runtime.runtime-config";
@@ -2072,6 +2116,8 @@ declare class RuntimeConfigPlugin implements Plugin {
2072
2116
  private readonly cloudUrl;
2073
2117
  private readonly installLocal;
2074
2118
  private readonly singleEnvironment;
2119
+ private readonly productName;
2120
+ private readonly productShortName;
2075
2121
  constructor(config?: RuntimeConfigPluginConfig);
2076
2122
  init: (_ctx: PluginContext) => Promise<void>;
2077
2123
  start: (ctx: PluginContext) => Promise<void>;
package/dist/index.d.ts CHANGED
@@ -93,7 +93,6 @@ declare const StandaloneStackConfigSchema: z.ZodObject<{
93
93
  postgres: "postgres";
94
94
  sqlite: "sqlite";
95
95
  "sqlite-wasm": "sqlite-wasm";
96
- turso: "turso";
97
96
  mongodb: "mongodb";
98
97
  }>>;
99
98
  environmentId: z.ZodOptional<z.ZodString>;
@@ -225,6 +224,8 @@ declare class AppPlugin implements Plugin {
225
224
  version?: string;
226
225
  private bundle;
227
226
  private projectContext?;
227
+ /** When true, init/start become no-ops — env has no app payload. */
228
+ private readonly empty;
228
229
  constructor(bundle: any, projectContext?: AppPluginProjectContext);
229
230
  init: (ctx: PluginContext) => Promise<void>;
230
231
  start: (ctx: PluginContext) => Promise<void>;
@@ -1486,7 +1487,7 @@ declare class HttpDispatcher {
1486
1487
  * Handle AI service routes (/ai/chat, /ai/models, /ai/conversations, etc.)
1487
1488
  * Resolves the AI service and its built-in route handlers, then dispatches.
1488
1489
  */
1489
- handleAI(subPath: string, method: string, body: any, query: any, _context: HttpProtocolContext): Promise<HttpDispatcherResult>;
1490
+ handleAI(subPath: string, method: string, body: any, query: any, context: HttpProtocolContext): Promise<HttpDispatcherResult>;
1490
1491
  /**
1491
1492
  * Main Dispatcher Entry Point
1492
1493
  * Routes the request to the appropriate handler based on path and precedence
@@ -1929,11 +1930,22 @@ interface MarketplaceProxyPluginConfig {
1929
1930
  * explaining marketplace is unavailable in this runtime.
1930
1931
  */
1931
1932
  controlPlaneUrl?: string;
1933
+ /**
1934
+ * Disable the in-memory response cache (testing / debugging).
1935
+ * Defaults to the value of `OS_MARKETPLACE_CACHE` (anything in
1936
+ * {"off","false","0","no"} disables).
1937
+ */
1938
+ cacheDisabled?: boolean;
1939
+ /**
1940
+ * Override the LRU upper bound. Defaults to 200 entries.
1941
+ */
1942
+ cacheMaxEntries?: number;
1932
1943
  }
1933
1944
  declare class MarketplaceProxyPlugin implements Plugin {
1934
1945
  readonly name = "com.objectstack.runtime.marketplace-proxy";
1935
1946
  readonly version = "1.0.0";
1936
1947
  private readonly cloudUrl;
1948
+ private readonly cache;
1937
1949
  constructor(config?: MarketplaceProxyPluginConfig);
1938
1950
  init: (_ctx: PluginContext) => Promise<void>;
1939
1951
  start: (ctx: PluginContext) => Promise<void>;
@@ -1985,6 +1997,29 @@ declare class MarketplaceInstallLocalPlugin implements Plugin {
1985
1997
  * dev / single-tenant runtimes. Stricter checks can be layered on
1986
1998
  * via a middleware in cloud-hosted multi-tenant deployments.
1987
1999
  */
2000
+ /**
2001
+ * POST /api/v1/marketplace/install-local/:manifestId/reseed-sample-data
2002
+ *
2003
+ * Re-runs SeedLoaderService against the cached manifest's `data` arrays.
2004
+ * Idempotent (upsert by id). Useful when:
2005
+ * • The user installed an app and skipped sample data
2006
+ * • A purge was undone
2007
+ * • The user wants a clean baseline back after editing demo rows
2008
+ *
2009
+ * Multi-tenant: requires an active organization on the session (same
2010
+ * rule as install seed path).
2011
+ */
2012
+ private handleReseed;
2013
+ /**
2014
+ * POST /api/v1/marketplace/install-local/:manifestId/purge-sample-data
2015
+ *
2016
+ * Deletes every record whose id is declared in the cached manifest's
2017
+ * seed datasets. Uses the `driver` service directly to bypass ACL /
2018
+ * lifecycle hooks (same pattern as cloud purge). User-created records
2019
+ * are never touched — only ids declared in the package's bundled
2020
+ * datasets are removed. Already-deleted rows count as `skipped`.
2021
+ */
2022
+ private handlePurge;
1988
2023
  /**
1989
2024
  * Replicate the start-time side-effects that AppPlugin runs for
1990
2025
  * statically-declared apps but the `manifest` service does NOT:
@@ -2065,6 +2100,15 @@ interface RuntimeConfigPluginConfig {
2065
2100
  * multi-tenant ObjectOS.
2066
2101
  */
2067
2102
  singleEnvironment?: boolean;
2103
+ /**
2104
+ * Product name shown in browser title, splash screen, and other
2105
+ * client chrome. Operators can override per-deployment (white-label,
2106
+ * regional rebrands). Falls back to `OS_PRODUCT_NAME` env var, then
2107
+ * to the default `'ObjectOS'`.
2108
+ */
2109
+ productName?: string;
2110
+ /** Short product name (PWA shortName, compact spots). Defaults to productName. */
2111
+ productShortName?: string;
2068
2112
  }
2069
2113
  declare class RuntimeConfigPlugin implements Plugin {
2070
2114
  readonly name = "com.objectstack.runtime.runtime-config";
@@ -2072,6 +2116,8 @@ declare class RuntimeConfigPlugin implements Plugin {
2072
2116
  private readonly cloudUrl;
2073
2117
  private readonly installLocal;
2074
2118
  private readonly singleEnvironment;
2119
+ private readonly productName;
2120
+ private readonly productShortName;
2075
2121
  constructor(config?: RuntimeConfigPluginConfig);
2076
2122
  init: (_ctx: PluginContext) => Promise<void>;
2077
2123
  start: (ctx: PluginContext) => Promise<void>;