busabase-sdk 0.30.0 → 0.30.1

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.
@@ -24,7 +24,15 @@ declare const BUSABASE_AIRAPP_RUNTIME_ENV = "BUSABASE_AIRAPP_RUNTIME";
24
24
  * So the list names runtimes; {@link isBusabaseAirAppHosted} decides hosting,
25
25
  * from presence alone, and needs no upgrade to stay correct.
26
26
  */
27
- declare const BUSABASE_AIRAPP_RUNTIMES: readonly ["nodepod", "local", "srt", "sandock", "embed"];
27
+ declare const BUSABASE_AIRAPP_RUNTIMES: readonly ["browser", "local", "remote", "embed"];
28
+ /**
29
+ * Names Busabase has emitted in the past and may still be emitting to an app
30
+ * pinned to an older deployment. Kept separate from the list above so the
31
+ * current vocabulary stays readable, and exported so an app that genuinely
32
+ * wants to branch (a demo that prints where it is running, say) can normalise
33
+ * instead of growing its own if-chain. Nothing here gates `hosted`.
34
+ */
35
+ declare const BUSABASE_AIRAPP_RUNTIME_ALIASES: Record<string, BusabaseAirAppRuntime>;
28
36
  type BusabaseAirAppRuntime = (typeof BUSABASE_AIRAPP_RUNTIMES)[number];
29
37
  /** Read the injected runtime, normalised. `""` means nobody hosted this process. */
30
38
  declare const readBusabaseAirAppRuntime: (env?: Record<string, string | undefined>) => string;
@@ -141,4 +149,4 @@ declare class BusabaseAirAppLocalGateway {
141
149
  }
142
150
  declare const createBusabaseAirAppLocalGateway: (options: BusabaseAirAppLocalGatewayOptions) => BusabaseAirAppLocalGateway;
143
151
  //#endregion
144
- export { BUSABASE_AIRAPP_GATEWAY_REASONS, BUSABASE_AIRAPP_RUNTIMES, BUSABASE_AIRAPP_RUNTIME_ENV, BusabaseAirAppAuthStatus, BusabaseAirAppLocalGateway, BusabaseAirAppLocalGatewayOptions, BusabaseAirAppRuntime, BusabaseAirAppRuntimeReport, asKnownBusabaseAirAppRuntime, createBusabaseAirAppLocalGateway, describeBusabaseAirAppRuntime, isBusabaseAirAppHosted, readBusabaseAirAppRuntime };
152
+ export { BUSABASE_AIRAPP_GATEWAY_REASONS, BUSABASE_AIRAPP_RUNTIMES, BUSABASE_AIRAPP_RUNTIME_ALIASES, BUSABASE_AIRAPP_RUNTIME_ENV, BusabaseAirAppAuthStatus, BusabaseAirAppLocalGateway, BusabaseAirAppLocalGatewayOptions, BusabaseAirAppRuntime, BusabaseAirAppRuntimeReport, asKnownBusabaseAirAppRuntime, createBusabaseAirAppLocalGateway, describeBusabaseAirAppRuntime, isBusabaseAirAppHosted, readBusabaseAirAppRuntime };
@@ -29,12 +29,24 @@ const BUSABASE_AIRAPP_RUNTIME_ENV = "BUSABASE_AIRAPP_RUNTIME";
29
29
  * from presence alone, and needs no upgrade to stay correct.
30
30
  */
31
31
  const BUSABASE_AIRAPP_RUNTIMES = [
32
- "nodepod",
32
+ "browser",
33
33
  "local",
34
- "srt",
35
- "sandock",
34
+ "remote",
36
35
  "embed"
37
36
  ];
37
+ /**
38
+ * Names Busabase has emitted in the past and may still be emitting to an app
39
+ * pinned to an older deployment. Kept separate from the list above so the
40
+ * current vocabulary stays readable, and exported so an app that genuinely
41
+ * wants to branch (a demo that prints where it is running, say) can normalise
42
+ * instead of growing its own if-chain. Nothing here gates `hosted`.
43
+ */
44
+ const BUSABASE_AIRAPP_RUNTIME_ALIASES = {
45
+ nodepod: "browser",
46
+ sandock: "remote",
47
+ "local-node": "local",
48
+ srt: "local"
49
+ };
38
50
  /** Read the injected runtime, normalised. `""` means nobody hosted this process. */
39
51
  const readBusabaseAirAppRuntime = (env = process.env) => (env["BUSABASE_AIRAPP_RUNTIME"] || "").trim();
40
52
  /**
@@ -54,7 +66,10 @@ const isBusabaseAirAppHosted = (runtime = readBusabaseAirAppRuntime()) => runtim
54
66
  * predates is normal, not an error, and the caller should fall back to generic
55
67
  * behaviour rather than break.
56
68
  */
