@hearsay-tools/squawk 0.18.0-pr4082.7810 → 0.18.0-pr4084.7814

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.
@@ -91,6 +91,17 @@ export declare function createDelegationRoutes(service: DelegationService, crede
91
91
  "/discover": {
92
92
  $post: {
93
93
  output: {
94
+ runner: string;
95
+ models: {
96
+ id: string;
97
+ label: string;
98
+ description: string;
99
+ effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
100
+ }[];
101
+ source: "cache" | "live" | "unavailable";
102
+ stale: boolean;
103
+ reason?: string | undefined;
104
+ } | {
94
105
  scope: "host-default-account";
95
106
  runners: {
96
107
  requiresAccountHome?: boolean | undefined;
@@ -112,17 +123,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
112
123
  reason?: string | undefined;
113
124
  }[];
114
125
  nextOffset?: number | undefined;
115
- } | {
116
- runner: string;
117
- models: {
118
- id: string;
119
- label: string;
120
- description: string;
121
- effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
122
- }[];
123
- source: "cache" | "live" | "unavailable";
124
- stale: boolean;
125
- reason?: string | undefined;
126
126
  };
127
127
  outputFormat: "json";
128
128
  status: 200;
@@ -207,13 +207,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
207
207
  status: 200;
208
208
  input: {
209
209
  json: {
210
- workerIds: string[];
211
- timeoutSeconds?: number | undefined;
212
- mode?: "all" | "any" | "one" | undefined;
213
- } | {
214
210
  requestIds: string[];
215
211
  mode?: "all" | "any" | "one" | undefined;
216
212
  timeoutSeconds?: number | undefined;
213
+ } | {
214
+ workerIds: string[];
215
+ timeoutSeconds?: number | undefined;
216
+ mode?: "all" | "any" | "one" | undefined;
217
217
  } | {
218
218
  peerIds: string[];
219
219
  timeoutSeconds?: number | undefined;
@@ -8,8 +8,9 @@
8
8
  * `.ai/specs/2026-11-21-run-lifecycle-and-store-ports.md`), and the port then points at the module
9
9
  * that implements it. A later slice may move a method between ports when its topic moves. The store stays the only writer of status and exit fields (ADR 0056).
10
10
  */
11
- import type { WorkerCollectedResult } from '../contract/index.js';
11
+ import type { ArchiveFinishedScope, ArchivePullRequestIdentity, MergedPullRequest, WorkerCollectedResult } from '../contract/index.js';
12
12
  import type { RunEvent, RunRecord, RunStore } from './store.ts';
13
+ import type { ArchiveOnMergeSnapshot } from './run-archive.ts';
13
14
  import type { TranscriptFacts } from './transcript-facts.ts';
14
15
  import type { WorkerExecution } from './worker-execution.ts';
15
16
  import type { WorkerProcessRecord } from '../core/process-stat.ts';
@@ -165,17 +166,43 @@ export interface RunRetention {
165
166
  deleteRun(id: string): boolean;
166
167
  fallbackDeleteError(id: string, kind?: 'record' | 'worktree'): string | undefined;
167
168
  }
168
- /** The archive methods. */
169
+ /** The archive flag, archive on merge and the compression of archived history (`runs/run-archive.ts`, `store.archive`). */
169
170
  export interface RunArchive {
170
- setArchived: RunStore['setArchived'];
171
- archiveFinished: RunStore['archiveFinished'];
172
- archiveOnMergeSnapshot: RunStore['archiveOnMergeSnapshot'];
173
- archiveAfterMerge: RunStore['archiveAfterMerge'];
174
- archiveMergeBlocker: RunStore['archiveMergeBlocker'];
175
- setArchiveBlocker: RunStore['setArchiveBlocker'];
176
- hasArchiveOnMergeAssociations: RunStore['hasArchiveOnMergeAssociations'];
177
- prepareArchiveOnMerge: RunStore['prepareArchiveOnMerge'];
178
- listArchiveOnMergeCandidates: RunStore['listArchiveOnMergeCandidates'];
171
+ setArchived(id: string, archived: boolean): RunRecord | undefined;
172
+ archiveFinished(scope?: ArchiveFinishedScope, automation?: boolean): {
173
+ archived: number;
174
+ ids: string[];
175
+ pinnedIds: string[];
176
+ };
177
+ archiveOnMergeSnapshot(id: string, repoBase?: string, isActive?: (id: string) => boolean): ArchiveOnMergeSnapshot | undefined;
178
+ archiveAfterMerge(snapshot: ArchiveOnMergeSnapshot, observations: readonly MergedPullRequest[], repoBase?: string, isActive?: (id: string) => boolean): boolean;
179
+ archiveMergeBlocker(snapshot: ArchiveOnMergeSnapshot, missing: ArchivePullRequestIdentity, repoBase?: string): void;
180
+ setArchiveBlocker(id: string, blocker: RunRecord['archiveBlocker']): void;
181
+ hasArchiveOnMergeAssociations(id: string): boolean;
182
+ prepareArchiveOnMerge(id: string): Promise<void>;
183
+ listArchiveOnMergeCandidates(afterSeq?: number, limit?: number): Array<{
184
+ id: string;
185
+ seq: number;
186
+ }>;
187
+ compressArchivedHistory(): void;
188
+ historyIdle(): Promise<void>;
189
+ }
190
+ /** The completion action a finished task waits on (`runs/run-archive.ts`, `store.archive`). */
191
+ export interface RunCompletionActions {
192
+ listCompletionCandidates(afterSeq?: number, limit?: number): Array<{
193
+ id: string;
194
+ seq: number;
195
+ }>;
196
+ canCompleteAction(id: string, token: string): boolean;
197
+ claimCompletionAction(id: string, token: string): boolean;
198
+ completeAction(id: string, token: string, phase: 'blocked' | 'complete', message?: string): boolean;
199
+ }
200
+ /** The user's pin and the read receipt (`runs/run-read-flags.ts`, `store.readFlags`). */
201
+ export interface RunReadFlags {
202
+ setPinned(id: string, pinned: boolean): RunRecord | undefined;
203
+ setRead(id: string): RunRecord | undefined;
204
+ setUnread(id: string): RunRecord | undefined;
205
+ markAllRead(automation?: boolean): number;
179
206
  }
180
207
  /** Whether this process may write a run, where its files are, and the redaction of its text. */
181
208
  export interface RunAccess {