@overdeck/contracts 0.30.2 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -70,15 +70,17 @@ const VerificationStatusValue = Schema.Literals([
70
70
  ]);
71
71
  const KNOWN_HARNESSES = new Set([
72
72
  "claude-code",
73
- "pi",
73
+ "ohmypi",
74
74
  "codex"
75
75
  ]);
76
76
  /**
77
77
  * Normalize a snapshot's runtime field to a known Harness value.
78
78
  * Unknown or missing values fall back to 'claude-code' (the default harness).
79
+ * Legacy 'pi' values are normalized to 'ohmypi' on read (PAN-1989).
79
80
  */
80
81
  function getHarness(snapshot) {
81
82
  const raw = snapshot?.runtime;
83
+ if (raw === "pi") return "ohmypi";
82
84
  if (raw && KNOWN_HARNESSES.has(raw)) return raw;
83
85
  return "claude-code";
84
86
  }
@@ -432,6 +434,20 @@ const ReviewerRoundMetadata = Schema.Struct({
432
434
  latestReviewResult: Schema.optional(Schema.String),
433
435
  history: Schema.Array(ReviewerRoundSummary)
434
436
  });
437
+ const ModelOriginEntry = Schema.Struct({
438
+ model: Schema.String,
439
+ weight: Schema.Number,
440
+ lo: Schema.Number,
441
+ hi: Schema.Number,
442
+ chosen: Schema.Boolean
443
+ });
444
+ const ModelOrigin = Schema.Struct({
445
+ spawnKey: Schema.String,
446
+ resolved: Schema.String,
447
+ bucket: Schema.Number,
448
+ total: Schema.Number,
449
+ distribution: Schema.Array(ModelOriginEntry)
450
+ });
435
451
  const SessionNode = Schema.Struct({
436
452
  type: SessionNodeType,
437
453
  role: Schema.optional(Schema.String),
@@ -457,7 +473,8 @@ const SessionNode = Schema.Struct({
457
473
  ])),
458
474
  paused: Schema.optional(Schema.Boolean),
459
475
  pausedReason: Schema.optional(Schema.String),
460
- pausedAt: Schema.optional(Schema.String)
476
+ pausedAt: Schema.optional(Schema.String),
477
+ modelOrigin: Schema.optional(ModelOrigin)
461
478
  });
