jackherd 1.25.0 → 1.26.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/CHANGELOG.md +4 -0
- package/INSTALL.md +1 -1
- package/README.md +19 -19
- package/herdr-plugin/herdr-plugin.toml +1 -1
- package/install.sh +1 -1
- package/kit/hooks/hooks/open-question/record.ts +81 -1
- package/kit/hooks/hooks/open-question/run.ts +17 -3
- package/kit/hooks/hooks/question-session-end/index.ts +18 -0
- package/kit/hooks/hooks/question-session-end/run.ts +37 -0
- package/kit/hooks/hooks/sent-file/record.ts +4 -1
- package/kit/hooks/hooks.json +8 -0
- package/kit/workflow/skills/orchestrate/references/waiting.md +15 -1
- package/package.json +1 -1
- package/src/check/skill-budget-defaults.ts +3 -1
- package/src/plans/closable-records.ts +11 -10
- package/src/plans/close-reason.ts +19 -0
- package/src/plans/live.ts +2 -1
- package/src/plans/question-records.ts +23 -2
- package/src/plans/questions-read.ts +2 -2
- package/src/plans/sent-files-read.ts +2 -2
- package/src/plans/sent-files.ts +12 -4
- package/src/waiting/command.ts +82 -26
- package/src/watch/command.ts +95 -1
- package/src/watch/lane-report.ts +4 -0
- package/src/watch/obsolete-proposals.ts +175 -0
- package/src/watch/obsolete-records.ts +77 -0
- package/src/watch/reference-paths.ts +2 -0
- package/src/watch/watch-events.ts +20 -0
|
@@ -23,6 +23,13 @@ import { isLaneModels, LANE_MODEL_EVENT, type LaneModelEvent, type LaneModels }
|
|
|
23
23
|
import { isLaneParallels, LANE_PARALLEL_EVENT, type LaneParallelEvent, type LaneParallels } from './lane-parallel'
|
|
24
24
|
import { isStallState, LANE_STALLED_EVENT, type LaneStalledEvent, type StallState } from './lane-stalled'
|
|
25
25
|
import { type LaneSnapshot, type SeenSeqs, seenSeqsOf } from './lane-watch'
|
|
26
|
+
import {
|
|
27
|
+
isProposalState,
|
|
28
|
+
type ProposalState,
|
|
29
|
+
WAITING_OBSOLETE_EVENT,
|
|
30
|
+
type WaitingObsoleteEvent,
|
|
31
|
+
} from './obsolete-proposals'
|
|
32
|
+
import { WAITING_CLOSED_EVENT, type WaitingClosedEvent } from './obsolete-records'
|
|
26
33
|
import { isPlanMissingState, PLAN_MISSING_EVENT, type PlanMissingEvent, type PlanMissingState } from './plan-missing'
|
|
27
34
|
import { emptyPreviewState, isPreviewState, PREVIEW_EVENT, type PreviewEvent, type PreviewState } from './previews'
|
|
28
35
|
import { PULL_REQUEST_STATE, type WatchedPullRequest } from './pull-requests'
|
|
@@ -71,6 +78,8 @@ export const WATCH_EVENT = {
|
|
|
71
78
|
laneStalled: LANE_STALLED_EVENT,
|
|
72
79
|
unlinkedArtifact: UNLINKED_ARTIFACT_EVENT,
|
|
73
80
|
planMissing: PLAN_MISSING_EVENT,
|
|
81
|
+
waitingClosed: WAITING_CLOSED_EVENT,
|
|
82
|
+
waitingObsolete: WAITING_OBSOLETE_EVENT,
|
|
74
83
|
approval: APPROVAL_EVENT,
|
|
75
84
|
source: SOURCE_EVENT,
|
|
76
85
|
due: APPOINTMENT_EVENT.due,
|
|
@@ -137,6 +146,10 @@ export type WatchState = {
|
|
|
137
146
|
unlinkedArtifacts: UnlinkedState
|
|
138
147
|
/** Per working lane whose board row links a plan the base ref lacks: the plan last reported as `plan missing on base`. */
|
|
139
148
|
planMissing: PlanMissingState
|
|
149
|
+
/** The lanes of open waiting points whose directory was missing at the last heartbeat; missing twice in a row, a lane is gone. */
|
|
150
|
+
waitingMissingLanes: string[]
|
|
151
|
+
/** Per open waiting point (record id or board row key): the reasons already proposed as `waiting obsolete?`. */
|
|
152
|
+
waitingProposals: ProposalState
|
|
140
153
|
/** The ids of the approval requests on disk when they were last read, each reported once while it is open. */
|
|
141
154
|
approvals: string[]
|
|
142
155
|
/** Per configured source of `watch.sources`: the entries seen (`[id, fingerprint]`) and the start of a failure streak. */
|
|
@@ -207,6 +220,8 @@ export type WatchEvent =
|
|
|
207
220
|
| LaneStalledEvent
|
|
208
221
|
| UnlinkedArtifactEvent
|
|
209
222
|
| PlanMissingEvent
|
|
223
|
+
| WaitingClosedEvent
|
|
224
|
+
| WaitingObsoleteEvent
|
|
210
225
|
| ApprovalEvent
|
|
211
226
|
| SourceEvent
|
|
212
227
|
| AppointmentEvent
|
|
@@ -248,6 +263,8 @@ export const emptyWatchState = (): WatchState => ({
|
|
|
248
263
|
laneStalls: {},
|
|
249
264
|
unlinkedArtifacts: {},
|
|
250
265
|
planMissing: {},
|
|
266
|
+
waitingMissingLanes: [],
|
|
267
|
+
waitingProposals: {},
|
|
251
268
|
approvals: [],
|
|
252
269
|
sources: emptySourceState(),
|
|
253
270
|
watchedSources: null,
|
|
@@ -304,6 +321,9 @@ const isWatchState = (value: Record<string, unknown>): value is WatchState =>
|
|
|
304
321
|
isStallState(value.laneStalls) &&
|
|
305
322
|
isUnlinkedState(value.unlinkedArtifacts) &&
|
|
306
323
|
isPlanMissingState(value.planMissing) &&
|
|
324
|
+
Array.isArray(value.waitingMissingLanes) &&
|
|
325
|
+
value.waitingMissingLanes.every((lane) => typeof lane === 'string') &&
|
|
326
|
+
isProposalState(value.waitingProposals) &&
|
|
307
327
|
Array.isArray(value.approvals) &&
|
|
308
328
|
value.approvals.every((id) => typeof id === 'string') &&
|
|
309
329
|
isSourceState(value.sources) &&
|