@camox/api-contract 0.79.0 → 0.81.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,8 +1,8 @@
1
1
  import { z } from "zod";
2
2
  import { DurableObject, WorkerEntrypoint, WorkflowEntrypoint, WorkflowEvent, WorkflowStep } from "cloudflare:workers";
3
- import { AgentActivity, ConnectedAgentClient, ThreadSender, ThreadView } from "@camox/api-contract/threads";
3
+ import { AgentActivity, ConnectedAgentClient, EditorWhere, ThreadSender, ThreadView } from "@camox/api-contract/threads";
4
4
  import { PiHarness, PiHarnessOptions } from "agents/harness/pi";
5
- import { CapabilityStartContext, Lifecycle } from "agents/lifecycle";
5
+ import { CapabilityStartContext, Lifecycle, LifecycleJobContext } from "agents/lifecycle";
6
6
  import { WebSockets } from "agents/websockets";
7
7
  import "@earendil-works/pi-ai";
8
8
  import "@earendil-works/pi-ai/models";
@@ -10,7 +10,7 @@ import "@earendil-works/pi-durable/tools";
10
10
  import "@camox/ai-tools";
11
11
  import { AgentEvent } from "@earendil-works/pi-durable";
12
12
  import "effect";
13
- import { EndedDraft, PublishAbortReason } from "@camox/api-contract/drafts";
13
+ import { EndedDraft, LookPlaceholderHeight, PublishAbortReason } from "@camox/api-contract/drafts";
14
14
  import "@camox/api-contract/projects";
15
15
  import "drizzle-orm";
16
16
  import "drizzle-orm/sqlite-core";
@@ -1647,6 +1647,121 @@ type EntityKind = (typeof ENTITY_KINDS)[number];
1647
1647
  */
1648
1648
  type RevisionSource = "build" | "turn" | "merge" | "push" | "revert";
1649
1649
  //#endregion
1650
+ //#region ../../apps/api/src/domains/ai-usage/schema.d.ts
1651
+ /**
1652
+ * Which of a thread's agents made a call: the thread's agent, its Code Agent, or one of its
1653
+ * Artifact Agents.
1654
+ */
1655
+ type AiAgent = "thread_agent" | "code_agent" | "artifact_agent";
1656
+ //#endregion
1657
+ //#region ../../apps/api/src/domains/artifact-agent/tool.d.ts
1658
+ /** The artifact field an `artifact` call names, in a Locale, the Default Locale without one. */
1659
+ type ArtifactTarget = {
1660
+ block: string;
1661
+ item?: string;
1662
+ field: string;
1663
+ locale?: string;
1664
+ };
1665
+ //#endregion
1666
+ //#region ../../apps/api/src/lib/timing.d.ts
1667
+ /** What a span's line says beside its name and duration. Undefined fields are left out. */
1668
+ type SpanFields = Record<string, string | number | boolean | null | undefined>;
1669
+ //#endregion
1670
+ //#region ../../apps/api/src/domains/looks/moments.d.ts
1671
+ /**
1672
+ * A Moment the Artifact Agent asks `look` for: a Mark by name, a Mark and a delay after it in ms,
1673
+ * a time in ms, or `ALL_MARKS` for every Mark in time order.
1674
+ */
1675
+ type Moment = string | number | {
1676
+ mark: string;
1677
+ after: number;
1678
+ };
1679
+ /** A Moment at the time a capture seeks to, in ms, as the result names it. */
1680
+ type TimedMoment = {
1681
+ moment: Moment;
1682
+ t: number;
1683
+ };
1684
+ //#endregion
1685
+ //#region ../../apps/api/src/domains/looks/capture.d.ts
1686
+ /** The sizes `look` captures at, by name: a desktop screen and a phone's. */
1687
+ declare const LOOK_SIZES: {
1688
+ readonly desktop: {
1689
+ readonly width: 1440;
1690
+ readonly height: 900;
1691
+ };
1692
+ readonly mobile: {
1693
+ readonly width: 390;
1694
+ readonly height: 844;
1695
+ };
1696
+ };
1697
+ type LookSize = keyof typeof LOOK_SIZES;
1698
+ /** What the page said beside its image: its errors, the requests that failed, and overflow. */
1699
+ type CaptureChecks = {
1700
+ /** Console errors and uncaught page errors, in the order they came. */
1701
+ errors: string[];
1702
+ /** The requests that failed or answered an error status, each with why. */
1703
+ failedRequests: string[];
1704
+ /** Whether the document is wider than the viewport: content overflows horizontally. */
1705
+ overflow: boolean;
1706
+ };
1707
+ //#endregion
1708
+ //#region ../../apps/api/src/domains/looks/look.d.ts
1709
+ /**
1710
+ * A page of the draft, by its path in its Locale, the Default Locale without one: a curated
1711
+ * page, or a page of a Singleton or Derived Layout.
1712
+ */
1713
+ type PageTarget = {
1714
+ path: string;
1715
+ locale?: string;
1716
+ };
1717
+ /**
1718
+ * A Block Definition, unplaced: empty fields with `content` and `settings` merged on, in the
1719
+ * shape the content tools take.
1720
+ */
1721
+ type BlockDefinitionTarget = {
1722
+ blockDefinition: string;
1723
+ content?: unknown;
1724
+ settings?: unknown;
1725
+ };
1726
+ /**
1727
+ * A curated Layout Definition around no page: its blocks with empty fields and the content and
1728
+ * Block Settings given by Block Definition name merged on, around a labelled placeholder where a
1729
+ * page's content goes, short (the first height) or tall.
1730
+ */
1731
+ type LayoutDefinitionTarget = {
1732
+ layoutDefinition: string;
1733
+ placeholder?: LookPlaceholderHeight;
1734
+ blocks?: Record<string, {
1735
+ content?: unknown;
1736
+ settings?: unknown;
1737
+ }>;
1738
+ };
1739
+ /** One Placement on a page of the draft, by the page's path and the block's ID. */
1740
+ type PlacementTarget = PageTarget & {
1741
+ block: string;
1742
+ };
1743
+ /**
1744
+ * An Artifact Agent's own artifact, on its block's page or on the page at `path`, at the Moments
1745
+ * of its Timeline it asks for, its poster without.
1746
+ */
1747
+ type ArtifactLookTarget = {
1748
+ artifact: true;
1749
+ path?: string;
1750
+ moments?: Moment[];
1751
+ };
1752
+ /**
1753
+ * What the agent asks `look` to capture, with the sizes it wants and how long to wait before
1754
+ * capturing, in milliseconds.
1755
+ */
1756
+ type LookTarget = (PageTarget | PlacementTarget | BlockDefinitionTarget | LayoutDefinitionTarget | ArtifactLookTarget) & {
1757
+ sizes?: LookSize[];
1758
+ delay?: number;
1759
+ };
1760
+ //#endregion
1761
+ //#region ../../apps/api/src/domains/look-records/schema.d.ts
1762
+ /** Who took a look: the agent, with its `look`, or Camox, before handing an Artifact Agent a request. */
1763
+ type LookTaker = "agent" | "camox";
1764
+ //#endregion
1650
1765
  //#region ../../apps/api/src/db.d.ts
