@leitwerk-dev/protocol 0.1.9 → 0.2.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.
Files changed (100) hide show
  1. package/dist/api-token-contracts.d.ts +25 -0
  2. package/dist/api-token-contracts.d.ts.map +1 -0
  3. package/dist/{chunk-SKQG5SE3.js → chunk-J4VMD5ST.js} +17 -26
  4. package/dist/chunk-J4VMD5ST.js.map +1 -0
  5. package/dist/{chunk-J7LXDQAN.js → chunk-Z4IU6KEN.js} +40 -6
  6. package/dist/chunk-Z4IU6KEN.js.map +1 -0
  7. package/dist/compact-turn-summary.d.ts +31 -0
  8. package/dist/compact-turn-summary.d.ts.map +1 -0
  9. package/dist/config-snapshot.d.ts +2 -0
  10. package/dist/config-snapshot.d.ts.map +1 -1
  11. package/dist/config-snapshot.js +1 -1
  12. package/dist/config-snapshot.js.map +1 -1
  13. package/dist/extension-ui-contracts.d.ts +27 -0
  14. package/dist/extension-ui-contracts.d.ts.map +1 -0
  15. package/dist/form-contract.js +1 -1
  16. package/dist/form-contract.js.map +1 -1
  17. package/dist/{http-contracts-DP9P_2YM.d.ts → http-contracts-ht8DDU4J.d.ts} +163 -37
  18. package/dist/http-contracts.d.ts +109 -38
  19. package/dist/http-contracts.d.ts.map +1 -1
  20. package/dist/http-contracts.js +32 -432
  21. package/dist/http-contracts.js.map +1 -1
  22. package/dist/index.d.ts +5 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +1196 -20
  25. package/dist/index.js.map +1 -1
  26. package/dist/initial-prompt.d.ts.map +1 -1
  27. package/dist/launcher-contract.js +1 -1
  28. package/dist/launcher-contract.js.map +1 -1
  29. package/dist/live-turn-projection.d.ts +1 -1
  30. package/dist/live-turn-projection.d.ts.map +1 -1
  31. package/dist/protocol.d.ts +63 -16
  32. package/dist/protocol.d.ts.map +1 -1
  33. package/dist/protocol.js +37 -259
  34. package/dist/protocol.js.map +1 -1
  35. package/dist/streamable-events.d.ts +1 -1
  36. package/dist/streamable-events.d.ts.map +1 -1
  37. package/dist/ticket-creation-contracts.d.ts +33 -0
  38. package/dist/ticket-creation-contracts.d.ts.map +1 -0
  39. package/dist/timeline-projection.d.ts +1 -1
  40. package/dist/timeline-projection.d.ts.map +1 -1
  41. package/dist/tool-renderer-contract.js +10 -21
  42. package/dist/tool-renderer-contract.js.map +1 -1
  43. package/dist/tool-result-truncation.d.ts +6 -0
  44. package/dist/tool-result-truncation.d.ts.map +1 -0
  45. package/dist/turn-continuation.d.ts +1 -1
  46. package/dist/turn-continuation.d.ts.map +1 -1
  47. package/dist/turn-trace-projection.d.ts +5 -0
  48. package/dist/turn-trace-projection.d.ts.map +1 -0
  49. package/dist/usage-snapshot.d.ts +3 -1
  50. package/dist/usage-snapshot.d.ts.map +1 -1
  51. package/dist/ws-event-payloads.d.ts +2 -1
  52. package/dist/ws-event-payloads.d.ts.map +1 -1
  53. package/package.json +3 -3
  54. package/src/api-token-contracts.ts +24 -0
  55. package/src/compact-turn-summary.ts +119 -0
  56. package/src/config-snapshot.ts +2 -0
  57. package/src/extension-ui-contracts.ts +45 -0
  58. package/src/http-contracts.ts +139 -68
  59. package/src/index.ts +5 -0
  60. package/src/initial-prompt.ts +3 -6
  61. package/src/live-turn-projection.ts +41 -113
  62. package/src/protocol.ts +52 -12
  63. package/src/streamable-events.ts +2 -0
  64. package/src/ticket-creation-contracts.ts +34 -0
  65. package/src/timeline-projection.ts +5 -4
  66. package/src/tool-result-truncation.ts +94 -0
  67. package/src/turn-continuation.ts +22 -46
  68. package/src/turn-trace-projection.ts +42 -0
  69. package/src/usage-snapshot.ts +25 -59
  70. package/src/ws-event-payloads.ts +5 -14
  71. package/dist/chunk-J7LXDQAN.js.map +0 -1
  72. package/dist/chunk-SKQG5SE3.js.map +0 -1
  73. package/dist/external-review.js +0 -2
  74. package/dist/external-review.js.map +0 -1
  75. package/dist/initial-prompt.js +0 -103
  76. package/dist/initial-prompt.js.map +0 -1
  77. package/dist/live-turn-projection.js +0 -395
  78. package/dist/live-turn-projection.js.map +0 -1
  79. package/dist/pi-session-message.js +0 -27
  80. package/dist/pi-session-message.js.map +0 -1
  81. package/dist/primary-path-snapshot.js +0 -2
  82. package/dist/primary-path-snapshot.js.map +0 -1
  83. package/dist/session-entry-tree.js +0 -42
  84. package/dist/session-entry-tree.js.map +0 -1
  85. package/dist/streamable-events.js +0 -17
  86. package/dist/streamable-events.js.map +0 -1
  87. package/dist/text-preview.js +0 -23
  88. package/dist/text-preview.js.map +0 -1
  89. package/dist/timeline-projection.js +0 -33
  90. package/dist/timeline-projection.js.map +0 -1
  91. package/dist/timestamp-ordering.js +0 -15
  92. package/dist/timestamp-ordering.js.map +0 -1
  93. package/dist/turn-continuation.js +0 -179
  94. package/dist/turn-continuation.js.map +0 -1
  95. package/dist/usage-by-turn-record.js +0 -25
  96. package/dist/usage-by-turn-record.js.map +0 -1
  97. package/dist/usage-snapshot.js +0 -120
  98. package/dist/usage-snapshot.js.map +0 -1
  99. package/dist/ws-event-payloads.js +0 -47
  100. package/dist/ws-event-payloads.js.map +0 -1
