@otto-code/protocol 0.5.4 → 0.5.6

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
@@ -796,7 +796,7 @@ export const AgentSnapshotPayloadSchema = z.object({
796
796
  // cost-less local models. Observed subagents source it from the provider's
797
797
  // per-task usage.total_tokens (already cumulative-per-subagent). Purely
798
798
  // additive; absent ⇒ no readout. Old clients ignore it.
799
- // See projects/subagents-cleanup/subagents-cleanup.md (Item 3).
799
+ // See docs/agent-lifecycle.md (Item 3).
800
800
  cumulativeTokens: z.number().optional(),
801
801
  lastError: z.string().optional(),
802
802
  title: z.string().nullable(),
@@ -815,17 +815,17 @@ export const AgentSnapshotPayloadSchema = z.object({
815
815
  // Spinner colors from the Agent Personality this agent was spawned from, so
816
816
  // its live thinking indicator renders in the personality's identity. Absent ⇒
817
817
  // the client falls back to the theme's default spinner colors. Purely additive
818
- // (no daemon floor needed). See projects/agent-personalities/.
818
+ // (no daemon floor needed). See docs/agent-personalities.md.
819
819
  personalitySpinner: AgentPersonalitySpinnerSchema.optional(),
820
820
  // Name of the Agent Personality this agent was spawned from, so the running
821
821
  // agent's controls keep showing the personality identity (trigger label +
822
822
  // effort hidden) instead of reverting to the raw model. Absent ⇒ no bound
823
- // personality. Purely additive. See projects/agent-personalities/.
823
+ // personality. Purely additive. See docs/agent-personalities.md.
824
824
  personalityName: z.string().optional(),
825
825
  // Stable id of the bound Agent Personality. The client keys roster selection
826
826
  // on this (names can be renamed/duplicated); personalityName remains for
827
827
  // display and as the selection fallback against daemons that predate this
828
- // field. Purely additive. See projects/agent-personalities/.
828
+ // field. Purely additive. See docs/agent-personalities.md.
829
829
  personalityId: z.string().optional(),
830
830
  });
831
831
  export const AgentListItemPayloadSchema = z.object({
@@ -917,6 +917,30 @@ export const ProjectRemoveRequestSchema = z.object({
917
917
  projectId: z.string(),
918
918
  requestId: z.string(),
919
919
  });
920
+ // An unordered pair of linked projects. The daemon stores the pair in a
921
+ // canonical order, but clients treat it as undirected: a link between A and B
922
+ // permits opening files across both projects. See the gated-multi-root project.
923
+ export const ProjectLinkSchema = z.object({
924
+ projectAId: z.string(),
925
+ projectBId: z.string(),
926
+ });
927
+ export const ProjectLinksListRequestSchema = z.object({
928
+ type: z.literal("project.links.list.request"),
929
+ requestId: z.string(),
930
+ });
931
+ export const ProjectLinksSetRequestSchema = z.object({
932
+ type: z.literal("project.links.set.request"),
933
+ // Order is irrelevant; the daemon canonicalizes. Linking is idempotent.
934
+ projectId: z.string(),
935
+ otherProjectId: z.string(),
936
+ requestId: z.string(),
937
+ });
938
+ export const ProjectLinksUnsetRequestSchema = z.object({
939
+ type: z.literal("project.links.unset.request"),
940
+ projectId: z.string(),
941
+ otherProjectId: z.string(),
942
+ requestId: z.string(),
943
+ });
920
944
  export const WorkspaceTitleSetRequestSchema = z.object({
921
945
  type: z.literal("workspace.title.set.request"),
922
946
  workspaceId: z.string(),
@@ -1546,6 +1570,71 @@ export const AgentBackgroundTaskClearResponseMessageSchema = z.object({
1546
1570
  type: z.literal("agent.background_task.clear.response"),
1547
1571
  payload: AgentActionResponsePayloadSchema,
1548
1572
  });
1573
+ // A suggested task an agent surfaced via the `spawn_task` tool (Claude Desktop
1574
+ // parity). Renders as a chip in the parent agent's session; the user starts it
1575
+ // (new worktree / local / this session) or dismisses it. The `prompt` is
1576
+ // deliberately NOT part of this wire shape — it stays server-side and is only
1577
+ // used when the task is started ("not shown directly" in Claude Desktop).
1578
+ // COMPAT(suggestedTasks): added in v0.5.6, drop the gate when daemon floor >= v0.5.6.
1579
+ export const SuggestedTaskStateSchema = z.enum(["pending", "started", "dismissed"]);
1580
+ export const SuggestedTaskInfoSchema = z.object({
1581
+ taskId: z.string(),
1582
+ parentAgentId: z.string(),
1583
+ title: z.string(),
1584
+ tldr: z.string(),
1585
+ cwd: z.string().optional(),
1586
+ state: SuggestedTaskStateSchema,
1587
+ createdAt: z.string(),
1588
+ updatedAt: z.string(),
1589
+ });
1590
+ // Pushed with the full current set of pending suggested tasks for a parent
1591
+ // agent whenever any of them changes (spawn/start/dismiss) — same full-list
1592
+ // reconciliation shape as BackgroundShellTasksChangedSchema.
1593
+ export const SuggestedTasksChangedSchema = z.object({
1594
+ type: z.literal("suggested_tasks_changed"),
1595
+ payload: z.object({
1596
+ parentAgentId: z.string(),
1597
+ tasks: z.array(SuggestedTaskInfoSchema),
1598
+ }),
1599
+ });
1600
+ // Aggregate outcome for a start/dismiss over one or more tasks. `succeeded`/
1601
+ // `failed` count the tasks acted on so the client can report "Started 3 tasks";
1602
+ // `error` collects any per-task failure messages (the failed tasks' chips stay).
1603
+ const SuggestedTaskActionResponsePayloadSchema = z.object({
1604
+ requestId: z.string(),
1605
+ parentAgentId: z.string(),
1606
+ accepted: z.boolean(),
1607
+ succeeded: z.number(),
1608
+ failed: z.number(),
1609
+ error: z.string().nullable(),
1610
+ });
1611
+ // Start one or more suggested tasks, applying the SAME mode to each — no
1612
+ // combining. `worktree` spins a new worktree-backed workspace per task, `local`
1613
+ // a new session in the same repo/cwd per task, `in_session` steers the parent
1614
+ // agent with the task prompt. The daemon resolves the parent agent's brain
1615
+ // (provider/model/personality) so a started task continues the suggesting agent.
1616
+ export const TasksSuggestedStartModeSchema = z.enum(["worktree", "local", "in_session"]);
1617
+ export const TasksSuggestedStartRequestMessageSchema = z.object({
1618
+ type: z.literal("tasks.suggested.start.request"),
1619
+ parentAgentId: z.string(),
1620
+ taskIds: z.array(z.string()),
1621
+ mode: TasksSuggestedStartModeSchema,
1622
+ requestId: z.string(),
1623
+ });
1624
+ export const TasksSuggestedStartResponseMessageSchema = z.object({
1625
+ type: z.literal("tasks.suggested.start.response"),
1626
+ payload: SuggestedTaskActionResponsePayloadSchema,
1627
+ });
1628
+ export const TasksSuggestedDismissRequestMessageSchema = z.object({
1629
+ type: z.literal("tasks.suggested.dismiss.request"),
1630
+ parentAgentId: z.string(),
1631
+ taskIds: z.array(z.string()),
1632
+ requestId: z.string(),
1633
+ });
1634
+ export const TasksSuggestedDismissResponseMessageSchema = z.object({
1635
+ type: z.literal("tasks.suggested.dismiss.response"),
1636
+ payload: SuggestedTaskActionResponsePayloadSchema,
1637
+ });
1549
1638
  // Switch a running agent to an Agent Personality (or clear with null). The
1550
1639
  // daemon re-resolves the id against the roster + the agent's cwd provider
1551
1640
  // snapshot and applies the full personality live — system prompt, identity
@@ -1606,6 +1695,39 @@ export const ProjectRemoveResponseSchema = z.object({
1606
1695
  type: z.literal("project.remove.response"),
1607
1696
  payload: ProjectRemoveResponsePayloadSchema,
1608
1697
  });
1698
+ export const ProjectLinksListResponsePayloadSchema = z.object({
1699
+ requestId: z.string(),
1700
+ links: z.array(ProjectLinkSchema).default([]),
1701
+ error: z.string().nullable(),
1702
+ });
1703
+ export const ProjectLinksListResponseSchema = z.object({
1704
+ type: z.literal("project.links.list.response"),
1705
+ payload: ProjectLinksListResponsePayloadSchema,
1706
+ });
1707
+ export const ProjectLinksMutationResponsePayloadSchema = z.object({
1708
+ requestId: z.string(),
1709
+ accepted: z.boolean(),
1710
+ // The full link set after the mutation, so the client refreshes in one hop.
1711
+ links: z.array(ProjectLinkSchema).default([]),
1712
+ error: z.string().nullable(),
1713
+ });
1714
+ export const ProjectLinksSetResponseSchema = z.object({
1715
+ type: z.literal("project.links.set.response"),
1716
+ payload: ProjectLinksMutationResponsePayloadSchema,
1717
+ });
1718
+ export const ProjectLinksUnsetResponseSchema = z.object({
1719
+ type: z.literal("project.links.unset.response"),
1720
+ payload: ProjectLinksMutationResponsePayloadSchema,
1721
+ });
1722
+ // Pushed to the session whenever the link set changes (mutation or cascade on
1723
+ // project removal) so open UIs re-evaluate cross-project access without polling.
1724
+ export const ProjectLinksChangedPayloadSchema = z.object({
1725
+ links: z.array(ProjectLinkSchema).default([]),
1726
+ });
1727
+ export const ProjectLinksChangedSchema = z.object({
1728
+ type: z.literal("project.links.changed"),
1729
+ payload: ProjectLinksChangedPayloadSchema,
1730
+ });
1609
1731
  export const WorkspaceTitleSetResponsePayloadSchema = z.object({
1610
1732
  requestId: z.string(),
1611
1733
  workspaceId: z.string(),
@@ -1818,6 +1940,10 @@ export const CheckoutGitRollbackRequestSchema = z.object({
1818
1940
  cwd: z.string(),
1819
1941
  // Repo-relative paths whose uncommitted changes should be discarded.
1820
1942
  paths: z.array(z.string()),
1943
+ // Set after the user confirms rolling back while agents are running in this
1944
+ // workspace; without it the daemon refuses with kind "agents_running", since
1945
+ // discarding a live agent's uncommitted edits mid-run can destroy its work.
1946
+ allowWithRunningAgents: z.boolean().optional(),
1821
1947
  requestId: z.string(),
1822
1948
  });
1823
1949
  export const CheckoutMergeRequestSchema = z.object({
@@ -2457,6 +2583,9 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
2457
2583
  UpdateAgentRequestMessageSchema,
2458
2584
  ProjectRenameRequestSchema,
2459
2585
  ProjectRemoveRequestSchema,
2586
+ ProjectLinksListRequestSchema,
2587
+ ProjectLinksSetRequestSchema,
2588
+ ProjectLinksUnsetRequestSchema,
2460
2589
  WorkspaceTitleSetRequestSchema,
2461
2590
  SetVoiceModeMessageSchema,
2462
2591
  SendAgentMessageRequestSchema,
@@ -2503,6 +2632,8 @@ export const SessionInboundMessageSchema = z.discriminatedUnion("type", [
2503
2632
  AgentSubagentStopRequestMessageSchema,
2504
2633
  AgentBackgroundTaskStopRequestMessageSchema,
2505
2634
  AgentBackgroundTaskClearRequestMessageSchema,
2635
+ TasksSuggestedStartRequestMessageSchema,
2636
+ TasksSuggestedDismissRequestMessageSchema,
2506
2637
  AgentPersonalitySetRequestMessageSchema,
2507
2638
  AgentRewindRequestMessageSchema,
2508
2639
  AgentPermissionResponseMessageSchema,
@@ -2796,6 +2927,8 @@ export const ServerInfoStatusPayloadSchema = z
2796
2927
  observedSubagents: z.boolean().optional(),
2797
2928
  // COMPAT(backgroundShellTasks): added in v0.5.3, drop the gate when daemon floor >= v0.5.3.
2798
2929
  backgroundShellTasks: z.boolean().optional(),
2930
+ // COMPAT(suggestedTasks): added in v0.5.6, drop the gate when daemon floor >= v0.5.6.
2931
+ suggestedTasks: z.boolean().optional(),
2799
2932
  // COMPAT(textEditor): added in v0.4.4, drop the gate when daemon floor >= v0.4.4.
2800
2933
  textEditor: z.boolean().optional(),
2801
2934
  // COMPAT(projectSearch): added in v0.4.4, drop the gate when daemon floor >= v0.4.4.
@@ -2832,6 +2965,8 @@ export const ServerInfoStatusPayloadSchema = z
2832
2965
  activityStats: z.boolean().optional(),
2833
2966
  // COMPAT(runsClear): added in v0.5.3, drop the gate when daemon floor >= v0.5.3.
2834
2967
  runsClear: z.boolean().optional(),
2968
+ // COMPAT(projectLinks): added in v0.5.6, drop the gate when daemon floor >= v0.5.6.
2969
+ projectLinks: z.boolean().optional(),
2835
2970
  })
2836
2971
  .optional(),
2837
2972
  })
@@ -3392,7 +3527,7 @@ export const CancelAgentResponseMessageSchema = z.object({
3392
3527
  // Whether an in-flight run was actually interrupted. False when the agent
3393
3528
  // had nothing running (already finished, still initializing), so clients
3394
3529
  // can say "nothing to stop" instead of silently no-oping. Purely additive;
3395
- // absent ⇒ unknown (old daemon). See projects/subagents-cleanup/subagents-cleanup.md (Item 2).
3530
+ // absent ⇒ unknown (old daemon). See docs/agent-lifecycle.md (Item 2).
3396
3531
  cancelled: z.boolean().optional(),
3397
3532
  }),
3398
3533
  });
@@ -3951,6 +4086,13 @@ export const CheckoutGitRollbackErrorSchema = z.discriminatedUnion("kind", [
3951
4086
  kind: z.literal("git_failed"),
3952
4087
  detail: z.string(),
3953
4088
  }),
4089
+ // Refused because agents are running in this workspace; discarding their
4090
+ // uncommitted edits mid-run risks destroying work. The client re-sends with
4091
+ // allowWithRunningAgents after confirming, mirroring the commit flow.
4092
+ z.object({
4093
+ kind: z.literal("agents_running"),
4094
+ agents: z.array(CheckoutGitCommitRunningAgentSchema),
4095
+ }),
3954
4096
  ]);
3955
4097
  export const CheckoutGitRollbackResponseSchema = z.object({
3956
4098
  type: z.literal("checkout.git.rollback.response"),
@@ -4989,11 +5131,18 @@ export const SessionOutboundMessageSchema = z.discriminatedUnion("type", [
4989
5131
  AgentBackgroundTaskStopResponseMessageSchema,
4990
5132
  AgentBackgroundTaskClearResponseMessageSchema,
4991
5133
  BackgroundShellTasksChangedSchema,
5134
+ TasksSuggestedStartResponseMessageSchema,
5135
+ TasksSuggestedDismissResponseMessageSchema,
5136
+ SuggestedTasksChangedSchema,
4992
5137
  AgentPersonalitySetResponseMessageSchema,
4993
5138
  AgentRewindResponseMessageSchema,
4994
5139
  UpdateAgentResponseMessageSchema,
4995
5140
  ProjectRenameResponseSchema,
4996
5141
  ProjectRemoveResponseSchema,
5142
+ ProjectLinksListResponseSchema,
5143
+ ProjectLinksSetResponseSchema,
5144
+ ProjectLinksUnsetResponseSchema,
5145
+ ProjectLinksChangedSchema,
4997
5146
  WorkspaceTitleSetResponseSchema,
4998
5147
  WaitForFinishResponseMessageSchema,
4999
5148
  AgentPermissionRequestMessageSchema,
@@ -175,6 +175,9 @@ export declare const ScheduleCreateResponseSchema: z.ZodObject<{
175
175
  succeeded: "succeeded";
176
176
  }>>>;
177
177
  lastRunError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
178
+ lastRunPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
+ lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
+ lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
178
181
  pausedAt: z.ZodNullable<z.ZodString>;
179
182
  expiresAt: z.ZodNullable<z.ZodString>;
180
183
  maxRuns: z.ZodNullable<z.ZodNumber>;
@@ -243,6 +246,9 @@ export declare const ScheduleListResponseSchema: z.ZodObject<{
243
246
  succeeded: "succeeded";
244
247
  }>>>;
245
248
  lastRunError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
249
+ lastRunPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
250
+ lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
251
+ lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
246
252
  pausedAt: z.ZodNullable<z.ZodString>;
247
253
  expiresAt: z.ZodNullable<z.ZodString>;
248
254
  maxRuns: z.ZodNullable<z.ZodNumber>;
@@ -311,6 +317,9 @@ export declare const ScheduleInspectResponseSchema: z.ZodObject<{
311
317
  succeeded: "succeeded";
312
318
  }>>>;
313
319
  lastRunError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
320
+ lastRunPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
321
+ lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
322
+ lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
314
323
  pausedAt: z.ZodNullable<z.ZodString>;
315
324
  expiresAt: z.ZodNullable<z.ZodString>;
316
325
  maxRuns: z.ZodNullable<z.ZodNumber>;
@@ -326,6 +335,9 @@ export declare const ScheduleInspectResponseSchema: z.ZodObject<{
326
335
  }>;
327
336
  agentId: z.ZodNullable<z.ZodGUID>;
328
337
  workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
338
+ personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
339
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
340
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
329
341
  output: z.ZodNullable<z.ZodString>;
330
342
  error: z.ZodNullable<z.ZodString>;
331
343
  }, z.core.$strip>>;
@@ -349,6 +361,9 @@ export declare const ScheduleLogsResponseSchema: z.ZodObject<{
349
361
  }>;
350
362
  agentId: z.ZodNullable<z.ZodGUID>;
351
363
  workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
364
+ personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
365
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
366
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
352
367
  output: z.ZodNullable<z.ZodString>;
353
368
  error: z.ZodNullable<z.ZodString>;
354
369
  }, z.core.$strip>>;
@@ -416,6 +431,9 @@ export declare const SchedulePauseResponseSchema: z.ZodObject<{
416
431
  succeeded: "succeeded";
417
432
  }>>>;
418
433
  lastRunError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
434
+ lastRunPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
435
+ lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
436
+ lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
419
437
  pausedAt: z.ZodNullable<z.ZodString>;
420
438
  expiresAt: z.ZodNullable<z.ZodString>;
421
439
  maxRuns: z.ZodNullable<z.ZodNumber>;
@@ -484,6 +502,9 @@ export declare const ScheduleResumeResponseSchema: z.ZodObject<{
484
502
  succeeded: "succeeded";
485
503
  }>>>;
486
504
  lastRunError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
505
+ lastRunPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
506
+ lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
507
+ lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
487
508
  pausedAt: z.ZodNullable<z.ZodString>;
488
509
  expiresAt: z.ZodNullable<z.ZodString>;
489
510
  maxRuns: z.ZodNullable<z.ZodNumber>;
@@ -560,6 +581,9 @@ export declare const ScheduleRunOnceResponseSchema: z.ZodObject<{
560
581
  succeeded: "succeeded";
561
582
  }>>>;
562
583
  lastRunError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
584
+ lastRunPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
585
+ lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
586
+ lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
563
587
  pausedAt: z.ZodNullable<z.ZodString>;
564
588
  expiresAt: z.ZodNullable<z.ZodString>;
565
589
  maxRuns: z.ZodNullable<z.ZodNumber>;
@@ -575,6 +599,9 @@ export declare const ScheduleRunOnceResponseSchema: z.ZodObject<{
575
599
  }>;
576
600
  agentId: z.ZodNullable<z.ZodGUID>;
577
601
  workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
602
+ personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
603
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
604
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
578
605
  output: z.ZodNullable<z.ZodString>;
579
606
  error: z.ZodNullable<z.ZodString>;
580
607
  }, z.core.$strip>>;
@@ -643,6 +670,9 @@ export declare const ScheduleUpdateResponseSchema: z.ZodObject<{
643
670
  succeeded: "succeeded";
644
671
  }>>>;
645
672
  lastRunError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
673
+ lastRunPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
674
+ lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
675
+ lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
646
676
  pausedAt: z.ZodNullable<z.ZodString>;
647
677
  expiresAt: z.ZodNullable<z.ZodString>;
648
678
  maxRuns: z.ZodNullable<z.ZodNumber>;
@@ -658,6 +688,9 @@ export declare const ScheduleUpdateResponseSchema: z.ZodObject<{
658
688
  }>;
659
689
  agentId: z.ZodNullable<z.ZodGUID>;
660
690
  workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
691
+ personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
692
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
693
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
661
694
  output: z.ZodNullable<z.ZodString>;
662
695
  error: z.ZodNullable<z.ZodString>;
663
696
  }, z.core.$strip>>;
@@ -58,6 +58,9 @@ export declare const ScheduleRunSchema: z.ZodObject<{
58
58
  }>;
59
59
  agentId: z.ZodNullable<z.ZodGUID>;
60
60
  workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
64
  output: z.ZodNullable<z.ZodString>;
62
65
  error: z.ZodNullable<z.ZodString>;
63
66
  }, z.core.$strip>;
@@ -119,6 +122,9 @@ export declare const StoredScheduleSchema: z.ZodObject<{
119
122
  succeeded: "succeeded";
120
123
  }>>>;
121
124
  lastRunError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
+ lastRunPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
+ lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
+ lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
128
  pausedAt: z.ZodNullable<z.ZodString>;
123
129
  expiresAt: z.ZodNullable<z.ZodString>;
124
130
  maxRuns: z.ZodNullable<z.ZodNumber>;
@@ -134,6 +140,9 @@ export declare const StoredScheduleSchema: z.ZodObject<{
134
140
  }>;
135
141
  agentId: z.ZodNullable<z.ZodGUID>;
136
142
  workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
143
+ personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
144
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
145
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
137
146
  output: z.ZodNullable<z.ZodString>;
138
147
  error: z.ZodNullable<z.ZodString>;
139
148
  }, z.core.$strip>>;
@@ -196,6 +205,9 @@ export declare const ScheduleSummarySchema: z.ZodObject<{
196
205
  succeeded: "succeeded";
197
206
  }>>>;
198
207
  lastRunError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
208
+ lastRunPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
209
+ lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
210
+ lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
199
211
  pausedAt: z.ZodNullable<z.ZodString>;
200
212
  expiresAt: z.ZodNullable<z.ZodString>;
201
213
  maxRuns: z.ZodNullable<z.ZodNumber>;
@@ -57,6 +57,13 @@ export const ScheduleRunSchema = z.object({
57
57
  status: z.enum(["running", "succeeded", "failed"]),
58
58
  agentId: z.guid().nullable(),
59
59
  workspaceId: z.string().nullable().optional(),
60
+ // Who actually executed this run — the resolved personality (if any),
61
+ // provider, and model. Stamped when the run starts (so a failed run still
62
+ // records its executor). Optional for back-compat: runs written before these
63
+ // fields existed omit them.
64
+ personalityName: z.string().nullable().optional(),
65
+ provider: z.string().nullable().optional(),
66
+ model: z.string().nullable().optional(),
60
67
  output: z.string().nullable(),
61
68
  error: z.string().nullable(),
62
69
  });
@@ -73,6 +80,14 @@ export const StoredScheduleSchema = z.object({
73
80
  lastRunAt: z.string().nullable(),
74
81
  lastRunStatus: z.enum(["succeeded", "failed"]).nullable().optional(),
75
82
  lastRunError: z.string().nullable().optional(),
83
+ // Executor of the most recent run — mirrors the run-level fields above so the
84
+ // schedule card can show "who ran it last" (personality · provider · model)
85
+ // without loading the full run history (ScheduleSummary omits `runs`).
86
+ // Optional for back-compat: schedules that never ran, or predate these
87
+ // fields, omit them.
88
+ lastRunPersonalityName: z.string().nullable().optional(),
89
+ lastRunProvider: z.string().nullable().optional(),
90
+ lastRunModel: z.string().nullable().optional(),
76
91
  pausedAt: z.string().nullable(),
77
92
  expiresAt: z.string().nullable(),
78
93
  maxRuns: z.number().int().positive().nullable(),