@linxin666/dsh-client-ui-task-board 0.4.15 → 0.4.17

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.
Files changed (62) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +17 -37
  3. package/README.zh.md +17 -37
  4. package/lib/client.js +136 -1347
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +166 -2529
  7. package/lib/types/client/TaskBoardSettingsCard.d.ts +0 -20
  8. package/lib/types/client/board/ExecutionLog.d.ts +8 -0
  9. package/lib/types/client/board/status-key.d.ts +0 -15
  10. package/lib/types/client/locales.d.ts +2 -110
  11. package/lib/types/core/controller.d.ts +1 -1
  12. package/lib/types/core/extension.d.ts +4 -5
  13. package/lib/types/core/model-catalog.d.ts +58 -0
  14. package/lib/types/core/reasoning-effort.d.ts +1 -1
  15. package/lib/types/core/subtask.d.ts +31 -0
  16. package/lib/types/core/tasks.d.ts +0 -45
  17. package/lib/types/core/use-cases/task-update.d.ts +1 -1
  18. package/lib/types/host/llm-dispatch.d.ts +8 -10
  19. package/lib/types/host-ledger.d.ts +0 -28
  20. package/lib/types/host-runner.d.ts +15 -71
  21. package/lib/types/host-service.d.ts +25 -89
  22. package/lib/types/index.d.ts +0 -78
  23. package/lib/types/protocol.d.ts +6 -23
  24. package/package.json +26 -26
  25. package/src/client/TaskBoardSettingsCard.tsx +13 -200
  26. package/src/client/board/ExecutionLog.tsx +17 -6
  27. package/src/client/board/NewTaskModal.tsx +1 -42
  28. package/src/client/board/TaskCard.tsx +2 -7
  29. package/src/client/board/TaskDetail.tsx +2 -37
  30. package/src/client/board/status-key.ts +0 -30
  31. package/src/client/board-settings.module.css +3 -22
  32. package/src/client/board.module.css +1 -104
  33. package/src/client/index.ts +1 -1
  34. package/src/client/locales.ts +8 -224
  35. package/src/core/controller.ts +1 -3
  36. package/src/core/extension.ts +4 -5
  37. package/src/core/model-catalog.ts +114 -0
  38. package/src/core/reasoning-effort.ts +1 -1
  39. package/src/core/store.ts +22 -17
  40. package/src/core/subtask.ts +36 -0
  41. package/src/core/tasks.ts +0 -53
  42. package/src/core/use-cases/task-update.ts +1 -8
  43. package/src/host/agent-tools.ts +1 -15
  44. package/src/host/llm-dispatch.ts +8 -10
  45. package/src/host-ledger.ts +1 -86
  46. package/src/host-routes.ts +4 -4
  47. package/src/host-runner.ts +33 -139
  48. package/src/host-service.ts +60 -266
  49. package/src/index.ts +27 -164
  50. package/src/protocol.ts +8 -43
  51. package/lib/types/client/board/VerificationReport.d.ts +0 -10
  52. package/lib/types/core/verification-budget.d.ts +0 -52
  53. package/lib/types/core/verification.d.ts +0 -753
  54. package/lib/types/host/verification-gate.d.ts +0 -95
  55. package/lib/types/host/verification-runner.d.ts +0 -139
  56. package/lib/types/host/workspace-evidence.d.ts +0 -53
  57. package/src/client/board/VerificationReport.tsx +0 -361
  58. package/src/core/verification-budget.ts +0 -115
  59. package/src/core/verification.ts +0 -1594
  60. package/src/host/verification-gate.ts +0 -487
  61. package/src/host/verification-runner.ts +0 -702
  62. package/src/host/workspace-evidence.ts +0 -176
