@otto-code/protocol 0.6.6 → 0.6.7

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/messages.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { TerminalActivitySchema } from "./terminal-activity.js";
3
- import { RunSchema } from "./orchestration.js";
3
+ import { OrchestrationGraphSchema, RunSchema } from "./orchestration.js";
4
4
  import { ArtifactMetadataSchema } from "./artifacts/types.js";
5
5
  import { ArtifactListRequestSchema, ArtifactCreateRequestSchema, ArtifactUpdateRequestSchema, ArtifactRegenerateRequestSchema, ArtifactCancelRequestSchema, ArtifactDeleteRequestSchema, ArtifactStarRequestSchema, ArtifactGetContentRequestSchema, ArtifactListResponseSchema, ArtifactCreateResponseSchema, ArtifactUpdateResponseSchema, ArtifactRegenerateResponseSchema, ArtifactCancelResponseSchema, ArtifactDeleteResponseSchema, ArtifactStarResponseSchema, ArtifactGetContentResponseSchema, ArtifactCreatedNotificationSchema, ArtifactUpdatedNotificationSchema, ArtifactDeletedNotificationSchema, } from "./artifacts/rpc-schemas.js";
6
6
  import { CLIENT_CAPS } from "./client-capabilities.js";
@@ -372,6 +372,12 @@ export const MutableDaemonConfigSchema = z
372
372
  preferWriterPersonalities: false,
373
373
  }),
374
374
  autoArchiveAfterMerge: z.boolean().default(false),
375
+ // Drop the "Merge into <base>" action from the client's source-control menu
376
+ // (and stop promoting it to the primary CTA) for a pull-request-only
377
+ // workflow. Host-level so the whole team's clients share one policy.
378
+ // Defaults false so a new client parsing an old daemon's config keeps the
379
+ // action visible. Gated by server_info features.hideMergeIntoBaseSetting.
380
+ hideMergeIntoBaseAction: z.boolean().default(false),
375
381
  enableTerminalAgentHooks: z.boolean().default(false),
376
382
  appendSystemPrompt: z.string().default(""),
377
383
  terminalProfiles: z.array(TerminalProfileSchema).optional(),
@@ -412,6 +418,8 @@ export const MutableDaemonConfigPatchSchema = z
412
418
  .optional(),
413
419
  metadataGeneration: MutableMetadataGenerationConfigSchema.partial().optional(),
414
420
  autoArchiveAfterMerge: z.boolean().optional(),
421
+ // Gated by server_info features.hideMergeIntoBaseSetting.
422
+ hideMergeIntoBaseAction: z.boolean().optional(),
415
423
  enableTerminalAgentHooks: z.boolean().optional(),
416
424
  appendSystemPrompt: z.string().optional(),
417
425
  terminalProfiles: z.array(TerminalProfileSchema).optional(),
@@ -1369,6 +1377,35 @@ export const SpeechTtsPreviewRequestSchema = z.object({
1369
1377
  .passthrough()
1370
1378
  .optional(),
1371
1379
  });
1380
+ // Read a full assistant message aloud on demand (the per-message playback
1381
+ // button). Unlike the preview RPC — which truncates to a short sample and
1382
+ // returns one buffered clip — this synthesizes the ENTIRE text and streams it
1383
+ // back as `audio_output` chunks (isVoiceMode: false), one group per sentence, so
1384
+ // playback starts after the first sentence instead of the whole message.
1385
+ // `voice` (optional) is the speaking agent's personality voice, resolved on the
1386
+ // client from the live personality (same soft-binding semantics as the preview
1387
+ // button); absent uses the host default. The correlated response lands once
1388
+ // playback finishes, is canceled, or errors.
1389
+ export const SpeechTtsSpeakRequestSchema = z.object({
1390
+ type: z.literal("speech.tts.speak.request"),
1391
+ requestId: z.string(),
1392
+ text: z.string(),
1393
+ voice: z
1394
+ .object({
1395
+ provider: z.string().optional(),
1396
+ model: z.string().optional(),
1397
+ name: z.string(),
1398
+ })
1399
+ .passthrough()
1400
+ .optional(),
1401
+ });
1402
+ // Stop the session's in-flight message playback (the button's stop press).
1403
+ // Aborts synthesis on the host; the pending speak response then resolves as
1404
+ // canceled and the client flushes its own audio queue.
1405
+ export const SpeechTtsSpeakCancelRequestSchema = z.object({
1406
+ type: z.literal("speech.tts.speak.cancel.request"),
1407
+ requestId: z.string(),
1408
+ });
1372
1409
  // COMPAT(visualizerVoiceCues): added in v0.6.3; gate lives in