@@ -1,4 +1,5 @@
1
- import { SemanticEntryRef, ProcessSemanticEntryRefs, ProcessTurnAnnotation, WorkerLease, ProcessTurnRecord, Actor, FutureExecutionBlockReason, DurableModelSelection, LaunchModelConfigInput, InstanceTurnConfigMap, ProcessSelectedTurnModelSource, ProcessInstance, ProcessProject, ProcessFlowView, ProcessTurnType, ProcessRowSlot, ProcessInput, ProcessEvent, ProcessLeafOutcomeSnapshot, SerializedProcessGraph, ProcessQuestionRequest, TurnProgressReport, QuestionAnswerDraft } from '@leitwerk-dev/domain';
1
+ import * as _leitwerk_dev_domain from '@leitwerk-dev/domain';
2
+ import { SemanticEntryRef, ProcessSemanticEntryRefs, ProcessTurnAnnotation, WorkerLease, ProcessTurnRecord, Actor, DurableModelSelection, FutureExecutionBlockReason, LaunchModelConfigInput, LaunchRun, ProcessSelectedTurnModelSource, ProcessInstance, ProcessProject, ProcessFlowView, ProcessTurnType, ProcessRowSlot, ProcessInput, ProcessEvent, ProcessLeafOutcomeSnapshot, SerializedProcessGraph, ProcessQuestionRequest, ProcessToolApprovalRequest, TurnProgressReport, QuestionAnswerDraft, InstanceTurnConfigMap } from '@leitwerk-dev/domain';
2
3
  import * as v from 'valibot';
3
4
  import { FormFieldOptionDefinition, ActionFormFieldDefinition, ActionFormDefinition } from './form-contract.js';
4
5
  import { LauncherValidationError, UiLauncherSummaryBase } from './launcher-contract.js';
@@ -12,7 +13,7 @@ interface UsageCostSnapshot {
12
13
  cacheWrite: number;
13
14
  total: number;
14
15
  }