@@ -37,18 +37,6 @@ export interface TaskBoardSettings {
37
37
  * Tokens, not money: only DeepSeek's own routes are priced.
38
38
  */
39
39
  spendBudgetTokens?: number;
40
- /**
41
- * GLOBAL native /goal switch (default off): the master control over whether
42
- * this board starts a run with dsh's built-in /goal at all. Frozen per
43
- * execution.
44
- */
45
- goalRunEnabled?: boolean;
46
- /** Goal acceptance for this board's executions (default on). */
47
- goalVerification?: boolean;
48
- /** Judge model route for goal acceptance; blank inherits the host default. */
49
- goalVerificationModel?: string;
50
- /** Judge reasoning effort; blank inherits the host default level. */
51
- goalVerificationReasoningEffort?: string;
52
40
  /**
53
41
  * Agent preset the create dialog of this board opens with. Blank pins
54
42
  * nothing, so a new card follows the deployment default as before.
@@ -82,14 +70,6 @@ export interface TaskBoardSettingsCardState extends CardShell {
82
70
  runLaunchWidth: CardFieldState;
83
71
  /** Daily token cap field. */
84
72
  spendBudgetTokens: CardFieldState;
85
- /** GLOBAL native /goal switch. */
86
- goalRunEnabled: CardFieldState;
87
- /** Goal-acceptance switch. */
88
- goalVerification: CardFieldState;
89
- /** Judge model route field. */
90
- goalVerificationModel: CardFieldState;
91
- /** Judge reasoning-effort field. */
92
- goalVerificationReasoningEffort: CardFieldState;
93
73
  /** New-card default agent preset. */
94
74
  cardDefaultMode: CardFieldState;
95
75
  /** New-card default permission. */
@@ -3,6 +3,14 @@ import { type TaskBoardKey } from '../locales.ts';
3
3
  /** Rows shown before the history asks to be expanded. */
4
4
  export declare const VISIBLE_EXECUTIONS = 5;
5
5
  /** Execution outcome → locale key, shared with the history's folded summary. */
6
+ /**
7
+ * A recorded failure text in the reader's own language, for the refusals the
8
+ * board itself produces and can therefore translate. Any other text is the
9
+ * Host's own sentence and is printed verbatim.
10
+ * @param error - the execution's recorded failure text.
11
+ * @returns the localized refusal, or the original text.
12
+ */
13
+ export declare function failureText(error: string): string;
6
14
  export declare const EXECUTION_RESULT_KEY: Record<NonNullable<ExecutionRecord['result']>, TaskBoardKey>;
7
15
  /**
8
16
  * Render one card's execution history.
@@ -1,19 +1,4 @@
1
1
  import type { TaskStatus } from '../../core/tasks.ts';
2
- import { type ExecutionVerification, type VerificationPhase } from '../../core/verification.ts';
3
2
  import type { TaskBoardKey } from '../locales.ts';
4
3
  /** Task status → locale key (board column titles and the detail badge). */
5
4
  export declare const STATUS_KEY: Record<TaskStatus, TaskBoardKey>;
6
- /**
7
- * Acceptance phase to the label the running column shows: executing,
8
- * verifying, or fixing a failed acceptance. The card keeps one running label;
9
- * this decides which one.
10
- */
11
- export declare const VERIFICATION_PHASE_KEY: Record<VerificationPhase, TaskBoardKey>;
12
- /**
13
- * The acceptance label for one open execution, or undefined when acceptance
14
- * does not govern it (the switch was off at start, the run never became a goal
15
- * run, or a teammate is covered by its Lead).
16
- * @param verification - the execution's acceptance state.
17
- * @returns the locale key to render, or undefined for the historical label.
18
- */
19
- export declare function verificationRunningKey(verification: ExecutionVerification | undefined): TaskBoardKey | undefined;
@@ -69,8 +69,6 @@ export declare const zh: {
69
69
  'new.summary.attachmentCount': string;
70
70
  'new.summary.filled': string;
71
71
  'new.summary.scheduleOff': string;
72
- 'new.summary.multiRound': string;
73
- 'new.summary.singleRound': string;
74
72
  'new.title': string;
75
73
  'new.titlePlaceholder': string;
76
74
  'new.description': string;
@@ -195,6 +193,7 @@ export declare const zh: {
195
193
  'status.move.done': string;
196
194
  'status.move.failed': string;
197
195
  'exec.error.noWorkspace': string;
196
+ 'exec.error.legacyAgentTeams': string;
198
197
  'exec.error.promptRejected': string;
199
198
  'run.failed': string;
200
199
  'time.justNow': string;
@@ -288,19 +287,10 @@ export declare const zh: {
288
287
  'exec.reuseSession': string;
289
288
  'exec.reuseSessionHint': string;
290
289
  'exec.reuseSessionHint.short': string;
291
- 'exec.goalRun': string;
292
- 'exec.goalRunHint': string;
293
- 'exec.goalRunHint.short': string;
294
- 'exec.goalRunGlobalOff': string;
295
- 'exec.skipVerification': string;
296
- 'exec.skipVerificationHint': string;
297
- 'exec.skipVerificationHint.short': string;
298
290
  'detail.executionSettings': string;
299
- 'detail.settings.advanced': string;
291
+ 'detail.settings.run': string;
300
292
  'detail.settings.summary.none': string;
301
293
  'detail.settings.summary.reuseSession': string;
302
- 'detail.settings.summary.goal': string;
303
- 'detail.settings.summary.skipVerification': string;
304
294
  'exec.hint': string;
305
295
  'exec.hint.short': string;
306
296
  'settings.title': string;
@@ -349,39 +339,6 @@ export declare const zh: {
349
339
  'settings.spendBudgetTokens': string;
350
340
  'settings.spendBudgetTokensHint': string;
351
341
  'settings.spendBudgetTokensHintBrief': string;
352
- 'settings.runBehaviorTitle': string;
353
- 'settings.runBehaviorCardHint': string;
354
- 'settings.goalRunGlobal': string;
355
- 'settings.goalRunGlobalHint': string;
356
- 'settings.goalRunGlobalHintBrief': string;
357
- 'settings.goalRunGlobalDisabledTaskOption': string;
358
- 'settings.goalVerificationTitle': string;
359
- 'settings.goalVerification': string;
360
- 'settings.goalVerificationCardHint': string;
361
- 'settings.goalVerificationHint': string;
362
- 'settings.goalVerificationHintBrief': string;
363
- 'settings.goalVerificationModel': string;
364
- 'settings.goalVerificationModelHint': string;
365
- 'settings.goalVerificationModelHintBrief': string;
366
- 'settings.goalVerificationModelInherit': string;
367
- 'settings.goalVerificationModelInheritUnknown': string;
368
- 'settings.goalVerificationEffort': string;
369
- 'settings.goalVerificationEffortHint': string;
370
- 'settings.goalVerificationEffortHintBrief': string;
371
- 'settings.goalVerificationEffortInherit': string;
372
- 'settings.goalVerificationEffortInheritUnknown': string;
373
- 'settings.goalVerificationResolved': string;
374
- 'settings.goalVerificationResolvedModel': string;
375
- 'settings.goalVerificationResolvedEffort': string;
376
- 'settings.goalVerificationResolvedNoEffort': string;
377
- 'settings.goalVerificationResolvedSource': string;
378
- 'settings.goalVerificationSourceInherit': string;
379
- 'settings.goalVerificationSourceExplicit': string;
380
- 'settings.goalVerificationResolvedPreset': string;
381
- 'settings.goalVerificationRouteMissing': string;
382
- 'settings.goalVerificationEffortFallback': string;
383
- 'settings.goalVerificationEffortFallbackNone': string;
384
- 'settings.goalVerificationModelInvalid': string;
385
342
  'settings.cardDefaultsTitle': string;
386
343
  'settings.cardDefaultsCardHint': string;
387
344
  'settings.cardDefaultsCardBrief': string;
@@ -391,71 +348,6 @@ export declare const zh: {
391
348
  'settings.cardDefaultPermissionHintBrief': string;
392
349
  'settings.cardDefaultModelHint': string;
393
350
  'settings.cardDefaultModelHintBrief': string;
394
- 'running.executing': string;
395
- 'running.verifying': string;
396
- 'running.repairing': string;
397
- 'running.verificationPassed': string;
398
- 'running.verificationFailed': string;
399
- 'running.verificationInvalid': string;
400
- 'verify.title': string;
401
- 'verify.status.passed': string;
402
- 'verify.status.failed': string;
403
- 'verify.status.exception': string;
404
- 'verify.status.verifying': string;
405
- 'verify.status.pending': string;
406
- 'verify.status.off': string;
407
- 'verify.status.invalid': string;
408
- 'verify.status.invalidHeld': string;
409
- 'verify.attemptInvalid': string;
410
- 'verify.invalidReason.missing-finding': string;
411
- 'verify.invalidReason.unlocatable-quote': string;
412
- 'verify.invalidReason.baseline-finding': string;
413
- 'verify.invalidReason.vacuous-finding': string;
414
- 'verify.invalidReason.insufficient-evidence': string;
415
- 'verify.invalidReason.unknown': string;
416
- 'verify.invalidCounts': string;
417
- 'verify.invalidDetail': string;
418
- 'verify.criterionFindings': string;
419
- 'verify.criterionFinding': string;
420
- 'verify.criterionFindingFull': string;
421
- 'verify.location.task': string;
422
- 'verify.location.trajectory': string;
423
- 'verify.location.workspace': string;
424
- 'verify.location.baseline': string;
425
- 'verify.location.unknown': string;
426
- 'verify.detailRemoved': string;
427
- 'verify.cleanup.cleaned': string;
428
- 'verify.cleanup.pending': string;
429
- 'verify.cleanup.failed': string;
430
- 'verify.cleanup.audit': string;
431
- 'verify.cleanup.stage.quality': string;
432
- 'verify.cleanup.stage.invalid': string;
433
- 'verify.cleanup.stage.exception': string;
434
- 'verify.cleanup.stage.budget': string;
435
- 'verify.summary': string;
436
- 'verify.criteria': string;
437
- 'verify.criterion': string;
438
- 'verify.rounds': string;
439
- 'verify.judge': string;
440
- 'verify.judgeNoEffort': string;
441
- 'verify.judgeInherited': string;
442
- 'verify.attempt': string;
443
- 'verify.attemptException': string;
444
- 'verify.counts': string;
445
- 'verify.findings': string;
446
- 'verify.noFindings': string;
447
- 'verify.evidence': string;
448
- 'verify.workspaceEvidence': string;
449
- 'verify.usage': string;
450
- 'verify.usageIncomplete': string;
451
- 'verify.finalFailure': string;
452
- 'verify.applicability.disabled': string;
453
- 'verify.applicability.goalUnavailable': string;
454
- 'verify.applicability.skipped': string;
455
- 'verify.applicability.teamMember': string;
456
- 'verify.applicability.goalDisabled': string;
457
- 'verify.effortFallback': string;
458
- 'verify.thresholdValue': string;
459
351
  'detail.parent': string;
460
352
  'detail.parent.open': string;
461
353
  'detail.subtasks': string;
@@ -130,7 +130,7 @@ export interface ExecutionOptionsSnapshot {
130
130
  * (revision/scheduler/power); a full snapshot also carries the deployment
131
131
  * constants the UI reads (session default permission, subtask depth).
132
132
  */
133
- export type HostMirror = Pick<TaskBoardSnapshot, 'revision' | 'scheduler' | 'power' | 'sessionDefaultPermission' | 'maxSubtaskDepth' | 'goalRunEnabled' | 'cardDefaults' | 'extensions' | 'attachmentLimits'>;
133
+ export type HostMirror = Pick<TaskBoardSnapshot, 'revision' | 'scheduler' | 'power' | 'sessionDefaultPermission' | 'maxSubtaskDepth' | 'cardDefaults' | 'extensions' | 'attachmentLimits'>;
134
134
  /** Immutable controller snapshot for UI subscriptions. */
135
135
  export interface ControllerSnapshot {
136
136
  tasks: readonly TaskRecord[];
@@ -12,7 +12,7 @@
12
12
  * @module dsh-task-board/core/extension
13
13
  */
14
14
  import type { ToolDefinition } from '@deepseek-ai/dsh-tools';
15
- import type { TaskBoardAction, TaskBoardSnapshot, TaskBoardVerificationOptions } from '../protocol.ts';
15
+ import type { TaskBoardAction, TaskBoardModelCatalog, TaskBoardSnapshot } from '../protocol.ts';
16
16
  import type { ExecutionOutcome, TaskRecord, TaskStatus } from './tasks.ts';
17
17
  /** Cordis service name the host and browser halves each publish. */
18
18
  export declare const TASK_BOARD_SERVICE_NAME = "taskBoard";
@@ -366,11 +366,10 @@ export interface TaskBoardHostFace {
366
366
  */
367
367
  subscribe(listener: () => void): () => void;
368
368
  /**
369
- * The acceptance settings, the contract they resolve to right now, and the
370
- * model catalog the choices come from. The same document the board's own
371
- * `/verification` route serves.
369
+ * The host model catalog the board's model and reasoning-level choices come
370
+ * from. The same document the board's own `/model-catalog` route serves.
372
371
  */
373
- verificationOptions(): Promise<TaskBoardVerificationOptions>;
372
+ modelCatalogOptions(): Promise<TaskBoardModelCatalog>;
374
373
  }
375
374
  declare module '@deepseek-ai/cordis' {
376
375
  interface Context {
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Host model catalog: the routes this deployment serves, the reasoning metadata
3
+ * their adapters expose, and the normalization the board reads them through.
4
+ *
5
+ * The board publishes the catalog (the settings card's model and level pickers
6
+ * read it) and resolves a card's pinned reasoning effort against it, so "this
7
+ * model declares that level" is answered from the host's own configuration
8
+ * instead of a guess. Framework-free (no cordis, no SDK imports) because both
9
+ * halves compile it.
10
+ *
11
+ * @module dsh-task-board/core/model-catalog
12
+ */
13
+ /** One resolved `provider/model` route. */
14
+ export interface ModelRoute {
15
+ provider: string;
16
+ model: string;
17
+ /** Reasoning level the route is configured or resolved at; absent means inherit. */
18
+ reasoningEffort?: string;
19
+ }
20
+ /** One reasoning-effort option an adapter exposes for an exact model route. */
21
+ export interface CatalogReasoningEffort {
22
+ id: string;
23
+ name?: string;
24
+ }
25
+ /** One adapter-discovered model of the host catalog. */
26
+ export interface CatalogModel {
27
+ id: string;
28
+ name?: string;
29
+ reasoning?: {
30
+ efforts: CatalogReasoningEffort[];
31
+ defaultEffort?: string;
32
+ };
33
+ }
34
+ /** One provider route and its models. */
35
+ export interface CatalogGroup {
36
+ id: string;
37
+ name?: string;
38
+ models: CatalogModel[];
39
+ }
40
+ /** The host model catalog the board resolves routes and reasoning levels against. */
41
+ export interface ModelCatalogView {
42
+ /** The route an unconfigured session starts at: the host's own configuration. */
43
+ default?: ModelRoute;
44
+ groups: CatalogGroup[];
45
+ }
46
+ /** Split a qualified `provider/model` route; undefined when it is not one. */
47
+ export declare function parseModelRoute(qualified: string | undefined): {
48
+ provider: string;
49
+ model: string;
50
+ } | undefined;
51
+ /**
52
+ * Normalize the raw `session/modelCatalog` reply into the shape the board
53
+ * reads. Everything is optional in the wire value, so every level is checked:
54
+ * an unreadable catalog degrades to "unknown", never to a crash.
55
+ * @param value - the raw gateway reply.
56
+ * @returns the normalized catalog, or undefined when nothing usable arrived.
57
+ */
58
+ export declare function normalizeCatalog(value: unknown): ModelCatalogView | undefined;
@@ -15,7 +15,7 @@
15
15
  * the only place that can complete the documented `provider/model` or model-id
16
16
  * pin.
17
17
  */
18
- import type { CatalogModel, ModelCatalogView } from './verification.ts';
18
+ import type { CatalogModel, ModelCatalogView } from './model-catalog.ts';
19
19
  /** One execution route an effort resolves against: `provider/model`, or a bare model id. */
20
20
  export interface ReasoningRoute {
21
21
  provider?: string;
@@ -119,6 +119,37 @@ export declare function hasOutstandingDescendants(tasks: readonly TaskRecord[],
119
119
  * applied at launch and never written into a card's `mode` field.
120
120
  */
121
121
  export declare const LIANGSHEN_PRESET_ID = "liangshen";
122
+ /**
123
+ * The tool a legacy Agent Teams runtime registers, and the one fingerprint
124
+ * this board reads off a deployment: the pre-#7519 generation registers
125
+ * `spawn_teammate` and replaces `send_message` / `list_agents` /
126
+ * `interrupt_agent` with team-scoped variants, so children exist but are
127
+ * unreachable. The current runtime adds a shared task board instead and reuses
128
+ * the coordination tools, so those three names prove nothing and are never
129
+ * gated on (the criterion is the same one
130
+ * `packages/dsh-liangshen/presets/liangshen/dispatcher-rules.mjs` states).
131
+ */
132
+ export declare const LEGACY_AGENT_TEAMS_TOOL = "spawn_teammate";
133
+ /**
134
+ * The failure text the Host records when a run would have been forced under
135
+ * the dispatcher preset on a deployment that cannot orchestrate.
136
+ *
137
+ * A finished sentence rather than a code (the shape `core/workspace-target.ts`
138
+ * gives its missing-workspace refusal): the ledger stores it as the
139
+ * execution's failure text, the agent tools serve it to a model, and any
140
+ * client prints it verbatim. It names the fix, not the mechanism. The launch
141
+ * is refused before any session exists, because the dispatcher preset would
142
+ * otherwise stop and wait for a human reply that an unattended run never
143
+ * brings.
144
+ */
145
+ export declare const LEGACY_AGENT_TEAMS_REASON: string;
146
+ /**
147
+ * Whether a recorded failure text is the legacy-runtime refusal, which the
148
+ * browser half renders in the reader's own language.
149
+ * @param reason - the execution's recorded failure text.
150
+ * @returns true when that run was refused for a deployment that cannot orchestrate.
151
+ */
152
+ export declare function isLegacyAgentTeamsReason(reason: string): boolean;
122
153
  /**
123
154
  * Whether a card belongs to a run's dispatch set: the card the request named,
124
155
  * or a card whose work is still outstanding. Kept for the browser's subtask
@@ -5,7 +5,6 @@
5
5
  * unit-testable in isolation.
6
6
  */
7
7
  import type { FreezeSnapshot } from './freeze-snapshot.ts';
8
- import type { ExecutionVerification } from './verification.ts';
9
8
  import type { TaskHandover, TaskHandoverInput } from './handover.ts';
10
9
  import { type TaskBoardExtensionPayload } from './extension.ts';
11
10
  import { type TaskAttachment } from './attachment.ts';
@@ -121,14 +120,6 @@ export interface ExecutionRecord {
121
120
  * informational, and every field above is what the board decides with.
122
121
  */
123
122
  summary?: ExecutionSummary;
124
- /**
125
- * Goal acceptance state of this execution (task-board goal verification).
126
- * Fixed when the execution starts and never rewritten from later settings:
127
- * the contract is frozen here, the attempts accrue here, and the settlement
128
- * rule reads the pass record here. Absent on an execution that started
129
- * before the feature existed, which keeps it on the historical verdict.
130
- */
131
- verification?: ExecutionVerification;
132
123
  }
133
124
  /**
134
125
  * Maximum number of execution records retained per task. Older settled runs
@@ -402,32 +393,6 @@ export interface TaskRecord {
402
393
  * run group it opened before this behavior changed.
403
394
  */
404
395
  teamRun?: boolean;
405
- /**
406
- * Start every execution of this task with dsh's built-in `/goal` command,
407
- * armed with the composed execution prompt as its objective. The session then
408
- * keeps working automatic continuation rounds until the agent marks the goal
409
- * complete, and this board settles the execution on the goal's own end
410
- * instead of at the first turn end. Absent means OFF — the option is
411
- * unchecked by default, so only an explicit `true` joins the goal run and
412
- * every card that never touched it (including every card written before the
413
- * field existed) runs one plain turn. A session whose `/goal` command is
414
- * refused still runs the prompt.
415
- */
416
- goalRun?: boolean;
417
- /**
418
- * Run this task's goal executions WITHOUT the board's acceptance gate.
419
- *
420
- * Absent means INHERIT: the execution's applicability is decided by the
421
- * board-wide `goalVerification` switch frozen at start, exactly as a card
422
- * that never touched this option behaves. Only an explicit `true` opts the
423
- * card out, and the execution records `applicability: 'disabled'` so the
424
- * report says plainly that nothing certified this run.
425
- *
426
- * The opt-out is per execution, not per run: flipping it never rewrites the
427
- * verdict rule of an execution already open, and a rerun or a scheduled
428
- * occurrence reads the card's current value when it freezes its contract.
429
- */
430
- skipVerification?: boolean;
431
396
  /**
432
397
  * Frozen context snapshot for a continuation card; absent on plain tasks.
433
398
  * Sanitized before it enters the ledger (redaction, slash-command taint,
@@ -526,16 +491,6 @@ export interface NewTaskInput {
526
491
  applyCardDefaults?: boolean;
527
492
  /** Reuse the previous execution's session for later runs (issue #1419). */
528
493
  reuseSession?: boolean;
529
- /**
530
- * Start the execution with dsh's built-in `/goal`. Absent means the default
531
- * (one plain turn); only an explicit true joins the goal run.
532
- */
533
- goalRun?: boolean;
534
- /**
535
- * Run this task's goal executions without the acceptance gate; absent
536
- * inherits the board-wide `goalVerification` switch.
537
- */
538
- skipVerification?: boolean;
539
494
  /**
540
495
  * Optional scheduling rule requested at creation time (the new-task
541
496
  * dialog): an enable flag, the kind of plan (a recurring 5-field cron
@@ -16,7 +16,7 @@ import type { TaskHandoverInput } from '../handover.ts';
16
16
  * Editable fields on a task (the update patch surface). `freeze` replaces the
17
17
  * continuation-card snapshot (restamping frozenAt); an explicit null clears it.
18
18
  */
19
- export type TaskUpdatePatch = Partial<Pick<TaskRecord, 'title' | 'description' | 'prompt' | 'workspaceId' | 'mode' | 'permission' | 'model' | 'reasoningEffort' | 'reuseSession' | 'goalRun' | 'skipVerification'>> & {
19
+ export type TaskUpdatePatch = Partial<Pick<TaskRecord, 'title' | 'description' | 'prompt' | 'workspaceId' | 'mode' | 'permission' | 'model' | 'reasoningEffort' | 'reuseSession'>> & {
20
20
  freeze?: FreezeSnapshot & {
21
21
  redacted?: boolean;
22
22
  } | null;
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * One-shot model dispatch for the board's Host half.
3
3
  *
4
- * The board makes two one-shot model calls: the goal-acceptance judge
5
- * (`verification-runner.ts`) and the "parse pasted text" action
6
- * (`host-ai.ts`). Both call the official `llm` service, and both must call it
4
+ * The board makes one one-shot model call: the "parse pasted text" action
5
+ * (`host-ai.ts`). It calls the official `llm` service, and it must call it
7
6
  * the way the official agent loop does.
8
7
  *
9
8
  * The runtime exposes two entry points with the same name shape. The public
@@ -20,9 +19,9 @@
20
19
  * so the guard's `for await (const chunk of next())` raised
21
20
  * `TypeError: next(...) is not a function or its return value is not async
22
21
  * iterable`. The agent loop was unaffected because it already dispatches
23
- * through `prepareCall(...).stream(...)`; the board's two one-shot calls were
24
- * not, and each completed acceptance was recorded as an anomaly
25
- * ("验收异常(裁判请求失败)") after two judge attempts.
22
+ * through `prepareCall(...).stream(...)`; the board's one-shot call was not,
23
+ * and the parse action failed with that TypeError until it dispatched the same
24
+ * way.
26
25
  *
27
26
  * Dispatching through the prepared call fixes that at the owner: the board no
28
27
  * longer depends on a mutable instance property that a plugin may legitimately
@@ -36,10 +35,9 @@ export type OneShotRequest = Pick<GenerateOptions, 'messages' | 'signal'> & Pick
36
35
  /**
37
36
  * The call config as this board's own domain types carry it.
38
37
  *
39
- * `VerificationRoute.reasoningEffort` and the parse route are plain strings (the
40
- * catalog publishes effort ids as strings), while the SDK brands them
41
- * nominally; the single crossing is branded here so no caller repeats the
42
- * assertion.
38
+ * The parse route's `reasoningEffort` and the catalog's effort ids are plain
39
+ * strings, while the SDK brands them nominally; the single crossing is branded
40
+ * here so no caller repeats the assertion.
43
41
  */
44
42
  export interface OneShotCallConfig {
45
43
  provider: string;
@@ -1,7 +1,6 @@
1
1
  import { type ExecutionOutcome, type ExecutionRecord, type ExecutionSummary, type ScheduleMode, type TaskRecord } from './core/tasks.ts';
2
2
  import type { CardDefaults } from './core/card-defaults.ts';
3
3
  import { type TaskBoardAction, type TaskBoardSchedulerSnapshot } from './protocol.ts';
4
- import { type ExecutionVerification } from './core/verification.ts';
5
4
  import { type TaskPermission } from './core/handover.ts';
6
5
  export interface LedgerState {
7
6
  revision: number;
@@ -411,33 +410,6 @@ export declare class HostTaskLedger {
411
410
  * judged by a gate that was never armed for it.
412
411
  */
413
412
  private migrateLegacyDocument;
414
- /**
415
- * Find the still-open execution that ran in one session, with its task.
416
- *
417
- * The completion gate keys on the session id its tool call arrives from: the
418
- * execution record is the only object binding a session to a card, and an
419
- * already-settled execution is deliberately not returned (a session the board
420
- * no longer owns must not be gated).
421
- * @param sessionId - the DSH session the tool call runs in.
422
- * @returns the open execution and its task, or undefined.
423
- */
424
- findOpenExecutionBySession(sessionId: string): {
425
- task: TaskRecord;
426
- execution: ExecutionRecord;
427
- } | undefined;
428
- /**
429
- * Replace one execution's acceptance block (creating it when absent).
430
- *
431
- * A no-op when the serialized value is unchanged, so a coarse caller that
432
- * re-writes the same state never bumps the ledger revision. A settled
433
- * execution keeps its record: the report of a finished cycle must survive,
434
- * and only the board's own settlement moves the card.
435
- * @param taskId - the task owning the execution.
436
- * @param executionId - the execution to update.
437
- * @param verification - the new block.
438
- * @returns true when the ledger changed.
439
- */
440
- setVerification(taskId: string, executionId: string, verification: ExecutionVerification): boolean;
441
413
  private load;
442
414
  private normalizeDocument;
443
415
  /** Quarantine an unreadable document and start from an empty ledger. */
@@ -3,7 +3,7 @@ import type { InvokeRemoteRequest, TypertGateway } from '@deepseek-ai/dsh-api-ga
3
3
  import type { SessionSummary } from '@deepseek-ai/dsh-api-session-controller/types';
4
4
  import type { CommandResult } from '@deepseek-ai/dsh-commands/types';
5
5
  import type { Workspace } from '@deepseek-ai/dsh-workspace/types';
6
- import type { ModelCatalogView } from './core/verification.ts';
6
+ import type { ModelCatalogView } from './core/model-catalog.ts';
7
7
  import type { ExecutionSummary, TaskRecord } from './core/tasks.ts';
8
8
  import { type ExecutionFilePart, type ModelInfoResolver, type TaskBoardAttachmentStore } from './host/attachments.ts';
9
9
  /**
@@ -156,16 +156,6 @@ export interface PromptContext {
156
156
  * @returns the prompt text.
157
157
  */
158
158
  export declare function promptText(task: TaskRecord, context?: PromptContext): string;
159
- /**
160
- * Build the objective the built-in `/goal` command receives. A prompt whose
161
- * text would be read as a goal operation is prefixed with a neutral label: the
162
- * instruction stays intact, and the command arms an objective instead of
163
- * clearing, pausing, or editing an unrelated goal (or refusing for a missing
164
- * one).
165
- * @param prompt - the composed execution prompt.
166
- * @returns the objective text for `/goal <objective>`.
167
- */
168
- export declare function goalObjective(prompt: string): string;
169
159
  /**
170
160
  * The optional runtime faces an execution needs beyond the session gateway:
171
161
  * the official attachment storage and the model-info reader the image
@@ -177,6 +167,15 @@ export interface TaskBoardRuntimeFaces {
177
167
  attachments?: () => TaskBoardAttachmentStore | undefined;
178
168
  /** The model-info reader, or undefined when the deployment serves no model information. */
179
169
  llm?: () => ModelInfoResolver | undefined;
170
+ /**
171
+ * Whether this deployment runs the legacy Agent Teams runtime, read live
172
+ * from the agent tool registry. Absent, or answering false, means the
173
+ * deployment is not PROVEN legacy: the dispatcher preset is then forced as
174
+ * before. Only a positive answer refuses the run, so a deployment whose
175
+ * registry cannot be read keeps its current behaviour instead of losing the
176
+ * ability to dispatch a subtask tree.
177
+ */
178
+ legacyAgentTeams?: () => boolean;
180
179
  }
181
180
  export declare class HostExecutionRunner {
182
181
  private readonly gateway;
@@ -234,25 +233,11 @@ export declare class HostExecutionRunner {
234
233
  */
235
234
  agentPreset?: string;
236
235
  onSession?: (sessionId: string) => void;
237
- onGoalArmed?: (armed: boolean) => void;
238
- /**
239
- * GLOBAL native /goal switch, resolved by the caller ONCE per execution and
240
- * carried here so the decision is frozen for this launch.
241
- *
242
- * Frozen deliberately: a settings edit made while the run is in flight must
243
- * not arm, disarm or otherwise change the goal/acceptance contract of a run
244
- * already running. Absent means off — the default for every deployment that
245
- * never touched the switch, including cards written before the option
246
- * existed. A plain single turn is what an off switch produces; the task-level
247
- * `goalRun` still applies on top of it (both must ASK for a goal).
248
- */
249
- goalEnabled?: boolean;
250
236
  /**
251
237
  * The host model catalog, read ONCE per execution by the caller. The card's
252
238
  * pinned reasoning effort is sent only when this catalog declares it for the
253
- * route the execution runs at, so one snapshot decides both the acceptance
254
- * contract and the effort this run freezes. Absent means "no capability
255
- * evidence": an effort is then not sent at all.
239
+ * route the execution runs at. Absent means "no capability evidence": an
240
+ * effort is then not sent at all.
256
241
  */
257
242
  catalog?: ModelCatalogView;
258
243
  }): Promise<string>;
@@ -322,53 +307,12 @@ export declare class HostExecutionRunner {
322
307
  /**
323
308
  * Read the host's model catalog: the default route an unconfigured session
324
309
  * starts at, and each provider's models with the reasoning metadata its
325
- * adapter exposes. The acceptance settings card and the frozen contract both
326
- * resolve against it, so "inherit host" means the host's own configuration
327
- * rather than a session's or a card's pinned model.
310
+ * adapter exposes. The board resolves a card's pinned route and reasoning
311
+ * level against it, so "the model declares this level" is answered from the
312
+ * host's own configuration rather than from a session's or a card's pin.
328
313
  * @returns the raw catalog value, or undefined when this cohort serves none.
329
314
  */
330
315
  modelCatalog(): Promise<unknown>;
331
- /**
332
- * Arm dsh's built-in goal on the session. The task prompt is queued FIRST, so
333
- * the session's first turn carries the instruction verbatim; `/goal
334
- * <objective>` then turns the same text into a persistent objective, and
335
- * dsh's goal-round driver keeps starting continuation rounds until the agent
336
- * marks it complete (see {@link goalVerdict} for how the run settles).
337
- *
338
- * Two switches gate the arming, and BOTH must ask for it:
339
- * - the GLOBAL native-/goal switch (`goalEnabled`, default OFF), frozen when
340
- * this execution started; and
341
- * - the task's own `goalRun` (absent means off, only an explicit true opts
342
- * the card into a goal run).
343
- *
344
- * A refusal (no command dispatcher, no `/goal` command in this cohort, an
345
- * objective the command rejects) is reported and the run continues as a plain
346
- * turn: the task was asked to run, and a missing goal mode must not lose the
347
- * work.
348
- * @param sessionId - the session to arm in.
349
- * @param task - the task being run.
350
- * @param context - the run's prompt context.
351
- * @param goalEnabled - the GLOBAL switch, frozen for this execution.
352
- * @returns whether `/goal` was really armed.
353
- */
354
- private armGoal;
355
- /**
356
- * The verdict an armed dsh goal imposes on an otherwise completed turn.
357
- *
358
- * A goal run is one session working many automatic continuation rounds:
359
- * dsh's goal-round driver queues the next round whenever the agent goes
360
- * idle, so the first completed `turn/end` is not the execution's result.
361
- * Settling there would leave the card in `done` while the session keeps
362
- * working, and a scheduled task would fire a second, concurrent session.
363
- * The session projection is the authority: an `active` goal keeps the
364
- * execution pending, a `blocked` goal fails it with the recorded reason, and
365
- * any other phase (complete, paused, or no goal at all) leaves the turn
366
- * verdict in place.
367
- *
368
- * An unreadable projection falls back to that turn verdict: a cohort whose
369
- * gateway withdrew `session/projections` must not hang every execution.
370
- */
371
- private goalVerdict;
372
316
  listRunning(): Promise<{
373
317
  known: true;
374
318
  count: number;