1373
1410
  // features.visualizerVoiceCues. Author short spoken "cue" lines for a
1374
1411
  // personality — a handful of variations each for three Visualizer moments
@@ -2368,6 +2405,97 @@ export const RunsClearedNotificationSchema = z.object({
2368
2405
  runIds: z.array(z.string()),
2369
2406
  }),
2370
2407
  });
2408
+ // ── Orchestration graphs (user orchestrations) ──────────────────────────────
2409
+ // Host-level reusable graph templates + user-initiated orchestration start.
2410
+ // Gated by server_info.features.orchestrationGraphs. UI says "Orchestration"
2411
+ // and "Graph"; the wire keeps the short `runs.` namespace (see docs/glossary.md).
2412
+ // See projects/orchestration-graphs.
2413
+ export const RunsGraphsListRequestSchema = z.object({
2414
+ type: z.literal("runs.graphs.list.request"),
2415
+ requestId: z.string(),
2416
+ });
2417
+ export const RunsGraphsListResponseSchema = z.object({
2418
+ type: z.literal("runs.graphs.list.response"),
2419
+ payload: z.object({
2420
+ graphs: z.array(OrchestrationGraphSchema),
2421
+ requestId: z.string(),
2422
+ }),
2423
+ });
2424
+ // Upsert a graph template (create when the id is new). Built-in graphs are
2425
+ // copy-on-edit daemon-side: saving over a builtIn id persists a user copy.
2426
+ export const RunsGraphsSaveRequestSchema = z.object({
2427
+ type: z.literal("runs.graphs.save.request"),
2428
+ graph: OrchestrationGraphSchema,
2429
+ requestId: z.string(),
2430
+ });
2431
+ export const RunsGraphsSaveResponseSchema = z.object({
2432
+ type: z.literal("runs.graphs.save.response"),
2433
+ payload: z.object({
2434
+ graph: OrchestrationGraphSchema.optional(),
2435
+ error: z.string().optional(),
2436
+ requestId: z.string(),
2437
+ }),
2438
+ });
2439
+ export const RunsGraphsDeleteRequestSchema = z.object({
2440
+ type: z.literal("runs.graphs.delete.request"),
2441
+ graphId: z.string(),
2442
+ requestId: z.string(),
2443
+ });
2444
+ export const RunsGraphsDeleteResponseSchema = z.object({
2445
+ type: z.literal("runs.graphs.delete.response"),
2446
+ payload: z.object({
2447
+ deleted: z.boolean(),
2448
+ error: z.string().optional(),
2449
+ requestId: z.string(),
2450
+ }),
2451
+ });
2452
+ // Broadcast after any save/delete so every client's graph cache converges,
2453
+ // mirroring runs.updated.notification's role for runs.
2454
+ export const RunsGraphsChangedNotificationSchema = z.object({
2455
+ type: z.literal("runs.graphs.changed.notification"),
2456
+ payload: z.object({
2457
+ graphs: z.array(OrchestrationGraphSchema),
2458
+ }),
2459
+ });
2460
+ // Start (or draft) a user-initiated orchestration from the New Orchestration
2461
+ // dialog. `flavor` is an open vocabulary: "ai" (prompt-and-go — the daemon
2462
+ // spawns an orchestrator agent that declares its own plan via start_run) or
2463
+ // "graph" (deterministic — the daemon executes `graphId` with `graphInputs`).
2464
+ // `draft: true` creates the record without executing (the designer flow);
2465
+ // `runId` executes an existing draft in place.
2466
+ export const RunsStartRequestSchema = z.object({
2467
+ type: z.literal("runs.start.request"),
2468
+ flavor: z.string(),
2469
+ cwd: z.string(),
2470
+ workspaceId: z.string().optional(),
2471
+ title: z.string().optional(),
2472
+ description: z.string().optional(),
2473
+ // Orchestrator seat when the active team doesn't fill it: a personality, or
2474
+ // a bare provider/model pair.
2475
+ orchestratorPersonalityId: z.string().optional(),
2476
+ orchestratorProvider: z.string().optional(),
2477
+ orchestratorModel: z.string().optional(),
2478
+ orchestratorThinkingOptionId: z.string().optional(),
2479
+ prompt: z.string().optional(),
2480
+ graphId: z.string().optional(),
2481
+ graphInputs: z.record(z.string(), z.string()).optional(),
2482
+ draft: z.boolean().optional(),
2483
+ runId: z.string().optional(),
2484
+ requestId: z.string(),
2485
+ });
2486
+ export const RunsStartResponseSchema = z.object({
2487
+ type: z.literal("runs.start.response"),
2488
+ payload: z.object({
2489
+ runId: z.string().optional(),
2490
+ // The root/orchestrator agent whose chat the client navigates to, and the
2491
+ // workspace the daemon resolved it into (the dialog only knows a project
2492
+ // target's cwd).
2493
+ agentId: z.string().optional(),
2494
+ workspaceId: z.string().optional(),
2495
+ error: z.string().optional(),
2496
+ requestId: z.string(),
2497
+ }),
2498
+ });
2371
2499
  // Namespaced successor to checkout_commit_request: per-file selection and
