@camox/api-contract 0.58.0 → 0.59.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/router.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import "@orpc/server";
3
3
  import "@camox/api-contract/projects";
4
- import { DraftKind, EndedDraft, PublishAbortReason } from "@camox/api-contract/drafts";
4
+ import { EndedDraft, PublishAbortReason } from "@camox/api-contract/drafts";
5
5
  import "effect";
6
6
  import "drizzle-orm";
7
7
  import "drizzle-orm/sqlite-core";
@@ -11,9 +11,9 @@ import { ThreadSender } from "@camox/api-contract/threads";
11
11
  import { PiHarness, PiHarnessOptions } from "agents/harness/pi";
12
12
  import { CapabilityStartContext, Lifecycle } from "agents/lifecycle";
13
13
  import { WebSockets } from "agents/websockets";
14
+ import { FileErrorCode } from "@earendil-works/pi-durable/env";
14
15
  import "@camox/ai-tools";
15
16
  import "@earendil-works/pi-durable";
16
- import { FileErrorCode } from "@earendil-works/pi-durable/env";
17
17
  import { CiParams, CloudflareArtifacts } from "@cloudflare/ci";
18
18
  import "@cloudflare/ci/worker";
19
19
  import { PosthogRegion } from "@camox/api-contract/analytics";
@@ -1306,14 +1306,11 @@ type GeneratedValues = {
1306
1306
  //#region ../../apps/api/src/domains/drafts/scope.d.ts
1307
1307
  /**
1308
1308
  * The draft a request names, before it is checked: a draft's id, where `create` asks for a
1309
- * missing regular draft to be created with it, or the caller's development draft in the
1310
- * project the request acts on (ADR 0011).
1309
+ * missing draft to be created with it (ADR 0011).
1311
1310
  */
1312
1311
  type DraftRequest = {
1313
1312
  id: string;
1314
1313
  create: boolean;
1315
- } | {
1316
- development: true;
1317
1314
  };
1318
1315
  //#endregion
1319
1316
  //#region ../../apps/api/src/domains/drafts/overlay.d.ts
@@ -1422,6 +1419,25 @@ declare function createDb(d1: D1Database): import("drizzle-orm/d1").DrizzleD1Dat
1422
1419
  }, {}, {
1423
1420
  length: undefined;
1424
1421
  }>;
1422
+ customDomain: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1423
+ name: "custom_domain";
1424
+ tableName: "projects";
1425
+ dataType: "string";
1426
+ columnType: "SQLiteText";
1427
+ data: string;
1428
+ driverParam: string;
1429
+ notNull: false;
1430
+ hasDefault: false;
1431
+ isPrimaryKey: false;
1432
+ isAutoincrement: false;
1433
+ hasRuntimeDefault: false;
1434
+ enumValues: [string, ...string[]];
1435
+ baseColumn: never;
1436
+ identity: undefined;
1437
+ generated: undefined;
1438
+ }, {}, {
1439
+ length: number | undefined;
1440
+ }>;
1425
1441
  name: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1426
1442
  name: "name";
1427
1443
  tableName: "projects";
@@ -1687,6 +1703,23 @@ declare function createDb(d1: D1Database): import("drizzle-orm/d1").DrizzleD1Dat
1687
1703
  }, {}, {
1688
1704
  length: number | undefined;
1689
1705
  }>;
1706
+ codeOutsideCamox: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1707
+ name: "code_outside_camox";
1708
+ tableName: "projects";
1709
+ dataType: "boolean";
1710
+ columnType: "SQLiteBoolean";
1711
+ data: boolean;
1712
+ driverParam: number;
1713
+ notNull: true;
1714
+ hasDefault: true;
1715
+ isPrimaryKey: false;
1716
+ isAutoincrement: false;
1717
+ hasRuntimeDefault: false;
1718
+ enumValues: undefined;
1719
+ baseColumn: never;
1720
+ identity: undefined;
1721
+ generated: undefined;
1722
+ }, {}, {}>;
1690
1723
  createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1691
1724
  name: "created_at";
1692
1725
  tableName: "projects";
@@ -1764,26 +1797,6 @@ declare function createDb(d1: D1Database): import("drizzle-orm/d1").DrizzleD1Dat
1764
1797
  identity: undefined;
1765
1798
  generated: undefined;
1766
1799
  }, {}, {}>;
1767
- kind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1768
- name: "kind";
1769
- tableName: "drafts";
1770
- dataType: "string";
1771
- columnType: "SQLiteText";
1772
- data: import("@camox/api-contract/drafts").DraftKind;
1773
- driverParam: string;
1774
- notNull: true;
1775
- hasDefault: false;
1776
- isPrimaryKey: false;
1777
- isAutoincrement: false;
1778
- hasRuntimeDefault: false;
1779
- enumValues: [string, ...string[]];
1780
- baseColumn: never;
1781
- identity: undefined;
1782
- generated: undefined;
1783
- }, {}, {
1784
- length: undefined;
1785
- $type: import("@camox/api-contract/drafts").DraftKind;
1786
- }>;
1787
1800
  name: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1788
1801
  name: "name";
1789
1802
  tableName: "drafts";