57
- const asKnownBusabaseAirAppRuntime = (runtime) => BUSABASE_AIRAPP_RUNTIMES.includes(runtime) ? runtime : null;
69
+ const asKnownBusabaseAirAppRuntime = (runtime) => {
70
+ const resolved = BUSABASE_AIRAPP_RUNTIME_ALIASES[runtime] ?? runtime;
71
+ return BUSABASE_AIRAPP_RUNTIMES.includes(resolved) ? resolved : null;
72
+ };
58
73
  /**
59
74
  * Build the `__airapp/runtime` body.
60
75
  *
@@ -448,4 +463,4 @@ var BusabaseAirAppLocalGateway = class {
448
463
  };
449
464
  const createBusabaseAirAppLocalGateway = (options) => new BusabaseAirAppLocalGateway(options);
450
465
  //#endregion
451
- export { BUSABASE_AIRAPP_GATEWAY_REASONS, BUSABASE_AIRAPP_RUNTIMES, BUSABASE_AIRAPP_RUNTIME_ENV, BusabaseAirAppLocalGateway, asKnownBusabaseAirAppRuntime, createBusabaseAirAppLocalGateway, describeBusabaseAirAppRuntime, isBusabaseAirAppHosted, readBusabaseAirAppRuntime };
466
+ export { BUSABASE_AIRAPP_GATEWAY_REASONS, BUSABASE_AIRAPP_RUNTIMES, BUSABASE_AIRAPP_RUNTIME_ALIASES, BUSABASE_AIRAPP_RUNTIME_ENV, BusabaseAirAppLocalGateway, asKnownBusabaseAirAppRuntime, createBusabaseAirAppLocalGateway, describeBusabaseAirAppRuntime, isBusabaseAirAppHosted, readBusabaseAirAppRuntime };
package/dist/airapp.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as BusabaseClient } from "./client-CVz2pqrF.js";
1
+ import { t as BusabaseClient } from "./client-DJmL8Jl_.js";
2
2
  //#region src/airapp.d.ts
3
3
  type NodeChangeRequestInput = Parameters<BusabaseClient["nodes"]["createChangeRequest"]>[0];
4
4
  type NodeOperationInput = NodeChangeRequestInput["operations"][number];
@@ -928,6 +928,7 @@ declare const cloudContract: {
928
928
  targetBaseSlug: z.ZodOptional<z.ZodString>;
929
929
  }, z.core.$strip>>;
930
930
  }, z.core.$strip>>;
931
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
931
932
  }, z.core.$strip>>;
932
933
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
933
934
  operations: z.ZodArray<z.ZodObject<{
@@ -1363,6 +1364,7 @@ declare const cloudContract: {
1363
1364
  targetBaseSlug: z.ZodOptional<z.ZodString>;
1364
1365
  }, z.core.$strip>>;
1365
1366
  }, z.core.$strip>>;
1367
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1366
1368
  }, z.core.$strip>>;
1367
1369
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
1368
1370
  operations: z.ZodArray<z.ZodObject<{
@@ -1936,6 +1938,7 @@ declare const cloudContract: {
1936
1938
  targetBaseSlug: z.ZodOptional<z.ZodString>;
1937
1939
  }, z.core.$strip>>;
1938
1940
  }, z.core.$strip>>;
1941
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1939
1942
  }, z.core.$strip>>;
1940
1943
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
1941
1944
  operations: z.ZodArray<z.ZodObject<{
@@ -3028,6 +3031,7 @@ declare const cloudContract: {
3028
3031
  targetBaseSlug: z.ZodOptional<z.ZodString>;
3029
3032
  }, z.core.$strip>>;
3030
3033
  }, z.core.$strip>>;
3034
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3031
3035
  }, z.core.$strip>>;
3032
3036
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
3033
3037
  operations: z.ZodArray<z.ZodObject<{
@@ -3461,6 +3465,7 @@ declare const cloudContract: {
3461
3465
  targetBaseSlug: z.ZodOptional<z.ZodString>;
3462
3466
  }, z.core.$strip>>;
3463
3467
  }, z.core.$strip>>;
3468
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3464
3469
  }, z.core.$strip>>;
3465
3470
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
3466
3471
  operations: z.ZodArray<z.ZodObject<{
@@ -3865,6 +3870,7 @@ declare const cloudContract: {
3865
3870
  targetBaseSlug: z.ZodOptional<z.ZodString>;
3866
3871
  }, z.core.$strip>>;
3867
3872
  }, z.core.$strip>>;
3873
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3868
3874
  }, z.core.$strip>;
3869
3875
  headCommit: z.ZodObject<{
3870
3876
  id: z.ZodString;
@@ -4122,6 +4128,7 @@ declare const cloudContract: {
4122
4128
  targetBaseSlug: z.ZodOptional<z.ZodString>;
4123
4129
  }, z.core.$strip>>;
4124
4130
  }, z.core.$strip>>;
4131
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4125
4132
  }, z.core.$strip>;
4126
4133
  headCommit: z.ZodObject<{
4127
4134
  id: z.ZodString;
@@ -4357,6 +4364,7 @@ declare const cloudContract: {
4357
4364
  targetBaseSlug: z.ZodOptional<z.ZodString>;
4358
4365
  }, z.core.$strip>>;
4359
4366
  }, z.core.$strip>>;
4367
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4360
4368
  }, z.core.$strip>>;
4361
4369
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
4362
4370
  operations: z.ZodArray<z.ZodObject<{
@@ -4790,6 +4798,7 @@ declare const cloudContract: {
4790
4798
  targetBaseSlug: z.ZodOptional<z.ZodString>;
4791
4799
  }, z.core.$strip>>;
4792
4800
  }, z.core.$strip>>;
4801
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4793
4802
  }, z.core.$strip>>;
4794
4803
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
4795
4804
  operations: z.ZodArray<z.ZodObject<{
@@ -5194,6 +5203,7 @@ declare const cloudContract: {
5194
5203
  targetBaseSlug: z.ZodOptional<z.ZodString>;
5195
5204
  }, z.core.$strip>>;
5196
5205
  }, z.core.$strip>>;
5206
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5197
5207
  }, z.core.$strip>;
5198
5208
  headCommit: z.ZodObject<{
5199
5209
  id: z.ZodString;
@@ -5451,6 +5461,7 @@ declare const cloudContract: {
5451
5461
  targetBaseSlug: z.ZodOptional<z.ZodString>;
5452
5462
  }, z.core.$strip>>;
5453
5463
  }, z.core.$strip>>;
5464
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5454
5465
  }, z.core.$strip>;
5455
5466
  headCommit: z.ZodObject<{
5456
5467
  id: z.ZodString;
@@ -5684,6 +5695,7 @@ declare const cloudContract: {
5684
5695
  targetBaseSlug: z.ZodOptional<z.ZodString>;
5685
5696
  }, z.core.$strip>>;
5686
5697
  }, z.core.$strip>>;
5698
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5687
5699
  }, z.core.$strip>>;
5688
5700
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
5689
5701
  operations: z.ZodArray<z.ZodObject<{
@@ -6117,6 +6129,7 @@ declare const cloudContract: {
6117
6129
  targetBaseSlug: z.ZodOptional<z.ZodString>;
6118
6130
  }, z.core.$strip>>;
6119
6131
  }, z.core.$strip>>;
6132
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6120
6133
  }, z.core.$strip>>;
6121
6134
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
6122
6135
  operations: z.ZodArray<z.ZodObject<{
@@ -6521,6 +6534,7 @@ declare const cloudContract: {
6521
6534
  targetBaseSlug: z.ZodOptional<z.ZodString>;
6522
6535
  }, z.core.$strip>>;
6523
6536
  }, z.core.$strip>>;
6537
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6524
6538
  }, z.core.$strip>;
6525
6539
  headCommit: z.ZodObject<{
6526
6540
  id: z.ZodString;
@@ -6778,6 +6792,7 @@ declare const cloudContract: {
6778
6792
  targetBaseSlug: z.ZodOptional<z.ZodString>;
6779
6793
  }, z.core.$strip>>;
6780
6794
  }, z.core.$strip>>;
6795
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6781
6796
  }, z.core.$strip>;
6782
6797
  headCommit: z.ZodObject<{
6783
6798
  id: z.ZodString;
@@ -7081,6 +7096,7 @@ declare const cloudContract: {
7081
7096
  targetBaseSlug: z.ZodOptional<z.ZodString>;
7082
7097
  }, z.core.$strip>>;
7083
7098
  }, z.core.$strip>>;
7099
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7084
7100
  }, z.core.$strip>>;
7085
7101
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
7086
7102
  operations: z.ZodArray<z.ZodObject<{
@@ -7523,6 +7539,7 @@ declare const cloudContract: {
7523
7539
  targetBaseSlug: z.ZodOptional<z.ZodString>;
7524
7540
  }, z.core.$strip>>;
7525
7541
  }, z.core.$strip>>;
7542
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7526
7543
  }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
7527
7544
  get: import("@orpc/contract").ContractProcedure<z.ZodObject<{
7528
7545
  baseId: z.ZodString;
@@ -7647,6 +7664,7 @@ declare const cloudContract: {
7647
7664
  targetBaseSlug: z.ZodOptional<z.ZodString>;
7648
7665
  }, z.core.$strip>>;
7649
7666
  }, z.core.$strip>>;
7667
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7650
7668
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
7651
7669
  listDeletedFields: import("@orpc/contract").ContractProcedure<z.ZodObject<{
7652
7670
  baseId: z.ZodString;
@@ -8073,6 +8091,7 @@ declare const cloudContract: {
8073
8091
  targetBaseSlug: z.ZodOptional<z.ZodString>;
8074
8092
  }, z.core.$strip>>;
8075
8093
  }, z.core.$strip>>;
8094
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8076
8095
  materialized: z.ZodLiteral<true>;
8077
8096
  }, z.core.$strip>, z.ZodObject<{
8078
8097
  id: z.ZodString;
@@ -8244,6 +8263,7 @@ declare const cloudContract: {
8244
8263
  targetBaseSlug: z.ZodOptional<z.ZodString>;
8245
8264
  }, z.core.$strip>>;
8246
8265
  }, z.core.$strip>>;
8266
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8247
8267
  }, z.core.$strip>>;
8248
8268
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
8249
8269
  operations: z.ZodArray<z.ZodObject<{
@@ -8653,6 +8673,7 @@ declare const cloudContract: {
8653
8673
  targetBaseSlug: z.ZodOptional<z.ZodString>;
8654
8674
  }, z.core.$strip>>;
8655
8675
  }, z.core.$strip>>;
8676
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8656
8677
  }, z.core.$strip>;
8657
8678
  headCommit: z.ZodObject<{
8658
8679
  id: z.ZodString;
@@ -8879,6 +8900,7 @@ declare const cloudContract: {
8879
8900
  targetBaseSlug: z.ZodOptional<z.ZodString>;
8880
8901
  }, z.core.$strip>>;
8881
8902
  }, z.core.$strip>>;
8903
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8882
8904
  }, z.core.$strip>>;
8883
8905
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
8884
8906
  operations: z.ZodArray<z.ZodObject<{
@@ -9316,6 +9338,7 @@ declare const cloudContract: {
9316
9338
  targetBaseSlug: z.ZodOptional<z.ZodString>;
9317
9339
  }, z.core.$strip>>;
9318
9340
  }, z.core.$strip>>;
9341
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9319
9342
  }, z.core.$strip>>;
9320
9343
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
9321
9344
  operations: z.ZodArray<z.ZodObject<{
@@ -9757,6 +9780,7 @@ declare const cloudContract: {
9757
9780
  targetBaseSlug: z.ZodOptional<z.ZodString>;
9758
9781
  }, z.core.$strip>>;
9759
9782
  }, z.core.$strip>>;
9783
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9760
9784
  }, z.core.$strip>>;
9761
9785
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
9762
9786
  operations: z.ZodArray<z.ZodObject<{
@@ -10244,6 +10268,7 @@ declare const cloudContract: {
10244
10268
  targetBaseSlug: z.ZodOptional<z.ZodString>;
10245
10269
  }, z.core.$strip>>;
10246
10270
  }, z.core.$strip>>;
10271
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10247
10272
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
10248
10273
  fieldChangeRequest: import("@orpc/contract").ContractProcedure<z.ZodDiscriminatedUnion<[z.ZodObject<{
10249
10274
  name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
@@ -10671,6 +10696,7 @@ declare const cloudContract: {
10671
10696
  targetBaseSlug: z.ZodOptional<z.ZodString>;
10672
10697
  }, z.core.$strip>>;
10673
10698
  }, z.core.$strip>>;
10699
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10674
10700
  }, z.core.$strip>>;
10675
10701
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
10676
10702
  operations: z.ZodArray<z.ZodObject<{
@@ -11154,6 +11180,7 @@ declare const cloudContract: {
11154
11180
  targetBaseSlug: z.ZodOptional<z.ZodString>;
11155
11181
  }, z.core.$strip>>;
11156
11182
  }, z.core.$strip>>;
11183
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11157
11184
  }, z.core.$strip>>;
11158
11185
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
11159
11186
  operations: z.ZodArray<z.ZodObject<{
@@ -11637,6 +11664,7 @@ declare const cloudContract: {
11637
11664
  targetBaseSlug: z.ZodOptional<z.ZodString>;
11638
11665
  }, z.core.$strip>>;
11639
11666
  }, z.core.$strip>>;
11667
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11640
11668
  }, z.core.$strip>>;
11641
11669
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
11642
11670
  operations: z.ZodArray<z.ZodObject<{
@@ -12150,6 +12178,7 @@ declare const cloudContract: {
12150
12178
  targetBaseSlug: z.ZodOptional<z.ZodString>;
12151
12179
  }, z.core.$strip>>;
12152
12180
  }, z.core.$strip>>;
12181
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
12153
12182
  }, z.core.$strip>>;
12154
12183
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
12155
12184
  operations: z.ZodArray<z.ZodObject<{
@@ -12417,8 +12446,7 @@ declare const cloudContract: {
12417
12446
  binaryFiles: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
12418
12447
  engine: z.ZodDefault<z.ZodEnum<{
12419
12448
  local: "local";
12420
- sandock: "sandock";
12421
- srt: "srt";
12449
+ remote: "remote";
12422
12450
  }>>;
12423
12451
  }, z.core.$strip>, import("@orpc/contract").Schema<AsyncIteratorObject<{
12424
12452
  type: "log";
@@ -12659,6 +12687,7 @@ declare const cloudContract: {
12659
12687
  targetBaseSlug: z.ZodOptional<z.ZodString>;
12660
12688
  }, z.core.$strip>>;
12661
12689
  }, z.core.$strip>>;
12690
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
12662
12691
  }, z.core.$strip>>;
12663
12692
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
12664
12693
  operations: z.ZodArray<z.ZodObject<{
@@ -13103,6 +13132,7 @@ declare const cloudContract: {
13103
13132
  targetBaseSlug: z.ZodOptional<z.ZodString>;
13104
13133
  }, z.core.$strip>>;
13105
13134
  }, z.core.$strip>>;
13135
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
13106
13136
  }, z.core.$strip>>;
13107
13137
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
13108
13138
  operations: z.ZodArray<z.ZodObject<{
@@ -14169,6 +14199,7 @@ declare const cloudContract: {
14169
14199
  targetBaseSlug: z.ZodOptional<z.ZodString>;
14170
14200
  }, z.core.$strip>>;
14171
14201
  }, z.core.$strip>>;
14202
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
14172
14203
  }, z.core.$strip>>;
14173
14204
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
14174
14205
  operations: z.ZodArray<z.ZodObject<{
@@ -15497,6 +15528,7 @@ declare const cloudContract: {
15497
15528
  targetBaseSlug: z.ZodOptional<z.ZodString>;
15498
15529
  }, z.core.$strip>>;
15499
15530
  }, z.core.$strip>>;
15531
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
15500
15532
  }, z.core.$strip>>;
15501
15533
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
15502
15534
  operations: z.ZodArray<z.ZodObject<{
@@ -15943,6 +15975,7 @@ declare const cloudContract: {
15943
15975
  targetBaseSlug: z.ZodOptional<z.ZodString>;
15944
15976
  }, z.core.$strip>>;
15945
15977
  }, z.core.$strip>>;
15978
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
15946
15979
  }, z.core.$strip>>;
15947
15980
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
15948
15981
  operations: z.ZodArray<z.ZodObject<{
@@ -16391,6 +16424,7 @@ declare const cloudContract: {
16391
16424
  targetBaseSlug: z.ZodOptional<z.ZodString>;
16392
16425
  }, z.core.$strip>>;
16393
16426
  }, z.core.$strip>>;
16427
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
16394
16428
  }, z.core.$strip>>;
16395
16429
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
16396
16430
  operations: z.ZodArray<z.ZodObject<{
@@ -16843,6 +16877,7 @@ declare const cloudContract: {
16843
16877
  targetBaseSlug: z.ZodOptional<z.ZodString>;
16844
16878
  }, z.core.$strip>>;
16845
16879
  }, z.core.$strip>>;
16880
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
16846
16881
  }, z.core.$strip>>;
16847
16882
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
16848
16883
  operations: z.ZodArray<z.ZodObject<{
@@ -17284,6 +17319,7 @@ declare const cloudContract: {
17284
17319
  targetBaseSlug: z.ZodOptional<z.ZodString>;
17285
17320
  }, z.core.$strip>>;
17286
17321
  }, z.core.$strip>>;
17322
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
17287
17323
  }, z.core.$strip>>;
17288
17324
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
17289
17325
  operations: z.ZodArray<z.ZodObject<{
@@ -17724,6 +17760,7 @@ declare const cloudContract: {
17724
17760
  targetBaseSlug: z.ZodOptional<z.ZodString>;
17725
17761
  }, z.core.$strip>>;
17726
17762
  }, z.core.$strip>>;
17763
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
17727
17764
  }, z.core.$strip>>;
17728
17765
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
17729
17766
  operations: z.ZodArray<z.ZodObject<{
@@ -18160,6 +18197,7 @@ declare const cloudContract: {
18160
18197
  targetBaseSlug: z.ZodOptional<z.ZodString>;
18161
18198
  }, z.core.$strip>>;
18162
18199
  }, z.core.$strip>>;
18200
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
18163
18201
  }, z.core.$strip>>;
18164
18202
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
18165
18203
  operations: z.ZodArray<z.ZodObject<{
@@ -18561,6 +18599,7 @@ declare const cloudContract: {
18561
18599
  targetBaseSlug: z.ZodOptional<z.ZodString>;
18562
18600
  }, z.core.$strip>>;
18563
18601
  }, z.core.$strip>>;
18602
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
18564
18603
  }, z.core.$strip>;
18565
18604
  headCommit: z.ZodObject<{
18566
18605
  id: z.ZodString;
@@ -18876,6 +18915,7 @@ declare const cloudContract: {
18876
18915
  targetBaseSlug: z.ZodOptional<z.ZodString>;
18877
18916
  }, z.core.$strip>>;
18878
18917
  }, z.core.$strip>>;
18918
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
18879
18919
  }, z.core.$strip>>;
18880
18920
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
18881
18921
  operations: z.ZodArray<z.ZodObject<{
@@ -19309,6 +19349,7 @@ declare const cloudContract: {
19309
19349
  targetBaseSlug: z.ZodOptional<z.ZodString>;
19310
19350
  }, z.core.$strip>>;
19311
19351
  }, z.core.$strip>>;
19352
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
19312
19353
  }, z.core.$strip>;
19313
19354
  headCommit: z.ZodObject<{
19314
19355
  id: z.ZodString;
@@ -19515,6 +19556,7 @@ declare const cloudContract: {
19515
19556
  targetBaseSlug: z.ZodOptional<z.ZodString>;
19516
19557
  }, z.core.$strip>>;
19517
19558
  }, z.core.$strip>>;
19559
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
19518
19560
  }, z.core.$strip>;
19519
19561
  headCommit: z.ZodObject<{
19520
19562
  id: z.ZodString;
@@ -19743,6 +19785,7 @@ declare const cloudContract: {
19743
19785
  targetBaseSlug: z.ZodOptional<z.ZodString>;
19744
19786
  }, z.core.$strip>>;
19745
19787
  }, z.core.$strip>>;
19788
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
19746
19789
  }, z.core.$strip>;
19747
19790
  headCommit: z.ZodObject<{
19748
19791
  id: z.ZodString;
@@ -19955,6 +19998,7 @@ declare const cloudContract: {
19955
19998
  targetBaseSlug: z.ZodOptional<z.ZodString>;
19956
19999
  }, z.core.$strip>>;
19957
20000
  }, z.core.$strip>>;
20001
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
19958
20002
  }, z.core.$strip>;
19959
20003
  headCommit: z.ZodObject<{
19960
20004
  id: z.ZodString;
@@ -20176,6 +20220,7 @@ declare const cloudContract: {
20176
20220
  targetBaseSlug: z.ZodOptional<z.ZodString>;
20177
20221
  }, z.core.$strip>>;
20178
20222
  }, z.core.$strip>>;
20223
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
20179
20224
  }, z.core.$strip>;
20180
20225
  headCommit: z.ZodObject<{
20181
20226
  id: z.ZodString;
@@ -20402,6 +20447,7 @@ declare const cloudContract: {
20402
20447
  targetBaseSlug: z.ZodOptional<z.ZodString>;
20403
20448
  }, z.core.$strip>>;
20404
20449
  }, z.core.$strip>>;
20450
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
20405
20451
  }, z.core.$strip>>;
20406
20452
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
20407
20453
  operations: z.ZodArray<z.ZodObject<{
@@ -20834,6 +20880,7 @@ declare const cloudContract: {
20834
20880
  targetBaseSlug: z.ZodOptional<z.ZodString>;
20835
20881
  }, z.core.$strip>>;
20836
20882
  }, z.core.$strip>>;
20883
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
20837
20884
  }, z.core.$strip>>;
20838
20885
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
20839
20886
  operations: z.ZodArray<z.ZodObject<{
@@ -21484,6 +21531,7 @@ declare const cloudContract: {
21484
21531
  targetBaseSlug: z.ZodOptional<z.ZodString>;
21485
21532
  }, z.core.$strip>>;
21486
21533
  }, z.core.$strip>>;
21534
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
21487
21535
  }, z.core.$strip>>;
21488
21536
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
21489
21537
  operations: z.ZodArray<z.ZodObject<{
@@ -22137,6 +22185,16 @@ interface BaseVO {
22137
22185
  };
22138
22186
  createdAt: string;
22139
22187
  fields: BaseFieldVO[];
22188
+ /**
22189
+ * The owning node's own `metadata` (from `busabase_nodes.metadata`, NOT a
22190
+ * `busabase_bases` column) — carried here so a Base-only caller (e.g. the
22191
+ * Agent Prompts dialog reached from `BaseDetailHeader`, which only has a
22192
+ * `BaseVO` on hand) can read `metadata.agentPrompts` the same way every
22193
+ * other node type's `NodeVO.metadata` already does. Kept as
22194
+ * `Record<string, unknown>` to match `NodeVO.metadata` and
22195
+ * `NodePromptContext.metadata` rather than inventing a narrower type.
22196
+ */
22197
+ metadata: Record<string, unknown>;
22140
22198
  }
