dsh-taskbridge 1.4.0 → 1.4.1
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 +13 -2
- package/README.md +8 -6
- package/codex/dsh-taskbridge.toml +19 -6
- package/docs/INTRODUCTION.md +19 -17
- package/docs/INTRODUCTION.zh.md +38 -36
- package/docs/codex-integration.md +14 -2
- package/docs/plugin-market.md +1 -1
- package/docs/releases/1.4.1.zh.md +59 -0
- package/docs/runtime-compatibility.md +11 -5
- package/docs/silent-wait.md +14 -0
- package/docs/taskbridge-upgrade.md +1 -1
- package/lib/client.js +159 -21
- package/package.json +144 -143
- package/src/client/api.js +124 -3
- package/src/client/index.jsx +144 -25
- package/src/codex/installer.js +8 -0
- package/src/http/execution-plane.js +133 -17
- package/src/http/user-plane.js +5 -4
- package/src/index.d.ts +59 -5
- package/src/index.js +1 -1
- package/src/jobs/engine.js +849 -117
- package/src/jobs/history.js +124 -6
- package/src/jobs/review-note.js +63 -0
- package/src/mcp/server.js +213 -15
- package/src/mcp/wait.js +18 -0
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:
|
|
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
|
|
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: {
|
|
356
|
-
|
|
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.
|
|
514
|
+
const PLUGIN_VERSION = '1.4.1';
|
|
515
515
|
|
|
516
516
|
/**
|
|
517
517
|
* Read the native approval service without turning absence into a throw.
|