2372
2500
  // structured errors. Gated by server_info.features.checkoutGitCommit; the flat
2373
2501
  // RPC stays accepted for old clients.
@@ -2733,6 +2861,23 @@ export const ArchiveWorkspaceRequestSchema = z.object({
2733
2861
  type: z.literal("archive_workspace_request"),
2734
2862
  workspaceId: z.string(),
2735
2863
  requestId: z.string(),
2864
+ // COMPAT(worktreeArchiveBranchCleanup): added in v0.6.7, drop the optional
2865
+ // gate when daemon floor >= v0.6.7. Absent means "keep" — the leftover local
2866
+ // branch is never touched (old-client behavior). "delete" asks the daemon to
2867
+ // remove the worktree's local branch after the backing directory is torn down
2868
+ // (only when this was the last reference to it and the branch is not checked
2869
+ // out elsewhere). Gated by server_info.features.worktreeArchiveBranchCleanup.
2870
+ branchDisposition: z.enum(["keep", "delete"]).optional(),
2871
+ });
2872
+ // Read-only pre-archive inspection for a worktree-backed workspace: what branch
2873
+ // it is on, whether that branch is merged into its base, and whether archiving
2874
+ // will actually free the branch (last reference, not checked out elsewhere). The
2875
+ // client uses this to render the "delete the leftover branch?" confirmation.
2876
+ // COMPAT(worktreeArchiveBranchCleanup): added in v0.6.7.
2877
+ export const WorkspaceArchivePreflightRequestSchema = z.object({
2878
+ type: z.literal("workspace.archive.preflight.request"),
2879
+ requestId: z.string(),
2880
+ workspaceId: z.string(),
2736
2881
  });
2737
2882
  // Create a new workspace record. Unlike open_project, this never deduplicates by
2738
2883
  // directory: it always produces a fresh workspace. The source discriminates
@@ -2765,6 +2910,36 @@ export const WorkspaceCreateRequestSchema = z.object({
2765
2910
  }),
2766
2911
  ]),
2767
2912
  });
