@adhdev/mesh-shared 1.0.60-rc.40 → 1.0.60-rc.41
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.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/dist/turn-evidence.d.ts +9 -2
- package/package.json +1 -1
- package/src/turn-evidence.ts +14 -1
package/dist/turn-evidence.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ export type NoProgressObservedStatus = SessionStatus | 'unknown';
|
|
|
87
87
|
* Reasons a turn hold exists. Holds are attempt-scoped only (C2: delivery-side
|
|
88
88
|
* waits are consumer deferral on the `turn.deliver` cursor, not hold rows).
|
|
89
89
|
*/
|
|
90
|
-
export declare const HOLD_REASONS: readonly ["await_delivery", "await_consume", "await_turn", "liveness", "hard_ceiling", "live_pending", "transcript_quiet", "weak_candidate", "suspension_before_consumed"];
|
|
90
|
+
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"];
|
|
91
91
|
export type HoldReason = typeof HOLD_REASONS[number];
|
|
92
92
|
export declare const TURN_OUTCOMES: readonly ["completed", "failed", "cancelled"];
|
|
93
93
|
export type TurnOutcome = typeof TURN_OUTCOMES[number];
|
|
@@ -207,6 +207,13 @@ export type TurnEvidenceBody = {
|
|
|
207
207
|
releasedByHardCap?: boolean;
|
|
208
208
|
nativeOutcome?: NativeTurnOutcome;
|
|
209
209
|
live?: LiveTurnPending;
|
|
210
|
+
/**
|
|
211
|
+
* Stamped (true only) by the WORKER's daemon when the session holds a live
|
|
212
|
+
* worker-MCP session bind, i.e. the worker can call report_completion. The
|
|
213
|
+
* owner then treats a genuine end as a report-awaiting candidate (R9r), not
|
|
214
|
+
* a commit. Absent = no reporting surface = today's genuine-end commit.
|
|
215
|
+
*/
|
|
216
|
+
reportExpected?: boolean;
|
|
210
217
|
} | {
|
|
211
218
|
kind: 'transcript_final';
|
|
212
219
|
selfAttributing: boolean;
|
|
@@ -327,7 +334,7 @@ export declare const isEvidenceSourceId: (value: unknown) => value is "fsm_edge"
|
|
|
327
334
|
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";
|
|
328
335
|
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";
|
|
329
336
|
export declare const isNotifyKind: (value: unknown) => value is "stopped" | "failed" | "no_progress" | "completed" | "cancelled" | "approval" | "choice" | "approval_resolved" | "candidate" | "progress" | "late_completion" | "mesh_event";
|
|
330
|
-
export declare const isHoldReason: (value: unknown) => value is "await_delivery" | "await_consume" | "await_turn" | "liveness" | "hard_ceiling" | "live_pending" | "transcript_quiet" | "weak_candidate" | "suspension_before_consumed";
|
|
337
|
+
export declare const isHoldReason: (value: unknown) => value is "await_delivery" | "await_consume" | "await_turn" | "liveness" | "hard_ceiling" | "live_pending" | "transcript_quiet" | "weak_candidate" | "suspension_before_consumed" | "await_report";
|
|
331
338
|
export declare const isTurnOutcome: (value: unknown) => value is "failed" | "completed" | "cancelled";
|
|
332
339
|
export declare const isCommitStrength: (value: unknown) => value is "operator" | "genuine" | "weak" | "tool_report";
|
|
333
340
|
export declare function isEvidenceIdentifier(value: unknown): value is string;
|
package/package.json
CHANGED
package/src/turn-evidence.ts
CHANGED
|
@@ -122,6 +122,11 @@ export type NoProgressObservedStatus = SessionStatus | 'unknown'
|
|
|
122
122
|
export const HOLD_REASONS = [
|
|
123
123
|
'await_delivery', 'await_consume', 'await_turn', 'liveness', 'hard_ceiling',
|
|
124
124
|
'live_pending', 'transcript_quiet', 'weak_candidate', 'suspension_before_consumed',
|
|
125
|
+
// A genuine FSM end of a mesh turn whose worker holds a live worker-MCP bind:
|
|
126
|
+
// the structured report is the primary evidence (design §F2), so the idle edge
|
|
127
|
+
// only opens this hold (R9r) — a report commits (R17), a new busy edge cancels
|
|
128
|
+
// it as a false idle (R12r), expiry commits weak (R13r).
|
|
129
|
+
'await_report',
|
|
125
130
|
] as const
|
|
126
131
|
export type HoldReason = typeof HOLD_REASONS[number]
|
|
127
132
|
|
|
@@ -211,7 +216,14 @@ export type TurnEvidenceBody =
|
|
|
211
216
|
| { kind: 'suspension'; modal: SuspensionModal; modalKey?: string }
|
|
212
217
|
| { kind: 'suspension_resolved'; resolution: SuspensionResolution; via: SuspensionResolutionVia }
|
|
213
218
|
| { kind: 'turn_end'; strength: TurnEndStrength; afterFinalizationTimeout?: boolean; hollow?: boolean; summary?: SummaryRef
|
|
214
|
-
blockReason?: TurnEndBlockReason; releasedByHardCap?: boolean; nativeOutcome?: NativeTurnOutcome; live?: LiveTurnPending
|
|
219
|
+
blockReason?: TurnEndBlockReason; releasedByHardCap?: boolean; nativeOutcome?: NativeTurnOutcome; live?: LiveTurnPending
|
|
220
|
+
/**
|
|
221
|
+
* Stamped (true only) by the WORKER's daemon when the session holds a live
|
|
222
|
+
* worker-MCP session bind, i.e. the worker can call report_completion. The
|
|
223
|
+
* owner then treats a genuine end as a report-awaiting candidate (R9r), not
|
|
224
|
+
* a commit. Absent = no reporting surface = today's genuine-end commit.
|
|
225
|
+
*/
|
|
226
|
+
reportExpected?: boolean }
|
|
215
227
|
| { kind: 'transcript_final'; selfAttributing: boolean; nativeRead: boolean; nativeMarker?: NativeTurnMarkerRef
|
|
216
228
|
live: LiveTurnPending; summary?: SummaryRef; messageAt?: number }
|
|
217
229
|
| { kind: 'transcript_activity'; newestActivityAt: number }
|
|
@@ -296,6 +308,7 @@ export const TURN_EVIDENCE_FIELD_SPECS: TurnEvidenceFieldSpecs = {
|
|
|
296
308
|
strength: en(TURN_END_STRENGTHS), afterFinalizationTimeout: boolOpt, hollow: boolOpt,
|
|
297
309
|
summary: { t: 'summary_ref', optional: true }, blockReason: enOpt(TURN_END_BLOCK_REASONS),
|
|
298
310
|
releasedByHardCap: boolOpt, nativeOutcome: enOpt(NATIVE_TURN_OUTCOMES), live: { t: 'live', optional: true },
|
|
311
|
+
reportExpected: boolOpt,
|
|
299
312
|
},
|
|
300
313
|
transcript_final: {
|
|
301
314
|
selfAttributing: bool, nativeRead: bool, nativeMarker: { t: 'native_marker', optional: true },
|