@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.
- package/README.i18n.yaml +2 -2
- package/README.md +17 -37
- package/README.zh.md +17 -37
- package/lib/client.js +136 -1347
- package/lib/client.js.map +1 -1
- package/lib/index.js +166 -2529
- package/lib/types/client/TaskBoardSettingsCard.d.ts +0 -20
- package/lib/types/client/board/ExecutionLog.d.ts +8 -0
- package/lib/types/client/board/status-key.d.ts +0 -15
- package/lib/types/client/locales.d.ts +2 -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/subtask.d.ts +31 -0
- 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 +15 -71
- package/lib/types/host-service.d.ts +25 -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 +17 -6
- 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 +8 -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/subtask.ts +36 -0
- 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 +33 -139
- package/src/host-service.ts +60 -266
- package/src/index.ts +27 -164
- 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
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Goal acceptance time budgets: the one place the judge's per-call ceiling and
|
|
3
|
-
* the acceptance's total ceiling live.
|
|
4
|
-
*
|
|
5
|
-
* Both are user settings (seconds), so the bounds and the seconds to
|
|
6
|
-
* milliseconds conversion live here rather than in either half: the Host
|
|
7
|
-
* clamps a hand-edited profile value to the same range the schema declares, and
|
|
8
|
-
* the gate reads the effective values live, so raising a ceiling takes effect
|
|
9
|
-
* without a reload.
|
|
10
|
-
*
|
|
11
|
-
* The two numbers are one budget, not two independent knobs: one acceptance is
|
|
12
|
-
* {@link ACCEPTANCE_JUDGE_CALLS} serial judge calls (three criteria times two
|
|
13
|
-
* rounds), so a total budget that cannot fit the calls can only end the
|
|
14
|
-
* acceptance early. {@link DEFAULT_VERIFICATION_BUDGET_SECONDS} is therefore
|
|
15
|
-
* derived from the per-call default times the call count plus two retries.
|
|
16
|
-
*
|
|
17
|
-
* @module dsh-task-board/core/verification-budget
|
|
18
|
-
*/
|
|
19
|
-
import { CODING_CRITERIA, VERIFICATION_ROUNDS } from './verification.ts'
|
|
20
|
-
|
|
21
|
-
/** Judge calls one acceptance issues: every criterion, every round. */
|
|
22
|
-
export const ACCEPTANCE_JUDGE_CALLS: number = CODING_CRITERIA.length * VERIFICATION_ROUNDS
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Per-judge-call ceiling used when the row names none: two and a half minutes
|
|
26
|
-
* for a reasoning model reading an 80,000 character trace with a 16,384 token
|
|
27
|
-
* output cap. The former 120s constant was tight enough that a slow but healthy
|
|
28
|
-
* route produced a wall of per-call timeouts, and every one of them was charged
|
|
29
|
-
* as an acceptance anomaly against a budget that then failed the card.
|
|
30
|
-
*/
|
|
31
|
-
export const DEFAULT_VERIFICATION_CALL_TIMEOUT_SECONDS = 150
|
|
32
|
-
|
|
33
|
-
/** Shortest accepted per-call ceiling: below this no useful judge answers. */
|
|
34
|
-
export const VERIFICATION_CALL_TIMEOUT_MIN_SECONDS = 30
|
|
35
|
-
|
|
36
|
-
/** Longest accepted per-call ceiling, ten minutes. */
|
|
37
|
-
export const VERIFICATION_CALL_TIMEOUT_MAX_SECONDS = 600
|
|
38
|
-
|
|
39
|
-
/** Headroom the default total budget leaves beyond the mandatory calls. */
|
|
40
|
-
const DEFAULT_BUDGET_EXTRA_CALLS = 2
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Total ceiling of one acceptance attempt, covering evidence rendering and
|
|
44
|
-
* every judge call including retries. Derived from the per-call default rather
|
|
45
|
-
* than pinned, because a total budget smaller than
|
|
46
|
-
* {@link ACCEPTANCE_JUDGE_CALLS} times the per-call ceiling guarantees that no
|
|
47
|
-
* acceptance can ever finish.
|
|
48
|
-
*/
|
|
49
|
-
export const DEFAULT_VERIFICATION_BUDGET_SECONDS: number =
|
|
50
|
-
DEFAULT_VERIFICATION_CALL_TIMEOUT_SECONDS * (ACCEPTANCE_JUDGE_CALLS + DEFAULT_BUDGET_EXTRA_CALLS)
|
|
51
|
-
|
|
52
|
-
/** Shortest accepted total budget: long enough for at least one judge call. */
|
|
53
|
-
export const VERIFICATION_BUDGET_MIN_SECONDS = 120
|
|
54
|
-
|
|
55
|
-
/** Longest accepted total budget, thirty minutes. */
|
|
56
|
-
export const VERIFICATION_BUDGET_MAX_SECONDS = 1800
|
|
57
|
-
|
|
58
|
-
/** The default total budget in milliseconds, the face the abort timer takes. */
|
|
59
|
-
export const DEFAULT_VERIFICATION_BUDGET_MS = DEFAULT_VERIFICATION_BUDGET_SECONDS * 1_000
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Clamp a configured ceiling into the supported range. A value the schema
|
|
63
|
-
* would refuse (non-finite, below the floor, above the ceiling) still leaves
|
|
64
|
-
* the board judging: an out-of-range setting never disables acceptance.
|
|
65
|
-
* @param value - configured seconds, or undefined for the default.
|
|
66
|
-
* @param fallback - the default to use when nothing usable was configured.
|
|
67
|
-
* @param min - shortest accepted value.
|
|
68
|
-
* @param max - longest accepted value.
|
|
69
|
-
* @returns the effective value in seconds.
|
|
70
|
-
*/
|
|
71
|
-
function clampSeconds(value: number | undefined, fallback: number, min: number, max: number): number {
|
|
72
|
-
if (value === undefined || !Number.isFinite(value)) return fallback
|
|
73
|
-
return Math.min(Math.max(Math.trunc(value), min), max)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* The effective per-judge-call ceiling.
|
|
78
|
-
* @param seconds - configured seconds, or undefined for the default.
|
|
79
|
-
* @returns the effective ceiling in seconds.
|
|
80
|
-
*/
|
|
81
|
-
export function normalizeVerificationCallTimeoutSeconds(seconds: number | undefined): number {
|
|
82
|
-
return clampSeconds(
|
|
83
|
-
seconds,
|
|
84
|
-
DEFAULT_VERIFICATION_CALL_TIMEOUT_SECONDS,
|
|
85
|
-
VERIFICATION_CALL_TIMEOUT_MIN_SECONDS,
|
|
86
|
-
VERIFICATION_CALL_TIMEOUT_MAX_SECONDS,
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* The effective per-judge-call ceiling the timer face takes.
|
|
92
|
-
* @param seconds - configured seconds, or undefined for the default.
|
|
93
|
-
* @returns the effective ceiling in milliseconds.
|
|
94
|
-
*/
|
|
95
|
-
export function verificationCallTimeoutMs(seconds: number | undefined): number {
|
|
96
|
-
return normalizeVerificationCallTimeoutSeconds(seconds) * 1_000
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* The effective total budget of one acceptance attempt.
|
|
101
|
-
* @param seconds - configured seconds, or undefined for the default.
|
|
102
|
-
* @returns the effective budget in seconds.
|
|
103
|
-
*/
|
|
104
|
-
export function normalizeVerificationBudgetSeconds(seconds: number | undefined): number {
|
|
105
|
-
return clampSeconds(seconds, DEFAULT_VERIFICATION_BUDGET_SECONDS, VERIFICATION_BUDGET_MIN_SECONDS, VERIFICATION_BUDGET_MAX_SECONDS)
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* The effective total budget the abort face takes.
|
|
110
|
-
* @param seconds - configured seconds, or undefined for the default.
|
|
111
|
-
* @returns the effective budget in milliseconds.
|
|
112
|
-
*/
|
|
113
|
-
export function verificationBudgetMs(seconds: number | undefined): number {
|
|
114
|
-
return normalizeVerificationBudgetSeconds(seconds) * 1_000
|
|
115
|
-
}
|