2913
+ // Re-attach a "left" Otto worktree as a live workspace. Two targets: revive an
2914
+ // archived worktree workspace record in place (recreating its backing directory
2915
+ // from the kept branch when it is gone), or bind a fresh workspace to an orphaned
2916
+ // on-disk Otto worktree that no live workspace references.
2917
+ // COMPAT(worktreeReattach): added in v0.6.7. Gated by server_info.features.worktreeReattach.
2918
+ export const WorktreeReattachTargetSchema = z.discriminatedUnion("kind", [
2919
+ z.object({
2920
+ kind: z.literal("workspace"),
2921
+ workspaceId: z.string(),
2922
+ }),
2923
+ z.object({
2924
+ kind: z.literal("orphan"),
2925
+ worktreePath: z.string(),
2926
+ projectId: z.string().optional(),
2927
+ }),
2928
+ ]);
2929
+ export const WorktreeReattachRequestSchema = z.object({
2930
+ type: z.literal("worktree.reattach.request"),
2931
+ requestId: z.string(),
2932
+ target: WorktreeReattachTargetSchema,
2933
+ });
2934
+ // List re-attachable Otto worktrees for a project/repo: archived worktree
2935
+ // workspace records whose branch is kept, plus orphaned on-disk worktrees with no
2936
+ // live workspace. Either projectId or a cwd inside the repo is required.
2937
+ export const WorktreeReattachListRequestSchema = z.object({
2938
+ type: z.literal("worktree.reattach.list.request"),
2939
+ requestId: z.string(),
2940
+ projectId: z.string().optional(),
2941
+ cwd: z.string().optional(),
2942
+ });
2768
2943
  export const WorkspaceClearAttentionRequestSchema = z.object({
2769
2944
  type: z.literal("workspace.clear_attention.request"),
2770
2945
  workspaceId: z.union([z.string(), z.array(z.string())]),
@@ -3108,6 +3283,8 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
3108
3283
  SetDaemonConfigRequestMessageSchema,
3109
3284
  SpeechSettingsGetOptionsRequestSchema,
3110
3285
  SpeechTtsPreviewRequestSchema,
3286
+ SpeechTtsSpeakRequestSchema,
3287
+ SpeechTtsSpeakCancelRequestSchema,
3111
3288
  VisualizerVoiceCuesGenerateRequestSchema,
3112
3289
  AgentPersonalitiesGetStatsRequestSchema,
3113
3290
  ReadProjectConfigRequestMessageSchema,
@@ -3169,6 +3346,10 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
3169
3346
  RunsGateRespondRequestSchema,
3170
3347
  RunsCancelRequestSchema,
3171
3348
  RunsClearRequestSchema,
3349
+ RunsGraphsListRequestSchema,
3350
+ RunsGraphsSaveRequestSchema,
3351
+ RunsGraphsDeleteRequestSchema,
3352
+ RunsStartRequestSchema,
3172
3353
  CheckoutMergeRequestSchema,
3173
3354
  CheckoutMergeFromBaseRequestSchema,
3174
3355
  CheckoutPullRequestSchema,
@@ -3204,6 +3385,9 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
3204
3385
  OpenProjectRequestSchema,
3205
3386
  ProjectAddRequestSchema,
3206
3387
  ArchiveWorkspaceRequestSchema,
3388
+ WorkspaceArchivePreflightRequestSchema,
3389
+ WorktreeReattachListRequestSchema,
3390
+ WorktreeReattachRequestSchema,
3207
3391
  WorkspaceCreateRequestSchema,
3208
3392
  WorkspaceClearAttentionRequestSchema,
3209
3393
  FileExplorerRequestSchema,
@@ -3476,6 +3660,9 @@ export const ServerInfoStatusPayloadSchema = z
3476
3660
  agentPersonalities: z.boolean().optional(),
3477
3661
  // COMPAT(ttsPreview): added in v0.4.7, drop the gate when daemon floor >= v0.4.7.
3478
3662
  ttsPreview: z.boolean().optional(),
3663
+ // COMPAT(ttsSpeak): added in v0.6.7, drop the gate when daemon floor >= v0.6.7.
3664
+ // Host can stream a full message aloud on demand (per-message playback).
3665
+ ttsSpeak: z.boolean().optional(),
3479
3666
  // COMPAT(visualizerVoiceCues): added in v0.6.3, drop the gate when daemon floor >= v0.6.3.
3480
3667
  visualizerVoiceCues: z.boolean().optional(),
3481
3668
  // COMPAT(setAgentPersonality): added in v0.5.0, drop the gate when daemon floor >= v0.5.0.
@@ -3494,6 +3681,21 @@ export const ServerInfoStatusPayloadSchema = z
3494
3681
  // once.
3495
3682
  // COMPAT(checkoutGitFileHistory): added in v0.6.6, drop the gate when daemon floor >= v0.6.6.
3496
3683
  checkoutGitFileHistory: z.boolean().optional(),
3684
+ // Set when the daemon can inspect a worktree's leftover branch before
3685
+ // archiving (workspace.archive.preflight.*) and delete it as part of the
3686
+ // archive (archive_workspace_request.branchDisposition). Without it the
3687
+ // client archives the worktree exactly as before and never offers to
3688
+ // remove the branch — no degraded client-side branch detection exists.
3689
+ // COMPAT(worktreeArchiveBranchCleanup): added in v0.6.7, drop the gate when daemon floor >= v0.6.7.
3690
+ worktreeArchiveBranchCleanup: z.boolean().optional(),
3691
+ // COMPAT(worktreeReattach): added in v0.6.7, drop the gate when daemon floor >= v0.6.7.
3692
+ worktreeReattach: z.boolean().optional(),
3693
+ // Set when the daemon persists the host-level hideMergeIntoBaseAction
3694
+ // workspace policy (read/written via the daemon config RPCs). Without
3695
+ // it the client hides the Workspaces toggle, since patching the field
3696
+ // on an old daemon would silently fail to stick.
3697
+ // COMPAT(hideMergeIntoBaseSetting): added in v0.6.7, drop the gate when daemon floor >= v0.6.7.
3698
+ hideMergeIntoBaseSetting: z.boolean().optional(),
3497
3699
  // COMPAT(agentTeams): added in v0.5.2, drop the gate when daemon floor >= v0.5.2.
3498
3700
  agentTeams: z.boolean().optional(),
3499
3701
  // COMPAT(modelTierOverrides): added in v0.5.2, drop the gate when daemon floor >= v0.5.2.
@@ -3506,6 +3708,8 @@ export const ServerInfoStatusPayloadSchema = z
3506
3708
  activityStats: z.boolean().optional(),
3507
3709
  // COMPAT(runsClear): added in v0.5.3, drop the gate when daemon floor >= v0.5.3.
3508
3710
  runsClear: z.boolean().optional(),
3711
+ // COMPAT(orchestrationGraphs): added in v0.6.7, drop the gate when daemon floor >= v0.6.7.
3712
+ orchestrationGraphs: z.boolean().optional(),
3509
3713
  // COMPAT(projectLinks): added in v0.5.6, drop the gate when daemon floor >= v0.5.6.
3510
3714
  projectLinks: z.boolean().optional(),
3511
3715
  // COMPAT(fileOutsideWorkspace): added in v0.5.8, drop the gate when daemon floor >= v0.5.8.
@@ -4052,6 +4256,79 @@ export const ArchiveWorkspaceResponseMessageSchema = z.object({
4052
4256
  workspaceId: z.string(),
4053
4257
  archivedAt: z.string().nullable(),
4054
4258
  error: z.string().nullable(),
4259
+ // COMPAT(worktreeArchiveBranchCleanup): added in v0.6.7. The name of the
4260
+ // local branch the daemon deleted as part of this archive (when the request
4261
+ // asked for branchDisposition: "delete" and the branch was actually
4262
+ // removed), else null/absent. Old daemons omit it.
4263
+ deletedBranch: z.string().nullable().optional(),
4264
+ }),
4265
+ });
4266
+ // Whether/how a worktree-backed workspace's local branch can be cleaned up when
4267
+ // the workspace is archived. See WorkspaceArchivePreflightRequestSchema.
4268
+ export const WorktreeArchiveBranchDetectionSchema = z.object({
4269
+ // True only for Otto-owned worktrees whose branch we can offer to delete.
4270
+ // False for local checkouts, plain directories, and non-owned worktrees — the
4271
+ // client then skips the branch-cleanup UI entirely.
4272
+ isOttoWorktree: z.boolean(),
4273
+ // The local branch checked out in the worktree, or null when detached/unknown.
4274
+ branchName: z.string().nullable(),
4275
+ // The base ref the branch was created from (origin/ stripped), or null.
4276
+ baseBranch: z.string().nullable(),
4277
+ mergeState: z.enum(["merged", "unmerged", "unknown"]),
4278
+ // Commits on the branch not contained in the base ref; null when unknown.
4279
+ unmergedCommitCount: z.number().int().nonnegative().nullable(),
4280
+ // A matching origin/<branch> exists — deleting the local branch keeps the
4281
+ // remote copy. Purely informational for the confirmation copy.
4282
+ hasRemoteBranch: z.boolean(),
4283
+ // The branch is checked out in another worktree too, so git will refuse to
4284
+ // delete it even after this worktree is removed. The client hides the option.
4285
+ branchCheckedOutElsewhere: z.boolean(),
4286
+ // Archiving will actually remove the backing directory (this is the last
4287
+ // active workspace referencing it). Branch cleanup is only offered when true.
4288
+ directoryWillBeRemoved: z.boolean(),
4289
+ });
4290
+ export const WorkspaceArchivePreflightResponseSchema = z.object({
4291
+ type: z.literal("workspace.archive.preflight.response"),
4292
+ payload: z.object({
4293
+ requestId: z.string(),
4294
+ workspaceId: z.string(),
4295
+ // Null when detection failed (see error) or the workspace is gone.
4296
+ detection: WorktreeArchiveBranchDetectionSchema.nullable(),
4297
+ error: z.string().nullable(),
4298
+ }),
4299
+ });
4300
+ // A re-attachable Otto worktree surfaced by worktree.reattach.list.
4301
+ // COMPAT(worktreeReattach): added in v0.6.7.
4302
+ export const WorktreeReattachCandidateSchema = z.object({
4303
+ // Present when an archived workspace record still backs this worktree; null for
4304
+ // an orphaned on-disk worktree with no record. The reattach request keys off
4305
+ // whichever identity is available.
4306
+ workspaceId: z.string().nullable(),
4307
+ worktreePath: z.string(),
4308
+ branchName: z.string().nullable(),
4309
+ baseBranch: z.string().nullable(),
4310
+ // The worktree directory currently exists on disk. False means the record was
4311
+ // archived away and the directory must be recreated from the branch on reattach.
4312
+ directoryOnDisk: z.boolean(),
4313
+ // The workspace's human name when we have a record, else null.
4314
+ displayName: z.string().nullable(),
4315
+ archivedAt: z.string().nullable(),
4316
+ });
4317
+ export const WorktreeReattachListResponseSchema = z.object({
4318
+ type: z.literal("worktree.reattach.list.response"),
4319
+ payload: z.object({
4320
+ requestId: z.string(),
4321
+ candidates: z.array(WorktreeReattachCandidateSchema),
4322
+ error: z.string().nullable(),
4323
+ }),
4324
+ });
4325
+ export const WorktreeReattachResponseSchema = z.object({
4326
+ type: z.literal("worktree.reattach.response"),
4327
+ payload: z.object({
4328
+ requestId: z.string(),
4329
+ // The revived/created workspace descriptor, or null on error.
4330
+ workspace: WorkspaceDescriptorPayloadSchema.nullable(),
4331
+ error: z.string().nullable(),
4055
4332
  }),
4056
4333
  });
