@overdeck/contracts 0.84.0 → 0.86.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.cjs CHANGED
@@ -173,6 +173,14 @@ const DerivedPrOutsidePipeline = effect.Schema.Struct({
173
173
  /** The other worktree that has the branch checked out, when that is the reason. */
174
174
  worktreePath: effect.Schema.optional(effect.Schema.String)
175
175
  });
176
+ /**
177
+ * PAN-5279: a merged PR on an open epic's feature branch. An epic lands in
178
+ * slices, so a merged slice is progress, never the epic shipping.
179
+ */
180
+ const DerivedMergedSlice = effect.Schema.Struct({
181
+ number: effect.Schema.Number,
182
+ url: effect.Schema.String
183
+ });
176
184
  /** Everything the dashboard needs to render an issue's pipeline position. */
177
185
  const DerivedIssueState = effect.Schema.Struct({
178
186
  issueId: effect.Schema.String,
@@ -189,7 +197,13 @@ const DerivedIssueState = effect.Schema.Struct({
189
197
  /** A deferred or gave-up post-planning auto-start read from the workspace journal (PAN-4399). */
190
198
  workStart: effect.Schema.optional(DerivedWorkStart),
191
199
  /** An outside PR the pipeline never picked up (PAN-4605). */
192
- prOutsidePipeline: effect.Schema.optional(DerivedPrOutsidePipeline)
200
+ prOutsidePipeline: effect.Schema.optional(DerivedPrOutsidePipeline),
201
+ /**
202
+ * PAN-5279: the issue is an open epic and this merged PR is one of its
203
+ * slices. Present instead of `pr`, so no reader takes slice 1's review,
204
+ * checks or merge for the epic's own.
205
+ */
206
+ mergedSlice: effect.Schema.optional(DerivedMergedSlice)
193
207
  });
194
208
  const ISSUE_STATES = [
195
209
  "backlog",
@@ -6081,7 +6095,9 @@ const FlywheelNeedsYouItem = effect.Schema.Struct({
6081
6095
  /** The first-raised tick message's `createdAt`. */
6082
6096
  firstRaisedAt: effect.Schema.String,
6083
6097
  /** The first-raised tick message's id, when the harness records one. */
6084
- firstRaisedMessageId: effect.Schema.optional(effect.Schema.String)
6098
+ firstRaisedMessageId: effect.Schema.optional(effect.Schema.String),
6099
+ /** The first-raised message's prose without its tick line (PAN-5283 D18). */
6100
+ context: effect.Schema.optional(effect.Schema.String)
6085
6101
  });
6086
6102
  const NEEDS_YOU_TARGET_RE = /^(.*?)\s*<(https?:\/\/[^\s<>]+)>\s*$/i;
6087
6103
  /**
@@ -6148,6 +6164,82 @@ const FlywheelAgentSummary = effect.Schema.Struct({
6148
6164
  state: effect.Schema.String,
6149
6165
  agentId: effect.Schema.optional(effect.Schema.String)
6150
6166
  });
6167
+ /** The lane an in-flight card sits in (PAN-5283 D1). */
6168
+ const FlywheelStage = effect.Schema.Literals([
6169
+ "plan",
6170
+ "build",
6171
+ "checks",
6172
+ "review",
6173
+ "merge"
6174
+ ]);
6175
+ /** Who drives an issue (PAN-5283 D3). */
6176
+ const FlywheelOwner = effect.Schema.Union([
6177
+ effect.Schema.Struct({ kind: effect.Schema.Literal("flywheel") }),
6178
+ effect.Schema.Struct({
6179
+ kind: effect.Schema.Literal("conversation"),
6180
+ name: effect.Schema.String,
6181
+ title: effect.Schema.NullOr(effect.Schema.String)
6182
+ }),
6183
+ effect.Schema.Struct({ kind: effect.Schema.Literal("operator") })
6184
+ ]);
6185
+ /** The agent a card shows (PAN-5283 D4): a live pane, or a handoff conversation. */
6186
+ const FlywheelCardAgent = effect.Schema.Struct({
6187
+ /** The pane role, or `handoff` for a handoff conversation. */
6188
+ role: effect.Schema.String,
6189
+ model: effect.Schema.NullOr(effect.Schema.String),
6190
+ harness: effect.Schema.NullOr(effect.Schema.String),
6191
+ state: effect.Schema.Literals([
6192
+ "working",
6193
+ "blocked",
6194
+ "idle",
6195
+ "waiting",
6196
+ "unknown"
6197
+ ]),
6198
+ agentId: effect.Schema.optional(effect.Schema.String),
6199
+ conversationName: effect.Schema.optional(effect.Schema.String)
6200
+ });
6201
+ const FlywheelBlockerKind = effect.Schema.Literals([
6202
+ "gate-queue",
6203
+ "agent-question",
6204
+ "agent-error",
6205
+ "start-failed",
6206
+ "pr-outside-pipeline",
6207
+ "agent-stuck",
6208
+ "test-removal-waiver",
6209
+ "verification-failed",
6210
+ "ci-failed",
6211
+ "feedback-undelivered",
6212
+ "merge-failed",
6213
+ "auto-merge-scheduled",
6214
+ "auto-merge-blocked",
6215
+ "train-batch",
6216
+ "train-paused",
6217
+ "ci-red",
6218
+ "merge-conflict",
6219
+ "declared-blocked",
6220
+ "review-stalled",
6221
+ "no-agent"
6222
+ ]);
6223
+ /** One plain-language sentence on why a card is not moving (PAN-5283 D11). */
6224
+ const FlywheelBlocker = effect.Schema.Struct({
6225
+ kind: FlywheelBlockerKind,
6226
+ severity: effect.Schema.Literals([
6227
+ "waiting",
6228
+ "stuck",
6229
+ "needs-you"
6230
+ ]),
6231
+ text: effect.Schema.String,
6232
+ action: effect.Schema.optional(effect.Schema.Literals([
6233
+ "waive-test-removal",
6234
+ "start-issue",
6235
+ "answer-agent"
6236
+ ]))
6237
+ });
6238
+ /** The newest journal entry, as a plain-text label. */
6239
+ const FlywheelActivity = effect.Schema.Struct({
6240
+ at: effect.Schema.String,
6241
+ label: effect.Schema.String
6242
+ });
6151
6243
  const FlywheelInFlightRow = effect.Schema.Struct({
6152
6244
  issueId: effect.Schema.String,
6153
6245
  /** The tracker's title, or `null` when no tracker answered for this issue. */
@@ -6163,7 +6255,15 @@ const FlywheelInFlightRow = effect.Schema.Struct({
6163
6255
  liveAgents: effect.Schema.Number,
6164
6256
  /** The loop named this id in its newest tick marker's in-flight list. */
6165
6257
  inTick: effect.Schema.Boolean,
6166
- lastJournal: effect.Schema.NullOr(FlywheelJournalSummary)
6258
+ lastJournal: effect.Schema.NullOr(FlywheelJournalSummary),
6259
+ stage: effect.Schema.optional(FlywheelStage),
6260
+ stageSince: effect.Schema.optional(effect.Schema.NullOr(effect.Schema.String)),
6261
+ owner: effect.Schema.optional(FlywheelOwner),
6262
+ agent: effect.Schema.optional(effect.Schema.NullOr(FlywheelCardAgent)),
6263
+ blocker: effect.Schema.optional(effect.Schema.NullOr(FlywheelBlocker)),
6264
+ /** USD spent on the issue, or `null` when unknown. */
6265
+ cost: effect.Schema.optional(effect.Schema.NullOr(effect.Schema.Number)),
6266
+ lastActivity: effect.Schema.optional(effect.Schema.NullOr(FlywheelActivity))
6167
6267
  });
6168
6268
  const FlywheelOrderBookSummary = effect.Schema.Struct({
6169
6269
  id: effect.Schema.String,
@@ -6172,6 +6272,73 @@ const FlywheelOrderBookSummary = effect.Schema.Struct({
6172
6272
  landed: effect.Schema.Number,
6173
6273
  total: effect.Schema.Number
6174
6274
  });
6275
+ /** One PR merge on the default branch since local midnight (PAN-5283 D12). */
6276
+ const FlywheelShippedMerge = effect.Schema.Struct({
6277
+ sha: effect.Schema.String,
6278
+ at: effect.Schema.String,
6279
+ subject: effect.Schema.String,
6280
+ prNumber: effect.Schema.Number,
6281
+ prUrl: effect.Schema.NullOr(effect.Schema.String),
6282
+ issueId: effect.Schema.NullOr(effect.Schema.String),
6283
+ title: effect.Schema.NullOr(effect.Schema.String),
6284
+ /** `null` when deploy does not apply to this project (PAN-5283 D13). */
6285
+ deployed: effect.Schema.NullOr(effect.Schema.Boolean)
6286
+ });
6287
+ const FlywheelShippedEvent = effect.Schema.Union([
6288
+ effect.Schema.Struct({
6289
+ kind: effect.Schema.Literal("merge"),
6290
+ at: effect.Schema.String,
6291
+ merge: FlywheelShippedMerge
6292
+ }),
6293
+ effect.Schema.Struct({
6294
+ kind: effect.Schema.Literal("deploy"),
6295
+ at: effect.Schema.String,
6296
+ trigger: effect.Schema.String,
6297
+ issueId: effect.Schema.NullOr(effect.Schema.String),
6298
+ initiator: effect.Schema.NullOr(effect.Schema.String)
6299
+ }),
6300
+ effect.Schema.Struct({
6301
+ kind: effect.Schema.Literal("release"),
6302
+ at: effect.Schema.String,
6303
+ tag: effect.Schema.String,
6304
+ url: effect.Schema.NullOr(effect.Schema.String)
6305
+ })
6306
+ ]);
6307
+ const FlywheelShipped = effect.Schema.Struct({
6308
+ merges: effect.Schema.Array(FlywheelShippedMerge),
6309
+ events: effect.Schema.Array(FlywheelShippedEvent)
6310
+ });
6311
+ /** Facts the global header does not show (PAN-5283 FR-9). Server route only. */
6312
+ const FlywheelHealth = effect.Schema.Struct({
6313
+ mainCi: effect.Schema.NullOr(effect.Schema.Struct({
6314
+ conclusion: effect.Schema.String,
6315
+ sha: effect.Schema.String,
6316
+ url: effect.Schema.NullOr(effect.Schema.String),
6317
+ at: effect.Schema.String
6318
+ })),
6319
+ deployed: effect.Schema.NullOr(effect.Schema.Struct({
6320
+ buildCommit: effect.Schema.String,
6321
+ behindVerdict: effect.Schema.NullOr(effect.Schema.Number)
6322
+ })),
6323
+ gateQueue: effect.Schema.Struct({
6324
+ running: effect.Schema.Number,
6325
+ queued: effect.Schema.Number,
6326
+ slots: effect.Schema.Number,
6327
+ oldestWaitSince: effect.Schema.NullOr(effect.Schema.String)
6328
+ }),
6329
+ nextBatch: effect.Schema.NullOr(effect.Schema.Struct({
6330
+ name: effect.Schema.String,
6331
+ status: effect.Schema.String,
6332
+ members: effect.Schema.Array(effect.Schema.String),
6333
+ createdAt: effect.Schema.String
6334
+ })),
6335
+ batchingPausedUntil: effect.Schema.NullOr(effect.Schema.String),
6336
+ lastRelease: effect.Schema.NullOr(effect.Schema.Struct({
6337
+ tag: effect.Schema.String,
6338
+ at: effect.Schema.String,
6339
+ url: effect.Schema.NullOr(effect.Schema.String)
6340
+ }))
6341
+ });
6175
6342
  const FlywheelDerivedStatus = effect.Schema.Struct({
6176
6343
  run: FlywheelRunState,
6177
6344
  conversation: effect.Schema.NullOr(FlywheelConversationSummary),
@@ -6188,8 +6355,15 @@ const FlywheelDerivedStatus = effect.Schema.Struct({
6188
6355
  inFlightSource: effect.Schema.Literals(["tick", "census"]),
6189
6356
  orderBook: effect.Schema.NullOr(FlywheelOrderBookSummary),
6190
6357
  projectRoot: effect.Schema.String,
6191
- generatedAt: effect.Schema.String
6358
+ generatedAt: effect.Schema.String,
6359
+ /** Added by the status route, never by `pan flywheel status` (PAN-5283 D7). */
6360
+ health: effect.Schema.optional(FlywheelHealth),
6361
+ shipped: effect.Schema.optional(FlywheelShipped)
6192
6362
  });
6363
+ /** Cards on the Deploy and Done-today lanes. */
6364
+ function shippedCardCount(status) {
6365
+ return status.shipped?.merges.length ?? 0;
6366
+ }
6193
6367
  const decodeFlywheelDerivedStatus = effect.Schema.decodeUnknownSync(FlywheelDerivedStatus);
6194
6368
  //#endregion
6195
6369
  //#region src/orders.ts
@@ -11903,6 +12077,12 @@ const COMPOSER_COMMAND_MANIFEST = [
11903
12077
  "required": true,
11904
12078
  "valueHint": "dir"
11905
12079
  },
12080
+ {
12081
+ "flags": "--origin <origin>",
12082
+ "description": "Who the workspace is for: operator (listed in the sidebar) or agent (hidden). Default: agent inside an Overdeck agent or conversation, else operator. Pass --origin operator when the operator asked for the workspace.",
12083
+ "required": true,
12084
+ "valueHint": "origin"
12085
+ },
11906
12086
  {
11907
12087
  "flags": "--dry-run",
11908
12088
  "description": "Print the resolved intent as JSON and create nothing",
@@ -20794,6 +20974,7 @@ exports.DeepWipeRpc = DeepWipeRpc;
20794
20974
  exports.DeployStalenessSnapshot = DeployStalenessSnapshot;
20795
20975
  exports.DerivedBranchState = DerivedBranchState;
20796
20976
  exports.DerivedIssueState = DerivedIssueState;
20977
+ exports.DerivedMergedSlice = DerivedMergedSlice;
20797
20978
  exports.DerivedPrOutsidePipeline = DerivedPrOutsidePipeline;
20798
20979
  exports.DerivedPrState = DerivedPrState;
20799
20980
  exports.DerivedWorkStart = DerivedWorkStart;
@@ -20898,16 +21079,21 @@ exports.FleetProjectRow = FleetProjectRow;
20898
21079
  exports.FleetProjectsResponse = FleetProjectsResponse;
20899
21080
  exports.FleetUpdateJobSchema = FleetUpdateJobSchema;
20900
21081
  exports.FleetUpdateMode = FleetUpdateMode;
21082
+ exports.FlywheelActivity = FlywheelActivity;
20901
21083
  exports.FlywheelAgent = FlywheelAgent;
20902
21084
  exports.FlywheelAgentStatus = FlywheelAgentStatus;
20903
21085
  exports.FlywheelAgentSummary = FlywheelAgentSummary;
21086
+ exports.FlywheelBlocker = FlywheelBlocker;
21087
+ exports.FlywheelBlockerKind = FlywheelBlockerKind;
20904
21088
  exports.FlywheelBugRateCriterion = FlywheelBugRateCriterion;
21089
+ exports.FlywheelCardAgent = FlywheelCardAgent;
20905
21090
  exports.FlywheelConversationSummary = FlywheelConversationSummary;
20906
21091
  exports.FlywheelDerivedStatus = FlywheelDerivedStatus;
20907
21092
  exports.FlywheelEffort = FlywheelEffort;
20908
21093
  exports.FlywheelFreshness = FlywheelFreshness;
20909
21094
  exports.FlywheelHarness = FlywheelHarness;
20910
21095
  exports.FlywheelHeadline = FlywheelHeadline;
21096
+ exports.FlywheelHealth = FlywheelHealth;
20911
21097
  exports.FlywheelHttpUrl = FlywheelHttpUrl;
20912
21098
  exports.FlywheelInFlightRow = FlywheelInFlightRow;
20913
21099
  exports.FlywheelJournalSummary = FlywheelJournalSummary;
@@ -20916,6 +21102,7 @@ exports.FlywheelNeedsYouItem = FlywheelNeedsYouItem;
20916
21102
  exports.FlywheelOrchestrator = FlywheelOrchestrator;
20917
21103
  exports.FlywheelOrderBookSummary = FlywheelOrderBookSummary;
20918
21104
  exports.FlywheelOrders = FlywheelOrders;
21105
+ exports.FlywheelOwner = FlywheelOwner;
20919
21106
  exports.FlywheelP0Criterion = FlywheelP0Criterion;
20920
21107
  exports.FlywheelParkedItem = FlywheelParkedItem;
20921
21108
  exports.FlywheelPipelineItem = FlywheelPipelineItem;
@@ -20925,6 +21112,10 @@ exports.FlywheelPolicies = FlywheelPolicies;
20925
21112
  exports.FlywheelRunId = FlywheelRunId;
20926
21113
  exports.FlywheelRunState = FlywheelRunState;
20927
21114
  exports.FlywheelScope = FlywheelScope;
21115
+ exports.FlywheelShipped = FlywheelShipped;
21116
+ exports.FlywheelShippedEvent = FlywheelShippedEvent;
21117
+ exports.FlywheelShippedMerge = FlywheelShippedMerge;
21118
+ exports.FlywheelStage = FlywheelStage;
20928
21119
  exports.FlywheelStats = FlywheelStats;
20929
21120
  exports.FlywheelStatsCriterionStatus = FlywheelStatsCriterionStatus;
20930
21121
  exports.FlywheelStatsTrend = FlywheelStatsTrend;
@@ -21332,6 +21523,7 @@ exports.repoFromRemoteUrl = repoFromRemoteUrl;
21332
21523
  exports.resolveEffectivePullRequest = resolveEffectivePullRequest;
21333
21524
  exports.resolveTrackerIssueId = resolveTrackerIssueId;
21334
21525
  exports.sharedPromptRefusal = sharedPromptRefusal;
21526
+ exports.shippedCardCount = shippedCardCount;
21335
21527
  exports.slugifyThemeId = slugifyThemeId;
21336
21528
  exports.splitNeedsYouItems = splitNeedsYouItems;
21337
21529
  exports.syncSnapshot = syncSnapshot;