22141
22199
  type ViewFilterOperator = "contains" | "equals" | "not_empty" | "is_empty" | "is_true" | "is_false";
22142
22200
  interface ViewFilterVO {
@@ -22755,6 +22813,7 @@ declare const activityItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
22755
22813
  targetBaseSlug: z.ZodOptional<z.ZodString>;
22756
22814
  }, z.core.$strip>>;
22757
22815
  }, z.core.$strip>>;
22816
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
22758
22817
  }, z.core.$strip>>;
22759
22818
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
22760
22819
  operations: z.ZodArray<z.ZodObject<{
@@ -23188,6 +23247,7 @@ declare const activityItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
23188
23247
  targetBaseSlug: z.ZodOptional<z.ZodString>;
23189
23248
  }, z.core.$strip>>;
23190
23249
  }, z.core.$strip>>;
23250
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
23191
23251
  }, z.core.$strip>>;
23192
23252
  node: z.ZodNullable<z.ZodType<NodeOutput, unknown, z.core.$ZodTypeInternals<NodeOutput, unknown>>>;
23193
23253
  operations: z.ZodArray<z.ZodObject<{
@@ -23592,6 +23652,7 @@ declare const activityItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
23592
23652
  targetBaseSlug: z.ZodOptional<z.ZodString>;
23593
23653
  }, z.core.$strip>>;
