@camox/api-contract 0.53.1 → 0.56.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/drafts.d.ts CHANGED
@@ -40,7 +40,7 @@ export declare const DRAFT_SEARCH_PARAM = "camox-draft";
40
40
  /** A regular draft is a named set of edits; a development draft backs a dev server. */
41
41
  export type DraftKind = "regular" | "development";
42
42
  /** How a regular draft ended. */
43
- export type DraftOutcome = "published" | "discarded";
43
+ export type DraftOutcome = "published" | "deleted";
44
44
  /** Who ended a draft, how and when, from its ended-drafts record (ADR 0009, ADR 0011). */
45
45
  export type EndedDraft = {
46
46
  draftId: string;
@@ -53,7 +53,7 @@ export type EndedDraft = {
53
53
  };
54
54
  /**
55
55
  * The oRPC error code a request naming an ended draft fails with. Its `data` is an `EndedDraft`,
56
- * so a page can render Live and say who published or discarded the draft.
56
+ * so a page can render Live and say who published or deleted the draft.
57
57
  */
58
58
  export declare const DRAFT_ENDED_ERROR_CODE = "DRAFT_ENDED";
59
59
  /**
package/dist/drafts.js CHANGED
@@ -39,7 +39,7 @@ const NO_DEVELOPMENT_DRAFT_ERROR = "NO_DEVELOPMENT_DRAFT";
39
39
  const DRAFT_SEARCH_PARAM = "camox-draft";
40
40
  /**
41
41
  * The oRPC error code a request naming an ended draft fails with. Its `data` is an `EndedDraft`,
42
- * so a page can render Live and say who published or discarded the draft.
42
+ * so a page can render Live and say who published or deleted the draft.
43
43
  */
44
44
  const DRAFT_ENDED_ERROR_CODE = "DRAFT_ENDED";
45
45
  /**
@@ -61,7 +61,7 @@ export type InvalidationMessage = {
61
61
  draftId: string | null;
62
62
  targets: QueryKey[];
63
63
  };
64
- /** A draft was published or discarded: its viewers go back to Live. */
64
+ /** A draft was published or deleted: its viewers go back to Live. */
65
65
  export type DraftEndedMessage = {
66
66
  type: "draftEnded";
67
67
  } & EndedDraft;
package/dist/router.d.ts CHANGED
@@ -6196,10 +6196,10 @@ type MergeOutcome =
6196
6196
  * The working copy of one draft with code, addressed by the draft's ID (`getByName`): a depth-1
6197
6197
  * clone of the draft's branch, held in memory, which the agent's code tools read and write over
6198
6198
  * RPC, through the write line. Every change is saved to its SQLite as it's made, Git's own
6199
- * directory included, so an eviction restores it without cloning again. The SDK's code
6200
- * references are mounted beside the files and never saved, nor committed.
6199
+ * directory included, so an eviction restores it without cloning again. The skills of its `camox`
6200
+ * version are mounted beside the files and never saved, nor committed.
6201
6201
  *
6202
- * It stores nothing until `start` made it, and nothing once `discard` deleted it.
6202
+ * It stores nothing until `start` made it, and nothing once `delete` deleted it.
6203
6203
  */
6204
6204
  declare class DraftCode extends DurableObject<Bindings> {
6205
6205
  #private;
@@ -6313,7 +6313,7 @@ declare class DraftCode extends DurableObject<Bindings> {
6313
6313
  */
6314
6314
  mergeMain(): Promise<MergeOutcome>;
6315
6315
  /** Deletes the draft's branch and everything the working copy stored, as the draft ends. */
6316
- discard(): Promise<void>;
6316
+ delete(): Promise<void>;
6317
6317
  }
6318
6318
  //#endregion
6319
6319
  //#region ../../apps/api/src/domains/project-creation/workflow.d.ts
@@ -6440,6 +6440,8 @@ type Bindings = {
6440
6440
  PUBLISH_WORKFLOW: Workflow<PublishParams>;
6441
6441
  /** Each revision's build, one archive per revision (`revisionArchiveKey`). */
6442
6442
  REVISION_BUILDS: R2Bucket;
6443
+ /** The skills each `camox` version ships, one object per version (`domains/code/skills.ts`). */
6444
+ SKILLS: R2Bucket;
6443
6445
  /** The dispatch Worker, which loads revisions (`domains/revisions/dispatch.ts`). */
6444
6446
  DISPATCH: Dispatch;
6445
6447
  /** Camox's Cloudflare account, which serves every project's Worker. */
@@ -6688,6 +6690,8 @@ type BaseContext = {
6688
6690
  client: string;
6689
6691
  telemetryDisabled: boolean;
6690
6692
  waitUntil: (promise: Promise<unknown>) => void;
6693
+ /** The API's public origin, which stored files' URLs start with. */
6694
+ apiOrigin?: string;
6691
6695
  };
6692
6696
  //#endregion
6693
6697
  //#region ../../apps/api/src/domains/projects/analytics.d.ts
@@ -7097,6 +7101,7 @@ declare const router: {
7097
7101
  client: string;
7098
7102
  telemetryDisabled: boolean;
7099
7103
  waitUntil: (promise: Promise<unknown>) => void;
7104
+ apiOrigin?: string | undefined;
7100
7105
  draft: DraftRequest | null;
7101
7106
  locale: string | undefined;
7102
7107
  publishingDraft: string | undefined;
@@ -7185,6 +7190,7 @@ declare const router: {
7185
7190
  client: string;
7186
7191
  telemetryDisabled: boolean;
7187
7192
  waitUntil: (promise: Promise<unknown>) => void;
7193
+ apiOrigin?: string | undefined;
7188
7194
  draft: DraftRequest | null;
7189
7195
  locale: string | undefined;
7190
7196
  publishingDraft: string | undefined;
@@ -7271,6 +7277,7 @@ declare const router: {
7271
7277
  client: string;
7272
7278
  telemetryDisabled: boolean;
7273
7279
  waitUntil: (promise: Promise<unknown>) => void;
7280
+ apiOrigin?: string | undefined;
7274
7281
  draft: DraftRequest | null;
7275
7282
  locale: string | undefined;
7276
7283
  publishingDraft: string | undefined;
@@ -7279,10 +7286,10 @@ declare const router: {
7279
7286
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
7280
7287
  organizationSlug: string | null;
7281
7288
  analytics: AnalyticsProviders;
7282
- uuid: string;
7283
7289
  status: import("@camox/api-contract/projects").ProjectStatus;
7284
7290
  id: number;
7285
7291
  name: string;
7292
+ uuid: string;
7286
7293
  slug: string;
7287
7294
  deployToken: string;
7288
7295
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
@@ -7301,10 +7308,10 @@ declare const router: {
7301
7308
  }, {
7302
7309
  organizationSlug: string | null;
7303
7310
  analytics: AnalyticsProviders;
7304
- uuid: string;
7305
7311
  status: import("@camox/api-contract/projects").ProjectStatus;
7306
7312
  id: number;
7307
7313
  name: string;
7314
+ uuid: string;
7308
7315
  slug: string;
7309
7316
  deployToken: string;
7310
7317
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
@@ -7361,6 +7368,7 @@ declare const router: {
7361
7368
  client: string;
7362
7369
  telemetryDisabled: boolean;
7363
7370
  waitUntil: (promise: Promise<unknown>) => void;
7371
+ apiOrigin?: string | undefined;
7364
7372
  draft: DraftRequest | null;
7365
7373
  locale: string | undefined;
7366
7374
  publishingDraft: string | undefined;
@@ -7369,10 +7377,10 @@ declare const router: {
7369
7377
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
7370
7378
  organizationSlug: string | null;
7371
7379
  analytics: AnalyticsProviders;
7372
- uuid: string;
7373
7380
  status: import("@camox/api-contract/projects").ProjectStatus;
7374
7381
  id: number;
7375
7382
  name: string;
7383
+ uuid: string;
7376
7384
  slug: string;
7377
7385
  deployToken: string;
7378
7386
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
@@ -7391,10 +7399,10 @@ declare const router: {
7391
7399
  }, {
7392
7400
  organizationSlug: string | null;
7393
7401
  analytics: AnalyticsProviders;
7394
- uuid: string;
7395
7402
  status: import("@camox/api-contract/projects").ProjectStatus;
7396
7403
  id: number;
7397
7404
  name: string;
7405
+ uuid: string;
7398
7406
  slug: string;
7399
7407
  deployToken: string;
7400
7408
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
@@ -7468,6 +7476,7 @@ declare const router: {
7468
7476
  client: string;
7469
7477
  telemetryDisabled: boolean;
7470
7478
  waitUntil: (promise: Promise<unknown>) => void;
7479
+ apiOrigin?: string | undefined;
7471
7480
  draft: DraftRequest | null;
7472
7481
  locale: string | undefined;
7473
7482
  publishingDraft: string | undefined;
@@ -7476,10 +7485,10 @@ declare const router: {
7476
7485
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
7477
7486
  organizationSlug: string | null;
7478
7487
  analytics: AnalyticsProviders;
7479
- uuid: string;
7480
7488
  status: import("@camox/api-contract/projects").ProjectStatus;
7481
7489
  id: number;
7482
7490
  name: string;
7491
+ uuid: string;
7483
7492
  slug: string;
7484
7493
  deployToken: string;
7485
7494
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
@@ -7498,10 +7507,10 @@ declare const router: {
7498
7507
  }, {
7499
7508
  organizationSlug: string | null;
7500
7509
  analytics: AnalyticsProviders;
7501
- uuid: string;
7502
7510
  status: import("@camox/api-contract/projects").ProjectStatus;
7503
7511
  id: number;
7504
7512
  name: string;
7513
+ uuid: string;
7505
7514
  slug: string;
7506
7515
  deployToken: string;
7507
7516
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
@@ -7558,6 +7567,7 @@ declare const router: {
7558
7567
  client: string;
7559
7568
  telemetryDisabled: boolean;
7560
7569
  waitUntil: (promise: Promise<unknown>) => void;
7570
+ apiOrigin?: string | undefined;
7561
7571
  draft: DraftRequest | null;
7562
7572
  locale: string | undefined;
7563
7573
  publishingDraft: string | undefined;
@@ -7616,6 +7626,7 @@ declare const router: {
7616
7626
  client: string;
7617
7627
  telemetryDisabled: boolean;
7618
7628
  waitUntil: (promise: Promise<unknown>) => void;
7629
+ apiOrigin?: string | undefined;
7619
7630
  draft: DraftRequest | null;
7620
7631
  locale: string | undefined;
7621
7632
  publishingDraft: string | undefined;
@@ -7624,10 +7635,10 @@ declare const router: {
7624
7635
  slug: import("zod").ZodString;
7625
7636
  organizationId: import("zod").ZodString;
7626
7637
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
7627
- uuid: string;
7628
7638
  status: import("@camox/api-contract/projects").ProjectStatus;
7629
7639
  id: number;
7630
7640
  name: string;
7641
+ uuid: string;
7631
7642
  slug: string;
7632
7643
  deployToken: string;
7633
7644
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
@@ -7644,10 +7655,10 @@ declare const router: {
7644
7655
  liveScript: string | null;
7645
7656
  updatedAt: number;
7646
7657
  }, {
7647
- uuid: string;
7648
7658
  status: import("@camox/api-contract/projects").ProjectStatus;
7649
7659
  id: number;
7650
7660
  name: string;
7661
+ uuid: string;
7651
7662
  slug: string;
7652
7663
  deployToken: string;
7653
7664
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
@@ -7704,6 +7715,7 @@ declare const router: {
7704
7715
  client: string;
7705
7716
  telemetryDisabled: boolean;
7706
7717
  waitUntil: (promise: Promise<unknown>) => void;
7718
+ apiOrigin?: string | undefined;
7707
7719
  draft: DraftRequest | null;
7708
7720
  locale: string | undefined;
7709
7721
  publishingDraft: string | undefined;
@@ -7711,10 +7723,10 @@ declare const router: {
7711
7723
  id: import("zod").ZodNumber;
7712
7724
  name: import("zod").ZodString;
7713
7725
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
7714
- uuid: string;
7715
7726
  status: import("@camox/api-contract/projects").ProjectStatus;
7716
7727
  id: number;
7717
7728
  name: string;
7729
+ uuid: string;
7718
7730
  slug: string;
7719
7731
  deployToken: string;
7720
7732
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
@@ -7731,10 +7743,10 @@ declare const router: {
7731
7743
  liveScript: string | null;
7732
7744
  updatedAt: number;
7733
7745
  }, {
7734
- uuid: string;
7735
7746
  status: import("@camox/api-contract/projects").ProjectStatus;
7736
7747
  id: number;
7737
7748
  name: string;
7749
+ uuid: string;
7738
7750
  slug: string;
7739
7751
  deployToken: string;
7740
7752
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
@@ -7791,6 +7803,7 @@ declare const router: {
7791
7803
  client: string;
7792
7804
  telemetryDisabled: boolean;
7793
7805
  waitUntil: (promise: Promise<unknown>) => void;
7806
+ apiOrigin?: string | undefined;
7794
7807
  draft: DraftRequest | null;
7795
7808
  locale: string | undefined;
7796
7809
  publishingDraft: string | undefined;
@@ -7853,6 +7866,7 @@ declare const router: {
7853
7866
  client: string;
7854
7867
  telemetryDisabled: boolean;
7855
7868
  waitUntil: (promise: Promise<unknown>) => void;
7869
+ apiOrigin?: string | undefined;
7856
7870
  draft: DraftRequest | null;
7857
7871
  locale: string | undefined;
7858
7872
  publishingDraft: string | undefined;
@@ -7906,16 +7920,17 @@ declare const router: {
7906
7920
  client: string;
7907
7921
  telemetryDisabled: boolean;
7908
7922
  waitUntil: (promise: Promise<unknown>) => void;
7923
+ apiOrigin?: string | undefined;
7909
7924
  draft: DraftRequest | null;
7910
7925
  locale: string | undefined;
7911
7926
  publishingDraft: string | undefined;
7912
7927
  }>, import("zod").ZodObject<{
7913
7928
  id: import("zod").ZodNumber;
7914
7929
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
7915
- uuid: string;
7916
7930
  status: import("@camox/api-contract/projects").ProjectStatus;
7917
7931
  id: number;
7918
7932
  name: string;
7933
+ uuid: string;
7919
7934
  slug: string;
7920
7935
  deployToken: string;
7921
7936
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
@@ -7932,10 +7947,10 @@ declare const router: {
7932
7947
  liveScript: string | null;
7933
7948
  updatedAt: number;
7934
7949
  } | undefined, {
7935
- uuid: string;
7936
7950
  status: import("@camox/api-contract/projects").ProjectStatus;
7937
7951
  id: number;
7938
7952
  name: string;
7953
+ uuid: string;
7939
7954
  slug: string;
7940
7955
  deployToken: string;
7941
7956
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
@@ -8600,6 +8615,7 @@ declare const router: {
8600
8615
  client: string;
8601
8616
  telemetryDisabled: boolean;
8602
8617
  waitUntil: (promise: Promise<unknown>) => void;
8618
+ apiOrigin?: string | undefined;
8603
8619
  draft: DraftRequest | null;
8604
8620
  locale: string | undefined;
8605
8621
  publishingDraft: string | undefined;
@@ -8635,6 +8651,7 @@ declare const router: {
8635
8651
  client: string;
8636
8652
  telemetryDisabled: boolean;
8637
8653
  waitUntil: (promise: Promise<unknown>) => void;
8654
+ apiOrigin?: string | undefined;
8638
8655
  draft: DraftRequest | null;
8639
8656
  locale: string | undefined;
8640
8657
  publishingDraft: string | undefined;
@@ -8744,6 +8761,7 @@ declare const router: {
8744
8761
  client: string;
8745
8762
  telemetryDisabled: boolean;
8746
8763
  waitUntil: (promise: Promise<unknown>) => void;
8764
+ apiOrigin?: string | undefined;
8747
8765
  draft: DraftRequest | null;
8748
8766
  locale: string | undefined;
8749
8767
  publishingDraft: string | undefined;
@@ -8779,6 +8797,7 @@ declare const router: {
8779
8797
  client: string;
8780
8798
  telemetryDisabled: boolean;
8781
8799
  waitUntil: (promise: Promise<unknown>) => void;
8800
+ apiOrigin?: string | undefined;
8782
8801
  draft: DraftRequest | null;
8783
8802
  locale: string | undefined;
8784
8803
  publishingDraft: string | undefined;
@@ -8880,6 +8899,7 @@ declare const router: {
8880
8899
  client: string;
8881
8900
  telemetryDisabled: boolean;
8882
8901
  waitUntil: (promise: Promise<unknown>) => void;
8902
+ apiOrigin?: string | undefined;
8883
8903
  draft: DraftRequest | null;
8884
8904
  locale: string | undefined;
8885
8905
  publishingDraft: string | undefined;
@@ -8915,6 +8935,7 @@ declare const router: {
8915
8935
  client: string;
8916
8936
  telemetryDisabled: boolean;
8917
8937
  waitUntil: (promise: Promise<unknown>) => void;
8938
+ apiOrigin?: string | undefined;
8918
8939
  draft: DraftRequest | null;
8919
8940
  locale: string | undefined;
8920
8941
  publishingDraft: string | undefined;
@@ -9013,6 +9034,7 @@ declare const router: {
9013
9034
  client: string;
9014
9035
  telemetryDisabled: boolean;
9015
9036
  waitUntil: (promise: Promise<unknown>) => void;
9037
+ apiOrigin?: string | undefined;
9016
9038
  draft: DraftRequest | null;
9017
9039
  locale: string | undefined;
9018
9040
  publishingDraft: string | undefined;
@@ -9048,6 +9070,7 @@ declare const router: {
9048
9070
  client: string;
9049
9071
  telemetryDisabled: boolean;
9050
9072
  waitUntil: (promise: Promise<unknown>) => void;
9073
+ apiOrigin?: string | undefined;
9051
9074
  draft: DraftRequest | null;
9052
9075
  locale: string | undefined;
9053
9076
  publishingDraft: string | undefined;
@@ -9149,6 +9172,7 @@ declare const router: {
9149
9172
  client: string;
9150
9173
  telemetryDisabled: boolean;
9151
9174
  waitUntil: (promise: Promise<unknown>) => void;
9175
+ apiOrigin?: string | undefined;
9152
9176
  draft: DraftRequest | null;
9153
9177
  locale: string | undefined;
9154
9178
  publishingDraft: string | undefined;
@@ -9184,6 +9208,7 @@ declare const router: {
9184
9208
  client: string;
9185
9209
  telemetryDisabled: boolean;
9186
9210
  waitUntil: (promise: Promise<unknown>) => void;
9211
+ apiOrigin?: string | undefined;
9187
9212
  draft: DraftRequest | null;
9188
9213
  locale: string | undefined;
9189
9214
  publishingDraft: string | undefined;
@@ -9281,6 +9306,7 @@ declare const router: {
9281
9306
  client: string;
9282
9307
  telemetryDisabled: boolean;
9283
9308
  waitUntil: (promise: Promise<unknown>) => void;
9309
+ apiOrigin?: string | undefined;
9284
9310
  draft: DraftRequest | null;
9285
9311
  locale: string | undefined;
9286
9312
  publishingDraft: string | undefined;
@@ -9706,6 +9732,7 @@ declare const router: {
9706
9732
  client: string;
9707
9733
  telemetryDisabled: boolean;
9708
9734
  waitUntil: (promise: Promise<unknown>) => void;
9735
+ apiOrigin?: string | undefined;
9709
9736
  draft: DraftRequest | null;
9710
9737
  locale: string | undefined;
9711
9738
  publishingDraft: string | undefined;
@@ -9741,6 +9768,7 @@ declare const router: {
9741
9768
  client: string;
9742
9769
  telemetryDisabled: boolean;
9743
9770
  waitUntil: (promise: Promise<unknown>) => void;
9771
+ apiOrigin?: string | undefined;
9744
9772
  draft: DraftRequest | null;
9745
9773
  locale: string | undefined;
9746
9774
  publishingDraft: string | undefined;
@@ -9859,6 +9887,7 @@ declare const router: {
9859
9887
  client: string;
9860
9888
  telemetryDisabled: boolean;
9861
9889
  waitUntil: (promise: Promise<unknown>) => void;
9890
+ apiOrigin?: string | undefined;
9862
9891
  draft: DraftRequest | null;
9863
9892
  locale: string | undefined;
9864
9893
  publishingDraft: string | undefined;
@@ -9894,6 +9923,7 @@ declare const router: {
9894
9923
  client: string;
9895
9924
  telemetryDisabled: boolean;
9896
9925
  waitUntil: (promise: Promise<unknown>) => void;
9926
+ apiOrigin?: string | undefined;
9897
9927
  draft: DraftRequest | null;
9898
9928
  locale: string | undefined;
9899
9929
  publishingDraft: string | undefined;
@@ -9943,6 +9973,7 @@ declare const router: {
9943
9973
  client: string;
9944
9974
  telemetryDisabled: boolean;
9945
9975
  waitUntil: (promise: Promise<unknown>) => void;
9976
+ apiOrigin?: string | undefined;
9946
9977
  draft: DraftRequest | null;
9947
9978
  locale: string | undefined;
9948
9979
  publishingDraft: string | undefined;
@@ -9978,6 +10009,7 @@ declare const router: {
9978
10009
  client: string;
9979
10010
  telemetryDisabled: boolean;
9980
10011
  waitUntil: (promise: Promise<unknown>) => void;
10012
+ apiOrigin?: string | undefined;
9981
10013
  draft: DraftRequest | null;
9982
10014
  locale: string | undefined;
9983
10015
  publishingDraft: string | undefined;
@@ -10027,6 +10059,7 @@ declare const router: {
10027
10059
  client: string;
10028
10060
  telemetryDisabled: boolean;
10029
10061
  waitUntil: (promise: Promise<unknown>) => void;
10062
+ apiOrigin?: string | undefined;
10030
10063
  draft: DraftRequest | null;
10031
10064
  locale: string | undefined;
10032
10065
  publishingDraft: string | undefined;
@@ -10062,6 +10095,7 @@ declare const router: {
10062
10095
  client: string;
10063
10096
  telemetryDisabled: boolean;
10064
10097
  waitUntil: (promise: Promise<unknown>) => void;
10098
+ apiOrigin?: string | undefined;
10065
10099
  draft: DraftRequest | null;
10066
10100
  locale: string | undefined;
10067
10101
  publishingDraft: string | undefined;
@@ -10112,6 +10146,7 @@ declare const router: {
10112
10146
  client: string;
10113
10147
  telemetryDisabled: boolean;
10114
10148
  waitUntil: (promise: Promise<unknown>) => void;
10149
+ apiOrigin?: string | undefined;
10115
10150
  draft: DraftRequest | null;
10116
10151
  locale: string | undefined;
10117
10152
  publishingDraft: string | undefined;
@@ -10147,6 +10182,7 @@ declare const router: {
10147
10182
  client: string;
10148
10183
  telemetryDisabled: boolean;
10149
10184
  waitUntil: (promise: Promise<unknown>) => void;
10185
+ apiOrigin?: string | undefined;
10150
10186
  draft: DraftRequest | null;
10151
10187
  locale: string | undefined;
10152
10188
  publishingDraft: string | undefined;
@@ -10195,6 +10231,7 @@ declare const router: {
10195
10231
  client: string;
10196
10232
  telemetryDisabled: boolean;
10197
10233
  waitUntil: (promise: Promise<unknown>) => void;
10234
+ apiOrigin?: string | undefined;
10198
10235
  draft: DraftRequest | null;
10199
10236
  locale: string | undefined;
10200
10237
  publishingDraft: string | undefined;
@@ -10230,6 +10267,7 @@ declare const router: {
10230
10267
  client: string;
10231
10268
  telemetryDisabled: boolean;
10232
10269
  waitUntil: (promise: Promise<unknown>) => void;
10270
+ apiOrigin?: string | undefined;
10233
10271
  draft: DraftRequest | null;
10234
10272
  locale: string | undefined;
10235
10273
  publishingDraft: string | undefined;
@@ -10276,6 +10314,7 @@ declare const router: {
10276
10314
  client: string;
10277
10315
  telemetryDisabled: boolean;
10278
10316
  waitUntil: (promise: Promise<unknown>) => void;
10317
+ apiOrigin?: string | undefined;
10279
10318
  draft: DraftRequest | null;
10280
10319
  locale: string | undefined;
10281
10320
  publishingDraft: string | undefined;
@@ -10324,6 +10363,7 @@ declare const router: {
10324
10363
  client: string;
10325
10364
  telemetryDisabled: boolean;
10326
10365
  waitUntil: (promise: Promise<unknown>) => void;
10366
+ apiOrigin?: string | undefined;
10327
10367
  draft: DraftRequest | null;
10328
10368
  locale: string | undefined;
10329
10369
  publishingDraft: string | undefined;
@@ -10359,6 +10399,7 @@ declare const router: {
10359
10399
  client: string;
10360
10400
  telemetryDisabled: boolean;
10361
10401
  waitUntil: (promise: Promise<unknown>) => void;
10402
+ apiOrigin?: string | undefined;
10362
10403
  draft: DraftRequest | null;
10363
10404
  locale: string | undefined;
10364
10405
  publishingDraft: string | undefined;
@@ -10615,6 +10656,7 @@ declare const router: {
10615
10656
  client: string;
10616
10657
  telemetryDisabled: boolean;
10617
10658
  waitUntil: (promise: Promise<unknown>) => void;
10659
+ apiOrigin?: string | undefined;
10618
10660
  draft: DraftRequest | null;
10619
10661
  locale: string | undefined;
10620
10662
  publishingDraft: string | undefined;
@@ -10650,6 +10692,7 @@ declare const router: {
10650
10692
  client: string;
10651
10693
  telemetryDisabled: boolean;
10652
10694
  waitUntil: (promise: Promise<unknown>) => void;
10695
+ apiOrigin?: string | undefined;
10653
10696
  draft: DraftRequest | null;
10654
10697
  locale: string | undefined;
10655
10698
  publishingDraft: string | undefined;
@@ -10699,6 +10742,7 @@ declare const router: {
10699
10742
  client: string;
10700
10743
  telemetryDisabled: boolean;
10701
10744
  waitUntil: (promise: Promise<unknown>) => void;
10745
+ apiOrigin?: string | undefined;
10702
10746
  draft: DraftRequest | null;
10703
10747
  locale: string | undefined;
10704
10748
  publishingDraft: string | undefined;
@@ -10734,6 +10778,7 @@ declare const router: {
10734
10778
  client: string;
10735
10779
  telemetryDisabled: boolean;
10736
10780
  waitUntil: (promise: Promise<unknown>) => void;
10781
+ apiOrigin?: string | undefined;
10737
10782
  draft: DraftRequest | null;
10738
10783
  locale: string | undefined;
10739
10784
  publishingDraft: string | undefined;
@@ -10781,6 +10826,7 @@ declare const router: {
10781
10826
  client: string;
10782
10827
  telemetryDisabled: boolean;
10783
10828
  waitUntil: (promise: Promise<unknown>) => void;
10829
+ apiOrigin?: string | undefined;
10784
10830
  draft: DraftRequest | null;
10785
10831
  locale: string | undefined;
10786
10832
  publishingDraft: string | undefined;
@@ -10828,6 +10874,7 @@ declare const router: {
10828
10874
  client: string;
10829
10875
  telemetryDisabled: boolean;
10830
10876
  waitUntil: (promise: Promise<unknown>) => void;
10877
+ apiOrigin?: string | undefined;
10831
10878
  draft: DraftRequest | null;
10832
10879
  locale: string | undefined;
10833
10880
  publishingDraft: string | undefined;
@@ -10882,6 +10929,7 @@ declare const router: {
10882
10929
  client: string;
10883
10930
  telemetryDisabled: boolean;
10884
10931
  waitUntil: (promise: Promise<unknown>) => void;
10932
+ apiOrigin?: string | undefined;
10885
10933
  draft: DraftRequest | null;
10886
10934
  locale: string | undefined;
10887
10935
  publishingDraft: string | undefined;
@@ -10917,6 +10965,7 @@ declare const router: {
10917
10965
  client: string;
10918
10966
  telemetryDisabled: boolean;
10919
10967
  waitUntil: (promise: Promise<unknown>) => void;
10968
+ apiOrigin?: string | undefined;
10920
10969
  draft: DraftRequest | null;
10921
10970
  locale: string | undefined;
10922
10971
  publishingDraft: string | undefined;
@@ -11099,6 +11148,7 @@ declare const router: {
11099
11148
  client: string;
11100
11149
  telemetryDisabled: boolean;
11101
11150
  waitUntil: (promise: Promise<unknown>) => void;
11151
+ apiOrigin?: string | undefined;
11102
11152
  draft: DraftRequest | null;
11103
11153
  locale: string | undefined;
11104
11154
  publishingDraft: string | undefined;
@@ -11134,6 +11184,7 @@ declare const router: {
11134
11184
  client: string;
11135
11185
  telemetryDisabled: boolean;
11136
11186
  waitUntil: (promise: Promise<unknown>) => void;
11187
+ apiOrigin?: string | undefined;
11137
11188
  draft: DraftRequest | null;
11138
11189
  locale: string | undefined;
11139
11190
  publishingDraft: string | undefined;
@@ -11231,6 +11282,7 @@ declare const router: {
11231
11282
  client: string;
11232
11283
  telemetryDisabled: boolean;
11233
11284
  waitUntil: (promise: Promise<unknown>) => void;
11285
+ apiOrigin?: string | undefined;
11234
11286
  draft: DraftRequest | null;
11235
11287
  locale: string | undefined;
11236
11288
  publishingDraft: string | undefined;
@@ -11266,6 +11318,7 @@ declare const router: {
11266
11318
  client: string;
11267
11319
  telemetryDisabled: boolean;
11268
11320
  waitUntil: (promise: Promise<unknown>) => void;
11321
+ apiOrigin?: string | undefined;
11269
11322
  draft: DraftRequest | null;
11270
11323
  locale: string | undefined;
11271
11324
  publishingDraft: string | undefined;
@@ -11363,6 +11416,7 @@ declare const router: {
11363
11416
  client: string;
11364
11417
  telemetryDisabled: boolean;
11365
11418
  waitUntil: (promise: Promise<unknown>) => void;
11419
+ apiOrigin?: string | undefined;
11366
11420
  draft: DraftRequest | null;
11367
11421
  locale: string | undefined;
11368
11422
  publishingDraft: string | undefined;
@@ -11398,6 +11452,7 @@ declare const router: {
11398
11452
  client: string;
11399
11453
  telemetryDisabled: boolean;
11400
11454
  waitUntil: (promise: Promise<unknown>) => void;
11455
+ apiOrigin?: string | undefined;
11401
11456
  draft: DraftRequest | null;
11402
11457
  locale: string | undefined;
11403
11458
  publishingDraft: string | undefined;
@@ -11494,6 +11549,7 @@ declare const router: {
11494
11549
  client: string;
11495
11550
  telemetryDisabled: boolean;
11496
11551
  waitUntil: (promise: Promise<unknown>) => void;
11552
+ apiOrigin?: string | undefined;
11497
11553
  draft: DraftRequest | null;
11498
11554
  locale: string | undefined;
11499
11555
  publishingDraft: string | undefined;
@@ -11529,6 +11585,7 @@ declare const router: {
11529
11585
  client: string;
11530
11586
  telemetryDisabled: boolean;
11531
11587
  waitUntil: (promise: Promise<unknown>) => void;
11588
+ apiOrigin?: string | undefined;
11532
11589
  draft: DraftRequest | null;
11533
11590
  locale: string | undefined;
11534
11591
  publishingDraft: string | undefined;
@@ -11577,6 +11634,7 @@ declare const router: {
11577
11634
  client: string;
11578
11635
  telemetryDisabled: boolean;
11579
11636
  waitUntil: (promise: Promise<unknown>) => void;
11637
+ apiOrigin?: string | undefined;
11580
11638
  draft: DraftRequest | null;
11581
11639
  locale: string | undefined;
11582
11640
  publishingDraft: string | undefined;
@@ -11612,6 +11670,7 @@ declare const router: {
11612
11670
  client: string;
11613
11671
  telemetryDisabled: boolean;
11614
11672
  waitUntil: (promise: Promise<unknown>) => void;
11673
+ apiOrigin?: string | undefined;
11615
11674
  draft: DraftRequest | null;
11616
11675
  locale: string | undefined;
11617
11676
  publishingDraft: string | undefined;
@@ -11707,6 +11766,7 @@ declare const router: {
11707
11766
  client: string;
11708
11767
  telemetryDisabled: boolean;
11709
11768
  waitUntil: (promise: Promise<unknown>) => void;
11769
+ apiOrigin?: string | undefined;
11710
11770
  draft: DraftRequest | null;
11711
11771
  locale: string | undefined;
11712
11772
  publishingDraft: string | undefined;
@@ -11866,6 +11926,7 @@ declare const router: {
11866
11926
  client: string;
11867
11927
  telemetryDisabled: boolean;
11868
11928
  waitUntil: (promise: Promise<unknown>) => void;
11929
+ apiOrigin?: string | undefined;
11869
11930
  draft: DraftRequest | null;
11870
11931
  locale: string | undefined;
11871
11932
  publishingDraft: string | undefined;
@@ -11901,6 +11962,7 @@ declare const router: {
11901
11962
  client: string;
11902
11963
  telemetryDisabled: boolean;
11903
11964
  waitUntil: (promise: Promise<unknown>) => void;
11965
+ apiOrigin?: string | undefined;
11904
11966
  draft: DraftRequest | null;
11905
11967
  locale: string | undefined;
11906
11968
  publishingDraft: string | undefined;
@@ -12009,6 +12071,7 @@ declare const router: {
12009
12071
  client: string;
12010
12072
  telemetryDisabled: boolean;
12011
12073
  waitUntil: (promise: Promise<unknown>) => void;
12074
+ apiOrigin?: string | undefined;
12012
12075
  draft: DraftRequest | null;
12013
12076
  locale: string | undefined;
12014
12077
  publishingDraft: string | undefined;
@@ -12044,6 +12107,7 @@ declare const router: {
12044
12107
  client: string;
12045
12108
  telemetryDisabled: boolean;
12046
12109
  waitUntil: (promise: Promise<unknown>) => void;
12110
+ apiOrigin?: string | undefined;
12047
12111
  draft: DraftRequest | null;
12048
12112
  locale: string | undefined;
12049
12113
  publishingDraft: string | undefined;
@@ -12139,6 +12203,7 @@ declare const router: {
12139
12203
  client: string;
12140
12204
  telemetryDisabled: boolean;
12141
12205
  waitUntil: (promise: Promise<unknown>) => void;
12206
+ apiOrigin?: string | undefined;
12142
12207
  draft: DraftRequest | null;
12143
12208
  locale: string | undefined;
12144
12209
  publishingDraft: string | undefined;
@@ -12174,6 +12239,7 @@ declare const router: {
12174
12239
  client: string;
12175
12240
  telemetryDisabled: boolean;
12176
12241
  waitUntil: (promise: Promise<unknown>) => void;
12242
+ apiOrigin?: string | undefined;
12177
12243
  draft: DraftRequest | null;
12178
12244
  locale: string | undefined;
12179
12245
  publishingDraft: string | undefined;
@@ -12269,6 +12335,7 @@ declare const router: {
12269
12335
  client: string;
12270
12336
  telemetryDisabled: boolean;
12271
12337
  waitUntil: (promise: Promise<unknown>) => void;
12338
+ apiOrigin?: string | undefined;
12272
12339
  draft: DraftRequest | null;
12273
12340
  locale: string | undefined;
12274
12341
  publishingDraft: string | undefined;
@@ -12304,6 +12371,7 @@ declare const router: {
12304
12371
  client: string;
12305
12372
  telemetryDisabled: boolean;
12306
12373
  waitUntil: (promise: Promise<unknown>) => void;
12374
+ apiOrigin?: string | undefined;
12307
12375
  draft: DraftRequest | null;
12308
12376
  locale: string | undefined;
12309
12377
  publishingDraft: string | undefined;
@@ -12400,6 +12468,7 @@ declare const router: {
12400
12468
  client: string;
12401
12469
  telemetryDisabled: boolean;
12402
12470
  waitUntil: (promise: Promise<unknown>) => void;
12471
+ apiOrigin?: string | undefined;
12403
12472
  draft: DraftRequest | null;
12404
12473
  locale: string | undefined;
12405
12474
  publishingDraft: string | undefined;
@@ -12435,6 +12504,7 @@ declare const router: {
12435
12504
  client: string;
12436
12505
  telemetryDisabled: boolean;
12437
12506
  waitUntil: (promise: Promise<unknown>) => void;
12507
+ apiOrigin?: string | undefined;
12438
12508
  draft: DraftRequest | null;
12439
12509
  locale: string | undefined;
12440
12510
  publishingDraft: string | undefined;
@@ -12527,6 +12597,7 @@ declare const router: {
12527
12597
  client: string;
12528
12598
  telemetryDisabled: boolean;
12529
12599
  waitUntil: (promise: Promise<unknown>) => void;
12600
+ apiOrigin?: string | undefined;
12530
12601
  draft: DraftRequest | null;
12531
12602
  locale: string | undefined;
12532
12603
  publishingDraft: string | undefined;
@@ -12621,6 +12692,7 @@ declare const router: {
12621
12692
  client: string;
12622
12693
  telemetryDisabled: boolean;
12623
12694
  waitUntil: (promise: Promise<unknown>) => void;
12695
+ apiOrigin?: string | undefined;
12624
12696
  draft: DraftRequest | null;
12625
12697
  locale: string | undefined;
12626
12698
  publishingDraft: string | undefined;
@@ -12656,6 +12728,7 @@ declare const router: {
12656
12728
  client: string;
12657
12729
  telemetryDisabled: boolean;
12658
12730
  waitUntil: (promise: Promise<unknown>) => void;
12731
+ apiOrigin?: string | undefined;
12659
12732
  draft: DraftRequest | null;
12660
12733
  locale: string | undefined;
12661
12734
  publishingDraft: string | undefined;
@@ -12791,6 +12864,7 @@ declare const router: {
12791
12864
  client: string;
12792
12865
  telemetryDisabled: boolean;
12793
12866
  waitUntil: (promise: Promise<unknown>) => void;
12867
+ apiOrigin?: string | undefined;
12794
12868
  draft: DraftRequest | null;
12795
12869
  locale: string | undefined;
12796
12870
  publishingDraft: string | undefined;
@@ -12849,6 +12923,7 @@ declare const router: {
12849
12923
  client: string;
12850
12924
  telemetryDisabled: boolean;
12851
12925
  waitUntil: (promise: Promise<unknown>) => void;
12926
+ apiOrigin?: string | undefined;
12852
12927
  draft: DraftRequest | null;
12853
12928
  locale: string | undefined;
12854
12929
  publishingDraft: string | undefined;
@@ -12910,6 +12985,7 @@ declare const router: {
12910
12985
  client: string;
12911
12986
  telemetryDisabled: boolean;
12912
12987
  waitUntil: (promise: Promise<unknown>) => void;
12988
+ apiOrigin?: string | undefined;
12913
12989
  draft: DraftRequest | null;
12914
12990
  locale: string | undefined;
12915
12991
  publishingDraft: string | undefined;
@@ -12967,6 +13043,7 @@ declare const router: {
12967
13043
  client: string;
12968
13044
  telemetryDisabled: boolean;
12969
13045
  waitUntil: (promise: Promise<unknown>) => void;
13046
+ apiOrigin?: string | undefined;
12970
13047
  draft: DraftRequest | null;
12971
13048
  locale: string | undefined;
12972
13049
  publishingDraft: string | undefined;
@@ -13031,6 +13108,7 @@ declare const router: {
13031
13108
  client: string;
13032
13109
  telemetryDisabled: boolean;
13033
13110
  waitUntil: (promise: Promise<unknown>) => void;
13111
+ apiOrigin?: string | undefined;
13034
13112
  draft: DraftRequest | null;
13035
13113
  locale: string | undefined;
13036
13114
  publishingDraft: string | undefined;
@@ -13150,6 +13228,7 @@ declare const router: {
13150
13228
  client: string;
13151
13229
  telemetryDisabled: boolean;
13152
13230
  waitUntil: (promise: Promise<unknown>) => void;
13231
+ apiOrigin?: string | undefined;
13153
13232
  draft: DraftRequest | null;
13154
13233
  locale: string | undefined;
13155
13234
  publishingDraft: string | undefined;
@@ -13185,6 +13264,7 @@ declare const router: {
13185
13264
  client: string;
13186
13265
  telemetryDisabled: boolean;
13187
13266
  waitUntil: (promise: Promise<unknown>) => void;
13267
+ apiOrigin?: string | undefined;
13188
13268
  draft: DraftRequest | null;
13189
13269
  locale: string | undefined;
13190
13270
  publishingDraft: string | undefined;
@@ -13252,6 +13332,7 @@ declare const router: {
13252
13332
  client: string;
13253
13333
  telemetryDisabled: boolean;
13254
13334
  waitUntil: (promise: Promise<unknown>) => void;
13335
+ apiOrigin?: string | undefined;
13255
13336
  draft: DraftRequest | null;
13256
13337
  locale: string | undefined;
13257
13338
  publishingDraft: string | undefined;
@@ -13287,6 +13368,7 @@ declare const router: {
13287
13368
  client: string;
13288
13369
  telemetryDisabled: boolean;
13289
13370
  waitUntil: (promise: Promise<unknown>) => void;
13371
+ apiOrigin?: string | undefined;
13290
13372
  draft: DraftRequest | null;
13291
13373
  locale: string | undefined;
13292
13374
  publishingDraft: string | undefined;
@@ -13354,6 +13436,7 @@ declare const router: {
13354
13436
  client: string;
13355
13437
  telemetryDisabled: boolean;
13356
13438
  waitUntil: (promise: Promise<unknown>) => void;
13439
+ apiOrigin?: string | undefined;
13357
13440
  draft: DraftRequest | null;
13358
13441
  locale: string | undefined;
13359
13442
  publishingDraft: string | undefined;
@@ -13389,6 +13472,7 @@ declare const router: {
13389
13472
  client: string;
13390
13473
  telemetryDisabled: boolean;
13391
13474
  waitUntil: (promise: Promise<unknown>) => void;
13475
+ apiOrigin?: string | undefined;
13392
13476
  draft: DraftRequest | null;
13393
13477
  locale: string | undefined;
13394
13478
  publishingDraft: string | undefined;
@@ -13700,6 +13784,7 @@ declare const router: {
13700
13784
  client: string;
13701
13785
  telemetryDisabled: boolean;
13702
13786
  waitUntil: (promise: Promise<unknown>) => void;
13787
+ apiOrigin?: string | undefined;
13703
13788
  draft: DraftRequest | null;
13704
13789
  locale: string | undefined;
13705
13790
  publishingDraft: string | undefined;
@@ -13760,6 +13845,7 @@ declare const router: {
13760
13845
  client: string;
13761
13846
  telemetryDisabled: boolean;
13762
13847
  waitUntil: (promise: Promise<unknown>) => void;
13848
+ apiOrigin?: string | undefined;
13763
13849
  draft: DraftRequest | null;
13764
13850
  locale: string | undefined;
13765
13851
  publishingDraft: string | undefined;
@@ -13807,6 +13893,7 @@ declare const router: {
13807
13893
  client: string;
13808
13894
  telemetryDisabled: boolean;
13809
13895
  waitUntil: (promise: Promise<unknown>) => void;
13896
+ apiOrigin?: string | undefined;
13810
13897
  draft: DraftRequest | null;
13811
13898
  locale: string | undefined;
13812
13899
  publishingDraft: string | undefined;
@@ -13853,6 +13940,7 @@ declare const router: {
13853
13940
  client: string;
13854
13941
  telemetryDisabled: boolean;
13855
13942
  waitUntil: (promise: Promise<unknown>) => void;
13943
+ apiOrigin?: string | undefined;
13856
13944
  draft: DraftRequest | null;
13857
13945
  locale: string | undefined;
13858
13946
  publishingDraft: string | undefined;
@@ -13900,6 +13988,7 @@ declare const router: {
13900
13988
  client: string;
13901
13989
  telemetryDisabled: boolean;
13902
13990
  waitUntil: (promise: Promise<unknown>) => void;
13991
+ apiOrigin?: string | undefined;
13903
13992
  draft: DraftRequest | null;
13904
13993
  locale: string | undefined;
13905
13994
  publishingDraft: string | undefined;
@@ -13990,6 +14079,7 @@ declare const router: {
13990
14079
  client: string;
13991
14080
  telemetryDisabled: boolean;
13992
14081
  waitUntil: (promise: Promise<unknown>) => void;
14082
+ apiOrigin?: string | undefined;
13993
14083
  draft: DraftRequest | null;
13994
14084
  locale: string | undefined;
13995
14085
  publishingDraft: string | undefined;
@@ -14036,6 +14126,7 @@ declare const router: {
14036
14126
  client: string;
14037
14127
  telemetryDisabled: boolean;
14038
14128
  waitUntil: (promise: Promise<unknown>) => void;
14129
+ apiOrigin?: string | undefined;
14039
14130
  draft: DraftRequest | null;
14040
14131
  locale: string | undefined;
14041
14132
  publishingDraft: string | undefined;
@@ -14045,7 +14136,7 @@ declare const router: {
14045
14136
  publishAnyway: import("zod").ZodOptional<import("zod").ZodBoolean>;
14046
14137
  revision: import("zod").ZodOptional<import("zod").ZodString>;
14047
14138
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<PublishResult, PublishResult>, Record<never, never>, Record<never, never>>;
14048
- discard: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
14139
+ delete: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<import("@orpc/server").MergedInitialContext<BaseContext & Record<never, never>, BaseContext, BaseContext>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
14049
14140
  draft: DraftRequest | null;
14050
14141
  locale: string | undefined;
14051
14142
  publishingDraft: string | undefined;
@@ -14085,6 +14176,7 @@ declare const router: {
14085
14176
  client: string;
14086
14177
  telemetryDisabled: boolean;
14087
14178
  waitUntil: (promise: Promise<unknown>) => void;
14179
+ apiOrigin?: string | undefined;
14088
14180
  draft: DraftRequest | null;
14089
14181
  locale: string | undefined;
14090
14182
  publishingDraft: string | undefined;
@@ -14135,6 +14227,7 @@ declare const router: {
14135
14227
  client: string;
14136
14228
  telemetryDisabled: boolean;
14137
14229
  waitUntil: (promise: Promise<unknown>) => void;
14230
+ apiOrigin?: string | undefined;
14138
14231
  draft: DraftRequest | null;
14139
14232
  locale: string | undefined;
14140
14233
  publishingDraft: string | undefined;
@@ -14194,6 +14287,7 @@ declare const router: {
14194
14287
  client: string;
14195
14288
  telemetryDisabled: boolean;
14196
14289
  waitUntil: (promise: Promise<unknown>) => void;
14290
+ apiOrigin?: string | undefined;
14197
14291
  draft: DraftRequest | null;
14198
14292
  locale: string | undefined;
14199
14293
  publishingDraft: string | undefined;
@@ -14242,6 +14336,7 @@ declare const router: {
14242
14336
  client: string;
14243
14337
  telemetryDisabled: boolean;
14244
14338
  waitUntil: (promise: Promise<unknown>) => void;
14339
+ apiOrigin?: string | undefined;
14245
14340
  draft: DraftRequest | null;
14246
14341
  locale: string | undefined;
14247
14342
  publishingDraft: string | undefined;
package/dist/threads.d.ts CHANGED
@@ -204,6 +204,11 @@ export type ThreadView = LiveThreadHandoff & {
204
204
  * turn is building it, or it failed and the agent is fixing it.
205
205
  */
206
206
  status?: BuildStatus;
207
+ /**
208
+ * While a run is going, whether the agent is using its tools, code mode included, rather than
209
+ * thinking: from writing a call until the model is called again.
210
+ */
211
+ usingTools?: true;
207
212
  };
208
213
  export declare const EMPTY_THREAD_VIEW: ThreadView;
209
214
  /**
@@ -214,6 +219,10 @@ export declare const EMPTY_THREAD_VIEW: ThreadView;
214
219
  export type ThreadState = LiveThreadHandoff & {
215
220
  steps: readonly ThreadStep[];
216
221
  running: boolean;
222
+ /** The model's calls still running, by call id. A tool's own calls aren't the agent's. */
223
+ toolCalls?: readonly string[];
224
+ /** Whether the model's latest message makes tool calls: it writes them, then they run. */
225
+ callingTools?: boolean;
217
226
  };
218
227
  export declare const EMPTY_THREAD_STATE: ThreadState;
219
228
  /** One transcript entry, as far as the studio's view is concerned. */
@@ -321,7 +330,7 @@ export declare const THREAD_ENDED_CLOSE_CODE = 4000;
321
330
  * run is over, or a later message started another run after its last model call came back
322
331
  * unfinished. While Pi retries a failed call, the run goes on, so the turn shows as working.
323
332
  */
324
- export declare function threadViewOf({ steps, running, ...drafts }: ThreadState): ThreadView;
333
+ export declare function threadViewOf({ steps, running, toolCalls, callingTools, ...drafts }: ThreadState): ThreadView;
325
334
  /** Folds one of Pi's agent events into the thread's state. */
326
335
  export declare function reduceThreadState(state: ThreadState, event: AgentEvent): ThreadState;
327
336
  /** Folds a batch of Pi's agent events into the thread's state. */
package/dist/threads.js CHANGED
@@ -191,7 +191,7 @@ function threadStepOf(entry) {
191
191
  * run is over, or a later message started another run after its last model call came back
192
192
  * unfinished. While Pi retries a failed call, the run goes on, so the turn shows as working.
193
193
  */
194
- function threadViewOf({ steps, running, ...drafts }) {
194
+ function threadViewOf({ steps, running, toolCalls = [], callingTools = false, ...drafts }) {
195
195
  const messages = [];
196
196
  let waiting;
197
197
  let unfinished = false;
@@ -273,11 +273,13 @@ function threadViewOf({ steps, running, ...drafts }) {
273
273
  case "unfinished": unfinished = true;
274
274
  }
275
275
  if (!running) fail();
276
+ const usingTools = running && (callingTools || toolCalls.length > 0);
276
277
  return {
277
278
  ...drafts,
278
279
  messages,
279
280
  running,
280
- ...running && status && { status }
281
+ ...running && status && { status },
282
+ ...usingTools && { usingTools }
281
283
  };
282
284
  }
283
285
  const append = (state, entry) => {
@@ -294,7 +296,9 @@ function reduceThreadState(state, event) {
294
296
  case "snapshot": return {
295
297
  ...state,
296
298
  steps: event.entries.flatMap((entry) => threadStepOf(entry) ?? []),
297
- running: event.run !== void 0
299
+ running: event.run !== void 0,
300
+ toolCalls: event.tools.flatMap((tool) => tool.status === "done" ? [] : [tool.callId]),
301
+ callingTools: !!event.generation?.message?.content.some((part) => part.type === "toolCall")
298
302
  };
299
303
  case "run_start": return {
300
304
  ...state,
@@ -302,11 +306,30 @@ function reduceThreadState(state, event) {
302
306
  };
303
307
  case "run_end": return {
304
308
  ...state,
305
- running: false
309
+ running: false,
310
+ toolCalls: [],
311
+ callingTools: false
306
312
  };
313
+ case "message_start": return event.message.role === "assistant" ? {
314
+ ...state,
315
+ callingTools: false
316
+ } : state;
317
+ case "message_update": return event.changes.some((change) => change.type === "toolcall_start") ? {
318
+ ...state,
319
+ callingTools: true
320
+ } : state;
321
+ case "tool_execution_start":
322
+ if (event.parentToolCallId !== void 0) return state;
323
+ return {
324
+ ...state,
325
+ toolCalls: [...state.toolCalls ?? [], event.toolCallId]
326
+ };
327
+ case "tool_execution_end": return append({
328
+ ...state,
329
+ toolCalls: state.toolCalls?.filter((callId) => callId !== event.toolCallId)
330
+ }, event.entry);
307
331
  case "message_end":
308
- case "entry_appended":
309
- case "tool_execution_end": return append(state, event.entry);
332
+ case "entry_appended": return append(state, event.entry);
310
333
  default: return state;
311
334
  }
312
335
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camox/api-contract",
3
- "version": "0.53.1",
3
+ "version": "0.56.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "src",
package/src/drafts.ts CHANGED
@@ -50,7 +50,7 @@ export const DRAFT_SEARCH_PARAM = "camox-draft";
50
50
  export type DraftKind = "regular" | "development";
51
51
 
52
52
  /** How a regular draft ended. */
53
- export type DraftOutcome = "published" | "discarded";
53
+ export type DraftOutcome = "published" | "deleted";
54
54
 
55
55
  /** Who ended a draft, how and when, from its ended-drafts record (ADR 0009, ADR 0011). */
56
56
  export type EndedDraft = {
@@ -62,7 +62,7 @@ export type EndedDraft = {
62
62
 
63
63
  /**
64
64
  * The oRPC error code a request naming an ended draft fails with. Its `data` is an `EndedDraft`,
65
- * so a page can render Live and say who published or discarded the draft.
65
+ * so a page can render Live and say who published or deleted the draft.
66
66
  */
67
67
  export const DRAFT_ENDED_ERROR_CODE = "DRAFT_ENDED";
68
68
 
package/src/query-keys.ts CHANGED
@@ -89,7 +89,7 @@ export type InvalidationMessage = {
89
89
  targets: QueryKey[];
90
90
  };
91
91
 
92
- /** A draft was published or discarded: its viewers go back to Live. */
92
+ /** A draft was published or deleted: its viewers go back to Live. */
93
93
  export type DraftEndedMessage = { type: "draftEnded" } & EndedDraft;
94
94
 
95
95
  /** A draft with code has a new revision, built with Camox's `sdkVersion`. */
package/src/threads.ts CHANGED
@@ -143,6 +143,11 @@ export type ThreadView = LiveThreadHandoff & {
143
143
  * turn is building it, or it failed and the agent is fixing it.
144
144
  */
145
145
  status?: BuildStatus;
146
+ /**
147
+ * While a run is going, whether the agent is using its tools, code mode included, rather than
148
+ * thinking: from writing a call until the model is called again.
149
+ */
150
+ usingTools?: true;
146
151
  };
147
152
 
148
153
  export const EMPTY_THREAD_VIEW: ThreadView = { messages: [], running: false };
@@ -152,7 +157,14 @@ export const EMPTY_THREAD_VIEW: ThreadView = { messages: [], running: false };
152
157
  * and whether a run is going. The studio and the tests fold Pi's events into this, and derive
153
158
  * the view from it with `threadViewOf`, so a snapshot and the events that led to it show the same.
154
159
  */
155
- export type ThreadState = LiveThreadHandoff & { steps: readonly ThreadStep[]; running: boolean };
160
+ export type ThreadState = LiveThreadHandoff & {
161
+ steps: readonly ThreadStep[];
162
+ running: boolean;
163
+ /** The model's calls still running, by call id. A tool's own calls aren't the agent's. */
164
+ toolCalls?: readonly string[];
165
+ /** Whether the model's latest message makes tool calls: it writes them, then they run. */
166
+ callingTools?: boolean;
167
+ };
156
168
 
157
169
  export const EMPTY_THREAD_STATE: ThreadState = { steps: [], running: false };
158
170
 
@@ -280,7 +292,13 @@ function threadStepOf(entry: EntryRecord): ThreadStep | undefined {
280
292
  * run is over, or a later message started another run after its last model call came back
281
293
  * unfinished. While Pi retries a failed call, the run goes on, so the turn shows as working.
282
294
  */
283
- export function threadViewOf({ steps, running, ...drafts }: ThreadState): ThreadView {
295
+ export function threadViewOf({
296
+ steps,
297
+ running,
298
+ toolCalls = [],
299
+ callingTools = false,
300
+ ...drafts
301
+ }: ThreadState): ThreadView {
284
302
  const messages: ThreadMessage[] = [];
285
303
  // The latest editor's message of a turn still waiting for the agent's message.
286
304
  let waiting: string | undefined;
@@ -353,7 +371,14 @@ export function threadViewOf({ steps, running, ...drafts }: ThreadState): Thread
353
371
  }
354
372
  }
355
373
  if (!running) fail();
356
- return { ...drafts, messages, running, ...(running && status && { status }) };
374
+ const usingTools = running && (callingTools || toolCalls.length > 0);
375
+ return {
376
+ ...drafts,
377
+ messages,
378
+ running,
379
+ ...(running && status && { status }),
380
+ ...(usingTools && { usingTools }),
381
+ };
357
382
  }
358
383
 
359
384
  const append = (state: ThreadState, entry: EntryRecord | undefined): ThreadState => {
@@ -370,14 +395,33 @@ export function reduceThreadState(state: ThreadState, event: AgentEvent): Thread
370
395
  ...state,
371
396
  steps: event.entries.flatMap((entry) => threadStepOf(entry) ?? []),
372
397
  running: event.run !== undefined,
398
+ toolCalls: event.tools.flatMap((tool) => (tool.status === "done" ? [] : [tool.callId])),
399
+ callingTools: !!event.generation?.message?.content.some((part) => part.type === "toolCall"),
373
400
  };
374
401
  case "run_start":
375
402
  return { ...state, running: true };
376
403
  case "run_end":
377
- return { ...state, running: false };
404
+ return { ...state, running: false, toolCalls: [], callingTools: false };
405
+ case "message_start":
406
+ // The model is called again: it thinks until it writes a tool call.
407
+ return event.message.role === "assistant" ? { ...state, callingTools: false } : state;
408
+ case "message_update":
409
+ return event.changes.some((change) => change.type === "toolcall_start")
410
+ ? { ...state, callingTools: true }
411
+ : state;
412
+ case "tool_execution_start":
413
+ if (event.parentToolCallId !== undefined) return state;
414
+ return { ...state, toolCalls: [...(state.toolCalls ?? []), event.toolCallId] };
415
+ case "tool_execution_end":
416
+ return append(
417
+ {
418
+ ...state,
419
+ toolCalls: state.toolCalls?.filter((callId) => callId !== event.toolCallId),
420
+ },
421
+ event.entry,
422
+ );
378
423
  case "message_end":
379
424
  case "entry_appended":
380
- case "tool_execution_end":
381
425
  return append(state, event.entry);
382
426
  default:
383
427
  return state;