@hearsay-tools/squawk 0.18.0-dev.7825 → 0.18.0-dev.7832
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/activity/read-model.d.ts +3 -1
- package/dist/activity/read-model.js +17 -15
- package/dist/activity/read-model.js.map +1 -1
- package/dist/activity/requests.d.ts +3 -1
- package/dist/activity/requests.js +1 -1
- package/dist/activity/requests.js.map +1 -1
- package/dist/automations/service.js +1 -1
- package/dist/automations/service.js.map +1 -1
- package/dist/automations/task-template.js +3 -3
- package/dist/automations/task-template.js.map +1 -1
- package/dist/ci-wait/controller.d.ts +46 -46
- package/dist/delegation/conversations.d.ts +6 -2
- package/dist/delegation/conversations.js +1 -1
- package/dist/delegation/conversations.js.map +1 -1
- package/dist/delegation/family-end.d.ts +4 -2
- package/dist/delegation/family-end.js +1 -1
- package/dist/delegation/family-end.js.map +1 -1
- package/dist/delegation/routes.d.ts +75 -75
- package/dist/delegation/scratch-cleanup.js +2 -2
- package/dist/delegation/scratch-cleanup.js.map +1 -1
- package/dist/delegation/task-discovery.js +1 -1
- package/dist/delegation/task-discovery.js.map +1 -1
- package/dist/delegation/transport.d.ts +14 -14
- package/dist/delegation/worker-cleanup.js +4 -4
- package/dist/delegation/worker-cleanup.js.map +1 -1
- package/dist/project-commands.js +1 -1
- package/dist/project-commands.js.map +1 -1
- package/dist/project-migration/live.js +1 -1
- package/dist/project-migration/live.js.map +1 -1
- package/dist/runs/branch-owners.d.ts +2 -2
- package/dist/runs/cold-reads.d.ts +1 -1
- package/dist/runs/cold-reads.js +1 -1
- package/dist/runs/live-tasks.js +1 -1
- package/dist/runs/live-tasks.js.map +1 -1
- package/dist/runs/ports.d.ts +50 -28
- package/dist/runs/retention.d.ts +4 -3
- package/dist/runs/retention.js +2 -2
- package/dist/runs/retention.js.map +1 -1
- package/dist/runs/run-cold-reads.d.ts +98 -0
- package/dist/runs/run-cold-reads.js +194 -0
- package/dist/runs/run-cold-reads.js.map +1 -0
- package/dist/runs/run-queries.d.ts +190 -0
- package/dist/runs/run-queries.js +480 -0
- package/dist/runs/run-queries.js.map +1 -0
- package/dist/runs/run-repo-scope.d.ts +38 -0
- package/dist/runs/run-repo-scope.js +78 -0
- package/dist/runs/run-repo-scope.js.map +1 -0
- package/dist/runs/store.d.ts +9 -222
- package/dist/runs/store.js +82 -738
- package/dist/runs/store.js.map +1 -1
- package/dist/serve-boot.d.ts +3 -1
- package/dist/serve-boot.js +2 -2
- package/dist/serve-boot.js.map +1 -1
- package/dist/server/models-routes.d.ts +13 -13
- package/dist/server/project-context.js +3 -3
- package/dist/server/project-context.js.map +1 -1
- package/dist/server/repo-branches.d.ts +5 -3
- package/dist/server/repo-branches.js +1 -1
- package/dist/server/repo-branches.js.map +1 -1
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/run-checkout.d.ts +3 -1
- package/dist/server/run-checkout.js +2 -2
- package/dist/server/run-checkout.js.map +1 -1
- package/dist/server/run-relationships.d.ts +3 -1
- package/dist/server/run-relationships.js +1 -1
- package/dist/server/run-relationships.js.map +1 -1
- package/dist/server/server.js +12 -12
- package/dist/server/server.js.map +1 -1
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/workflows/run/auto-resume.js +2 -2
- package/dist/workflows/run/auto-resume.js.map +1 -1
- package/dist/workflows/run/completion-gate.js +1 -1
- package/dist/workflows/run/completion-gate.js.map +1 -1
- package/dist/workflows/run/family-reconciler.js +8 -8
- package/dist/workflows/run/family-reconciler.js.map +1 -1
- package/dist/workflows/run/maintenance-claims.js +2 -2
- package/dist/workflows/run/maintenance-claims.js.map +1 -1
- package/dist/workflows/run/run-cancel.js +1 -1
- package/dist/workflows/run/run-cancel.js.map +1 -1
- package/dist/workflows/run/run-line.js +2 -2
- package/dist/workflows/run/run-line.js.map +1 -1
- package/dist/workflows/run/run-recovery.js +6 -6
- package/dist/workflows/run/run-recovery.js.map +1 -1
- package/dist/workflows/run/run-start.js +1 -1
- package/dist/workflows/run/run-start.js.map +1 -1
- package/dist/workflows/run/wake-admission.js +1 -1
- package/dist/workflows/run/wake-admission.js.map +1 -1
- package/dist/workflows/run/worker-questions.js +3 -3
- package/dist/workflows/run/worker-questions.js.map +1 -1
- package/dist/workflows/run.js +1 -1
- package/dist/workflows/run.js.map +1 -1
- package/package.json +4 -4
- package/scripts/benchmark-automation-lookups.ts +2 -2
- package/scripts/benchmark-conversation-lookup.ts +2 -2
- package/scripts/benchmark-family-reconcile.ts +1 -1
- package/scripts/benchmark-worktree-retention.ts +1 -1
- package/scripts/seed-archive-profile.ts +2 -2
package/dist/runs/store.d.ts
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { type RunLifecycleSource } from './lifecycle.ts';
|
|
2
|
-
import { type PeerTaskPageOptions } from './run-summary-page.ts';
|
|
3
|
-
export { parseStoredSummary } from './run-summary-page.ts';
|
|
4
2
|
import type { WorkerExecutionRecords, WorkerExecutions } from './ports.ts';
|
|
5
3
|
import { z } from 'zod';
|
|
6
4
|
import { queuedMessageSchema } from '../contract/index.js';
|
|
7
5
|
import { type WaitRegistrationReceipt } from '../contract/index.js';
|
|
8
|
-
import type {
|
|
9
|
-
import { type AutomationNames } from '../contract/index.js';
|
|
6
|
+
import type { ConversationState, AgentInput, InboxClaim, DelegationState, Wait, WorkerDestroyRetry } from '../contract/index.js';
|
|
10
7
|
import { RunTranscriptFacts } from './transcript-facts-topic.ts';
|
|
11
8
|
import { workflowDefSchema } from '../workflows/types.ts';
|
|
12
9
|
import { type OutcomeDependencies, type OutcomeReceipt, type RunOutcome } from './outcome-commit.ts';
|
|
13
10
|
import { type ExitCall, type RunExitId, type RunPatch } from './run-exits.ts';
|
|
14
11
|
import { type ConversationIdentity } from './conversation-identity.ts';
|
|
15
12
|
export { ConversationIdInUseError } from './conversation-identity.ts';
|
|
16
|
-
import { type BranchOwner } from './branch-owners.ts';
|
|
17
13
|
export { ciWaitEntry, holdsWorkerWait, upgradeLegacyWaits, workerWaitEntry } from './legacy-waits.ts';
|
|
18
14
|
import { RunRetentionTopic } from './run-retention.ts';
|
|
19
15
|
import { type RawExtras } from './raw-record.ts';
|
|
@@ -27,6 +23,8 @@ import { RunRedaction } from './run-redaction.ts';
|
|
|
27
23
|
import { RunArchiveTopic } from './run-archive.ts';
|
|
28
24
|
import { RunReadFlagsTopic } from './run-read-flags.ts';
|
|
29
25
|
import { RunPersistenceTopic, type RunStorePersistence } from './run-persistence.ts';
|
|
26
|
+
import { RunQueriesTopic } from './run-queries.ts';
|
|
27
|
+
import { RunRepoScopeTopic } from './run-repo-scope.ts';
|
|
30
28
|
export type RunStatus = 'queued' | 'running' | 'waiting' | 'review' | 'done' | 'failed' | 'cancelled';
|
|
31
29
|
export type StepStatus = 'pending' | 'running' | 'waiting' | 'review' | 'done' | 'failed' | 'cancelled' | 'skipped';
|
|
32
30
|
declare const stepStateSchema: z.ZodObject<{
|
|
@@ -3168,7 +3166,6 @@ export type RepoHandle = {
|
|
|
3168
3166
|
owner: string;
|
|
3169
3167
|
name: string;
|
|
3170
3168
|
};
|
|
3171
|
-
export { branchOwnerOf, type BranchOwner } from './branch-owners.ts';
|
|
3172
3169
|
/**
|
|
3173
3170
|
* Run rows in runs.db plus append-only NDJSON events and an in-process event bus. Hold live,
|
|
3174
3171
|
* pinned, related and unsettled records only. Optimistic writes debounce; durable commits
|
|
@@ -3199,10 +3196,6 @@ export declare class RunStore {
|
|
|
3199
3196
|
/** Deleted runs whose history files (events, handoff, images, artifacts) go once the delete of
|
|
3200
3197
|
* their row commits: until then a conflict can undo the delete and bring the row back. */
|
|
3201
3198
|
private readonly historyOwed;
|
|
3202
|
-
/** The repository this project IS (#945), armed after `open()` by `setRepoHandle`. Undefined
|
|
3203
|
-
* until it arrives and `null` when it cannot be known — both mean "unscoped", which is
|
|
3204
|
-
* exactly the pre-#945 behavior. */
|
|
3205
|
-
private repoHandle;
|
|
3206
3199
|
/** `open()`'s `keepLive`, which a run read later from `runs.db` is reconciled with too. */
|
|
3207
3200
|
private keepLive;
|
|
3208
3201
|
/** This store's identity in `run_claims`; undefined without a database. */
|
|
@@ -3217,16 +3210,8 @@ export declare class RunStore {
|
|
|
3217
3210
|
* created the row and has not written it yet. `extras` is what that `data` holds beyond the
|
|
3218
3211
|
* schema, which the next write of the row puts back (raw-record.ts). */
|
|
3219
3212
|
private readonly base;
|
|
3220
|
-
/** Rows read cold in the current synchronous turn, so a commit staged from one is fenced against
|
|
3221
|
-
* the version it was computed from. `owned`: its family was already this store's when read.
|
|
3222
|
-
* Cleared at the next microtask: no commit spans a turn. */
|
|
3223
|
-
private readonly coldBase;
|
|
3224
|
-
private readonly coldReads;
|
|
3225
3213
|
/** Rows a conflicting write excluded: this store refuses to write them until it is reopened. */
|
|
3226
3214
|
private readonly quarantined;
|
|
3227
|
-
/** Rows whose `data` this store tried to decode and could not: left in the database untouched,
|
|
3228
|
-
* and left out of the list rows from then on, as the cold reader leaves them out (run-index.ts). */
|
|
3229
|
-
private readonly unreadable;
|
|
3230
3215
|
/** The archive flag, archive on merge, completion actions and the transcript compressor (hearsay-tools/squawk#4041). */
|
|
3231
3216
|
readonly archive: RunArchiveTopic;
|
|
3232
3217
|
/** The pinned and read flags (hearsay-tools/squawk#4041). */
|
|
@@ -3247,6 +3232,12 @@ export declare class RunStore {
|
|
|
3247
3232
|
readonly runPins: RunPinsTopic;
|
|
3248
3233
|
/** Flush, persist, the fence, conflicts and the save debounce (hearsay-tools/squawk#4043). */
|
|
3249
3234
|
readonly persistence: RunPersistenceTopic;
|
|
3235
|
+
/** The held set's cold reads, holds and eviction (hearsay-tools/squawk#4044). */
|
|
3236
|
+
private readonly rows;
|
|
3237
|
+
/** The list and find queries (hearsay-tools/squawk#4044). */
|
|
3238
|
+
readonly queries: RunQueriesTopic;
|
|
3239
|
+
/** The repository this project is, and the repair of the runs it rescopes (hearsay-tools/squawk#4044). */
|
|
3240
|
+
readonly repoScope: RunRepoScopeTopic;
|
|
3250
3241
|
private executions;
|
|
3251
3242
|
/** A worker's execution, process, identity and scope records (hearsay-tools/squawk#4039), built on
|
|
3252
3243
|
* first use by the factory this process registered; throws when none is registered. */
|
|
@@ -3299,153 +3290,6 @@ export declare class RunStore {
|
|
|
3299
3290
|
/** Why this store has no database, when it is `RunStore.unavailable`'s: its runs are unknown,
|
|
3300
3291
|
* not absent. */
|
|
3301
3292
|
get unavailable(): RunStoreOpenError | undefined;
|
|
3302
|
-
/**
|
|
3303
|
-
* Whether a held run anchors itself (and its family) in memory. Anything else held is a family
|
|
3304
|
-
* member or a settled write, and leaves at the next sweep (`evictSettled`).
|
|
3305
|
-
*
|
|
3306
|
-
* The held set is: every run that is live (`isLiveRecord`), pinned by a RunManager (`pin`),
|
|
3307
|
-
* dirty, or inside a durable commit; plus the whole delegation family (root and direct
|
|
3308
|
-
* workers) of any such run. Families are held because the RunManager reads a live run's family
|
|
3309
|
-
* on every run event — `GET /runs/:id/relationships`, the global `reconcileWorkerWaits` pass
|
|
3310
|
-
* (about twenty call sites), completion blockers and conversations — and decoding a cold
|
|
3311
|
-
* record costs about 200 µs (JSON.parse plus the schema). Measured on a copy of a real
|
|
3312
|
-
* cockpit's `runs.json` (958 runs, 957 of them delegated): a running root with 26 workers
|
|
3313
|
-
* paid about 5 ms per family read, and the live families together about 10 ms per global
|
|
3314
|
-
* pass, all on the event loop. Holding them costs memory in proportion to active work, not to
|
|
3315
|
-
* history.
|
|
3316
|
-
*/
|
|
3317
|
-
private isAnchor;
|
|
3318
|
-
/** The family roots with an anchoring member in memory. */
|
|
3319
|
-
private anchoredFamilies;
|
|
3320
|
-
/** Drop every held run that is neither an anchor nor in an anchored family. A store without a
|
|
3321
|
-
* database keeps everything: memory is the only copy it has. */
|
|
3322
|
-
private evictSettled;
|
|
3323
|
-
/** A run read from `runs.db`, normalized like a loaded one (`reconcileLoadedRun`, then the
|
|
3324
|
-
* repository scope) but held by nobody. Undefined when absent, deleted or unreadable. */
|
|
3325
|
-
private loadCold;
|
|
3326
|
-
/** `loaded` sees the record once the load has normalized it, before it is scoped: a heal's `before`. */
|
|
3327
|
-
private decodeCold;
|
|
3328
|
-
/** Hold a writable row. A fallback family's reads stay detached (the cold-read contract). */
|
|
3329
|
-
private holdDecoded;
|
|
3330
|
-
/**
|
|
3331
|
-
* Hold a claimed run for a write; leave after settlement unless anchored.
|
|
3332
|
-
* Take the family claim before reading its row. Return undefined for a live foreign owner
|
|
3333
|
-
* or a fallback family: neither claim is granted.
|
|
3334
|
-
*/
|
|
3335
|
-
private hold;
|
|
3336
|
-
/** The record a store write changes in place: held, or loaded to be. Undefined for a run this
|
|
3337
|
-
* store may not write (another process's, or quarantined), so the write changes nothing. */
|
|
3338
|
-
private record;
|
|
3339
|
-
/** Read held legacy family members, or a detached cold record. */
|
|
3340
|
-
private peek;
|
|
3341
|
-
/**
|
|
3342
|
-
* A run just read off its row, as reads answer it: held when its family is in memory (a live
|
|
3343
|
-
* family's members are read on every run event), else a copy nobody holds — frozen under
|
|
3344
|
-
* vitest when it leaves the store (`freeze`).
|
|
3345
|
-
*/
|
|
3346
|
-
private answerCold;
|
|
3347
|
-
/** `getRun` for a row a query already read: the held object, else decoded from `row`. */
|
|
3348
|
-
private fromRow;
|
|
3349
|
-
/** Run `fn` reading each run that is not held at most once (`ColdReadCache`, hearsay-tools/cezarion#2378). */
|
|
3350
|
-
withReadCache<T>(fn: () => T): T;
|
|
3351
|
-
/** Whether the run exists, held or not, without decoding it. */
|
|
3352
|
-
private hasRun;
|
|
3353
|
-
/**
|
|
3354
|
-
* Set discovered repository identity without blocking boot. Recompute conclusions from retained
|
|
3355
|
-
* evidence, including cold records; null retains unknown-handle behavior.
|
|
3356
|
-
*/
|
|
3357
|
-
setRepoHandle(handle: RepoHandle | null): void;
|
|
3358
|
-
/** Whether the stored summary still names a reference the scoped record no longer has. */
|
|
3359
|
-
private storedScopeDiffers;
|
|
3360
|
-
/**
|
|
3361
|
-
* The live set, newest first: runs whose record is live (`isLiveRecord`) or that a RunManager
|
|
3362
|
-
* pins. Finished runs are not here — read one by id (`getRun`), by an indexed query
|
|
3363
|
-
* (`listWorkersOf`, `findRunByClientRequestId`, `listRunsWithWorktree`,
|
|
3364
|
-
* `listBranchOwners`), or as list rows (`listRunSummaries`).
|
|
3365
|
-
*/
|
|
3366
|
-
listRuns(): RunRecord[];
|
|
3367
|
-
/** Where a held run lists: its row's insertion order, or after every row while this store has
|
|
3368
|
-
* not written it yet. The held set keeps such runs in creation order, and so does every list
|
|
3369
|
-
* that sorts them in held-set order (`sortNewestFirst` is stable). */
|
|
3370
|
-
private listOrder;
|
|
3371
|
-
/**
|
|
3372
|
-
* EVERY run as a full record, newest first — decoded row by row. Only the legacy `GET /runs`
|
|
3373
|
-
* (older clients; the cockpit reads `GET /run-summaries`) may call this: it is exactly the
|
|
3374
|
-
* whole-history parse #779 exists to remove from everything else.
|
|
3375
|
-
*/
|
|
3376
|
-
listAllRunsForLegacyRoute(): RunRecord[];
|
|
3377
|
-
/** A bounded page of discoverable peer roots, including the current held overlay. */
|
|
3378
|
-
listPeerTaskSummaries(options: PeerTaskPageOptions): {
|
|
3379
|
-
runs: RunSummary[];
|
|
3380
|
-
nextOffset?: number;
|
|
3381
|
-
};
|
|
3382
|
-
/**
|
|
3383
|
-
* Every run as its list row, newest first: the stored `summary` column, with each held run's
|
|
3384
|
-
* own projection laid over it — a debounced save keeps memory up to 300 ms ahead of the row,
|
|
3385
|
-
* and a run created since the last save has no row yet. `usage` is the caller's to attach.
|
|
3386
|
-
*
|
|
3387
|
-
* With `archivedWindow` (#864), the window the cockpit's lists read: every unarchived run, plus
|
|
3388
|
-
* the newest `archivedWindow` archived ROOT runs, and whether older archived roots were left
|
|
3389
|
-
* out. Archived workers are never in it (see `RunDatabase.listWindowSummaries`); with `roots`,
|
|
3390
|
-
* no worker is — the runs index, whose readers list no workers. A held run
|
|
3391
|
-
* lists by its record, so one archived or unarchived since the last save is ranked as it is now.
|
|
3392
|
-
*
|
|
3393
|
-
* A row this store found unreadable is left out, as the cold reader leaves out a row it had to
|
|
3394
|
-
* decode and could not. A finished row nobody has decoded is served from its summary by both,
|
|
3395
|
-
* which decodes nothing; reading it is what finds out (`isUnreadable`).
|
|
3396
|
-
*/
|
|
3397
|
-
listRunSummaries(options?: {
|
|
3398
|
-
archivedWindow?: number | undefined;
|
|
3399
|
-
roots?: boolean;
|
|
3400
|
-
}): {
|
|
3401
|
-
runs: RunSummary[];
|
|
3402
|
-
truncated: boolean;
|
|
3403
|
-
};
|
|
3404
|
-
/**
|
|
3405
|
-
* One page of archived ROOT runs, newest first (#864): `GET /run-summaries/archived`, the
|
|
3406
|
-
* archived runs past the window. Held runs list by their record, as in `listRunSummaries`.
|
|
3407
|
-
* `before` is the previous page's `nextCursor`; with `q`, only runs `matchesRunSearch` keeps, and
|
|
3408
|
-
* `total` counts those. `automationNames` lets `q` match a task by its automation's name, as the
|
|
3409
|
-
* list's origin line shows it (hearsay-tools/cezarion#1616). A cursor this store did not write
|
|
3410
|
-
* answers `{ error }`.
|
|
3411
|
-
*
|
|
3412
|
-
* Ranking reads every archived root's key (id, created_at, seq: no record, no summary), so the
|
|
3413
|
-
* page and `total` agree with the held overlay; only the page's own rows are read in full.
|
|
3414
|
-
*/
|
|
3415
|
-
listArchivedRuns(options: {
|
|
3416
|
-
before?: string;
|
|
3417
|
-
limit: number;
|
|
3418
|
-
q?: string;
|
|
3419
|
-
automationNames?: AutomationNames;
|
|
3420
|
-
}): ArchivedRunsResponse | {
|
|
3421
|
-
error: string;
|
|
3422
|
-
};
|
|
3423
|
-
/** The archived roots in `runs.db`, each by its key: every one without `q` (no record, no
|
|
3424
|
-
* summary read), and with `q` the searched rows `matchesRunSearch` keeps, which carry the summary
|
|
3425
|
-
* the search read. A deleted, held or unreadable run's row is left out; a held run joins in
|
|
3426
|
-
* `overlayHeldArchived`. */
|
|
3427
|
-
private rankArchivedRows;
|
|
3428
|
-
/** Lay the held archived roots over `ranked`, each by its record: it replaces its stored row
|
|
3429
|
-
* (already left out of `ranked`), and with `q` it must match. A held worker never lists. */
|
|
3430
|
-
private overlayHeldArchived;
|
|
3431
|
-
/** The page of `ordered` after the cursor `after`: its summaries, the cursor of the next page,
|
|
3432
|
-
* and `total`, the count of all of `ordered`. */
|
|
3433
|
-
private archivedPage;
|
|
3434
|
-
/** The page's summaries: a ranked key's own, else its stored one, read for the rows that have
|
|
3435
|
-
* none in a single query. A row whose stored summary does not fit the contract is projected from
|
|
3436
|
-
* its record; a row that cannot be read at all is left out. */
|
|
3437
|
-
private hydrateArchivedPage;
|
|
3438
|
-
/**
|
|
3439
|
-
* The ROOT runs, archived or not, that match `query` (`matchesRunSearch`), newest first: at most
|
|
3440
|
-
* `limit`, and whether more matched. The owned half of the workspace search (#864); held runs
|
|
3441
|
-
* match by their record.
|
|
3442
|
-
*/
|
|
3443
|
-
searchRunSummaries(query: string, limit: number): {
|
|
3444
|
-
runs: RunSummary[];
|
|
3445
|
-
truncated: boolean;
|
|
3446
|
-
};
|
|
3447
|
-
/** A row whose stored summary does not fit the contract any more, projected from its record. */
|
|
3448
|
-
private coldSummary;
|
|
3449
3293
|
/**
|
|
3450
3294
|
* The run, or undefined. A held run is the held object (writes install into it). Any other run
|
|
3451
3295
|
* is a fresh copy of its row each call, normalized like a loaded record — frozen under vitest —
|
|
@@ -3455,61 +3299,6 @@ export declare class RunStore {
|
|
|
3455
3299
|
/** Whether the run's row is in `runs.db` but its record could not be read here: what tells a
|
|
3456
3300
|
* run that cannot open from one that does not exist. Known once something tried to read it. */
|
|
3457
3301
|
isUnreadable(id: string): boolean;
|
|
3458
|
-
/** The ids in memory right now: the held set, for diagnostics and the benchmark's heap pass. */
|
|
3459
|
-
heldIds(): string[];
|
|
3460
|
-
/**
|
|
3461
|
-
* The workers a root run owns, newest first, read off its own `receipts` (#659). Every
|
|
3462
|
-
* `createOwnedRun` writes the receipt and the worker record in one transaction, and the
|
|
3463
|
-
* receipt list is capped at 1,024 creations (#816), so this is a bounded lookup rather than a walk of the whole
|
|
3464
|
-
* project index. An ordinary or worker run owns nothing and costs one map read; a receipt
|
|
3465
|
-
* whose record has been deleted is skipped, never invented. A parent quarantined to
|
|
3466
|
-
* `invalid` has no readable receipts and reports none, which is also what the cockpit
|
|
3467
|
-
* assumes for that role.
|
|
3468
|
-
*/
|
|
3469
|
-
listOwnedWorkers(parentId: string): RunRecord[];
|
|
3470
|
-
/** Every worker filed under `parentId` (the `parent_run_id` index plus memory), newest first:
|
|
3471
|
-
* receipts or not, which is what the reconcile and deletion checks ask. */
|
|
3472
|
-
listWorkersOf(parentId: string): RunRecord[];
|
|
3473
|
-
/** The id of every worker, held or stored, without decoding any (recovery's worker passes). */
|
|
3474
|
-
listWorkerIds(): string[];
|
|
3475
|
-
/** The id of every run whose delegation is quarantined (`invalid`), held or stored: its stored
|
|
3476
|
-
* summary says so, so nothing is decoded (scratch cleanup). */
|
|
3477
|
-
listQuarantinedRunIds(): string[];
|
|
3478
|
-
/** All retained tasks this automation started, including variants, finished and archived runs.
|
|
3479
|
-
* Logs and receipts may compact independently. Read only matching keys in SQLite and overlay
|
|
3480
|
-
* held records so a debounced provenance update or deletion is reflected immediately. */
|
|
3481
|
-
countAutomationRuns(automationId: string): number;
|
|
3482
|
-
/** First non-archived task referencing a project issue, including secondary references. */
|
|
3483
|
-
findNonArchivedRunByIssue(repo: string, number: number): string | undefined;
|
|
3484
|
-
/**
|
|
3485
|
-
* The runs automation receipts launched, by receipt id (`automation.receiptId` or
|
|
3486
|
-
* `automationTrigger.receiptId`). Memory answers first; a receipt it does not know costs one
|
|
3487
|
-
* pass over `runs.db` that reads the records' JSON in SQLite — only a crash leftover (a
|
|
3488
|
-
* receipt still `reserved` at startup) ever asks.
|
|
3489
|
-
*/
|
|
3490
|
-
findRunIdsByAutomationReceipt(receiptIds: readonly string[]): Map<string, string>;
|
|
3491
|
-
/** The id of every root whose delegation carries a conversation, held or stored: recovery's full
|
|
3492
|
-
* reconcile pass (#661). `naming` keeps the ledgers whose messages name that run id as sender or
|
|
3493
|
-
* recipient. Stored roots come from the `conversation_members` index, so no record is read. */
|
|
3494
|
-
listConversationRootIds(naming?: string): string[];
|
|
3495
|
-
/** The id of every run, held or stored, without decoding any (orphan-worktree sweeps). */
|
|
3496
|
-
listRunIds(): string[];
|
|
3497
|
-
/** Runs with a materialized worktree directory (`worktreePath`, not reclaimed), most recently
|
|
3498
|
-
* finished first, then newest first: worktree retention and the worktrees panel. */
|
|
3499
|
-
listRunsWithWorktree(): RunRecord[];
|
|
3500
|
-
/**
|
|
3501
|
-
* Every run that owns a branch or names the PR it created, as the few fields branch cleanup and
|
|
3502
|
-
* git-log attribution read (issue 08 §B3, §B5; a squash commit is attributed by its PR number):
|
|
3503
|
-
* the stored summary plus the `branch` and `base_branch` columns, so a Git-tab request decodes
|
|
3504
|
-
* no record. Held runs answer from memory.
|
|
3505
|
-
*/
|
|
3506
|
-
listBranchOwners(): BranchOwner[];
|
|
3507
|
-
/** The rows a column query returned, as records, with memory laid over them: a held run
|
|
3508
|
-
* answers from memory (matching `matches` there, not on its maybe-older row). */
|
|
3509
|
-
private queryRuns;
|
|
3510
|
-
/** The run an idempotent start already created (#504), archived or not. A deleted run is gone
|
|
3511
|
-
* with its record, so a retry after deletion honestly creates a fresh one. */
|
|
3512
|
-
findRunByClientRequestId(clientRequestId: string): RunRecord | undefined;
|
|
3513
3302
|
createRun(input: Pick<RunRecord, 'allowWorkers' | 'allowMessaging'> & {
|
|
3514
3303
|
title: string;
|
|
3515
3304
|
systemPrompt?: string | undefined;
|
|
@@ -3634,8 +3423,6 @@ export declare class RunStore {
|
|
|
3634
3423
|
updateStep(runId: string, stepId: string, patch: Partial<Omit<StepState, 'id'>>): void;
|
|
3635
3424
|
/** A debounced write of the held record `id`: `apply` changes it in place, then `touch` saves it. */
|
|
3636
3425
|
private change;
|
|
3637
|
-
/** Indexed family enumeration, including members not yet flushed to SQLite. */
|
|
3638
|
-
listFamilyRunIds(rootId: string): string[];
|
|
3639
3426
|
private seqs;
|
|
3640
3427
|
/**
|
|
3641
3428
|
* Write what is pending and release the database (store disposal, process shutdown).
|