@@ -6014,189 +6027,6 @@ declare class EdgeCachePurger extends DurableObject<Bindings> {
6014
6027
  //#region ../../apps/api/src/lib/edge-cache-purges.d.ts
6015
6028
  type EdgeCachePurgerNamespace = DurableObjectNamespace<EdgeCachePurger>;
6016
6029
  //#endregion
6017
- //#region ../../apps/api/src/domains/revisions/merge.d.ts
6018
- /** How a merge of `main` into a draft ended. */
6019
- type MergeEnd =
6020
- /** The draft holds the current `main`, or will once its changes are committed. */
6021
- "upToDate" |
6022
- /** A merge revision landed, built, and the draft previews it. */
6023
- "merged" |
6024
- /** The merge clashed: it's left for Camox's reconcile turn (`DraftCode.clash`), to start. */
6025
- "clashed" |
6026
- /** This move of `main` clashed already: Camox's reconcile turn had its one try. */
6027
- "clashedBefore";
6028
- //#endregion
6029
- //#region ../../apps/api/src/domains/agent/service.d.ts
6030
- type ToolExecutionResponse = {
6031
- ok: true;
6032
- result: unknown;
6033
- } | {
6034
- ok: false;
6035
- error: {
6036
- code: string;
6037
- message: string;
6038
- details?: unknown;
6039
- };
6040
- };
6041
- //#endregion
6042
- //#region ../../apps/api/src/domains/threads/tools.d.ts
6043
- /**
6044
- * What a thread belongs to: its project, its draft once it has one, and for a Live thread, the
6045
- * editor who owns it.
6046
- */
6047
- declare const threadIdentitySchema: z.ZodObject<{
6048
- projectId: z.ZodNumber;
6049
- draftId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6050
- ownerId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6051
- }, z.core.$strip>;
6052
- type ThreadIdentity = z.infer<typeof threadIdentitySchema>;
6053
- //#endregion
6054
- //#region ../../apps/api/src/durable-objects/thread.d.ts
6055
- /**
6056
- * How the API opens a draft's thread with no studio connected (`Thread.open`): what it belongs
6057
- * to, the API's public origin, the Brief from Camox, and the messages the editor sent, oldest
6058
- * first, each with the operation id it was sent with.
6059
- */
6060
- type ThreadOpening = {
6061
- identity: ThreadIdentity;
6062
- apiOrigin: string;
6063
- brief: string;
6064
- editor: ThreadSender;
6065
- messages: {
6066
- operationId: string;
6067
- text: string;
6068
- }[];
6069
- };
6070
- /**
6071
- * Cloudflare's `PiHarness`, leaving Pi closed when the object starts until `started` holds: Pi
6072
- * creates its tables as it opens, and a thread nobody messaged has no run to resume.
6073
- */
6074
- declare class UntilStartedPiHarness extends PiHarness {
6075
- #private;
6076
- constructor(started: () => Promise<boolean>, options: PiHarnessOptions);
6077
- onStart(context: CapabilityStartContext): Promise<void>;
6078
- }
6079
- /**
6080
- * One thread with Camox's agent, addressed by the thread's own id. Pi Durable runs the agent
6081
- * through Cloudflare's `PiHarness`, so a run is saved at every step and carries on with no client
6082
- * connected (ADR 0018).
6083
- *
6084
- * The API authorizes every connection before forwarding it here, naming the sender in
6085
- * `THREAD_SENDER_HEADER`. Each socket gets a snapshot of Pi's agent events, then a batch per
6086
- * commit; it sends editors' messages and can ask to resync.
6087
- *
6088
- * The thread starts with its first message: until then, connecting stores nothing, so opening a
6089
- * draft leaves no thread behind.
6090
- */
6091
- declare class Thread extends DurableObject<Bindings> {
6092
- #private;
6093
- readonly harness: UntilStartedPiHarness;
6094
- readonly webSockets: WebSockets;
6095
- readonly lifecycle: Lifecycle<object, object>;
6096
- /**
6097
- * Builds the code of the draft `draftId`, the thread's, in its build queue, as a publish of a
6098
- * head revision whose build is gone asks: the head's tree finds its revision, built again.
6099
- */
6100
- buildForPublish(draftId: string): Promise<BuildResult | null>;
6101
- /**
6102
- * Merges the current `main` into the thread's draft, when it has code, as a push to `main`
6103
- * asks: right away when the agent is idle, or else right after its turn's last commit, before
6104
- * the next message (`#onYield`). Nothing of it shows in the thread.
6105
- */
6106
- mergeMain(): Promise<MergeEnd | "afterTheTurn" | "noCode">;
6107
- /**
6108
- * Builds the code of the thread's draft, as the end of a turn would on its last try, when
6109
- * Camox's infrastructure failed the last build: changes that don't build are committed as a
6110
- * revision that isn't built, which blocks publishing. Nothing of it shows in the thread. A
6111
- * failure on Camox's side again owes the next retry. `busy` while the agent's turn runs: its
6112
- * end builds.
6113
- */
6114
- retryBuild(): Promise<"built" | "failed" | "busy" | "noCode">;
6115
- /**
6116
- * Lifecycle's alarm, which wakes Pi's runs, unless the thread ended: an alarm already on its
6117
- * way when it did would look for the jobs its storage no longer has.
6118
- */
6119
- alarm(): Promise<void>;
6120
- /** Gives sockets that outlived the last isolate a new watch and a fresh snapshot. */
6121
- onStart(): Promise<void>;
6122
- /**
6123
- * Shows every socket on a Live thread where the drafts its cards name stand now, as the API
6124
- * asks once one of them is renamed or ends (ADR 0025). Nothing of it goes in the transcript.
6125
- */
6126
- showDrafts(): Promise<void>;
6127
- /**
6128
- * Opens the thread from the API, with no studio connected, as a Live thread handing a request
6129
- * off to a draft does (ADR 0025): records what it belongs to and the API's origin, adds the
6130
- * Brief, which the model reads and studios show as from Camox, then the editor's messages
6131
- * under their name, and starts the agent's run, which acts as that editor. Every message but
6132
- * the last goes in before the run, the last starting it, so the model reads them all on its
6133
- * first call. Repeating it changes nothing.
6134
- */
6135
- open({ identity, apiOrigin, brief, editor, messages }: ThreadOpening): Promise<void>;
6136
- /**
6137
- * Adds Camox's `note` that the draft `draftId`, which this Live thread started, ended, at the
6138
- * end of the conversation: right away when the thread is idle, or else at the next break of
6139
- * the run going, as Pi places a write the model reads. Only the model reads it, and it asks the
6140
- * model nothing: nothing earlier, nor the system prompt, changes (ADR 0025). Repeating it adds
6141
- * nothing.
6142
- */
6143
- noteDraftEnded({ draftId, note }: {
6144
- draftId: string;
6145
- note: string;
6146
- }): Promise<void>;
6147
- /**
6148
- * Ends the thread with its draft, wiping everything it stored, since Pi can't delete a
6149
- * conversation yet: the run going stops, and studios still open on it see an empty thread
6150
- * before their sockets close. The sandbox's object for the thread stores nothing.
6151
- *
6152
- * Its draft no longer names it, and a development draft, which stays open, gets a new thread,
6153
- * but a socket the API forwarded just before may still reach it. So the thread keeps the
6154
- * record that it ended, and turns away every socket and message after, as its alarm does
6155
- * nothing: nothing opens Pi again. The object isn't reset, which would fail whatever reached
6156
- * it next.
6157
- */
6158
- end(): Promise<void>;
6159
- }
6160
- //#endregion
6161
- //#region ../../apps/api/src/domains/code/main-copy.d.ts
6162
- /** A file of a project's code: its content, or where a symlink points. */
6163
- type CodeFile = {
6164
- path: string;
6165
- content: Uint8Array;
6166
- } | {
6167
- path: string;
6168
- symlink: string;
6169
- };
6170
- //#endregion
6171
- //#region ../../apps/api/src/durable-objects/project-code.d.ts
6172
- /** What `snapshot` answers: the files only when the caller doesn't already have that commit. */
6173
- type MainSnapshot = {
6174
- commit: string;
6175
- files?: CodeFile[];
6176
- };
6177
- /**
6178
- * A read-only copy of one project's `main`, addressed by its Project ID, which names its repo.
6179
- * The agent reads the website's code from it on Live, and in a draft without code. A push to
6180
- * `main` refreshes it (the release Workflow), and a copy that was never made is made on its first
6181
- * read. It keeps the files in its SQLite, so an eviction doesn't clone again; Git's own directory
6182
- * isn't kept.
6183
- */
6184
- declare class ProjectCode extends DurableObject<Bindings> {
6185
- #private;
6186
- constructor(ctx: DurableObjectState, env: Bindings);
6187
- /**
6188
- * Makes the copy match `main`, unless it already holds `commit`, the commit a push moved `main`
6189
- * to. Returns the commit it holds. One refresh at a time.
6190
- */
6191
- refresh(commit?: string): Promise<string>;
6192
- /** Deletes the copy, as its project is deleted. */
6193
- discard(): Promise<void>;
6194
- /** The commit of `main` the copy holds, without making it if it never was. */
6195
- commit(): Promise<string | undefined>;
6196
- /** The copy, made first if it never was; only its commit when it's `known`. */
6197
- snapshot(known?: string): Promise<MainSnapshot>;
6198
- }
6199
- //#endregion
6200
6030
  //#region ../../apps/api/src/domains/code/remote-env.d.ts
6201
6031
  /** The operations sent as they are: every argument but the context is plain data. */
6202
6032
  declare const SENT: ["absolutePath", "joinPath", "readTextFile", "readTextLines", "readBinaryFile", "writeFile", "appendFile", "truncateFile", "flushFile", "renameFile", "fileInfo", "listDir", "canonicalPath", "exists", "createDir", "remove"];
@@ -6225,7 +6055,19 @@ type EnvAnswer = {
6225
6055
  };
6226
6056
  };
6227
6057
  //#endregion
6058
+ //#region ../../apps/api/src/lib/timing.d.ts
6059
+ /** What a span's line says beside its name and duration. Undefined fields are left out. */
6060
+ type SpanFields = Record<string, string | number | boolean | null | undefined>;
6061
+ //#endregion
6228
6062
  //#region ../../apps/api/src/durable-objects/draft-code.d.ts
6063
+ /** A revision of the draft whose build goes up as its publish script. */
6064
+ type PublishUpload = {
6065
+ /** The project's Project ID. */
6066
+ project: string;
6067
+ revision: string;
6068
+ /** Its build in `REVISION_BUILDS`. */
6069
+ archiveKey: string;
6070
+ };
6229
6071
  /** A commit `prepareCommit` made, not on the branch yet. */
