apps 0.0.1-beta.7 → 0.0.1-beta.73

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.
Files changed (178) hide show
  1. package/README.md +25 -22
  2. package/framework-reference.json +1 -1
  3. package/js/{chunk-RJDDBDSN.js → chunk-3CVQ3VPP.js} +762 -171
  4. package/js/chunk-3R3KFCDU.js +426 -0
  5. package/js/chunk-5FHWNLCI.js +88 -0
  6. package/js/{chunk-M3B3DE4K.js → chunk-74YVXBKY.js} +463 -218
  7. package/js/chunk-7LMU3ER3.js +274 -0
  8. package/js/chunk-CDXQDN7W.js +92 -0
  9. package/js/{chunk-RFVIONFX.js → chunk-ECCWT5GJ.js} +79 -41
  10. package/js/{chunk-UK573G7W.js → chunk-EOPQ727L.js} +87 -51
  11. package/js/{chunk-CMYUWAX7.js → chunk-G7L5DHQX.js} +126 -31
  12. package/js/{chunk-27F7W2LG.js → chunk-H2CJWXA3.js} +2 -2
  13. package/js/{chunk-JU7VHODU.js → chunk-H72MEDMN.js} +65 -10
  14. package/js/{chunk-CDL5PM2Q.js → chunk-IFJU5SYQ.js} +19082 -18402
  15. package/js/{chunk-VFZKSM3T.js → chunk-JPEUKEV4.js} +3 -3
  16. package/js/{chunk-WLE7WX2U.js → chunk-JW5LYSER.js} +2262 -474
  17. package/js/{chunk-5T57N25Q.js → chunk-KGCTYL2S.js} +511 -63
  18. package/js/{chunk-KUMBKVJD.js → chunk-KLYSEHUD.js} +2 -2
  19. package/js/chunk-LTF4TLMO.js +347 -0
  20. package/js/chunk-MHB7IFG7.js +49 -0
  21. package/js/{chunk-FL2QR3XW.js → chunk-OBYMFSWA.js} +333 -69
  22. package/js/chunk-OD3KFKZD.js +1617 -0
  23. package/js/{chunk-57RKNWL2.js → chunk-PD6I2SDG.js} +4 -4
  24. package/js/{chunk-72JNVHPK.js → chunk-QGHGYH5V.js} +4 -3
  25. package/js/{chunk-NKLWZJLE.js → chunk-RUP4JMKO.js} +25 -14
  26. package/js/{chunk-IJX4CYZO.js → chunk-TUMGL2OC.js} +228 -264
  27. package/js/{chunk-UESPOTUI.js → chunk-WCVV4PPS.js} +899 -190
  28. package/js/{chunk-IPI4MFSN.js → chunk-XBG7HHXC.js} +2 -2
  29. package/js/{chunk-Z5M2LQOZ.js → chunk-ZEJ3IKEC.js} +67 -55
  30. package/js/chunk-ZR7QAG67.js +171 -0
  31. package/js/client.js +142 -94
  32. package/js/contracts.js +125 -26
  33. package/js/effect.js +19 -19
  34. package/js/{es-APDZKREY.js → es-DIULA3ZF.js} +62 -1659
  35. package/js/graphql.js +50 -40
  36. package/js/host.js +83 -58
  37. package/js/index.js +131 -46
  38. package/js/mcp/effect.js +23 -21
  39. package/js/mcp/stdio.js +44 -34
  40. package/js/mcp.js +76 -53
  41. package/js/openapi.js +4071 -1357
  42. package/js/react.js +2 -3
  43. package/js/skills/effect.js +6 -3
  44. package/js/skills.js +208 -81
  45. package/js/storage/facet.js +1 -540
  46. package/js/ui/auth/contracts.js +2 -2
  47. package/js/ui/auth.js +5 -5
  48. package/js/ui/contracts.js +5 -4
  49. package/js/ui/serving.js +8517 -214
  50. package/package.json +3 -4
  51. package/runtime.json +1 -1
  52. package/types/app-cache/src/contracts/cache.d.ts +2 -0
  53. package/types/app-cache/src/index.d.ts +10 -1
  54. package/types/apps/src/contracts/api-response-error.d.ts +4 -0
  55. package/types/apps/src/contracts/app.d.ts +7 -3
  56. package/types/apps/src/contracts/cache.d.ts +20 -0
  57. package/types/apps/src/contracts/context.d.ts +19 -11
  58. package/types/apps/src/contracts/elicitation.d.ts +6 -6
  59. package/types/apps/src/contracts/events.d.ts +93 -0
  60. package/types/apps/src/contracts/failure.d.ts +30 -1
  61. package/types/apps/src/contracts/graphql.d.ts +2 -1
  62. package/types/apps/src/contracts/host.d.ts +641 -16
  63. package/types/apps/src/contracts/live.d.ts +2 -0
  64. package/types/apps/src/contracts/mcp.d.ts +80 -10
  65. package/types/apps/src/contracts/network.d.ts +120 -0
  66. package/types/apps/src/contracts/openapi-compile.d.ts +82 -3
  67. package/types/apps/src/contracts/openapi.d.ts +41 -9
  68. package/types/apps/src/contracts/operations.d.ts +8 -4
  69. package/types/apps/src/contracts/placement.d.ts +102 -0
  70. package/types/apps/src/contracts/protocol-version.d.ts +2 -2
  71. package/types/apps/src/contracts/protocols/1.d.ts +733 -81
  72. package/types/apps/src/contracts/protocols/10.d.ts +1450 -0
  73. package/types/apps/src/contracts/protocols/2.d.ts +69 -26
  74. package/types/apps/src/contracts/protocols/3.d.ts +133 -33
  75. package/types/apps/src/contracts/protocols/4.d.ts +122 -45
  76. package/types/apps/src/contracts/protocols/5.d.ts +157 -47
  77. package/types/apps/src/contracts/protocols/6.d.ts +1629 -0
  78. package/types/apps/src/contracts/protocols/7.d.ts +1785 -0
  79. package/types/apps/src/contracts/protocols/8.d.ts +1182 -0
  80. package/types/apps/src/contracts/protocols/9.d.ts +1104 -0
  81. package/types/apps/src/contracts/protocols/current.d.ts +3842 -0
  82. package/types/apps/src/contracts/protocols/oauth-6.d.ts +74 -0
  83. package/types/apps/src/contracts/protocols/oauth.d.ts +134 -0
  84. package/types/apps/src/contracts/provider-error.d.ts +9 -0
  85. package/types/apps/src/contracts/provider.d.ts +90 -6
  86. package/types/apps/src/contracts/skills.d.ts +50 -13
  87. package/types/apps/src/contracts/sql.d.ts +63 -0
  88. package/types/apps/src/contracts/ui.d.ts +19 -1
  89. package/types/apps/src/contracts/workflows.d.ts +6 -0
  90. package/types/apps/src/facet.d.ts +4 -5
  91. package/types/apps/src/host.d.ts +5 -0
  92. package/types/apps/src/implementation/account-router.d.ts +4 -3
  93. package/types/apps/src/implementation/authoring.d.ts +25 -5
  94. package/types/apps/src/implementation/browser-scripts.gen.d.ts +6 -0
  95. package/types/apps/src/implementation/cache.d.ts +4 -0
  96. package/types/apps/src/implementation/catalog-cache.d.ts +35 -4
  97. package/types/apps/src/implementation/elicitation.d.ts +18 -15
  98. package/types/apps/src/implementation/events.d.ts +59 -0
  99. package/types/apps/src/implementation/failure-detail.d.ts +25 -3
  100. package/types/apps/src/implementation/graphql-catalog.d.ts +3 -3
  101. package/types/apps/src/implementation/graphql.d.ts +4 -3
  102. package/types/apps/src/implementation/input-problems.d.ts +6 -2
  103. package/types/apps/src/implementation/invocation-timing.d.ts +16 -0
  104. package/types/apps/src/implementation/live.d.ts +2 -2
  105. package/types/apps/src/implementation/mcp-call.d.ts +6 -5
  106. package/types/apps/src/implementation/mcp-catalog.d.ts +6 -4
  107. package/types/apps/src/implementation/mcp-client.d.ts +17 -9
  108. package/types/apps/src/implementation/mcp-stdio.d.ts +1 -1
  109. package/types/apps/src/implementation/mcp-tools.d.ts +2 -1
  110. package/types/apps/src/implementation/mcp.d.ts +20 -9
  111. package/types/apps/src/implementation/network.d.ts +16 -0
  112. package/types/apps/src/implementation/openapi-compile.d.ts +26 -6
  113. package/types/apps/src/implementation/openapi-document.d.ts +46 -19
  114. package/types/apps/src/implementation/openapi-names.d.ts +9 -4
  115. package/types/apps/src/implementation/openapi-request.d.ts +10 -2
  116. package/types/apps/src/implementation/openapi-source.d.ts +18 -0
  117. package/types/apps/src/implementation/openapi-upgrade.d.ts +4 -0
  118. package/types/apps/src/implementation/operations.d.ts +17 -2
  119. package/types/apps/src/implementation/optimistic.d.ts +1 -1
  120. package/types/apps/src/implementation/placement.d.ts +60 -0
  121. package/types/apps/src/implementation/protocol-operations.d.ts +3 -0
  122. package/types/apps/src/implementation/provider-error.d.ts +28 -1
  123. package/types/apps/src/implementation/provider.d.ts +18 -3
  124. package/types/apps/src/implementation/query-commit.d.ts +1 -1
  125. package/types/apps/src/implementation/router-catalog.d.ts +11 -13
  126. package/types/apps/src/implementation/router.d.ts +16 -5
  127. package/types/apps/src/implementation/runtime-yield.d.ts +7 -0
  128. package/types/apps/src/implementation/schema.d.ts +90 -10
  129. package/types/apps/src/implementation/skills.d.ts +18 -24
  130. package/types/apps/src/implementation/sql.d.ts +71 -0
  131. package/types/apps/src/implementation/ui-account-notice.d.ts +9 -0
  132. package/types/apps/src/implementation/ui-auth.d.ts +1 -1
  133. package/types/apps/src/implementation/ui-client.d.ts +2 -2
  134. package/types/apps/src/implementation/ui-document.d.ts +5 -0
  135. package/types/apps/src/implementation/ui-errors.d.ts +1 -1
  136. package/types/apps/src/implementation/ui-serving.d.ts +11 -5
  137. package/types/apps/src/implementation/ui-watch.d.ts +1 -1
  138. package/types/apps/src/implementation/upstream-error.d.ts +7 -0
  139. package/types/apps/src/implementation/webhooks.d.ts +1 -1
  140. package/types/apps/src/implementation/workflows.d.ts +1 -1
  141. package/types/apps/src/index.d.ts +55 -13
  142. package/types/apps/src/mcp.d.ts +20 -1
  143. package/types/apps/src/openapi.d.ts +1 -1
  144. package/types/apps/src/react.d.ts +1 -1
  145. package/types/apps/src/skills.d.ts +10 -8
  146. package/types/telemetry/src/app-records.d.ts +42 -0
  147. package/types/telemetry/src/browser-operations.d.ts +7 -4
  148. package/types/telemetry/src/browser.d.ts +8 -3
  149. package/types/telemetry/src/config.d.ts +2 -2
  150. package/types/telemetry/src/index.d.ts +2 -1
  151. package/types/telemetry/src/layer.d.ts +2 -2
  152. package/types/telemetry/src/measurements.d.ts +1 -1
  153. package/types/telemetry/src/ownership.d.ts +56 -0
  154. package/types/telemetry/src/recorded-failure.d.ts +29 -0
  155. package/types/telemetry/src/relay.d.ts +16 -6
  156. package/types/telemetry/src/span-attributes.d.ts +17 -1
  157. package/types/telemetry/src/transport.d.ts +8 -1
  158. package/types/utils/src/api-error.d.ts +55 -0
  159. package/types/utils/src/connection-failure.d.ts +33 -0
  160. package/types/utils/src/recorded-message.d.ts +18 -0
  161. package/types/utils/src/user-facing-error.d.ts +83 -0
  162. package/js/chunk-MKWZPDR6.js +0 -63
  163. package/js/chunk-N7YDVXYJ.js +0 -186
  164. package/js/chunk-OCYUEU47.js +0 -224
  165. package/js/chunk-PJJ24GU7.js +0 -877
  166. package/js/chunk-PZB6T6KU.js +0 -19
  167. package/js/chunk-R3EV5FTO.js +0 -97
  168. package/js/chunk-YXQHV65J.js +0 -242
  169. package/js/chunk-ZQINWV4W.js +0 -630
  170. package/types/app-data/src/implementation/cursor.d.ts +0 -10
  171. package/types/app-data/src/implementation/index-key.d.ts +0 -7
  172. package/types/app-data/src/implementation/promise.d.ts +0 -68
  173. package/types/app-data/src/implementation/range.d.ts +0 -8
  174. package/types/app-data/src/implementation/schema.d.ts +0 -18
  175. package/types/app-data/src/implementation/sqlite.d.ts +0 -11
  176. package/types/app-data/src/index.d.ts +0 -4
  177. package/types/apps/src/contracts/storage.d.ts +0 -68
  178. package/types/apps/src/implementation/storage.d.ts +0 -15
