@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.
Files changed (59) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +16 -36
  3. package/README.zh.md +16 -36
  4. package/lib/client.js +101 -1348
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +129 -2528
  7. package/lib/types/client/TaskBoardSettingsCard.d.ts +0 -20
  8. package/lib/types/client/board/status-key.d.ts +0 -15
  9. package/lib/types/client/locales.d.ts +1 -110
  10. package/lib/types/core/controller.d.ts +1 -1
  11. package/lib/types/core/extension.d.ts +4 -5
  12. package/lib/types/core/model-catalog.d.ts +58 -0
  13. package/lib/types/core/reasoning-effort.d.ts +1 -1
  14. package/lib/types/core/tasks.d.ts +0 -45
  15. package/lib/types/core/use-cases/task-update.d.ts +1 -1
  16. package/lib/types/host/llm-dispatch.d.ts +8 -10
  17. package/lib/types/host-ledger.d.ts +0 -28
  18. package/lib/types/host-runner.d.ts +6 -71
  19. package/lib/types/host-service.d.ts +17 -89
  20. package/lib/types/index.d.ts +0 -78
  21. package/lib/types/protocol.d.ts +6 -23
  22. package/package.json +26 -26
  23. package/src/client/TaskBoardSettingsCard.tsx +13 -200
  24. package/src/client/board/ExecutionLog.tsx +2 -5
  25. package/src/client/board/NewTaskModal.tsx +1 -42
  26. package/src/client/board/TaskCard.tsx +2 -7
  27. package/src/client/board/TaskDetail.tsx +2 -37
  28. package/src/client/board/status-key.ts +0 -30
  29. package/src/client/board-settings.module.css +3 -22
  30. package/src/client/board.module.css +1 -104
  31. package/src/client/index.ts +1 -1
  32. package/src/client/locales.ts +6 -224
  33. package/src/core/controller.ts +1 -3
  34. package/src/core/extension.ts +4 -5
  35. package/src/core/model-catalog.ts +114 -0
  36. package/src/core/reasoning-effort.ts +1 -1
  37. package/src/core/store.ts +22 -17
  38. package/src/core/tasks.ts +0 -53
  39. package/src/core/use-cases/task-update.ts +1 -8
  40. package/src/host/agent-tools.ts +1 -15
  41. package/src/host/llm-dispatch.ts +8 -10
  42. package/src/host-ledger.ts +1 -86
  43. package/src/host-routes.ts +4 -4
  44. package/src/host-runner.ts +12 -138
  45. package/src/host-service.ts +51 -266
  46. package/src/index.ts +9 -163
  47. package/src/protocol.ts +8 -43
  48. package/lib/types/client/board/VerificationReport.d.ts +0 -10
  49. package/lib/types/core/verification-budget.d.ts +0 -52
  50. package/lib/types/core/verification.d.ts +0 -753
  51. package/lib/types/host/verification-gate.d.ts +0 -95
  52. package/lib/types/host/verification-runner.d.ts +0 -139
  53. package/lib/types/host/workspace-evidence.d.ts +0 -53
  54. package/src/client/board/VerificationReport.tsx +0 -361
  55. package/src/core/verification-budget.ts +0 -115
  56. package/src/core/verification.ts +0 -1594
  57. package/src/host/verification-gate.ts +0 -487
  58. package/src/host/verification-runner.ts +0 -702
  59. 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
- }