@linxin666/dsh-client-ui-task-board 0.4.16 → 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.
- package/README.i18n.yaml +2 -2
- package/README.md +16 -36
- package/README.zh.md +16 -36
- package/lib/client.js +101 -1348
- package/lib/client.js.map +1 -1
- package/lib/index.js +129 -2528
- package/lib/types/client/TaskBoardSettingsCard.d.ts +0 -20
- package/lib/types/client/board/status-key.d.ts +0 -15
- package/lib/types/client/locales.d.ts +1 -110
- package/lib/types/core/controller.d.ts +1 -1
- package/lib/types/core/extension.d.ts +4 -5
- package/lib/types/core/model-catalog.d.ts +58 -0
- package/lib/types/core/reasoning-effort.d.ts +1 -1
- package/lib/types/core/tasks.d.ts +0 -45
- package/lib/types/core/use-cases/task-update.d.ts +1 -1
- package/lib/types/host/llm-dispatch.d.ts +8 -10
- package/lib/types/host-ledger.d.ts +0 -28
- package/lib/types/host-runner.d.ts +6 -71
- package/lib/types/host-service.d.ts +17 -89
- package/lib/types/index.d.ts +0 -78
- package/lib/types/protocol.d.ts +6 -23
- package/package.json +26 -26
- package/src/client/TaskBoardSettingsCard.tsx +13 -200
- package/src/client/board/ExecutionLog.tsx +2 -5
- package/src/client/board/NewTaskModal.tsx +1 -42
- package/src/client/board/TaskCard.tsx +2 -7
- package/src/client/board/TaskDetail.tsx +2 -37
- package/src/client/board/status-key.ts +0 -30
- package/src/client/board-settings.module.css +3 -22
- package/src/client/board.module.css +1 -104
- package/src/client/index.ts +1 -1
- package/src/client/locales.ts +6 -224
- package/src/core/controller.ts +1 -3
- package/src/core/extension.ts +4 -5
- package/src/core/model-catalog.ts +114 -0
- package/src/core/reasoning-effort.ts +1 -1
- package/src/core/store.ts +22 -17
- package/src/core/tasks.ts +0 -53
- package/src/core/use-cases/task-update.ts +1 -8
- package/src/host/agent-tools.ts +1 -15
- package/src/host/llm-dispatch.ts +8 -10
- package/src/host-ledger.ts +1 -86
- package/src/host-routes.ts +4 -4
- package/src/host-runner.ts +12 -138
- package/src/host-service.ts +51 -266
- package/src/index.ts +9 -163
- package/src/protocol.ts +8 -43
- package/lib/types/client/board/VerificationReport.d.ts +0 -10
- package/lib/types/core/verification-budget.d.ts +0 -52
- package/lib/types/core/verification.d.ts +0 -753
- package/lib/types/host/verification-gate.d.ts +0 -95
- package/lib/types/host/verification-runner.d.ts +0 -139
- package/lib/types/host/workspace-evidence.d.ts +0 -53
- package/src/client/board/VerificationReport.tsx +0 -361
- package/src/core/verification-budget.ts +0 -115
- package/src/core/verification.ts +0 -1594
- package/src/host/verification-gate.ts +0 -487
- package/src/host/verification-runner.ts +0 -702
- 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. */
|
|
@@ -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;
|
|
@@ -289,19 +287,10 @@ export declare const zh: {
|
|
|
289
287
|
'exec.reuseSession': string;
|
|
290
288
|
'exec.reuseSessionHint': string;
|
|
291
289
|
'exec.reuseSessionHint.short': string;
|
|
292
|
-
'exec.goalRun': string;
|
|
293
|
-
'exec.goalRunHint': string;
|
|
294
|
-
'exec.goalRunHint.short': string;
|
|
295
|
-
'exec.goalRunGlobalOff': string;
|
|
296
|
-
'exec.skipVerification': string;
|
|
297
|
-
'exec.skipVerificationHint': string;
|
|
298
|
-
'exec.skipVerificationHint.short': string;
|
|
299
290
|
'detail.executionSettings': string;
|
|
300
|
-
'detail.settings.
|
|
291
|
+
'detail.settings.run': string;
|
|
301
292
|
'detail.settings.summary.none': string;
|
|
302
293
|
'detail.settings.summary.reuseSession': string;
|
|
303
|
-
'detail.settings.summary.goal': string;
|
|
304
|
-
'detail.settings.summary.skipVerification': string;
|
|
305
294
|
'exec.hint': string;
|
|
306
295
|
'exec.hint.short': string;
|
|
307
296
|
'settings.title': string;
|
|
@@ -350,39 +339,6 @@ export declare const zh: {
|
|
|
350
339
|
'settings.spendBudgetTokens': string;
|
|
351
340
|
'settings.spendBudgetTokensHint': string;
|
|
352
341
|
'settings.spendBudgetTokensHintBrief': string;
|
|
353
|
-
'settings.runBehaviorTitle': string;
|
|
354
|
-
'settings.runBehaviorCardHint': string;
|
|
355
|
-
'settings.goalRunGlobal': string;
|
|
356
|
-
'settings.goalRunGlobalHint': string;
|
|
357
|
-
'settings.goalRunGlobalHintBrief': string;
|
|
358
|
-
'settings.goalRunGlobalDisabledTaskOption': string;
|
|
359
|
-
'settings.goalVerificationTitle': string;
|
|
360
|
-
'settings.goalVerification': string;
|
|
361
|
-
'settings.goalVerificationCardHint': string;
|
|
362
|
-
'settings.goalVerificationHint': string;
|
|
363
|
-
'settings.goalVerificationHintBrief': string;
|
|
364
|
-
'settings.goalVerificationModel': string;
|
|
365
|
-
'settings.goalVerificationModelHint': string;
|
|
366
|
-
'settings.goalVerificationModelHintBrief': string;
|
|
367
|
-
'settings.goalVerificationModelInherit': string;
|
|
368
|
-
'settings.goalVerificationModelInheritUnknown': string;
|
|
369
|
-
'settings.goalVerificationEffort': string;
|
|
370
|
-
'settings.goalVerificationEffortHint': string;
|
|
371
|
-
'settings.goalVerificationEffortHintBrief': string;
|
|
372
|
-
'settings.goalVerificationEffortInherit': string;
|
|
373
|
-
'settings.goalVerificationEffortInheritUnknown': string;
|
|
374
|
-
'settings.goalVerificationResolved': string;
|
|
375
|
-
'settings.goalVerificationResolvedModel': string;
|
|
376
|
-
'settings.goalVerificationResolvedEffort': string;
|
|
377
|
-
'settings.goalVerificationResolvedNoEffort': string;
|
|
378
|
-
'settings.goalVerificationResolvedSource': string;
|
|
379
|
-
'settings.goalVerificationSourceInherit': string;
|
|
380
|
-
'settings.goalVerificationSourceExplicit': string;
|
|
381
|
-
'settings.goalVerificationResolvedPreset': string;
|
|
382
|
-
'settings.goalVerificationRouteMissing': string;
|
|
383
|
-
'settings.goalVerificationEffortFallback': string;
|
|
384
|
-
'settings.goalVerificationEffortFallbackNone': string;
|
|
385
|
-
'settings.goalVerificationModelInvalid': string;
|
|
386
342
|
'settings.cardDefaultsTitle': string;
|
|
387
343
|
'settings.cardDefaultsCardHint': string;
|
|
388
344
|
'settings.cardDefaultsCardBrief': string;
|
|
@@ -392,71 +348,6 @@ export declare const zh: {
|
|
|
392
348
|
'settings.cardDefaultPermissionHintBrief': string;
|
|
393
349
|
'settings.cardDefaultModelHint': string;
|
|
394
350
|
'settings.cardDefaultModelHintBrief': string;
|
|
395
|
-
'running.executing': string;
|
|
396
|
-
'running.verifying': string;
|
|
397
|
-
'running.repairing': string;
|
|
398
|
-
'running.verificationPassed': string;
|
|
399
|
-
'running.verificationFailed': string;
|
|
400
|
-
'running.verificationInvalid': string;
|
|
401
|
-
'verify.title': string;
|
|
402
|
-
'verify.status.passed': string;
|
|
403
|
-
'verify.status.failed': string;
|
|
404
|
-
'verify.status.exception': string;
|
|
405
|
-
'verify.status.verifying': string;
|
|
406
|
-
'verify.status.pending': string;
|
|
407
|
-
'verify.status.off': string;
|
|
408
|
-
'verify.status.invalid': string;
|
|
409
|
-
'verify.status.invalidHeld': string;
|
|
410
|
-
'verify.attemptInvalid': string;
|
|
411
|
-
'verify.invalidReason.missing-finding': string;
|
|
412
|
-
'verify.invalidReason.unlocatable-quote': string;
|
|
413
|
-
'verify.invalidReason.baseline-finding': string;
|
|
414
|
-
'verify.invalidReason.vacuous-finding': string;
|
|
415
|
-
'verify.invalidReason.insufficient-evidence': string;
|
|
416
|
-
'verify.invalidReason.unknown': string;
|
|
417
|
-
'verify.invalidCounts': string;
|
|
418
|
-
'verify.invalidDetail': string;
|
|
419
|
-
'verify.criterionFindings': string;
|
|
420
|
-
'verify.criterionFinding': string;
|
|
421
|
-
'verify.criterionFindingFull': string;
|
|
422
|
-
'verify.location.task': string;
|
|
423
|
-
'verify.location.trajectory': string;
|
|
424
|
-
'verify.location.workspace': string;
|
|
425
|
-
'verify.location.baseline': string;
|
|
426
|
-
'verify.location.unknown': string;
|
|
427
|
-
'verify.detailRemoved': string;
|
|
428
|
-
'verify.cleanup.cleaned': string;
|
|
429
|
-
'verify.cleanup.pending': string;
|
|
430
|
-
'verify.cleanup.failed': string;
|
|
431
|
-
'verify.cleanup.audit': string;
|
|
432
|
-
'verify.cleanup.stage.quality': string;
|
|
433
|
-
'verify.cleanup.stage.invalid': string;
|
|
434
|
-
'verify.cleanup.stage.exception': string;
|
|
435
|
-
'verify.cleanup.stage.budget': string;
|
|
436
|
-
'verify.summary': string;
|
|
437
|
-
'verify.criteria': string;
|
|
438
|
-
'verify.criterion': string;
|
|
439
|
-
'verify.rounds': string;
|
|
440
|
-
'verify.judge': string;
|
|
441
|
-
'verify.judgeNoEffort': string;
|
|
442
|
-
'verify.judgeInherited': string;
|
|
443
|
-
'verify.attempt': string;
|
|
444
|
-
'verify.attemptException': string;
|
|
445
|
-
'verify.counts': string;
|
|
446
|
-
'verify.findings': string;
|
|
447
|
-
'verify.noFindings': string;
|
|
448
|
-
'verify.evidence': string;
|
|
449
|
-
'verify.workspaceEvidence': string;
|
|
450
|
-
'verify.usage': string;
|
|
451
|
-
'verify.usageIncomplete': string;
|
|
452
|
-
'verify.finalFailure': string;
|
|
453
|
-
'verify.applicability.disabled': string;
|
|
454
|
-
'verify.applicability.goalUnavailable': string;
|
|
455
|
-
'verify.applicability.skipped': string;
|
|
456
|
-
'verify.applicability.teamMember': string;
|
|
457
|
-
'verify.applicability.goalDisabled': string;
|
|
458
|
-
'verify.effortFallback': string;
|
|
459
|
-
'verify.thresholdValue': string;
|
|
460
351
|
'detail.parent': string;
|
|
461
352
|
'detail.parent.open': string;
|
|
462
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' | '
|
|
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,
|
|
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
|
|
370
|
-
*
|
|
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
|
-
|
|
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 './
|
|
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;
|
|
@@ -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'
|
|
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
|
|
5
|
-
* (`
|
|
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
|
|
24
|
-
*
|
|
25
|
-
*
|
|
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
|
-
* `
|
|
40
|
-
*
|
|
41
|
-
*
|
|
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/
|
|
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
|
|
@@ -243,25 +233,11 @@ export declare class HostExecutionRunner {
|
|
|
243
233
|
*/
|
|
244
234
|
agentPreset?: string;
|
|
245
235
|
onSession?: (sessionId: string) => void;
|
|
246
|
-
onGoalArmed?: (armed: boolean) => void;
|
|
247
|
-
/**
|
|
248
|
-
* GLOBAL native /goal switch, resolved by the caller ONCE per execution and
|
|
249
|
-
* carried here so the decision is frozen for this launch.
|
|
250
|
-
*
|
|
251
|
-
* Frozen deliberately: a settings edit made while the run is in flight must
|
|
252
|
-
* not arm, disarm or otherwise change the goal/acceptance contract of a run
|
|
253
|
-
* already running. Absent means off — the default for every deployment that
|
|
254
|
-
* never touched the switch, including cards written before the option
|
|
255
|
-
* existed. A plain single turn is what an off switch produces; the task-level
|
|
256
|
-
* `goalRun` still applies on top of it (both must ASK for a goal).
|
|
257
|
-
*/
|
|
258
|
-
goalEnabled?: boolean;
|
|
259
236
|
/**
|
|
260
237
|
* The host model catalog, read ONCE per execution by the caller. The card's
|
|
261
238
|
* pinned reasoning effort is sent only when this catalog declares it for the
|
|
262
|
-
* route the execution runs at
|
|
263
|
-
*
|
|
264
|
-
* 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.
|
|
265
241
|
*/
|
|
266
242
|
catalog?: ModelCatalogView;
|
|
267
243
|
}): Promise<string>;
|
|
@@ -331,53 +307,12 @@ export declare class HostExecutionRunner {
|
|
|
331
307
|
/**
|
|
332
308
|
* Read the host's model catalog: the default route an unconfigured session
|
|
333
309
|
* starts at, and each provider's models with the reasoning metadata its
|
|
334
|
-
* adapter exposes. The
|
|
335
|
-
*
|
|
336
|
-
* rather than a session's or a card's
|
|
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.
|
|
337
313
|
* @returns the raw catalog value, or undefined when this cohort serves none.
|
|
338
314
|
*/
|
|
339
315
|
modelCatalog(): Promise<unknown>;
|
|
340
|
-
/**
|
|
341
|
-
* Arm dsh's built-in goal on the session. The task prompt is queued FIRST, so
|
|
342
|
-
* the session's first turn carries the instruction verbatim; `/goal
|
|
343
|
-
* <objective>` then turns the same text into a persistent objective, and
|
|
344
|
-
* dsh's goal-round driver keeps starting continuation rounds until the agent
|
|
345
|
-
* marks it complete (see {@link goalVerdict} for how the run settles).
|
|
346
|
-
*
|
|
347
|
-
* Two switches gate the arming, and BOTH must ask for it:
|
|
348
|
-
* - the GLOBAL native-/goal switch (`goalEnabled`, default OFF), frozen when
|
|
349
|
-
* this execution started; and
|
|
350
|
-
* - the task's own `goalRun` (absent means off, only an explicit true opts
|
|
351
|
-
* the card into a goal run).
|
|
352
|
-
*
|
|
353
|
-
* A refusal (no command dispatcher, no `/goal` command in this cohort, an
|
|
354
|
-
* objective the command rejects) is reported and the run continues as a plain
|
|
355
|
-
* turn: the task was asked to run, and a missing goal mode must not lose the
|
|
356
|
-
* work.
|
|
357
|
-
* @param sessionId - the session to arm in.
|
|
358
|
-
* @param task - the task being run.
|
|
359
|
-
* @param context - the run's prompt context.
|
|
360
|
-
* @param goalEnabled - the GLOBAL switch, frozen for this execution.
|
|
361
|
-
* @returns whether `/goal` was really armed.
|
|
362
|
-
*/
|
|
363
|
-
private armGoal;
|
|
364
|
-
/**
|
|
365
|
-
* The verdict an armed dsh goal imposes on an otherwise completed turn.
|
|
366
|
-
*
|
|
367
|
-
* A goal run is one session working many automatic continuation rounds:
|
|
368
|
-
* dsh's goal-round driver queues the next round whenever the agent goes
|
|
369
|
-
* idle, so the first completed `turn/end` is not the execution's result.
|
|
370
|
-
* Settling there would leave the card in `done` while the session keeps
|
|
371
|
-
* working, and a scheduled task would fire a second, concurrent session.
|
|
372
|
-
* The session projection is the authority: an `active` goal keeps the
|
|
373
|
-
* execution pending, a `blocked` goal fails it with the recorded reason, and
|
|
374
|
-
* any other phase (complete, paused, or no goal at all) leaves the turn
|
|
375
|
-
* verdict in place.
|
|
376
|
-
*
|
|
377
|
-
* An unreadable projection falls back to that turn verdict: a cohort whose
|
|
378
|
-
* gateway withdrew `session/projections` must not hang every execution.
|
|
379
|
-
*/
|
|
380
|
-
private goalVerdict;
|
|
381
316
|
listRunning(): Promise<{
|
|
382
317
|
known: true;
|
|
383
318
|
count: number;
|