23594
23654
  }, z.core.$strip>>;
23655
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
23595
23656
  }, z.core.$strip>;
23596
23657
  headCommit: z.ZodObject<{
23597
23658
  id: z.ZodString;
@@ -23849,6 +23910,7 @@ declare const activityItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
23849
23910
  targetBaseSlug: z.ZodOptional<z.ZodString>;
23850
23911
  }, z.core.$strip>>;
23851
23912
  }, z.core.$strip>>;
23913
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
23852
23914
  }, z.core.$strip>;
23853
23915
  headCommit: z.ZodObject<{
23854
23916
  id: z.ZodString;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as FileTreeReadFileVO, A as SearchResultKind, At as AttachmentRef, B as VaultRuntimeEnv, C as NodeSearchResultVO, Ct as VIEW_FIELD_MIN_WIDTH, D as ReviewVO, Dt as ViewSortVO, E as OperationVO, Et as ViewFilterVO, F as VaultAccessPolicy, Ft as CREATABLE_NODE_TYPES, G as AssetDetailVO, H as VaultSettingsVO, I as VaultEnvironment, It as CreatableNodeType, J as AssetVO, K as AssetTextStatus, L as VaultItemInput, Lt as NodeType, M as SourceAttributionVO, Mt as cloudContract, N as UserRefVO, Nt as NodeIcon, O as ReviewVerdict, Ot as ViewType, P as UpdateVaultSettingsDTO, Pt as NodeIconSchema, Q as FileTreeNodeVO, R as VaultItemKind, Rt as OperationKind, S as LookupRollup, St as VIEW_FIELD_MAX_WIDTH, T as OperationStatus, Tt as ViewFilterOperator, U as FileNodeMetadata, V as VaultScopeType, W as FileNodeVO, X as GrepResultVO, Y as GrepInputDTO, Z as FileTreeFileVO, _ as ChangeRequestVO, _t as GalleryCardSize, a as createBusabaseClient, at as FormPageSourceVO, b as CommitVO, bt as RecordLinkVO, c as AuditAction, ct as FormThemeVO, d as ChangeRequestBatchFailureVO, dt as ListFormsVO, et as NodeDetailVO, f as ChangeRequestCountsVO, ft as SubmitFormDTO, g as ChangeRequestTargetType, gt as BaseVO, h as ChangeRequestStatus, ht as BaseFieldVO, i as ResolvedConfig, it as FormFieldBindingVO, j as SearchResultVO, jt as CloudContract, k as SearchResponseVO, kt as ViewVO, l as AuditEventVO, lt as FormVO, m as ChangeRequestReviewBatchResultVO, mt as AssetAttachmentRef, n as BusabaseConfig, nt as CreateFormDTO, o as resolveConfig, ot as FormShareVO, p as ChangeRequestMergeBatchResultVO, pt as UpdateFormDTO, q as AssetUsageVO, r as DEFAULT_BASE_URL, rt as FormBoundFieldVO, s as AgentTaskVO, st as FormSubmitResultVO, t as BusabaseClient, tt as ActivityItemVO, u as BusabaseSourceChannel, ut as ListFormsDTO, v as CommentSubjectType, vt as GalleryCoverFit, w as NodeVO, wt as ViewConfigVO, x as FieldType, xt as RecordVO, y as CommentVO, yt as GanttScale, z as VaultItemVO } from "./client-CVz2pqrF.js";
