@overdeck/contracts 0.69.0 → 0.71.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
@@ -108,7 +108,8 @@ const IssueAttention = effect.Schema.Literals([
108
108
  "needs-you",
109
109
  "stuck",
110
110
  "api-error",
111
- "work-not-started"
111
+ "work-not-started",
112
+ "pr-outside-pipeline"
112
113
  ]);
113
114
  /** Latest review decision on the PR, as the forge reports it. */
114
115
  const PrReviewState = effect.Schema.Literals([
@@ -151,6 +152,14 @@ const DerivedWorkStart = effect.Schema.Struct({
151
152
  /** The retry is journaled but not actually running because the Deacon is frozen (PAN-4210). Present only when true. */
152
153
  held: effect.Schema.optional(effect.Schema.Literal(true))
153
154
  });
155
+ /** An open pull request the pipeline never picked up (PAN-4605). */
156
+ const DerivedPrOutsidePipeline = effect.Schema.Struct({
157
+ prNumber: effect.Schema.Number,
158
+ /** One operator-facing paragraph naming the PR, the reason and the exact commands. */
159
+ fix: effect.Schema.String,
160
+ /** The other worktree that has the branch checked out, when that is the reason. */
161
+ worktreePath: effect.Schema.optional(effect.Schema.String)
162
+ });
154
163
  /** Everything the dashboard needs to render an issue's pipeline position. */
155
164
  const DerivedIssueState = effect.Schema.Struct({
156
165
  issueId: effect.Schema.String,
@@ -165,7 +174,9 @@ const DerivedIssueState = effect.Schema.Struct({
165
174
  */
166
175
  trackerUnknown: effect.Schema.optional(effect.Schema.Literal(true)),
167
176
  /** A deferred or gave-up post-planning auto-start read from the workspace journal (PAN-4399). */
168
- workStart: effect.Schema.optional(DerivedWorkStart)
177
+ workStart: effect.Schema.optional(DerivedWorkStart),
178
+ /** An outside PR the pipeline never picked up (PAN-4605). */
179
+ prOutsidePipeline: effect.Schema.optional(DerivedPrOutsidePipeline)
169
180
  });
170
181
  const ISSUE_STATES = [
171
182
  "backlog",
@@ -194,7 +205,8 @@ const ISSUE_ATTENTIONS = [
194
205
  "needs-you",
195
206
  "stuck",
196
207
  "api-error",
197
- "work-not-started"
208
+ "work-not-started",
209
+ "pr-outside-pipeline"
198
210
  ];
199
211
  function isIssueState(value) {
200
212
  return typeof value === "string" && ISSUE_STATES.includes(value);
@@ -220,6 +232,7 @@ const GITHUB_QUOTA_CALLERS = [
220
232
  "app-rest",
221
233
  "quota-sampler",
222
234
  "agent",
235
+ "pr-adoption",
223
236
  "other"
224
237
  ];
225
238
  const GitHubQuotaCaller = effect.Schema.Literals(GITHUB_QUOTA_CALLERS);
@@ -1552,7 +1565,8 @@ const BeadsFreshnessChangedEvent = effect.Schema.Struct({
1552
1565
  * (PAN-3537).
1553
1566
  *
1554
1567
  * Emitted by the `check_suite` webhook handler for live updates, only after an
1555
- * independent branch-head lookup verifies the payload SHA is still current.
1568
+ * independent lookup verifies the payload SHA is still the current CI head
1569
+ * (the newest push run of the CI workflow, PAN-4618).
1556
1570
  * `suiteId` is the check suite id — for GitHub Actions that is one suite per
1557
1571
  * workflow run. The webhook payload does not carry `htmlUrl`.
1558
1572
  *
@@ -1575,15 +1589,16 @@ const ProjectCiSuiteObservedEvent = effect.Schema.Struct({
1575
1589
  conclusion: effect.Schema.NullOr(effect.Schema.String),
1576
1590
  htmlUrl: effect.Schema.optional(effect.Schema.String),
1577
1591
  observedAt: effect.Schema.String,
1578
- /** True only after the emitter verified headSha against the branch head. */
1592
+ /** True only after the emitter verified headSha against the current CI head. */
1579
1593
  authoritativeHead: effect.Schema.optional(effect.Schema.Boolean)
1580
1594
  })
1581
1595
  });
1582
1596
  /**
1583
- * Complete GitHub Actions projection for the verified default-branch head.
1584
- * The REST seed/repair emits one event after paginating every run and verifying
1585
- * the branch head a second time. An empty suites record explicitly clears stale
1586
- * CI when the current commit has no Actions runs.
1597
+ * Complete GitHub Actions projection for the verified current CI head (the
1598
+ * newest push run of the CI workflow, PAN-4618). The REST seed/repair emits
1599
+ * one event after paginating every run and verifying the CI head a second
1600
+ * time. An empty suites record explicitly clears stale CI when the current
1601
+ * commit has no Actions runs.
1587
1602
  */
1588
1603
  const ProjectCiHeadObservedEvent = effect.Schema.Struct({
1589
1604
  type: effect.Schema.Literal("project.ci_head_observed"),
@@ -3216,7 +3231,8 @@ const EditorIdSchema = effect.Schema.Literals([
3216
3231
  ]);
3217
3232
  const OpenInEditorInput = effect.Schema.Struct({
3218
3233
  cwd: effect.Schema.String,
3219
- editor: EditorIdSchema
3234
+ editor: EditorIdSchema,
3235
+ reveal: effect.Schema.optional(effect.Schema.Boolean)
3220
3236
  });
3221
3237
  //#endregion
3222
3238
  //#region src/effort.ts
@@ -3575,15 +3591,20 @@ const ReadFileAtPathResult = effect.Schema.Struct({
3575
3591
  text: effect.Schema.String,
3576
3592
  lang: effect.Schema.String,
3577
3593
  mtimeMs: effect.Schema.Number,
3578
- totalLines: effect.Schema.Number
3594
+ totalLines: effect.Schema.Number,
3595
+ /** True when the resolved file is inside a registered project root or OVERDECK_HOME, so writeFileAtPath will accept it (PAN-4583). */
3596
+ writable: effect.Schema.Boolean
3579
3597
  });
3580
3598
  /**
3581
3599
  * 10b-2. Read an allowlisted markdown file by absolute path (PAN-3260).
3582
3600
  *
3583
3601
  * Unlike ReadWorkspaceFileRpc this takes no issueId — the internal markdown
3584
3602
  * editor pane opens files reached from surfaces with no workspace context
3585
- * (e.g. a repo-root file chip inside a conversation). The server validates
3586
- * `path` against registered project roots + OVERDECK_HOME before reading.
3603
+ * (e.g. a repo-root file chip inside a conversation). The server reads any
3604
+ * existing markdown file whose realpath is inside the operator's home
3605
+ * directory or a write root (registered project roots + OVERDECK_HOME), and
3606
+ * sets `writable` to whether it is inside a write root (PAN-4583). Writes
3607
+ * stay limited to the write roots — see WriteFileAtPathRpc.
3587
3608
  */
3588
3609
  const ReadFileAtPathRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.readFileAtPath, {
3589
3610
  payload: ReadFileAtPathInput,
@@ -3602,6 +3623,8 @@ const WriteFileAtPathResult = effect.Schema.Struct({ mtimeMs: effect.Schema.Numb
3602
3623
  * `expectedMtimeMs` enables optimistic concurrency: a stale value is
3603
3624
  * rejected with a PanRpcError code of WRITE_CONFLICT and nothing is
3604
3625
  * written. Omitting it (e.g. an explicit Overwrite action) skips the check.
3626
+ * The path must resolve inside a registered project root or OVERDECK_HOME;
3627
+ * anything else rejects with PATH_NOT_ALLOWED.
3605
3628
  */
3606
3629
  const WriteFileAtPathRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.writeFileAtPath, {
3607
3630
  payload: WriteFileAtPathInput,
@@ -6726,6 +6749,7 @@ const TELEMETRY_PROPERTY_DOMAINS = {
6726
6749
  "app_rest",
6727
6750
  "quota_sampler",
6728
6751
  "agent",
6752
+ "pr_adoption",
6729
6753
  "other"
6730
6754
  ],
6731
6755
  harness: [
@@ -16554,6 +16578,7 @@ exports.DeepWipeRpc = DeepWipeRpc;
16554
16578
  exports.DeployStalenessSnapshot = DeployStalenessSnapshot;
16555
16579
  exports.DerivedBranchState = DerivedBranchState;
16556
16580
  exports.DerivedIssueState = DerivedIssueState;
16581
+ exports.DerivedPrOutsidePipeline = DerivedPrOutsidePipeline;
16557
16582
  exports.DerivedPrState = DerivedPrState;
16558
16583
  exports.DerivedWorkStart = DerivedWorkStart;
16559
16584
  exports.DirectoryEntry = DirectoryEntry;