6230
6072
  type PreparedCommit = {
6231
6073
  commit: string;
@@ -6319,83 +6161,382 @@ declare class DraftCode extends DurableObject<Bindings> {
6319
6161
  * clashed: unless the files still hold a merge no commit landed.
6320
6162
  */
6321
6163
  settleClash(): Promise<void>;
6164
+ /**
6165
+ * Uploads the build of the draft's revision `revision` as the draft's publish script, ahead of
6166
+ * its publish, unless the script holds it already: its publish then only checks it's there
6167
+ * (`uploadForPublish`). Nothing once a publish took the script, until that publish ends, nor
6168
+ * once the draft ended. A draft that ended during the upload, deleted, loses the script.
6169
+ */
6170
+ prepareUpload(toUpload: PublishUpload): Promise<void>;
6171
+ /**
6172
+ * The draft's publish script holding the build of `revision`, which the publish `instanceId`
6173
+ * ships, taking it: no upload ahead replaces it until that publish ends. Uploads it unless the
6174
+ * script holds it already, as the upload ahead left it. Returns its name, and whether this
6175
+ * uploaded it.
6176
+ */
6177
+ uploadForPublish(toUpload: PublishUpload, instanceId: string, span?: SpanFields): Promise<{
6178
+ script: string;
6179
+ uploaded: boolean;
6180
+ }>;
6322
6181
  /** Records that a build of the draft's code started, or ended. */
6323
6182
  markBuilding(building: boolean): Promise<void>;
6324
6183
  /**
6325
6184
  * Whether a build of the draft's code is going (see `BUILD_GOING_FOR_AT_MOST_MS`), or owed:
6326
6185
  * Camox's infrastructure failed the last one, and Camox retries it.
6327
6186
  */
6328
- building(): Promise<boolean>;
6187
+ building(): Promise<boolean>;
6188
+ /**
6189
+ * Records that the thread `threadId` couldn't build the draft's code because of Camox's own
6190
+ * infrastructure, and has it retry later (`alarm`), each retry waiting longer.
6191
+ */
6192
+ oweBuild({ threadId }: {
6193
+ threadId: string;
6194
+ }): Promise<void>;
6195
+ /** Forgets the build Camox owed the draft, once one ended without Camox's failing. */
6196
+ settleOwedBuild(): Promise<void>;
6197
+ /** Retries the build Camox owes the draft, in its thread's build queue, until one lands. */
6198
+ alarm(): Promise<void>;
6199
+ /**
6200
+ * Makes the draft's branch and working copy, from `commit` of `main` in the project's repo
6201
+ * `repo`, unless they were made already. Returns the commit the branch forked from.
6202
+ */
6203
+ start({ repo, commit }: {
6204
+ repo: string;
6205
+ commit: string;
6206
+ }): Promise<string>;
6207
+ /** Runs one operation of the agent's environment on the working copy, and saves what it changed. */
6208
+ call(call: EnvCall): Promise<EnvAnswer>;
6209
+ /**
6210
+ * The files that have merge conflict markers, as a merge of `main` that conflicts leaves them:
6211
+ * only files the branch's head doesn't hold as they are, since no commit holds markers.
6212
+ */
6213
+ conflicts(): Promise<string[]>;
6214
+ /**
6215
+ * The working copy's files that installing its dependencies reads, as a tar archive, with its
6216
+ * lockfile: what its sandbox needs to install ahead of a build, which `prepareCommit` would
6217
+ * give only once it staged and committed every change.
6218
+ */
6219
+ installFiles(): Promise<Pick<PreparedCommit, "files" | "lockfile">>;
6220
+ /**
6221
+ * Stages the working copy's every change and makes, without moving the branch, the commit it
6222
+ * would be: `message` on top of the branch's head. Returns the commit and its tree, with the
6223
+ * tree's files as a tar archive, which a build streams into its sandbox, and the lockfile.
6224
+ * Neither Git's directory nor the references mounted beside the files are in the tree.
6225
+ */
6226
+ prepareCommit({ message }: {
6227
+ message: string;
6228
+ }): Promise<PreparedCommit>;
6229
+ /**
6230
+ * Adds a member's pushed commits to the working copy, without moving the branch: the objects of
6231
+ * `pack`, a bundle's packfile, which may build on the objects of `prerequisites`, commits of
6232
+ * `main` fetched for it when the working copy doesn't hold them. A build then commits the
6233
+ * pushed head (`commit`, with `checkout`).
6234
+ */
6235
+ receive({ pack, prerequisites }: {
6236
+ pack: Uint8Array;
6237
+ prerequisites: string[];
6238
+ }): Promise<void>;
6239
+ /**
6240
+ * Moves the draft's branch to `commit`, which `prepareCommit` made, or a member pushed on top
6241
+ * of the branch's head, and pushes it. A commit of the tree the branch's head already has, such
6242
+ * as one prepared again after the push of the first, leaves the head as it is. With
6243
+ * `checkout`, for a commit made beside the files, the files take its tree. A member's pushed
6244
+ * head names `mergedMain`, the newest commit of `main` it holds, which the draft's next merge of
6245
+ * `main` merges from. Returns the branch's head and its parents.
6246
+ */
6247
+ commit({ commit, checkout, mergedMain }: {
6248
+ commit: string;
6249
+ checkout?: boolean;
6250
+ mergedMain?: string;
6251
+ }): Promise<{
6252
+ commit: string;
6253
+ parents: string[];
6254
+ }>;
6255
+ /** Whether `commit` is the branch's head or one of its descendants: it includes the head. */
6256
+ includesHead(commit: string): Promise<boolean>;
6257
+ /**
6258
+ * Pushes the draft's code to `main` as one squashed commit, as a publish lands: the tree of
6259
+ * `commit`, a revision on the branch, with the current tip of `main` as its only parent. A
6260
+ * `main` that already has that tree, as after a retried push that landed, is left as it is.
6261
+ * Returns the commit `main` points to.
6262
+ */
6263
+ publishToMain({ commit, message }: {
6264
+ commit: string;
6265
+ message: string;
6266
+ }): Promise<string>;
6267
+ /**
6268
+ * Merges the current `main` into the branch, without moving it: fetches `main` shallowly, its
6269
+ * history down to the `main` commit the branch last merged or forked from, which is then the
6270
+ * merge base, and merges it into the branch's head. A clean merge is returned as a merge commit
6271
+ * whose parents are the head and `main`, for a build to commit (`commit`): the files stay as
6272
+ * they are until then. A merge that conflicts changes nothing either.
6273
+ *
6274
+ * It waits while the files have changes no commit holds, and doesn't merge again a move of
6275
+ * `main` that clashed. Files holding the merge of an earlier `main` that Camox's reconcile
6276
+ * turn didn't fix (`merging`) are put back to the branch's head first, to merge this one.
6277
+ */
6278
+ mergeMain(): Promise<MergeOutcome>;
6279
+ /** Deletes the draft's branch and everything the working copy stored, as the draft ends. */
6280
+ delete(): Promise<void>;
6281
+ }
6282
+ //#endregion
6283
+ //#region ../../apps/api/src/domains/code-pushes/checks.d.ts
6284
+ /** Why a push was refused: each reason is a stable code the CLI and its users can rely on. */
6285
+ type PushRefusalReason =
6286
+ /** What was sent isn't a Git bundle of one branch's commits. */
6287
+ "invalidBundle" |
6288
+ /** The pushed tree changes a platform-owned file, which only Upgrades change. */
6289
+ "platformFile" |
6290
+ /** The pushed tree adds or changes a file under `src/` that isn't TypeScript or CSS. */
6291
+ "notCode" |
6292
+ /** `main` changed a platform-owned file since the branch last merged it. */
6293
+ "mergeMainFirst" |
6294
+ /** The branch starts from a commit that was never on `main`. */
6295
+ "baseNotOnMain" |
6296
+ /** The branch doesn't merge cleanly with the current `main`. */
6297
+ "conflictsWithMain" |
6298
+ /** The pushed head doesn't build. */
6299
+ "doesNotBuild" |
6300
+ /** The pushed head doesn't include the draft's current head. */
6301
+ "pullDraftFirst" |
6302
+ /** The draft the push names was published or deleted. */
6303
+ "draftEnded";
6304
+ type PushRefusal = {
6305
+ reason: PushRefusalReason;
6306
+ message: string;
6307
+ data?: Record<string, unknown>;
6308
+ };
6309
+ /** A push that passed the checks: its head, as a commit to build, and what landing it needs. */
6310
+ type CheckedPush = {
6311
+ /** The pushed head, as a commit to build. */
6312
+ prepared: PreparedCommit;
6313
+ /**
6314
+ * The commits of `main` or of the draft's branch the pushed commits build on: the bundle's
6315
+ * prerequisites.
6316
+ */
6317
+ prerequisites: string[];
6318
+ /** The newest commit of `main` the pushed head holds, which a draft it opens forks from. */
6319
+ base: string;
6320
+ pack: Uint8Array;
6321
+ /** The subject of each pushed commit, oldest first. */
6322
+ subjects: string[];
6323
+ };
6324
+ //#endregion
6325
+ //#region ../../apps/api/src/domains/code-pushes/land.d.ts
6326
+ /** A push that passed its checks, as the draft it lands on receives it. */
6327
+ type CheckedLanding = CheckedPush & {
6328
+ /** The project's Project ID, which names its repo. */
6329
+ repo: string;
6330
+ };
6331
+ /** Whether the push landed, with its head's build, or why it was refused. */
6332
+ type Landing = {
6333
+ refused: PushRefusal;
6334
+ } | {
6335
+ result: BuildResult;
6336
+ };
6337
+ //#endregion
6338
+ //#region ../../apps/api/src/domains/revisions/merge.d.ts
6339
+ /** How a merge of `main` into a draft ended. */
6340
+ type MergeEnd =
6341
+ /** The draft holds the current `main`, or will once its changes are committed. */
6342
+ "upToDate" |
6343
+ /** A merge revision landed, built, and the draft previews it. */
6344
+ "merged" |
6345
+ /** The merge clashed: it's left for Camox's reconcile turn (`DraftCode.clash`), to start. */
6346
+ "clashed" |
6347
+ /** This move of `main` clashed already: Camox's reconcile turn had its one try. */
6348
+ "clashedBefore";
6349
+ //#endregion
6350
+ //#region ../../apps/api/src/domains/agent/service.d.ts
6351
+ type ToolExecutionResponse = {
6352
+ ok: true;
6353
+ result: unknown;
6354
+ } | {
6355
+ ok: false;
6356
+ error: {
6357
+ code: string;
6358
+ message: string;
6359
+ details?: unknown;
6360
+ };
6361
+ };
6362
+ //#endregion
6363
+ //#region ../../apps/api/src/domains/threads/tools.d.ts
6364
+ /**
6365
+ * What a thread belongs to: its project, its draft once it has one, and for a Live thread, the
6366
+ * editor who owns it.
6367
+ */
6368
+ declare const threadIdentitySchema: z.ZodObject<{
6369
+ projectId: z.ZodNumber;
6370
+ draftId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6371
+ ownerId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6372
+ }, z.core.$strip>;
6373
+ type ThreadIdentity = z.infer<typeof threadIdentitySchema>;
6374
+ //#endregion
6375
+ //#region ../../apps/api/src/durable-objects/thread.d.ts
6376
+ /**
6377
+ * How the API opens a draft's thread with no studio connected (`Thread.open`): what it belongs
6378
+ * to, the API's public origin, the Brief from Camox, and the messages the editor sent, oldest
6379
+ * first, each with the operation id it was sent with.
6380
+ */
6381
+ type ThreadOpening = {
6382
+ identity: ThreadIdentity;
6383
+ apiOrigin: string;
6384
+ brief: string;
6385
+ editor: ThreadSender;
6386
+ messages: {
6387
+ operationId: string;
6388
+ text: string;
6389
+ }[];
6390
+ };
6391
+ /**
6392
+ * Cloudflare's `PiHarness`, leaving Pi closed when the object starts until `started` holds: Pi
6393
+ * creates its tables as it opens, and a thread nobody messaged has no run to resume.
6394
+ */
6395
+ declare class UntilStartedPiHarness extends PiHarness {
6396
+ #private;
6397
+ constructor(started: () => Promise<boolean>, options: PiHarnessOptions);
6398
+ onStart(context: CapabilityStartContext): Promise<void>;
6399
+ }
6400
+ /**
6401
+ * One thread with Camox's agent, addressed by the thread's own id. Pi Durable runs the agent
6402
+ * through Cloudflare's `PiHarness`, so a run is saved at every step and carries on with no client
6403
+ * connected (ADR 0018).
6404
+ *
6405
+ * The API authorizes every connection before forwarding it here, naming the sender in
6406
+ * `THREAD_SENDER_HEADER`. Each socket gets a snapshot of Pi's agent events, then a batch per
6407
+ * commit; it sends editors' messages and can ask to resync.
6408
+ *
6409
+ * The thread starts with its first message: until then, connecting stores nothing, so opening a
6410
+ * draft leaves no thread behind.
6411
+ */
6412
+ declare class Thread extends DurableObject<Bindings> {
6413
+ #private;
6414
+ readonly harness: UntilStartedPiHarness;
6415
+ readonly webSockets: WebSockets;
6416
+ readonly lifecycle: Lifecycle<object, object>;
6417
+ /**
6418
+ * Builds the code of the draft `draftId`, the thread's, in its build queue, as a publish of a
6419
+ * head revision whose build is gone asks: the head's tree finds its revision, built again.
6420
+ */
6421
+ buildForPublish(draftId: string): Promise<BuildResult | null>;
6422
+ /**
6423
+ * Lands a member's checked push `push` on the thread's draft, in its build queue, as `pusher`
6424
+ * pushed it (ADR 0026): once the agent's turn going, if any, made its last commit, and before
6425
+ * the next message. Starts the thread, if nobody messaged it yet, so Camox's merges of `main`
6426
+ * reach the draft. `waiting` hears that the push waits for the turn. A push that landed adds
6427
+ * its entry to the thread: the agent reads it, and doesn't answer it.
6428
+ */
6429
+ landPush(push: CheckedLanding & {
6430
+ identity: ThreadIdentity;
6431
+ pusher: ThreadSender;
6432
+ }, waiting?: () => Promise<void> | void): Promise<Landing>;
6329
6433
  /**
6330
- * Records that the thread `threadId` couldn't build the draft's code because of Camox's own
6331
- * infrastructure, and has it retry later (`alarm`), each retry waiting longer.
6434
+ * Adds the entry of a member's push that landed on the thread's draft, starting the thread if
6435
+ * nobody messaged it yet: who pushed, their commits, and how the pushed head built. The model
6436
+ * reads it as context; it starts no turn.
6332
6437
  */
6333
- oweBuild({ threadId }: {
6334
- threadId: string;
6438
+ notePush(push: {
6439
+ identity: ThreadIdentity;
6440
+ pusher: ThreadSender;
6441
+ subjects: string[];
6442
+ result: BuildResult;
6335
6443
  }): Promise<void>;
6336
- /** Forgets the build Camox owed the draft, once one ended without Camox's failing. */
6337
- settleOwedBuild(): Promise<void>;
6338
- /** Retries the build Camox owes the draft, in its thread's build queue, until one lands. */
6339
- alarm(): Promise<void>;
6340
6444
  /**
6341
- * Makes the draft's branch and working copy, from `commit` of `main` in the project's repo
6342
- * `repo`, unless they were made already. Returns the commit the branch forked from.
6445
+ * Merges the current `main` into the thread's draft, when it has code, as a push to `main`
6446
+ * asks: right away when the agent is idle, or else right after its turn's last commit, before
6447
+ * the next message (`#onYield`). Nothing of it shows in the thread.
6343
6448
  */
6344
- start({ repo, commit }: {
6345
- repo: string;
6346
- commit: string;
6347
- }): Promise<string>;
6348
- /** Runs one operation of the agent's environment on the working copy, and saves what it changed. */
6349
- call(call: EnvCall): Promise<EnvAnswer>;
6449
+ mergeMain(): Promise<MergeEnd | "afterTheTurn" | "noCode">;
6350
6450
  /**
6351
- * The files that have merge conflict markers, as a merge of `main` that conflicts leaves them:
6352
- * only files the branch's head doesn't hold as they are, since no commit holds markers.
6451
+ * Builds the code of the thread's draft, as the end of a turn would on its last try, when
6452
+ * Camox's infrastructure failed the last build: changes that don't build are committed as a
6453
+ * revision that isn't built, which blocks publishing. Nothing of it shows in the thread. A
6454
+ * failure on Camox's side again owes the next retry. `busy` while the agent's turn runs: its
6455
+ * end builds.
6353
6456
  */
6354
- conflicts(): Promise<string[]>;
6457
+ retryBuild(): Promise<"built" | "failed" | "busy" | "noCode">;
6355
6458
  /**
6356
- * Stages the working copy's every change and makes, without moving the branch, the commit it
6357
- * would be: `message` on top of the branch's head. Returns the commit and its tree, with the
6358
- * tree's files as a tar archive, which a build streams into its sandbox, and the lockfile.
6359
- * Neither Git's directory nor the references mounted beside the files are in the tree.
6459
+ * Lifecycle's alarm, which wakes Pi's runs, unless the thread ended: an alarm already on its
6460
+ * way when it did would look for the jobs its storage no longer has.
6360
6461
  */
6361
- prepareCommit({ message }: {
6362
- message: string;
6363
- }): Promise<PreparedCommit>;
6462
+ alarm(): Promise<void>;
6463
+ /** Gives sockets that outlived the last isolate a new watch and a fresh snapshot. */
6464
+ onStart(): Promise<void>;
6364
6465
  /**
6365
- * Moves the draft's branch to `commit`, which `prepareCommit` made, and pushes it. A commit of
6366
- * the tree the branch's head already has, such as one prepared again after the push of the
6367
- * first, leaves the head as it is. Returns the branch's head and its parents.
6466
+ * Shows every socket on a Live thread where the drafts its cards name stand now, as the API
6467
+ * asks once one of them is renamed or ends (ADR 0025). Nothing of it goes in the transcript.
6368
6468
  */
6369
- commit({ commit }: {
6370
- commit: string;
6371
- }): Promise<{
6372
- commit: string;
6373
- parents: string[];
6374
- }>;
6469
+ showDrafts(): Promise<void>;
6375
6470
  /**
6376
- * Pushes the draft's code to `main` as one squashed commit, as a publish lands: the tree of
6377
- * `commit`, a revision on the branch, with the current tip of `main` as its only parent. A
6378
- * `main` that already has that tree, as after a retried push that landed, is left as it is.
6379
- * Returns the commit `main` points to.
6471
+ * Opens the thread from the API, with no studio connected, as a Live thread handing a request
6472
+ * off to a draft does (ADR 0025): records what it belongs to and the API's origin, adds the
6473
+ * Brief, which the model reads and studios show as from Camox, then the editor's messages
6474
+ * under their name, and starts the agent's run, which acts as that editor. Every message but
6475
+ * the last goes in before the run, the last starting it, so the model reads them all on its
6476
+ * first call. Repeating it changes nothing.
6380
6477
  */
6381
- publishToMain({ commit, message }: {
6382
- commit: string;
6383
- message: string;
6384
- }): Promise<string>;
6478
+ open({ identity, apiOrigin, brief, editor, messages }: ThreadOpening): Promise<void>;
6385
6479
  /**
6386
- * Merges the current `main` into the branch, without moving it: fetches `main` shallowly, its
6387
- * history down to the `main` commit the branch last merged or forked from, which is then the
6388
- * merge base, and merges it into the branch's head. A clean merge is returned as a merge commit
6389
- * whose parents are the head and `main`, for a build to commit (`commit`): the files stay as
6390
- * they are until then. A merge that conflicts changes nothing either.
6480
+ * Adds Camox's `note` that the draft `draftId`, which this Live thread started, ended, at the
6481
+ * end of the conversation: right away when the thread is idle, or else at the next break of
6482
+ * the run going, as Pi places a write the model reads. Only the model reads it, and it asks the
6483
+ * model nothing: nothing earlier, nor the system prompt, changes (ADR 0025). Repeating it adds
6484
+ * nothing.
6485
+ */
6486
+ noteDraftEnded({ draftId, note }: {
6487
+ draftId: string;
6488
+ note: string;
6489
+ }): Promise<void>;
6490
+ /**
6491
+ * Ends the thread with its draft, wiping everything it stored, since Pi can't delete a
6492
+ * conversation yet: the run going stops, and studios still open on it see an empty thread
6493
+ * before their sockets close. The sandbox's object for the thread stores nothing.
6391
6494
  *
6392
- * It waits while the files have changes no commit holds, and doesn't merge again a move of
6393
- * `main` that clashed. Files holding the merge of an earlier `main` that Camox's reconcile
6394
- * turn didn't fix (`merging`) are put back to the branch's head first, to merge this one.
6495
+ * Its draft is gone, but a socket the API forwarded just before may still reach it. So the thread keeps the
6496
+ * record that it ended, and turns away every socket and message after, as its alarm does
6497
+ * nothing: nothing opens Pi again. The object isn't reset, which would fail whatever reached
6498
+ * it next.
6395
6499
  */
6396
- mergeMain(): Promise<MergeOutcome>;
6397
- /** Deletes the draft's branch and everything the working copy stored, as the draft ends. */
6398
- delete(): Promise<void>;
6500
+ end(): Promise<void>;
6501
+ }
6502
+ //#endregion
6503
+ //#region ../../apps/api/src/domains/code/main-copy.d.ts
6504
+ /** A file of a project's code: its content, or where a symlink points. */
6505
+ type CodeFile = {
6506
+ path: string;
6507
+ content: Uint8Array;
6508
+ } | {
6509
+ path: string;
6510
+ symlink: string;
6511
+ };
6512
+ //#endregion
6513
+ //#region ../../apps/api/src/durable-objects/project-code.d.ts
6514
+ /** What `snapshot` answers: the files only when the caller doesn't already have that commit. */
6515
+ type MainSnapshot = {
6516
+ commit: string;
6517
+ files?: CodeFile[];
6518
+ };
6519
+ /**
6520
+ * A read-only copy of one project's `main`, addressed by its Project ID, which names its repo.
6521
+ * The agent reads the website's code from it on Live, and in a draft without code. A push to
6522
+ * `main` refreshes it (the release Workflow), and a copy that was never made is made on its first
6523
+ * read. It keeps the files in its SQLite, so an eviction doesn't clone again; Git's own directory
6524
+ * isn't kept.
6525
+ */
6526
+ declare class ProjectCode extends DurableObject<Bindings> {
6527
+ #private;
6528
+ constructor(ctx: DurableObjectState, env: Bindings);
6529
+ /**
6530
+ * Makes the copy match `main`, unless it already holds `commit`, the commit a push moved `main`
6531
+ * to. Returns the commit it holds. One refresh at a time.
6532
+ */
6533
+ refresh(commit?: string): Promise<string>;
6534
+ /** Deletes the copy, as its project is deleted. */
6535
+ discard(): Promise<void>;
6536
+ /** The commit of `main` the copy holds, without making it if it never was. */
6537
+ commit(): Promise<string | undefined>;
6538
+ /** The copy, made first if it never was; only its commit when it's `known`. */
6539
+ snapshot(known?: string): Promise<MainSnapshot>;
6399
6540
  }
6400
6541
  //#endregion
6401
6542
  //#region ../../apps/api/src/domains/project-creation/workflow.d.ts
@@ -6460,22 +6601,30 @@ type RevisionToLoad = {
6460
6601
  };
6461
6602
  /** Dispatch's `CamoxRevisions` entrypoint. */
6462
6603
  type Dispatch = {
6463
- /** A revision's Definition Set, as its build's entrypoint gives it: JSON, not yet checked. */
6464
- readDefinitionSet(revision: RevisionToLoad): Promise<unknown>;
6465
6604
  /**
6466
- * Readies a revision before its draft's viewers are told of it: dispatch serves its client
6467
- * assets from then on, and has loaded and rendered it once. Says how many client assets it
6468
- * stored and how long that and the render took, for the API's timing logs (none from a
6469
- * dispatch older than that).
6605
+ * Readies a revision before its draft's viewers are told of it, reading its build once:
6606
+ * dispatch serves its client assets from then on, and has loaded and rendered it once. Returns
6607
+ * its Definition Set (JSON, not yet checked), with what each part took, for the API's timing
6608
+ * logs.
6470
6609
  */
6471
- prewarm(revision: RevisionToLoad): Promise<PrewarmTimings | void>;
6610
+ prepare(revision: RevisionToLoad): Promise<PreparedRevision>;
6472
6611
  };
6473
- /** What a prewarm took. Mirrored in apps/dispatch/src/revisions.ts: keep the two in sync. */
6474
- type PrewarmTimings = {
6612
+ /**
6613
+ * What preparing a revision took: reading its build, then, at once, storing its client assets
6614
+ * (how many) and reading its Definition Set, then the first render. Mirrored in
6615
+ * apps/dispatch/src/revisions.ts: keep the two in sync.
6616
+ */
6617
+ type PrepareTimings = {
6475
6618
  assets: number;
6619
+ readMs: number;
6476
6620
  assetsMs: number;
6621
+ definitionSetMs: number;
6477
6622
  renderMs: number;
6478
6623
  };
6624
+ /** A prepared revision's Definition Set, with what preparing it took. */
6625
+ type PreparedRevision = PrepareTimings & {
6626
+ definitionSet: unknown;
6627
+ };
6479
6628
  //#endregion
6480
6629
  //#region ../../apps/api/src/types.d.ts
6481
6630
  type Bindings = {
@@ -6506,7 +6655,10 @@ type Bindings = {
6506
6655
  /** The sandbox Worker's Durable Object running code mode scripts, one per thread (ADR 0018). */
6507
6656
  CODEMODE_SANDBOX: DurableObjectNamespace<import("@earendil-works/pi-codemode/cloudflare").CodemodeSandboxDurableObject>;
6508
6657
  FILES_BUCKET: R2Bucket;
6509
- /** Project Slug → Project ID: which project each `<slug>.camox.site` host serves. */
6658
+ /**
6659
+ * Project Slug or Custom Domain → Project ID: which project each `<slug>.camox.site` host and
6660
+ * Custom Domain serves (apps/dispatch/README.md).
6661
+ */
6510
6662
  PROJECT_SLUGS: KVNamespace;
6511
6663
  MEDIA?: MediaBinding;
6512
6664
  /** The `projects` Cloudflare Artifacts namespace: every project's repo, and the Template's. */
@@ -6942,7 +7094,6 @@ type Person = {
6942
7094
  //#region ../../apps/api/src/domains/drafts/list.d.ts
6943
7095
  type DraftSummary = {
6944
7096
  id: string;
6945
- kind: DraftKind;
6946
7097
  name: string | null;
6947
7098
  createdBy: Person;
6948
7099
  createdAt: number;
@@ -7035,8 +7186,8 @@ type Owner = {
7035
7186
  name: string;
7036
7187
  title: string;
7037
7188
  } | null;
7038
- /** What a preview can mention: an entity drafts hold, a definition (ADR 0006), or its code. */
7039
- type SubjectKind = EntityKind | "definition" | "code";
7189
+ /** What a preview can mention: an entity drafts hold, or its code. */
7190
+ type SubjectKind = EntityKind | "code";
7040
7191
  /** An entity as people know it. */
7041
7192
  type Subject = {
7042
7193
  entity: SubjectKind;
@@ -7092,7 +7243,7 @@ type LostChange = Subject & InLocale & {
7092
7243
  reason: (typeof LOSS_REASONS)[number];
7093
7244
  };
7094
7245
  /** What a blocker or warning is about. */
7095
- declare const PROBLEM_CODES: readonly ["definitionsDiffer", "codeDoesNotBuild", "codeDoesNotTypeCheck", "codeDoesNotMerge", "emptyRequiredFile", "missingFile", "missingFileBytes", "unacceptedFileType", "duplicatePath", "duplicateRecordPageValue", "emptyRequiredReference", "danglingReference", "danglingPageLink", "wrongKindValue", "missingMetaTitle", "metaTitlePending", "localePrefixTaken", "duplicateLocale", "removedInUse"];
7246
+ declare const PROBLEM_CODES: readonly ["codeDoesNotBuild", "codeDoesNotTypeCheck", "codeDoesNotMerge", "emptyRequiredFile", "missingFile", "missingFileBytes", "unacceptedFileType", "duplicatePath", "duplicateRecordPageValue", "emptyRequiredReference", "danglingReference", "danglingPageLink", "wrongKindValue", "missingMetaTitle", "metaTitlePending", "localePrefixTaken", "duplicateLocale", "removedInUse"];
7096
7247
  /** A blocker, or the same problem already on Live as a warning, naming what to fix. */
7097
7248
  type Problem = Subject & InLocale & ProblemPlace & {
7098
7249
  code: (typeof PROBLEM_CODES)[number];
@@ -7121,8 +7272,7 @@ type PublishPreview = {
7121
7272
  };
7122
7273
  /**
7123
7274
  * What publishing did: nothing, for an empty draft, which publishing leaves as is; or how the
7124
- * draft ended, also when an earlier attempt ended it (null for a development draft, which stays
7125
- * open, emptied).
7275
+ * draft ended, also when an earlier attempt ended it.
7126
7276
  */
7127
7277
  type PublishResult = {
7128
7278
  empty: true;
@@ -7137,6 +7287,16 @@ type PublishResult = {
7137
7287
  publishing: true;
7138
7288
  };
7139
7289
  //#endregion
7290
+ //#region ../../apps/api/src/domains/code-pushes/service.d.ts
7291
+ /** Where a push stands, as it streams to the CLI while the push goes. */
7292
+ type PushStep =
7293
+ /** Its commits are checked against `main` and the draft. */
7294
+ "checking" |
7295
+ /** It waits for the agent's turn going in the draft to end. */
7296
+ "waiting" |
7297
+ /** Its head builds. */
7298
+ "building";
7299
+ //#endregion
7140
7300
  //#region ../../apps/api/src/router.d.ts
7141
7301
  declare const router: {
7142
7302
  projects: {
@@ -7191,6 +7351,7 @@ declare const router: {
7191
7351
  id: number;
7192
7352
  uuid: string;
7193
7353
  slug: string;
7354
+ customDomain: string | null;
7194
7355
  name: string;
7195
7356
  deployToken: string;
7196
7357
  status: import("@camox/api-contract/projects").ProjectStatus;
@@ -7205,6 +7366,7 @@ declare const router: {
7205
7366
  publishPushInstanceId: string | null;
7206
7367
  publishPushRequestedAt: number | null;
7207
7368
  liveScript: string | null;
7369
+ codeOutsideCamox: boolean;
7208
7370
  createdAt: number;
7209
7371
  updatedAt: number;
7210
7372
  }[], {
@@ -7212,6 +7374,7 @@ declare const router: {
7212
7374
  id: number;
7213
7375
  uuid: string;
7214
7376
  slug: string;
7377
+ customDomain: string | null;
7215
7378
  name: string;
7216
7379
  deployToken: string;
7217
7380
  status: import("@camox/api-contract/projects").ProjectStatus;
@@ -7226,6 +7389,7 @@ declare const router: {
7226
7389
  publishPushInstanceId: string | null;
7227
7390
  publishPushRequestedAt: number | null;
7228
7391
  liveScript: string | null;
7392
+ codeOutsideCamox: boolean;
7229
7393
  createdAt: number;
7230
7394
  updatedAt: number;
7231
7395
  }[]>, Record<never, never>, Record<never, never>>;
@@ -7279,6 +7443,7 @@ declare const router: {
7279
7443
  id: number;
7280
7444
  uuid: string;
7281
7445
  slug: string;
7446
+ customDomain: string | null;
7282
7447
  name: string;
7283
7448
  deployToken: string;
7284
7449
  status: import("@camox/api-contract/projects").ProjectStatus;
@@ -7293,12 +7458,14 @@ declare const router: {
7293
7458
  publishPushInstanceId: string | null;
7294
7459
  publishPushRequestedAt: number | null;
7295
7460
  liveScript: string | null;
7461
+ codeOutsideCamox: boolean;
7296
7462
  createdAt: number;
7297
7463
  updatedAt: number;
7298
7464
  }, {
7299
7465
  id: number;
7300
7466
  uuid: string;
7301
7467
  slug: string;
7468
+ customDomain: string | null;
7302
7469
  name: string;
7303
7470
  deployToken: string;
7304
7471
  status: import("@camox/api-contract/projects").ProjectStatus;
@@ -7313,6 +7480,7 @@ declare const router: {
7313
7480
  publishPushInstanceId: string | null;
7314
7481
  publishPushRequestedAt: number | null;
7315
7482
  liveScript: string | null;
7483
+ codeOutsideCamox: boolean;
7316
7484
  createdAt: number;
7317
7485
  updatedAt: number;
7318
7486
  }>, Record<never, never>, Record<never, never>>;
@@ -7370,6 +7538,7 @@ declare const router: {
7370
7538
  id: number;
7371
7539
  uuid: string;
7372
7540
  slug: string;
7541
+ customDomain: string | null;
7373
7542
  deployToken: string;
7374
7543
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
7375
7544
  createdAt: number;
@@ -7383,6 +7552,7 @@ declare const router: {
7383
7552
  publishPushInstanceId: string | null;
7384
7553
  publishPushRequestedAt: number | null;
7385
7554
  liveScript: string | null;
7555
+ codeOutsideCamox: boolean;
7386
7556
  updatedAt: number;
7387
7557
  }, {
7388
7558
  organizationSlug: string | null;
@@ -7392,6 +7562,7 @@ declare const router: {
7392
7562
  id: number;
7393
7563
  uuid: string;
7394
7564
  slug: string;
7565
+ customDomain: string | null;
7395
7566
  deployToken: string;
7396
7567
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
7397
7568
  createdAt: number;
@@ -7405,6 +7576,7 @@ declare const router: {
7405
7576
  publishPushInstanceId: string | null;
7406
7577
  publishPushRequestedAt: number | null;
7407
7578
  liveScript: string | null;
7579
+ codeOutsideCamox: boolean;
7408
7580
  updatedAt: number;
7409
7581
  }>, Record<never, never>, Record<never, never>>;
7410
7582
  getByUuid: 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>>, {
@@ -7461,6 +7633,7 @@ declare const router: {
7461
7633
  id: number;
7462
7634
  uuid: string;
7463
7635
  slug: string;
7636
+ customDomain: string | null;
7464
7637
  deployToken: string;
7465
7638
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
7466
7639
  createdAt: number;
@@ -7474,6 +7647,7 @@ declare const router: {
7474
7647
  publishPushInstanceId: string | null;
7475
7648
  publishPushRequestedAt: number | null;
7476
7649
  liveScript: string | null;
7650
+ codeOutsideCamox: boolean;
7477
7651
  updatedAt: number;
7478
7652
  }, {
7479
7653
  organizationSlug: string | null;
@@ -7483,6 +7657,7 @@ declare const router: {
7483
7657
  id: number;
7484
7658
  uuid: string;
7485
7659
  slug: string;
7660
+ customDomain: string | null;
7486
7661
  deployToken: string;
7487
7662
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
7488
7663
  createdAt: number;
@@ -7496,6 +7671,7 @@ declare const router: {
7496
7671
  publishPushInstanceId: string | null;
7497
7672
  publishPushRequestedAt: number | null;
7498
7673
  liveScript: string | null;
7674
+ codeOutsideCamox: boolean;
7499
7675
  updatedAt: number;
7500
7676
  }>, Record<never, never>, Record<never, never>>;
7501
7677
  getSummary: import("@orpc/server").DecoratedProcedure<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>>, {
@@ -7569,6 +7745,7 @@ declare const router: {
7569
7745
  id: number;
7570
7746
  uuid: string;
7571
7747
  slug: string;
7748
+ customDomain: string | null;
7572
7749
  deployToken: string;
7573
7750
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
7574
7751
  createdAt: number;
@@ -7582,6 +7759,7 @@ declare const router: {
7582
7759
  publishPushInstanceId: string | null;
7583
7760
  publishPushRequestedAt: number | null;
7584
7761
  liveScript: string | null;
7762
+ codeOutsideCamox: boolean;
7585
7763
  updatedAt: number;
7586
7764
  }, {
7587
7765
  organizationSlug: string | null;
@@ -7591,6 +7769,7 @@ declare const router: {
7591
7769
  id: number;
7592
7770
  uuid: string;
7593
7771
  slug: string;
7772
+ customDomain: string | null;
7594
7773
  deployToken: string;
7595
7774
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
7596
7775
  createdAt: number;
@@ -7604,6 +7783,7 @@ declare const router: {
7604
7783
  publishPushInstanceId: string | null;
7605
7784
  publishPushRequestedAt: number | null;
7606
7785
  liveScript: string | null;
7786
+ codeOutsideCamox: boolean;
7607
7787
  updatedAt: number;
7608
7788
  }>, Record<never, never>, Record<never, never>>;
7609
7789
  checkSlugAvailability: 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>>, {
@@ -7719,6 +7899,7 @@ declare const router: {
7719
7899
  id: number;
7720
7900
  uuid: string;
7721
7901
  slug: string;
7902
+ customDomain: string | null;
7722
7903
  deployToken: string;
7723
7904
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
7724
7905
  createdAt: number;
@@ -7732,6 +7913,7 @@ declare const router: {
7732
7913
  publishPushInstanceId: string | null;
7733
7914
  publishPushRequestedAt: number | null;
7734
7915
  liveScript: string | null;
7916
+ codeOutsideCamox: boolean;
7735
7917
  updatedAt: number;
7736
7918
  }, {
7737
7919
  name: string;
@@ -7739,6 +7921,7 @@ declare const router: {
7739
7921
  id: number;
7740
7922
  uuid: string;
7741
7923
  slug: string;
7924
+ customDomain: string | null;
7742
7925
  deployToken: string;
7743
7926
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
7744
7927
  createdAt: number;
@@ -7752,6 +7935,7 @@ declare const router: {
7752
7935
  publishPushInstanceId: string | null;
7753
7936
  publishPushRequestedAt: number | null;
7754
7937
  liveScript: string | null;
7938
+ codeOutsideCamox: boolean;
7755
7939
  updatedAt: number;
7756
7940
  }>, Record<never, never>, Record<never, never>>;
7757
7941
  update: 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>>, {
@@ -7807,6 +7991,7 @@ declare const router: {
7807
7991
  id: number;
7808
7992
  uuid: string;
7809
7993
  slug: string;
7994
+ customDomain: string | null;
7810
7995
  deployToken: string;
7811
7996
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
7812
7997
  createdAt: number;
@@ -7820,6 +8005,7 @@ declare const router: {
7820
8005
  publishPushInstanceId: string | null;
7821
8006
  publishPushRequestedAt: number | null;
7822
8007
  liveScript: string | null;
8008
+ codeOutsideCamox: boolean;
7823
8009
  updatedAt: number;
7824
8010
  }, {
7825
8011
  name: string;
@@ -7827,6 +8013,7 @@ declare const router: {
7827
8013
  id: number;
7828
8014
  uuid: string;
7829
8015
  slug: string;
8016
+ customDomain: string | null;
7830
8017
  deployToken: string;
7831
8018
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
7832
8019
  createdAt: number;
@@ -7840,6 +8027,7 @@ declare const router: {
7840
8027
  publishPushInstanceId: string | null;
7841
8028
  publishPushRequestedAt: number | null;
7842
8029
  liveScript: string | null;
8030
+ codeOutsideCamox: boolean;
7843
8031
  updatedAt: number;
7844
8032
  }>, Record<never, never>, Record<never, never>>;
7845
8033
  updateAnalytics: 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>>, {
@@ -7959,6 +8147,63 @@ declare const router: {
7959
8147
  socialProfiles: string[];
7960
8148
  updatedAt: number;
7961
8149
  }>, Record<never, never>, Record<never, never>>;
8150
+ createCodeReadToken: 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>>, {
8151
+ draft: DraftRequest | null;
8152
+ locale: string | undefined;
8153
+ publishingDraft: string | undefined;
8154
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
8155
+ draft: DraftRequest | null;
8156
+ locale: string | undefined;
8157
+ publishingDraft: string | undefined;
8158
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
8159
+ draft: DraftRequest | null;
8160
+ locale: string | undefined;
8161
+ publishingDraft: string | undefined;
8162
+ }>, {
8163
+ user: {
8164
+ id: string;
8165
+ createdAt: Date;
8166
+ updatedAt: Date;
8167
+ email: string;
8168
+ emailVerified: boolean;
8169
+ name: string;
8170
+ image?: string | null | undefined;
8171
+ };
8172
+ session: {
8173
+ id: string;
8174
+ createdAt: Date;
8175
+ updatedAt: Date;
8176
+ userId: string;
8177
+ expiresAt: Date;
8178
+ token: string;
8179
+ ipAddress?: string | null | undefined;
8180
+ userAgent?: string | null | undefined;
8181
+ activeOrganizationId?: string | null | undefined;
8182
+ studio?: boolean | null | undefined;
8183
+ };
8184
+ db: Database;
8185
+ env: Bindings;
8186
+ headers: Headers;
8187
+ client: string;
8188
+ telemetryDisabled: boolean;
8189
+ waitUntil: (promise: Promise<unknown>) => void;
8190
+ apiOrigin?: string | undefined;
8191
+ draft: DraftRequest | null;
8192
+ locale: string | undefined;
8193
+ publishingDraft: string | undefined;
8194
+ }>, import("zod").ZodObject<{
8195
+ projectUuid: import("zod").ZodUUID;
8196
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
8197
+ remote: any;
8198
+ token: any;
8199
+ expiresAt: any;
8200
+ projectSlug: string;
8201
+ }, {
8202
+ remote: any;
8203
+ token: any;
8204
+ expiresAt: any;
8205
+ projectSlug: string;
8206
+ }>, Record<never, never>, Record<never, never>>;
7962
8207
  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>>, {
7963
8208
  draft: DraftRequest | null;
7964
8209
  locale: string | undefined;
@@ -8011,6 +8256,7 @@ declare const router: {
8011
8256
  id: number;
8012
8257
  uuid: string;
8013
8258
  slug: string;
8259
+ customDomain: string | null;
8014
8260
  deployToken: string;
8015
8261
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
8016
8262
  createdAt: number;
@@ -8024,6 +8270,7 @@ declare const router: {
8024
8270
  publishPushInstanceId: string | null;
8025
8271
  publishPushRequestedAt: number | null;
8026
8272
  liveScript: string | null;
8273
+ codeOutsideCamox: boolean;
8027
8274
  updatedAt: number;
8028
8275
  } | undefined, {
8029
8276
  name: string;
@@ -8031,6 +8278,7 @@ declare const router: {
8031
8278
  id: number;
8032
8279
  uuid: string;
8033
8280
  slug: string;
8281
+ customDomain: string | null;
8034
8282
  deployToken: string;
8035
8283
  setupStep: import("@camox/api-contract/projects").ProjectSetupStep | null;
8036
8284
  createdAt: number;
@@ -8044,6 +8292,7 @@ declare const router: {
8044
8292
  publishPushInstanceId: string | null;
8045
8293
  publishPushRequestedAt: number | null;
8046
8294
  liveScript: string | null;
8295
+ codeOutsideCamox: boolean;
8047
8296
  updatedAt: number;
8048
8297
  } | undefined>, Record<never, never>, Record<never, never>>;
8049
8298
  };
@@ -8099,7 +8348,6 @@ declare const router: {
8099
8348
  afterBlockIds: string[];
8100
8349
  } | null;
8101
8350
  blocks: (Omit<{
8102
- type: string;
8103
8351
  draftId: string | null;
8104
8352
  id: string;
8105
8353
  deleted: boolean;
@@ -8107,6 +8355,7 @@ declare const router: {
8107
8355
  locale: string;
8108
8356
  pageId: string | null;
8109
8357
  layoutId: string | null;
8358
+ type: string;
8110
8359
  content: unknown;
8111
8360
  createdAt: number;
8112
8361
  updatedAt: number;
@@ -8206,7 +8455,6 @@ declare const router: {
8206
8455
  afterBlockIds: string[];
8207
8456
  } | null;
8208
8457
  blocks: (Omit<{
8209
- type: string;
8210
8458
  draftId: string | null;
8211
8459
  id: string;
8212
8460
  deleted: boolean;
@@ -8214,6 +8462,7 @@ declare const router: {
8214
8462
  locale: string;
8215
8463
  pageId: string | null;
8216
8464
  layoutId: string | null;
8465
+ type: string;
8217
8466
  content: unknown;
8218
8467
  createdAt: number;
8219
8468
  updatedAt: number;
@@ -9456,7 +9705,6 @@ declare const router: {
9456
9705
  id: import("zod").ZodUUID;
9457
9706
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
9458
9707
  block: Omit<{
9459
- type: string;
9460
9708
  draftId: string | null;
9461
9709
  id: string;
9462
9710
  deleted: boolean;
@@ -9464,6 +9712,7 @@ declare const router: {
9464
9712
  locale: string;
9465
9713
  pageId: string | null;
9466
9714
  layoutId: string | null;
9715
+ type: string;
9467
9716
  content: unknown;
9468
9717
  createdAt: number;
9469
9718
  updatedAt: number;
@@ -9519,7 +9768,6 @@ declare const router: {
9519
9768
  files: FileView[];
9520
9769
  }, {
9521
9770
  block: Omit<{
9522
- type: string;
9523
9771
  draftId: string | null;
9524
9772
  id: string;
9525
9773
  deleted: boolean;
@@ -9527,6 +9775,7 @@ declare const router: {
9527
9775
  locale: string;
9528
9776
  pageId: string | null;
9529
9777
  layoutId: string | null;
9778
+ type: string;
9530
9779
  content: unknown;
9531
9780
  createdAt: number;
9532
9781
  updatedAt: number;
@@ -9656,7 +9905,6 @@ declare const router: {
9656
9905
  type: import("zod").ZodString;
9657
9906
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
9658
9907
  block: Omit<{
9659
- type: string;
9660
9908
  draftId: string | null;
9661
9909
  id: string;
9662
9910
  deleted: boolean;
@@ -9664,6 +9912,7 @@ declare const router: {
9664
9912
  locale: string;
9665
9913
  pageId: string | null;
9666
9914
  layoutId: string | null;
9915
+ type: string;
9667
9916
  content: unknown;
9668
9917
  createdAt: number;
9669
9918
  updatedAt: number;
@@ -9719,7 +9968,6 @@ declare const router: {
9719
9968
  files: FileView[];
9720
9969
  } | null, {
9721
9970
  block: Omit<{
9722
- type: string;
9723
9971
  draftId: string | null;
9724
9972
  id: string;
9725
9973
  deleted: boolean;
@@ -9727,6 +9975,7 @@ declare const router: {
9727
9975
  locale: string;
9728
9976
  pageId: string | null;
9729
9977
  layoutId: string | null;
9978
+ type: string;
9730
9979
  content: unknown;
9731
9980
  createdAt: number;
9732
9981
  updatedAt: number;
@@ -9880,7 +10129,6 @@ declare const router: {
9880
10129
  position: import("zod").ZodString;
9881
10130
  }, import("zod/v4/core").$strip>>>;
9882
10131
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<Omit<{
9883
- type: string;
9884
10132
  draftId: string | null;
9885
10133
  id: string;
9886
10134
  deleted: boolean;
@@ -9888,6 +10136,7 @@ declare const router: {
9888
10136
  locale: string;
9889
10137
  pageId: string | null;
9890
10138
  layoutId: string | null;
10139
+ type: string;
9891
10140
  content: unknown;
9892
10141
  createdAt: number;
9893
10142
  updatedAt: number;
@@ -9909,7 +10158,6 @@ declare const router: {
9909
10158
  } & {
9910
10159
  warnings?: string[];
9911
10160
  }, Omit<{
9912
- type: string;
9913
10161
  draftId: string | null;
9914
10162
  id: string;
9915
10163
  deleted: boolean;
@@ -9917,6 +10165,7 @@ declare const router: {
9917
10165
  locale: string;
9918
10166
  pageId: string | null;
9919
10167
  layoutId: string | null;
10168
+ type: string;
9920
10169
  content: unknown;
9921
10170
  createdAt: number;
9922
10171
  updatedAt: number;
@@ -10524,7 +10773,6 @@ declare const router: {
10524
10773
  afterBlockIds: string[];
10525
10774
  };
10526
10775
  blocks: (Omit<{
10527
- type: string;
10528
10776
  draftId: string | null;
10529
10777
  id: string;
10530
10778
  deleted: boolean;
@@ -10532,6 +10780,7 @@ declare const router: {
10532
10780
  locale: string;
10533
10781
  pageId: string | null;
10534
10782
  layoutId: string | null;
10783
+ type: string;
10535
10784
  content: unknown;
10536
10785
  createdAt: number;
10537
10786
  updatedAt: number;
@@ -10603,7 +10852,6 @@ declare const router: {
10603
10852
  afterBlockIds: string[];
10604
10853
  };
10605
10854
  blocks: (Omit<{
10606
- type: string;
10607
10855
  draftId: string | null;
10608
10856
  id: string;
10609
10857
  deleted: boolean;
@@ -10611,6 +10859,7 @@ declare const router: {
10611
10859
  locale: string;
10612
10860
  pageId: string | null;
10613
10861
  layoutId: string | null;
10862
+ type: string;
10614
10863
  content: unknown;
10615
10864
  createdAt: number;
10616
10865
  updatedAt: number;
@@ -13595,8 +13844,7 @@ declare const router: {
13595
13844
  locale: string | undefined;
13596
13845
  publishingDraft: string | undefined;
13597
13846
  }>, import("zod").ZodObject<{
13598
- deployToken: import("zod").ZodOptional<import("zod").ZodString>;
13599
- autoCreate: import("zod").ZodBoolean;
13847
+ deployToken: import("zod").ZodString;
13600
13848
  definitionSet: import("zod").ZodObject<{
13601
13849
  blocks: import("zod").ZodArray<import("zod").ZodObject<{
13602
13850
  blockId: import("zod").ZodString;
@@ -13787,7 +14035,6 @@ declare const router: {
13787
14035
  }, import("zod/v4/core").$strip>;
13788
14036
  projectUuid: import("zod").ZodUUID;
13789
14037
  }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
13790
- draftCreated: boolean;
13791
14038
  blocks: {
13792
14039
  count: number;
13793
14040
  deletedDefinitionTypes: string[];
@@ -13816,7 +14063,6 @@ declare const router: {
13816
14063
  blockCount: number;
13817
14064
  } | null;
13818
14065
  }, {
13819
- draftCreated: boolean;
13820
14066
  blocks: {
13821
14067
  count: number;
13822
14068
  deletedDefinitionTypes: string[];
@@ -14500,6 +14746,76 @@ declare const router: {
14500
14746
  patrollers: import("@camox/api-contract/patrol").PatrollerView[];
14501
14747
  }>, Record<never, never>, Record<never, never>>;
14502
14748
  };
14749
+ code: {
14750
+ push: 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>>, {
14751
+ draft: DraftRequest | null;
14752
+ locale: string | undefined;
14753
+ publishingDraft: string | undefined;
14754
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
14755
+ draft: DraftRequest | null;
14756
+ locale: string | undefined;
14757
+ publishingDraft: string | undefined;
14758
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
14759
+ draft: DraftRequest | null;
14760
+ locale: string | undefined;
14761
+ publishingDraft: string | undefined;
14762
+ }>, {
14763
+ user: {
14764
+ id: string;
14765
+ createdAt: Date;
14766
+ updatedAt: Date;
14767
+ email: string;
14768
+ emailVerified: boolean;
14769
+ name: string;
14770
+ image?: string | null | undefined;
14771
+ };
14772
+ session: {
14773
+ id: string;
14774
+ createdAt: Date;
14775
+ updatedAt: Date;
14776
+ userId: string;
14777
+ expiresAt: Date;
14778
+ token: string;
14779
+ ipAddress?: string | null | undefined;
14780
+ userAgent?: string | null | undefined;
14781
+ activeOrganizationId?: string | null | undefined;
14782
+ studio?: boolean | null | undefined;
14783
+ };
14784
+ db: Database;
14785
+ env: Bindings;
14786
+ headers: Headers;
14787
+ client: string;
14788
+ telemetryDisabled: boolean;
14789
+ waitUntil: (promise: Promise<unknown>) => void;
14790
+ apiOrigin?: string | undefined;
14791
+ draft: DraftRequest | null;
14792
+ locale: string | undefined;
14793
+ publishingDraft: string | undefined;
14794
+ }>, import("zod").ZodObject<{
14795
+ projectUuid: import("zod").ZodUUID;
14796
+ branch: import("zod").ZodString;
14797
+ draftId: import("zod").ZodOptional<import("zod").ZodString>;
14798
+ bundle: import("zod").ZodInstanceOf<Blob>;
14799
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<AsyncGenerator<{
14800
+ type: "progress";
14801
+ step: PushStep;
14802
+ } | {
14803
+ draftId: string;
14804
+ result: BuildResult;
14805
+ studioUrl: string;
14806
+ type: "pushed";
14807
+ step?: undefined;
14808
+ }, void, unknown>, AsyncGenerator<{
14809
+ type: "progress";
14810
+ step: PushStep;
14811
+ } | {
14812
+ draftId: string;
14813
+ result: BuildResult;
14814
+ studioUrl: string;
14815
+ type: "pushed";
14816
+ step?: undefined;
14817
+ }, void, unknown>>, Record<never, never>, Record<never, never>>;
14818
+ };
14503
14819
  };
14504
14820
  type Router = typeof router;
14505
14821
  //#endregion