@@ -1,68 +0,0 @@
1
- import { Row, type DatabaseSession } from "../contracts/database.js";
2
- /** Index predicates are accumulated immutably, then checked against the declaration by the engine. */
3
- export interface IndexRange<Fields> {
4
- /** Constrain an index prefix field to one value. Null matches a cleared optional field. */
5
- readonly eq: <Key extends keyof Fields & string>(field: Key, value: Fields[Key] | null) => IndexRange<Fields>;
6
- /** Require a value greater than the bound on the next index field. */
7
- readonly gt: <Key extends keyof Fields & string>(field: Key, value: Fields[Key]) => IndexRange<Fields>;
8
- /** Require a value greater than or equal to the bound on the next index field. */
9
- readonly gte: <Key extends keyof Fields & string>(field: Key, value: Fields[Key]) => IndexRange<Fields>;
10
- /** Require a value less than the bound on the next index field. */
11
- readonly lt: <Key extends keyof Fields & string>(field: Key, value: Fields[Key]) => IndexRange<Fields>;
12
- /** Require a value less than or equal to the bound on the next index field. */
13
- readonly lte: <Key extends keyof Fields & string>(field: Key, value: Fields[Key]) => IndexRange<Fields>;
14
- }
15
- /** Bounded indexed reads; collect/count reject work beyond the invocation budget. */
16
- export interface Query<Row> {
17
- /** Choose ascending or descending index order without changing this query. */
18
- readonly order: (direction: "asc" | "desc") => Query<Row>;
19
- /** Read all matching rows within the invocation budget; exceeding it fails. */
20
- readonly collect: () => Promise<readonly Row[]>;
21
- /** Count matching rows within the scan budget; exceeding it fails. */
22
- readonly count: () => Promise<number>;
23
- /** Read the first matching row, or null when no row matches. */
24
- readonly first: () => Promise<Row | null>;
25
- /** Read at most count matching rows within the invocation budget. */
26
- readonly take: (count: number) => Promise<readonly Row[]>;
27
- /** Read one cursor page. Return its rows, continuation cursor and completion flag. */
28
- readonly paginate: (options: {
29
- readonly numItems: number;
30
- readonly cursor: string | null;
31
- }) => Promise<{
32
- readonly page: readonly Row[];
33
- readonly continueCursor: string | null;
34
- readonly isDone: boolean;
35
- }>;
36
- }
37
- /** Typed table operations exposed to authored queries. */
38
- export interface ReadTable<Row, Index extends string = string> {
39
- /** Read a complete row by ID, or null when it does not exist. */
40
- readonly get: (id: string) => Promise<Row | null>;
41
- /** Select a declared index or by_creation, with optional prefix and range constraints. */
42
- readonly withIndex: (index: Index | "by_creation", range?: (query: IndexRange<Row>) => IndexRange<Row>) => Query<Row>;
43
- }
44
- /** Writes are valid only inside their owning mutation. */
45
- export interface WriteTable<Row, Insert, Index extends string = string> extends ReadTable<Row, Index> {
46
- /** Insert authored fields and return the complete row with generated id, createdAt and updatedAt. */
47
- readonly insert: (value: Insert) => Promise<Row>;
48
- /** Patch authored fields and return the complete row, or null if the ID does not exist. */
49
- readonly update: (id: string, patch: Partial<Insert>) => Promise<Row | null>;
50
- /** Delete the row and return whether it existed. */
51
- readonly delete: (id: string) => Promise<boolean>;
52
- }
53
- /** Build an untyped transport facade; the author schema layer installs exact field and row decoders. */
54
- export declare const promiseTable: (session: DatabaseSession, table: string, signal: AbortSignal) => {
55
- get: (id: string) => Promise<{
56
- readonly [x: string]: string | number | boolean;
57
- } | null>;
58
- insert: (value: unknown) => Promise<{
59
- readonly [x: string]: string | number | boolean;
60
- }>;
61
- update: (id: string, patch: unknown) => Promise<{
62
- readonly [x: string]: string | number | boolean;
63
- } | null>;
64
- delete: (id: string) => Promise<boolean>;
65
- withIndex: (index: string, range?: (query: IndexRange<Row>) => IndexRange<Row>) => Query<{
66
- readonly [x: string]: string | number | boolean;
67
- }>;
68
- };
@@ -1,8 +0,0 @@
1
- /** Index-prefix equality followed by at most one field's lower and upper bounds. */
2
- import { Effect } from "effect";
3
- import { AppDatabaseError, type QueryPlan, type Table } from "../contracts/database.js";
4
- /** Produce half-open BLOB bounds; absent optional values do not satisfy ordinary range predicates. */
5
- export declare const queryBounds: (table: Table, plan: QueryPlan, maximum: number) => Effect.Effect<{
6
- lower: Uint8Array<ArrayBufferLike>;
7
- upper: Uint8Array<ArrayBufferLike> | undefined;
8
- }, AppDatabaseError, never>;
@@ -1,18 +0,0 @@
1
- /** Validate declarations and write values before touching SQLite. */
2
- import { Effect } from "effect";
3
- import { AppDatabaseError, DatabaseFieldReserved, DatabaseSchema, RowMetadata, type Field, type Row, type Scalar, type Table } from "../contracts/database.js";
4
- /** Built-in creation ordering and stable tie-breakers apply to every index. */
5
- export declare const indexesFor: (table: Table) => {
6
- name: string;
7
- fields: string[];
8
- }[];
9
- /** Metadata fields have stable string semantics and cannot be overwritten. */
10
- export declare const fieldFor: (table: Table, name: string) => Field | undefined;
11
- /** Finite numbers and well-formed strings keep JSON and index ordering consistent. */
12
- export declare const validScalar: (field: Field, value: unknown) => value is Scalar;
13
- /** Parse the whole schema, including references and composite-index definitions. */
14
- export declare const parseDatabaseSchema: (input: unknown) => Effect.Effect<DatabaseSchema, AppDatabaseError | DatabaseFieldReserved>;
15
- /** Canonical ordering for schema fingerprints and query-bound cursors. */
16
- export declare const canonicalSchema: (schema: DatabaseSchema) => string;
17
- /** Inserts apply declared defaults; updates reject unknown/metadata fields and clear optional values with null. */
18
- export declare const writeValue: (table: Table, values: Readonly<Record<string, Scalar | null>>, previous: Row | undefined, meta: typeof RowMetadata.Type) => Effect.Effect<Record<string, string | number | boolean>, AppDatabaseError, never>;
@@ -1,11 +0,0 @@
1
- /** Shared SQLite engine. Drivers, persistent paths and app ownership belong to the host. */
2
- import { Effect } from "effect";
3
- import type { SqlClient } from "effect/unstable/sql/SqlClient";
4
- import { AppDatabaseError, DatabaseLimits, type AppDatabase } from "../contracts/database.js";
5
- /** Open a database whose storage is owned by exactly one configured app. Schema changes fail closed. */
6
- export declare const makeSqliteDatabase: (options: {
7
- readonly sql: SqlClient;
8
- readonly schema: unknown;
9
- readonly crypto: Crypto;
10
- readonly limits?: DatabaseLimits;
11
- }) => Effect.Effect<AppDatabase, AppDatabaseError>;
@@ -1,4 +0,0 @@
1
- /** Portable, app-owned database engine and contracts. */
2
- export * from "./contracts/database.js";
3
- export { makeSqliteDatabase } from "./implementation/sqlite.js";
4
- export { promiseTable, type IndexRange, type Query, type ReadTable, type WriteTable, } from "./implementation/promise.js";
@@ -1,68 +0,0 @@
1
- /** Native app data boundary. Hosts bind a configured app before exposing this capability. */
2
- import { Schema, type Effect } from "effect";
3
- import type { RowMetadata, ReadTable, WriteTable } from "../../../app-data/src/index.js";
4
- import type { Fields, ObjectValue } from "../implementation/schema.js";
5
- import type { DatabaseSchema, DatabaseSession, DatabaseError } from "../../../app-data/src/contracts/database.js";
6
- /** Names for authored operations and tables. */
7
- export declare const StorageName: Schema.NonEmptyString;
8
- declare const AppStorageUnavailable_base: Schema.Class<AppStorageUnavailable, Schema.TaggedStruct<"AppStorageUnavailable", {}>, import("effect/Cause").YieldableError>;
9
- /** Storage is not configured on this host. */
10
- export declare class AppStorageUnavailable extends AppStorageUnavailable_base {
11
- }
12
- declare const AppStorageError_base: Schema.Class<AppStorageError, Schema.TaggedStruct<"AppStorageError", {}>, import("effect/Cause").YieldableError>;
13
- /** App storage operations never expose SQL, documents or credentials in failures. */
14
- export declare class AppStorageError extends AppStorageError_base {
15
- }
16
- /** The adapter owns the database connection and transaction for the whole authored invocation. */
17
- export interface AppStorage {
18
- readonly read: <A, E>(schema: DatabaseSchema, work: (session: DatabaseSession) => Effect.Effect<A, E>) => Effect.Effect<A, E | DatabaseError | AppStorageUnavailable | AppStorageError>;
19
- readonly mutate: <A, E>(schema: DatabaseSchema, work: (session: DatabaseSession) => Effect.Effect<A, E>) => Effect.Effect<A, E | DatabaseError | AppStorageUnavailable | AppStorageError>;
20
- }
21
- type InputValue<F extends Fields> = {
22
- readonly [K in keyof F as F[K]["optionalValue"] extends true ? never : F[K] extends {
23
- readonly hasDefault: true;
24
- } ? never : K]: Exclude<import("../implementation/schema.js").Infer<F[K]>, undefined>;
25
- } & {
26
- readonly [K in keyof F as F[K]["optionalValue"] extends true ? K : F[K] extends {
27
- readonly hasDefault: true;
28
- } ? K : never]?: Exclude<import("../implementation/schema.js").Infer<F[K]>, undefined> | (F[K]["optionalValue"] extends true ? null : F[K] extends {
29
- readonly inputOptional: true;
30
- } ? null : never) | undefined;
31
- };
32
- /** Typed table declaration; indexes refer only to authored or host metadata fields. */
33
- export interface Table<F extends Fields, Index extends string = never> {
34
- readonly fields: F;
35
- readonly indexes: ReadonlyArray<{
36
- readonly name: string;
37
- readonly fields: readonly string[];
38
- }>;
39
- readonly index: <Name extends string>(name: Name, fields: readonly [
40
- (keyof F & string) | keyof typeof RowMetadata.Type,
41
- ...((keyof F & string) | keyof typeof RowMetadata.Type)[]
42
- ]) => Table<F, Index | Name>;
43
- }
44
- /** Structural table catalog accepted at the author boundary. */
45
- export type Tables = Readonly<Record<string, {
46
- readonly fields: Fields;
47
- readonly indexes: ReadonlyArray<{
48
- readonly name: string;
49
- readonly fields: readonly string[];
50
- }>;
51
- }>>;
52
- /** Generated row metadata is read-only and unavailable on inserts. */
53
- export type RowOf<T extends Tables[string]> = ObjectValue<T["fields"]> & typeof RowMetadata.Type;
54
- type IndexOf<T> = T extends Table<Fields, infer I> ? I : string;
55
- /** Queries receive only read methods. */
56
- export type DatabaseReader<T extends Tables> = {
57
- readonly [K in keyof T]: ReadTable<RowOf<T[K]>, IndexOf<T[K]>>;
58
- };
59
- /** Mutation methods stay inside one native SQLite transaction. */
60
- export type Database<T extends Tables> = {
61
- readonly [K in keyof T]: WriteTable<RowOf<T[K]>, InputValue<T[K]["fields"]>, IndexOf<T[K]>>;
62
- };
63
- /** Pure database declaration shared by requirements and derived handler contexts. */
64
- export interface DatabaseDefinition<T extends Tables = Tables> {
65
- readonly schema: DatabaseSchema;
66
- readonly tables: T;
67
- }
68
- export {};
@@ -1,15 +0,0 @@
1
- import { type DatabaseSession, type reservedFieldNames } from "../../../app-data/src/index.js";
2
- type ReservedFieldName = (typeof reservedFieldNames)[number];
3
- import { type AppStorage } from "../contracts/storage.js";
4
- import type { DatabaseDefinition, Database, Table, Tables } from "../contracts/storage.js";
5
- import { type Fields } from "./schema.js";
6
- export type { DatabaseDefinition, Database, DatabaseReader, Table, Tables, RowOf, } from "../contracts/storage.js";
7
- /** Declare scalar columns using the same schemas as operation inputs. The host adds `id`,
8
- * `createdAt` and `updatedAt` to every row, so tables cannot declare those names. */
9
- export declare const table: <const F extends Fields & { readonly [K in ReservedFieldName]?: never; }>(fields: F) => Table<F>;
10
- /** Build a fresh Promise database facade for one authorized invocation. */
11
- export declare const authorDatabase: <T extends Tables>(tables: T, session: DatabaseSession, signal: AbortSignal, writable: boolean) => Database<T>;
12
- /** Declare storage independently of handlers; the host binds each invocation's database. */
13
- export declare const defineDatabase: <const T extends Tables>(tables: T) => DatabaseDefinition<T>;
14
- /** Explicit missing capability, never a fallback to another app's data. */
15
- export declare const unavailableStorage: AppStorage;