@adhdev/mesh-shared 1.0.60-rc.43 → 1.0.60-rc.45

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.
@@ -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", "await_report"];
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", "await_end"];
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];
@@ -240,10 +240,16 @@ export type TurnEvidenceBody = {
240
240
  } | {
241
241
  kind: 'session_error';
242
242
  reason: SessionErrorReason;
243
- } | {
243
+ }
244
+ /**
245
+ * `summary` is the handoff-topic pointer when the report's text was published;
246
+ * a report the owner daemon accepted itself carries its text in the evidence
247
+ * row's local envelope instead (never published), so the pointer is optional.
248
+ */
249
+ | {
244
250
  kind: 'worker_report';
245
251
  outcome: WorkerReportOutcome;
246
- summary: SummaryRef;
252
+ summary?: SummaryRef;
247
253
  hasHandoffNotes: boolean;
248
254
  branchState?: WorkerBranchState;
249
255
  touchedFileCount?: number;
@@ -334,7 +340,7 @@ export declare const isEvidenceSourceId: (value: unknown) => value is "fsm_edge"
334
340
  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";
335
341
  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";
336
342
  export declare const isNotifyKind: (value: unknown) => value is "stopped" | "failed" | "no_progress" | "completed" | "cancelled" | "approval" | "choice" | "approval_resolved" | "candidate" | "progress" | "late_completion" | "mesh_event";
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";
343
+ 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" | "await_end";
338
344
  export declare const isTurnOutcome: (value: unknown) => value is "failed" | "completed" | "cancelled";
339
345
  export declare const isCommitStrength: (value: unknown) => value is "operator" | "genuine" | "weak" | "tool_report";
340
346
  export declare function isEvidenceIdentifier(value: unknown): value is string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/mesh-shared",
3
- "version": "1.0.60-rc.43",
3
+ "version": "1.0.60-rc.45",
4
4
  "description": "ADHDev mesh-shared — pure mesh/git status normalizers shared by daemon-core and web-core",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -127,6 +127,12 @@ export const HOLD_REASONS = [
127
127
  // only opens this hold (R9r) — a report commits (R17), a new busy edge cancels
128
128
  // it as a false idle (R12r), expiry commits weak (R13r).
129
129
  'await_report',
130
+ // A worker report recorded while the session is still generating (R17g):
131
+ // the report is the verdict, the idle edge is only awaited as corroboration
132
+ // — a turn_end commits the report (R9t), expiry commits it anyway (R13t) so
133
+ // a session whose FSM never shows the idle edge again does not wait for
134
+ // liveness / hard_ceiling.
135
+ 'await_end',
130
136
  ] as const
131
137
  export type HoldReason = typeof HOLD_REASONS[number]
132
138
 
@@ -232,7 +238,12 @@ export type TurnEvidenceBody =
232
238
  | { kind: 'process_exit'; exitCode: number | null; providerFailure?: ProviderFailure }
233
239
  | { kind: 'session_error'; reason: SessionErrorReason }
234
240
  // ── worker MCP (F2) ──
235
- | { kind: 'worker_report'; outcome: WorkerReportOutcome; summary: SummaryRef; hasHandoffNotes: boolean
241
+ /**
242
+ * `summary` is the handoff-topic pointer when the report's text was published;
243
+ * a report the owner daemon accepted itself carries its text in the evidence
244
+ * row's local envelope instead (never published), so the pointer is optional.
245
+ */
246
+ | { kind: 'worker_report'; outcome: WorkerReportOutcome; summary?: SummaryRef; hasHandoffNotes: boolean
236
247
  branchState?: WorkerBranchState; touchedFileCount?: number }
237
248
  | { kind: 'worker_progress'; note?: SummaryRef }
238
249
  // ── coordinator / operator ──
@@ -320,7 +331,7 @@ export const TURN_EVIDENCE_FIELD_SPECS: TurnEvidenceFieldSpecs = {
320
331
  process_exit: { exitCode: { t: 'int', nullable: true }, providerFailure: enOpt(PROVIDER_FAILURES) },
321
332
  session_error: { reason: en(SESSION_ERROR_REASONS) },
322
333
  worker_report: {
323
- outcome: en(WORKER_REPORT_OUTCOMES), summary: { t: 'summary_ref' }, hasHandoffNotes: bool,
334
+ outcome: en(WORKER_REPORT_OUTCOMES), summary: { t: 'summary_ref', optional: true }, hasHandoffNotes: bool,
324
335
  branchState: enOpt(WORKER_BRANCH_STATES), touchedFileCount: intOpt,
325
336
  },
326
337
  worker_progress: { note: { t: 'summary_ref', optional: true } },