dsh-taskbridge 1.4.0 → 1.4.2

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/src/index.d.ts CHANGED
@@ -300,7 +300,7 @@ export type DelegateObserveReason =
300
300
  /** The compact task summary one observation returns. */
301
301
  export interface DelegateObservationSummary {
302
302
  taskId: string;
303
- state: 'pending' | 'running' | 'awaiting-host-review' | 'failed' | 'cancelled';
303
+ state: 'pending' | 'running' | 'awaiting-host-review' | 'failed' | 'cancelled' | 'interrupted';
304
304
  phase: string;
305
305
  createdAt: number | null;
306
306
  startedAt: number | null;
@@ -329,7 +329,8 @@ export interface DelegateObservationSummary {
329
329
  /** Always false: execution completion is not host acceptance. */
330
330
  selfApproved: false;
331
331
  /** The commander's recorded delivery review, or null while none exists. */
332
- hostAcceptance: DelegateHostAcceptance | null;
332
+ hostAcceptance: DelegateCompactHostAcceptance | null;
333
+ reviewPersistence: DelegateReviewPersistence;
333
334
  }
334
335
 
335
336
  /**
@@ -342,7 +343,7 @@ export interface DelegateObservationSummary {
342
343
  export interface DelegateReviewRequest {
343
344
  taskId: string;
344
345
  decision: 'accepted' | 'changes-requested';
345
- /** Required, non-empty, at most 1000 characters; stored redacted. */
346
+ /** Required after trimming; at most 8000 Unicode code points; stored redacted. */
346
347
  note: string;
347
348
  }
348
349
 
@@ -352,8 +353,61 @@ export interface DelegateReviewResult {
352
353
  * The public task view after the decision. Its `state` stays `awaiting-host-review`
353
354
  * (that is the compatible underlying state); the conclusion is `hostAcceptance`.
354
355
  */
355
- task: { taskId: string; state: string; phase: string; hostAcceptance: DelegateHostAcceptance | null };
356
- hostAcceptance: DelegateHostAcceptance;
356
+ task: {
357
+ taskId: string;
358
+ state: string;
359
+ phase: string;
360
+ hostAcceptance: DelegateHostAcceptance | null;
361
+ reviewPersistence: DelegateReviewPersistence;
362
+ };
363
+ /** Null until persistence is confirmed; a timed-out write may still finish. */
364
+ hostAcceptance: DelegateHostAcceptance | null;
365
+ reviewPersistence: DelegateReviewPersistence;
366
+ }
367
+
368
+ /** Persistence state is separate from execution and from a proposed conclusion. */
369
+ export interface DelegateReviewPersistence {
370
+ state: 'none' | 'saving' | 'timed-out' | 'saved' | 'failed';
371
+ decision: 'accepted' | 'changes-requested' | null;
372
+ accepted: boolean;
373
+ durable: boolean;
374
+ pending: boolean;
375
+ startedAt: number | null;
376
+ confirmedAt: number | null;
377
+ retryable: boolean;
378
+ error: { code: string; message: string } | null;
379
+ }
380
+
381
+ /** A wait carries status and length, never repeats the note body. */
382
+ export interface DelegateCompactHostAcceptance extends Omit<DelegateHostAcceptance, 'note'> {
383
+ noteChars: number;
384
+ noteOmitted: true;
385
+ }
386
+
387
+ /** Optional paged note read on delegate_result; omit offset for the old result shape. */
388
+ export interface DelegateReviewNotePageRequest {
389
+ taskId: string;
390
+ /** Nonnegative Unicode code-point offset. */
391
+ reviewNoteOffset: number;
392
+ /** Integer from 1 to 2000, default 2000. Requires reviewNoteOffset. */
393
+ reviewNoteLimit?: number;
394
+ }
395
+
396
+ export interface DelegateReviewNotePageResult {
397
+ ok: true;
398
+ taskId: string;
399
+ state: string | null;
400
+ reviewNote: {
401
+ offset: number;
402
+ limit: number;
403
+ text: string;
404
+ noteChars: number;
405
+ nextOffset: number | null;
406
+ complete: boolean;
407
+ present: boolean;
408
+ };
409
+ hostAcceptance: DelegateCompactHostAcceptance | null;
410
+ reviewPersistence: DelegateReviewPersistence | null;
357
411
  }
358
412
 
359
413
  /**
package/src/index.js CHANGED
@@ -511,7 +511,7 @@ export async function apply(ctx, config = {}) {
511
511
  }
512
512
 
513
513
  /** Version reported by the runtime facts block. Mirrors `package.json`. */
514
- const PLUGIN_VERSION = '1.4.0';
514
+ const PLUGIN_VERSION = '1.4.2';
515
515
 
516
516
  /**
517
517
  * Read the native approval service without turning absence into a throw.