@adhdev/mesh-shared 1.0.82-rc.4 → 1.0.82-rc.40
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/assistant-protocol.d.ts +161 -6
- package/dist/decision-push-relay.d.ts +20 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +1197 -118
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1107 -118
- package/dist/index.mjs.map +1 -1
- package/dist/launch-defaults.d.ts +196 -0
- package/dist/mesh-tool-names.d.ts +2 -2
- package/dist/mesh-vocabulary.d.ts +13 -4
- package/dist/mission-git-state.d.ts +83 -0
- package/dist/mission-items.d.ts +202 -0
- package/dist/node-facts.d.ts +75 -1
- package/dist/outbound-message.d.ts +9 -2
- package/dist/path-ownership.d.ts +1 -1
- package/dist/protocol/daemon-server.d.ts +42 -2
- package/dist/protocol/dashboard-daemon-p2p.d.ts +1 -1
- package/dist/protocol/dashboard-server.d.ts +20 -2
- package/dist/provider-approval.d.ts +36 -0
- package/dist/provider-question.d.ts +19 -0
- package/dist/quota-freshness.d.ts +65 -0
- package/dist/relay-reprobe.d.ts +52 -0
- package/dist/release.d.ts +90 -0
- package/dist/role-launch.d.ts +11 -0
- package/dist/session-launch.d.ts +10 -22
- package/dist/slot-proposal.d.ts +14 -0
- package/dist/task-source-phase.d.ts +75 -0
- package/dist/turn-evidence.d.ts +29 -13
- package/dist/turn-ipc-mission.d.ts +68 -1
- package/dist/turn-ipc-queue.d.ts +19 -0
- package/dist/turn-ipc.d.ts +2 -2
- package/dist/types.d.ts +1 -0
- package/dist/worker-protocol.d.ts +1 -1
- package/package.json +1 -1
- package/src/assistant-protocol.ts +302 -6
- package/src/daemon-normalize.ts +7 -5
- package/src/decision-push-relay.ts +23 -0
- package/src/index.ts +12 -0
- package/src/keyed-doc-delta.ts +9 -1
- package/src/launch-defaults.ts +170 -0
- package/src/mesh-tool-names.ts +16 -0
- package/src/mesh-vocabulary.ts +12 -2
- package/src/mission-git-state.ts +112 -0
- package/src/mission-items.ts +421 -0
- package/src/node-facts.ts +70 -1
- package/src/outbound-message.ts +19 -0
- package/src/path-ownership.ts +4 -6
- package/src/protocol/daemon-server.ts +37 -2
- package/src/protocol/dashboard-server.ts +13 -2
- package/src/provider-approval.ts +59 -0
- package/src/provider-question.ts +31 -0
- package/src/quota-freshness.ts +139 -0
- package/src/relay-reprobe.ts +117 -0
- package/src/release.ts +121 -0
- package/src/role-launch.ts +51 -0
- package/src/session-launch.ts +17 -1
- package/src/slot-proposal.ts +61 -2
- package/src/task-source-phase.ts +61 -0
- package/src/turn-evidence.ts +27 -20
- package/src/turn-ipc-mission.ts +121 -11
- package/src/turn-ipc-queue.ts +29 -1
- package/src/turn-ipc-turn.ts +1 -1
- package/src/turn-ipc.ts +1 -0
- package/src/types.ts +1 -0
- package/src/worker-protocol.ts +15 -0
package/dist/turn-evidence.d.ts
CHANGED
|
@@ -40,7 +40,11 @@ export declare const DELIVERY_OUTCOMES: readonly ["delivered", "queued"];
|
|
|
40
40
|
export type DeliveryOutcome = typeof DELIVERY_OUTCOMES[number];
|
|
41
41
|
export declare const DELIVERY_VIAS: readonly ["local", "p2p"];
|
|
42
42
|
export type DeliveryVia = typeof DELIVERY_VIAS[number];
|
|
43
|
-
|
|
43
|
+
/** `submit_unconfirmed` (SUBMIT-UNCONFIRMED-RECLAIM): the worker's CLI never
|
|
44
|
+
* took the written prompt — the submit budget and one re-paste were spent at
|
|
45
|
+
* an idle composer. An owner daemon older than this value drops the evidence
|
|
46
|
+
* as invalid and falls back to its consume/turn holds (the pre-fix path). */
|
|
47
|
+
export declare const DISPATCH_FAILURE_REASONS: readonly ["worker_absent", "transport_error", "spawn_failed", "rejected_by_worker", "timeout", "submit_unconfirmed"];
|
|
44
48
|
export type DispatchFailureReason = typeof DISPATCH_FAILURE_REASONS[number];
|
|
45
49
|
/**
|
|
46
50
|
* Normalize a worker's own refusal code (e.g. `session_busy_with_task`,
|
|
@@ -58,20 +62,20 @@ export declare const SESSION_REBOUND_REASONS: readonly ["restart", "live_holder"
|
|
|
58
62
|
export type SessionReboundReason = typeof SESSION_REBOUND_REASONS[number];
|
|
59
63
|
export declare const SUSPENSION_MODALS: readonly ["approval", "choice"];
|
|
60
64
|
export type SuspensionModal = typeof SUSPENSION_MODALS[number];
|
|
61
|
-
export declare const SUSPENSION_RESOLUTIONS: readonly ["approved", "rejected", "answered"];
|
|
65
|
+
export declare const SUSPENSION_RESOLUTIONS: readonly ["approved", "rejected", "answered", "dismissed"];
|
|
62
66
|
export type SuspensionResolution = typeof SUSPENSION_RESOLUTIONS[number];
|
|
63
|
-
export declare const SUSPENSION_RESOLUTION_VIAS: readonly ["modal_button", "auto_approve", "prompt_answer"];
|
|
67
|
+
export declare const SUSPENSION_RESOLUTION_VIAS: readonly ["modal_button", "auto_approve", "prompt_answer", "modal_disappeared"];
|
|
64
68
|
export type SuspensionResolutionVia = typeof SUSPENSION_RESOLUTION_VIAS[number];
|
|
65
69
|
export declare const TURN_END_STRENGTHS: readonly ["genuine", "weak"];
|
|
66
70
|
export type TurnEndStrength = typeof TURN_END_STRENGTHS[number];
|
|
67
71
|
/** Why a provider-side weak end was released (was free text `blockReason`). */
|
|
68
72
|
export declare const TURN_END_BLOCK_REASONS: readonly ["missing_final_assistant", "finalization_timeout", "terminal_block_hard_cap", "decoupled_completion"];
|
|
69
73
|
export type TurnEndBlockReason = typeof TURN_END_BLOCK_REASONS[number];
|
|
70
|
-
export declare const NATIVE_TURN_OUTCOMES: readonly ["completed", "aborted"];
|
|
74
|
+
export declare const NATIVE_TURN_OUTCOMES: readonly ["completed", "aborted", "failed"];
|
|
71
75
|
export type NativeTurnOutcome = typeof NATIVE_TURN_OUTCOMES[number];
|
|
72
76
|
export declare const LIVENESS_RESULTS: readonly ["alive", "unknown", "read_failed", "dead"];
|
|
73
77
|
export type LivenessResult = typeof LIVENESS_RESULTS[number];
|
|
74
|
-
export declare const PROVIDER_FAILURES: readonly ["auth_failed", "billing_failed"];
|
|
78
|
+
export declare const PROVIDER_FAILURES: readonly ["auth_failed", "billing_failed", "usage_limit_exceeded", "server_overloaded", "provider_error"];
|
|
75
79
|
export type ProviderFailure = typeof PROVIDER_FAILURES[number];
|
|
76
80
|
/**
|
|
77
81
|
* `daemon_restart` (wiring-unification follow-up, design §5): boot-time
|
|
@@ -99,14 +103,14 @@ export type NoProgressObservedStatus = SessionStatus | 'unknown';
|
|
|
99
103
|
* Reasons a turn hold exists. Holds are attempt-scoped only (C2: delivery-side
|
|
100
104
|
* waits are consumer deferral on the `turn.deliver` cursor, not hold rows).
|
|
101
105
|
*/
|
|
102
|
-
export declare const HOLD_REASONS: readonly ["await_delivery", "await_consume", "await_turn", "liveness", "hard_ceiling", "live_pending", "transcript_quiet", "weak_candidate", "suspension_before_consumed", "await_report", "await_end"];
|
|
106
|
+
export declare const HOLD_REASONS: readonly ["await_delivery", "await_consume", "await_turn", "liveness", "hard_ceiling", "live_pending", "transcript_quiet", "weak_candidate", "suspension_before_consumed", "await_report", "await_end", "report_correction"];
|
|
103
107
|
export type HoldReason = typeof HOLD_REASONS[number];
|
|
104
|
-
export declare const TURN_OUTCOMES: readonly ["completed", "failed", "cancelled"];
|
|
108
|
+
export declare const TURN_OUTCOMES: readonly ["completed", "blocked", "failed", "cancelled"];
|
|
105
109
|
export type TurnOutcome = typeof TURN_OUTCOMES[number];
|
|
106
110
|
export declare const COMMIT_STRENGTHS: readonly ["genuine", "weak", "tool_report", "operator"];
|
|
107
111
|
export type CommitStrength = typeof COMMIT_STRENGTHS[number];
|
|
108
112
|
/** Every terminal or reclaim reason the ledger writes. Closed: no free-text reasons. */
|
|
109
|
-
export declare const TURN_REASONS: readonly ["turn_end", "weak_end_confirmed", "transcript_final", "worker_reported", "finalization_timeout_no_response", "session_error", "provider_auth_failed", "provider_billing_failed", "operator_cancel", "intentional_cleanup", "task_removed", "mission_abandoned", "superseded", "operator_update", "refine_terminal", "validation_terminal", "hard_ceiling", "reclaim_budget_exhausted", "hollow_max_retries", "migration_orphan", "dispatch_refused_session_exited", "dispatch_refused_no_target", "dispatch_refused_unsupported_input", "dispatch_failed", "session_exit", "session_exit_before_turn", "session_dead", "hollow_completion", "assigned_stranded_dispatch_unconfirmed", "delivered_not_consumed_redrive", "delivered_no_turn_deadline"];
|
|
113
|
+
export declare const TURN_REASONS: readonly ["turn_end", "weak_end_confirmed", "transcript_final", "worker_reported", "finalization_timeout_no_response", "weak_end_liveness_unconfirmed", "weak_end_probe_unobserved", "report_correction_expired", "session_error", "provider_auth_failed", "provider_billing_failed", "provider_usage_limit_exceeded", "provider_server_overloaded", "provider_error", "operator_cancel", "intentional_cleanup", "task_removed", "mission_abandoned", "superseded", "operator_update", "refine_terminal", "validation_terminal", "hard_ceiling", "reclaim_budget_exhausted", "hollow_max_retries", "migration_orphan", "dispatch_refused_session_exited", "dispatch_refused_no_target", "dispatch_refused_unsupported_input", "dispatch_failed", "session_exit", "session_exit_before_turn", "session_dead", "hollow_completion", "assigned_stranded_dispatch_unconfirmed", "delivered_not_consumed_redrive", "delivered_no_turn_deadline"];
|
|
110
114
|
export type TurnReason = typeof TURN_REASONS[number];
|
|
111
115
|
/**
|
|
112
116
|
* What a `turn.notify` entry tells a coordinator.
|
|
@@ -118,7 +122,7 @@ export type TurnReason = typeof TURN_REASONS[number];
|
|
|
118
122
|
* (refine terminal, worktree bootstrap, …) whose text lives only in the
|
|
119
123
|
* owner's local `turn_events.payload_json` and is rendered at deliver time.
|
|
120
124
|
*/
|
|
121
|
-
export declare const NOTIFY_KINDS: readonly ["completed", "failed", "cancelled", "stopped", "approval", "choice", "approval_resolved", "candidate", "no_progress", "progress", "late_completion", "mesh_event"];
|
|
125
|
+
export declare const NOTIFY_KINDS: readonly ["completed", "blocked", "failed", "cancelled", "stopped", "approval", "choice", "approval_resolved", "candidate", "no_progress", "progress", "late_completion", "mesh_event"];
|
|
122
126
|
export type NotifyKind = typeof NOTIFY_KINDS[number];
|
|
123
127
|
export interface TurnAttemptRef {
|
|
124
128
|
attemptId: string;
|
|
@@ -149,6 +153,9 @@ export interface EvidenceCoordinatorIdentity {
|
|
|
149
153
|
export interface NativeTurnMarkerRef {
|
|
150
154
|
outcome: NativeTurnOutcome;
|
|
151
155
|
turnId?: string;
|
|
156
|
+
receivedAt?: number;
|
|
157
|
+
startedAt?: number;
|
|
158
|
+
errorAt?: number;
|
|
152
159
|
}
|
|
153
160
|
export interface EvidenceEnvelope {
|
|
154
161
|
/** Stable id of this observation; dedupe key across republish/replication. */
|
|
@@ -220,10 +227,13 @@ export type TurnEvidenceBody = {
|
|
|
220
227
|
kind: 'suspension';
|
|
221
228
|
modal: SuspensionModal;
|
|
222
229
|
modalKey?: string;
|
|
230
|
+
providerSetup?: boolean;
|
|
231
|
+
clockUnknown?: boolean;
|
|
223
232
|
} | {
|
|
224
233
|
kind: 'suspension_resolved';
|
|
225
234
|
resolution: SuspensionResolution;
|
|
226
235
|
via: SuspensionResolutionVia;
|
|
236
|
+
modalKey?: string;
|
|
227
237
|
} | {
|
|
228
238
|
kind: 'turn_end';
|
|
229
239
|
strength: TurnEndStrength;
|
|
@@ -233,6 +243,7 @@ export type TurnEvidenceBody = {
|
|
|
233
243
|
blockReason?: TurnEndBlockReason;
|
|
234
244
|
releasedByHardCap?: boolean;
|
|
235
245
|
nativeOutcome?: NativeTurnOutcome;
|
|
246
|
+
nativeMarker?: NativeTurnMarkerRef;
|
|
236
247
|
live?: LiveTurnPending;
|
|
237
248
|
/**
|
|
238
249
|
* Stamped (true only) by the WORKER's daemon when the session holds a live
|
|
@@ -268,6 +279,7 @@ export type TurnEvidenceBody = {
|
|
|
268
279
|
} | {
|
|
269
280
|
kind: 'liveness';
|
|
270
281
|
result: LivenessResult;
|
|
282
|
+
probeStartedAtMs?: number;
|
|
271
283
|
} | {
|
|
272
284
|
kind: 'process_exit';
|
|
273
285
|
exitCode: number | null;
|
|
@@ -288,6 +300,9 @@ export type TurnEvidenceBody = {
|
|
|
288
300
|
hasHandoffNotes: boolean;
|
|
289
301
|
branchState?: WorkerBranchState;
|
|
290
302
|
touchedFileCount?: number;
|
|
303
|
+
} | {
|
|
304
|
+
kind: 'worker_report_correction_requested';
|
|
305
|
+
deliveryId?: string;
|
|
291
306
|
} | {
|
|
292
307
|
kind: 'worker_progress';
|
|
293
308
|
note?: SummaryRef;
|
|
@@ -371,14 +386,15 @@ export declare const TURN_EVIDENCE_FIELD_SPECS: TurnEvidenceFieldSpecs;
|
|
|
371
386
|
export declare const TURN_EVIDENCE_KINDS: readonly TurnEvidenceKind[];
|
|
372
387
|
/** Evidence kinds that, on their own, can end a turn (the ones R18/R19/R27 reason about). */
|
|
373
388
|
export declare const TERMINAL_CLASS_EVIDENCE_KINDS: readonly ["turn_end", "transcript_final", "no_progress", "worker_report", "session_error", "process_exit", "cancel", "operator_status"];
|
|
374
|
-
export declare const isTurnEvidenceKind: (value: unknown) => value is "no_progress" | "delivered" | "liveness" | "turn_end" | "transcript_final" | "session_error" | "dispatch_failed" | "dispatch_accepted" | "delivery_refused" | "duplicate_dispatch_refusal" | "session_rebound" | "turn_started" | "suspension" | "suspension_resolved" | "transcript_activity" | "process_exit" | "worker_report" | "worker_progress" | "git_side_effect" | "cancel" | "operator_status" | "coordinator_ack" | "hold_expired";
|
|
375
|
-
export declare const isTurnReason: (value: unknown) => value is "intentional_cleanup" | "operator_cancel" | "task_removed" | "mission_abandoned" | "superseded" | "operator_update" | "refine_terminal" | "validation_terminal" | "hard_ceiling" | "turn_end" | "weak_end_confirmed" | "transcript_final" | "worker_reported" | "finalization_timeout_no_response" | "session_error" | "provider_auth_failed" | "provider_billing_failed" | "reclaim_budget_exhausted" | "hollow_max_retries" | "migration_orphan" | "dispatch_refused_session_exited" | "dispatch_refused_no_target" | "dispatch_refused_unsupported_input" | "dispatch_failed" | "session_exit" | "session_exit_before_turn" | "session_dead" | "hollow_completion" | "assigned_stranded_dispatch_unconfirmed" | "delivered_not_consumed_redrive" | "delivered_no_turn_deadline";
|
|
376
|
-
export declare const isNotifyKind: (value: unknown) => value is "stopped" | "failed" | "no_progress" | "completed" | "cancelled" | "approval" | "choice" | "approval_resolved" | "candidate" | "progress" | "late_completion" | "mesh_event";
|
|
377
|
-
export declare const isTurnOutcome: (value: unknown) => value is "failed" | "completed" | "cancelled";
|
|
389
|
+
export declare const isTurnEvidenceKind: (value: unknown) => value is "no_progress" | "delivered" | "liveness" | "turn_end" | "transcript_final" | "session_error" | "dispatch_failed" | "dispatch_accepted" | "delivery_refused" | "duplicate_dispatch_refusal" | "session_rebound" | "turn_started" | "suspension" | "suspension_resolved" | "transcript_activity" | "process_exit" | "worker_report" | "worker_report_correction_requested" | "worker_progress" | "git_side_effect" | "cancel" | "operator_status" | "coordinator_ack" | "hold_expired";
|
|
390
|
+
export declare const isTurnReason: (value: unknown) => value is "provider_error" | "intentional_cleanup" | "operator_cancel" | "task_removed" | "mission_abandoned" | "superseded" | "operator_update" | "refine_terminal" | "validation_terminal" | "hard_ceiling" | "turn_end" | "weak_end_confirmed" | "transcript_final" | "worker_reported" | "finalization_timeout_no_response" | "weak_end_liveness_unconfirmed" | "weak_end_probe_unobserved" | "report_correction_expired" | "session_error" | "provider_auth_failed" | "provider_billing_failed" | "provider_usage_limit_exceeded" | "provider_server_overloaded" | "reclaim_budget_exhausted" | "hollow_max_retries" | "migration_orphan" | "dispatch_refused_session_exited" | "dispatch_refused_no_target" | "dispatch_refused_unsupported_input" | "dispatch_failed" | "session_exit" | "session_exit_before_turn" | "session_dead" | "hollow_completion" | "assigned_stranded_dispatch_unconfirmed" | "delivered_not_consumed_redrive" | "delivered_no_turn_deadline";
|
|
391
|
+
export declare const isNotifyKind: (value: unknown) => value is "stopped" | "failed" | "blocked" | "no_progress" | "completed" | "cancelled" | "approval" | "choice" | "approval_resolved" | "candidate" | "progress" | "late_completion" | "mesh_event";
|
|
392
|
+
export declare const isTurnOutcome: (value: unknown) => value is "failed" | "blocked" | "completed" | "cancelled";
|
|
378
393
|
export declare const isCommitStrength: (value: unknown) => value is "operator" | "genuine" | "weak" | "tool_report";
|
|
379
394
|
export declare function isEvidenceIdentifier(value: unknown): value is string;
|
|
380
395
|
export declare function isSummaryRef(value: unknown): value is SummaryRef;
|
|
381
396
|
export declare function isTurnAttemptRef(value: unknown): value is TurnAttemptRef;
|
|
397
|
+
export declare function isNativeMarkerRef(value: unknown): value is NativeTurnMarkerRef;
|
|
382
398
|
/**
|
|
383
399
|
* Strict structural guard: known kind, every declared field of the right class,
|
|
384
400
|
* and NO undeclared field (an unknown key is how free text would sneak in).
|
|
@@ -30,8 +30,43 @@ export interface MissionUpsertRequest {
|
|
|
30
30
|
* this wire guard only checks SHAPE, not that decision.
|
|
31
31
|
*/
|
|
32
32
|
brief?: MissionBriefWire | null;
|
|
33
|
+
/**
|
|
34
|
+
* Structured-missions bundle A (design 2026-10-28 §5.1). Every key below is optional
|
|
35
|
+
* and ABSENT on a legacy call. `structured: true` is the caller's capability flag: the
|
|
36
|
+
* daemon only puts the new keys on the response (mission summary/outcome/version,
|
|
37
|
+
* `result`) when it is set, so an older mcp-server that never sends it keeps decoding
|
|
38
|
+
* byte-identical responses (mixed-version fleets, design §13.1).
|
|
39
|
+
*/
|
|
40
|
+
structured?: boolean;
|
|
41
|
+
summary?: string;
|
|
42
|
+
/** One user/operator-visible sentence for the release CHANGELOG draft (design 2026-11-01-release-objects L5). `''` clears. */
|
|
43
|
+
releaseNote?: string;
|
|
44
|
+
outcome?: string;
|
|
45
|
+
outcomeReason?: string;
|
|
46
|
+
/** Mission id open items move to when this call closes the mission (default: the carry-over mission). */
|
|
47
|
+
carryOverTo?: string;
|
|
48
|
+
/** Route to the mesh's auto-created carry-over mission instead of `id`/`title` (decision requests without a mission). `title` may then be empty. */
|
|
49
|
+
toCarryOver?: boolean;
|
|
50
|
+
itemsAdd?: readonly Record<string, unknown>[];
|
|
51
|
+
itemsUpdate?: readonly Record<string, unknown>[];
|
|
52
|
+
}
|
|
53
|
+
export interface MeshMissionOpenItemCountsWire {
|
|
54
|
+
remaining: number;
|
|
55
|
+
live_check: number;
|
|
56
|
+
decision: number;
|
|
57
|
+
evidence: number;
|
|
58
|
+
}
|
|
59
|
+
/** Structured-missions fields (only with `structured: true` on the request). */
|
|
60
|
+
export interface MeshMissionStructuredWire {
|
|
61
|
+
summary?: string;
|
|
62
|
+
releaseNote?: string;
|
|
63
|
+
outcome?: string;
|
|
64
|
+
outcomeReason?: string;
|
|
65
|
+
version?: number;
|
|
66
|
+
carryOver?: boolean;
|
|
67
|
+
openItems?: MeshMissionOpenItemCountsWire;
|
|
33
68
|
}
|
|
34
|
-
export interface MeshMissionRecordWire {
|
|
69
|
+
export interface MeshMissionRecordWire extends MeshMissionStructuredWire {
|
|
35
70
|
id: string;
|
|
36
71
|
meshId: string;
|
|
37
72
|
title: string;
|
|
@@ -42,6 +77,8 @@ export interface MeshMissionRecordWire {
|
|
|
42
77
|
}
|
|
43
78
|
export interface MissionUpsertResponse {
|
|
44
79
|
mission: MeshMissionRecordWire;
|
|
80
|
+
/** Structured calls only: per-item results, movedItems/movedTo, restoredItems, ownerConfirmationItemId, warnings. */
|
|
81
|
+
result?: Record<string, unknown>;
|
|
45
82
|
}
|
|
46
83
|
export declare function decodeMissionUpsertRequest(value: unknown): MissionUpsertRequest | null;
|
|
47
84
|
export declare function isMissionUpsertResponse(value: unknown): value is MissionUpsertResponse;
|
|
@@ -77,6 +114,12 @@ export interface MissionListQueryRequest {
|
|
|
77
114
|
* option except `historyIdLimit` is ignored. An older daemon rejects the key.
|
|
78
115
|
*/
|
|
79
116
|
meshStatusView?: 'compact' | 'verbose';
|
|
117
|
+
/** Structured-missions capability flag (see MissionUpsertRequest.structured): rows then carry summary/outcome/openItems/carryOver/version. */
|
|
118
|
+
structured?: boolean;
|
|
119
|
+
/** Structured only: attach each mission's items. */
|
|
120
|
+
items?: boolean;
|
|
121
|
+
/** Structured only: attach each mission's change history (bounded tail). */
|
|
122
|
+
history?: boolean;
|
|
80
123
|
}
|
|
81
124
|
export interface MeshMissionTaskAggregateWire {
|
|
82
125
|
total: number;
|
|
@@ -89,6 +132,8 @@ export interface MeshMissionTaskAggregateWire {
|
|
|
89
132
|
lastActivityAt: string | null;
|
|
90
133
|
}
|
|
91
134
|
export interface MeshMissionStatsWire {
|
|
135
|
+
/** Present on peers that project proven blocked outcomes separately. */
|
|
136
|
+
blocked?: number;
|
|
92
137
|
missionId: string;
|
|
93
138
|
taskCount: number;
|
|
94
139
|
completed: number;
|
|
@@ -113,6 +158,16 @@ export interface MissionListSummaryVerboseWire {
|
|
|
113
158
|
createdAt?: string;
|
|
114
159
|
updatedAt?: string;
|
|
115
160
|
closeCandidateEmittedAt?: string | null;
|
|
161
|
+
/** Structured lists only. */
|
|
162
|
+
summary?: string;
|
|
163
|
+
releaseNote?: string;
|
|
164
|
+
outcome?: string;
|
|
165
|
+
outcomeReason?: string;
|
|
166
|
+
version?: number;
|
|
167
|
+
carryOver?: boolean;
|
|
168
|
+
openItems?: MeshMissionOpenItemCountsWire;
|
|
169
|
+
items?: readonly Record<string, unknown>[];
|
|
170
|
+
history?: readonly Record<string, unknown>[];
|
|
116
171
|
}
|
|
117
172
|
/** Compact (default) mission row. `goalPreview`/`goalTruncated` present, `goal` absent. */
|
|
118
173
|
export interface MissionListSummarySlimWire {
|
|
@@ -130,6 +185,16 @@ export interface MissionListSummarySlimWire {
|
|
|
130
185
|
createdAt?: string;
|
|
131
186
|
updatedAt?: string;
|
|
132
187
|
closeCandidateEmittedAt?: string | null;
|
|
188
|
+
/** Structured lists only. */
|
|
189
|
+
summary?: string;
|
|
190
|
+
releaseNote?: string;
|
|
191
|
+
outcome?: string;
|
|
192
|
+
outcomeReason?: string;
|
|
193
|
+
version?: number;
|
|
194
|
+
carryOver?: boolean;
|
|
195
|
+
openItems?: MeshMissionOpenItemCountsWire;
|
|
196
|
+
items?: readonly Record<string, unknown>[];
|
|
197
|
+
history?: readonly Record<string, unknown>[];
|
|
133
198
|
}
|
|
134
199
|
export type MissionListSummaryWire = MissionListSummaryVerboseWire | MissionListSummarySlimWire;
|
|
135
200
|
export interface MeshMissionHistoryFoldWire {
|
|
@@ -231,6 +296,8 @@ export interface LedgerQueryEntryWire {
|
|
|
231
296
|
payload: Record<string, unknown>;
|
|
232
297
|
}
|
|
233
298
|
export interface LedgerQuerySummaryWire {
|
|
299
|
+
/** Absent on older peers; never folded into failed by the decoder. */
|
|
300
|
+
taskBlocked?: number;
|
|
234
301
|
meshId: string;
|
|
235
302
|
totalEntries: number;
|
|
236
303
|
taskDispatched: number;
|
package/dist/turn-ipc-queue.d.ts
CHANGED
|
@@ -65,6 +65,8 @@ export interface QueueQueryResponse {
|
|
|
65
65
|
counts?: Record<string, number>;
|
|
66
66
|
/** `withCounts` + `historicalOlderThanMs`: terminal rows older than that age. */
|
|
67
67
|
oldHistoricalCount?: number;
|
|
68
|
+
/** Included in counts.blocked, derived from proven worker reports; stored failed rows stay unchanged. */
|
|
69
|
+
legacyReportedBlockedCount?: number;
|
|
68
70
|
/** `withDependencyHeads`. */
|
|
69
71
|
dependencyHeads?: readonly QueueDependencyHeadWire[];
|
|
70
72
|
}
|
|
@@ -194,3 +196,20 @@ export interface RecoveryContextQueryResponse {
|
|
|
194
196
|
}
|
|
195
197
|
export declare function decodeRecoveryContextQueryRequest(value: unknown): RecoveryContextQueryRequest | null;
|
|
196
198
|
export declare function decodeRecoveryContextQueryResponse(value: unknown): RecoveryContextQueryResponse | null;
|
|
199
|
+
export interface QueueReviseRequest {
|
|
200
|
+
v: typeof TURN_IPC_PROTOCOL_VERSION;
|
|
201
|
+
meshId: string;
|
|
202
|
+
taskId: string;
|
|
203
|
+
expectedRevision: number;
|
|
204
|
+
patch: {
|
|
205
|
+
message?: string;
|
|
206
|
+
ownedPaths?: string[];
|
|
207
|
+
phase?: 'source' | 'integration';
|
|
208
|
+
dependsOn?: string[];
|
|
209
|
+
routingPreferences?: import('./task-source-phase').MeshRoutingPreferences;
|
|
210
|
+
review?: import('./task-source-phase').MeshReviewConstraint;
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
export type QueueReviseResponse = QueueRequeueResponse;
|
|
214
|
+
export declare function decodeQueueReviseRequest(value: unknown): QueueReviseRequest | null;
|
|
215
|
+
export declare const decodeQueueReviseResponse: typeof decodeQueueRequeueResponse;
|
package/dist/turn-ipc.d.ts
CHANGED
|
@@ -94,6 +94,6 @@ export interface TurnIpcError {
|
|
|
94
94
|
}
|
|
95
95
|
export declare function isTurnIpcError(value: unknown): value is TurnIpcError;
|
|
96
96
|
/** The complete, closed set of IPC command names this contract defines. */
|
|
97
|
-
export declare const TURN_IPC_COMMANDS: readonly ["turn_observe", "mesh_record", "turn_cancel", "operator_status", "turn_query", "mesh_index_query", "mission_upsert", "mission_query", "note_upsert", "note_forget", "tool_call_record", "ledger_query", "mission_list_query", "record_local", "queue_query", "queue_enqueue", "queue_enqueue_batch", "queue_cancel", "queue_requeue", "direct_dispatch_record", "active_work_query", "recovery_context_query", "task_stats_query", "prune_stale_direct", "orphaned_pin_notify"];
|
|
97
|
+
export declare const TURN_IPC_COMMANDS: readonly ["turn_observe", "mesh_record", "turn_cancel", "operator_status", "turn_query", "mesh_index_query", "mission_upsert", "mission_query", "note_upsert", "note_forget", "tool_call_record", "ledger_query", "mission_list_query", "record_local", "queue_query", "queue_enqueue", "queue_enqueue_batch", "queue_cancel", "queue_requeue", "queue_revise", "direct_dispatch_record", "active_work_query", "recovery_context_query", "task_stats_query", "prune_stale_direct", "orphaned_pin_notify"];
|
|
98
98
|
export type TurnIpcCommand = typeof TURN_IPC_COMMANDS[number];
|
|
99
|
-
export declare const isTurnIpcCommand: (value: unknown) => value is "prune_stale_direct" | "operator_status" | "turn_observe" | "mesh_record" | "turn_cancel" | "turn_query" | "mesh_index_query" | "mission_upsert" | "mission_query" | "note_upsert" | "note_forget" | "tool_call_record" | "ledger_query" | "mission_list_query" | "record_local" | "queue_query" | "queue_enqueue" | "queue_enqueue_batch" | "queue_cancel" | "queue_requeue" | "direct_dispatch_record" | "active_work_query" | "recovery_context_query" | "task_stats_query" | "orphaned_pin_notify";
|
|
99
|
+
export declare const isTurnIpcCommand: (value: unknown) => value is "prune_stale_direct" | "operator_status" | "turn_observe" | "mesh_record" | "turn_cancel" | "turn_query" | "mesh_index_query" | "mission_upsert" | "mission_query" | "note_upsert" | "note_forget" | "tool_call_record" | "ledger_query" | "mission_list_query" | "record_local" | "queue_query" | "queue_enqueue" | "queue_enqueue_batch" | "queue_cancel" | "queue_requeue" | "queue_revise" | "direct_dispatch_record" | "active_work_query" | "recovery_context_query" | "task_stats_query" | "orphaned_pin_notify";
|
package/dist/types.d.ts
CHANGED
|
@@ -120,6 +120,7 @@ export interface MeshNodeIdentified {
|
|
|
120
120
|
[key: string]: unknown;
|
|
121
121
|
}
|
|
122
122
|
export interface RepoMeshSessionStatus {
|
|
123
|
+
providerApproval?: import('./provider-approval').ProviderApproval | null;
|
|
123
124
|
sessionId: string;
|
|
124
125
|
providerType?: string;
|
|
125
126
|
state?: string;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* the protocol contract the marker demarcates.
|
|
31
31
|
*/
|
|
32
32
|
import { type MissionBrief } from './mission-brief';
|
|
33
|
-
export declare const WORKER_TOOLS: readonly ["report_completion", "progress_update", "peer_context_pull", "git_status", "git_log", "git_diff"];
|
|
33
|
+
export declare const WORKER_TOOLS: readonly ["report_completion", "progress_update", "peer_context_pull", "git_status", "git_log", "git_diff", "driver_list", "driver_describe", "driver_invoke", "driver_scaffold", "driver_validate", "driver_export", "driver_install", "artifact_register", "artifact_list", "artifact_read", "contract_read", "contract_observe", "contract_current"];
|
|
34
34
|
export type WorkerTool = typeof WORKER_TOOLS[number];
|
|
35
35
|
export declare function isWorkerTool(value: unknown): value is WorkerTool;
|
|
36
36
|
/** Stable marker line so a body is never footered twice and tests can find it. */
|
package/package.json
CHANGED