1
+ import { $ as FileTreeReadFileVO, A as SearchResultKind, At as AttachmentRef, B as VaultRuntimeEnv, C as NodeSearchResultVO, Ct as VIEW_FIELD_MIN_WIDTH, D as ReviewVO, Dt as ViewSortVO, E as OperationVO, Et as ViewFilterVO, F as VaultAccessPolicy, Ft as CREATABLE_NODE_TYPES, G as AssetDetailVO, H as VaultSettingsVO, I as VaultEnvironment, It as CreatableNodeType, J as AssetVO, K as AssetTextStatus, L as VaultItemInput, Lt as NodeType, M as SourceAttributionVO, Mt as cloudContract, N as UserRefVO, Nt as NodeIcon, O as ReviewVerdict, Ot as ViewType, P as UpdateVaultSettingsDTO, Pt as NodeIconSchema, Q as FileTreeNodeVO, R as VaultItemKind, Rt as OperationKind, S as LookupRollup, St as VIEW_FIELD_MAX_WIDTH, T as OperationStatus, Tt as ViewFilterOperator, U as FileNodeMetadata, V as VaultScopeType, W as FileNodeVO, X as GrepResultVO, Y as GrepInputDTO, Z as FileTreeFileVO, _ as ChangeRequestVO, _t as GalleryCardSize, a as createBusabaseClient, at as FormPageSourceVO, b as CommitVO, bt as RecordLinkVO, c as AuditAction, ct as FormThemeVO, d as ChangeRequestBatchFailureVO, dt as ListFormsVO, et as NodeDetailVO, f as ChangeRequestCountsVO, ft as SubmitFormDTO, g as ChangeRequestTargetType, gt as BaseVO, h as ChangeRequestStatus, ht as BaseFieldVO, i as ResolvedConfig, it as FormFieldBindingVO, j as SearchResultVO, jt as CloudContract, k as SearchResponseVO, kt as ViewVO, l as AuditEventVO, lt as FormVO, m as ChangeRequestReviewBatchResultVO, mt as AssetAttachmentRef, n as BusabaseConfig, nt as CreateFormDTO, o as resolveConfig, ot as FormShareVO, p as ChangeRequestMergeBatchResultVO, pt as UpdateFormDTO, q as AssetUsageVO, r as DEFAULT_BASE_URL, rt as FormBoundFieldVO, s as AgentTaskVO, st as FormSubmitResultVO, t as BusabaseClient, tt as ActivityItemVO, u as BusabaseSourceChannel, ut as ListFormsDTO, v as CommentSubjectType, vt as GalleryCoverFit, w as NodeVO, wt as ViewConfigVO, x as FieldType, xt as RecordVO, y as CommentVO, yt as GanttScale, z as VaultItemVO } from "./client-DJmL8Jl_.js";
2
2
  import { z } from "zod";