4057
4334
  export const FetchAgentResponseMessageSchema = z.object({
@@ -4243,6 +4520,23 @@ export const SpeechTtsPreviewResponseSchema = z.object({
4243
4520
  })
4244
4521
  .passthrough(),
4245
4522
  });
4523
+ export const SpeechTtsSpeakResponseSchema = z.object({
4524
+ type: z.literal("speech.tts.speak.response"),
4525
+ payload: z
4526
+ .object({
4527
+ requestId: z.string(),
4528
+ // True when the full message played to completion; absent/false when it was
4529
+ // canceled or produced no audio. `error` carries a human-readable failure.
4530
+ ok: z.boolean().optional(),
4531
+ canceled: z.boolean().optional(),
4532
+ error: z.string().optional(),
4533
+ })
4534
+ .passthrough(),
4535
+ });
4536
+ export const SpeechTtsSpeakCancelResponseSchema = z.object({
4537
+ type: z.literal("speech.tts.speak.cancel.response"),
4538
+ payload: z.object({ requestId: z.string() }).passthrough(),
4539
+ });
4246
4540
  export const VisualizerVoiceCuesGenerateResponseSchema = z.object({
4247
4541
  type: z.literal("visualizer.voiceCues.generate.response"),
4248
4542
  payload: z
@@ -5824,6 +6118,9 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
5824
6118
  LegacyListAvailableEditorsResponseMessageSchema,
5825
6119
  LegacyOpenInEditorResponseMessageSchema,
5826
6120
  ArchiveWorkspaceResponseMessageSchema,
6121
+ WorkspaceArchivePreflightResponseSchema,
6122
+ WorktreeReattachListResponseSchema,
6123
+ WorktreeReattachResponseSchema,
5827
6124
  FetchAgentResponseMessageSchema,
5828
6125
  FetchAgentTimelineResponseMessageSchema,
5829
6126
  AgentForkContextResponseMessageSchema,
@@ -5840,6 +6137,8 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
5840
6137
  SetDaemonConfigResponseMessageSchema,
5841
6138
  SpeechSettingsGetOptionsResponseSchema,
5842
6139
  SpeechTtsPreviewResponseSchema,
6140
+ SpeechTtsSpeakResponseSchema,
6141
+ SpeechTtsSpeakCancelResponseSchema,
5843
6142
  VisualizerVoiceCuesGenerateResponseSchema,
5844
6143
  AgentPersonalitiesGetStatsResponseSchema,
5845
6144
  ReadProjectConfigResponseMessageSchema,
@@ -5893,6 +6192,11 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
5893
6192
  RunsCancelResponseSchema,
5894
6193
  RunsClearResponseSchema,
5895
6194
  RunsClearedNotificationSchema,
6195
+ RunsGraphsListResponseSchema,
6196
+ RunsGraphsSaveResponseSchema,
6197
+ RunsGraphsDeleteResponseSchema,
6198
+ RunsGraphsChangedNotificationSchema,
6199
+ RunsStartResponseSchema,
5896
6200
  CheckoutMergeResponseSchema,
5897
6201
  CheckoutMergeFromBaseResponseSchema,
5898
6202
  CheckoutPullResponseSchema,
@@ -6,7 +6,7 @@ export declare function isRunPhaseType(value: string): value is RunPhaseType;
6
6
  export declare function defaultRoleForPhaseType(type: RunPhaseType): string | null;
7
7
  export declare const RUN_PHASE_STATUSES: readonly ["pending", "running", "blocked", "done", "failed", "skipped"];
8
8
  export type RunPhaseStatus = (typeof RUN_PHASE_STATUSES)[number];
9
- export declare const RUN_STATUSES: readonly ["pending", "running", "paused", "done", "failed", "canceled"];
9
+ export declare const RUN_STATUSES: readonly ["draft", "pending", "running", "paused", "done", "failed", "canceled"];
10
10
  export type RunStatus = (typeof RUN_STATUSES)[number];
11
11
  export declare function isRunPhaseStatus(value: string): value is RunPhaseStatus;
12
12
  export declare function isRunStatus(value: string): value is RunStatus;
@@ -102,7 +102,11 @@ export type RunPhase = z.infer<typeof RunPhaseSchema>;
102
102
  export declare const RunSchema: z.ZodObject<{
103
103
  id: z.ZodString;
104
104
  title: z.ZodString;
105
+ description: z.ZodOptional<z.ZodString>;
105
106
  status: z.ZodString;
107
+ kind: z.ZodOptional<z.ZodString>;
108
+ graphId: z.ZodOptional<z.ZodString>;
109
+ graphInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
106
110
  requirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
107
111
  autopilot: z.ZodOptional<z.ZodBoolean>;
108
112
  phases: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -149,4 +153,98 @@ export declare const RunSchema: z.ZodObject<{
149
153
  export type Run = z.infer<typeof RunSchema>;
150
154
  export declare const RUN_SUMMARY_STATUSES: readonly ["pending", "ready", "failed"];
151
155
  export type RunSummaryStatus = (typeof RUN_SUMMARY_STATUSES)[number];
156
+ export declare const GraphInputSchema: z.ZodObject<{
157
+ key: z.ZodString;
158
+ label: z.ZodString;
159
+ description: z.ZodOptional<z.ZodString>;
160
+ multiline: z.ZodOptional<z.ZodBoolean>;
161
+ required: z.ZodOptional<z.ZodBoolean>;
162
+ defaultValue: z.ZodOptional<z.ZodString>;
163
+ }, z.core.$loose>;
164
+ export type GraphInput = z.infer<typeof GraphInputSchema>;
165
+ export declare const GRAPH_NODE_KINDS: readonly ["orchestrator", "agent"];
166
+ export type GraphNodeKind = (typeof GRAPH_NODE_KINDS)[number];
167
+ export declare const GraphNodeLoopSchema: z.ZodObject<{
168
+ times: z.ZodOptional<z.ZodNumber>;
169
+ until: z.ZodOptional<z.ZodObject<{
170
+ criteria: z.ZodArray<z.ZodString>;
171
+ judgeRole: z.ZodOptional<z.ZodString>;
172
+ max: z.ZodNumber;
173
+ }, z.core.$loose>>;
174
+ }, z.core.$loose>;
175
+ export type GraphNodeLoop = z.infer<typeof GraphNodeLoopSchema>;
176
+ export declare const GraphNodeSchema: z.ZodObject<{
177
+ id: z.ZodString;
178
+ kind: z.ZodString;
179
+ title: z.ZodString;
180
+ role: z.ZodOptional<z.ZodString>;
181
+ prompt: z.ZodOptional<z.ZodString>;
182
+ promptFromInput: z.ZodOptional<z.ZodString>;
183
+ autonomous: z.ZodOptional<z.ZodBoolean>;
184
+ loop: z.ZodOptional<z.ZodObject<{
185
+ times: z.ZodOptional<z.ZodNumber>;
186
+ until: z.ZodOptional<z.ZodObject<{
187
+ criteria: z.ZodArray<z.ZodString>;
188
+ judgeRole: z.ZodOptional<z.ZodString>;
189
+ max: z.ZodNumber;
190
+ }, z.core.$loose>>;
191
+ }, z.core.$loose>>;
192
+ model: z.ZodOptional<z.ZodString>;
193
+ position: z.ZodOptional<z.ZodObject<{
194
+ x: z.ZodNumber;
195
+ y: z.ZodNumber;
196
+ }, z.core.$loose>>;
197
+ }, z.core.$loose>;
198
+ export type GraphNode = z.infer<typeof GraphNodeSchema>;
199
+ export declare const GraphEdgeSchema: z.ZodObject<{
200
+ id: z.ZodOptional<z.ZodString>;
201
+ from: z.ZodString;
202
+ to: z.ZodString;
203
+ }, z.core.$loose>;
204
+ export type GraphEdge = z.infer<typeof GraphEdgeSchema>;
205
+ export declare const OrchestrationGraphSchema: z.ZodObject<{
206
+ id: z.ZodString;
207
+ name: z.ZodString;
208
+ description: z.ZodOptional<z.ZodString>;
209
+ inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
210
+ key: z.ZodString;
211
+ label: z.ZodString;
212
+ description: z.ZodOptional<z.ZodString>;
213
+ multiline: z.ZodOptional<z.ZodBoolean>;
214
+ required: z.ZodOptional<z.ZodBoolean>;
215
+ defaultValue: z.ZodOptional<z.ZodString>;
216
+ }, z.core.$loose>>>;
217
+ nodes: z.ZodArray<z.ZodObject<{
218
+ id: z.ZodString;
219
+ kind: z.ZodString;
220
+ title: z.ZodString;
221
+ role: z.ZodOptional<z.ZodString>;
222
+ prompt: z.ZodOptional<z.ZodString>;
223
+ promptFromInput: z.ZodOptional<z.ZodString>;
224
+ autonomous: z.ZodOptional<z.ZodBoolean>;
225
+ loop: z.ZodOptional<z.ZodObject<{
226
+ times: z.ZodOptional<z.ZodNumber>;
227
+ until: z.ZodOptional<z.ZodObject<{
228
+ criteria: z.ZodArray<z.ZodString>;
229
+ judgeRole: z.ZodOptional<z.ZodString>;
230
+ max: z.ZodNumber;
231
+ }, z.core.$loose>>;
232
+ }, z.core.$loose>>;
233
+ model: z.ZodOptional<z.ZodString>;
234
+ position: z.ZodOptional<z.ZodObject<{
235
+ x: z.ZodNumber;
236
+ y: z.ZodNumber;
237
+ }, z.core.$loose>>;
238
+ }, z.core.$loose>>;
239
+ edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
240
+ id: z.ZodOptional<z.ZodString>;
241
+ from: z.ZodString;
242
+ to: z.ZodString;
243
+ }, z.core.$loose>>>;
244
+ builtIn: z.ZodOptional<z.ZodBoolean>;
245
+ createdAt: z.ZodOptional<z.ZodString>;
246
+ updatedAt: z.ZodOptional<z.ZodString>;
247
+ }, z.core.$loose>;
248
+ export type OrchestrationGraph = z.infer<typeof OrchestrationGraphSchema>;
249
+ export declare function validateOrchestrationGraph(graph: OrchestrationGraph): string[];
152
250
  //# sourceMappingURL=orchestration.d.ts.map