1651
1766
  declare const schema: {
1652
1767
  projects: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
@@ -9638,6 +9753,8 @@ type OpeningMessage = {
9638
9753
  from: OpeningSender;
9639
9754
  answer?: boolean;
9640
9755
  attachments?: MessageAttachment[];
9756
+ /** Where the editor was in the studio as they sent it, for a message sent from there. */
9757
+ where?: EditorWhere;
9641
9758
  };
9642
9759
  /**
9643
9760
  * How the API opens a draft's thread with no studio connected (`Thread.open`): what it belongs
@@ -9653,12 +9770,17 @@ type ThreadOpening = {
9653
9770
  };
9654
9771
  /**
9655
9772
  * Cloudflare's `PiHarness`, leaving Pi closed when the object starts until `started` holds: Pi
9656
- * creates its tables as it opens, and a thread nobody messaged has no run to resume.
9773
+ * creates its tables as it opens, and a thread nobody messaged has no run to resume. `settled`
9774
+ * hears each time a session of the thread has no task left: Pi has no hook for a run that fails,
9775
+ * but the harness's job waking a session completes once its tasks are all over, failed or not.
9657
9776
  */
9658
9777
  declare class UntilStartedPiHarness extends PiHarness {
9659
9778
  #private;
9660
- constructor(started: () => Promise<boolean>, options: PiHarnessOptions);
9779
+ constructor(started: () => Promise<boolean>, { settled, ...options }: PiHarnessOptions & {
9780
+ settled: () => Promise<void>;
9781
+ });
9661
9782
  onStart(context: CapabilityStartContext): Promise<void>;
9783
+ onJob(context: LifecycleJobContext): Promise<void | import("agents/lifecycle").LifecycleJobOutcome>;
9662
9784
  }
9663
9785
  /**
9664
9786
  * One thread with Camox's agent, addressed by the thread's own id. Pi Durable runs the agent
@@ -9707,14 +9829,11 @@ declare class Thread extends DurableObject<Bindings> {
9707
9829
  */
9708
9830
  showDrafts(): Promise<void>;
9709
9831
  /**
9710
- * Opens the thread from the API, with no studio connected: records what it belongs to and the
9711
- * API's origin, adds the Brief if any, which the model reads and studios show as from Camox
9712
- * (ADR 0025), then the opening messages, each recorded as its sender's kind has it, and starts
9713
- * the agent's run, which acts as the last message's sender. Every message but the last goes in
9714
- * before the run, the last starting it, so the model reads them all on its first call.
9715
- * Repeating it changes nothing.
9832
+ * Opens the thread from the API, with no studio connected: its Brief, if any, then its opening
9833
+ * messages, each recorded as its sender's kind has it, the last starting the agent's run, which
9834
+ * acts as its sender (`Turns.take`). Repeating it changes nothing.
9716
9835
  */
9717
- open({ identity, apiOrigin, brief, messages }: ThreadOpening): Promise<void>;
9836
+ open(opening: ThreadOpening): Promise<void>;
9718
9837
  /**
9719
9838
  * Sends a message into the thread from the API, with no studio connected, as an editor's
9720
9839
  * message from the studio is sent: it starts the agent's run, or steers the one going, and the
@@ -9827,10 +9946,6 @@ declare class ProjectCode extends DurableObject<Bindings> {
9827
9946
  snapshot(known?: string): Promise<MainSnapshot>;
9828
9947
  }
9829
9948
  //#endregion
9830
- //#region ../../apps/api/src/lib/timing.d.ts
9831
- /** What a span's line says beside its name and duration. Undefined fields are left out. */
9832
- type SpanFields = Record<string, string | number | boolean | null | undefined>;
9833
- //#endregion
9834
9949
  //#region ../../apps/api/src/domains/revisions/sandbox.d.ts
9835
9950
  /** A type check's outcome, with what it printed: its errors when it failed. */
9836
9951
  type SandboxTypeCheck = {
@@ -10913,6 +11028,11 @@ type Bindings = {
10913
11028
  REVISION_BUILDS: R2Bucket;
10914
11029
  /** The skills each `camox` version ships, one object per version (`domains/code/skills.ts`). */
10915
11030
  SKILLS: R2Bucket;
11031
+ /**
11032
+ * Look Records' images, and the Artifact Sources they showed, each stored once
11033
+ * (`domains/look-records`). Private: only operator procedures read it.
11034
+ */
11035
+ LOOKS_BUCKET: R2Bucket;
10916
11036
  /** The dispatch Worker, which loads revisions (`domains/revisions/dispatch.ts`). */
10917
11037
  DISPATCH: Dispatch;
10918
11038
  /** Browser Run, whose Chromium the agent's `look` captures a draft in (`domains/looks`). */
@@ -11054,7 +11174,7 @@ type Person = {
11054
11174
  name: string;
11055
11175
  };
11056
11176
  //#endregion
11057
- //#region ../../apps/api/src/domains/memories/memory.d.ts
11177
+ //#region ../../apps/api/src/domains/brand/memory.d.ts
11058
11178
  /**
11059
11179
  * Where a memory comes from, as members see it: for a member's words, whether the draft they were
11060
11180
  * said in was published since, which takes its thread to its Publication (ADR 0045).
@@ -11311,6 +11431,16 @@ type PushStep =
11311
11431
  /** Its head builds. */
11312
11432
  "building";
11313
11433
  //#endregion
11434
+ //#region ../../apps/api/src/lib/artifact-agent-models.d.ts
11435
+ /**
11436
+ * The models operators choose from for a project's Artifact Agents (ADR 0035), Claude Opus 5.5
11437
+ * first: the one a project that chose none runs on. `threadModel` resolves each to the model Pi
11438
+ * calls.
11439
+ */
11440
+ declare const ARTIFACT_AGENT_MODELS: readonly ["claude-opus-5.5", "claude-sonnet-5.5", "claude-haiku-5.5"];
11441
+ /** A model operators may choose for a project's Artifact Agents. */
11442
+ type ArtifactAgentModel = (typeof ARTIFACT_AGENT_MODELS)[number];
11443
+ //#endregion
11314
11444
  //#region ../../apps/api/src/router.d.ts
11315
11445
  declare const router: {
11316
11446
  projects: {
@@ -22029,6 +22159,1294 @@ declare const router: {
22029
22159
  organizationId: string;
22030
22160
  }>, Record<never, never>, Record<never, never>>;
22031
22161
  };
22162
+ lookRecords: {
22163
+ list: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<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>>, {
22164
+ draft: DraftRequest | null;
22165
+ locale: string | undefined;
22166
+ publishingDraft: string | undefined;
22167
+ look: LookGrant | undefined;
22168
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22169
+ draft: DraftRequest | null;
22170
+ locale: string | undefined;
22171
+ publishingDraft: string | undefined;
22172
+ look: LookGrant | undefined;
22173
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22174
+ draft: DraftRequest | null;
22175
+ locale: string | undefined;
22176
+ publishingDraft: string | undefined;
22177
+ look: LookGrant | undefined;
22178
+ }>, {
22179
+ db: Database;
22180
+ env: Bindings;
22181
+ headers: Headers;
22182
+ client: string;
22183
+ telemetryDisabled: boolean;
22184
+ waitUntil: (promise: Promise<unknown>) => void;
22185
+ apiOrigin?: string;
22186
+ draft: DraftRequest | null;
22187
+ locale: string | undefined;
22188
+ publishingDraft: string | undefined;
22189
+ look: LookGrant | undefined;
22190
+ user: {
22191
+ id: string;
22192
+ createdAt: Date;
22193
+ updatedAt: Date;
22194
+ email: string;
22195
+ emailVerified: boolean;
22196
+ name: string;
22197
+ image?: string | null | undefined;
22198
+ };
22199
+ session: {
22200
+ id: string;
22201
+ createdAt: Date;
22202
+ updatedAt: Date;
22203
+ userId: string;
22204
+ expiresAt: Date;
22205
+ token: string;
22206
+ ipAddress?: string | null | undefined;
22207
+ userAgent?: string | null | undefined;
22208
+ activeOrganizationId?: string | null | undefined;
22209
+ local?: boolean | null | undefined;
22210
+ studio?: boolean | null | undefined;
22211
+ };
22212
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22213
+ draft: DraftRequest | null;
22214
+ locale: string | undefined;
22215
+ publishingDraft: string | undefined;
22216
+ look: LookGrant | undefined;
22217
+ }>, {
22218
+ db: Database;
22219
+ env: Bindings;
22220
+ headers: Headers;
22221
+ client: string;
22222
+ telemetryDisabled: boolean;
22223
+ waitUntil: (promise: Promise<unknown>) => void;
22224
+ apiOrigin?: string;
22225
+ draft: DraftRequest | null;
22226
+ locale: string | undefined;
22227
+ publishingDraft: string | undefined;
22228
+ look: LookGrant | undefined;
22229
+ user: {
22230
+ id: string;
22231
+ createdAt: Date;
22232
+ updatedAt: Date;
22233
+ email: string;
22234
+ emailVerified: boolean;
22235
+ name: string;
22236
+ image?: string | null | undefined;
22237
+ };
22238
+ session: {
22239
+ id: string;
22240
+ createdAt: Date;
22241
+ updatedAt: Date;
22242
+ userId: string;
22243
+ expiresAt: Date;
22244
+ token: string;
22245
+ ipAddress?: string | null | undefined;
22246
+ userAgent?: string | null | undefined;
22247
+ activeOrganizationId?: string | null | undefined;
22248
+ local?: boolean | null | undefined;
22249
+ studio?: boolean | null | undefined;
22250
+ };
22251
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22252
+ draft: DraftRequest | null;
22253
+ locale: string | undefined;
22254
+ publishingDraft: string | undefined;
22255
+ look: LookGrant | undefined;
22256
+ }>, {
22257
+ db: Database;
22258
+ env: Bindings;
22259
+ headers: Headers;
22260
+ client: string;
22261
+ telemetryDisabled: boolean;
22262
+ waitUntil: (promise: Promise<unknown>) => void;
22263
+ apiOrigin?: string;
22264
+ draft: DraftRequest | null;
22265
+ locale: string | undefined;
22266
+ publishingDraft: string | undefined;
22267
+ look: LookGrant | undefined;
22268
+ user: {
22269
+ id: string;
22270
+ createdAt: Date;
22271
+ updatedAt: Date;
22272
+ email: string;
22273
+ emailVerified: boolean;
22274
+ name: string;
22275
+ image?: string | null | undefined;
22276
+ };
22277
+ session: {
22278
+ id: string;
22279
+ createdAt: Date;
22280
+ updatedAt: Date;
22281
+ userId: string;
22282
+ expiresAt: Date;
22283
+ token: string;
22284
+ ipAddress?: string | null | undefined;
22285
+ userAgent?: string | null | undefined;
22286
+ activeOrganizationId?: string | null | undefined;
22287
+ local?: boolean | null | undefined;
22288
+ studio?: boolean | null | undefined;
22289
+ };
22290
+ }>, Record<never, never>>, import("zod").ZodObject<{
22291
+ draftId: import("zod").ZodOptional<import("zod").ZodString>;
22292
+ requestId: import("zod").ZodOptional<import("zod").ZodString>;
22293
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
22294
+ hasSource: boolean;
22295
+ agent: AiAgent;
22296
+ artifact: ArtifactTarget | null;
22297
+ callId: string | null;
22298
+ checks: CaptureChecks;
22299
+ conversationId: string | null;
22300
+ createdAt: number;
22301
+ cut: boolean;
22302
+ draftId: string | null;
22303
+ error: string | null;
22304
+ frames: TimedMoment[] | null;
22305
+ freshnessHash: string | null;
22306
+ guardrail: import("@camox/api-contract/drafts").LookGuardrailFinding[] | null;
22307
+ id: string;
22308
+ lastLook: boolean | null;
22309
+ model: string | null;
22310
+ organizationId: string | null;
22311
+ projectId: number | null;
22312
+ requestId: string | null;
22313
+ round: number | null;
22314
+ size: "desktop" | "mobile";
22315
+ takenBy: LookTaker;
22316
+ target: LookTarget;
22317
+ thinkingLevel: "high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh" | null;
22318
+ threadId: string | null;
22319
+ timeline: import("@camox/api-contract/drafts").LookTimeline | null;
22320
+ }[], {
22321
+ hasSource: boolean;
22322
+ agent: AiAgent;
22323
+ artifact: ArtifactTarget | null;
22324
+ callId: string | null;
22325
+ checks: CaptureChecks;
22326
+ conversationId: string | null;
22327
+ createdAt: number;
22328
+ cut: boolean;
22329
+ draftId: string | null;
22330
+ error: string | null;
22331
+ frames: TimedMoment[] | null;
22332
+ freshnessHash: string | null;
22333
+ guardrail: import("@camox/api-contract/drafts").LookGuardrailFinding[] | null;
22334
+ id: string;
22335
+ lastLook: boolean | null;
22336
+ model: string | null;
22337
+ organizationId: string | null;
22338
+ projectId: number | null;
22339
+ requestId: string | null;
22340
+ round: number | null;
22341
+ size: "desktop" | "mobile";
22342
+ takenBy: LookTaker;
22343
+ target: LookTarget;
22344
+ thinkingLevel: "high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh" | null;
22345
+ threadId: string | null;
22346
+ timeline: import("@camox/api-contract/drafts").LookTimeline | null;
22347
+ }[]>, Record<never, never>, Record<never, never>>;
22348
+ image: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<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>>, {
22349
+ draft: DraftRequest | null;
22350
+ locale: string | undefined;
22351
+ publishingDraft: string | undefined;
22352
+ look: LookGrant | undefined;
22353
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22354
+ draft: DraftRequest | null;
22355
+ locale: string | undefined;
22356
+ publishingDraft: string | undefined;
22357
+ look: LookGrant | undefined;
22358
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22359
+ draft: DraftRequest | null;
22360
+ locale: string | undefined;
22361
+ publishingDraft: string | undefined;
22362
+ look: LookGrant | undefined;
22363
+ }>, {
22364
+ db: Database;
22365
+ env: Bindings;
22366
+ headers: Headers;
22367
+ client: string;
22368
+ telemetryDisabled: boolean;
22369
+ waitUntil: (promise: Promise<unknown>) => void;
22370
+ apiOrigin?: string;
22371
+ draft: DraftRequest | null;
22372
+ locale: string | undefined;
22373
+ publishingDraft: string | undefined;
22374
+ look: LookGrant | undefined;
22375
+ user: {
22376
+ id: string;
22377
+ createdAt: Date;
22378
+ updatedAt: Date;
22379
+ email: string;
22380
+ emailVerified: boolean;
22381
+ name: string;
22382
+ image?: string | null | undefined;
22383
+ };
22384
+ session: {
22385
+ id: string;
22386
+ createdAt: Date;
22387
+ updatedAt: Date;
22388
+ userId: string;
22389
+ expiresAt: Date;
22390
+ token: string;
22391
+ ipAddress?: string | null | undefined;
22392
+ userAgent?: string | null | undefined;
22393
+ activeOrganizationId?: string | null | undefined;
22394
+ local?: boolean | null | undefined;
22395
+ studio?: boolean | null | undefined;
22396
+ };
22397
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22398
+ draft: DraftRequest | null;
22399
+ locale: string | undefined;
22400
+ publishingDraft: string | undefined;
22401
+ look: LookGrant | undefined;
22402
+ }>, {
22403
+ db: Database;
22404
+ env: Bindings;
22405
+ headers: Headers;
22406
+ client: string;
22407
+ telemetryDisabled: boolean;
22408
+ waitUntil: (promise: Promise<unknown>) => void;
22409
+ apiOrigin?: string;
22410
+ draft: DraftRequest | null;
22411
+ locale: string | undefined;
22412
+ publishingDraft: string | undefined;
22413
+ look: LookGrant | undefined;
22414
+ user: {
22415
+ id: string;
22416
+ createdAt: Date;
22417
+ updatedAt: Date;
22418
+ email: string;
22419
+ emailVerified: boolean;
22420
+ name: string;
22421
+ image?: string | null | undefined;
22422
+ };
22423
+ session: {
22424
+ id: string;
22425
+ createdAt: Date;
22426
+ updatedAt: Date;
22427
+ userId: string;
22428
+ expiresAt: Date;
22429
+ token: string;
22430
+ ipAddress?: string | null | undefined;
22431
+ userAgent?: string | null | undefined;
22432
+ activeOrganizationId?: string | null | undefined;
22433
+ local?: boolean | null | undefined;
22434
+ studio?: boolean | null | undefined;
22435
+ };
22436
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22437
+ draft: DraftRequest | null;
22438
+ locale: string | undefined;
22439
+ publishingDraft: string | undefined;
22440
+ look: LookGrant | undefined;
22441
+ }>, {
22442
+ db: Database;
22443
+ env: Bindings;
22444
+ headers: Headers;
22445
+ client: string;
22446
+ telemetryDisabled: boolean;
22447
+ waitUntil: (promise: Promise<unknown>) => void;
22448
+ apiOrigin?: string;
22449
+ draft: DraftRequest | null;
22450
+ locale: string | undefined;
22451
+ publishingDraft: string | undefined;
22452
+ look: LookGrant | undefined;
22453
+ user: {
22454
+ id: string;
22455
+ createdAt: Date;
22456
+ updatedAt: Date;
22457
+ email: string;
22458
+ emailVerified: boolean;
22459
+ name: string;
22460
+ image?: string | null | undefined;
22461
+ };
22462
+ session: {
22463
+ id: string;
22464
+ createdAt: Date;
22465
+ updatedAt: Date;
22466
+ userId: string;
22467
+ expiresAt: Date;
22468
+ token: string;
22469
+ ipAddress?: string | null | undefined;
22470
+ userAgent?: string | null | undefined;
22471
+ activeOrganizationId?: string | null | undefined;
22472
+ local?: boolean | null | undefined;
22473
+ studio?: boolean | null | undefined;
22474
+ };
22475
+ }>, Record<never, never>>, import("zod").ZodObject<{
22476
+ id: import("zod").ZodString;
22477
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
22478
+ data: string;
22479
+ mimeType: any;
22480
+ }, {
22481
+ data: string;
22482
+ mimeType: any;
22483
+ }>, Record<never, never>, Record<never, never>>;
22484
+ source: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<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>>, {
22485
+ draft: DraftRequest | null;
22486
+ locale: string | undefined;
22487
+ publishingDraft: string | undefined;
22488
+ look: LookGrant | undefined;
22489
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22490
+ draft: DraftRequest | null;
22491
+ locale: string | undefined;
22492
+ publishingDraft: string | undefined;
22493
+ look: LookGrant | undefined;
22494
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22495
+ draft: DraftRequest | null;
22496
+ locale: string | undefined;
22497
+ publishingDraft: string | undefined;
22498
+ look: LookGrant | undefined;
22499
+ }>, {
22500
+ db: Database;
22501
+ env: Bindings;
22502
+ headers: Headers;
22503
+ client: string;
22504
+ telemetryDisabled: boolean;
22505
+ waitUntil: (promise: Promise<unknown>) => void;
22506
+ apiOrigin?: string;
22507
+ draft: DraftRequest | null;
22508
+ locale: string | undefined;
22509
+ publishingDraft: string | undefined;
22510
+ look: LookGrant | undefined;
22511
+ user: {
22512
+ id: string;
22513
+ createdAt: Date;
22514
+ updatedAt: Date;
22515
+ email: string;
22516
+ emailVerified: boolean;
22517
+ name: string;
22518
+ image?: string | null | undefined;
22519
+ };
22520
+ session: {
22521
+ id: string;
22522
+ createdAt: Date;
22523
+ updatedAt: Date;
22524
+ userId: string;
22525
+ expiresAt: Date;
22526
+ token: string;
22527
+ ipAddress?: string | null | undefined;
22528
+ userAgent?: string | null | undefined;
22529
+ activeOrganizationId?: string | null | undefined;
22530
+ local?: boolean | null | undefined;
22531
+ studio?: boolean | null | undefined;
22532
+ };
22533
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22534
+ draft: DraftRequest | null;
22535
+ locale: string | undefined;
22536
+ publishingDraft: string | undefined;
22537
+ look: LookGrant | undefined;
22538
+ }>, {
22539
+ db: Database;
22540
+ env: Bindings;
22541
+ headers: Headers;
22542
+ client: string;
22543
+ telemetryDisabled: boolean;
22544
+ waitUntil: (promise: Promise<unknown>) => void;
22545
+ apiOrigin?: string;
22546
+ draft: DraftRequest | null;
22547
+ locale: string | undefined;
22548
+ publishingDraft: string | undefined;
22549
+ look: LookGrant | undefined;
22550
+ user: {
22551
+ id: string;
22552
+ createdAt: Date;
22553
+ updatedAt: Date;
22554
+ email: string;
22555
+ emailVerified: boolean;
22556
+ name: string;
22557
+ image?: string | null | undefined;
22558
+ };
22559
+ session: {
22560
+ id: string;
22561
+ createdAt: Date;
22562
+ updatedAt: Date;
22563
+ userId: string;
22564
+ expiresAt: Date;
22565
+ token: string;
22566
+ ipAddress?: string | null | undefined;
22567
+ userAgent?: string | null | undefined;
22568
+ activeOrganizationId?: string | null | undefined;
22569
+ local?: boolean | null | undefined;
22570
+ studio?: boolean | null | undefined;
22571
+ };
22572
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22573
+ draft: DraftRequest | null;
22574
+ locale: string | undefined;
22575
+ publishingDraft: string | undefined;
22576
+ look: LookGrant | undefined;
22577
+ }>, {
22578
+ db: Database;
22579
+ env: Bindings;
22580
+ headers: Headers;
22581
+ client: string;
22582
+ telemetryDisabled: boolean;
22583
+ waitUntil: (promise: Promise<unknown>) => void;
22584
+ apiOrigin?: string;
22585
+ draft: DraftRequest | null;
22586
+ locale: string | undefined;
22587
+ publishingDraft: string | undefined;
22588
+ look: LookGrant | undefined;
22589
+ user: {
22590
+ id: string;
22591
+ createdAt: Date;
22592
+ updatedAt: Date;
22593
+ email: string;
22594
+ emailVerified: boolean;
22595
+ name: string;
22596
+ image?: string | null | undefined;
22597
+ };
22598
+ session: {
22599
+ id: string;
22600
+ createdAt: Date;
22601
+ updatedAt: Date;
22602
+ userId: string;
22603
+ expiresAt: Date;
22604
+ token: string;
22605
+ ipAddress?: string | null | undefined;
22606
+ userAgent?: string | null | undefined;
22607
+ activeOrganizationId?: string | null | undefined;
22608
+ local?: boolean | null | undefined;
22609
+ studio?: boolean | null | undefined;
22610
+ };
22611
+ }>, Record<never, never>>, import("zod").ZodObject<{
22612
+ id: import("zod").ZodString;
22613
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
22614
+ source: unknown;
22615
+ }, {
22616
+ source: unknown;
22617
+ }>, Record<never, never>, Record<never, never>>;
22618
+ artifactRequests: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<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>>, {
22619
+ draft: DraftRequest | null;
22620
+ locale: string | undefined;
22621
+ publishingDraft: string | undefined;
22622
+ look: LookGrant | undefined;
22623
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22624
+ draft: DraftRequest | null;
22625
+ locale: string | undefined;
22626
+ publishingDraft: string | undefined;
22627
+ look: LookGrant | undefined;
22628
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22629
+ draft: DraftRequest | null;
22630
+ locale: string | undefined;
22631
+ publishingDraft: string | undefined;
22632
+ look: LookGrant | undefined;
22633
+ }>, {
22634
+ db: Database;
22635
+ env: Bindings;
22636
+ headers: Headers;
22637
+ client: string;
22638
+ telemetryDisabled: boolean;
22639
+ waitUntil: (promise: Promise<unknown>) => void;
22640
+ apiOrigin?: string;
22641
+ draft: DraftRequest | null;
22642
+ locale: string | undefined;
22643
+ publishingDraft: string | undefined;
22644
+ look: LookGrant | undefined;
22645
+ user: {
22646
+ id: string;
22647
+ createdAt: Date;
22648
+ updatedAt: Date;
22649
+ email: string;
22650
+ emailVerified: boolean;
22651
+ name: string;
22652
+ image?: string | null | undefined;
22653
+ };
22654
+ session: {
22655
+ id: string;
22656
+ createdAt: Date;
22657
+ updatedAt: Date;
22658
+ userId: string;
22659
+ expiresAt: Date;
22660
+ token: string;
22661
+ ipAddress?: string | null | undefined;
22662
+ userAgent?: string | null | undefined;
22663
+ activeOrganizationId?: string | null | undefined;
22664
+ local?: boolean | null | undefined;
22665
+ studio?: boolean | null | undefined;
22666
+ };
22667
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22668
+ draft: DraftRequest | null;
22669
+ locale: string | undefined;
22670
+ publishingDraft: string | undefined;
22671
+ look: LookGrant | undefined;
22672
+ }>, {
22673
+ db: Database;
22674
+ env: Bindings;
22675
+ headers: Headers;
22676
+ client: string;
22677
+ telemetryDisabled: boolean;
22678
+ waitUntil: (promise: Promise<unknown>) => void;
22679
+ apiOrigin?: string;
22680
+ draft: DraftRequest | null;
22681
+ locale: string | undefined;
22682
+ publishingDraft: string | undefined;
22683
+ look: LookGrant | undefined;
22684
+ user: {
22685
+ id: string;
22686
+ createdAt: Date;
22687
+ updatedAt: Date;
22688
+ email: string;
22689
+ emailVerified: boolean;
22690
+ name: string;
22691
+ image?: string | null | undefined;
22692
+ };
22693
+ session: {
22694
+ id: string;
22695
+ createdAt: Date;
22696
+ updatedAt: Date;
22697
+ userId: string;
22698
+ expiresAt: Date;
22699
+ token: string;
22700
+ ipAddress?: string | null | undefined;
22701
+ userAgent?: string | null | undefined;
22702
+ activeOrganizationId?: string | null | undefined;
22703
+ local?: boolean | null | undefined;
22704
+ studio?: boolean | null | undefined;
22705
+ };
22706
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22707
+ draft: DraftRequest | null;
22708
+ locale: string | undefined;
22709
+ publishingDraft: string | undefined;
22710
+ look: LookGrant | undefined;
22711
+ }>, {
22712
+ db: Database;
22713
+ env: Bindings;
22714
+ headers: Headers;
22715
+ client: string;
22716
+ telemetryDisabled: boolean;
22717
+ waitUntil: (promise: Promise<unknown>) => void;
22718
+ apiOrigin?: string;
22719
+ draft: DraftRequest | null;
22720
+ locale: string | undefined;
22721
+ publishingDraft: string | undefined;
22722
+ look: LookGrant | undefined;
22723
+ user: {
22724
+ id: string;
22725
+ createdAt: Date;
22726
+ updatedAt: Date;
22727
+ email: string;
22728
+ emailVerified: boolean;
22729
+ name: string;
22730
+ image?: string | null | undefined;
22731
+ };
22732
+ session: {
22733
+ id: string;
22734
+ createdAt: Date;
22735
+ updatedAt: Date;
22736
+ userId: string;
22737
+ expiresAt: Date;
22738
+ token: string;
22739
+ ipAddress?: string | null | undefined;
22740
+ userAgent?: string | null | undefined;
22741
+ activeOrganizationId?: string | null | undefined;
22742
+ local?: boolean | null | undefined;
22743
+ studio?: boolean | null | undefined;
22744
+ };
22745
+ }>, Record<never, never>>, import("zod").ZodObject<{
22746
+ projectId: import("zod").ZodOptional<import("zod").ZodNumber>;
22747
+ model: import("zod").ZodOptional<import("zod").ZodString>;
22748
+ firstVersion: import("zod").ZodOptional<import("zod").ZodBoolean>;
22749
+ lastLook: import("zod").ZodOptional<import("zod").ZodBoolean>;
22750
+ before: import("zod").ZodOptional<import("zod").ZodNumber>;
22751
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
22752
+ id: string;
22753
+ requestId: string;
22754
+ organizationId: string | null;
22755
+ projectId: number | null;
22756
+ draftId: string | null;
22757
+ threadId: string | null;
22758
+ conversationId: string | null;
22759
+ artifact: ArtifactTarget;
22760
+ request: string;
22761
+ firstVersion: boolean;
22762
+ model: string;
22763
+ thinkingLevel: "high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh";
22764
+ lastLook: boolean;
22765
+ createdAt: number;
22766
+ projectName: string | null;
22767
+ costMicroUsd: number | null;
22768
+ rounds: number;
22769
+ finalImages: {
22770
+ desktop: string | null;
22771
+ mobile: string | null;
22772
+ };
22773
+ }[], {
22774
+ id: string;
22775
+ requestId: string;
22776
+ organizationId: string | null;
22777
+ projectId: number | null;
22778
+ draftId: string | null;
22779
+ threadId: string | null;
22780
+ conversationId: string | null;
22781
+ artifact: ArtifactTarget;
22782
+ request: string;
22783
+ firstVersion: boolean;
22784
+ model: string;
22785
+ thinkingLevel: "high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh";
22786
+ lastLook: boolean;
22787
+ createdAt: number;
22788
+ projectName: string | null;
22789
+ costMicroUsd: number | null;
22790
+ rounds: number;
22791
+ finalImages: {
22792
+ desktop: string | null;
22793
+ mobile: string | null;
22794
+ };
22795
+ }[]>, Record<never, never>, Record<never, never>>;
22796
+ artifactRequestTotals: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<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>>, {
22797
+ draft: DraftRequest | null;
22798
+ locale: string | undefined;
22799
+ publishingDraft: string | undefined;
22800
+ look: LookGrant | undefined;
22801
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22802
+ draft: DraftRequest | null;
22803
+ locale: string | undefined;
22804
+ publishingDraft: string | undefined;
22805
+ look: LookGrant | undefined;
22806
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22807
+ draft: DraftRequest | null;
22808
+ locale: string | undefined;
22809
+ publishingDraft: string | undefined;
22810
+ look: LookGrant | undefined;
22811
+ }>, {
22812
+ db: Database;
22813
+ env: Bindings;
22814
+ headers: Headers;
22815
+ client: string;
22816
+ telemetryDisabled: boolean;
22817
+ waitUntil: (promise: Promise<unknown>) => void;
22818
+ apiOrigin?: string;
22819
+ draft: DraftRequest | null;
22820
+ locale: string | undefined;
22821
+ publishingDraft: string | undefined;
22822
+ look: LookGrant | undefined;
22823
+ user: {
22824
+ id: string;
22825
+ createdAt: Date;
22826
+ updatedAt: Date;
22827
+ email: string;
22828
+ emailVerified: boolean;
22829
+ name: string;
22830
+ image?: string | null | undefined;
22831
+ };
22832
+ session: {
22833
+ id: string;
22834
+ createdAt: Date;
22835
+ updatedAt: Date;
22836
+ userId: string;
22837
+ expiresAt: Date;
22838
+ token: string;
22839
+ ipAddress?: string | null | undefined;
22840
+ userAgent?: string | null | undefined;
22841
+ activeOrganizationId?: string | null | undefined;
22842
+ local?: boolean | null | undefined;
22843
+ studio?: boolean | null | undefined;
22844
+ };
22845
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22846
+ draft: DraftRequest | null;
22847
+ locale: string | undefined;
22848
+ publishingDraft: string | undefined;
22849
+ look: LookGrant | undefined;
22850
+ }>, {
22851
+ db: Database;
22852
+ env: Bindings;
22853
+ headers: Headers;
22854
+ client: string;
22855
+ telemetryDisabled: boolean;
22856
+ waitUntil: (promise: Promise<unknown>) => void;
22857
+ apiOrigin?: string;
22858
+ draft: DraftRequest | null;
22859
+ locale: string | undefined;
22860
+ publishingDraft: string | undefined;
22861
+ look: LookGrant | undefined;
22862
+ user: {
22863
+ id: string;
22864
+ createdAt: Date;
22865
+ updatedAt: Date;
22866
+ email: string;
22867
+ emailVerified: boolean;
22868
+ name: string;
22869
+ image?: string | null | undefined;
22870
+ };
22871
+ session: {
22872
+ id: string;
22873
+ createdAt: Date;
22874
+ updatedAt: Date;
22875
+ userId: string;
22876
+ expiresAt: Date;
22877
+ token: string;
22878
+ ipAddress?: string | null | undefined;
22879
+ userAgent?: string | null | undefined;
22880
+ activeOrganizationId?: string | null | undefined;
22881
+ local?: boolean | null | undefined;
22882
+ studio?: boolean | null | undefined;
22883
+ };
22884
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22885
+ draft: DraftRequest | null;
22886
+ locale: string | undefined;
22887
+ publishingDraft: string | undefined;
22888
+ look: LookGrant | undefined;
22889
+ }>, {
22890
+ db: Database;
22891
+ env: Bindings;
22892
+ headers: Headers;
22893
+ client: string;
22894
+ telemetryDisabled: boolean;
22895
+ waitUntil: (promise: Promise<unknown>) => void;
22896
+ apiOrigin?: string;
22897
+ draft: DraftRequest | null;
22898
+ locale: string | undefined;
22899
+ publishingDraft: string | undefined;
22900
+ look: LookGrant | undefined;
22901
+ user: {
22902
+ id: string;
22903
+ createdAt: Date;
22904
+ updatedAt: Date;
22905
+ email: string;
22906
+ emailVerified: boolean;
22907
+ name: string;
22908
+ image?: string | null | undefined;
22909
+ };
22910
+ session: {
22911
+ id: string;
22912
+ createdAt: Date;
22913
+ updatedAt: Date;
22914
+ userId: string;
22915
+ expiresAt: Date;
22916
+ token: string;
22917
+ ipAddress?: string | null | undefined;
22918
+ userAgent?: string | null | undefined;
22919
+ activeOrganizationId?: string | null | undefined;
22920
+ local?: boolean | null | undefined;
22921
+ studio?: boolean | null | undefined;
22922
+ };
22923
+ }>, Record<never, never>>, import("zod").ZodObject<{
22924
+ projectId: import("zod").ZodOptional<import("zod").ZodNumber>;
22925
+ model: import("zod").ZodOptional<import("zod").ZodString>;
22926
+ firstVersion: import("zod").ZodOptional<import("zod").ZodBoolean>;
22927
+ lastLook: import("zod").ZodOptional<import("zod").ZodBoolean>;
22928
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
22929
+ model: string;
22930
+ requests: number;
22931
+ averageCostMicroUsd: number | null;
22932
+ averageRounds: number;
22933
+ }[], {
22934
+ model: string;
22935
+ requests: number;
22936
+ averageCostMicroUsd: number | null;
22937
+ averageRounds: number;
22938
+ }[]>, Record<never, never>, Record<never, never>>;
22939
+ request: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<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>>, {
22940
+ draft: DraftRequest | null;
22941
+ locale: string | undefined;
22942
+ publishingDraft: string | undefined;
22943
+ look: LookGrant | undefined;
22944
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22945
+ draft: DraftRequest | null;
22946
+ locale: string | undefined;
22947
+ publishingDraft: string | undefined;
22948
+ look: LookGrant | undefined;
22949
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22950
+ draft: DraftRequest | null;
22951
+ locale: string | undefined;
22952
+ publishingDraft: string | undefined;
22953
+ look: LookGrant | undefined;
22954
+ }>, {
22955
+ db: Database;
22956
+ env: Bindings;
22957
+ headers: Headers;
22958
+ client: string;
22959
+ telemetryDisabled: boolean;
22960
+ waitUntil: (promise: Promise<unknown>) => void;
22961
+ apiOrigin?: string;
22962
+ draft: DraftRequest | null;
22963
+ locale: string | undefined;
22964
+ publishingDraft: string | undefined;
22965
+ look: LookGrant | undefined;
22966
+ user: {
22967
+ id: string;
22968
+ createdAt: Date;
22969
+ updatedAt: Date;
22970
+ email: string;
22971
+ emailVerified: boolean;
22972
+ name: string;
22973
+ image?: string | null | undefined;
22974
+ };
22975
+ session: {
22976
+ id: string;
22977
+ createdAt: Date;
22978
+ updatedAt: Date;
22979
+ userId: string;
22980
+ expiresAt: Date;
22981
+ token: string;
22982
+ ipAddress?: string | null | undefined;
22983
+ userAgent?: string | null | undefined;
22984
+ activeOrganizationId?: string | null | undefined;
22985
+ local?: boolean | null | undefined;
22986
+ studio?: boolean | null | undefined;
22987
+ };
22988
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
22989
+ draft: DraftRequest | null;
22990
+ locale: string | undefined;
22991
+ publishingDraft: string | undefined;
22992
+ look: LookGrant | undefined;
22993
+ }>, {
22994
+ db: Database;
22995
+ env: Bindings;
22996
+ headers: Headers;
22997
+ client: string;
22998
+ telemetryDisabled: boolean;
22999
+ waitUntil: (promise: Promise<unknown>) => void;
23000
+ apiOrigin?: string;
23001
+ draft: DraftRequest | null;
23002
+ locale: string | undefined;
23003
+ publishingDraft: string | undefined;
23004
+ look: LookGrant | undefined;
23005
+ user: {
23006
+ id: string;
23007
+ createdAt: Date;
23008
+ updatedAt: Date;
23009
+ email: string;
23010
+ emailVerified: boolean;
23011
+ name: string;
23012
+ image?: string | null | undefined;
23013
+ };
23014
+ session: {
23015
+ id: string;
23016
+ createdAt: Date;
23017
+ updatedAt: Date;
23018
+ userId: string;
23019
+ expiresAt: Date;
23020
+ token: string;
23021
+ ipAddress?: string | null | undefined;
23022
+ userAgent?: string | null | undefined;
23023
+ activeOrganizationId?: string | null | undefined;
23024
+ local?: boolean | null | undefined;
23025
+ studio?: boolean | null | undefined;
23026
+ };
23027
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
23028
+ draft: DraftRequest | null;
23029
+ locale: string | undefined;
23030
+ publishingDraft: string | undefined;
23031
+ look: LookGrant | undefined;
23032
+ }>, {
23033
+ db: Database;
23034
+ env: Bindings;
23035
+ headers: Headers;
23036
+ client: string;
23037
+ telemetryDisabled: boolean;
23038
+ waitUntil: (promise: Promise<unknown>) => void;
23039
+ apiOrigin?: string;
23040
+ draft: DraftRequest | null;
23041
+ locale: string | undefined;
23042
+ publishingDraft: string | undefined;
23043
+ look: LookGrant | undefined;
23044
+ user: {
23045
+ id: string;
23046
+ createdAt: Date;
23047
+ updatedAt: Date;
23048
+ email: string;
23049
+ emailVerified: boolean;
23050
+ name: string;
23051
+ image?: string | null | undefined;
23052
+ };
23053
+ session: {
23054
+ id: string;
23055
+ createdAt: Date;
23056
+ updatedAt: Date;
23057
+ userId: string;
23058
+ expiresAt: Date;
23059
+ token: string;
23060
+ ipAddress?: string | null | undefined;
23061
+ userAgent?: string | null | undefined;
23062
+ activeOrganizationId?: string | null | undefined;
23063
+ local?: boolean | null | undefined;
23064
+ studio?: boolean | null | undefined;
23065
+ };
23066
+ }>, Record<never, never>>, import("zod").ZodObject<{
23067
+ requestId: import("zod").ZodString;
23068
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
23069
+ id: string;
23070
+ requestId: string;
23071
+ organizationId: string | null;
23072
+ projectId: number | null;
23073
+ draftId: string | null;
23074
+ threadId: string | null;
23075
+ conversationId: string | null;
23076
+ artifact: ArtifactTarget;
23077
+ request: string;
23078
+ firstVersion: boolean;
23079
+ model: string;
23080
+ thinkingLevel: "high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh";
23081
+ lastLook: boolean;
23082
+ createdAt: number;
23083
+ projectName: string | null;
23084
+ rounds: {
23085
+ round: number | null;
23086
+ records: {
23087
+ hasSource: boolean;
23088
+ agent: AiAgent;
23089
+ artifact: ArtifactTarget | null;
23090
+ callId: string | null;
23091
+ checks: CaptureChecks;
23092
+ conversationId: string | null;
23093
+ createdAt: number;
23094
+ cut: boolean;
23095
+ draftId: string | null;
23096
+ error: string | null;
23097
+ frames: TimedMoment[] | null;
23098
+ freshnessHash: string | null;
23099
+ guardrail: import("@camox/api-contract/drafts").LookGuardrailFinding[] | null;
23100
+ id: string;
23101
+ lastLook: boolean | null;
23102
+ model: string | null;
23103
+ organizationId: string | null;
23104
+ projectId: number | null;
23105
+ requestId: string | null;
23106
+ round: number | null;
23107
+ size: "desktop" | "mobile";
23108
+ takenBy: LookTaker;
23109
+ target: LookTarget;
23110
+ thinkingLevel: "high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh" | null;
23111
+ threadId: string | null;
23112
+ timeline: import("@camox/api-contract/drafts").LookTimeline | null;
23113
+ }[];
23114
+ }[];
23115
+ }, {
23116
+ id: string;
23117
+ requestId: string;
23118
+ organizationId: string | null;
23119
+ projectId: number | null;
23120
+ draftId: string | null;
23121
+ threadId: string | null;
23122
+ conversationId: string | null;
23123
+ artifact: ArtifactTarget;
23124
+ request: string;
23125
+ firstVersion: boolean;
23126
+ model: string;
23127
+ thinkingLevel: "high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh";
23128
+ lastLook: boolean;
23129
+ createdAt: number;
23130
+ projectName: string | null;
23131
+ rounds: {
23132
+ round: number | null;
23133
+ records: {
23134
+ hasSource: boolean;
23135
+ agent: AiAgent;
23136
+ artifact: ArtifactTarget | null;
23137
+ callId: string | null;
23138
+ checks: CaptureChecks;
23139
+ conversationId: string | null;
23140
+ createdAt: number;
23141
+ cut: boolean;
23142
+ draftId: string | null;
23143
+ error: string | null;
23144
+ frames: TimedMoment[] | null;
23145
+ freshnessHash: string | null;
23146
+ guardrail: import("@camox/api-contract/drafts").LookGuardrailFinding[] | null;
23147
+ id: string;
23148
+ lastLook: boolean | null;
23149
+ model: string | null;
23150
+ organizationId: string | null;
23151
+ projectId: number | null;
23152
+ requestId: string | null;
23153
+ round: number | null;
23154
+ size: "desktop" | "mobile";
23155
+ takenBy: LookTaker;
23156
+ target: LookTarget;
23157
+ thinkingLevel: "high" | "low" | "max" | "medium" | "minimal" | "off" | "xhigh" | null;
23158
+ threadId: string | null;
23159
+ timeline: import("@camox/api-contract/drafts").LookTimeline | null;
23160
+ }[];
23161
+ }[];
23162
+ }>, Record<never, never>, Record<never, never>>;
23163
+ };
23164
+ artifactAgentSettings: {
23165
+ list: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<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>>, {
23166
+ draft: DraftRequest | null;
23167
+ locale: string | undefined;
23168
+ publishingDraft: string | undefined;
23169
+ look: LookGrant | undefined;
23170
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
23171
+ draft: DraftRequest | null;
23172
+ locale: string | undefined;
23173
+ publishingDraft: string | undefined;
23174
+ look: LookGrant | undefined;
23175
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
23176
+ draft: DraftRequest | null;
23177
+ locale: string | undefined;
23178
+ publishingDraft: string | undefined;
23179
+ look: LookGrant | undefined;
23180
+ }>, {
23181
+ db: Database;
23182
+ env: Bindings;
23183
+ headers: Headers;
23184
+ client: string;
23185
+ telemetryDisabled: boolean;
23186
+ waitUntil: (promise: Promise<unknown>) => void;
23187
+ apiOrigin?: string;
23188
+ draft: DraftRequest | null;
23189
+ locale: string | undefined;
23190
+ publishingDraft: string | undefined;
23191
+ look: LookGrant | undefined;
23192
+ user: {
23193
+ id: string;
23194
+ createdAt: Date;
23195
+ updatedAt: Date;
23196
+ email: string;
23197
+ emailVerified: boolean;
23198
+ name: string;
23199
+ image?: string | null | undefined;
23200
+ };
23201
+ session: {
23202
+ id: string;
23203
+ createdAt: Date;
23204
+ updatedAt: Date;
23205
+ userId: string;
23206
+ expiresAt: Date;
23207
+ token: string;
23208
+ ipAddress?: string | null | undefined;
23209
+ userAgent?: string | null | undefined;
23210
+ activeOrganizationId?: string | null | undefined;
23211
+ local?: boolean | null | undefined;
23212
+ studio?: boolean | null | undefined;
23213
+ };
23214
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
23215
+ draft: DraftRequest | null;
23216
+ locale: string | undefined;
23217
+ publishingDraft: string | undefined;
23218
+ look: LookGrant | undefined;
23219
+ }>, {
23220
+ db: Database;
23221
+ env: Bindings;
23222
+ headers: Headers;
23223
+ client: string;
23224
+ telemetryDisabled: boolean;
23225
+ waitUntil: (promise: Promise<unknown>) => void;
23226
+ apiOrigin?: string;
23227
+ draft: DraftRequest | null;
23228
+ locale: string | undefined;
23229
+ publishingDraft: string | undefined;
23230
+ look: LookGrant | undefined;
23231
+ user: {
23232
+ id: string;
23233
+ createdAt: Date;
23234
+ updatedAt: Date;
23235
+ email: string;
23236
+ emailVerified: boolean;
23237
+ name: string;
23238
+ image?: string | null | undefined;
23239
+ };
23240
+ session: {
23241
+ id: string;
23242
+ createdAt: Date;
23243
+ updatedAt: Date;
23244
+ userId: string;
23245
+ expiresAt: Date;
23246
+ token: string;
23247
+ ipAddress?: string | null | undefined;
23248
+ userAgent?: string | null | undefined;
23249
+ activeOrganizationId?: string | null | undefined;
23250
+ local?: boolean | null | undefined;
23251
+ studio?: boolean | null | undefined;
23252
+ };
23253
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
23254
+ draft: DraftRequest | null;
23255
+ locale: string | undefined;
23256
+ publishingDraft: string | undefined;
23257
+ look: LookGrant | undefined;
23258
+ }>, {
23259
+ db: Database;
23260
+ env: Bindings;
23261
+ headers: Headers;
23262
+ client: string;
23263
+ telemetryDisabled: boolean;
23264
+ waitUntil: (promise: Promise<unknown>) => void;
23265
+ apiOrigin?: string;
23266
+ draft: DraftRequest | null;
23267
+ locale: string | undefined;
23268
+ publishingDraft: string | undefined;
23269
+ look: LookGrant | undefined;
23270
+ user: {
23271
+ id: string;
23272
+ createdAt: Date;
23273
+ updatedAt: Date;
23274
+ email: string;
23275
+ emailVerified: boolean;
23276
+ name: string;
23277
+ image?: string | null | undefined;
23278
+ };
23279
+ session: {
23280
+ id: string;
23281
+ createdAt: Date;
23282
+ updatedAt: Date;
23283
+ userId: string;
23284
+ expiresAt: Date;
23285
+ token: string;
23286
+ ipAddress?: string | null | undefined;
23287
+ userAgent?: string | null | undefined;
23288
+ activeOrganizationId?: string | null | undefined;
23289
+ local?: boolean | null | undefined;
23290
+ studio?: boolean | null | undefined;
23291
+ };
23292
+ }>, Record<never, never>>, import("@orpc/server").Schema<unknown, unknown>, import("@orpc/server").Schema<{
23293
+ lastLook: boolean;
23294
+ model: "claude-haiku-5.5" | "claude-opus-5.5" | "claude-sonnet-5.5";
23295
+ projectId: number;
23296
+ projectName: string;
23297
+ organizationName: string | null;
23298
+ }[], {
23299
+ lastLook: boolean;
23300
+ model: "claude-haiku-5.5" | "claude-opus-5.5" | "claude-sonnet-5.5";
23301
+ projectId: number;
23302
+ projectName: string;
23303
+ organizationName: string | null;
23304
+ }[]>, Record<never, never>, Record<never, never>>;
23305
+ set: import("@orpc/server").DecoratedProcedure<import("@orpc/server").MergedInitialContext<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>>, {
23306
+ draft: DraftRequest | null;
23307
+ locale: string | undefined;
23308
+ publishingDraft: string | undefined;
23309
+ look: LookGrant | undefined;
23310
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
23311
+ draft: DraftRequest | null;
23312
+ locale: string | undefined;
23313
+ publishingDraft: string | undefined;
23314
+ look: LookGrant | undefined;
23315
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
23316
+ draft: DraftRequest | null;
23317
+ locale: string | undefined;
23318
+ publishingDraft: string | undefined;
23319
+ look: LookGrant | undefined;
23320
+ }>, {
23321
+ db: Database;
23322
+ env: Bindings;
23323
+ headers: Headers;
23324
+ client: string;
23325
+ telemetryDisabled: boolean;
23326
+ waitUntil: (promise: Promise<unknown>) => void;
23327
+ apiOrigin?: string;
23328
+ draft: DraftRequest | null;
23329
+ locale: string | undefined;
23330
+ publishingDraft: string | undefined;
23331
+ look: LookGrant | undefined;
23332
+ user: {
23333
+ id: string;
23334
+ createdAt: Date;
23335
+ updatedAt: Date;
23336
+ email: string;
23337
+ emailVerified: boolean;
23338
+ name: string;
23339
+ image?: string | null | undefined;
23340
+ };
23341
+ session: {
23342
+ id: string;
23343
+ createdAt: Date;
23344
+ updatedAt: Date;
23345
+ userId: string;
23346
+ expiresAt: Date;
23347
+ token: string;
23348
+ ipAddress?: string | null | undefined;
23349
+ userAgent?: string | null | undefined;
23350
+ activeOrganizationId?: string | null | undefined;
23351
+ local?: boolean | null | undefined;
23352
+ studio?: boolean | null | undefined;
23353
+ };
23354
+ }>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
23355
+ draft: DraftRequest | null;
23356
+ locale: string | undefined;
23357
+ publishingDraft: string | undefined;
23358
+ look: LookGrant | undefined;
23359
+ }>, {
23360
+ db: Database;
23361
+ env: Bindings;
23362
+ headers: Headers;
23363
+ client: string;
23364
+ telemetryDisabled: boolean;
23365
+ waitUntil: (promise: Promise<unknown>) => void;
23366
+ apiOrigin?: string;
23367
+ draft: DraftRequest | null;
23368
+ locale: string | undefined;
23369
+ publishingDraft: string | undefined;
23370
+ look: LookGrant | undefined;
23371
+ user: {
23372
+ id: string;
23373
+ createdAt: Date;
23374
+ updatedAt: Date;
23375
+ email: string;
23376
+ emailVerified: boolean;
23377
+ name: string;
23378
+ image?: string | null | undefined;
23379
+ };
23380
+ session: {
23381
+ id: string;
23382
+ createdAt: Date;
23383
+ updatedAt: Date;
23384
+ userId: string;
23385
+ expiresAt: Date;
23386
+ token: string;
23387
+ ipAddress?: string | null | undefined;
23388
+ userAgent?: string | null | undefined;
23389
+ activeOrganizationId?: string | null | undefined;
23390
+ local?: boolean | null | undefined;
23391
+ studio?: boolean | null | undefined;
23392
+ };
23393
+ }>>, import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<import("@orpc/server").MergedCurrentContext<BaseContext, Record<never, never>>, {
23394
+ draft: DraftRequest | null;
23395
+ locale: string | undefined;
23396
+ publishingDraft: string | undefined;
23397
+ look: LookGrant | undefined;
23398
+ }>, {
23399
+ db: Database;
23400
+ env: Bindings;
23401
+ headers: Headers;
23402
+ client: string;
23403
+ telemetryDisabled: boolean;
23404
+ waitUntil: (promise: Promise<unknown>) => void;
23405
+ apiOrigin?: string;
23406
+ draft: DraftRequest | null;
23407
+ locale: string | undefined;
23408
+ publishingDraft: string | undefined;
23409
+ look: LookGrant | undefined;
23410
+ user: {
23411
+ id: string;
23412
+ createdAt: Date;
23413
+ updatedAt: Date;
23414
+ email: string;
23415
+ emailVerified: boolean;
23416
+ name: string;
23417
+ image?: string | null | undefined;
23418
+ };
23419
+ session: {
23420
+ id: string;
23421
+ createdAt: Date;
23422
+ updatedAt: Date;
23423
+ userId: string;
23424
+ expiresAt: Date;
23425
+ token: string;
23426
+ ipAddress?: string | null | undefined;
23427
+ userAgent?: string | null | undefined;
23428
+ activeOrganizationId?: string | null | undefined;
23429
+ local?: boolean | null | undefined;
23430
+ studio?: boolean | null | undefined;
23431
+ };
23432
+ }>, Record<never, never>>, import("zod").ZodObject<{
23433
+ projectId: import("zod").ZodNumber;
23434
+ lastLook: import("zod").ZodOptional<import("zod").ZodBoolean>;
23435
+ model: import("zod").ZodOptional<import("zod").ZodEnum<{
23436
+ "claude-haiku-5.5": "claude-haiku-5.5";
23437
+ "claude-opus-5.5": "claude-opus-5.5";
23438
+ "claude-sonnet-5.5": "claude-sonnet-5.5";
23439
+ }>>;
23440
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<{
23441
+ lastLook: boolean;
23442
+ model: ArtifactAgentModel;
23443
+ projectId: number;
23444
+ }, {
23445
+ lastLook: boolean;
23446
+ model: ArtifactAgentModel;
23447
+ projectId: number;
23448
+ }>, Record<never, never>, Record<never, never>>;
23449
+ };
22032
23450
  };
22033
23451
  type Router = typeof router;
22034
23452
  //#endregion