3
3
  //#region src/url.d.ts
4
4
  /**
package/dist/index.js CHANGED
@@ -500,7 +500,8 @@ const baseSchema = z.object({
500
500
  requiredApprovals: z.number()
501
501
  }),
502
502
  createdAt: z.string(),
503
- fields: z.array(baseFieldSchema)
503
+ fields: z.array(baseFieldSchema),
504
+ metadata: z.record(z.string(), z.unknown()).default({})
504
505
  });
505
506
  const createBaseInputSchema = z.object({
506
507
  parentNodeId: z.string().optional().describe("Parent node id. Must be a folder or the space root; container-incapable node types (Base, Doc, AirApp, etc.) cannot hold children."),
@@ -1814,16 +1815,11 @@ const airAppRunLocalInputSchema = z.object({
1814
1815
  * The in-browser Nodepod engine never uses this field: it hands raw bytes to
1815
1816
  * `Nodepod.boot({ files })` directly and skips the base64 round trip. */
1816
1817
  binaryFiles: z.record(z.string(), z.string()).optional().default({}),
1817
- /** Server-side execution mode. `"local"` spawns a bare host Node.js
1818
- * process (previewable, data bridge via reverse proxy, NOT OS-isolated);
1819
- * `"srt"` wraps the same commands in the OS sandbox (isolated execution,
1820
- * but live preview is unreachable). `"nodepod"` never calls this endpoint —
1821
- * it runs entirely in-browser. */
1822
- engine: z.enum([
1823
- "local",
1824
- "srt",
1825
- "sandock"
1826
- ]).default("local")
1818
+ /** Where the server should run it. `"local"` spawns a bare process on the
1819
+ * Busabase host (previewable, data bridge via reverse proxy, NOT isolated);
1820
+ * `"remote"` runs the same lifecycle on a provisioned machine elsewhere.
1821
+ * `"browser"` never reaches this endpoint — it runs entirely in the tab. */
1822
+ engine: z.enum(["local", "remote"]).default("local")
1827
1823
  });
1828
1824
  const airAppRuntimeEventSchema = z.discriminatedUnion("type", [
1829
1825
  z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "busabase-sdk",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "description": "Typed TypeScript/JavaScript SDK for the Busabase OpenAPI REST API. Talks to a local or remote `busabase server` (or Busabase Cloud).",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/busabase/busabase/tree/main/apps/busabase-sdk",
@@ -67,9 +67,9 @@
67
67
  "tsx": "^4.20.5",
68
68
  "typescript": "^7.0.2",
69
69
  "vitest": "^4.1.11",
70
- "busabase-contract": "0.30.0",
71
70
  "open-domains": "0.0.2",
72
- "openlib": "0.1.1"
71
+ "openlib": "0.1.1",
72
+ "busabase-contract": "0.30.1"
73
73
  },
74
74
  "engines": {
75
75
  "node": ">=24.18.0"