15
- interface UsageSnapshot {
16
+ interface UsageTokenCounts {
16
17
  input: number;
17
18
  output: number;
18
19
  /** Provider-reported reasoning/thinking tokens. This is a subset of output tokens. */
@@ -20,6 +21,8 @@ interface UsageSnapshot {
20
21
  cacheRead: number;
21
22
  cacheWrite: number;
22
23
  totalTokens: number;
24
+ }
25
+ interface UsageSnapshot extends UsageTokenCounts {
23
26
  cost: UsageCostSnapshot | null;
24
27
  /** Number of model requests represented by this aggregate, when known. */
25
28
  requestCount?: number;
@@ -105,10 +108,79 @@ interface PrimaryPathSnapshot {
105
108
  turnState: PrimaryPathTurnStateSnapshot;
106
109
  }
107
110
 
111
+ declare const REASONING_PREVIEW_MAX_CHARS = 1024;
112
+ interface CompactTurnSummary {
113
+ assistant: {
114
+ text: string;
115
+ thinking: string;
116
+ lastUpdatedAt: string | null;
117
+ };
118
+ currentTool: Pick<PrimaryPathToolCallSnapshot, "toolCallId" | "toolName" | "status" | "isError"> | null;
119
+ usage: UsageSnapshot | null;
120
+ toolCallCount: number;
121
+ traceItemCount: number;
122
+ /** The last persisted event incorporated into this projection. */
123
+ throughEventSequence: number;
124
+ lastTraceKind: "thinking" | "tool_call" | "operational_event" | null;
125
+ }
126
+ /** Initial-page state. It never contains trace items, tool arguments or results. */
127
+ interface CompactActiveTurnSnapshot extends CompactTurnSummary, Pick<PrimaryPathActiveTurnSnapshot, "turnRecordId" | "turnId" | "turnType" | "pathType" | "startedAt"> {
128
+ summaryPending: boolean;
129
+ }
130
+ declare function emptyCompactTurnSummary(): CompactTurnSummary;
131
+ /** Retain paragraph context; wrapping and blank-line removal belong to the preview viewport. */
132
+ declare function reasoningPreviewTail(text: string): string;
133
+ declare function applyEventToCompactTurnSummary(previous: CompactTurnSummary, event: {
134
+ eventType: string;
135
+ data: Record<string, unknown>;
136
+ createdAt: string;
137
+ eventSequence: number;
138
+ }): CompactTurnSummary;
139
+
140
+ interface ApiTokenMetadata {
141
+ id: string;
142
+ prefix: string;
143
+ name: string;
144
+ createdAt: string;
145
+ expiresAt: string | null;
146
+ revokedAt: string | null;
147
+ lastUsedAt: string | null;
148
+ }
149
+ interface ApiTokenPolicy {
150
+ enabled: boolean;
151
+ defaultTtlMs: number;
152
+ maxTtlMs: number;
153
+ allowNoExpiry: boolean;
154
+ }
155
+ interface ApiTokensResponseBody {
156
+ tokens: ApiTokenMetadata[];
157
+ policy: ApiTokenPolicy;
158
+ csrfToken: string;
159
+ }
160
+ interface CreateApiTokenResponseBody {
161
+ token: ApiTokenMetadata;
162
+ secret: string;
163
+ }
164
+
165
+ interface StartLaunchRunResponseBody {
166
+ launchRunId: string;
167
+ instanceId: string | null;
168
+ }
169
+ interface LaunchRunResponseBody {
170
+ launchRun: LaunchRun;
171
+ }
172
+ interface ProcessLaunchRunsResponseBody {
173
+ launchRuns: LaunchRun[];
174
+ }
108
175
  interface AuthMeResponseBody {
109
176
  authEnabled: boolean;
110
177
  actor: Actor | null;
111
178
  }
179
+ interface SessionTransferOperationView {
180
+ attemptId: string;
181
+ phase: string;
182
+ blocksManualTurns: boolean;
183
+ }
112
184
  interface ProcessListItem {
113
185
  process: ProcessInstance;
114
186
  projects: ProcessProject[];
@@ -343,21 +415,8 @@ interface ProcessLaunchConfigurationView {
343
415
  parameters: readonly ProcessLaunchConfigurationParameterView[];
344
416
  projects: readonly ProcessLaunchConfigurationProjectView[];
345
417
  }
346
- interface PiSessionUsageSnapshot {
347
- input: number;
348
- output: number;
349
- /** Provider-reported reasoning/thinking tokens. This is a subset of output tokens. */
350
- reasoning?: number;
351
- cacheRead: number;
352
- cacheWrite: number;
353
- totalTokens: number;
354
- cost?: {
355
- input: number;
356
- output: number;
357
- cacheRead: number;
358
- cacheWrite: number;
359
- total: number;
360
- };
418
+ interface PiSessionUsageSnapshot extends UsageTokenCounts {
419
+ cost?: UsageCostSnapshot;
361
420
  }
362
421
  type PiSessionTextContentBlock = {
363
422
  type: "text";
@@ -503,25 +562,32 @@ interface SkillRepositorySummary {
503
562
  lastRefreshedAt: string | null;
504
563
  error: string | null;
505
564
  }
506
- interface SkillCatalogSummary {
565
+ interface SkillCatalogItem {
566
+ repositoryId: string;
507
567
  id: string;
508
568
  label: string;
509
569
  description: string | null;
510
- updateAvailable: boolean;
511
- modelInvocable: boolean;
512
- usage: SkillUsageSummary;
513
- }
514
- interface SkillCatalogItem extends SkillCatalogSummary {
515
- repositoryId: string;
516
570
  sourcePath: string;
517
571
  sourceRevision: string;
518
572
  registered: boolean;
573
+ updateAvailable: boolean;
574
+ conflict: boolean;
519
575
  stale: boolean;
576
+ modelInvocable: boolean;
577
+ usage: SkillUsageSummary;
520
578
  }
521
- interface InstalledSkillCatalogItem extends SkillCatalogSummary {
579
+ type SkillRegistrationKind = "configuration" | "catalog";
580
+ interface InstalledSkillCatalogItem {
581
+ id: string;
582
+ label: string;
583
+ description: string | null;
522
584
  activeRevisionId: string;
523
585
  activeSourceRevision: string | null;
586
+ registrationKind: SkillRegistrationKind;
524
587
  sourceRepositoryId: string | null;
588
+ updateAvailable: boolean;
589
+ modelInvocable: boolean;
590
+ usage: SkillUsageSummary;
525
591
  }
526
592
  interface SkillRevisionSummary {
527
593
  id: string;
@@ -562,16 +628,8 @@ interface ProcessOverviewItem extends ProcessRowSlot {
562
628
  updatedAt: string;
563
629
  closedAt: string | null;
564
630
  }
565
- interface FutureExecutionOverviewItemBase {
566
- id: string;
567
- scheduleKind: "once" | "cron";
568
- processId: string;
569
- nextRunAt: string;
570
- cronExpression: string | null;
571
- title: string;
631
+ interface FutureExecutionOverviewItemBase extends Omit<FutureExecutionBaseSummary, "kind" | "subtitle" | "modelSelection"> {
572
632
  initialPromptPreview: string | null;
573
- status?: "scheduled" | "blocked";
574
- blockedReason?: FutureExecutionBlockReason | null;
575
633
  }
576
634
  interface FutureLaunchOverviewItem extends FutureExecutionOverviewItemBase {
577
635
  kind: "launch";
@@ -670,6 +728,14 @@ interface ProcessTimelineTurnSummary {
670
728
  summary: string;
671
729
  output: string;
672
730
  turnResultMarkdown: string;
731
+ resultSummary?: string;
732
+ reviewedTurnRecordId?: string;
733
+ resources?: _leitwerk_dev_domain.TurnProgressLink[];
734
+ transition?: {
735
+ selectedTurnId: string;
736
+ targetTurnRecordId?: string;
737
+ accepted: boolean;
738
+ };
673
739
  pathType: ProcessTurnRecord["pathType"];
674
740
  createdAt: string;
675
741
  presentation: ProcessTimelineTurnPresentation;
@@ -682,9 +748,20 @@ interface ProcessTimelineTurnSummary {
682
748
  endedAt: string | null;
683
749
  actionSource: "ui" | "external" | "scheduled" | null;
684
750
  progress?: TurnProgressReport | null;
751
+ progressRecordedAt?: string;
685
752
  }
686
753
  type ProcessTimelineInputSummary = Pick<ProcessInput, "id" | "sequence" | "source" | "kind" | "bodyMarkdown" | "receivedAt" | "consumedAt">;
754
+ interface ProcessExternalObservation {
755
+ summary: string;
756
+ links?: _leitwerk_dev_domain.TurnProgressLink[];
757
+ observedAt: string;
758
+ subject: string;
759
+ revision: string;
760
+ }
687
761
  interface ProcessExternalTriggerSignal {
762
+ observation?: ProcessExternalObservation;
763
+ refreshError?: string | null;
764
+ refreshedAt?: string;
688
765
  triggerId: string;
689
766
  state: "error" | "armed" | "triggered" | "waiting";
690
767
  occurredAt: string | null;
@@ -721,6 +798,35 @@ interface StartupRecoverySummary extends CurrentErrorSummary {
721
798
  defaultModelProfileId: string | null;
722
799
  providerOptions: Record<string, string>;
723
800
  }
801
+ type StartupAttemptStatus = "starting" | "failed" | "succeeded" | "recovered" | "superseded";
802
+ interface StartupAttemptStepSummary {
803
+ /** Observed phase interval; absent for older servers or unavailable evidence. */
804
+ startedAt?: string | null;
805
+ endedAt?: string | null;
806
+ detail?: string;
807
+ id: "start_worker" | "connect_worker" | "prepare_workspace" | "start_first_turn";
808
+ label: string;
809
+ status: "pending" | "in_progress" | "completed" | "failed" | "superseded";
810
+ occurredAt: string | null;
811
+ }
812
+ /** Worker-start history derived from correlated start, lease, readiness, and turn records. */
813
+ interface StartupAttemptSummary {
814
+ startRecordId: string;
815
+ workerLeaseId: string | null;
816
+ status: StartupAttemptStatus;
817
+ startedAt: string;
818
+ readyAt: string | null;
819
+ durationMs: number | null;
820
+ summary: string | null;
821
+ recoveredByStartRecordId: string | null;
822
+ steps: StartupAttemptStepSummary[];
823
+ }
824
+ interface ProcessStartupSummary {
825
+ workerStarts?: _leitwerk_dev_domain.PhysicalWorkerStart[];
826
+ authoritativeAttemptId: string | null;
827
+ attempts: StartupAttemptSummary[];
828
+ recovery: StartupRecoverySummary | null;
829
+ }
724
830
  type CurrentProcessErrorSummary = CurrentErrorSummary;
725
831
  interface ProcessUsageEstimateSnapshot {
726
832
  usage: TurnUsageSnapshot;
@@ -731,7 +837,11 @@ interface ProcessUsageEstimateSnapshot {
731
837
  missingCostTurnCount: number;
732
838
  isPartial: boolean;
733
839
  }
734
- interface PrimaryPathUiSnapshot extends PrimaryPathSnapshot {
840
+ interface PrimaryPathUiSnapshot extends Omit<PrimaryPathSnapshot, "turnState"> {
841
+ throughEventSequence: number;
842
+ turnState: Omit<PrimaryPathSnapshot["turnState"], "activeTurn"> & {
843
+ activeTurn: CompactActiveTurnSnapshot | null;
844
+ };
735
845
  entryCount: number;
736
846
  entriesOmitted: true;
737
847
  }
@@ -743,8 +853,11 @@ type ProcessUiSnapshotProcess = Pick<ProcessInstance, "id" | "processId" | "sele
743
853
  */
744
854
  interface ProcessDetailUiSnapshotResponseBody {
745
855
  process: ProcessUiSnapshotProcess;
856
+ /** Next turn on the declared happy path, including human decisions. */
857
+ plannedNextTurn?: Pick<ProcessSelectedTurnSummary, "turnId" | "description"> | null;
746
858
  /** Durable requests in Chronicle order; at most one is open for the current turn. */
747
859
  questionRequests: ProcessQuestionRequest[];
860
+ toolApprovalRequests: ProcessToolApprovalRequest[];
748
861
  leafOutcomeSnapshots: ProcessLeafOutcomeSnapshot[];
749
862
  processDisplayName: string | null;
750
863
  processFlow: ProcessFlowView;
@@ -760,6 +873,9 @@ interface ProcessDetailUiSnapshotResponseBody {
760
873
  timeline: ProcessTimelineSnapshot;
761
874
  instanceTree: ProcessInstanceTreeResponseBody;
762
875
  recovery: CurrentTurnRecoverySummary | null;
876
+ /** Authoritative startup history and current remediation. */
877
+ startup: ProcessStartupSummary;
878
+ /** Compatibility alias for startup.recovery. */
763
879
  startupRecovery: StartupRecoverySummary | null;
764
880
  processError: CurrentProcessErrorSummary | null;
765
881
  usageEstimate: ProcessUsageEstimateSnapshot | null;
@@ -767,6 +883,7 @@ interface ProcessDetailUiSnapshotResponseBody {
767
883
  session: {
768
884
  signature: string | null;
769
885
  };
886
+ sessionTransfer: SessionTransferOperationView | null;
770
887
  }
771
888
  type InstanceTreeTurnResultState = "succeeded" | "failed" | "aborted" | "pending";
772
889
  /** Redacted, semantic process history. Pi message/activity categories are never exposed. */
@@ -793,6 +910,8 @@ interface ProcessInstanceTreeResponseBody {
793
910
  edges: InstanceTreeEdgeSummary[];
794
911
  }
795
912
  interface TurnReasoningDetailResponseBody {
913
+ state: "live" | "committed";
914
+ throughEventSequence: number;
796
915
  instanceId: string;
797
916
  turnRecordId: string;
798
917
  sessionSignature: string | null;
@@ -845,6 +964,11 @@ interface LauncherMutationResponseBody {
845
964
  errors?: LauncherValidationError[];
846
965
  error?: string | null;
847
966
  }
967
+ interface FutureLaunchMutationResponseBody {
968
+ kind: "scheduled";
969
+ futureExecution: FutureLaunchSummary | null;
970
+ error?: string | null;
971
+ }
848
972
  type ScheduledActionMutationResponseBody = {
849
973
  kind?: "scheduled";
850
974
  scheduledAction?: ScheduledActionDetail | null;
@@ -959,7 +1083,9 @@ declare const normalizeFutureLaunchPayload: (payload: FutureLaunchPayloadBase) =
959
1083
  };
960
1084
  modelConfig: {
961
1085
  defaultModelProfileId: string | null;
962
- turnConfigs: InstanceTurnConfigMap;
1086
+ turnConfigs: {
1087
+ [x: string]: _leitwerk_dev_domain.InstanceTurnConfigInput;
1088
+ };
963
1089
  };
964
1090
  actor: Actor | null;
965
1091
  selectedSkillIds: string[];
@@ -1034,4 +1160,4 @@ declare function serializeFutureActionPayload(payload: unknown): string;
1034
1160
  declare function parseFutureActionPayloadObject(value: unknown, context?: string): ParseResult<FutureActionPayload>;
1035
1161
  declare function parseFutureActionPayloadJson(payloadJson: string): ParseResult<FutureActionPayload>;
1036
1162
 
1037
- export { type PrimaryPathDetailRailSnapshot as $, type AuthMeResponseBody as A, type LauncherModelConfigPreviewResponseBody as B, type CronPreviewResponseBody as C, type LauncherModelConfigSchema as D, type ErrorResponseBody as E, type FutureExecutionSummary as F, type LauncherMutationResponseBody as G, type LauncherOptionsResponseBody as H, type InstalledSkillCatalogDetail as I, type LauncherRecentValuesResponseBody as J, type LauncherTurnModelConfigPreview as K, type LauncherDefaultModelPreview as L, type LaunchersResponseBody as M, type ModelProfileAvailability as N, type ModelProfileOptionSummary as O, type PrimaryPathStreamingAssistantSnapshot as P, type ModelProviderOptionsResponseBody as Q, type ParsedScheduleRequest as R, type PiSessionContentBlock as S, type PiSessionEntry as T, type UsageSnapshot as U, type PiSessionImageContentBlock as V, type PiSessionMessageRecord as W, type PiSessionTextContentBlock as X, type PiSessionThinkingContentBlock as Y, type PiSessionToolCallContentBlock as Z, type PiSessionUsageSnapshot as _, type FutureExecutionOverviewItem as a, type SkillRevisionSummary as a$, type PrimaryPathEntrySnapshot as a0, type PrimaryPathOperationalTraceSeverity as a1, type PrimaryPathSnapshot as a2, type PrimaryPathSnapshotResponseBody as a3, type PrimaryPathThinkingTraceItemSnapshot as a4, type PrimaryPathToolCallTraceItemSnapshot as a5, type PrimaryPathTurnStateSnapshot as a6, type PrimaryPathUiSnapshot as a7, type ProcessActionFieldDefinition as a8, type ProcessActionFormDefinition as a9, type ProcessRetryConfig as aA, type ProcessRetryConfigResponseBody as aB, type ProcessRunDetailsView as aC, type ProcessRunToolParameterView as aD, type ProcessRunToolView as aE, type ProcessRunTurnView as aF, type ProcessSelectedTurnSummary as aG, type ProcessTimelineInputSummary as aH, type ProcessTimelineSnapshot as aI, type ProcessTurnModelConfigurationView as aJ, type ProcessUiSnapshotProcess as aK, type ProcessUsageEstimateSnapshot as aL, type ProcessesListResponseBody as aM, type ProcessesOverviewResponseBody as aN, type PromptCacheSwitchResolution as aO, type ProviderOptionChoiceSummary as aP, type ProviderOptionFieldSummary as aQ, type QuestionRequestMutationResponseBody as aR, type ScheduleConfigInput as aS, type ScheduleMode as aT, type ScheduledActionDetail as aU, type ScheduledActionMutationResponseBody as aV, type SkillCatalogDetail as aW, type SkillCatalogDetailResponseBody as aX, type SkillCatalogItem as aY, type SkillCatalogSummary as aZ, type SkillRepositorySummary as a_, type ProcessActionModelPreview as aa, type ProcessActionModelPreviewResponseBody as ab, type ProcessActionModelResolutionPreview as ac, type ProcessActionModelResolutionSource as ad, type ProcessActionPreviewSummary as ae, type ProcessActionSummary as af, type ProcessActionWarmPromptCacheContext as ag, type ProcessBrowseFacets as ah, type ProcessBrowseItem as ai, type ProcessBrowsePagination as aj, type ProcessBrowseResponseBody as ak, type ProcessDetailData as al, type ProcessDetailUiSnapshotResponseBody as am, type ProcessDiagnosticsData as an, type ProcessDiagnosticsResponseBody as ao, type ProcessExternalSourceSummary as ap, type ProcessExternalTriggerSignal as aq, type ProcessExternalTriggerSummary as ar, type ProcessInstanceTreeResponseBody as as, type ProcessLaunchConfigurationParameterView as at, type ProcessLaunchConfigurationProjectView as au, type ProcessLaunchConfigurationView as av, type ProcessListItem as aw, type ProcessModelConfigurationIssueView as ax, type ProcessModelConfigurationView as ay, type ProcessOverviewItem as az, type PrimaryPathToolCallSnapshot as b, type SkillUsageProcessSummary as b0, type SkillUsageSummary as b1, type SkillsCatalogResponseBody as b2, type StartupRecoverySummary as b3, type SubmitQuestionAnswersRequestBody as b4, type TurnPiInputPart as b5, type TurnPiInputPartRole as b6, type TurnPiInputSnapshot as b7, type TurnReasoningDetailResponseBody as b8, type TurnTracePreview as b9, type TurnTraceSnapshot as ba, type TurnTraceToolCallSnapshot as bb, type TurnUsageSnapshot as bc, type UiLauncherSummary as bd, type UsageCostSnapshot as be, type WatcherLaunchModelSummary as bf, type WatcherPresentationField as bg, type WatcherSummary as bh, type WatchersResponseBody as bi, cloneUsageSnapshot as bj, mergeUsageSnapshots as bk, normalizeUsageSnapshot as bl, parseActionRequestBody as bm, parseFutureActionPayloadJson as bn, parseFutureActionPayloadObject as bo, parseFutureLaunchPayloadJson as bp, parseFutureLaunchPayloadObject as bq, parseLauncherInputJson as br, parseLauncherModelConfigInput as bs, parseLauncherRequestBody as bt, parseLauncherTurnConfigsJson as bu, parseScheduleRequestInput as bv, resolvePromptCacheSwitch as bw, serializeFutureActionPayload as bx, serializeFutureLaunchPayload as by, validateScheduleRequestInput as bz, type PrimaryPathTraceItemSnapshot as c, type PrimaryPathOperationalTraceItemSnapshot as d, type PrimaryPathActiveTurnSnapshot as e, type ProcessTimelineTurnSummary as f, type ProcessTimelineTurnPresentation as g, type CurrentErrorSummary as h, type CurrentProcessErrorSummary as i, type CurrentTurnRecoverySummary as j, type FutureActionOverviewItem as k, type FutureActionPayload as l, type FutureActionSummary as m, type FutureExecutionBaseSummary as n, type FutureExecutionDetailResponseBody as o, type FutureLaunchOverviewItem as p, type FutureLaunchPayload as q, type FutureLaunchSummary as r, type InstalledSkillCatalogDetailResponseBody as s, type InstalledSkillCatalogItem as t, type InstanceTreeEdgeSummary as u, type InstanceTreeNodeSummary as v, type InstanceTreeTurnResultState as w, type LauncherDefaultsResponseBody as x, type LauncherModelConfigDefaults as y, type LauncherModelConfigPreview as z };
1163
+ export { type ParsedActionRequestBody as $, type ApiTokenMetadata as A, type InstalledSkillCatalogItem as B, type CompactActiveTurnSnapshot as C, type InstanceTreeEdgeSummary as D, type ErrorResponseBody as E, type FutureExecutionSummary as F, type InstanceTreeNodeSummary as G, type InstanceTreeTurnResultState as H, type InstalledSkillCatalogDetail as I, type LauncherDefaultModelPreview as J, type LauncherDefaultsResponseBody as K, type LaunchRunResponseBody as L, type LauncherModelConfigDefaults as M, type LauncherModelConfigPreview as N, type LauncherModelConfigPreviewResponseBody as O, type PrimaryPathStreamingAssistantSnapshot as P, type LauncherModelConfigSchema as Q, type LauncherMutationResponseBody as R, type LauncherOptionsResponseBody as S, type TurnTraceSnapshot as T, type UsageSnapshot as U, type LauncherRecentValuesResponseBody as V, type LauncherTurnModelConfigPreview as W, type LaunchersResponseBody as X, type ModelProfileAvailability as Y, type ModelProfileOptionSummary as Z, type ModelProviderOptionsResponseBody as _, type FutureExecutionOverviewItem as a, type ProcessesOverviewResponseBody as a$, type ParsedLauncherRequestBody as a0, type ParsedScheduleRequest as a1, type PiSessionContentBlock as a2, type PiSessionEntry as a3, type PiSessionImageContentBlock as a4, type PiSessionMessageRecord as a5, type PiSessionTextContentBlock as a6, type PiSessionThinkingContentBlock as a7, type PiSessionToolCallContentBlock as a8, type PiSessionUsageSnapshot as a9, type ProcessExternalObservation as aA, type ProcessExternalSourceSummary as aB, type ProcessExternalTriggerSignal as aC, type ProcessExternalTriggerSummary as aD, type ProcessInstanceTreeResponseBody as aE, type ProcessLaunchConfigurationParameterView as aF, type ProcessLaunchConfigurationProjectView as aG, type ProcessLaunchConfigurationView as aH, type ProcessLaunchRunsResponseBody as aI, type ProcessListItem as aJ, type ProcessModelConfigurationIssueView as aK, type ProcessModelConfigurationView as aL, type ProcessOverviewItem as aM, type ProcessRetryConfig as aN, type ProcessRetryConfigResponseBody as aO, type ProcessRunDetailsView as aP, type ProcessRunToolParameterView as aQ, type ProcessRunToolView as aR, type ProcessRunTurnView as aS, type ProcessSelectedTurnSummary as aT, type ProcessStartupSummary as aU, type ProcessTimelineInputSummary as aV, type ProcessTimelineSnapshot as aW, type ProcessTurnModelConfigurationView as aX, type ProcessUiSnapshotProcess as aY, type ProcessUsageEstimateSnapshot as aZ, type ProcessesListResponseBody as a_, type PrimaryPathDetailRailSnapshot as aa, type PrimaryPathEntrySnapshot as ab, type PrimaryPathOperationalTraceSeverity as ac, type PrimaryPathSnapshot as ad, type PrimaryPathSnapshotResponseBody as ae, type PrimaryPathThinkingTraceItemSnapshot as af, type PrimaryPathToolCallTraceItemSnapshot as ag, type PrimaryPathTurnStateSnapshot as ah, type PrimaryPathUiSnapshot as ai, type ProcessActionFieldDefinition as aj, type ProcessActionFormDefinition as ak, type ProcessActionModelPreview as al, type ProcessActionModelPreviewResponseBody as am, type ProcessActionModelResolutionPreview as an, type ProcessActionModelResolutionSource as ao, type ProcessActionPreviewSummary as ap, type ProcessActionSummary as aq, type ProcessActionWarmPromptCacheContext as ar, type ProcessBrowseFacets as as, type ProcessBrowseItem as at, type ProcessBrowsePagination as au, type ProcessBrowseResponseBody as av, type ProcessDetailData as aw, type ProcessDetailUiSnapshotResponseBody as ax, type ProcessDiagnosticsData as ay, type ProcessDiagnosticsResponseBody as az, type PrimaryPathToolCallSnapshot as b, type PromptCacheSwitchResolution as b0, type ProviderOptionChoiceSummary as b1, type ProviderOptionFieldSummary as b2, type QuestionRequestMutationResponseBody as b3, REASONING_PREVIEW_MAX_CHARS as b4, type ScheduleConfigInput as b5, type ScheduleMode as b6, type ScheduledActionDetail as b7, type ScheduledActionMutationResponseBody as b8, type SessionTransferOperationView as b9, type WatcherPresentationField as bA, type WatcherSummary as bB, type WatchersResponseBody as bC, applyEventToCompactTurnSummary as bD, cloneUsageSnapshot as bE, emptyCompactTurnSummary as bF, mergeUsageSnapshots as bG, normalizeUsageSnapshot as bH, parseActionRequestBody as bI, parseFutureActionPayloadJson as bJ, parseFutureActionPayloadObject as bK, parseFutureLaunchPayloadJson as bL, parseFutureLaunchPayloadObject as bM, parseLauncherInputJson as bN, parseLauncherModelConfigInput as bO, parseLauncherRequestBody as bP, parseLauncherTurnConfigsJson as bQ, parseScheduleRequestInput as bR, reasoningPreviewTail as bS, resolvePromptCacheSwitch as bT, serializeFutureActionPayload as bU, serializeFutureLaunchPayload as bV, validateScheduleRequestInput as bW, type SkillCatalogDetail as ba, type SkillCatalogDetailResponseBody as bb, type SkillCatalogItem as bc, type SkillRegistrationKind as bd, type SkillRepositorySummary as be, type SkillRevisionSummary as bf, type SkillUsageProcessSummary as bg, type SkillUsageSummary as bh, type SkillsCatalogResponseBody as bi, type StartLaunchRunResponseBody as bj, type StartupAttemptStatus as bk, type StartupAttemptStepSummary as bl, type StartupAttemptSummary as bm, type StartupRecoverySummary as bn, type SubmitQuestionAnswersRequestBody as bo, type TurnPiInputPart as bp, type TurnPiInputPartRole as bq, type TurnPiInputSnapshot as br, type TurnReasoningDetailResponseBody as bs, type TurnTracePreview as bt, type TurnTraceToolCallSnapshot as bu, type TurnUsageSnapshot as bv, type UiLauncherSummary as bw, type UsageCostSnapshot as bx, type UsageTokenCounts as by, type WatcherLaunchModelSummary as bz, type PrimaryPathTraceItemSnapshot as c, type PrimaryPathOperationalTraceItemSnapshot as d, type PrimaryPathActiveTurnSnapshot as e, type ProcessTimelineTurnSummary as f, type ProcessTimelineTurnPresentation as g, type ApiTokenPolicy as h, type ApiTokensResponseBody as i, type AuthMeResponseBody as j, type CompactTurnSummary as k, type CreateApiTokenResponseBody as l, type CronPreviewResponseBody as m, type CurrentErrorSummary as n, type CurrentProcessErrorSummary as o, type CurrentTurnRecoverySummary as p, type FutureActionOverviewItem as q, type FutureActionPayload as r, type FutureActionSummary as s, type FutureExecutionBaseSummary as t, type FutureExecutionDetailResponseBody as u, type FutureLaunchMutationResponseBody as v, type FutureLaunchOverviewItem as w, type FutureLaunchPayload as x, type FutureLaunchSummary as y, type InstalledSkillCatalogDetailResponseBody as z };
@@ -1,14 +1,31 @@
1
- import { type Actor, type DurableModelSelection, type FutureExecutionBlockReason, type InstanceTurnConfigMap, type LaunchModelConfigInput, type ProcessEvent, type ProcessFlowView, type ProcessInput, type ProcessInstance, type ProcessLeafOutcomeSnapshot, type ProcessProject, type ProcessQuestionRequest, type ProcessRowSlot, type ProcessSelectedTurnModelSource, type ProcessTurnAnnotation, type ProcessTurnRecord, type ProcessTurnType, type QuestionAnswerDraft, type SerializedProcessGraph, type TurnProgressReport, type WorkerLease } from "@leitwerk-dev/domain";
1
+ import { type Actor, type DurableModelSelection, type FutureExecutionBlockReason, type InstanceTurnConfigMap, type LaunchModelConfigInput, type LaunchRun, type ProcessEvent, type ProcessFlowView, type ProcessInput, type ProcessInstance, type ProcessLeafOutcomeSnapshot, type ProcessProject, type ProcessQuestionRequest, type ProcessRowSlot, type ProcessSelectedTurnModelSource, type ProcessToolApprovalRequest, type ProcessTurnAnnotation, type ProcessTurnRecord, type ProcessTurnType, type QuestionAnswerDraft, type SerializedProcessGraph, type TurnProgressReport, type WorkerLease } from "@leitwerk-dev/domain";
2
2
  import * as v from "valibot";
3
+ import type { CompactActiveTurnSnapshot } from "./compact-turn-summary.js";
3
4
  import type { ActionFormDefinition, ActionFormFieldDefinition, FormFieldOptionDefinition } from "./form-contract.js";
4
5
  import type { LauncherValidationError, UiLauncherSummaryBase } from "./launcher-contract.js";
5
6
  import type { PrimaryPathSnapshot, PrimaryPathStreamingAssistantSnapshot, PrimaryPathToolCallSnapshot, PrimaryPathTraceItemSnapshot, TurnUsageSnapshot } from "./primary-path-snapshot.js";
6
7
  import { type ParseResult } from "./protocol.js";
7
8
  import type { ToolCallRendererDefinition } from "./tool-renderer-contract.js";
9
+ import type { UsageCostSnapshot, UsageTokenCounts } from "./usage-snapshot.js";
10
+ export interface StartLaunchRunResponseBody {
11
+ launchRunId: string;
12
+ instanceId: string | null;
13
+ }
14
+ export interface LaunchRunResponseBody {
15
+ launchRun: LaunchRun;
16
+ }
17
+ export interface ProcessLaunchRunsResponseBody {
18
+ launchRuns: LaunchRun[];
19
+ }
8
20
  export interface AuthMeResponseBody {
9
21
  authEnabled: boolean;
10
22
  actor: Actor | null;
11
23
  }
24
+ export interface SessionTransferOperationView {
25
+ attemptId: string;
26
+ phase: string;
27
+ blocksManualTurns: boolean;
28
+ }
12
29
  export interface ProcessListItem {
13
30
  process: ProcessInstance;
14
31
  projects: ProcessProject[];
@@ -243,21 +260,8 @@ export interface ProcessLaunchConfigurationView {
243
260
  parameters: readonly ProcessLaunchConfigurationParameterView[];
244
261
  projects: readonly ProcessLaunchConfigurationProjectView[];
245
262
  }
246
- export interface PiSessionUsageSnapshot {
247
- input: number;
248
- output: number;
249
- /** Provider-reported reasoning/thinking tokens. This is a subset of output tokens. */
250
- reasoning?: number;
251
- cacheRead: number;
252
- cacheWrite: number;
253
- totalTokens: number;
254
- cost?: {
255
- input: number;
256
- output: number;
257
- cacheRead: number;
258
- cacheWrite: number;
259
- total: number;
260
- };
263
+ export interface PiSessionUsageSnapshot extends UsageTokenCounts {
264
+ cost?: UsageCostSnapshot;
261
265
  }
262
266
  export type PiSessionTextContentBlock = {
263
267
  type: "text";
@@ -403,25 +407,32 @@ export interface SkillRepositorySummary {
403
407
  lastRefreshedAt: string | null;
404
408
  error: string | null;
405
409
  }
406
- export interface SkillCatalogSummary {
410
+ export interface SkillCatalogItem {
411
+ repositoryId: string;
407
412
  id: string;
408
413
  label: string;
409
414
  description: string | null;
410
- updateAvailable: boolean;
411
- modelInvocable: boolean;
412
- usage: SkillUsageSummary;
413
- }
414
- export interface SkillCatalogItem extends SkillCatalogSummary {
415
- repositoryId: string;
416
415
  sourcePath: string;
417
416
  sourceRevision: string;
418
417
  registered: boolean;
418
+ updateAvailable: boolean;
419
+ conflict: boolean;
419
420
  stale: boolean;
421
+ modelInvocable: boolean;
422
+ usage: SkillUsageSummary;
420
423
  }
421
- export interface InstalledSkillCatalogItem extends SkillCatalogSummary {
424
+ export type SkillRegistrationKind = "configuration" | "catalog";
425
+ export interface InstalledSkillCatalogItem {
426
+ id: string;
427
+ label: string;
428
+ description: string | null;
422
429
  activeRevisionId: string;
423
430
  activeSourceRevision: string | null;
431
+ registrationKind: SkillRegistrationKind;
424
432
  sourceRepositoryId: string | null;
433
+ updateAvailable: boolean;
434
+ modelInvocable: boolean;
435
+ usage: SkillUsageSummary;
425
436
  }
426
437
  export interface SkillRevisionSummary {
427
438
  id: string;
@@ -462,16 +473,8 @@ export interface ProcessOverviewItem extends ProcessRowSlot {
462
473
  updatedAt: string;
463
474
  closedAt: string | null;
464
475
  }
465
- interface FutureExecutionOverviewItemBase {
466
- id: string;
467
- scheduleKind: "once" | "cron";
468
- processId: string;
469
- nextRunAt: string;
470
- cronExpression: string | null;
471
- title: string;
476
+ interface FutureExecutionOverviewItemBase extends Omit<FutureExecutionBaseSummary, "kind" | "subtitle" | "modelSelection"> {
472
477
  initialPromptPreview: string | null;
473
- status?: "scheduled" | "blocked";
474
- blockedReason?: FutureExecutionBlockReason | null;
475
478
  }
476
479
  export interface FutureLaunchOverviewItem extends FutureExecutionOverviewItemBase {
477
480
  kind: "launch";
@@ -570,6 +573,14 @@ export interface ProcessTimelineTurnSummary {
570
573
  summary: string;
571
574
  output: string;
572
575
  turnResultMarkdown: string;
576
+ resultSummary?: string;
577
+ reviewedTurnRecordId?: string;
578
+ resources?: import("@leitwerk-dev/domain").TurnProgressLink[];
579
+ transition?: {
580
+ selectedTurnId: string;
581
+ targetTurnRecordId?: string;
582
+ accepted: boolean;
583
+ };
573
584
  pathType: ProcessTurnRecord["pathType"];
574
585
  createdAt: string;
575
586
  presentation: ProcessTimelineTurnPresentation;
@@ -582,9 +593,20 @@ export interface ProcessTimelineTurnSummary {
582
593
  endedAt: string | null;
583
594
  actionSource: "ui" | "external" | "scheduled" | null;
584
595
  progress?: TurnProgressReport | null;
596
+ progressRecordedAt?: string;
585
597
  }
586
598
  export type ProcessTimelineInputSummary = Pick<ProcessInput, "id" | "sequence" | "source" | "kind" | "bodyMarkdown" | "receivedAt" | "consumedAt">;
599
+ export interface ProcessExternalObservation {
600
+ summary: string;
601
+ links?: import("@leitwerk-dev/domain").TurnProgressLink[];
602
+ observedAt: string;
603
+ subject: string;
604
+ revision: string;
605
+ }
587
606
  export interface ProcessExternalTriggerSignal {
607
+ observation?: ProcessExternalObservation;
608
+ refreshError?: string | null;
609
+ refreshedAt?: string;
588
610
  triggerId: string;
589
611
  state: "error" | "armed" | "triggered" | "waiting";
590
612
  occurredAt: string | null;
@@ -621,6 +643,35 @@ export interface StartupRecoverySummary extends CurrentErrorSummary {
621
643
  defaultModelProfileId: string | null;
622
644
  providerOptions: Record<string, string>;
623
645
  }
646
+ export type StartupAttemptStatus = "starting" | "failed" | "succeeded" | "recovered" | "superseded";
647
+ export interface StartupAttemptStepSummary {
648
+ /** Observed phase interval; absent for older servers or unavailable evidence. */
649
+ startedAt?: string | null;
650
+ endedAt?: string | null;
651
+ detail?: string;
652
+ id: "start_worker" | "connect_worker" | "prepare_workspace" | "start_first_turn";
653
+ label: string;
654
+ status: "pending" | "in_progress" | "completed" | "failed" | "superseded";
655
+ occurredAt: string | null;
656
+ }
657
+ /** Worker-start history derived from correlated start, lease, readiness, and turn records. */
658
+ export interface StartupAttemptSummary {
659
+ startRecordId: string;
660
+ workerLeaseId: string | null;
661
+ status: StartupAttemptStatus;
662
+ startedAt: string;
663
+ readyAt: string | null;
664
+ durationMs: number | null;
665
+ summary: string | null;
666
+ recoveredByStartRecordId: string | null;
667
+ steps: StartupAttemptStepSummary[];
668
+ }
669
+ export interface ProcessStartupSummary {
670
+ workerStarts?: import("@leitwerk-dev/domain").PhysicalWorkerStart[];
671
+ authoritativeAttemptId: string | null;
672
+ attempts: StartupAttemptSummary[];
673
+ recovery: StartupRecoverySummary | null;
674
+ }
624
675
  export type CurrentProcessErrorSummary = CurrentErrorSummary;
625
676
  export interface ProcessUsageEstimateSnapshot {
626
677
  usage: TurnUsageSnapshot;
@@ -631,7 +682,11 @@ export interface ProcessUsageEstimateSnapshot {
631
682
  missingCostTurnCount: number;
632
683
  isPartial: boolean;
633
684
  }
634
- export interface PrimaryPathUiSnapshot extends PrimaryPathSnapshot {
685
+ export interface PrimaryPathUiSnapshot extends Omit<PrimaryPathSnapshot, "turnState"> {
686
+ throughEventSequence: number;
687
+ turnState: Omit<PrimaryPathSnapshot["turnState"], "activeTurn"> & {
688
+ activeTurn: CompactActiveTurnSnapshot | null;
689
+ };
635
690
  entryCount: number;
636
691
  entriesOmitted: true;
637
692
  }
@@ -643,8 +698,11 @@ export type ProcessUiSnapshotProcess = Pick<ProcessInstance, "id" | "processId"
643
698
  */
644
699
  export interface ProcessDetailUiSnapshotResponseBody {
645
700
  process: ProcessUiSnapshotProcess;
701
+ /** Next turn on the declared happy path, including human decisions. */
702
+ plannedNextTurn?: Pick<ProcessSelectedTurnSummary, "turnId" | "description"> | null;
646
703
  /** Durable requests in Chronicle order; at most one is open for the current turn. */
647
704
  questionRequests: ProcessQuestionRequest[];
705
+ toolApprovalRequests: ProcessToolApprovalRequest[];
648
706
  leafOutcomeSnapshots: ProcessLeafOutcomeSnapshot[];
649
707
  processDisplayName: string | null;
650
708
  processFlow: ProcessFlowView;
@@ -660,6 +718,9 @@ export interface ProcessDetailUiSnapshotResponseBody {
660
718
  timeline: ProcessTimelineSnapshot;
661
719
  instanceTree: ProcessInstanceTreeResponseBody;
662
720
  recovery: CurrentTurnRecoverySummary | null;
721
+ /** Authoritative startup history and current remediation. */
722
+ startup: ProcessStartupSummary;
723
+ /** Compatibility alias for startup.recovery. */
663
724
  startupRecovery: StartupRecoverySummary | null;
664
725
  processError: CurrentProcessErrorSummary | null;
665
726
  usageEstimate: ProcessUsageEstimateSnapshot | null;
@@ -667,6 +728,7 @@ export interface ProcessDetailUiSnapshotResponseBody {
667
728
  session: {
668
729
  signature: string | null;
669
730
  };
731
+ sessionTransfer: SessionTransferOperationView | null;
670
732
  }
671
733
  export type InstanceTreeTurnResultState = "succeeded" | "failed" | "aborted" | "pending";
672
734
  /** Redacted, semantic process history. Pi message/activity categories are never exposed. */
@@ -693,6 +755,8 @@ export interface ProcessInstanceTreeResponseBody {
693
755
  edges: InstanceTreeEdgeSummary[];
694
756
  }
695
757
  export interface TurnReasoningDetailResponseBody {
758
+ state: "live" | "committed";
759
+ throughEventSequence: number;
696
760
  instanceId: string;
697
761
  turnRecordId: string;
698
762
  sessionSignature: string | null;
@@ -745,6 +809,11 @@ export interface LauncherMutationResponseBody {
745
809
  errors?: LauncherValidationError[];
746
810
  error?: string | null;
747
811
  }
812
+ export interface FutureLaunchMutationResponseBody {
813
+ kind: "scheduled";
814
+ futureExecution: FutureLaunchSummary | null;
815
+ error?: string | null;
816
+ }
748
817
  export type ScheduledActionMutationResponseBody = {
749
818
  kind?: "scheduled";
750
819
  scheduledAction?: ScheduledActionDetail | null;
@@ -759,7 +828,7 @@ export type PrimaryPathSnapshotResponseBody = PrimaryPathSnapshot;
759
828
  export type CronPreviewResponseBody = {
760
829
  nextRunAt: string;
761
830
  };
762
- type ParsedLauncherRequestBody = {
831
+ export type ParsedLauncherRequestBody = {
763
832
  title: string | null;
764
833
  titleProvided: boolean;
765
834
  launcherInput: Record<string, unknown>;
@@ -770,7 +839,7 @@ type ParsedLauncherRequestBody = {
770
839
  schedule: ParsedScheduleRequest;
771
840
  scheduleProvided: boolean;
772
841
  };
773
- type ParsedActionRequestBody = {
842
+ export type ParsedActionRequestBody = {
774
843
  input: Record<string, unknown>;
775
844
  inputProvided: boolean;
776
845
  nextTurnModelProfileId?: string | null;
@@ -859,7 +928,9 @@ declare const normalizeFutureLaunchPayload: (payload: FutureLaunchPayloadBase) =
859
928
  };
860
929
  modelConfig: {
861
930
  defaultModelProfileId: string | null;
862
- turnConfigs: InstanceTurnConfigMap;
931
+ turnConfigs: {
932
+ [x: string]: import("@leitwerk-dev/domain").InstanceTurnConfigInput;
933
+ };
863
934
  };
864
935
  actor: Actor | null;
865
936
  selectedSkillIds: string[];
@@ -933,5 +1004,5 @@ export declare function parseFutureLaunchPayloadJson(payloadJson: string): Parse
933
1004
  export declare function serializeFutureActionPayload(payload: unknown): string;
934
1005
  export declare function parseFutureActionPayloadObject(value: unknown, context?: string): ParseResult<FutureActionPayload>;
935
1006
  export declare function parseFutureActionPayloadJson(payloadJson: string): ParseResult<FutureActionPayload>;
936
- export {};
1007
+ export type { ApiTokenMetadata, ApiTokenPolicy, ApiTokensResponseBody, CreateApiTokenResponseBody, } from "./api-token-contracts.js";
937
1008
  //# sourceMappingURL=http-contracts.d.ts.map