462
479
  const FeatureNode = Schema.Struct({
463
480
  issueId: IssueId,
@@ -1925,6 +1942,7 @@ const FlywheelHttpUrl = Schema.String.check(Schema.isPattern(/^https?:\/\/\S+$/i
1925
1942
  const FlywheelHarness = Schema.Literals([
1926
1943
  "claude-code",
1927
1944
  "pi",
1945
+ "ohmypi",
1928
1946
  "codex"
1929
1947
  ]);
1930
1948
  const FlywheelEffort = Schema.Literals([
@@ -3910,7 +3928,7 @@ const CONTEXT_LAYER_KINDS = [
3910
3928
  ];
3911
3929
  const CONTEXT_PREVIEW_HARNESSES = [
3912
3930
  "claude-code",
3913
- "pi",
3931
+ "ohmypi",
3914
3932
  "codex"
3915
3933
  ];
3916
3934
  const ContextLayerKind = Schema.Literals(CONTEXT_LAYER_KINDS);
@@ -4016,7 +4034,7 @@ const ContextPreviewRequest = Schema.Struct({
4016
4034
  });
4017
4035
  const ContextHarnessPreviews = Schema.Struct({
4018
4036
  "claude-code": Schema.String,
4019
- pi: Schema.String,
4037
+ ohmypi: Schema.String,
4020
4038
  codex: Schema.String,
4021
4039
  fullPrompt: Schema.String
4022
4040
  });
@@ -4070,6 +4088,7 @@ const ArtifactAgentRole = Schema.Literals([
4070
4088
  const ArtifactAgentHarness = Schema.Literals([
4071
4089
  "claude-code",
4072
4090
  "pi",
4091
+ "ohmypi",
4073
4092
  "codex",
4074
4093
  "user"
4075
4094
  ]);
@@ -4194,6 +4213,6 @@ const FeatureRegistryEntry = Schema.Struct({
4194
4213
  tags: Schema.Array(Schema.String)
4195
4214
  });
4196
4215
  //#endregion
4197
- export { Activity, ActivityDetailedEvent, ActivityEntryEvent, ActivityTtsEvent, ActivityUpdatedEvent, AgentActivityChangedEvent, AgentChannelReply, AgentChannelReplyEvent, AgentCompletedEvent, AgentContextSaturationChangedEvent, AgentCreatedEvent, AgentCurrentIssueSetEvent, AgentEnrichmentChangedEvent, AgentHeartbeatDeadEvent, AgentId, AgentMessageReceivedEvent, AgentModelSetEvent, AgentOutput, AgentOutputReceivedEvent, AgentPermissionRequestedEvent, AgentPermissionResolvedEvent, AgentResolution, AgentResolutionChangedEvent, AgentRuntimeSnapshot, AgentSnapshot, AgentStartedEvent, AgentStateRestoredEvent, AgentStatus, AgentStatusChangedEvent, AgentStoppedEvent, AgentThinkingStartedEvent, AgentThinkingStoppedEvent, AgentTurnDiffCompletedEvent, AgentWaitingClearedEvent, AgentWaitingStartedEvent, ArtifactAgentHarness, ArtifactAgentRole, ArtifactCreateResponse, ArtifactDetailResponse, ArtifactHash, ArtifactId, ArtifactLifecycleState, ArtifactListEntry, ArtifactListResponse, ArtifactMetadata, ArtifactPublishResponse, ArtifactSlug, ArtifactStatusResponse, ArtifactUnshareResponse, ArtifactUrls, ArtifactValidationCode, ArtifactValidationFinding, ArtifactValidationResult, CHANNEL_REPLY_KIND_VALUES, CONTEXT_LAYER_KINDS, CONTEXT_PREVIEW_HARNESSES, ChannelPermissionRequestSnapshot, ChannelReplyArtifactRef, ChannelReplyKind, ChatMessage, ClaudeChannelPermissionBehavior, CompactBoundary, ContextEditableLayerRecord, ContextHarnessPreviews, ContextLayerDraft, ContextLayerKind, ContextLayerSaveRequest, ContextLayerSaveResponse, ContextLayerTarget, ContextLayersResponse, ContextPreviewDiagnostic, ContextPreviewHarness, ContextPreviewRequest, ContextPreviewResponse, ContextProjectSummary, ContextSyncRequest, ContextSyncResponse, ContextSyncTarget, ContextUsage, ContextWorkspaceSummary, ConversationCompactingChangedEvent, ConversationCostSummary, ConversationCreatedEvent, ConversationEvent, ConversationFilter, ConversationPermissionChangedEvent, CostEventRecordedEvent, DEFAULT_MAX_MEMORY_OBSERVATIONS_PER_ISSUE, DEFAULT_MAX_TURN_DIFF_SUMMARIES_PER_AGENT, DashboardLifecycleCompletedEvent, DashboardLifecycleFailedEvent, DashboardLifecycleStartedEvent, DashboardSnapshot, DeepWipeRpc, DiscoveredSessionSnapshot, DomainEvent, EDITORS, EditorIdSchema, EmbedProgressEvent, EmbedProgressSnapshot, EmbedSessionsRpc, EnrichCompleteEvent, EnrichProgressEvent, EnrichProgressSnapshot, EnrichSessionsRpc, EnrichStatsSnapshot, ExtractionProviderConfig, ExtractionProviderTarget, FeatureNode, FeatureRegistryEntry, FeatureRegistryStatus, FlywheelAgent, FlywheelAgentStatus, FlywheelEffort, FlywheelHarness, FlywheelHeadline, FlywheelHttpUrl, FlywheelOrchestrator, FlywheelParkedItem, FlywheelPipelineItem, FlywheelPipelineStatus, FlywheelPipelineVerb, FlywheelRunId, FlywheelStats, FlywheelStatsCriteria, FlywheelStatsCriterion, FlywheelStatsCriterionStatus, FlywheelStatsCriterionValue, FlywheelStatsCriterionValueObject, FlywheelStatsTrend, FlywheelStatus, FlywheelSubstrateBug, FlywheelSubstrateBugStatus, FlywheelSuggestion, FlywheelSuggestionAction, FlywheelSuggestionPriority, FlywheelSystemStatus, GetAvailableEditorsRpc, GetConversationCostByWorkspaceRpc, GetConversationCostRpc, GetConversationStatsRpc, GetDiscoveredSessionRpc, GetSnapshotRpc, GetWorkspaceDetailRpc, GlobalContextLayerRecord, GlobalContextLayerTarget, INITIAL_READ_MODEL_STATE, IssueId, IssueStatusChangedEvent, IssuesSnapshotEvent, IssuesUpdatedEvent, ListDiscoveredSessionsRpc, MAX_CHANNEL_REPLY_ARTIFACT_LABEL_LENGTH, MAX_CHANNEL_REPLY_ARTIFACT_REFS, MAX_CHANNEL_REPLY_ARTIFACT_URI_LENGTH, MAX_CHANNEL_REPLY_SUMMARY_LENGTH, MemoryHealthChangedEvent, MemoryIdentity, MemoryObservation, MemoryObservationCreatedEvent, MemoryResetMarkerCreatedEvent, MemoryRollupTriggeredEvent, MemoryStatus, MemoryStatusPhase, MemoryStatusUpdatedEvent, MemoryTokenUsage, MergeReadyEvent, MergeStatusValue, OpenInEditorInput, OperatorInterventionEvent, PanRpcError, PanRpcGroup, PendingTurn, PipelineReviewCompletedEvent, PipelineReviewStartedEvent, PipelineStatusChangedEvent, PipelineTestCompletedEvent, PipelineTestStartedEvent, PlanItemStatusChangedEvent, PlanItemsUnblockedEvent, PlanSubitemStatusChangedEvent, PlanningFailedEvent, PlanningStartedEvent, PlanningSyncEvent, ProjectContextLayerRecord, ProjectContextLayerTarget, ProjectSessionTree, ProposedPlan, RagDecision, RagDecisionSource, ReadWorkspaceFileInput, ReadWorkspaceFileResult, ReadWorkspaceFileRpc, ReplayEventsRpc, ResetMarker, ResetMarkerScope, ResizeTerminalRpc, ResolveFilePathExistsInput, ResolveFilePathExistsResult, ResolveFilePathExistsRpc, ResourceStats, ResourcesUpdatedEvent, ReviewApprovedEvent, ReviewCoordinatorDiedEvent, ReviewCoordinatorStartedEvent, ReviewReviewerCompletedEvent, ReviewReviewerStartedEvent, ReviewSpecialistTimedOutEvent, ReviewStatusChangedEvent, ReviewStatusSnapshot, ReviewStatusValue, ReviewerRoundMetadata, ReviewerRoundSummary, Role, ScanCompleteEvent, ScanConversationsRpc, ScanProgressEvent, ScanProgressSnapshot, ScanResult, ScanStartedEvent, SearchConversationsRpc, SendTerminalInputRpc, SequenceNumber, SessionNode, SessionNodePresence, SessionNodeType, SessionTreeDelta, ShadowInferenceUpdateEvent, ShellOpenInEditorRpc, SpecialistCompletedEvent, SpecialistFailedEvent, SpecialistStartedEvent, StartAgentRpc, StartPlanningRpc, SubscribeAgentOutputRpc, SubscribeConversationMessagesRpc, SubscribeDomainEventsRpc, SubscribeFlywheelStatusRpc, SubscribeIssueEventsRpc, SubscribeProjectSessionTreeRpc, SubscribeTerminalRpc, SubstrateBugFiledEvent, SystemHealthSeverityChangedEvent, SystemHeartbeatEvent, TerminalCloseRpc, TerminalOpenRpc, TerminalOutput, TerminalResizeRpc, TerminalWriteRpc, TestPassedEvent, TestStatusValue, ThinkingState, TurnDiffFileChange, TurnDiffSummary, UatStatusValue, VerificationStatusValue, WS_METHODS, WaitingReason, WaitingState, WorkCompletedEvent, WorkLogEntry, WorkspaceAbortedEvent, WorkspaceArtifactsResponse, WorkspaceContextLayerRecord, WorkspaceContextLayerTarget, WorkspaceCreatedEvent, WorkspaceDeletedEvent, WorkspaceDestroyedEvent, WorkspaceDetail, WorkspaceWipeStartedEvent, applyEvent, applyEvents, decodeFlywheelStats, encodeFlywheelStats, getHarness, getMaxMemoryObservationsPerIssue, getMaxTurnDiffSummariesPerAgent, isChannelReplyKind, isTerminalTurnDiffSummaryStatus, normalizeChannelReplyPayload, omitTurnDiffSummariesForAgent, syncSnapshot, trimMemoryObservations, trimTurnDiffSummaries };
4216
+ export { Activity, ActivityDetailedEvent, ActivityEntryEvent, ActivityTtsEvent, ActivityUpdatedEvent, AgentActivityChangedEvent, AgentChannelReply, AgentChannelReplyEvent, AgentCompletedEvent, AgentContextSaturationChangedEvent, AgentCreatedEvent, AgentCurrentIssueSetEvent, AgentEnrichmentChangedEvent, AgentHeartbeatDeadEvent, AgentId, AgentMessageReceivedEvent, AgentModelSetEvent, AgentOutput, AgentOutputReceivedEvent, AgentPermissionRequestedEvent, AgentPermissionResolvedEvent, AgentResolution, AgentResolutionChangedEvent, AgentRuntimeSnapshot, AgentSnapshot, AgentStartedEvent, AgentStateRestoredEvent, AgentStatus, AgentStatusChangedEvent, AgentStoppedEvent, AgentThinkingStartedEvent, AgentThinkingStoppedEvent, AgentTurnDiffCompletedEvent, AgentWaitingClearedEvent, AgentWaitingStartedEvent, ArtifactAgentHarness, ArtifactAgentRole, ArtifactCreateResponse, ArtifactDetailResponse, ArtifactHash, ArtifactId, ArtifactLifecycleState, ArtifactListEntry, ArtifactListResponse, ArtifactMetadata, ArtifactPublishResponse, ArtifactSlug, ArtifactStatusResponse, ArtifactUnshareResponse, ArtifactUrls, ArtifactValidationCode, ArtifactValidationFinding, ArtifactValidationResult, CHANNEL_REPLY_KIND_VALUES, CONTEXT_LAYER_KINDS, CONTEXT_PREVIEW_HARNESSES, ChannelPermissionRequestSnapshot, ChannelReplyArtifactRef, ChannelReplyKind, ChatMessage, ClaudeChannelPermissionBehavior, CompactBoundary, ContextEditableLayerRecord, ContextHarnessPreviews, ContextLayerDraft, ContextLayerKind, ContextLayerSaveRequest, ContextLayerSaveResponse, ContextLayerTarget, ContextLayersResponse, ContextPreviewDiagnostic, ContextPreviewHarness, ContextPreviewRequest, ContextPreviewResponse, ContextProjectSummary, ContextSyncRequest, ContextSyncResponse, ContextSyncTarget, ContextUsage, ContextWorkspaceSummary, ConversationCompactingChangedEvent, ConversationCostSummary, ConversationCreatedEvent, ConversationEvent, ConversationFilter, ConversationPermissionChangedEvent, CostEventRecordedEvent, DEFAULT_MAX_MEMORY_OBSERVATIONS_PER_ISSUE, DEFAULT_MAX_TURN_DIFF_SUMMARIES_PER_AGENT, DashboardLifecycleCompletedEvent, DashboardLifecycleFailedEvent, DashboardLifecycleStartedEvent, DashboardSnapshot, DeepWipeRpc, DiscoveredSessionSnapshot, DomainEvent, EDITORS, EditorIdSchema, EmbedProgressEvent, EmbedProgressSnapshot, EmbedSessionsRpc, EnrichCompleteEvent, EnrichProgressEvent, EnrichProgressSnapshot, EnrichSessionsRpc, EnrichStatsSnapshot, ExtractionProviderConfig, ExtractionProviderTarget, FeatureNode, FeatureRegistryEntry, FeatureRegistryStatus, FlywheelAgent, FlywheelAgentStatus, FlywheelEffort, FlywheelHarness, FlywheelHeadline, FlywheelHttpUrl, FlywheelOrchestrator, FlywheelParkedItem, FlywheelPipelineItem, FlywheelPipelineStatus, FlywheelPipelineVerb, FlywheelRunId, FlywheelStats, FlywheelStatsCriteria, FlywheelStatsCriterion, FlywheelStatsCriterionStatus, FlywheelStatsCriterionValue, FlywheelStatsCriterionValueObject, FlywheelStatsTrend, FlywheelStatus, FlywheelSubstrateBug, FlywheelSubstrateBugStatus, FlywheelSuggestion, FlywheelSuggestionAction, FlywheelSuggestionPriority, FlywheelSystemStatus, GetAvailableEditorsRpc, GetConversationCostByWorkspaceRpc, GetConversationCostRpc, GetConversationStatsRpc, GetDiscoveredSessionRpc, GetSnapshotRpc, GetWorkspaceDetailRpc, GlobalContextLayerRecord, GlobalContextLayerTarget, INITIAL_READ_MODEL_STATE, IssueId, IssueStatusChangedEvent, IssuesSnapshotEvent, IssuesUpdatedEvent, ListDiscoveredSessionsRpc, MAX_CHANNEL_REPLY_ARTIFACT_LABEL_LENGTH, MAX_CHANNEL_REPLY_ARTIFACT_REFS, MAX_CHANNEL_REPLY_ARTIFACT_URI_LENGTH, MAX_CHANNEL_REPLY_SUMMARY_LENGTH, MemoryHealthChangedEvent, MemoryIdentity, MemoryObservation, MemoryObservationCreatedEvent, MemoryResetMarkerCreatedEvent, MemoryRollupTriggeredEvent, MemoryStatus, MemoryStatusPhase, MemoryStatusUpdatedEvent, MemoryTokenUsage, MergeReadyEvent, MergeStatusValue, ModelOrigin, ModelOriginEntry, OpenInEditorInput, OperatorInterventionEvent, PanRpcError, PanRpcGroup, PendingTurn, PipelineReviewCompletedEvent, PipelineReviewStartedEvent, PipelineStatusChangedEvent, PipelineTestCompletedEvent, PipelineTestStartedEvent, PlanItemStatusChangedEvent, PlanItemsUnblockedEvent, PlanSubitemStatusChangedEvent, PlanningFailedEvent, PlanningStartedEvent, PlanningSyncEvent, ProjectContextLayerRecord, ProjectContextLayerTarget, ProjectSessionTree, ProposedPlan, RagDecision, RagDecisionSource, ReadWorkspaceFileInput, ReadWorkspaceFileResult, ReadWorkspaceFileRpc, ReplayEventsRpc, ResetMarker, ResetMarkerScope, ResizeTerminalRpc, ResolveFilePathExistsInput, ResolveFilePathExistsResult, ResolveFilePathExistsRpc, ResourceStats, ResourcesUpdatedEvent, ReviewApprovedEvent, ReviewCoordinatorDiedEvent, ReviewCoordinatorStartedEvent, ReviewReviewerCompletedEvent, ReviewReviewerStartedEvent, ReviewSpecialistTimedOutEvent, ReviewStatusChangedEvent, ReviewStatusSnapshot, ReviewStatusValue, ReviewerRoundMetadata, ReviewerRoundSummary, Role, ScanCompleteEvent, ScanConversationsRpc, ScanProgressEvent, ScanProgressSnapshot, ScanResult, ScanStartedEvent, SearchConversationsRpc, SendTerminalInputRpc, SequenceNumber, SessionNode, SessionNodePresence, SessionNodeType, SessionTreeDelta, ShadowInferenceUpdateEvent, ShellOpenInEditorRpc, SpecialistCompletedEvent, SpecialistFailedEvent, SpecialistStartedEvent, StartAgentRpc, StartPlanningRpc, SubscribeAgentOutputRpc, SubscribeConversationMessagesRpc, SubscribeDomainEventsRpc, SubscribeFlywheelStatusRpc, SubscribeIssueEventsRpc, SubscribeProjectSessionTreeRpc, SubscribeTerminalRpc, SubstrateBugFiledEvent, SystemHealthSeverityChangedEvent, SystemHeartbeatEvent, TerminalCloseRpc, TerminalOpenRpc, TerminalOutput, TerminalResizeRpc, TerminalWriteRpc, TestPassedEvent, TestStatusValue, ThinkingState, TurnDiffFileChange, TurnDiffSummary, UatStatusValue, VerificationStatusValue, WS_METHODS, WaitingReason, WaitingState, WorkCompletedEvent, WorkLogEntry, WorkspaceAbortedEvent, WorkspaceArtifactsResponse, WorkspaceContextLayerRecord, WorkspaceContextLayerTarget, WorkspaceCreatedEvent, WorkspaceDeletedEvent, WorkspaceDestroyedEvent, WorkspaceDetail, WorkspaceWipeStartedEvent, applyEvent, applyEvents, decodeFlywheelStats, encodeFlywheelStats, getHarness, getMaxMemoryObservationsPerIssue, getMaxTurnDiffSummariesPerAgent, isChannelReplyKind, isTerminalTurnDiffSummaryStatus, normalizeChannelReplyPayload, omitTurnDiffSummariesForAgent, syncSnapshot, trimMemoryObservations, trimTurnDiffSummaries };
4198
4217
 
4199
4218
  //# sourceMappingURL=index.mjs.map