@linxin666/dsh-client-ui-task-board 0.4.12 → 0.4.14

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 (61) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +9 -3
  3. package/README.zh.md +9 -3
  4. package/lib/client.js +1476 -478
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +1280 -65
  7. package/lib/types/client/board/AttachmentField.d.ts +70 -0
  8. package/lib/types/client/board/model-options.d.ts +21 -1
  9. package/lib/types/client/board/source-group.d.ts +27 -0
  10. package/lib/types/client/host-api.d.ts +25 -0
  11. package/lib/types/client/locales.d.ts +17 -0
  12. package/lib/types/client/pending-verify.d.ts +47 -0
  13. package/lib/types/client/service.d.ts +4 -1
  14. package/lib/types/core/attachment.d.ts +132 -0
  15. package/lib/types/core/controller.d.ts +26 -2
  16. package/lib/types/core/extension.d.ts +82 -0
  17. package/lib/types/core/session-reuse.d.ts +7 -1
  18. package/lib/types/core/tasks.d.ts +38 -1
  19. package/lib/types/core/use-cases/task-update.d.ts +21 -0
  20. package/lib/types/core/wire-projection.d.ts +35 -0
  21. package/lib/types/host/attachments.d.ts +250 -0
  22. package/lib/types/host/extension-registry.d.ts +40 -0
  23. package/lib/types/host-ledger.d.ts +16 -0
  24. package/lib/types/host-routes.d.ts +14 -0
  25. package/lib/types/host-runner.d.ts +53 -1
  26. package/lib/types/host-service.d.ts +59 -0
  27. package/lib/types/index.d.ts +23 -0
  28. package/lib/types/protocol.d.ts +39 -6
  29. package/locale/en.json +6 -0
  30. package/locale/zh.json +6 -0
  31. package/package.json +6 -2
  32. package/src/client/TaskBoardSettingsCard.tsx +11 -1
  33. package/src/client/board/AttachmentField.tsx +383 -0
  34. package/src/client/board/EditTaskModal.tsx +63 -0
  35. package/src/client/board/NewTaskModal.tsx +76 -4
  36. package/src/client/board/TaskBoard.tsx +47 -10
  37. package/src/client/board/TaskDetail.tsx +30 -2
  38. package/src/client/board/model-options.ts +32 -2
  39. package/src/client/board/source-group.ts +94 -0
  40. package/src/client/board.module.css +83 -0
  41. package/src/client/host-api.ts +70 -0
  42. package/src/client/index.ts +11 -0
  43. package/src/client/locales.ts +34 -0
  44. package/src/client/pending-verify.ts +90 -0
  45. package/src/client/service.ts +24 -0
  46. package/src/core/attachment.ts +287 -0
  47. package/src/core/controller.ts +47 -1
  48. package/src/core/extension.ts +86 -0
  49. package/src/core/session-reuse.ts +7 -1
  50. package/src/core/store.ts +10 -1
  51. package/src/core/tasks.ts +49 -0
  52. package/src/core/use-cases/task-update.ts +27 -2
  53. package/src/core/wire-projection.ts +81 -0
  54. package/src/host/attachments.ts +650 -0
  55. package/src/host/extension-registry.ts +150 -5
  56. package/src/host-ledger.ts +32 -4
  57. package/src/host-routes.ts +168 -13
  58. package/src/host-runner.ts +124 -4
  59. package/src/host-service.ts +165 -12
  60. package/src/index.ts +47 -0
  61. package/src/protocol.ts +57 -9
package/lib/client.js CHANGED
@@ -80,6 +80,185 @@ window.__ModuleLoader__.load({
80
80
  }
81
81
  return Object.keys(result).length === 0 ? void 0 : result;
82
82
  }
83
+ /** Maximum byte length of one attachment (10 MiB). */
84
+ const TASK_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024;
85
+ /** Maximum byte length of all attachments of one card together (32 MiB). */
86
+ const TASK_ATTACHMENT_TOTAL_MAX_BYTES = 32 * 1024 * 1024;
87
+ /** Raster media types the official image path accepts. */
88
+ const TASK_ATTACHMENT_IMAGE_MEDIA_TYPES = [
89
+ "image/png",
90
+ "image/jpeg",
91
+ "image/webp",
92
+ "image/gif"
93
+ ];
94
+ /** Longest accepted display name of an attachment. */
95
+ const ATTACHMENT_NAME_MAX_LENGTH = 255;
96
+ /** Longest accepted media type of an attachment. */
97
+ const ATTACHMENT_MEDIA_TYPE_MAX_LENGTH = 255;
98
+ /** Longest accepted storage identifier of an attachment. */
99
+ const ATTACHMENT_ID_MAX_LENGTH = 512;
100
+ const SHA256_PATTERN = /^[0-9a-f]{64}$/;
101
+ const MEDIA_TYPE_PATTERN = /^[a-z0-9][a-z0-9!#$&^_.+-]*\/[a-z0-9][a-z0-9!#$&^_.+-]*$/;
102
+ /** Every key one attachment may carry. */
103
+ const ATTACHMENT_KEYS = [
104
+ "kind",
105
+ "attachmentId",
106
+ "name",
107
+ "bytes",
108
+ "mediaType",
109
+ "sha256",
110
+ "width",
111
+ "height"
112
+ ];
113
+ function isPlainObject(value) {
114
+ return typeof value === "object" && value !== null && !Array.isArray(value);
115
+ }
116
+ /** Whether a value is a well-formed positive pixel count. */
117
+ function isPixelCount(value) {
118
+ return typeof value === "number" && Number.isInteger(value) && value > 0;
119
+ }
120
+ /**
121
+ * The canonical display name of an attachment.
122
+ *
123
+ * A name reaches the ledger from two directions: the browser picks it, and an
124
+ * execution prompt reads it. Both make one form mandatory — the name must be
125
+ * a single line without any path part, so it can neither break out of the
126
+ * prompt line nor point at a directory.
127
+ *
128
+ * The canonical form is therefore: the LEAF of whatever path-like text was
129
+ * offered, every control character (a newline included) turned into a space,
130
+ * whitespace runs collapsed into one space, the result trimmed and bounded.
131
+ * An empty result becomes a fixed placeholder.
132
+ *
133
+ * The Host upload path canonicalizes the name BEFORE publishing it, and the
134
+ * wire gate accepts only a name that already IS canonical — so the name the
135
+ * ledger holds and the name the storage holds are the same string.
136
+ * @param value - the offered name.
137
+ * @returns the canonical name.
138
+ */
139
+ function canonicalAttachmentName(value) {
140
+ const cleaned = ((typeof value === "string" ? value : "").split(/[\\/]/).pop() ?? "").replace(/[\u0000-\u001f\u007f]/g, " ").replace(/\s+/g, " ").trim();
141
+ if (cleaned === "") return "attachment";
142
+ return cleaned.slice(0, ATTACHMENT_NAME_MAX_LENGTH);
143
+ }
144
+ /**
145
+ * Whether an unknown value is a well-formed attachment (the STRICT gate: the
146
+ * wire path uses it, so a hand-written payload cannot smuggle an extra field
147
+ * onto the ledger, a path-like name, or an image without its pixel size).
148
+ * @param value - the candidate attachment.
149
+ * @returns whether the value is a usable attachment.
150
+ */
151
+ function isTaskAttachment(value) {
152
+ if (!isPlainObject(value)) return false;
153
+ if (Object.keys(value).some((key) => !ATTACHMENT_KEYS.includes(key))) return false;
154
+ if (value.kind !== "image" && value.kind !== "file") return false;
155
+ if (typeof value.attachmentId !== "string") return false;
156
+ const id = value.attachmentId;
157
+ if (id === "" || id.length > ATTACHMENT_ID_MAX_LENGTH) return false;
158
+ if (id.includes("/") || id.includes("\\") || id.includes("..")) return false;
159
+ if (typeof value.name !== "string") return false;
160
+ if (value.name !== canonicalAttachmentName(value.name)) return false;
161
+ if (typeof value.bytes !== "number" || !Number.isInteger(value.bytes) || value.bytes < 0) return false;
162
+ if (typeof value.mediaType !== "string" || value.mediaType.length > ATTACHMENT_MEDIA_TYPE_MAX_LENGTH) return false;
163
+ if (!MEDIA_TYPE_PATTERN.test(value.mediaType)) return false;
164
+ if (value.mediaType !== value.mediaType.toLowerCase()) return false;
165
+ if (typeof value.sha256 !== "string" || !SHA256_PATTERN.test(value.sha256)) return false;
166
+ if (value.kind === "image") {
167
+ if (!TASK_ATTACHMENT_IMAGE_MEDIA_TYPES.includes(value.mediaType.toLowerCase())) return false;
168
+ if (!isPixelCount(value.width) || !isPixelCount(value.height)) return false;
169
+ } else if (value.width !== void 0 || value.height !== void 0) return false;
170
+ return true;
171
+ }
172
+ /**
173
+ * Repair one persisted attachment entry: canonicalize its name and keep the
174
+ * fields that are usable. An entry that cannot be repaired — an unknown kind,
175
+ * a malformed identifier, an image without its pixel size — is dropped.
176
+ * @param value - the persisted entry.
177
+ * @returns the repaired attachment, or undefined when it cannot be repaired.
178
+ */
179
+ function repairAttachment(value) {
180
+ if (!isPlainObject(value)) return void 0;
181
+ if (value.kind !== "image" && value.kind !== "file") return void 0;
182
+ if (typeof value.attachmentId !== "string") return void 0;
183
+ const id = value.attachmentId;
184
+ if (id === "" || id.length > ATTACHMENT_ID_MAX_LENGTH) return void 0;
185
+ if (id.includes("/") || id.includes("\\") || id.includes("..")) return void 0;
186
+ if (typeof value.bytes !== "number" || !Number.isInteger(value.bytes) || value.bytes < 0) return void 0;
187
+ if (typeof value.mediaType !== "string" || !MEDIA_TYPE_PATTERN.test(value.mediaType)) return void 0;
188
+ if (typeof value.sha256 !== "string" || !SHA256_PATTERN.test(value.sha256)) return void 0;
189
+ const name = canonicalAttachmentName(value.name);
190
+ if (value.kind === "image") {
191
+ if (!TASK_ATTACHMENT_IMAGE_MEDIA_TYPES.includes(value.mediaType.toLowerCase())) return void 0;
192
+ if (!isPixelCount(value.width) || !isPixelCount(value.height)) return void 0;
193
+ return {
194
+ kind: "image",
195
+ attachmentId: id,
196
+ name,
197
+ bytes: value.bytes,
198
+ mediaType: value.mediaType.toLowerCase(),
199
+ sha256: value.sha256,
200
+ width: value.width,
201
+ height: value.height
202
+ };
203
+ }
204
+ if (value.width !== void 0 || value.height !== void 0) return void 0;
205
+ return {
206
+ kind: "file",
207
+ attachmentId: id,
208
+ name,
209
+ bytes: value.bytes,
210
+ mediaType: value.mediaType.toLowerCase(),
211
+ sha256: value.sha256
212
+ };
213
+ }
214
+ /**
215
+ * Drop the repeated storage identifiers of a list, keeping the FIRST entry of
216
+ * each identifier.
217
+ *
218
+ * The storage is content-addressed, so the same bytes uploaded twice produce
219
+ * the same identifier. A list that carried the identifier twice would render
220
+ * two rows for one object and claim it twice against the card's limits, so the
221
+ * list is deduplicated at the boundary that can produce it.
222
+ * @param attachments - the candidate list.
223
+ * @returns the deduplicated list, in the original order.
224
+ */
225
+ function dedupeAttachments(attachments) {
226
+ const seen = /* @__PURE__ */ new Set();
227
+ const unique = [];
228
+ for (const attachment of attachments) {
229
+ if (seen.has(attachment.attachmentId)) continue;
230
+ seen.add(attachment.attachmentId);
231
+ unique.push(attachment);
232
+ }
233
+ return unique;
234
+ }
235
+ /**
236
+ * Repair a persisted attachment list: canonicalize the names, drop the
237
+ * entries that cannot be repaired, deduplicate the storage identifiers, and
238
+ * cap the count and the byte totals. Returns undefined when nothing usable
239
+ * remains, so the caller clears the field instead of storing an empty list —
240
+ * the same policy the tag and schedule repairs follow.
241
+ * @param value - the persisted value.
242
+ * @returns the repaired list, or undefined when nothing survives.
243
+ */
244
+ function normalizeAttachments(value) {
245
+ if (!Array.isArray(value)) return void 0;
246
+ const repaired = [];
247
+ const seen = /* @__PURE__ */ new Set();
248
+ let total = 0;
249
+ for (const entry of value) {
250
+ const attachment = repairAttachment(entry);
251
+ if (attachment === void 0) continue;
252
+ if (attachment.bytes > 10485760) continue;
253
+ if (total + attachment.bytes > 33554432) continue;
254
+ if (seen.has(attachment.attachmentId)) continue;
255
+ seen.add(attachment.attachmentId);
256
+ total += attachment.bytes;
257
+ repaired.push(attachment);
258
+ if (repaired.length >= 8) break;
259
+ }
260
+ return repaired.length === 0 ? void 0 : repaired;
261
+ }
83
262
  //#endregion
84
263
  //#region src/core/tasks.ts
85
264
  /**
@@ -88,6 +267,17 @@ window.__ModuleLoader__.load({
88
267
  * {@link ExecutionSummary.seq} into the session history.
89
268
  */
90
269
  const EXECUTION_SUMMARY_LIMIT = 4e3;
270
+ /**
271
+ * Repair a persisted rework block: only a non-blank instruction string
272
+ * survives, so a hand-edited ledger loses the block instead of the execution.
273
+ */
274
+ function normalizeExecutionRework(value) {
275
+ if (typeof value !== "object" || value === null) return void 0;
276
+ const instructions = value.instructions;
277
+ if (typeof instructions !== "string") return void 0;
278
+ const trimmed = instructions.trim();
279
+ return trimmed === "" ? void 0 : { instructions: trimmed };
280
+ }
91
281
  /** Every stop reason this build understands; the repair and wire gates share it. */
92
282
  const SCHEDULE_STOP_REASONS = [
93
283
  "fired",
@@ -288,6 +478,7 @@ window.__ModuleLoader__.load({
288
478
  function createTask(input, now, id) {
289
479
  const tags = normalizeTags(input.tags);
290
480
  const integrations = normalizeTaskIntegrations(input.integrations);
481
+ const attachments = normalizeAttachments(input.attachments);
291
482
  return {
292
483
  id,
293
484
  title: input.title.trim(),
@@ -313,6 +504,7 @@ window.__ModuleLoader__.load({
313
504
  } },
314
505
  ...tags === void 0 ? {} : { tags },
315
506
  ...integrations === void 0 ? {} : { integrations },
507
+ ...attachments === void 0 ? {} : { attachments },
316
508
  ...input.hidden === true ? { hidden: true } : {}
317
509
  };
318
510
  }
@@ -1491,6 +1683,7 @@ window.__ModuleLoader__.load({
1491
1683
  "description",
1492
1684
  "prompt"
1493
1685
  ];
1686
+ [...TASK_CONTENT_FIELDS];
1494
1687
  /**
1495
1688
  * Whether a task's content may still be edited: the task must be on-board
1496
1689
  * (not archived) and must never have started executing. Fail-closed: a task
@@ -1517,7 +1710,7 @@ window.__ModuleLoader__.load({
1517
1710
  function applyUpdateTask(tasks, id, patch, now) {
1518
1711
  return tasks.map((task) => {
1519
1712
  if (task.id !== id) return task;
1520
- const { freeze: freezePatch, handover: handoverPatch, tags: tagsPatch, ...rest } = patch;
1713
+ const { freeze: freezePatch, handover: handoverPatch, tags: tagsPatch, attachments: attachmentsPatch, ...rest } = patch;
1521
1714
  const workspaceId = "workspaceId" in patch ? normalizeTargetId(patch.workspaceId) : void 0;
1522
1715
  const mode = "mode" in patch ? normalizeTargetId(patch.mode) : void 0;
1523
1716
  const permission = "permission" in patch ? normalizePermission(task.permission, patch.permission) : void 0;
@@ -1539,6 +1732,7 @@ window.__ModuleLoader__.load({
1539
1732
  bundledAt: now
1540
1733
  };
1541
1734
  if ("tags" in patch) next.tags = tagsPatch == null ? void 0 : normalizeTags(tagsPatch);
1735
+ if ("attachments" in patch) next.attachments = attachmentsPatch == null ? void 0 : normalizeAttachments(attachmentsPatch);
1542
1736
  if ("permission" in patch && patch.permission !== void 0 && patch.permission !== task.permission || "handover" in patch) next.permissionConfirmedAt = void 0;
1543
1737
  if ("reuseSession" in patch) next.reuseSession = patch.reuseSession === true ? true : void 0;
1544
1738
  if ("goalRun" in patch) next.goalRun = patch.goalRun === true ? true : void 0;
@@ -1602,6 +1796,8 @@ window.__ModuleLoader__.load({
1602
1796
  hostState;
1603
1797
  /** Provider visibility predicates (immutable array; replaced on change). */
1604
1798
  visibility = [];
1799
+ /** Provider source-group selectors (immutable array; replaced on change). */
1800
+ grouping = [];
1605
1801
  remoteSubscribed = false;
1606
1802
  remoteInitialization;
1607
1803
  /** @param deps - store and the sessions navigation face. */
@@ -1642,6 +1838,7 @@ window.__ModuleLoader__.load({
1642
1838
  ...this.transportError === void 0 ? {} : { transportError: this.transportError },
1643
1839
  ...this.hostState === void 0 ? {} : { host: this.hostState },
1644
1840
  visibility: this.visibility,
1841
+ grouping: this.grouping,
1645
1842
  ...this.hostState?.extensions === void 0 ? {} : { extensions: this.hostState.extensions }
1646
1843
  };
1647
1844
  }
@@ -1659,6 +1856,17 @@ window.__ModuleLoader__.load({
1659
1856
  this.notify();
1660
1857
  };
1661
1858
  }
1859
+ /** Register one source-group selector; registration order breaks ownership ties. */
1860
+ registerGrouping(selector) {
1861
+ this.grouping = [...this.grouping, selector];
1862
+ this.notify();
1863
+ return () => {
1864
+ const next = this.grouping.filter((candidate) => candidate !== selector);
1865
+ if (next.length === this.grouping.length) return;
1866
+ this.grouping = next;
1867
+ this.notify();
1868
+ };
1869
+ }
1662
1870
  /**
1663
1871
  * Deliver one provider action through the board's same-origin channel. A
1664
1872
  * board without a Host transport (the legacy in-memory path) refuses it.
@@ -1849,6 +2057,22 @@ window.__ModuleLoader__.load({
1849
2057
  if (transport === void 0 || parse === void 0) throw new Error("task parsing is unavailable");
1850
2058
  return await parse.call(transport, request, signal);
1851
2059
  }
2060
+ /**
2061
+ * Upload one attachment into the Host's attachment storage.
2062
+ *
2063
+ * The form calls this when the card is SAVED, never when a file is picked:
2064
+ * a staged file is a local preview until the card is really saved.
2065
+ * @param file - the picked file.
2066
+ * @param kind - whether the file is stored as an image or verbatim.
2067
+ * @returns the metadata the Host computed, or undefined when this
2068
+ * deployment serves no attachment storage.
2069
+ */
2070
+ async uploadAttachment(file, kind) {
2071
+ const transport = this.deps.transport;
2072
+ const upload = transport?.uploadAttachment;
2073
+ if (transport === void 0 || upload === void 0) return void 0;
2074
+ return await upload.call(transport, file, kind);
2075
+ }
1852
2076
  moveTask(id, status) {
1853
2077
  if (this.deps.transport !== void 0) {
1854
2078
  this.commitRemote({
@@ -2183,6 +2407,7 @@ window.__ModuleLoader__.load({
2183
2407
  const goalRunEnabled = snapshot.goalRunEnabled ?? this.hostState?.goalRunEnabled;
2184
2408
  const cardDefaults = snapshot.cardDefaults;
2185
2409
  const extensions = snapshot.extensions ?? this.hostState?.extensions;
2410
+ const attachmentLimits = snapshot.attachmentLimits ?? this.hostState?.attachmentLimits;
2186
2411
  return {
2187
2412
  revision: snapshot.revision,
2188
2413
  scheduler: snapshot.scheduler,
@@ -2191,7 +2416,8 @@ window.__ModuleLoader__.load({
2191
2416
  ...maxSubtaskDepth === void 0 ? {} : { maxSubtaskDepth },
2192
2417
  ...goalRunEnabled === void 0 ? {} : { goalRunEnabled },
2193
2418
  ...cardDefaults === void 0 ? {} : { cardDefaults },
2194
- ...extensions === void 0 ? {} : { extensions }
2419
+ ...extensions === void 0 ? {} : { extensions },
2420
+ ...attachmentLimits === void 0 ? {} : { attachmentLimits }
2195
2421
  };
2196
2422
  }
2197
2423
  async refreshRemote(preserveError) {
@@ -2313,8 +2539,27 @@ window.__ModuleLoader__.load({
2313
2539
  return options;
2314
2540
  }
2315
2541
  /**
2542
+ * The display form of one model row: the model name first, then the provider
2543
+ * that publishes it, joined by " · ".
2544
+ *
2545
+ * Two providers publishing one model name are two different routes, so the
2546
+ * provider belongs in the label — otherwise the picker offers two identical
2547
+ * rows and the operator cannot tell which route a card would pin. A row
2548
+ * without a provider (the flat discovery fallback names models only) keeps
2549
+ * its bare name, and a row that carries no name of its own shows the model
2550
+ * part of its own qualified route, so the provider is never printed twice.
2551
+ * @param model - the roster row.
2552
+ * @returns the label every model picker row and every collapsed summary shows.
2553
+ */
2554
+ function modelDisplayLabel(model) {
2555
+ const provider = model.provider === void 0 || model.provider === "" ? void 0 : model.provider;
2556
+ const name = model.name !== void 0 && model.name !== "" ? model.name : provider !== void 0 && model.id.startsWith(provider + "/") ? model.id.slice(provider.length + 1) : model.id;
2557
+ if (provider === void 0) return name;
2558
+ return name + " · " + provider;
2559
+ }
2560
+ /**
2316
2561
  * The picker rows of a model roster: the qualified `provider/model` route as
2317
- * the value a pin stores, and the provider beside the model name so two
2562
+ * the value a pin stores, and the shared display form as the label, so two
2318
2563
  * providers offering one model name stay distinguishable.
2319
2564
  * @param models - the roster rows.
2320
2565
  * @returns the choice rows, in roster order.
@@ -2322,7 +2567,7 @@ window.__ModuleLoader__.load({
2322
2567
  function modelChoiceRows(models) {
2323
2568
  return models.map((model) => ({
2324
2569
  value: model.id,
2325
- label: (model.provider === void 0 ? "" : model.provider + " · ") + (model.name ?? model.id)
2570
+ label: modelDisplayLabel(model)
2326
2571
  }));
2327
2572
  }
2328
2573
  /**
@@ -3207,6 +3452,7 @@ window.__ModuleLoader__.load({
3207
3452
  if (record.permission !== void 0 && typeof record.permission !== "string") return false;
3208
3453
  if (record.integrations !== void 0 && (typeof record.integrations !== "object" || record.integrations === null || Array.isArray(record.integrations))) return false;
3209
3454
  if (record.hidden !== void 0 && typeof record.hidden !== "boolean") return false;
3455
+ if (record.attachments !== void 0 && !Array.isArray(record.attachments)) return false;
3210
3456
  if (record.reuseSession !== void 0 && typeof record.reuseSession !== "boolean") return false;
3211
3457
  if (record.goalRun !== void 0 && typeof record.goalRun !== "boolean") return false;
3212
3458
  if (record.skipVerification !== void 0 && typeof record.skipVerification !== "boolean") return false;
@@ -3366,6 +3612,7 @@ window.__ModuleLoader__.load({
3366
3612
  ownError: typeof execution.ownError === "string" ? execution.ownError : void 0,
3367
3613
  summary: normalizeExecutionSummary(execution.summary),
3368
3614
  verification: normalizeVerification(execution.verification),
3615
+ rework: normalizeExecutionRework(execution.rework),
3369
3616
  external: execution.external === true ? true : void 0
3370
3617
  }));
3371
3618
  task.workspaceId = normalizeTargetId(row.workspaceId);
@@ -3381,6 +3628,7 @@ window.__ModuleLoader__.load({
3381
3628
  task.tags = normalizeTags(row.tags);
3382
3629
  task.permissionConfirmedAt = typeof row.permissionConfirmedAt === "number" && Number.isFinite(row.permissionConfirmedAt) ? row.permissionConfirmedAt : void 0;
3383
3630
  task.integrations = normalizeTaskIntegrations(row.integrations);
3631
+ task.attachments = normalizeAttachments(row.attachments);
3384
3632
  task.hidden = row.hidden === true ? true : void 0;
3385
3633
  tasks.push(task);
3386
3634
  }
@@ -3526,12 +3774,14 @@ window.__ModuleLoader__.load({
3526
3774
  "new.section.parse": "AI 解析",
3527
3775
  "new.section.content": "任务内容",
3528
3776
  "new.section.labels": "标签",
3777
+ "new.section.attachments": "附件",
3529
3778
  "new.section.execution": "执行设置",
3530
3779
  "new.section.run": "运行方式",
3531
3780
  "new.section.handover": "交接与续跑",
3532
3781
  "new.section.schedule": "定时运行",
3533
3782
  "new.summary.none": "未设置",
3534
3783
  "new.summary.labelCount": "{count} 个标签",
3784
+ "new.summary.attachmentCount": "{count} 个附件",
3535
3785
  "new.summary.filled": "已填写",
3536
3786
  "new.summary.scheduleOff": "未启用",
3537
3787
  "new.summary.multiRound": "多轮 /goal",
@@ -3569,6 +3819,20 @@ window.__ModuleLoader__.load({
3569
3819
  "new.tagPromptPlaceholder": "例如:产物归档到 02-工作/",
3570
3820
  "new.tagAdd": "添加标签",
3571
3821
  "new.tagRemove": "移除标签 {name}",
3822
+ "new.attachments": "附件",
3823
+ "new.attachmentsHint": "拖放、粘贴或选择文件;文件在保存卡片时才上传。图片会随执行一起送给模型,普通文件以只读路径交给执行会话。",
3824
+ "new.attachments.drop": "把文件拖到这里,或直接粘贴",
3825
+ "new.attachments.pick": "选择文件",
3826
+ "new.attachments.remove": "移除附件 {name}",
3827
+ "new.attachments.limitCount": "每张卡片最多 {count} 个附件",
3828
+ "new.attachments.limitImages": "这个部署每条消息最多接收 {count} 张图片",
3829
+ "new.attachments.limitImageBytes": "图片总大小超过部署上限 {size}",
3830
+ "new.attachments.limitSize": "{name} 超过单个附件上限 {size}",
3831
+ "new.attachments.limitTotal": "附件总大小超过上限 {size}",
3832
+ "new.attachments.unavailable": "这个部署没有提供附件存储,无法上传附件",
3833
+ "new.attachments.uploading": "上传中",
3834
+ "detail.attachments": "附件",
3835
+ "detail.attachments.removeHint": "移除附件只会删掉卡片上的引用;Host 存储里的文件不会被物理删除。",
3572
3836
  "board.tagFilter": "按标签筛选",
3573
3837
  "board.tagFilterClear": "清除标签筛选",
3574
3838
  "board.tagEmpty": "没有同时带这些标签的任务",
@@ -3945,6 +4209,7 @@ window.__ModuleLoader__.load({
3945
4209
  "card.time.updated": "更新于 {time}",
3946
4210
  "board.density.compact": "切换为紧凑卡片",
3947
4211
  "board.density.comfortable": "切换为完整卡片",
4212
+ "board.source.local": "本地任务",
3948
4213
  "board.group.today": "今天",
3949
4214
  "board.group.week": "近 7 天",
3950
4215
  "board.group.earlier": "更早",
@@ -4010,12 +4275,14 @@ window.__ModuleLoader__.load({
4010
4275
  "new.section.parse": "AI Parse",
4011
4276
  "new.section.content": "Task Content",
4012
4277
  "new.section.labels": "Tags",
4278
+ "new.section.attachments": "Attachments",
4013
4279
  "new.section.execution": "Execution Settings",
4014
4280
  "new.section.run": "Run Mode",
4015
4281
  "new.section.handover": "Handover",
4016
4282
  "new.section.schedule": "Scheduled Runs",
4017
4283
  "new.summary.none": "Not set",
4018
4284
  "new.summary.labelCount": "{count} tags",
4285
+ "new.summary.attachmentCount": "{count} attachments",
4019
4286
  "new.summary.filled": "Filled",
4020
4287
  "new.summary.scheduleOff": "Off",
4021
4288
  "new.summary.multiRound": "multi-round /goal",
@@ -4053,6 +4320,20 @@ window.__ModuleLoader__.load({
4053
4320
  "new.tagPromptPlaceholder": "e.g. Archive artefacts under 02-work/",
4054
4321
  "new.tagAdd": "Add tag",
4055
4322
  "new.tagRemove": "Remove tag {name}",
4323
+ "new.attachments": "Attachments",
4324
+ "new.attachmentsHint": "Drag, paste, or pick files; they are uploaded when the card is saved. Images travel with the execution, plain files reach the session as read-only paths.",
4325
+ "new.attachments.drop": "Drop files here, or paste them",
4326
+ "new.attachments.pick": "Choose files",
4327
+ "new.attachments.remove": "Remove attachment {name}",
4328
+ "new.attachments.limitCount": "A card carries at most {count} attachments",
4329
+ "new.attachments.limitImages": "This deployment admits at most {count} images per message",
4330
+ "new.attachments.limitImageBytes": "The images exceed the deployment limit of {size}",
4331
+ "new.attachments.limitSize": "{name} exceeds the per-attachment limit of {size}",
4332
+ "new.attachments.limitTotal": "The attachments exceed the total limit of {size}",
4333
+ "new.attachments.unavailable": "This deployment serves no attachment storage, so nothing can be uploaded",
4334
+ "new.attachments.uploading": "uploading",
4335
+ "detail.attachments": "Attachments",
4336
+ "detail.attachments.removeHint": "Removing an attachment drops the reference on the card; the stored file itself is not physically deleted.",
4056
4337
  "board.tagFilter": "Filter by tag",
4057
4338
  "board.tagFilterClear": "Clear tag filter",
4058
4339
  "board.tagEmpty": "No task carries all of these tags",
@@ -4429,6 +4710,7 @@ window.__ModuleLoader__.load({
4429
4710
  "card.time.updated": "Updated {time}",
4430
4711
  "board.density.compact": "Switch to compact cards",
4431
4712
  "board.density.comfortable": "Switch to full cards",
4713
+ "board.source.local": "Local tasks",
4432
4714
  "board.group.today": "Today",
4433
4715
  "board.group.week": "Last 7 days",
4434
4716
  "board.group.earlier": "Earlier",
@@ -4464,7 +4746,7 @@ window.__ModuleLoader__.load({
4464
4746
  }
4465
4747
  //#endregion
4466
4748
  //#region \0dsh-css:packages/dsh-task-board/src/client/board.module.css.mjs
4467
- const css$3 = "[data-dsh-taskboard-view]{box-sizing:border-box;background:var(--dsw-alias-bg-base);flex-direction:column;width:100%;min-width:0;height:100%;min-height:0;display:flex;container:_7D6uKa_task-board-view/inline-size}._7D6uKa_board{--dsh-tb-control-h:30px;--dsh-tb-control-radius:8px;--dsh-tb-control-gap:8px;--dsh-tb-icon-size:30px;--dsh-tb-hit-size:44px;--dsh-tb-motion-enter:.16s;--dsh-tb-motion-close:.14s;--dsh-tb-ease:cubic-bezier(.2, 0, 0, 1);--dsh-tb-rail:12px;--dsh-tb-card-stripe:3px;--dsh-tb-card-inset:8px;--dsh-tb-card-row:18px;--dsh-tb-card-gap:6px;box-sizing:border-box;background:var(--dsw-alias-bg-base);min-width:0;height:100%;min-height:0;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);flex-direction:column;gap:12px;padding:14px 16px 16px;display:flex}._7D6uKa_boardHeader{flex:none;align-items:center;gap:10px;display:flex}._7D6uKa_boardTools{align-items:center;gap:var(--dsh-tb-control-gap);flex:auto;justify-content:flex-end;min-width:0;margin-left:auto;display:flex}._7D6uKa_boardTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;margin:0;font-size:15px;font-weight:700}._7D6uKa_backButton{align-items:center;gap:4px;display:inline-flex}._7D6uKa_search{box-sizing:border-box;min-width:120px;height:var(--dsh-tb-control-h);color:var(--dsw-alias-label-primary);background:var(--dsw-specific-input-major);border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsh-tb-control-radius);outline:none;flex:0 260px;padding:0 10px;font-size:13px}._7D6uKa_search::placeholder{color:var(--dsw-alias-label-tertiary)}._7D6uKa_columns{overscroll-behavior-inline:contain;scrollbar-color:var(--dsw-alias-border-l3) var(--dsw-alias-interactive-bg-hover);scrollbar-width:thin;flex:1;grid-auto-columns:minmax(220px,1fr);grid-auto-flow:column;gap:12px;min-height:0;padding-bottom:6px;display:grid;overflow:auto hidden}._7D6uKa_columns::-webkit-scrollbar{height:10px}._7D6uKa_columns::-webkit-scrollbar-track{background:var(--dsw-alias-interactive-bg-hover);border-radius:999px}._7D6uKa_columns::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l3);background-clip:content-box;border:2px solid #0000;border-radius:999px}._7D6uKa_columns::-webkit-scrollbar-thumb:hover{background:var(--dsw-alias-border-l4);background-clip:content-box}._7D6uKa_column{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;min-height:0;display:flex;overflow:hidden}._7D6uKa_columnHeader{padding:8px var(--dsh-tb-rail);min-height:calc(var(--dsh-tb-card-row) + 18px);flex:none;align-items:center;gap:8px;display:flex}._7D6uKa_columnTitle{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;margin:0;font-size:13px;font-weight:700;overflow:hidden}._7D6uKa_columnCount{min-width:0;font-size:12px;line-height:var(--dsh-tb-card-row);color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-interactive-bg-hover);border-radius:999px;flex:none;padding:0 8px}._7D6uKa_statusDot{border-radius:50%;flex:none;width:8px;height:8px}._7D6uKa_statusDot[data-status=backlog]{background:var(--dsw-alias-label-tertiary)}._7D6uKa_statusDot[data-status=todo]{background:var(--dsw-alias-state-business-primary)}._7D6uKa_statusDot[data-status=running]{background:var(--dsw-alias-state-warn-primary)}._7D6uKa_statusDot[data-status=done]{background:var(--dsw-alias-state-success-primary)}._7D6uKa_statusDot[data-status=failed]{background:var(--dsw-alias-state-error-primary)}._7D6uKa_cards{padding:2px var(--dsh-tb-rail) 10px;flex-direction:column;flex:1;gap:8px;min-height:0;display:flex;overflow-y:auto}._7D6uKa_columnEmpty{text-align:center;color:var(--dsw-alias-label-tertiary);padding:24px 0;font-size:12px}._7D6uKa_card{grid-template-columns:var(--dsh-tb-card-stripe) minmax(0, 1fr);column-gap:var(--dsh-tb-card-inset);row-gap:var(--dsh-tb-card-gap);padding:10px calc(var(--dsh-tb-card-stripe) + var(--dsh-tb-card-inset)) 10px 0;text-align:left;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;color:var(--dsw-alias-label-primary);border-radius:10px;flex:none;align-content:start;font-family:inherit;transition:box-shadow .12s,border-color .12s,transform .12s;display:grid;position:relative;overflow:hidden}._7D6uKa_card>:not(._7D6uKa_cardOpen){z-index:1;grid-column:2;min-width:0;position:relative}._7D6uKa_card:before{content:\"\";width:var(--dsh-tb-card-stripe);pointer-events:none;background:0 0;position:absolute;top:0;bottom:0;left:0}._7D6uKa_card[data-tone=running]:before{background:var(--dsw-alias-state-warn-primary)}._7D6uKa_card[data-tone=succeeded]:before{background:var(--dsw-alias-state-success-primary)}._7D6uKa_card[data-tone=failed]:before{background:var(--dsw-alias-state-error-primary)}._7D6uKa_card[data-tone=cancelled]:before{background:var(--dsw-alias-label-tertiary)}._7D6uKa_card:hover{box-shadow:var(--dsw-shadow-lv2);border-color:var(--dsw-alias-border-l3);transform:translateY(-1px)}._7D6uKa_card[data-compact]:hover{box-shadow:none;transform:none}._7D6uKa_card[data-status=running]{border-color:var(--dsw-alias-state-warn-primary)}._7D6uKa_cardOpen{z-index:0;border-radius:inherit;cursor:pointer;background:0 0;border:0;margin:0;padding:0;position:absolute;inset:0}._7D6uKa_cardOpen:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:-2px}._7D6uKa_cardTitleRow{align-items:flex-start;gap:6px;min-width:0;display:flex}._7D6uKa_cardKind{font-size:12px;font-weight:600;line-height:var(--dsh-tb-card-row);white-space:nowrap;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover);border-radius:999px;flex:none;padding:0 8px}._7D6uKa_cardTitle{-webkit-line-clamp:2;-webkit-box-orient:vertical;min-width:0;font-size:13px;font-weight:600;line-height:1.4;display:-webkit-box;overflow:hidden}._7D6uKa_card[data-compact]{row-gap:2px;padding-top:6px;padding-bottom:6px}._7D6uKa_card[data-compact] ._7D6uKa_cardTitle{-webkit-line-clamp:1;font-size:12px;font-weight:500}._7D6uKa_cardDecoration{flex:none;align-items:center;gap:4px;display:inline-flex}._7D6uKa_cardDecoration:empty{display:none}._7D6uKa_cardExcerpt{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.4;display:-webkit-box;overflow:hidden}._7D6uKa_cardMeta{min-height:var(--dsh-tb-card-row);font-size:12px;line-height:var(--dsh-tb-card-row);color:var(--dsw-alias-label-tertiary);flex-wrap:wrap;align-items:center;gap:4px 8px;display:flex}._7D6uKa_cardTime{text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums;flex:auto;min-width:max-content;overflow:hidden}._7D6uKa_cardSchedule{min-width:0;height:var(--dsh-tb-card-row);white-space:nowrap;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover);border-radius:999px;flex:none;align-items:center;gap:4px;padding:0 8px;font-size:12px;line-height:1;display:inline-flex}._7D6uKa_cardRun{height:var(--dsh-tb-card-row);font-size:12px;line-height:var(--dsh-tb-card-row);color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:6px;display:inline-flex}._7D6uKa_cardRun[data-declared]{text-underline-offset:2px;text-decoration:underline dotted}._7D6uKa_cardResult{font-size:12px;font-weight:600;line-height:var(--dsh-tb-card-row);color:var(--dsw-alias-state-warn-primary);background:var(--dsw-alias-state-warn-secondary);border-radius:999px;flex:none;padding:0 8px}._7D6uKa_cardResult[data-result=succeeded]{color:var(--dsw-alias-state-success-primary);background:var(--dsw-alias-state-success-secondary)}._7D6uKa_cardResult[data-result=failed]{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-state-error-secondary)}._7D6uKa_cardResult[data-result=cancelled]{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover)}._7D6uKa_cardSession{width:var(--dsh-tb-card-row);height:var(--dsh-tb-card-row);color:var(--dsw-alias-state-business-primary);flex:none;justify-content:center;align-items:center;display:inline-flex}._7D6uKa_cardAction{cursor:pointer;background:0 0;border:0;border-radius:6px;padding:0;font-family:inherit;position:relative}._7D6uKa_cardAction:after{content:\"\";width:var(--dsh-tb-hit-size);height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_cardAction:hover{background:var(--dsw-alias-interactive-bg-hover)}._7D6uKa_cardAction:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}._7D6uKa_cardGroup{flex-direction:column;gap:6px;display:flex}._7D6uKa_cardGroupHeader{min-height:var(--dsh-tb-card-row);color:var(--dsw-alias-label-tertiary);align-items:center;gap:6px;padding:4px 0 0;font-size:12px;font-weight:600;display:flex}._7D6uKa_cardGroupCount{font-weight:400}._7D6uKa_cardGroupHeader ._7D6uKa_linkButton{margin-left:auto;font-size:12px}._7D6uKa_densityToggle{width:var(--dsh-tb-card-row);height:var(--dsh-tb-card-row);color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex;position:relative}._7D6uKa_densityToggle:after{content:\"\";width:var(--dsh-tb-hit-size);height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_densityToggle:hover,._7D6uKa_densityToggle[data-active=true]{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}._7D6uKa_densityToggle:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}._7D6uKa_cardStatus{min-height:var(--dsh-tb-card-row);font-size:12px;line-height:var(--dsh-tb-card-row);color:var(--dsw-alias-label-tertiary);align-items:center;gap:8px;display:flex}._7D6uKa_cardStatusText{flex:0 auto;align-items:center;gap:8px;min-width:0;display:flex}._7D6uKa_cardStatusTrail{flex:none;align-items:center;gap:8px;display:flex}._7D6uKa_cardRuns{font-variant-numeric:tabular-nums;white-space:nowrap}._7D6uKa_cardRunningLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-state-warn-primary);flex:0 auto;font-size:12px;overflow:hidden}._7D6uKa_cardSpinnerSlot{width:var(--dsh-tb-card-row);height:var(--dsh-tb-card-row);flex:none;justify-content:center;align-items:center;display:inline-flex}._7D6uKa_cardSpinner{border:2px solid var(--dsw-alias-state-warn-primary);border-top-color:#0000;border-radius:50%;flex:none;width:12px;height:12px;animation:.8s linear infinite _7D6uKa_dshTbSpin}@keyframes _7D6uKa_dshTbSpin{to{transform:rotate(360deg)}}._7D6uKa_primaryButton,._7D6uKa_ghostButton,._7D6uKa_dangerButton,._7D6uKa_iconButton{box-sizing:border-box;height:var(--dsh-tb-control-h);border-radius:var(--dsh-tb-control-radius);cursor:pointer;white-space:nowrap;justify-content:center;align-items:center;gap:6px;font-family:inherit;display:inline-flex}._7D6uKa_primaryButton,._7D6uKa_dangerButton{padding:0 14px;font-size:13px;font-weight:600}._7D6uKa_primaryButton{color:var(--dsw-alias-label-primary-foreground);background:var(--dsw-alias-button-primary-fill);border:1px solid #0000}._7D6uKa_dangerButton{color:var(--dsw-alias-label-primary-foreground);background:var(--dsw-alias-state-error-primary);border:1px solid #0000}._7D6uKa_ghostButton{color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l2);background:0 0;padding:0 12px;font-size:13px}._7D6uKa_ghostButton[data-active=true]{color:var(--dsw-alias-label-primary-foreground);background:var(--dsw-alias-button-primary-fill);border-color:#0000}._7D6uKa_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}._7D6uKa_ghostButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._7D6uKa_ghostButton[data-active=true]:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}._7D6uKa_dangerButton:hover:not(:disabled){filter:brightness(1.08)}._7D6uKa_dangerButton:active:not(:disabled){filter:brightness(.94)}._7D6uKa_primaryButton:disabled,._7D6uKa_dangerButton:disabled{opacity:.5;cursor:default}._7D6uKa_ghostButton:disabled{opacity:.45;cursor:default}._7D6uKa_iconButton{width:var(--dsh-tb-icon-size);color:var(--dsw-alias-label-secondary);background:0 0;border:1px solid #0000;padding:0;position:relative}._7D6uKa_iconButton:after{content:\"\";width:var(--dsh-tb-hit-size);height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_iconButton:disabled{opacity:.45;cursor:default}._7D6uKa_linkButton{color:var(--dsw-alias-state-business-primary);cursor:pointer;white-space:nowrap;background:0 0;border:none;padding:0;font-size:12px}._7D6uKa_linkButton:hover{text-decoration:underline}._7D6uKa_modalBackdrop{z-index:1300;background:var(--dsw-alias-bg-mask-1);animation:_7D6uKa_dshTbBackdropIn var(--dsh-tb-motion-enter) var(--dsh-tb-ease) both;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}._7D6uKa_modalBackdrop[data-state=closing]{animation:_7D6uKa_dshTbBackdropOut var(--dsh-tb-motion-close) var(--dsh-tb-ease) both}._7D6uKa_modal,._7D6uKa_detail{animation:_7D6uKa_dshTbSurfaceIn var(--dsh-tb-motion-enter) var(--dsh-tb-ease) both}._7D6uKa_modalBackdrop[data-state=closing] ._7D6uKa_modal,._7D6uKa_modalBackdrop[data-state=closing] ._7D6uKa_detail{animation:_7D6uKa_dshTbSurfaceOut var(--dsh-tb-motion-close) var(--dsh-tb-ease) both}@keyframes _7D6uKa_dshTbBackdropIn{0%{opacity:0}to{opacity:1}}@keyframes _7D6uKa_dshTbBackdropOut{0%{opacity:1}to{opacity:0}}@keyframes _7D6uKa_dshTbSurfaceIn{0%{opacity:0;transform:translateY(8px)scale(.98)}to{opacity:1;transform:none}}@keyframes _7D6uKa_dshTbSurfaceOut{0%{opacity:1;transform:none}to{opacity:0;transform:translateY(8px)scale(.98)}}._7D6uKa_modal{background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l2);width:min(520px,100vw - 48px);max-height:calc(100vh - 96px);box-shadow:var(--dsw-shadow-lv3);color:var(--dsw-alias-label-primary);border-radius:14px;flex-direction:column;gap:10px;padding:18px;display:flex;overflow:hidden}._7D6uKa_modalTitle{margin:0;font-size:16px;font-weight:700}._7D6uKa_confirmMessage{color:var(--dsw-alias-label-secondary);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:1.5}._7D6uKa_modalFooter{justify-content:flex-end;gap:10px;margin-top:4px;display:flex}._7D6uKa_modalHeader{align-items:center;gap:10px;display:flex}._7D6uKa_modalHeader>._7D6uKa_modalTitle{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}._7D6uKa_tagManageList{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}._7D6uKa_tagManageRow{border:1px solid var(--dsw-alias-border-l1);border-radius:var(--dsh-tb-control-radius);flex-wrap:wrap;align-items:center;gap:8px;padding:6px 8px;display:flex}._7D6uKa_tagManageName{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-primary);flex:auto;font-size:13px;overflow:hidden}._7D6uKa_tagManageCount{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px}._7D6uKa_tagManageInput{flex:auto;min-width:0}._7D6uKa_tagManageMerge{color:var(--dsw-alias-label-tertiary);flex:1 0 100%;font-size:12px}._7D6uKa_tagCleanup{align-items:center;gap:var(--dsh-tb-control-gap);flex:none;display:flex}._7D6uKa_tagCleanup ._7D6uKa_ghostButton{flex:none}._7D6uKa_helpButton{box-sizing:border-box;width:var(--dsh-tb-control-h);height:var(--dsh-tb-control-h);border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);cursor:help;background:0 0;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;font-family:inherit;font-size:12px;font-weight:600;line-height:1;display:inline-flex}._7D6uKa_helpButton:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._7D6uKa_helpTipWrap{flex:none;display:inline-flex;position:relative}._7D6uKa_helpTip{z-index:4;box-sizing:border-box;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l2);width:max-content;max-width:240px;box-shadow:var(--dsw-shadow-lv3);color:var(--dsw-alias-label-primary);text-align:left;white-space:pre-line;opacity:0;visibility:hidden;pointer-events:none;border-radius:10px;padding:10px 12px;font-size:12px;font-weight:400;line-height:1.5;transition:opacity .12s;position:absolute;top:calc(100% + 8px);left:0}._7D6uKa_helpTipWrap:hover ._7D6uKa_helpTip,._7D6uKa_helpTipWrap:focus-within ._7D6uKa_helpTip{opacity:1;visibility:visible}._7D6uKa_tagCleanupInput{flex:none;width:64px}._7D6uKa_tagCleanupNotice{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:1.4}._7D6uKa_modalBody{flex-direction:column;gap:8px;min-height:0;display:flex;overflow-y:auto}._7D6uKa_modalBody>*{flex:none}._7D6uKa_formSection{border:1px solid var(--dsw-alias-separator-primary);border-radius:10px;flex-direction:column;display:flex;overflow:visible}._7D6uKa_formSectionHeader{box-sizing:border-box;width:100%;min-height:28px;color:var(--dsw-alias-label-primary);text-align:left;cursor:pointer;background:0 0;border:0;border-radius:9px;align-items:center;gap:8px;padding:6px 10px;font-family:inherit;font-size:12px;font-weight:600;line-height:16px;display:flex;position:relative}._7D6uKa_formSectionHeader:hover{background:var(--dsw-alias-bg-mask-1)}._7D6uKa_formSection[data-open=true] ._7D6uKa_formSectionHeader{border-radius:9px 9px 0 0}._7D6uKa_formSectionHeader:after{content:\"\";width:var(--dsh-tb-hit-size);height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_formSectionChevron{border-top:4px solid #0000;border-bottom:4px solid #0000;border-left:5px solid var(--dsw-alias-label-tertiary);flex:none;width:0;height:0;margin-left:1px;transition:transform .12s}._7D6uKa_formSection[data-open=true] ._7D6uKa_formSectionChevron{transform:rotate(90deg)}._7D6uKa_formSectionTitle{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;overflow:hidden}._7D6uKa_formSectionSummary{min-width:0;color:var(--dsw-alias-label-tertiary);text-align:right;text-overflow:ellipsis;white-space:nowrap;flex:0 auto;margin-left:auto;font-weight:400;overflow:hidden}._7D6uKa_formSectionBody{border-top:1px solid var(--dsw-alias-separator-primary);flex-direction:column;gap:8px;padding:8px 10px 10px;display:flex}._7D6uKa_field{flex-direction:column;gap:5px;display:flex}._7D6uKa_fieldLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}._7D6uKa_input{box-sizing:border-box;min-height:var(--dsh-tb-control-h);color:var(--dsw-alias-label-primary);background:var(--dsw-specific-input-major);border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsh-tb-control-radius);resize:vertical;outline:none;padding:6px 10px;font-family:inherit;font-size:13px}._7D6uKa_input:focus{border-color:var(--dsw-alias-state-business-primary)}._7D6uKa_select{box-sizing:border-box;height:var(--dsh-tb-control-h);color:var(--dsw-alias-label-primary);background:var(--dsw-specific-input-major);border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsh-tb-control-radius);outline:none;max-width:100%;padding:0 10px;font-family:inherit;font-size:13px}._7D6uKa_input::placeholder{color:var(--dsw-alias-label-tertiary)}._7D6uKa_formError{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}._7D6uKa_detail{background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l2);width:min(960px,100vw - 48px);max-height:calc(100vh - 80px);box-shadow:var(--dsw-shadow-lv3);color:var(--dsw-alias-label-primary);border-radius:14px;flex-direction:column;display:flex;overflow:hidden}._7D6uKa_detailHeader{z-index:1;border-bottom:1px solid var(--dsw-alias-separator-primary);flex:none;align-items:center;gap:8px;padding:16px 24px;display:flex;position:relative}._7D6uKa_detailTitle{overflow-wrap:anywhere;flex:1;min-width:0;margin:0;font-size:15px;font-weight:700;line-height:1.4}._7D6uKa_statusBadge{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:2px 10px;font-size:12px}._7D6uKa_statusBadge[data-status=running]{color:var(--dsw-alias-state-warn-primary);border-color:var(--dsw-alias-state-warn-primary)}._7D6uKa_statusBadge[data-status=done]{color:var(--dsw-alias-state-success-primary);border-color:var(--dsw-alias-state-success-primary)}._7D6uKa_statusBadge[data-status=failed]{color:var(--dsw-alias-state-error-primary);border-color:var(--dsw-alias-state-error-primary)}._7D6uKa_detailBody{flex-direction:column;flex:1;gap:16px;min-height:0;padding:16px 24px 24px;display:flex;overflow-y:auto}._7D6uKa_detailColumns{grid-template-columns:minmax(0,1fr);align-items:start;gap:24px;display:grid}._7D6uKa_detailColumn{flex-direction:column;gap:16px;min-width:0;display:flex}._7D6uKa_detailFolds{flex-direction:column;gap:8px;min-width:0;display:flex}@media (width>=1024px){._7D6uKa_detailColumns{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)}}._7D6uKa_detailSection{flex-direction:column;gap:8px;min-width:0;display:flex}._7D6uKa_detailSection h4{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;font-weight:700}._7D6uKa_detailText{color:var(--dsw-alias-label-primary);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:1.55}._7D6uKa_detailBody ._7D6uKa_scheduleInput,._7D6uKa_detailBody ._7D6uKa_schedulePreset,._7D6uKa_detailBody ._7D6uKa_promptBlock{font-size:13px}._7D6uKa_detailBody ._7D6uKa_scheduleZone,._7D6uKa_detailBody ._7D6uKa_scheduleMeta,._7D6uKa_detailBody ._7D6uKa_cardTag{font-size:12px}._7D6uKa_scheduleToggle{color:var(--dsw-alias-label-primary);cursor:pointer;user-select:none;align-items:center;gap:8px;font-size:13px;display:flex}._7D6uKa_scheduleToggle input{accent-color:var(--dsw-alias-state-business-primary)}._7D6uKa_scheduleRow{align-items:center;gap:8px;display:flex}._7D6uKa_scheduleInput{min-width:0;font-family:var(--dsw-font-markdown-code-block-small);flex:1}._7D6uKa_scheduleInputInvalid,._7D6uKa_scheduleInputInvalid:focus{border-color:var(--dsw-alias-state-error-primary)}._7D6uKa_schedulePreset{box-sizing:border-box;height:var(--dsh-tb-control-h);color:var(--dsw-alias-label-primary);background:var(--dsw-specific-input-major);border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsh-tb-control-radius);outline:none;flex:none;padding:0 8px}._7D6uKa_scheduleZone{color:var(--dsw-alias-label-secondary);align-items:center;gap:8px;display:flex}._7D6uKa_scheduleZone select{flex:1;min-width:0}._7D6uKa_scheduleMeta{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;margin:0}._7D6uKa_promptBlock{line-height:1.5;font-family:var(--dsw-font-markdown-code-block-small);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-markdown-code-block);border:1px solid var(--dsw-alias-border-l1);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:8px;max-height:240px;margin:0;padding:10px 12px;overflow-y:auto}._7D6uKa_clampBody{position:relative}._7D6uKa_clampBody[data-clamped=true]{max-height:160px;overflow:hidden}._7D6uKa_clampBody[data-clamped=true]:after{content:\"\";pointer-events:none;background:linear-gradient(to bottom, transparent, var(--dsw-alias-bg-base));height:44px;position:absolute;bottom:0;left:0;right:0}._7D6uKa_clampToggle{align-self:flex-start}._7D6uKa_executionLog{flex-direction:column;gap:8px;min-width:0;display:flex}._7D6uKa_executionList{flex-direction:column;gap:8px;min-width:0;margin:0;padding:0;list-style:none;display:flex}._7D6uKa_executionExtra{flex-direction:column;gap:8px;min-width:0;display:flex}._7D6uKa_executionRow{border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;gap:8px;min-width:0;padding:10px 12px;display:flex}._7D6uKa_executionRowHead{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;display:flex}._7D6uKa_executionRowEvidence{flex-direction:column;gap:6px;min-width:0;display:flex}._7D6uKa_executionBadge{color:var(--dsw-alias-state-warn-primary);background:var(--dsw-alias-state-warn-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:12px;font-weight:600;line-height:18px}._7D6uKa_executionBadge[data-result=succeeded]{color:var(--dsw-alias-state-success-primary);background:var(--dsw-alias-state-success-secondary)}._7D6uKa_executionBadge[data-result=failed]{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-state-error-secondary)}._7D6uKa_executionBadge[data-result=cancelled]{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover)}._7D6uKa_executionTimes{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;font-size:12px;line-height:1.5}._7D6uKa_executionError{color:var(--dsw-alias-state-error-primary);overflow-wrap:anywhere;font-size:12px;line-height:1.5}._7D6uKa_executionSession{color:var(--dsw-alias-state-business-primary);cursor:pointer;white-space:nowrap;background:0 0;border:none;align-items:center;gap:4px;margin-left:auto;padding:0 2px;font-family:inherit;font-size:12px;display:inline-flex;position:relative}._7D6uKa_executionSession:after{content:\"\";width:100%;height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_executionSession:hover{text-decoration:underline}._7D6uKa_executionDisclosure{align-self:flex-start;align-items:center;gap:6px;display:inline-flex}._7D6uKa_disclosureChevron{width:5px;height:5px;transition:transform .12s var(--dsh-tb-ease);border-bottom:1.5px solid;border-right:1.5px solid;flex:none;transform:rotate(45deg)}._7D6uKa_disclosureChevron[data-open=true]{transform:rotate(225deg)}._7D6uKa_verifyReport{flex-direction:column;gap:8px;min-width:0;display:flex}._7D6uKa_verifyBadge{max-width:100%;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;border-radius:999px;align-self:flex-start;align-items:center;gap:6px;padding:2px 10px;font-family:inherit;font-size:12px;font-weight:600;line-height:18px;display:inline-flex;position:relative}._7D6uKa_verifyBadge:after{content:\"\";height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:0;right:0;transform:translateY(-50%)}._7D6uKa_verifyBadge[data-tone=warn]{color:var(--dsw-alias-state-warn-primary);background:var(--dsw-alias-state-warn-secondary);border-color:#0000}._7D6uKa_verifyBadge[data-tone=success]{color:var(--dsw-alias-state-success-primary);background:var(--dsw-alias-state-success-secondary);border-color:#0000}._7D6uKa_verifyBadge[data-tone=error]{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-state-error-secondary);border-color:#0000}._7D6uKa_verifyVerdict{overflow-wrap:anywhere;font-weight:700}._7D6uKa_verifyPanel{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;gap:8px;min-width:0;padding:10px 12px;display:flex}._7D6uKa_attemptRow{background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;gap:6px;min-width:0;padding:8px 10px;display:flex}._7D6uKa_attemptHead{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;display:flex}._7D6uKa_referenceList{flex-direction:column;gap:6px;min-width:0;margin:0;padding:0;list-style:none;display:flex}._7D6uKa_referenceRow{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;font-size:12px}._7D6uKa_menuRoot{flex:none;display:inline-flex;position:relative}._7D6uKa_menuChevron{width:5px;height:5px;transition:transform .12s var(--dsh-tb-ease);border-bottom:1.5px solid;border-right:1.5px solid;flex:none;margin-top:-3px;transform:rotate(45deg)}._7D6uKa_menuChevron[data-open=true]{margin-top:0;transform:rotate(225deg)}._7D6uKa_menuPanel{z-index:20;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l2);min-width:180px;box-shadow:var(--dsw-shadow-lv2);border-radius:10px;flex-direction:column;padding:4px;display:flex;position:absolute;top:calc(100% + 4px);left:0}._7D6uKa_detailHeader ._7D6uKa_menuPanel{left:auto;right:0}._7D6uKa_menuItem{min-height:var(--dsh-tb-hit-size);color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;white-space:nowrap;background:0 0;border:none;border-radius:8px;align-items:center;padding:0 10px;font-family:inherit;font-size:13px;display:flex}._7D6uKa_menuItem:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._7D6uKa_menuItem:disabled{opacity:.45;cursor:default}._7D6uKa_detailFooter{border-top:1px solid var(--dsw-alias-separator-primary);flex:none;align-items:center;gap:8px;padding:16px 24px;display:flex}._7D6uKa_detailMeta{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px}._7D6uKa_detailFooter>._7D6uKa_detailMeta{margin-left:0}._7D6uKa_detailStamp{text-align:end;margin-left:auto}._7D6uKa_executionExtra,._7D6uKa_verifyPanel,._7D6uKa_detailBody ._7D6uKa_formSectionBody{animation:_7D6uKa_dshTbRowsIn var(--dsh-tb-motion-enter) var(--dsh-tb-ease) both}._7D6uKa_executionExtra[data-execution-fold=closing],._7D6uKa_verifyPanel[data-state=closing],._7D6uKa_detailBody ._7D6uKa_formSectionBody[data-state=closing]{animation:_7D6uKa_dshTbRowsOut var(--dsh-tb-motion-close) var(--dsh-tb-ease) both}._7D6uKa_formSectionBody{animation:_7D6uKa_dshTbRowsIn var(--dsh-tb-motion-enter) var(--dsh-tb-ease) both}._7D6uKa_formSectionBody[data-state=closing]{animation:_7D6uKa_dshTbRowsOut var(--dsh-tb-motion-close) var(--dsh-tb-ease) both}@keyframes _7D6uKa_dshTbRowsIn{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}@keyframes _7D6uKa_dshTbRowsOut{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-6px)}}@keyframes _7D6uKa_dshTbFadeIn{0%{opacity:0}to{opacity:1}}@keyframes _7D6uKa_dshTbFadeOut{0%{opacity:1}to{opacity:0}}@media (prefers-reduced-motion:reduce){._7D6uKa_executionExtra,._7D6uKa_verifyPanel,._7D6uKa_detailBody ._7D6uKa_formSectionBody{animation:_7D6uKa_dshTbFadeIn var(--dsh-tb-motion-close) linear both}._7D6uKa_executionExtra[data-execution-fold=closing],._7D6uKa_verifyPanel[data-state=closing],._7D6uKa_detailBody ._7D6uKa_formSectionBody[data-state=closing]{animation:_7D6uKa_dshTbFadeOut var(--dsh-tb-motion-close) linear both}._7D6uKa_formSectionBody{animation:_7D6uKa_dshTbFadeIn var(--dsh-tb-motion-close) linear both}._7D6uKa_formSectionBody[data-state=closing]{animation:_7D6uKa_dshTbFadeOut var(--dsh-tb-motion-close) linear both}}._7D6uKa_detailBody ._7D6uKa_formSection{min-width:0;overflow:visible}._7D6uKa_detailBody ._7D6uKa_formSectionHeader{box-sizing:border-box;border-radius:9px;min-height:28px;padding:4px 10px;font-size:12px;line-height:16px;position:relative}._7D6uKa_detailBody ._7D6uKa_formSection[data-open=true] ._7D6uKa_formSectionHeader{border-radius:9px 9px 0 0}._7D6uKa_detailBody ._7D6uKa_formSectionHeader:after{content:\"\";width:var(--dsh-tb-hit-size);height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_detailBody ._7D6uKa_formSectionTitle{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;overflow:hidden}._7D6uKa_detailBody ._7D6uKa_formSectionSummary{flex:0 auto;min-width:0;margin-left:auto}._7D6uKa_detailBody ._7D6uKa_formSectionBody{gap:8px}@container _7D6uKa_task-board-view (width<=768px){._7D6uKa_board{gap:10px;padding:10px}._7D6uKa_boardHeader{flex-wrap:wrap;align-items:center;gap:8px}._7D6uKa_backButton{flex:none}._7D6uKa_boardTitle{flex:auto}._7D6uKa_boardHeader>._7D6uKa_detailMeta{flex:1 0 100%;margin-left:0}._7D6uKa_boardTools{flex-wrap:wrap;flex:1 0 100%;justify-content:flex-start;margin-left:0}._7D6uKa_boardTools>._7D6uKa_search{flex:1 0 100%;min-width:0}._7D6uKa_boardTools>._7D6uKa_projectFilter{flex:auto;min-width:0}._7D6uKa_boardTools>button{flex:1 1 0;min-width:0}._7D6uKa_columns{scroll-snap-type:inline mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch;grid-auto-columns:86cqw;gap:10px;padding-inline:2px 14cqw;scroll-padding-inline:2px}._7D6uKa_columns::-webkit-scrollbar{display:none}._7D6uKa_column{scroll-snap-align:start;scroll-snap-stop:always}}@container _7D6uKa_task-board-view (width<=720px){._7D6uKa_boardHeader>._7D6uKa_detailMeta{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}}@container _7D6uKa_task-board-view (width<=600px){._7D6uKa_board{padding-inline:8px}}@media (width<=768px){[data-dsh-taskboard-view]{height:100dvh}._7D6uKa_card,._7D6uKa_primaryButton,._7D6uKa_ghostButton,._7D6uKa_dangerButton,._7D6uKa_iconButton,._7D6uKa_linkButton,._7D6uKa_search,._7D6uKa_input,._7D6uKa_select,._7D6uKa_schedulePreset,._7D6uKa_scheduleToggle{min-height:44px}._7D6uKa_search,._7D6uKa_input,._7D6uKa_select,._7D6uKa_schedulePreset{box-sizing:border-box;font-size:16px}._7D6uKa_modalBackdrop{justify-content:stretch;align-items:stretch;width:100vw;height:100dvh}._7D6uKa_modal,._7D6uKa_detail{box-sizing:border-box;border:0;border-radius:0;width:100vw;height:100dvh;max-height:none}._7D6uKa_modal{padding-top:max(16px, env(safe-area-inset-top));padding-right:max(16px, env(safe-area-inset-right));padding-bottom:max(16px, env(safe-area-inset-bottom));padding-left:max(16px, env(safe-area-inset-left))}._7D6uKa_modalFooter{z-index:1;background:var(--dsw-alias-bg-base);flex-wrap:wrap;padding-top:8px;position:sticky;bottom:0}._7D6uKa_modalFooter>button{flex:120px}._7D6uKa_detailHeader{padding-top:max(16px, env(safe-area-inset-top));padding-right:max(16px, env(safe-area-inset-right));padding-left:max(16px, env(safe-area-inset-left));flex-wrap:wrap}._7D6uKa_detailTitle{min-width:0}._7D6uKa_detailColumns{grid-template-columns:minmax(0,1fr);gap:16px}._7D6uKa_detailColumn{gap:16px}._7D6uKa_detailBody{overscroll-behavior-y:contain;padding-right:max(16px, env(safe-area-inset-right));padding-left:max(16px, env(safe-area-inset-left))}._7D6uKa_detailFooter{padding-right:max(16px, env(safe-area-inset-right));padding-bottom:max(16px, env(safe-area-inset-bottom));padding-left:max(16px, env(safe-area-inset-left));flex-wrap:wrap}._7D6uKa_menuPanel{min-width:200px}._7D6uKa_detailFooter>button{flex:96px}._7D6uKa_detailFooter>._7D6uKa_detailMeta{text-align:end;flex:1 0 100%;margin-left:0}._7D6uKa_scheduleRow{flex-direction:column;align-items:stretch}._7D6uKa_schedulePreset{width:100%}}._7D6uKa_primaryButton:focus-visible,._7D6uKa_ghostButton:focus-visible,._7D6uKa_dangerButton:focus-visible,._7D6uKa_iconButton:focus-visible,._7D6uKa_linkButton:focus-visible,._7D6uKa_menuItem:focus-visible,._7D6uKa_verifyBadge:focus-visible,._7D6uKa_executionSession:focus-visible,._7D6uKa_search:focus-visible,._7D6uKa_input:focus-visible,._7D6uKa_select:focus-visible,._7D6uKa_schedulePreset:focus-visible,._7D6uKa_scheduleToggle input:focus-visible,._7D6uKa_formSectionHeader:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}._7D6uKa_primaryButton,._7D6uKa_ghostButton,._7D6uKa_dangerButton,._7D6uKa_iconButton,._7D6uKa_linkButton,._7D6uKa_menuItem,._7D6uKa_verifyBadge,._7D6uKa_executionSession,._7D6uKa_search,._7D6uKa_input,._7D6uKa_select,._7D6uKa_schedulePreset,._7D6uKa_scheduleToggle input,._7D6uKa_formSectionHeader,._7D6uKa_formSectionChevron{transition:background-color .12s,color .12s,border-color .12s,outline-color .12s,box-shadow .12s,transform .12s}._7D6uKa_card:active{box-shadow:var(--dsw-shadow-lv1);transform:translateY(0)}._7D6uKa_primaryButton:active:not(:disabled),._7D6uKa_ghostButton:active:not(:disabled),._7D6uKa_dangerButton:active:not(:disabled),._7D6uKa_iconButton:active:not(:disabled),._7D6uKa_linkButton:active:not(:disabled){transform:translateY(1px)}._7D6uKa_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._7D6uKa_linkButton:hover:not(:disabled){text-decoration:underline}._7D6uKa_iconButton:disabled,._7D6uKa_linkButton:disabled{opacity:.45;cursor:default}._7D6uKa_search:focus,._7D6uKa_select:focus,._7D6uKa_schedulePreset:focus{border-color:var(--dsw-alias-state-business-primary)}._7D6uKa_scheduleToggle input{margin:0}@media (prefers-reduced-motion:reduce){._7D6uKa_card,._7D6uKa_primaryButton,._7D6uKa_ghostButton,._7D6uKa_dangerButton,._7D6uKa_iconButton,._7D6uKa_linkButton,._7D6uKa_menuItem,._7D6uKa_verifyBadge,._7D6uKa_executionSession,._7D6uKa_disclosureChevron,._7D6uKa_menuChevron,._7D6uKa_search,._7D6uKa_input,._7D6uKa_select,._7D6uKa_schedulePreset,._7D6uKa_scheduleToggle input,._7D6uKa_formSectionHeader,._7D6uKa_formSectionChevron{transition:none}._7D6uKa_cardSpinner{animation:none}._7D6uKa_modalBackdrop,._7D6uKa_modal,._7D6uKa_detail{animation:_7D6uKa_dshTbBackdropIn var(--dsh-tb-motion-close) linear both}._7D6uKa_modalBackdrop[data-state=closing],._7D6uKa_modalBackdrop[data-state=closing] ._7D6uKa_modal,._7D6uKa_modalBackdrop[data-state=closing] ._7D6uKa_detail{animation:_7D6uKa_dshTbBackdropOut var(--dsh-tb-motion-close) linear both}}._7D6uKa_cardTags{flex-wrap:wrap;gap:4px;display:flex}._7D6uKa_cardTags:empty{display:none}._7D6uKa_cardTag{border:1px solid var(--dsh-task-tag-border);background:var(--dsh-task-tag-fill);max-width:100%;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;border-radius:999px;padding:0 8px;font-size:12px;line-height:1.5;overflow:hidden}._7D6uKa_tagFilter{flex-wrap:wrap;flex:none;align-items:center;gap:8px;margin:0;display:flex}._7D6uKa_tagFilterLabel{color:var(--dsw-alias-label-tertiary);font-size:12px}._7D6uKa_tagChip{border:1px solid var(--dsh-task-tag-border);color:var(--dsw-alias-label-secondary);cursor:pointer;font-family:inherit;font-size:12px;line-height:var(--dsh-tb-card-row);background:0 0;border-radius:999px;padding:1px 9px;position:relative}._7D6uKa_tagChip:after{content:\"\";width:var(--dsh-tb-hit-size);height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_tagChip:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}._7D6uKa_tagChip[data-active=true]{background:var(--dsh-task-tag-fill);color:var(--dsw-alias-label-primary)}._7D6uKa_cardTag[data-tag-tone=\"0\"],._7D6uKa_tagChip[data-tag-tone=\"0\"]{--dsh-task-tag-fill:#4e93e82e;--dsh-task-tag-border:#4e93e866}._7D6uKa_cardTag[data-tag-tone=\"1\"],._7D6uKa_tagChip[data-tag-tone=\"1\"]{--dsh-task-tag-fill:#2ea36a2e;--dsh-task-tag-border:#2ea36a66}._7D6uKa_cardTag[data-tag-tone=\"2\"],._7D6uKa_tagChip[data-tag-tone=\"2\"]{--dsh-task-tag-fill:#d08a2a2e;--dsh-task-tag-border:#d08a2a66}._7D6uKa_cardTag[data-tag-tone=\"3\"],._7D6uKa_tagChip[data-tag-tone=\"3\"]{--dsh-task-tag-fill:#b456c82e;--dsh-task-tag-border:#b456c866}._7D6uKa_cardTag[data-tag-tone=\"4\"],._7D6uKa_tagChip[data-tag-tone=\"4\"]{--dsh-task-tag-fill:#cf5f7a2e;--dsh-task-tag-border:#cf5f7a66}._7D6uKa_cardTag[data-tag-tone=\"5\"],._7D6uKa_tagChip[data-tag-tone=\"5\"]{--dsh-task-tag-fill:#4a9fb52e;--dsh-task-tag-border:#4a9fb566}._7D6uKa_fieldHint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.4}._7D6uKa_tagRow{align-items:center;gap:6px;display:flex}._7D6uKa_tagRow ._7D6uKa_input{flex:1 1 0;min-width:0}._7D6uKa_tagRow ._7D6uKa_ghostButton{flex:none}._7D6uKa_tagAddButton{align-self:flex-start}._7D6uKa_projectFilter{flex:none;align-items:center;gap:6px;display:flex}._7D6uKa_projectFilterLabel{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:12px}._7D6uKa_projectDialog{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:10px;flex-direction:column;flex:none;gap:8px;margin-bottom:8px;padding:10px 12px;display:flex}._7D6uKa_projectDialogActions{justify-content:flex-end;gap:8px;display:flex}._7D6uKa_aiParse{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:10px;flex-direction:column;gap:6px;padding:10px 12px;display:flex}._7D6uKa_aiParseRow{align-items:center;gap:8px;display:flex}._7D6uKa_aiParseRow ._7D6uKa_select{flex:1 1 0;min-width:0}._7D6uKa_aiParseRow ._7D6uKa_ghostButton,._7D6uKa_aiParseRow ._7D6uKa_primaryButton{flex:none}._7D6uKa_cardSubtask{background:var(--dsw-alias-interactive-bg-hover);max-width:100%;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:var(--dsh-tb-card-row);text-overflow:ellipsis;white-space:nowrap;border-radius:999px;padding:0 8px;overflow:hidden}._7D6uKa_cardSubtask[data-tone=failed]{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-state-error-secondary)}._7D6uKa_cardSubtask[data-tone=running]{color:var(--dsw-alias-state-warn-primary);background:var(--dsw-alias-state-warn-secondary)}._7D6uKa_cardSubtask[data-tone=done]{color:var(--dsw-alias-state-success-primary);background:var(--dsw-alias-state-success-secondary)}._7D6uKa_subtaskList{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}._7D6uKa_subtaskRow{border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-wrap:wrap;align-items:center;gap:10px;padding:6px 10px;display:flex}._7D6uKa_subtaskRow ._7D6uKa_linkButton:first-child{text-align:left;overflow-wrap:anywhere;flex:auto;min-width:0}._7D6uKa_subtaskAddRow{flex-wrap:wrap;gap:8px;display:flex}._7D6uKa_pickList{flex-direction:column;gap:6px;max-height:320px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}._7D6uKa_pickRow{border:1px solid var(--dsw-alias-border-l1);border-radius:8px;align-items:center;gap:10px;padding:6px 10px;display:flex}._7D6uKa_pickTitle{min-width:0;color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;flex:auto;font-size:13px}";
4749
+ const css$3 = "[data-dsh-taskboard-view]{box-sizing:border-box;background:var(--dsw-alias-bg-base);flex-direction:column;width:100%;min-width:0;height:100%;min-height:0;display:flex;container:_7D6uKa_task-board-view/inline-size}._7D6uKa_board{--dsh-tb-control-h:30px;--dsh-tb-control-radius:8px;--dsh-tb-control-gap:8px;--dsh-tb-icon-size:30px;--dsh-tb-hit-size:44px;--dsh-tb-motion-enter:.16s;--dsh-tb-motion-close:.14s;--dsh-tb-ease:cubic-bezier(.2, 0, 0, 1);--dsh-tb-rail:12px;--dsh-tb-card-stripe:3px;--dsh-tb-card-inset:8px;--dsh-tb-card-row:18px;--dsh-tb-card-gap:6px;box-sizing:border-box;background:var(--dsw-alias-bg-base);min-width:0;height:100%;min-height:0;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);flex-direction:column;gap:12px;padding:14px 16px 16px;display:flex}._7D6uKa_boardHeader{flex:none;align-items:center;gap:10px;display:flex}._7D6uKa_boardTools{align-items:center;gap:var(--dsh-tb-control-gap);flex:auto;justify-content:flex-end;min-width:0;margin-left:auto;display:flex}._7D6uKa_boardTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;margin:0;font-size:15px;font-weight:700}._7D6uKa_backButton{align-items:center;gap:4px;display:inline-flex}._7D6uKa_search{box-sizing:border-box;min-width:120px;height:var(--dsh-tb-control-h);color:var(--dsw-alias-label-primary);background:var(--dsw-specific-input-major);border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsh-tb-control-radius);outline:none;flex:0 260px;padding:0 10px;font-size:13px}._7D6uKa_search::placeholder{color:var(--dsw-alias-label-tertiary)}._7D6uKa_columns{overscroll-behavior-inline:contain;scrollbar-color:var(--dsw-alias-border-l3) var(--dsw-alias-interactive-bg-hover);scrollbar-width:thin;flex:1;grid-auto-columns:minmax(220px,1fr);grid-auto-flow:column;gap:12px;min-height:0;padding-bottom:6px;display:grid;overflow:auto hidden}._7D6uKa_columns::-webkit-scrollbar{height:10px}._7D6uKa_columns::-webkit-scrollbar-track{background:var(--dsw-alias-interactive-bg-hover);border-radius:999px}._7D6uKa_columns::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l3);background-clip:content-box;border:2px solid #0000;border-radius:999px}._7D6uKa_columns::-webkit-scrollbar-thumb:hover{background:var(--dsw-alias-border-l4);background-clip:content-box}._7D6uKa_column{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;min-height:0;display:flex;overflow:hidden}._7D6uKa_columnHeader{padding:8px var(--dsh-tb-rail);min-height:calc(var(--dsh-tb-card-row) + 18px);flex:none;align-items:center;gap:8px;display:flex}._7D6uKa_columnTitle{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;margin:0;font-size:13px;font-weight:700;overflow:hidden}._7D6uKa_columnCount{min-width:0;font-size:12px;line-height:var(--dsh-tb-card-row);color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-interactive-bg-hover);border-radius:999px;flex:none;padding:0 8px}._7D6uKa_statusDot{border-radius:50%;flex:none;width:8px;height:8px}._7D6uKa_statusDot[data-status=backlog]{background:var(--dsw-alias-label-tertiary)}._7D6uKa_statusDot[data-status=todo]{background:var(--dsw-alias-state-business-primary)}._7D6uKa_statusDot[data-status=running]{background:var(--dsw-alias-state-warn-primary)}._7D6uKa_statusDot[data-status=done]{background:var(--dsw-alias-state-success-primary)}._7D6uKa_statusDot[data-status=failed]{background:var(--dsw-alias-state-error-primary)}._7D6uKa_cards{padding:2px var(--dsh-tb-rail) 10px;flex-direction:column;flex:1;gap:8px;min-height:0;display:flex;overflow-y:auto}._7D6uKa_columnEmpty{text-align:center;color:var(--dsw-alias-label-tertiary);padding:24px 0;font-size:12px}._7D6uKa_card{grid-template-columns:var(--dsh-tb-card-stripe) minmax(0, 1fr);column-gap:var(--dsh-tb-card-inset);row-gap:var(--dsh-tb-card-gap);padding:10px calc(var(--dsh-tb-card-stripe) + var(--dsh-tb-card-inset)) 10px 0;text-align:left;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;color:var(--dsw-alias-label-primary);border-radius:10px;flex:none;align-content:start;font-family:inherit;transition:box-shadow .12s,border-color .12s,transform .12s;display:grid;position:relative;overflow:hidden}._7D6uKa_card>:not(._7D6uKa_cardOpen){z-index:1;grid-column:2;min-width:0;position:relative}._7D6uKa_card:before{content:\"\";width:var(--dsh-tb-card-stripe);pointer-events:none;background:0 0;position:absolute;top:0;bottom:0;left:0}._7D6uKa_card[data-tone=running]:before{background:var(--dsw-alias-state-warn-primary)}._7D6uKa_card[data-tone=succeeded]:before{background:var(--dsw-alias-state-success-primary)}._7D6uKa_card[data-tone=failed]:before{background:var(--dsw-alias-state-error-primary)}._7D6uKa_card[data-tone=cancelled]:before{background:var(--dsw-alias-label-tertiary)}._7D6uKa_card:hover{box-shadow:var(--dsw-shadow-lv2);border-color:var(--dsw-alias-border-l3);transform:translateY(-1px)}._7D6uKa_card[data-compact]:hover{box-shadow:none;transform:none}._7D6uKa_card[data-status=running]{border-color:var(--dsw-alias-state-warn-primary)}._7D6uKa_cardOpen{z-index:0;border-radius:inherit;cursor:pointer;background:0 0;border:0;margin:0;padding:0;position:absolute;inset:0}._7D6uKa_cardOpen:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:-2px}._7D6uKa_cardTitleRow{align-items:flex-start;gap:6px;min-width:0;display:flex}._7D6uKa_cardKind{font-size:12px;font-weight:600;line-height:var(--dsh-tb-card-row);white-space:nowrap;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover);border-radius:999px;flex:none;padding:0 8px}._7D6uKa_cardTitle{-webkit-line-clamp:2;-webkit-box-orient:vertical;min-width:0;font-size:13px;font-weight:600;line-height:1.4;display:-webkit-box;overflow:hidden}._7D6uKa_card[data-compact]{row-gap:2px;padding-top:6px;padding-bottom:6px}._7D6uKa_card[data-compact] ._7D6uKa_cardTitle{-webkit-line-clamp:1;font-size:12px;font-weight:500}._7D6uKa_cardDecoration{flex:none;align-items:center;gap:4px;display:inline-flex}._7D6uKa_cardDecoration:empty{display:none}._7D6uKa_cardExcerpt{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.4;display:-webkit-box;overflow:hidden}._7D6uKa_cardMeta{min-height:var(--dsh-tb-card-row);font-size:12px;line-height:var(--dsh-tb-card-row);color:var(--dsw-alias-label-tertiary);flex-wrap:wrap;align-items:center;gap:4px 8px;display:flex}._7D6uKa_cardTime{text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums;flex:auto;min-width:max-content;overflow:hidden}._7D6uKa_cardSchedule{min-width:0;height:var(--dsh-tb-card-row);white-space:nowrap;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover);border-radius:999px;flex:none;align-items:center;gap:4px;padding:0 8px;font-size:12px;line-height:1;display:inline-flex}._7D6uKa_cardRun{height:var(--dsh-tb-card-row);font-size:12px;line-height:var(--dsh-tb-card-row);color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:6px;display:inline-flex}._7D6uKa_cardRun[data-declared]{text-underline-offset:2px;text-decoration:underline dotted}._7D6uKa_cardResult{font-size:12px;font-weight:600;line-height:var(--dsh-tb-card-row);color:var(--dsw-alias-state-warn-primary);background:var(--dsw-alias-state-warn-secondary);border-radius:999px;flex:none;padding:0 8px}._7D6uKa_cardResult[data-result=succeeded]{color:var(--dsw-alias-state-success-primary);background:var(--dsw-alias-state-success-secondary)}._7D6uKa_cardResult[data-result=failed]{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-state-error-secondary)}._7D6uKa_cardResult[data-result=cancelled]{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover)}._7D6uKa_cardSession{width:var(--dsh-tb-card-row);height:var(--dsh-tb-card-row);color:var(--dsw-alias-state-business-primary);flex:none;justify-content:center;align-items:center;display:inline-flex}._7D6uKa_cardAction{cursor:pointer;background:0 0;border:0;border-radius:6px;padding:0;font-family:inherit;position:relative}._7D6uKa_cardAction:after{content:\"\";width:var(--dsh-tb-hit-size);height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_cardAction:hover{background:var(--dsw-alias-interactive-bg-hover)}._7D6uKa_cardAction:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}._7D6uKa_cardGroup{flex-direction:column;gap:6px;display:flex}._7D6uKa_cardGroupHeader{min-height:var(--dsh-tb-card-row);color:var(--dsw-alias-label-tertiary);align-items:center;gap:6px;padding:4px 0 0;font-size:12px;font-weight:600;display:flex}._7D6uKa_cardGroupCount{font-weight:400}._7D6uKa_cardGroupHeader ._7D6uKa_linkButton{margin-left:auto;font-size:12px}._7D6uKa_sourceGroup{gap:8px}._7D6uKa_sourceGroupHeader{color:var(--dsw-alias-label-secondary)}._7D6uKa_sourceGroupLabel{overflow-wrap:anywhere;flex:auto;min-width:0}._7D6uKa_densityToggle{width:var(--dsh-tb-card-row);height:var(--dsh-tb-card-row);color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex;position:relative}._7D6uKa_densityToggle:after{content:\"\";width:var(--dsh-tb-hit-size);height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_densityToggle:hover,._7D6uKa_densityToggle[data-active=true]{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}._7D6uKa_densityToggle:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}._7D6uKa_cardStatus{min-height:var(--dsh-tb-card-row);font-size:12px;line-height:var(--dsh-tb-card-row);color:var(--dsw-alias-label-tertiary);align-items:center;gap:8px;display:flex}._7D6uKa_cardStatusText{flex:0 auto;align-items:center;gap:8px;min-width:0;display:flex}._7D6uKa_cardStatusTrail{flex:none;align-items:center;gap:8px;display:flex}._7D6uKa_cardRuns{font-variant-numeric:tabular-nums;white-space:nowrap}._7D6uKa_cardRunningLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-state-warn-primary);flex:0 auto;font-size:12px;overflow:hidden}._7D6uKa_cardSpinnerSlot{width:var(--dsh-tb-card-row);height:var(--dsh-tb-card-row);flex:none;justify-content:center;align-items:center;display:inline-flex}._7D6uKa_cardSpinner{border:2px solid var(--dsw-alias-state-warn-primary);border-top-color:#0000;border-radius:50%;flex:none;width:12px;height:12px;animation:.8s linear infinite _7D6uKa_dshTbSpin}@keyframes _7D6uKa_dshTbSpin{to{transform:rotate(360deg)}}._7D6uKa_primaryButton,._7D6uKa_ghostButton,._7D6uKa_dangerButton,._7D6uKa_iconButton{box-sizing:border-box;height:var(--dsh-tb-control-h);border-radius:var(--dsh-tb-control-radius);cursor:pointer;white-space:nowrap;justify-content:center;align-items:center;gap:6px;font-family:inherit;display:inline-flex}._7D6uKa_primaryButton,._7D6uKa_dangerButton{padding:0 14px;font-size:13px;font-weight:600}._7D6uKa_primaryButton{color:var(--dsw-alias-label-primary-foreground);background:var(--dsw-alias-button-primary-fill);border:1px solid #0000}._7D6uKa_dangerButton{color:var(--dsw-alias-label-primary-foreground);background:var(--dsw-alias-state-error-primary);border:1px solid #0000}._7D6uKa_ghostButton{color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l2);background:0 0;padding:0 12px;font-size:13px}._7D6uKa_ghostButton[data-active=true]{color:var(--dsw-alias-label-primary-foreground);background:var(--dsw-alias-button-primary-fill);border-color:#0000}._7D6uKa_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}._7D6uKa_ghostButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._7D6uKa_ghostButton[data-active=true]:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}._7D6uKa_dangerButton:hover:not(:disabled){filter:brightness(1.08)}._7D6uKa_dangerButton:active:not(:disabled){filter:brightness(.94)}._7D6uKa_primaryButton:disabled,._7D6uKa_dangerButton:disabled{opacity:.5;cursor:default}._7D6uKa_ghostButton:disabled{opacity:.45;cursor:default}._7D6uKa_iconButton{width:var(--dsh-tb-icon-size);color:var(--dsw-alias-label-secondary);background:0 0;border:1px solid #0000;padding:0;position:relative}._7D6uKa_iconButton:after{content:\"\";width:var(--dsh-tb-hit-size);height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_iconButton:disabled{opacity:.45;cursor:default}._7D6uKa_linkButton{color:var(--dsw-alias-state-business-primary);cursor:pointer;white-space:nowrap;background:0 0;border:none;padding:0;font-size:12px}._7D6uKa_linkButton:hover{text-decoration:underline}._7D6uKa_modalBackdrop{z-index:1300;background:var(--dsw-alias-bg-mask-1);animation:_7D6uKa_dshTbBackdropIn var(--dsh-tb-motion-enter) var(--dsh-tb-ease) both;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}._7D6uKa_modalBackdrop[data-state=closing]{animation:_7D6uKa_dshTbBackdropOut var(--dsh-tb-motion-close) var(--dsh-tb-ease) both}._7D6uKa_modal,._7D6uKa_detail{animation:_7D6uKa_dshTbSurfaceIn var(--dsh-tb-motion-enter) var(--dsh-tb-ease) both}._7D6uKa_modalBackdrop[data-state=closing] ._7D6uKa_modal,._7D6uKa_modalBackdrop[data-state=closing] ._7D6uKa_detail{animation:_7D6uKa_dshTbSurfaceOut var(--dsh-tb-motion-close) var(--dsh-tb-ease) both}@keyframes _7D6uKa_dshTbBackdropIn{0%{opacity:0}to{opacity:1}}@keyframes _7D6uKa_dshTbBackdropOut{0%{opacity:1}to{opacity:0}}@keyframes _7D6uKa_dshTbSurfaceIn{0%{opacity:0;transform:translateY(8px)scale(.98)}to{opacity:1;transform:none}}@keyframes _7D6uKa_dshTbSurfaceOut{0%{opacity:1;transform:none}to{opacity:0;transform:translateY(8px)scale(.98)}}._7D6uKa_modal{background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l2);width:min(520px,100vw - 48px);max-height:calc(100vh - 96px);box-shadow:var(--dsw-shadow-lv3);color:var(--dsw-alias-label-primary);border-radius:14px;flex-direction:column;gap:10px;padding:18px;display:flex;overflow:hidden}._7D6uKa_modalTitle{margin:0;font-size:16px;font-weight:700}._7D6uKa_confirmMessage{color:var(--dsw-alias-label-secondary);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:1.5}._7D6uKa_modalFooter{justify-content:flex-end;gap:10px;margin-top:4px;display:flex}._7D6uKa_modalHeader{align-items:center;gap:10px;display:flex}._7D6uKa_modalHeader>._7D6uKa_modalTitle{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}._7D6uKa_tagManageList{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}._7D6uKa_tagManageRow{border:1px solid var(--dsw-alias-border-l1);border-radius:var(--dsh-tb-control-radius);flex-wrap:wrap;align-items:center;gap:8px;padding:6px 8px;display:flex}._7D6uKa_tagManageName{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-primary);flex:auto;font-size:13px;overflow:hidden}._7D6uKa_tagManageCount{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px}._7D6uKa_tagManageInput{flex:auto;min-width:0}._7D6uKa_tagManageMerge{color:var(--dsw-alias-label-tertiary);flex:1 0 100%;font-size:12px}._7D6uKa_tagCleanup{align-items:center;gap:var(--dsh-tb-control-gap);flex:none;display:flex}._7D6uKa_tagCleanup ._7D6uKa_ghostButton{flex:none}._7D6uKa_helpButton{box-sizing:border-box;width:var(--dsh-tb-control-h);height:var(--dsh-tb-control-h);border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);cursor:help;background:0 0;border-radius:50%;flex:none;justify-content:center;align-items:center;padding:0;font-family:inherit;font-size:12px;font-weight:600;line-height:1;display:inline-flex}._7D6uKa_helpButton:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._7D6uKa_helpTipWrap{flex:none;display:inline-flex;position:relative}._7D6uKa_helpTip{z-index:4;box-sizing:border-box;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l2);width:max-content;max-width:240px;box-shadow:var(--dsw-shadow-lv3);color:var(--dsw-alias-label-primary);text-align:left;white-space:pre-line;opacity:0;visibility:hidden;pointer-events:none;border-radius:10px;padding:10px 12px;font-size:12px;font-weight:400;line-height:1.5;transition:opacity .12s;position:absolute;top:calc(100% + 8px);left:0}._7D6uKa_helpTipWrap:hover ._7D6uKa_helpTip,._7D6uKa_helpTipWrap:focus-within ._7D6uKa_helpTip{opacity:1;visibility:visible}._7D6uKa_tagCleanupInput{flex:none;width:64px}._7D6uKa_tagCleanupNotice{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:1.4}._7D6uKa_modalBody{flex-direction:column;gap:8px;min-height:0;display:flex;overflow-y:auto}._7D6uKa_modalBody>*{flex:none}._7D6uKa_formSection{border:1px solid var(--dsw-alias-separator-primary);border-radius:10px;flex-direction:column;display:flex;overflow:visible}._7D6uKa_formSectionHeader{box-sizing:border-box;width:100%;min-height:28px;color:var(--dsw-alias-label-primary);text-align:left;cursor:pointer;background:0 0;border:0;border-radius:9px;align-items:center;gap:8px;padding:6px 10px;font-family:inherit;font-size:12px;font-weight:600;line-height:16px;display:flex;position:relative}._7D6uKa_formSectionHeader:hover{background:var(--dsw-alias-bg-mask-1)}._7D6uKa_formSection[data-open=true] ._7D6uKa_formSectionHeader{border-radius:9px 9px 0 0}._7D6uKa_formSectionHeader:after{content:\"\";width:var(--dsh-tb-hit-size);height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_formSectionChevron{border-top:4px solid #0000;border-bottom:4px solid #0000;border-left:5px solid var(--dsw-alias-label-tertiary);flex:none;width:0;height:0;margin-left:1px;transition:transform .12s}._7D6uKa_formSection[data-open=true] ._7D6uKa_formSectionChevron{transform:rotate(90deg)}._7D6uKa_formSectionTitle{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;overflow:hidden}._7D6uKa_formSectionSummary{min-width:0;color:var(--dsw-alias-label-tertiary);text-align:right;text-overflow:ellipsis;white-space:nowrap;flex:0 auto;margin-left:auto;font-weight:400;overflow:hidden}._7D6uKa_formSectionBody{border-top:1px solid var(--dsw-alias-separator-primary);flex-direction:column;gap:8px;padding:8px 10px 10px;display:flex}._7D6uKa_field{flex-direction:column;gap:5px;display:flex}._7D6uKa_fieldLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}._7D6uKa_input{box-sizing:border-box;min-height:var(--dsh-tb-control-h);color:var(--dsw-alias-label-primary);background:var(--dsw-specific-input-major);border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsh-tb-control-radius);resize:vertical;outline:none;padding:6px 10px;font-family:inherit;font-size:13px}._7D6uKa_input:focus{border-color:var(--dsw-alias-state-business-primary)}._7D6uKa_select{box-sizing:border-box;height:var(--dsh-tb-control-h);color:var(--dsw-alias-label-primary);background:var(--dsw-specific-input-major);border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsh-tb-control-radius);outline:none;max-width:100%;padding:0 10px;font-family:inherit;font-size:13px}._7D6uKa_input::placeholder{color:var(--dsw-alias-label-tertiary)}._7D6uKa_formError{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}._7D6uKa_detail{background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l2);width:min(960px,100vw - 48px);max-height:calc(100vh - 80px);box-shadow:var(--dsw-shadow-lv3);color:var(--dsw-alias-label-primary);border-radius:14px;flex-direction:column;display:flex;overflow:hidden}._7D6uKa_detailHeader{z-index:1;border-bottom:1px solid var(--dsw-alias-separator-primary);flex:none;align-items:center;gap:8px;padding:16px 24px;display:flex;position:relative}._7D6uKa_detailTitle{overflow-wrap:anywhere;flex:1;min-width:0;margin:0;font-size:15px;font-weight:700;line-height:1.4}._7D6uKa_statusBadge{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:2px 10px;font-size:12px}._7D6uKa_statusBadge[data-status=running]{color:var(--dsw-alias-state-warn-primary);border-color:var(--dsw-alias-state-warn-primary)}._7D6uKa_statusBadge[data-status=done]{color:var(--dsw-alias-state-success-primary);border-color:var(--dsw-alias-state-success-primary)}._7D6uKa_statusBadge[data-status=failed]{color:var(--dsw-alias-state-error-primary);border-color:var(--dsw-alias-state-error-primary)}._7D6uKa_detailBody{flex-direction:column;flex:1;gap:16px;min-height:0;padding:16px 24px 24px;display:flex;overflow-y:auto}._7D6uKa_detailColumns{grid-template-columns:minmax(0,1fr);align-items:start;gap:24px;display:grid}._7D6uKa_detailColumn{flex-direction:column;gap:16px;min-width:0;display:flex}._7D6uKa_detailFolds{flex-direction:column;gap:8px;min-width:0;display:flex}@media (width>=1024px){._7D6uKa_detailColumns{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)}}._7D6uKa_detailSection{flex-direction:column;gap:8px;min-width:0;display:flex}._7D6uKa_detailSection h4{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;font-weight:700}._7D6uKa_detailText{color:var(--dsw-alias-label-primary);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:1.55}._7D6uKa_detailBody ._7D6uKa_scheduleInput,._7D6uKa_detailBody ._7D6uKa_schedulePreset,._7D6uKa_detailBody ._7D6uKa_promptBlock{font-size:13px}._7D6uKa_detailBody ._7D6uKa_scheduleZone,._7D6uKa_detailBody ._7D6uKa_scheduleMeta,._7D6uKa_detailBody ._7D6uKa_cardTag{font-size:12px}._7D6uKa_scheduleToggle{color:var(--dsw-alias-label-primary);cursor:pointer;user-select:none;align-items:center;gap:8px;font-size:13px;display:flex}._7D6uKa_scheduleToggle input{accent-color:var(--dsw-alias-state-business-primary)}._7D6uKa_scheduleRow{align-items:center;gap:8px;display:flex}._7D6uKa_scheduleInput{min-width:0;font-family:var(--dsw-font-markdown-code-block-small);flex:1}._7D6uKa_scheduleInputInvalid,._7D6uKa_scheduleInputInvalid:focus{border-color:var(--dsw-alias-state-error-primary)}._7D6uKa_schedulePreset{box-sizing:border-box;height:var(--dsh-tb-control-h);color:var(--dsw-alias-label-primary);background:var(--dsw-specific-input-major);border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsh-tb-control-radius);outline:none;flex:none;padding:0 8px}._7D6uKa_scheduleZone{color:var(--dsw-alias-label-secondary);align-items:center;gap:8px;display:flex}._7D6uKa_scheduleZone select{flex:1;min-width:0}._7D6uKa_scheduleMeta{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;margin:0}._7D6uKa_promptBlock{line-height:1.5;font-family:var(--dsw-font-markdown-code-block-small);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-markdown-code-block);border:1px solid var(--dsw-alias-border-l1);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:8px;max-height:240px;margin:0;padding:10px 12px;overflow-y:auto}._7D6uKa_clampBody{position:relative}._7D6uKa_clampBody[data-clamped=true]{max-height:160px;overflow:hidden}._7D6uKa_clampBody[data-clamped=true]:after{content:\"\";pointer-events:none;background:linear-gradient(to bottom, transparent, var(--dsw-alias-bg-base));height:44px;position:absolute;bottom:0;left:0;right:0}._7D6uKa_clampToggle{align-self:flex-start}._7D6uKa_executionLog{flex-direction:column;gap:8px;min-width:0;display:flex}._7D6uKa_executionList{flex-direction:column;gap:8px;min-width:0;margin:0;padding:0;list-style:none;display:flex}._7D6uKa_executionExtra{flex-direction:column;gap:8px;min-width:0;display:flex}._7D6uKa_executionRow{border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;gap:8px;min-width:0;padding:10px 12px;display:flex}._7D6uKa_executionRowHead{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;display:flex}._7D6uKa_executionRowEvidence{flex-direction:column;gap:6px;min-width:0;display:flex}._7D6uKa_executionBadge{color:var(--dsw-alias-state-warn-primary);background:var(--dsw-alias-state-warn-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:12px;font-weight:600;line-height:18px}._7D6uKa_executionBadge[data-result=succeeded]{color:var(--dsw-alias-state-success-primary);background:var(--dsw-alias-state-success-secondary)}._7D6uKa_executionBadge[data-result=failed]{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-state-error-secondary)}._7D6uKa_executionBadge[data-result=cancelled]{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover)}._7D6uKa_executionTimes{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;font-size:12px;line-height:1.5}._7D6uKa_executionError{color:var(--dsw-alias-state-error-primary);overflow-wrap:anywhere;font-size:12px;line-height:1.5}._7D6uKa_executionSession{color:var(--dsw-alias-state-business-primary);cursor:pointer;white-space:nowrap;background:0 0;border:none;align-items:center;gap:4px;margin-left:auto;padding:0 2px;font-family:inherit;font-size:12px;display:inline-flex;position:relative}._7D6uKa_executionSession:after{content:\"\";width:100%;height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_executionSession:hover{text-decoration:underline}._7D6uKa_executionDisclosure{align-self:flex-start;align-items:center;gap:6px;display:inline-flex}._7D6uKa_disclosureChevron{width:5px;height:5px;transition:transform .12s var(--dsh-tb-ease);border-bottom:1.5px solid;border-right:1.5px solid;flex:none;transform:rotate(45deg)}._7D6uKa_disclosureChevron[data-open=true]{transform:rotate(225deg)}._7D6uKa_verifyReport{flex-direction:column;gap:8px;min-width:0;display:flex}._7D6uKa_verifyBadge{max-width:100%;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;border-radius:999px;align-self:flex-start;align-items:center;gap:6px;padding:2px 10px;font-family:inherit;font-size:12px;font-weight:600;line-height:18px;display:inline-flex;position:relative}._7D6uKa_verifyBadge:after{content:\"\";height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:0;right:0;transform:translateY(-50%)}._7D6uKa_verifyBadge[data-tone=warn]{color:var(--dsw-alias-state-warn-primary);background:var(--dsw-alias-state-warn-secondary);border-color:#0000}._7D6uKa_verifyBadge[data-tone=success]{color:var(--dsw-alias-state-success-primary);background:var(--dsw-alias-state-success-secondary);border-color:#0000}._7D6uKa_verifyBadge[data-tone=error]{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-state-error-secondary);border-color:#0000}._7D6uKa_verifyVerdict{overflow-wrap:anywhere;font-weight:700}._7D6uKa_verifyPanel{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;gap:8px;min-width:0;padding:10px 12px;display:flex}._7D6uKa_attemptRow{background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-direction:column;gap:6px;min-width:0;padding:8px 10px;display:flex}._7D6uKa_attemptHead{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;display:flex}._7D6uKa_referenceList{flex-direction:column;gap:6px;min-width:0;margin:0;padding:0;list-style:none;display:flex}._7D6uKa_referenceRow{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;font-size:12px}._7D6uKa_menuRoot{flex:none;display:inline-flex;position:relative}._7D6uKa_menuChevron{width:5px;height:5px;transition:transform .12s var(--dsh-tb-ease);border-bottom:1.5px solid;border-right:1.5px solid;flex:none;margin-top:-3px;transform:rotate(45deg)}._7D6uKa_menuChevron[data-open=true]{margin-top:0;transform:rotate(225deg)}._7D6uKa_menuPanel{z-index:20;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l2);min-width:180px;box-shadow:var(--dsw-shadow-lv2);border-radius:10px;flex-direction:column;padding:4px;display:flex;position:absolute;top:calc(100% + 4px);left:0}._7D6uKa_detailHeader ._7D6uKa_menuPanel{left:auto;right:0}._7D6uKa_menuItem{min-height:var(--dsh-tb-hit-size);color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;white-space:nowrap;background:0 0;border:none;border-radius:8px;align-items:center;padding:0 10px;font-family:inherit;font-size:13px;display:flex}._7D6uKa_menuItem:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._7D6uKa_menuItem:disabled{opacity:.45;cursor:default}._7D6uKa_detailFooter{border-top:1px solid var(--dsw-alias-separator-primary);flex:none;align-items:center;gap:8px;padding:16px 24px;display:flex}._7D6uKa_detailMeta{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px}._7D6uKa_detailFooter>._7D6uKa_detailMeta{margin-left:0}._7D6uKa_detailStamp{text-align:end;margin-left:auto}._7D6uKa_executionExtra,._7D6uKa_verifyPanel,._7D6uKa_detailBody ._7D6uKa_formSectionBody{animation:_7D6uKa_dshTbRowsIn var(--dsh-tb-motion-enter) var(--dsh-tb-ease) both}._7D6uKa_executionExtra[data-execution-fold=closing],._7D6uKa_verifyPanel[data-state=closing],._7D6uKa_detailBody ._7D6uKa_formSectionBody[data-state=closing]{animation:_7D6uKa_dshTbRowsOut var(--dsh-tb-motion-close) var(--dsh-tb-ease) both}._7D6uKa_formSectionBody{animation:_7D6uKa_dshTbRowsIn var(--dsh-tb-motion-enter) var(--dsh-tb-ease) both}._7D6uKa_formSectionBody[data-state=closing]{animation:_7D6uKa_dshTbRowsOut var(--dsh-tb-motion-close) var(--dsh-tb-ease) both}@keyframes _7D6uKa_dshTbRowsIn{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}@keyframes _7D6uKa_dshTbRowsOut{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-6px)}}@keyframes _7D6uKa_dshTbFadeIn{0%{opacity:0}to{opacity:1}}@keyframes _7D6uKa_dshTbFadeOut{0%{opacity:1}to{opacity:0}}@media (prefers-reduced-motion:reduce){._7D6uKa_executionExtra,._7D6uKa_verifyPanel,._7D6uKa_detailBody ._7D6uKa_formSectionBody{animation:_7D6uKa_dshTbFadeIn var(--dsh-tb-motion-close) linear both}._7D6uKa_executionExtra[data-execution-fold=closing],._7D6uKa_verifyPanel[data-state=closing],._7D6uKa_detailBody ._7D6uKa_formSectionBody[data-state=closing]{animation:_7D6uKa_dshTbFadeOut var(--dsh-tb-motion-close) linear both}._7D6uKa_formSectionBody{animation:_7D6uKa_dshTbFadeIn var(--dsh-tb-motion-close) linear both}._7D6uKa_formSectionBody[data-state=closing]{animation:_7D6uKa_dshTbFadeOut var(--dsh-tb-motion-close) linear both}}._7D6uKa_detailBody ._7D6uKa_formSection{min-width:0;overflow:visible}._7D6uKa_detailBody ._7D6uKa_formSectionHeader{box-sizing:border-box;border-radius:9px;min-height:28px;padding:4px 10px;font-size:12px;line-height:16px;position:relative}._7D6uKa_detailBody ._7D6uKa_formSection[data-open=true] ._7D6uKa_formSectionHeader{border-radius:9px 9px 0 0}._7D6uKa_detailBody ._7D6uKa_formSectionHeader:after{content:\"\";width:var(--dsh-tb-hit-size);height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_detailBody ._7D6uKa_formSectionTitle{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;overflow:hidden}._7D6uKa_detailBody ._7D6uKa_formSectionSummary{flex:0 auto;min-width:0;margin-left:auto}._7D6uKa_detailBody ._7D6uKa_formSectionBody{gap:8px}@container _7D6uKa_task-board-view (width<=768px){._7D6uKa_board{gap:10px;padding:10px}._7D6uKa_boardHeader{flex-wrap:wrap;align-items:center;gap:8px}._7D6uKa_backButton{flex:none}._7D6uKa_boardTitle{flex:auto}._7D6uKa_boardHeader>._7D6uKa_detailMeta{flex:1 0 100%;margin-left:0}._7D6uKa_boardTools{flex-wrap:wrap;flex:1 0 100%;justify-content:flex-start;margin-left:0}._7D6uKa_boardTools>._7D6uKa_search{flex:1 0 100%;min-width:0}._7D6uKa_boardTools>._7D6uKa_projectFilter{flex:auto;min-width:0}._7D6uKa_boardTools>button{flex:1 1 0;min-width:0}._7D6uKa_columns{scroll-snap-type:inline mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch;grid-auto-columns:86cqw;gap:10px;padding-inline:2px 14cqw;scroll-padding-inline:2px}._7D6uKa_columns::-webkit-scrollbar{display:none}._7D6uKa_column{scroll-snap-align:start;scroll-snap-stop:always}}@container _7D6uKa_task-board-view (width<=720px){._7D6uKa_boardHeader>._7D6uKa_detailMeta{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}}@container _7D6uKa_task-board-view (width<=600px){._7D6uKa_board{padding-inline:8px}}@media (width<=768px){[data-dsh-taskboard-view]{height:100dvh}._7D6uKa_card,._7D6uKa_primaryButton,._7D6uKa_ghostButton,._7D6uKa_dangerButton,._7D6uKa_iconButton,._7D6uKa_linkButton,._7D6uKa_search,._7D6uKa_input,._7D6uKa_select,._7D6uKa_schedulePreset,._7D6uKa_scheduleToggle{min-height:44px}._7D6uKa_search,._7D6uKa_input,._7D6uKa_select,._7D6uKa_schedulePreset{box-sizing:border-box;font-size:16px}._7D6uKa_modalBackdrop{justify-content:stretch;align-items:stretch;width:100vw;height:100dvh}._7D6uKa_modal,._7D6uKa_detail{box-sizing:border-box;border:0;border-radius:0;width:100vw;height:100dvh;max-height:none}._7D6uKa_modal{padding-top:max(16px, env(safe-area-inset-top));padding-right:max(16px, env(safe-area-inset-right));padding-bottom:max(16px, env(safe-area-inset-bottom));padding-left:max(16px, env(safe-area-inset-left))}._7D6uKa_modalFooter{z-index:1;background:var(--dsw-alias-bg-base);flex-wrap:wrap;padding-top:8px;position:sticky;bottom:0}._7D6uKa_modalFooter>button{flex:120px}._7D6uKa_detailHeader{padding-top:max(16px, env(safe-area-inset-top));padding-right:max(16px, env(safe-area-inset-right));padding-left:max(16px, env(safe-area-inset-left));flex-wrap:wrap}._7D6uKa_detailTitle{min-width:0}._7D6uKa_detailColumns{grid-template-columns:minmax(0,1fr);gap:16px}._7D6uKa_detailColumn{gap:16px}._7D6uKa_detailBody{overscroll-behavior-y:contain;padding-right:max(16px, env(safe-area-inset-right));padding-left:max(16px, env(safe-area-inset-left))}._7D6uKa_detailFooter{padding-right:max(16px, env(safe-area-inset-right));padding-bottom:max(16px, env(safe-area-inset-bottom));padding-left:max(16px, env(safe-area-inset-left));flex-wrap:wrap}._7D6uKa_menuPanel{min-width:200px}._7D6uKa_detailFooter>button{flex:96px}._7D6uKa_detailFooter>._7D6uKa_detailMeta{text-align:end;flex:1 0 100%;margin-left:0}._7D6uKa_scheduleRow{flex-direction:column;align-items:stretch}._7D6uKa_schedulePreset{width:100%}}._7D6uKa_primaryButton:focus-visible,._7D6uKa_ghostButton:focus-visible,._7D6uKa_dangerButton:focus-visible,._7D6uKa_iconButton:focus-visible,._7D6uKa_linkButton:focus-visible,._7D6uKa_menuItem:focus-visible,._7D6uKa_verifyBadge:focus-visible,._7D6uKa_executionSession:focus-visible,._7D6uKa_search:focus-visible,._7D6uKa_input:focus-visible,._7D6uKa_select:focus-visible,._7D6uKa_schedulePreset:focus-visible,._7D6uKa_scheduleToggle input:focus-visible,._7D6uKa_formSectionHeader:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}._7D6uKa_primaryButton,._7D6uKa_ghostButton,._7D6uKa_dangerButton,._7D6uKa_iconButton,._7D6uKa_linkButton,._7D6uKa_menuItem,._7D6uKa_verifyBadge,._7D6uKa_executionSession,._7D6uKa_search,._7D6uKa_input,._7D6uKa_select,._7D6uKa_schedulePreset,._7D6uKa_scheduleToggle input,._7D6uKa_formSectionHeader,._7D6uKa_formSectionChevron{transition:background-color .12s,color .12s,border-color .12s,outline-color .12s,box-shadow .12s,transform .12s}._7D6uKa_card:active{box-shadow:var(--dsw-shadow-lv1);transform:translateY(0)}._7D6uKa_primaryButton:active:not(:disabled),._7D6uKa_ghostButton:active:not(:disabled),._7D6uKa_dangerButton:active:not(:disabled),._7D6uKa_iconButton:active:not(:disabled),._7D6uKa_linkButton:active:not(:disabled){transform:translateY(1px)}._7D6uKa_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._7D6uKa_linkButton:hover:not(:disabled){text-decoration:underline}._7D6uKa_iconButton:disabled,._7D6uKa_linkButton:disabled{opacity:.45;cursor:default}._7D6uKa_search:focus,._7D6uKa_select:focus,._7D6uKa_schedulePreset:focus{border-color:var(--dsw-alias-state-business-primary)}._7D6uKa_scheduleToggle input{margin:0}@media (prefers-reduced-motion:reduce){._7D6uKa_card,._7D6uKa_primaryButton,._7D6uKa_ghostButton,._7D6uKa_dangerButton,._7D6uKa_iconButton,._7D6uKa_linkButton,._7D6uKa_menuItem,._7D6uKa_verifyBadge,._7D6uKa_executionSession,._7D6uKa_disclosureChevron,._7D6uKa_menuChevron,._7D6uKa_search,._7D6uKa_input,._7D6uKa_select,._7D6uKa_schedulePreset,._7D6uKa_scheduleToggle input,._7D6uKa_formSectionHeader,._7D6uKa_formSectionChevron{transition:none}._7D6uKa_cardSpinner{animation:none}._7D6uKa_modalBackdrop,._7D6uKa_modal,._7D6uKa_detail{animation:_7D6uKa_dshTbBackdropIn var(--dsh-tb-motion-close) linear both}._7D6uKa_modalBackdrop[data-state=closing],._7D6uKa_modalBackdrop[data-state=closing] ._7D6uKa_modal,._7D6uKa_modalBackdrop[data-state=closing] ._7D6uKa_detail{animation:_7D6uKa_dshTbBackdropOut var(--dsh-tb-motion-close) linear both}}._7D6uKa_cardTags{flex-wrap:wrap;gap:4px;display:flex}._7D6uKa_cardTags:empty{display:none}._7D6uKa_cardTag{border:1px solid var(--dsh-task-tag-border);background:var(--dsh-task-tag-fill);max-width:100%;color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;border-radius:999px;padding:0 8px;font-size:12px;line-height:1.5;overflow:hidden}._7D6uKa_tagFilter{flex-wrap:wrap;flex:none;align-items:center;gap:8px;margin:0;display:flex}._7D6uKa_tagFilterLabel{color:var(--dsw-alias-label-tertiary);font-size:12px}._7D6uKa_tagChip{border:1px solid var(--dsh-task-tag-border);color:var(--dsw-alias-label-secondary);cursor:pointer;font-family:inherit;font-size:12px;line-height:var(--dsh-tb-card-row);background:0 0;border-radius:999px;padding:1px 9px;position:relative}._7D6uKa_tagChip:after{content:\"\";width:var(--dsh-tb-hit-size);height:var(--dsh-tb-hit-size);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._7D6uKa_tagChip:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}._7D6uKa_tagChip[data-active=true]{background:var(--dsh-task-tag-fill);color:var(--dsw-alias-label-primary)}._7D6uKa_cardTag[data-tag-tone=\"0\"],._7D6uKa_tagChip[data-tag-tone=\"0\"]{--dsh-task-tag-fill:#4e93e82e;--dsh-task-tag-border:#4e93e866}._7D6uKa_cardTag[data-tag-tone=\"1\"],._7D6uKa_tagChip[data-tag-tone=\"1\"]{--dsh-task-tag-fill:#2ea36a2e;--dsh-task-tag-border:#2ea36a66}._7D6uKa_cardTag[data-tag-tone=\"2\"],._7D6uKa_tagChip[data-tag-tone=\"2\"]{--dsh-task-tag-fill:#d08a2a2e;--dsh-task-tag-border:#d08a2a66}._7D6uKa_cardTag[data-tag-tone=\"3\"],._7D6uKa_tagChip[data-tag-tone=\"3\"]{--dsh-task-tag-fill:#b456c82e;--dsh-task-tag-border:#b456c866}._7D6uKa_cardTag[data-tag-tone=\"4\"],._7D6uKa_tagChip[data-tag-tone=\"4\"]{--dsh-task-tag-fill:#cf5f7a2e;--dsh-task-tag-border:#cf5f7a66}._7D6uKa_cardTag[data-tag-tone=\"5\"],._7D6uKa_tagChip[data-tag-tone=\"5\"]{--dsh-task-tag-fill:#4a9fb52e;--dsh-task-tag-border:#4a9fb566}._7D6uKa_fieldHint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:1.4}._7D6uKa_tagRow{align-items:center;gap:6px;display:flex}._7D6uKa_tagRow ._7D6uKa_input{flex:1 1 0;min-width:0}._7D6uKa_tagRow ._7D6uKa_ghostButton{flex:none}._7D6uKa_tagAddButton{align-self:flex-start}._7D6uKa_attachmentDrop{border:1px dashed var(--dsw-alias-border-secondary);border-radius:8px;flex-wrap:wrap;align-items:center;gap:8px;margin-top:6px;padding:10px 12px;display:flex}._7D6uKa_attachmentDrop[data-state=active]{border-color:var(--dsw-alias-border-focus);background:var(--dsw-alias-surface-raised)}._7D6uKa_attachmentDropHint{min-width:0;color:var(--dsw-alias-label-tertiary);flex:12em;font-size:12px;line-height:1.4}._7D6uKa_attachmentList{flex-direction:column;gap:6px;margin:8px 0 0;padding:0;list-style:none;display:flex}._7D6uKa_attachmentRow{border:1px solid var(--dsw-alias-border-subtle);border-radius:6px;align-items:center;gap:8px;padding:4px 6px;display:flex}._7D6uKa_attachmentThumb{object-fit:cover;background:var(--dsw-alias-surface-raised);border-radius:4px;flex:none;width:40px;height:40px}._7D6uKa_attachmentName{overflow-wrap:anywhere;flex:1 1 0;min-width:0;font-size:13px;line-height:1.4}._7D6uKa_attachmentMeta{color:var(--dsw-alias-label-tertiary);font-size:12px}._7D6uKa_projectFilter{flex:none;align-items:center;gap:6px;display:flex}._7D6uKa_projectFilterLabel{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:12px}._7D6uKa_projectDialog{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:10px;flex-direction:column;flex:none;gap:8px;margin-bottom:8px;padding:10px 12px;display:flex}._7D6uKa_projectDialogActions{justify-content:flex-end;gap:8px;display:flex}._7D6uKa_aiParse{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:10px;flex-direction:column;gap:6px;padding:10px 12px;display:flex}._7D6uKa_aiParseRow{align-items:center;gap:8px;display:flex}._7D6uKa_aiParseRow ._7D6uKa_select{flex:1 1 0;min-width:0}._7D6uKa_aiParseRow ._7D6uKa_ghostButton,._7D6uKa_aiParseRow ._7D6uKa_primaryButton{flex:none}._7D6uKa_cardSubtask{background:var(--dsw-alias-interactive-bg-hover);max-width:100%;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:var(--dsh-tb-card-row);text-overflow:ellipsis;white-space:nowrap;border-radius:999px;padding:0 8px;overflow:hidden}._7D6uKa_cardSubtask[data-tone=failed]{color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-state-error-secondary)}._7D6uKa_cardSubtask[data-tone=running]{color:var(--dsw-alias-state-warn-primary);background:var(--dsw-alias-state-warn-secondary)}._7D6uKa_cardSubtask[data-tone=done]{color:var(--dsw-alias-state-success-primary);background:var(--dsw-alias-state-success-secondary)}._7D6uKa_subtaskList{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}._7D6uKa_subtaskRow{border:1px solid var(--dsw-alias-border-l1);border-radius:8px;flex-wrap:wrap;align-items:center;gap:10px;padding:6px 10px;display:flex}._7D6uKa_subtaskRow ._7D6uKa_linkButton:first-child{text-align:left;overflow-wrap:anywhere;flex:auto;min-width:0}._7D6uKa_subtaskAddRow{flex-wrap:wrap;gap:8px;display:flex}._7D6uKa_pickList{flex-direction:column;gap:6px;max-height:320px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}._7D6uKa_pickRow{border:1px solid var(--dsw-alias-border-l1);border-radius:8px;align-items:center;gap:10px;padding:6px 10px;display:flex}._7D6uKa_pickTitle{min-width:0;color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;flex:auto;font-size:13px}";
4468
4750
  const tagId$3 = "@linxin666/dsh-client-ui-task-board/packages/dsh-task-board/src/client/board.module.css";
4469
4751
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
4470
4752
  const tag = document.createElement("style");
@@ -4476,6 +4758,13 @@ window.__ModuleLoader__.load({
4476
4758
  var board_module_css_default = {
4477
4759
  "aiParse": "_7D6uKa_aiParse",
4478
4760
  "aiParseRow": "_7D6uKa_aiParseRow",
4761
+ "attachmentDrop": "_7D6uKa_attachmentDrop",
4762
+ "attachmentDropHint": "_7D6uKa_attachmentDropHint",
4763
+ "attachmentList": "_7D6uKa_attachmentList",
4764
+ "attachmentMeta": "_7D6uKa_attachmentMeta",
4765
+ "attachmentName": "_7D6uKa_attachmentName",
4766
+ "attachmentRow": "_7D6uKa_attachmentRow",
4767
+ "attachmentThumb": "_7D6uKa_attachmentThumb",
4479
4768
  "attemptHead": "_7D6uKa_attemptHead",
4480
4769
  "attemptRow": "_7D6uKa_attemptRow",
4481
4770
  "backButton": "_7D6uKa_backButton",
@@ -4602,6 +4891,9 @@ window.__ModuleLoader__.load({
4602
4891
  "scheduleZone": "_7D6uKa_scheduleZone",
4603
4892
  "search": "_7D6uKa_search",
4604
4893
  "select": "_7D6uKa_select",
4894
+ "sourceGroup": "_7D6uKa_sourceGroup",
4895
+ "sourceGroupHeader": "_7D6uKa_sourceGroupHeader",
4896
+ "sourceGroupLabel": "_7D6uKa_sourceGroupLabel",
4605
4897
  "statusBadge": "_7D6uKa_statusBadge",
4606
4898
  "statusDot": "_7D6uKa_statusDot",
4607
4899
  "subtaskAddRow": "_7D6uKa_subtaskAddRow",
@@ -5334,110 +5626,810 @@ window.__ModuleLoader__.load({
5334
5626
  return normalizeTags(tags) ?? [];
5335
5627
  }
5336
5628
  //#endregion
5337
- //#region src/client/seats.tsx
5629
+ //#region src/core/degraded-reason.ts
5338
5630
  /**
5339
- * The board's child seats, threaded from the slot registration that declares
5340
- * them down to the components that consume them.
5341
- *
5342
- * The framework hands the declaring component a `renderSlot` binding; the board
5343
- * wraps that binding in a React context so a provider's contribution can render
5344
- * deep inside TaskDetail, the card, or the settings card without those
5345
- * components knowing which providers exist.
5346
- *
5347
- * @module dsh-task-board/client/seats
5631
+ * The one degraded record naming `plugin`, or undefined when that row is not
5632
+ * degraded (or the payload does not come from the shell's own shape). A
5633
+ * plugin may appear once: the shell keys the ledger by package name and
5634
+ * refreshes the record on every new failure.
5635
+ * @param body - parsed JSON body of the health route.
5636
+ * @param plugin - the real plugin package name to look for.
5637
+ * @returns the degraded row, or undefined when the ledger does not name it.
5348
5638
  */
5349
- /** Nothing registered: every seat renders empty. */
5350
- const EMPTY_TASK_BOARD_SEATS = {
5351
- detailSection: () => null,
5352
- settingsSection: () => null,
5353
- cardDecoration: () => null
5354
- };
5355
- /** Adapt one framework renderSlot binding to the board's seat interface. */
5356
- function seatsFromRenderSlot(renderSlot) {
5357
- if (renderSlot === void 0) return EMPTY_TASK_BOARD_SEATS;
5358
- return {
5359
- detailSection: (props) => renderSlot(TASK_BOARD_DETAIL_SECTION, props),
5360
- settingsSection: (props) => renderSlot(TASK_BOARD_SETTINGS_SECTION, props),
5361
- cardDecoration: (props) => renderSlot(TASK_BOARD_CARD_DECORATION, props)
5362
- };
5639
+ function degradedRowOf(body, plugin) {
5640
+ if (typeof body !== "object" || body === null) return void 0;
5641
+ const ledger = body;
5642
+ if (ledger.ok !== true || !Array.isArray(ledger.degraded)) return void 0;
5643
+ for (const entry of ledger.degraded) {
5644
+ if (typeof entry !== "object" || entry === null) continue;
5645
+ const record = entry;
5646
+ if (record.plugin !== plugin) continue;
5647
+ const stage = record.stage === "import" || record.stage === "shape" || record.stage === "start" ? record.stage : void 0;
5648
+ if (stage === void 0) continue;
5649
+ return {
5650
+ plugin,
5651
+ stage,
5652
+ reason: typeof record.reason === "string" ? record.reason : ""
5653
+ };
5654
+ }
5363
5655
  }
5364
- const TaskBoardSeatsContext = (0, react.createContext)(EMPTY_TASK_BOARD_SEATS);
5365
- /** Provider the board's registered components wrap their subtree in. */
5366
- const TaskBoardSeatsProvider = TaskBoardSeatsContext.Provider;
5367
- /** Read the current seat set (empty when no board registration is above). */
5368
- function useTaskBoardSeats() {
5369
- return (0, react.useContext)(TaskBoardSeatsContext);
5656
+ /** The ledger owner pid a task-board lock reason names, when it names one. */
5657
+ const OWNED_BY_PROCESS_RE = /already owned by process\s+(\d+)/;
5658
+ /**
5659
+ * The marker the ledger appends when it could NOT confirm the recorded PID
5660
+ * belongs to the lock's real owner: the PID was reused by an unrelated process
5661
+ * after a crash, and the reason then carries the manual-removal step instead.
5662
+ * That reason must be rendered verbatim — telling the user to close "the other
5663
+ * DSH instance" would send them after a process that never touched the board.
5664
+ */
5665
+ const UNCONFIRMED_OWNER_MARKER = "reused after a crash";
5666
+ /**
5667
+ * Extract the pid of the LIVE process a ledger-lock failure blames, when the
5668
+ * reason identifies one. The task board's lock refusal is the one degraded
5669
+ * reason that carries an owner the user can act on, so the panel renders the
5670
+ * pid in its own sentence and adds the guidance that actually applies.
5671
+ * @param reason - the shell's one-line failure reason.
5672
+ * @returns the confirmed owner pid, or undefined when the reason names none or
5673
+ * warns that the PID may have been reused (its own text owns the recovery).
5674
+ */
5675
+ function ledgerOwnerPid(reason) {
5676
+ if (reason.includes(UNCONFIRMED_OWNER_MARKER)) return void 0;
5677
+ const match = OWNED_BY_PROCESS_RE.exec(reason);
5678
+ if (match === null) return void 0;
5679
+ const pid = Number(match[1]);
5680
+ return Number.isSafeInteger(pid) && pid > 0 ? pid : void 0;
5370
5681
  }
5371
5682
  //#endregion
5372
- //#region src/client/board/card-view.ts
5683
+ //#region src/core/package-name.ts
5373
5684
  /**
5374
- * Card view model: the pure derivations a task card renders from its record.
5375
- *
5376
- * Everything here is a function of the task record (plus the clock and the
5377
- * Host time zone for the recency groups), so the card stays a thin renderer and
5378
- * every rule is unit-testable without mounting React. Nothing here writes the
5379
- * record: the type prefix, the tone and the time label are presentation only.
5685
+ * npm identity of this plugin. The dsh-web-all degraded ledger is keyed by the
5686
+ * real plugin package name of a family row, and this plugin's browser half
5687
+ * must name its OWN row there to learn why its Host API is missing (issue
5688
+ * #1730): the served bundle cannot derive the name, because a family row
5689
+ * mounts the package from a versioned profile path. The host half spells the
5690
+ * same name in its single-mount guard (src/index.ts); the two move together.
5691
+ */
5692
+ const TASK_BOARD_PACKAGE = "@linxin666/dsh-client-ui-task-board";
5693
+ //#endregion
5694
+ //#region src/protocol.ts
5695
+ const TASK_BOARD_API_PREFIX = "/api/task-board";
5696
+ /** Whether a decoded reply carries the three draft strings the form accepts. */
5697
+ function isTaskParseDraft(value) {
5698
+ if (typeof value !== "object" || value === null) return false;
5699
+ const record = value;
5700
+ return typeof record.title === "string" && typeof record.description === "string" && typeof record.prompt === "string";
5701
+ }
5702
+ //#endregion
5703
+ //#region src/client/host-api.ts
5704
+ /**
5705
+ * Client-side base for the board's routes: DOCUMENT-RELATIVE (issue #1707).
5380
5706
  *
5381
- * @module @linxin666/dsh-client-ui-task-board/client/board/card-view
5707
+ * The host registers `TASK_BOARD_API_PREFIX` root-absolute; the page is served
5708
+ * with `<base href="./">`, so the browser half must drop the leading slash or
5709
+ * a sub-path deployment escapes its entry directory. Derived from the shared
5710
+ * constant so host and client cannot drift.
5382
5711
  */
5383
- /** `[Bug]:` / `[Issue]` / a bracketed CJK word, at most 24 characters, optional colon. */
5384
- const KIND_PREFIX = /^\[([^[\]\n]{1,24})\]\s*[:\uFF1A]?\s*/;
5712
+ const CLIENT_API_PREFIX = TASK_BOARD_API_PREFIX.slice(1);
5713
+ const IMPORT_MARKER = "dsh.taskBoard.v2.hostImported";
5714
+ const SOURCE_KEY = "dsh.taskBoard.v2.sourceId";
5715
+ const IMPORT_REQUEST_KEY = "dsh.taskBoard.v2.importRequestId";
5716
+ const REQUEST_TIMEOUT_MS = 15e3;
5717
+ /** An upload moves real bytes, so it gets a wider budget than a JSON call. */
5718
+ const UPLOAD_TIMEOUT_MS = 12e4;
5719
+ /** Re-notify the panel at most this often while the event stream stays broken. */
5720
+ const STREAM_ERROR_NOTIFY_MS = 15e3;
5721
+ /** Mirrors the Host's own parse budget; only used to phrase the timeout. */
5722
+ const TASK_PARSE_TIMEOUT_SECONDS = 45;
5723
+ /** Transport failure carrying a stable class next to its user-facing message. */
5724
+ var HostApiError = class extends Error {
5725
+ failure;
5726
+ status;
5727
+ constructor(failure, message, status) {
5728
+ super(message);
5729
+ this.failure = failure;
5730
+ this.status = status;
5731
+ this.name = "HostApiError";
5732
+ }
5733
+ };
5385
5734
  /**
5386
- * Split an issue-form style type prefix off a title. The prefix becomes a
5387
- * badge, so the clamped title lines carry the text the reader scans for. A
5388
- * title that is only a prefix keeps its full text.
5389
- * @param summary - the plain-text title.
5390
- * @returns the prefix (when present) and the remaining title text.
5735
+ * Same-origin family health route served by the dsh-web-all shell: the
5736
+ * degraded ledger, in which a family row that failed during apply appears WITH
5737
+ * its reason. DOCUMENT-RELATIVE for the same reason as the board's own routes
5738
+ * (issue #1707). A 404 here means the family shell is absent or older than the
5739
+ * route, which is not itself a failure of the board.
5391
5740
  */
5392
- function splitTitleKind(summary) {
5393
- const match = KIND_PREFIX.exec(summary);
5394
- if (match === null) return { text: summary };
5395
- const kind = (match[1] ?? "").trim();
5396
- const text = summary.slice(match[0].length).trim();
5397
- if (kind === "" || text === "") return { text: summary };
5398
- return {
5399
- kind,
5400
- text
5401
- };
5402
- }
5741
+ const FAMILY_DEGRADED_ROUTE = "api/dsh-web-all/degraded";
5742
+ /** Health-route ceiling: an unresponsive family shell must not hold the board's first paint. */
5743
+ const DEGRADED_LOOKUP_TIMEOUT_MS = 2e3;
5403
5744
  /**
5404
- * Derive the card's execution outcome.
5405
- * @param task - the task record.
5406
- * @param archived - whether the card renders in the archive view.
5745
+ * The failure text for a row this browser knows failed during start.
5746
+ *
5747
+ * A ledger lock is the one class with an owner the user can act on, so its
5748
+ * reason is unpacked into the pid plus what to do about it; every other
5749
+ * degraded row is reported with the shell's own reason verbatim. The raw
5750
+ * reason rides along either way, because it is the only text that names the
5751
+ * lock file or the recovery step when the pid is not the whole story.
5752
+ * @param reason - the shell's one-line failure reason (never empty).
5407
5753
  */
5408
- function cardOutcome(task, archived) {
5409
- const latest = task.executions[task.executions.length - 1];
5410
- if (latest === void 0) return { declared: false };
5411
- if (hasOpenExecution(task)) return archived ? {
5412
- latest,
5413
- declared: false
5414
- } : {
5415
- tone: "running",
5416
- latest,
5417
- declared: false
5418
- };
5419
- const result = latest.result;
5420
- if (archived || result === void 0) return {
5421
- latest,
5422
- declared: false
5754
+ function degradedFailureMessage(reason) {
5755
+ const pid = ledgerOwnerPid(reason);
5756
+ if (pid === void 0) return {
5757
+ failure: "degraded",
5758
+ message: t("board.hostError.degraded", { detail: reason })
5423
5759
  };
5424
5760
  return {
5425
- tone: result,
5426
- latest,
5427
- declared: task.status === "done" && result !== "succeeded" || task.status === "failed" && result === "succeeded"
5761
+ failure: "ledger-locked",
5762
+ message: t("board.hostError.ledgerLocked", {
5763
+ pid: String(pid),
5764
+ detail: reason
5765
+ })
5428
5766
  };
5429
5767
  }
5430
- /** Locale key of the latest settled result shown before the run count. */
5431
- const RESULT_KEY = {
5432
- succeeded: "card.result.succeeded",
5433
- failed: "card.result.failed",
5434
- cancelled: "card.result.cancelled"
5435
- };
5436
5768
  /**
5437
- * Pick the time that tells cards in the same column apart. `updatedAt` moves
5438
- * on every provider sync, so a column of synced cards would all read
5439
- * "updated 4m"; each column instead shows the instant its cards differ by:
5440
- * planning columns the creation time, an executing card its start, settled
5769
+ * The degraded record the family shell holds for THIS board, or undefined when
5770
+ * the row is healthy, the shell is absent, or the answer is unusable. The
5771
+ * lookup is best-effort by contract: any uncertainty keeps the caller's own
5772
+ * failure text instead of replacing it with a weaker one.
5773
+ * @param fetchImpl - fetch implementation (injected for tests).
5774
+ * @returns the ledger's reason for this row, or undefined when it names none.
5775
+ */
5776
+ async function fetchDegradedReason(fetchImpl) {
5777
+ const controller = new AbortController();
5778
+ const timer = globalThis.setTimeout(() => {
5779
+ controller.abort();
5780
+ }, DEGRADED_LOOKUP_TIMEOUT_MS);
5781
+ try {
5782
+ const response = await fetchImpl(FAMILY_DEGRADED_ROUTE, {
5783
+ signal: controller.signal,
5784
+ headers: { accept: "application/json" },
5785
+ cache: "no-store"
5786
+ });
5787
+ if (!response.ok) return void 0;
5788
+ return degradedRowOf(await response.json(), TASK_BOARD_PACKAGE)?.reason;
5789
+ } catch {
5790
+ return;
5791
+ } finally {
5792
+ globalThis.clearTimeout(timer);
5793
+ }
5794
+ }
5795
+ /**
5796
+ * Name the real reason this board's routes are missing (issue #1730).
5797
+ *
5798
+ * The core webserver answers an unmounted route with a bare 404, which cannot
5799
+ * distinguish "this deployment never loaded the plugin" from "this row
5800
+ * degraded during start" — a second DSH process holding `ledger-v2.lock` is
5801
+ * the case that matters, because the panel's advice ("restart the service")
5802
+ * is then false: the lock belongs to the other process, and restarting cannot
5803
+ * win it. The family health route knows the difference, so the 404 is
5804
+ * disambiguated there before anything is shown.
5805
+ * @param fallback - copy for the plain "routes are not there" failure, which
5806
+ * is route-specific (the board's state route and the AI-parse route phrase
5807
+ * their own absence); it is also what is shown when the ledger names nothing.
5808
+ * @param fetchImpl - fetch implementation (injected for tests).
5809
+ * @returns the HostApiError to throw for a missing board route.
5810
+ */
5811
+ async function missingRouteFailure(fallback = t("board.hostError.notMounted"), fetchImpl = fetch) {
5812
+ const absent = () => new HostApiError("not-mounted", fallback, 404);
5813
+ const reason = await fetchDegradedReason(fetchImpl);
5814
+ if (reason === void 0 || reason === "") return absent();
5815
+ const described = degradedFailureMessage(reason);
5816
+ return new HostApiError(described.failure, described.message, 404);
5817
+ }
5818
+ function uuid() {
5819
+ return globalThis.crypto?.randomUUID?.() ?? `browser-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
5820
+ }
5821
+ /**
5822
+ * Read one Host response without ever handing a non-JSON body to JSON.parse:
5823
+ * the core webserver answers an unmounted `/api/*` path with the plain text
5824
+ * "not found", which used to surface as a JavaScript parse error in the panel.
5825
+ */
5826
+ async function readJson(response) {
5827
+ const text = await response.text();
5828
+ let parsed;
5829
+ let readable = false;
5830
+ if (text.trim() !== "") try {
5831
+ parsed = JSON.parse(text);
5832
+ readable = true;
5833
+ } catch {
5834
+ readable = false;
5835
+ }
5836
+ const hostError = readable && typeof parsed === "object" && parsed !== null && typeof parsed.error === "string" ? parsed.error : void 0;
5837
+ if (response.ok) {
5838
+ if (!readable) throw new HostApiError("unexpected", t("board.hostError.unexpected", { status: String(response.status) }), response.status);
5839
+ return parsed;
5840
+ }
5841
+ if (hostError !== void 0) {
5842
+ if (hostError === "forbidden") throw new HostApiError("forbidden", t("board.hostError.forbidden"), response.status);
5843
+ if (response.status === 503 || /lock/i.test(hostError)) throw new HostApiError("locked", t("board.hostError.locked", { detail: hostError }), response.status);
5844
+ throw new HostApiError("rejected", hostError, response.status);
5845
+ }
5846
+ if (response.status === 404) throw await missingRouteFailure();
5847
+ if (response.status === 403) throw new HostApiError("forbidden", t("board.hostError.forbidden"), 403);
5848
+ if (response.status === 401) throw new HostApiError("unauthorized", t("board.hostError.unauthorized"), 401);
5849
+ throw new HostApiError("unexpected", t("board.hostError.unexpected", { status: String(response.status) }), response.status);
5850
+ }
5851
+ /**
5852
+ * The URL of one stored image. The board serves it only for an id a card of
5853
+ * this board references, so the URL is useless on its own.
5854
+ * @param attachmentId - the stored object's identifier.
5855
+ * @returns the document-relative URL of the image.
5856
+ */
5857
+ function attachmentImageUrl(attachmentId) {
5858
+ return `${CLIENT_API_PREFIX}/attachments/image?id=${encodeURIComponent(attachmentId)}`;
5859
+ }
5860
+ var HttpTaskBoardHostTransport = class {
5861
+ storage;
5862
+ constructor(storage = globalThis.localStorage) {
5863
+ this.storage = storage;
5864
+ }
5865
+ async bootstrap(legacy) {
5866
+ const initial = await this.state();
5867
+ const ledgerId = initial.scheduler.ledgerId;
5868
+ if (legacy.length > 0 && ledgerId !== void 0 && this.storage?.getItem(IMPORT_MARKER) !== ledgerId) {
5869
+ let sourceId = this.storage?.getItem(SOURCE_KEY);
5870
+ if (sourceId === null || sourceId === void 0 || sourceId === "") {
5871
+ sourceId = uuid();
5872
+ this.storage?.setItem(SOURCE_KEY, sourceId);
5873
+ }
5874
+ let requestId = this.storage?.getItem(IMPORT_REQUEST_KEY);
5875
+ if (requestId === null || requestId === void 0 || requestId === "") {
5876
+ requestId = uuid();
5877
+ this.storage?.setItem(IMPORT_REQUEST_KEY, requestId);
5878
+ }
5879
+ const snapshot = await this.post(requestId, {
5880
+ kind: "import",
5881
+ sourceId,
5882
+ tasks: [...legacy]
5883
+ });
5884
+ this.storage?.setItem(IMPORT_MARKER, snapshot.scheduler.ledgerId ?? ledgerId);
5885
+ return snapshot;
5886
+ }
5887
+ return initial;
5888
+ }
5889
+ async state() {
5890
+ return await this.request(`${CLIENT_API_PREFIX}/state`, { cache: "no-store" });
5891
+ }
5892
+ async action(action, initiator) {
5893
+ return await this.post(uuid(), action, initiator);
5894
+ }
5895
+ async post(requestId, action, initiator) {
5896
+ const envelope = {
5897
+ requestId,
5898
+ action,
5899
+ ...initiator === void 0 || initiator === "" ? {} : { initiator }
5900
+ };
5901
+ return await this.request(`${CLIENT_API_PREFIX}/action`, {
5902
+ method: "POST",
5903
+ headers: { "content-type": "application/json" },
5904
+ body: JSON.stringify(envelope)
5905
+ });
5906
+ }
5907
+ async request(url, init) {
5908
+ const controller = new AbortController();
5909
+ const timeout = globalThis.setTimeout(() => {
5910
+ controller.abort();
5911
+ }, REQUEST_TIMEOUT_MS);
5912
+ try {
5913
+ return await readJson(await fetch(url, {
5914
+ ...init,
5915
+ signal: controller.signal
5916
+ }));
5917
+ } catch (error) {
5918
+ if (error instanceof HostApiError) throw error;
5919
+ if (controller.signal.aborted) throw new HostApiError("timeout", t("board.hostError.timeout", { seconds: String(REQUEST_TIMEOUT_MS / 1e3) }));
5920
+ throw new HostApiError("unreachable", t("board.hostError.unreachable"));
5921
+ } finally {
5922
+ globalThis.clearTimeout(timeout);
5923
+ }
5924
+ }
5925
+ /**
5926
+ * Ask the Host to turn pasted text into task fields. The route answers a
5927
+ * typed failure (no model, timeout, unparseable reply) already phrased for
5928
+ * the form, so the UI never renders a raw status code (issue #1540).
5929
+ */
5930
+ async parseDraft(request, signal) {
5931
+ let response;
5932
+ try {
5933
+ response = await fetch(`${CLIENT_API_PREFIX}/parse`, {
5934
+ method: "POST",
5935
+ headers: { "content-type": "application/json" },
5936
+ body: JSON.stringify(request),
5937
+ ...signal === void 0 ? {} : { signal }
5938
+ });
5939
+ } catch {
5940
+ throw new HostApiError("unreachable", t("board.hostError.unreachable"));
5941
+ }
5942
+ const text = await response.text();
5943
+ let parsed;
5944
+ let readable = false;
5945
+ if (text.trim() !== "") try {
5946
+ parsed = JSON.parse(text);
5947
+ readable = true;
5948
+ } catch {
5949
+ readable = false;
5950
+ }
5951
+ const record = readable && typeof parsed === "object" && parsed !== null ? parsed : void 0;
5952
+ if (response.ok) {
5953
+ if (record !== void 0 && isTaskParseDraft(record.draft)) return record.draft;
5954
+ throw new HostApiError("unexpected", t("new.aiParseFailed", { error: t("board.hostError.unexpected", { status: String(response.status) }) }), response.status);
5955
+ }
5956
+ if (response.status === 404) throw await missingRouteFailure(t("new.aiParseUnavailable"));
5957
+ if (response.status === 403) throw new HostApiError("forbidden", t("board.hostError.forbidden"), 403);
5958
+ if (response.status === 401) throw new HostApiError("unauthorized", t("board.hostError.unauthorized"), 401);
5959
+ const code = typeof record?.code === "string" ? record.code : void 0;
5960
+ if (code === "no-model") throw new HostApiError("rejected", t("new.aiParseNoModel"), response.status);
5961
+ if (code === "timeout") throw new HostApiError("timeout", t("new.aiParseTimeout", { seconds: String(TASK_PARSE_TIMEOUT_SECONDS) }), response.status);
5962
+ throw new HostApiError("rejected", t("new.aiParseFailed", { error: typeof record?.error === "string" && record.error !== "" ? record.error : String(response.status) }), response.status);
5963
+ }
5964
+ /**
5965
+ * Upload one attachment into the Host's attachment storage.
5966
+ *
5967
+ * The bytes travel as the raw request body: the Host measures the ACTUAL
5968
+ * stream, publishes the object and answers with the host-computed metadata
5969
+ * (size, type and digest) that the card will record.
5970
+ * @param file - the picked file.
5971
+ * @param kind - whether the file is stored as an image or verbatim.
5972
+ * @returns the metadata the Host computed for the stored object.
5973
+ */
5974
+ async uploadAttachment(file, kind) {
5975
+ const controller = new AbortController();
5976
+ const timer = globalThis.setTimeout(() => {
5977
+ controller.abort();
5978
+ }, UPLOAD_TIMEOUT_MS);
5979
+ try {
5980
+ const query = new URLSearchParams({
5981
+ kind,
5982
+ name: file.name,
5983
+ mediaType: file.type
5984
+ });
5985
+ const response = await fetch(`${CLIENT_API_PREFIX}/attachments/upload?${query.toString()}`, {
5986
+ method: "POST",
5987
+ headers: { "content-type": "application/octet-stream" },
5988
+ body: file,
5989
+ signal: controller.signal
5990
+ });
5991
+ const text = await response.text();
5992
+ let parsed;
5993
+ try {
5994
+ parsed = JSON.parse(text);
5995
+ } catch {
5996
+ parsed = void 0;
5997
+ }
5998
+ const record = parsed;
5999
+ if (response.ok) {
6000
+ if (record !== void 0 && isTaskAttachment(record.attachment)) return record.attachment;
6001
+ throw new HostApiError("unexpected", t("board.hostError.unexpected", { status: String(response.status) }), response.status);
6002
+ }
6003
+ throw new HostApiError("rejected", typeof record?.error === "string" && record.error !== "" ? record.error : String(response.status), response.status);
6004
+ } catch (error) {
6005
+ if (error instanceof HostApiError) throw error;
6006
+ if (controller.signal.aborted) throw new HostApiError("timeout", t("board.hostError.timeout", { seconds: String(UPLOAD_TIMEOUT_MS / 1e3) }));
6007
+ throw new HostApiError("unreachable", t("board.hostError.unreachable"));
6008
+ } finally {
6009
+ globalThis.clearTimeout(timer);
6010
+ }
6011
+ }
6012
+ subscribe(listener) {
6013
+ const events = new EventSource(`${CLIENT_API_PREFIX}/events`);
6014
+ let lastStreamErrorNotify = 0;
6015
+ events.onmessage = (message) => {
6016
+ try {
6017
+ const parsed = JSON.parse(message.data);
6018
+ if (parsed === null || typeof parsed !== "object" || typeof parsed.revision !== "number") throw new Error("invalid event frame");
6019
+ listener(parsed);
6020
+ } catch {
6021
+ listener();
6022
+ }
6023
+ };
6024
+ events.onopen = () => {
6025
+ listener();
6026
+ };
6027
+ events.onerror = () => {
6028
+ const now = Date.now();
6029
+ if (now - lastStreamErrorNotify < STREAM_ERROR_NOTIFY_MS) return;
6030
+ lastStreamErrorNotify = now;
6031
+ listener();
6032
+ };
6033
+ const onVisible = () => {
6034
+ if (document.visibilityState === "visible") listener();
6035
+ };
6036
+ document.addEventListener("visibilitychange", onVisible);
6037
+ return () => {
6038
+ document.removeEventListener("visibilitychange", onVisible);
6039
+ events.close();
6040
+ };
6041
+ }
6042
+ };
6043
+ //#endregion
6044
+ //#region src/client/board/AttachmentField.tsx
6045
+ /**
6046
+ * The attachment field of the create and edit forms.
6047
+ *
6048
+ * A file the user picks is STAGED locally first: the form shows a preview,
6049
+ * the name and the size, and nothing leaves the browser until the card is
6050
+ * saved. The upload therefore happens on save, not on selection — a card the
6051
+ * user abandons never leaves a stored object behind.
6052
+ *
6053
+ * Three input modes are supported: drag and drop, paste, and the file picker.
6054
+ * All three end in the same staged list.
6055
+ */
6056
+ /** The board's own limits, used when the deployment publishes none. */
6057
+ const DEFAULT_ATTACHMENT_LIMITS = {
6058
+ maxAttachments: 8,
6059
+ maxBytes: TASK_ATTACHMENT_MAX_BYTES,
6060
+ maxTotalBytes: TASK_ATTACHMENT_TOTAL_MAX_BYTES,
6061
+ maxImages: 8,
6062
+ maxImageBytes: TASK_ATTACHMENT_MAX_BYTES,
6063
+ maxMessageImageBytes: TASK_ATTACHMENT_TOTAL_MAX_BYTES
6064
+ };
6065
+ /** A human-readable byte size. */
6066
+ function formatAttachmentBytes(bytes) {
6067
+ if (bytes < 1024) return `${bytes} B`;
6068
+ if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KiB`;
6069
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MiB`;
6070
+ }
6071
+ /**
6072
+ * Whether a picked file is uploaded as an image.
6073
+ *
6074
+ * Only the raster types the official image path accepts are images; every
6075
+ * other file is stored verbatim.
6076
+ */
6077
+ function attachmentKindOf(file) {
6078
+ const type = file.type.toLowerCase();
6079
+ return TASK_ATTACHMENT_IMAGE_MEDIA_TYPES.includes(type) ? "image" : "file";
6080
+ }
6081
+ /** The byte total of a selection: the stored attachments plus the staged files. */
6082
+ function totalBytesOf(selection) {
6083
+ return selection.persisted.reduce((sum, attachment) => sum + attachment.bytes, 0) + selection.staged.reduce((sum, staged) => sum + staged.bytes, 0);
6084
+ }
6085
+ /** The byte total of the IMAGES of a selection. */
6086
+ function imageBytesOf(selection) {
6087
+ return selection.persisted.filter((attachment) => attachment.kind === "image").reduce((sum, attachment) => sum + attachment.bytes, 0) + selection.staged.filter((staged) => staged.kind === "image").reduce((sum, staged) => sum + staged.bytes, 0);
6088
+ }
6089
+ /** The number of IMAGES of a selection. */
6090
+ function imageCountOf(selection) {
6091
+ return selection.persisted.filter((attachment) => attachment.kind === "image").length + selection.staged.filter((staged) => staged.kind === "image").length;
6092
+ }
6093
+ /**
6094
+ * The staged files the form already holds.
6095
+ *
6096
+ * The identity is the File OBJECT, never its metadata: two different files can
6097
+ * share a name, a size, a type and a modification time, and inferring byte
6098
+ * identity from those four would silently discard one of them. The form
6099
+ * therefore stages every distinct File it is handed.
6100
+ *
6101
+ * The content identity that actually matters — the storage identifier the Host
6102
+ * answers with — is applied AFTER the upload, where it is authoritative
6103
+ * (see the core dedupe). The only case the form skips is the very same File
6104
+ * object handed over twice, which is the same row twice.
6105
+ */
6106
+ function stagedFileSet(staged) {
6107
+ return new Set(staged.map((entry) => entry.file));
6108
+ }
6109
+ /**
6110
+ * The attachment field of a card form.
6111
+ *
6112
+ * The component owns the local staging only: the selection it reports is what
6113
+ * the card will carry, and the parent uploads the staged files on save.
6114
+ */
6115
+ function AttachmentField({ selection, onChange, limits, disabled = false, onError }) {
6116
+ const effective = limits ?? DEFAULT_ATTACHMENT_LIMITS;
6117
+ const inputRef = (0, react.useRef)(null);
6118
+ const objectUrls = (0, react.useRef)([]);
6119
+ const counter = (0, react.useRef)(0);
6120
+ const [dragging, setDragging] = (0, react.useState)(false);
6121
+ (0, react.useEffect)(() => () => {
6122
+ for (const url of objectUrls.current) URL.revokeObjectURL(url);
6123
+ objectUrls.current = [];
6124
+ }, []);
6125
+ const addFiles = (files) => {
6126
+ if (disabled || files.length === 0) return;
6127
+ const staged = [...selection.staged];
6128
+ const seen = stagedFileSet(staged);
6129
+ let total = totalBytesOf(selection);
6130
+ let imageBytes = imageBytesOf(selection);
6131
+ let imageCount = imageCountOf(selection);
6132
+ let added = 0;
6133
+ for (const file of files) {
6134
+ if (seen.has(file)) continue;
6135
+ if (selection.persisted.length + staged.length >= effective.maxAttachments) {
6136
+ onError?.(t("new.attachments.limitCount", { count: String(effective.maxAttachments) }));
6137
+ break;
6138
+ }
6139
+ const kind = attachmentKindOf(file);
6140
+ const limit = kind === "image" ? Math.min(effective.maxBytes, effective.maxImageBytes ?? effective.maxBytes) : effective.maxBytes;
6141
+ if (file.size > limit) {
6142
+ onError?.(t("new.attachments.limitSize", {
6143
+ name: file.name,
6144
+ size: formatAttachmentBytes(limit)
6145
+ }));
6146
+ continue;
6147
+ }
6148
+ if (total + file.size > effective.maxTotalBytes) {
6149
+ onError?.(t("new.attachments.limitTotal", { size: formatAttachmentBytes(effective.maxTotalBytes) }));
6150
+ break;
6151
+ }
6152
+ if (kind === "image") {
6153
+ if (imageCount + 1 > effective.maxImages) {
6154
+ onError?.(t("new.attachments.limitImages", { count: String(effective.maxImages) }));
6155
+ break;
6156
+ }
6157
+ if (imageBytes + file.size > effective.maxMessageImageBytes) {
6158
+ onError?.(t("new.attachments.limitImageBytes", { size: formatAttachmentBytes(effective.maxMessageImageBytes) }));
6159
+ break;
6160
+ }
6161
+ }
6162
+ const previewUrl = kind === "image" && typeof URL.createObjectURL === "function" ? URL.createObjectURL(file) : void 0;
6163
+ if (previewUrl !== void 0) objectUrls.current.push(previewUrl);
6164
+ counter.current += 1;
6165
+ seen.add(file);
6166
+ staged.push({
6167
+ id: `staged-${counter.current}`,
6168
+ file,
6169
+ kind,
6170
+ name: file.name,
6171
+ bytes: file.size,
6172
+ mediaType: file.type,
6173
+ ...previewUrl === void 0 ? {} : { previewUrl }
6174
+ });
6175
+ total += file.size;
6176
+ if (kind === "image") {
6177
+ imageBytes += file.size;
6178
+ imageCount += 1;
6179
+ }
6180
+ added += 1;
6181
+ }
6182
+ if (added > 0) onChange({
6183
+ ...selection,
6184
+ staged
6185
+ });
6186
+ };
6187
+ const removeStaged = (id) => {
6188
+ const target = selection.staged.find((staged) => staged.id === id);
6189
+ if (target?.previewUrl !== void 0) {
6190
+ URL.revokeObjectURL(target.previewUrl);
6191
+ objectUrls.current = objectUrls.current.filter((url) => url !== target.previewUrl);
6192
+ }
6193
+ onChange({
6194
+ ...selection,
6195
+ staged: selection.staged.filter((staged) => staged.id !== id)
6196
+ });
6197
+ };
6198
+ const removePersisted = (attachmentId) => {
6199
+ onChange({
6200
+ ...selection,
6201
+ persisted: selection.persisted.filter((attachment) => attachment.attachmentId !== attachmentId)
6202
+ });
6203
+ };
6204
+ const rows = [...selection.persisted.map((attachment) => ({
6205
+ key: attachment.attachmentId,
6206
+ attachment
6207
+ })), ...selection.staged.map((staged) => ({
6208
+ key: staged.id,
6209
+ staged
6210
+ }))];
6211
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6212
+ className: board_module_css_default.field,
6213
+ "data-dsh-part": "form-section",
6214
+ children: [
6215
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
6216
+ className: board_module_css_default.fieldLabel,
6217
+ children: t("new.attachments")
6218
+ }),
6219
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
6220
+ className: board_module_css_default.fieldHint,
6221
+ children: t("new.attachmentsHint")
6222
+ }),
6223
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6224
+ className: board_module_css_default.attachmentDrop,
6225
+ "data-state": dragging && !disabled ? "active" : void 0,
6226
+ "data-disabled": disabled ? "true" : void 0,
6227
+ tabIndex: disabled ? -1 : 0,
6228
+ "aria-disabled": disabled ? true : void 0,
6229
+ "aria-label": t("new.attachments.drop"),
6230
+ onKeyDown: (event) => {
6231
+ if (disabled) return;
6232
+ if (event.target !== event.currentTarget) return;
6233
+ if (event.key !== "Enter" && event.key !== " ") return;
6234
+ event.preventDefault();
6235
+ inputRef.current?.click();
6236
+ },
6237
+ onDragOver: (event) => {
6238
+ event.preventDefault();
6239
+ if (disabled) return;
6240
+ setDragging(true);
6241
+ },
6242
+ onDragLeave: () => {
6243
+ if (!disabled) setDragging(false);
6244
+ },
6245
+ onDrop: (event) => {
6246
+ event.preventDefault();
6247
+ setDragging(false);
6248
+ addFiles(Array.from(event.dataTransfer?.files ?? []));
6249
+ },
6250
+ onPaste: (event) => {
6251
+ const files = Array.from(event.clipboardData?.files ?? []);
6252
+ if (files.length === 0) return;
6253
+ event.preventDefault();
6254
+ addFiles(files);
6255
+ },
6256
+ children: [
6257
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
6258
+ className: board_module_css_default.attachmentDropHint,
6259
+ children: t("new.attachments.drop")
6260
+ }),
6261
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
6262
+ ref: inputRef,
6263
+ type: "file",
6264
+ multiple: true,
6265
+ hidden: true,
6266
+ disabled,
6267
+ onChange: (event) => {
6268
+ addFiles(Array.from(event.target.files ?? []));
6269
+ event.target.value = "";
6270
+ }
6271
+ }),
6272
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
6273
+ type: "button",
6274
+ className: board_module_css_default.ghostButton,
6275
+ disabled,
6276
+ onClick: () => {
6277
+ if (disabled) return;
6278
+ inputRef.current?.click();
6279
+ },
6280
+ children: t("new.attachments.pick")
6281
+ })
6282
+ ]
6283
+ }),
6284
+ rows.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
6285
+ className: board_module_css_default.attachmentList,
6286
+ children: rows.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
6287
+ className: board_module_css_default.attachmentRow,
6288
+ children: [
6289
+ row.attachment !== void 0 && row.attachment.kind === "image" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
6290
+ className: board_module_css_default.attachmentThumb,
6291
+ src: attachmentImageUrl(row.attachment.attachmentId),
6292
+ alt: row.attachment.name
6293
+ }) : null,
6294
+ row.staged !== void 0 && row.staged.kind === "image" && row.staged.previewUrl !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
6295
+ className: board_module_css_default.attachmentThumb,
6296
+ src: row.staged.previewUrl,
6297
+ alt: row.staged.name
6298
+ }) : null,
6299
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
6300
+ className: board_module_css_default.attachmentName,
6301
+ children: [row.attachment?.name ?? row.staged?.name, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
6302
+ className: board_module_css_default.attachmentMeta,
6303
+ children: [
6304
+ " ",
6305
+ formatAttachmentBytes(row.attachment?.bytes ?? row.staged?.bytes ?? 0),
6306
+ row.staged?.pending === true ? ` · ${t("new.attachments.uploading")}` : "",
6307
+ row.staged?.error !== void 0 ? ` · ${row.staged.error}` : ""
6308
+ ]
6309
+ })]
6310
+ }),
6311
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
6312
+ type: "button",
6313
+ className: board_module_css_default.iconButton,
6314
+ disabled,
6315
+ "aria-label": t("new.attachments.remove", { name: row.attachment?.name ?? row.staged?.name ?? "" }),
6316
+ onClick: () => {
6317
+ if (row.attachment !== void 0) removePersisted(row.attachment.attachmentId);
6318
+ else if (row.staged !== void 0) removeStaged(row.staged.id);
6319
+ },
6320
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconClose, { size: 14 })
6321
+ })
6322
+ ]
6323
+ }, row.key))
6324
+ })
6325
+ ]
6326
+ });
6327
+ }
6328
+ //#endregion
6329
+ //#region src/client/seats.tsx
6330
+ /**
6331
+ * The board's child seats, threaded from the slot registration that declares
6332
+ * them down to the components that consume them.
6333
+ *
6334
+ * The framework hands the declaring component a `renderSlot` binding; the board
6335
+ * wraps that binding in a React context so a provider's contribution can render
6336
+ * deep inside TaskDetail, the card, or the settings card without those
6337
+ * components knowing which providers exist.
6338
+ *
6339
+ * @module dsh-task-board/client/seats
6340
+ */
6341
+ /** Nothing registered: every seat renders empty. */
6342
+ const EMPTY_TASK_BOARD_SEATS = {
6343
+ detailSection: () => null,
6344
+ settingsSection: () => null,
6345
+ cardDecoration: () => null
6346
+ };
6347
+ /** Adapt one framework renderSlot binding to the board's seat interface. */
6348
+ function seatsFromRenderSlot(renderSlot) {
6349
+ if (renderSlot === void 0) return EMPTY_TASK_BOARD_SEATS;
6350
+ return {
6351
+ detailSection: (props) => renderSlot(TASK_BOARD_DETAIL_SECTION, props),
6352
+ settingsSection: (props) => renderSlot(TASK_BOARD_SETTINGS_SECTION, props),
6353
+ cardDecoration: (props) => renderSlot(TASK_BOARD_CARD_DECORATION, props)
6354
+ };
6355
+ }
6356
+ const TaskBoardSeatsContext = (0, react.createContext)(EMPTY_TASK_BOARD_SEATS);
6357
+ /** Provider the board's registered components wrap their subtree in. */
6358
+ const TaskBoardSeatsProvider = TaskBoardSeatsContext.Provider;
6359
+ /** Read the current seat set (empty when no board registration is above). */
6360
+ function useTaskBoardSeats() {
6361
+ return (0, react.useContext)(TaskBoardSeatsContext);
6362
+ }
6363
+ //#endregion
6364
+ //#region src/client/board/card-view.ts
6365
+ /**
6366
+ * Card view model: the pure derivations a task card renders from its record.
6367
+ *
6368
+ * Everything here is a function of the task record (plus the clock and the
6369
+ * Host time zone for the recency groups), so the card stays a thin renderer and
6370
+ * every rule is unit-testable without mounting React. Nothing here writes the
6371
+ * record: the type prefix, the tone and the time label are presentation only.
6372
+ *
6373
+ * @module @linxin666/dsh-client-ui-task-board/client/board/card-view
6374
+ */
6375
+ /** `[Bug]:` / `[Issue]` / a bracketed CJK word, at most 24 characters, optional colon. */
6376
+ const KIND_PREFIX = /^\[([^[\]\n]{1,24})\]\s*[:\uFF1A]?\s*/;
6377
+ /**
6378
+ * Split an issue-form style type prefix off a title. The prefix becomes a
6379
+ * badge, so the clamped title lines carry the text the reader scans for. A
6380
+ * title that is only a prefix keeps its full text.
6381
+ * @param summary - the plain-text title.
6382
+ * @returns the prefix (when present) and the remaining title text.
6383
+ */
6384
+ function splitTitleKind(summary) {
6385
+ const match = KIND_PREFIX.exec(summary);
6386
+ if (match === null) return { text: summary };
6387
+ const kind = (match[1] ?? "").trim();
6388
+ const text = summary.slice(match[0].length).trim();
6389
+ if (kind === "" || text === "") return { text: summary };
6390
+ return {
6391
+ kind,
6392
+ text
6393
+ };
6394
+ }
6395
+ /**
6396
+ * Derive the card's execution outcome.
6397
+ * @param task - the task record.
6398
+ * @param archived - whether the card renders in the archive view.
6399
+ */
6400
+ function cardOutcome(task, archived) {
6401
+ const latest = task.executions[task.executions.length - 1];
6402
+ if (latest === void 0) return { declared: false };
6403
+ if (hasOpenExecution(task)) return archived ? {
6404
+ latest,
6405
+ declared: false
6406
+ } : {
6407
+ tone: "running",
6408
+ latest,
6409
+ declared: false
6410
+ };
6411
+ const result = latest.result;
6412
+ if (archived || result === void 0) return {
6413
+ latest,
6414
+ declared: false
6415
+ };
6416
+ return {
6417
+ tone: result,
6418
+ latest,
6419
+ declared: task.status === "done" && result !== "succeeded" || task.status === "failed" && result === "succeeded"
6420
+ };
6421
+ }
6422
+ /** Locale key of the latest settled result shown before the run count. */
6423
+ const RESULT_KEY = {
6424
+ succeeded: "card.result.succeeded",
6425
+ failed: "card.result.failed",
6426
+ cancelled: "card.result.cancelled"
6427
+ };
6428
+ /**
6429
+ * Pick the time that tells cards in the same column apart. `updatedAt` moves
6430
+ * on every provider sync, so a column of synced cards would all read
6431
+ * "updated 4m"; each column instead shows the instant its cards differ by:
6432
+ * planning columns the creation time, an executing card its start, settled
5441
6433
  * columns the latest run's settlement, the archive the archive time.
5442
6434
  * @param task - the task record.
5443
6435
  * @param archived - whether the card renders in the archive view.
@@ -7980,6 +8972,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
7980
8972
  * New-task modal: title + description + the prompt that execution will send.
7981
8973
  * Creates through the Host and closes only after the Host confirms it.
7982
8974
  */
8975
+ /**
8976
+ * Mark one staged attachment row: the upload state and the failure reason.
8977
+ */
8978
+ function markStaged$1(selection, id, patch) {
8979
+ return {
8980
+ ...selection,
8981
+ staged: selection.staged.map((staged) => staged.id === id ? {
8982
+ ...staged,
8983
+ ...patch
8984
+ } : staged)
8985
+ };
8986
+ }
7983
8987
  /** New-task form overlay. */
7984
8988
  function NewTaskModal({ controller, onClose, initialTask, defaultWorkspaceId, onDuplicateSuccess, parentTask, phase }) {
7985
8989
  const isDuplicate = initialTask !== void 0;
@@ -8017,6 +9021,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8017
9021
  const [freezeError, setFreezeError] = (0, react.useState)(void 0);
8018
9022
  const [handoverText, setHandoverText] = (0, react.useState)(initialTask?.handover?.references !== void 0 ? initialTask.handover.references.join("\n") : "");
8019
9023
  const [tags, setTags] = (0, react.useState)(initialTask?.tags ?? []);
9024
+ const [attachments, setAttachments] = (0, react.useState)({
9025
+ persisted: initialTask?.attachments ?? [],
9026
+ staged: []
9027
+ });
9028
+ const [attachmentError, setAttachmentError] = (0, react.useState)(void 0);
8020
9029
  const [archiveOriginal, setArchiveOriginal] = (0, react.useState)(true);
8021
9030
  const [error, setError] = (0, react.useState)(void 0);
8022
9031
  const [pending, setPending] = (0, react.useState)(false);
@@ -8116,6 +9125,27 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8116
9125
  };
8117
9126
  const tagList = cleanTags(tags);
8118
9127
  setPending(true);
9128
+ const uploaded = [];
9129
+ for (const staged of attachments.staged) {
9130
+ setAttachments((current) => markStaged$1(current, staged.id, {
9131
+ pending: true,
9132
+ error: void 0
9133
+ }));
9134
+ try {
9135
+ const attachment = await controller.uploadAttachment(staged.file, staged.kind);
9136
+ if (attachment === void 0) throw new Error(t("new.attachments.unavailable"));
9137
+ uploaded.push(attachment);
9138
+ } catch (uploadError) {
9139
+ const message = uploadError instanceof Error ? uploadError.message : String(uploadError);
9140
+ setAttachments((current) => markStaged$1(current, staged.id, {
9141
+ pending: false,
9142
+ error: message
9143
+ }));
9144
+ setPending(false);
9145
+ setError(message);
9146
+ return;
9147
+ }
9148
+ }
8119
9149
  const task = await controller.createTaskConfirmed({
8120
9150
  title,
8121
9151
  description,
@@ -8132,6 +9162,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8132
9162
  ...goalRun ? { goalRun: true } : {},
8133
9163
  ...skipVerification ? { skipVerification: true } : {},
8134
9164
  ...tagList.length > 0 ? { tags: tagList } : {},
9165
+ ...attachments.persisted.length + uploaded.length > 0 ? { attachments: dedupeAttachments([...attachments.persisted, ...uploaded]) } : {},
8135
9166
  schedule: scheduleEnabled ? scheduleMode === "once" ? {
8136
9167
  enabled: true,
8137
9168
  mode: "once",
@@ -8167,7 +9198,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8167
9198
  const modeLabel = mode === "" ? inheritLabel : selectedPreset === void 0 ? mode : presetLabel(selectedPreset);
8168
9199
  const workspaceLabel = workspaceId === "" ? t("exec.workspace.recent") : options.workspaces.find((item) => item.workspaceId === workspaceId)?.title ?? workspaceId;
8169
9200
  const permissionLabel = permission === "" ? inheritedPermission === void 0 ? t("exec.permission.default") : t("exec.permission.inheritParent", { permission: t(`exec.permission.${inheritedPermission}`) }) : t(`exec.permission.${permission}`);
8170
- const modelLabel = model === "" ? t("exec.model.default") : (options.models ?? []).find((item) => item.id === model)?.name ?? model;
9201
+ const modelLabel = model === "" ? t("exec.model.default") : modelDisplayLabel(models.find((item) => item.id === model) ?? { id: model });
8171
9202
  const modelSummary = reasoningEffort === "" ? modelLabel : `${modelLabel} · ${reasoningEffort}`;
8172
9203
  const executionSummary = [
8173
9204
  workspaceLabel,
@@ -8175,6 +9206,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8175
9206
  permissionLabel,
8176
9207
  ...model === "" ? [] : [modelSummary]
8177
9208
  ].join(" · ");
9209
+ const attachmentCount = attachments.persisted.length + attachments.staged.length;
9210
+ const attachmentSummary = attachmentCount === 0 ? t("new.summary.none") : t("new.summary.attachmentCount", { count: String(attachmentCount) });
8178
9211
  const tagCount = cleanTags(tags).length;
8179
9212
  const labelsSummary = tagCount === 0 ? t("new.summary.none") : t("new.summary.labelCount", { count: String(tagCount) });
8180
9213
  const runSummary = [goalRun && goalRunEnabled ? t("new.summary.multiRound") : t("new.summary.singleRound"), ...reuseSession ? [t("exec.reuseSession")] : []].join(" · ");
@@ -8241,7 +9274,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8241
9274
  children: t("exec.model.default")
8242
9275
  }), models.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
8243
9276
  value: option.id,
8244
- children: option.name ?? option.id
9277
+ children: modelDisplayLabel(option)
8245
9278
  }, option.id))]
8246
9279
  }), parsePending ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
8247
9280
  type: "button",
@@ -8311,6 +9344,23 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8311
9344
  onChange: setTags
8312
9345
  })
8313
9346
  }),
9347
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CollapsibleSection, {
9348
+ title: t("new.section.attachments"),
9349
+ summary: attachmentSummary,
9350
+ forceOpen: attachmentError !== void 0,
9351
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AttachmentField, {
9352
+ selection: attachments,
9353
+ onChange: setAttachments,
9354
+ limits: controller.getSnapshot().host?.attachmentLimits,
9355
+ disabled: pending,
9356
+ onError: (message) => {
9357
+ setAttachmentError(message);
9358
+ }
9359
+ }), attachmentError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
9360
+ className: board_module_css_default.formError,
9361
+ children: attachmentError
9362
+ })]
9363
+ }),
8314
9364
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CollapsibleSection, {
8315
9365
  title: t("new.section.execution"),
8316
9366
  summary: executionSummary,
@@ -8425,7 +9475,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8425
9475
  }),
8426
9476
  models.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
8427
9477
  value: item.id,
8428
- children: item.name ?? item.id
9478
+ children: modelDisplayLabel(item)
8429
9479
  }, item.id))
8430
9480
  ]
8431
9481
  })]
@@ -9132,6 +10182,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9132
10182
  const [description, setDescription] = (0, react.useState)(task.description);
9133
10183
  const [prompt, setPrompt] = (0, react.useState)(task.prompt);
9134
10184
  const [tags, setTags] = (0, react.useState)(task.tags ?? []);
10185
+ const [attachments, setAttachments] = (0, react.useState)({
10186
+ persisted: task.attachments ?? [],
10187
+ staged: []
10188
+ });
10189
+ const [attachmentError, setAttachmentError] = (0, react.useState)(void 0);
9135
10190
  const [error, setError] = (0, react.useState)(void 0);
9136
10191
  const [pending, setPending] = (0, react.useState)(false);
9137
10192
  const submit = async () => {
@@ -9141,11 +10196,36 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9141
10196
  }
9142
10197
  setPending(true);
9143
10198
  const tagList = cleanTags(tags);
10199
+ const uploaded = [];
10200
+ for (const staged of attachments.staged) {
10201
+ setAttachments((current) => markStaged(current, staged.id, {
10202
+ pending: true,
10203
+ error: void 0
10204
+ }));
10205
+ try {
10206
+ const attachment = await controller.uploadAttachment(staged.file, staged.kind);
10207
+ if (attachment === void 0) throw new Error(t("new.attachments.unavailable"));
10208
+ uploaded.push(attachment);
10209
+ } catch (uploadError) {
10210
+ const message = uploadError instanceof Error ? uploadError.message : String(uploadError);
10211
+ setAttachments((current) => markStaged(current, staged.id, {
10212
+ pending: false,
10213
+ error: message
10214
+ }));
10215
+ setPending(false);
10216
+ setError(message);
10217
+ return;
10218
+ }
10219
+ }
10220
+ const carried = dedupeAttachments([...attachments.persisted, ...uploaded]);
10221
+ const current = task.attachments ?? [];
10222
+ const unchanged = current.length === carried.length && current.every((attachment, index) => attachment.attachmentId === carried[index]?.attachmentId);
9144
10223
  const patch = {
9145
10224
  title,
9146
10225
  description,
9147
10226
  prompt,
9148
- ...tagList.length > 0 ? { tags: tagList } : task.tags === void 0 ? {} : { tags: null }
10227
+ ...tagList.length > 0 ? { tags: tagList } : task.tags === void 0 ? {} : { tags: null },
10228
+ ...unchanged ? {} : carried.length > 0 ? { attachments: carried } : { attachments: null }
9149
10229
  };
9150
10230
  if (await controller.updateTask(task.id, patch)) {
9151
10231
  onClose();
@@ -9165,23 +10245,51 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9165
10245
  },
9166
10246
  onClose,
9167
10247
  phase,
9168
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskContentFields, {
9169
- title,
9170
- description,
9171
- prompt,
9172
- onTitleChange: (value) => {
9173
- setTitle(value);
9174
- setError(void 0);
9175
- },
9176
- onDescriptionChange: setDescription,
9177
- onPromptChange: setPrompt
9178
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskTagFields, {
9179
- tags,
9180
- knownTags: collectKnownTags(controller.getSnapshot().tasks),
9181
- onChange: setTags
9182
- })]
10248
+ children: [
10249
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskContentFields, {
10250
+ title,
10251
+ description,
10252
+ prompt,
10253
+ onTitleChange: (value) => {
10254
+ setTitle(value);
10255
+ setError(void 0);
10256
+ },
10257
+ onDescriptionChange: setDescription,
10258
+ onPromptChange: setPrompt
10259
+ }),
10260
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskTagFields, {
10261
+ tags,
10262
+ knownTags: collectKnownTags(controller.getSnapshot().tasks),
10263
+ onChange: setTags
10264
+ }),
10265
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AttachmentField, {
10266
+ selection: attachments,
10267
+ onChange: setAttachments,
10268
+ limits: controller.getSnapshot().host?.attachmentLimits,
10269
+ disabled: pending,
10270
+ onError: (message) => {
10271
+ setAttachmentError(message);
10272
+ }
10273
+ }),
10274
+ attachmentError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
10275
+ className: board_module_css_default.formError,
10276
+ children: attachmentError
10277
+ })
10278
+ ]
9183
10279
  });
9184
10280
  }
10281
+ /**
10282
+ * Mark one staged attachment row: the upload state and the failure reason.
10283
+ */
10284
+ function markStaged(selection, id, patch) {
10285
+ return {
10286
+ ...selection,
10287
+ staged: selection.staged.map((staged) => staged.id === id ? {
10288
+ ...staged,
10289
+ ...patch
10290
+ } : staged)
10291
+ };
10292
+ }
9185
10293
  /** Edit-tags modal: edit labels only, shown for tasks after first execution. */
9186
10294
  function EditTagsModal({ controller, task, onClose, phase }) {
9187
10295
  const [tags, setTags] = (0, react.useState)(task.tags ?? []);
@@ -10114,7 +11222,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10114
11222
  }),
10115
11223
  models.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
10116
11224
  value: item.id,
10117
- children: item.name ?? item.id
11225
+ children: modelDisplayLabel(item)
10118
11226
  }, item.id))
10119
11227
  ]
10120
11228
  })]
@@ -10865,6 +11973,37 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10865
11973
  }, tag.name))
10866
11974
  })]
10867
11975
  }),
11976
+ current.attachments !== void 0 && current.attachments.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
11977
+ className: board_module_css_default.detailSection,
11978
+ children: [
11979
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", { children: t("detail.attachments") }),
11980
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
11981
+ className: board_module_css_default.attachmentList,
11982
+ children: current.attachments.map((attachment) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
11983
+ className: board_module_css_default.attachmentRow,
11984
+ children: [attachment.kind === "image" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
11985
+ className: board_module_css_default.attachmentThumb,
11986
+ src: attachmentImageUrl(attachment.attachmentId),
11987
+ alt: attachment.name
11988
+ }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
11989
+ className: board_module_css_default.attachmentName,
11990
+ children: [attachment.name, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
11991
+ className: board_module_css_default.attachmentMeta,
11992
+ children: [
11993
+ " ",
11994
+ formatAttachmentBytes(attachment.bytes),
11995
+ attachment.kind === "image" && attachment.width !== void 0 && attachment.height !== void 0 ? ` · ${attachment.width}×${attachment.height}` : ""
11996
+ ]
11997
+ })]
11998
+ })]
11999
+ }, attachment.attachmentId))
12000
+ }),
12001
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
12002
+ className: board_module_css_default.detailMeta,
12003
+ children: t("detail.attachments.removeHint")
12004
+ })
12005
+ ]
12006
+ }),
10868
12007
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SubtaskSection, {
10869
12008
  controller,
10870
12009
  task: current,
@@ -11141,6 +12280,78 @@ Please report this to https://github.com/markedjs/marked.`, e) {
11141
12280
  ]
11142
12281
  });
11143
12282
  }
12283
+ /** Browser storage key for explicit source-fold overrides. */
12284
+ const SOURCE_GROUP_FOLDS_KEY = "dsh.taskBoard.sourceGroupFolds.v1";
12285
+ function compareText(left, right) {
12286
+ const a = left.toLowerCase();
12287
+ const b = right.toLowerCase();
12288
+ if (a < b) return -1;
12289
+ if (a > b) return 1;
12290
+ return left < right ? -1 : left > right ? 1 : 0;
12291
+ }
12292
+ /** Group cards in their incoming order, then sort provider groups by full label. */
12293
+ function groupTasksBySource(tasks, selectors) {
12294
+ const groups = /* @__PURE__ */ new Map();
12295
+ for (const task of tasks) {
12296
+ let source;
12297
+ for (const selector of selectors) try {
12298
+ const candidate = selector(task);
12299
+ if (candidate === void 0) continue;
12300
+ const id = candidate.id.trim();
12301
+ const label = candidate.label.trim();
12302
+ if (id === "" || label === "") continue;
12303
+ source = {
12304
+ id,
12305
+ label
12306
+ };
12307
+ break;
12308
+ } catch {}
12309
+ const group = source ?? {
12310
+ id: "local",
12311
+ label: ""
12312
+ };
12313
+ const bucket = groups.get(group.id) ?? {
12314
+ ...group,
12315
+ items: [],
12316
+ local: source === void 0
12317
+ };
12318
+ bucket.items.push(task);
12319
+ groups.set(group.id, bucket);
12320
+ }
12321
+ return [...groups.values()].sort((left, right) => {
12322
+ if (left.local !== right.local) return left.local ? 1 : -1;
12323
+ return compareText(left.label, right.label) || compareText(left.id, right.id);
12324
+ });
12325
+ }
12326
+ /** Compound key keeps a fold choice scoped to one column/view and one source. */
12327
+ function sourceGroupFoldKey(view, sourceId) {
12328
+ return `${view}:${sourceId}`;
12329
+ }
12330
+ /** Read explicit overrides; malformed or unavailable storage falls back to defaults. */
12331
+ function readSourceGroupFolds(storage) {
12332
+ try {
12333
+ const raw = storage?.getItem(SOURCE_GROUP_FOLDS_KEY);
12334
+ if (raw === null || raw === void 0) return {};
12335
+ const parsed = JSON.parse(raw);
12336
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return {};
12337
+ const result = Object.create(null);
12338
+ for (const [key, value] of Object.entries(parsed)) if (key !== "" && typeof value === "boolean") result[key] = value;
12339
+ return result;
12340
+ } catch {
12341
+ return {};
12342
+ }
12343
+ }
12344
+ /** Persist overrides; a storage failure only loses the preference. */
12345
+ function writeSourceGroupFolds(storage, folds) {
12346
+ try {
12347
+ storage?.setItem(SOURCE_GROUP_FOLDS_KEY, JSON.stringify(folds));
12348
+ } catch {}
12349
+ }
12350
+ /** Search always reveals matches; otherwise an override beats the column default. */
12351
+ function isSourceGroupFolded(folds, view, sourceId, searchActive) {
12352
+ if (searchActive) return false;
12353
+ return folds[sourceGroupFoldKey(view, sourceId)] ?? view === "done";
12354
+ }
11144
12355
  /**
11145
12356
  * Collect every string leaf of an opaque extension payload. The board does not
11146
12357
  * interpret provider data, but a provider's identifiers and labels should stay
@@ -11232,6 +12443,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
11232
12443
  const [tagFilter, setTagFilter] = (0, react.useState)([]);
11233
12444
  const [hideSubtasks, setHideSubtasks] = (0, react.useState)(true);
11234
12445
  const [compactColumns, setCompactColumns] = (0, react.useState)(() => readCompactColumns(globalThis.localStorage));
12446
+ const [sourceFolds, setSourceFolds] = (0, react.useState)(() => readSourceGroupFolds(globalThis.localStorage));
11235
12447
  const [unfolded, setUnfolded] = (0, react.useState)([]);
11236
12448
  const [showNew, setShowNew] = (0, react.useState)(false);
11237
12449
  const [showTagManager, setShowTagManager] = (0, react.useState)(false);
@@ -11325,15 +12537,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
11325
12537
  subtasksFailed: subtaskRollup.get(task.id)?.failed ?? 0
11326
12538
  }, task.id);
11327
12539
  /**
11328
- * Settled cards in recency groups, newest first. A column longer than the
11329
- * fold threshold folds its oldest group behind a disclosure, so a column of
11330
- * a hundred finished issues opens on what happened lately; a text or label
11331
- * search never folds, because a match hidden behind a fold reads as no match.
12540
+ * Recency groups nested inside one source group. The fold key includes the
12541
+ * source, so expanding one repository's earlier cards opens no other group's.
11332
12542
  */
11333
- const renderGrouped = (columnKey, tasks, compact, archived) => {
12543
+ const renderRecencyGroups = (foldScope, tasks, compact, archived) => {
11334
12544
  const buckets = groupByRecency(tasks, (task) => cardTimeline(task, archived).at, now, timeZone);
11335
12545
  const foldable = !searchActive && tasks.length > 30 && buckets.length > 1;
11336
- const open = unfolded.includes(columnKey);
12546
+ const open = unfolded.includes(foldScope);
11337
12547
  return buckets.map((bucket) => {
11338
12548
  const folded = foldable && bucket.group === buckets[buckets.length - 1].group && !open;
11339
12549
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -11354,7 +12564,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
11354
12564
  "data-dsh-part": "card-group-toggle",
11355
12565
  "aria-expanded": !folded,
11356
12566
  onClick: () => {
11357
- setUnfolded((current) => current.includes(columnKey) ? current.filter((entry) => entry !== columnKey) : [...current, columnKey]);
12567
+ setUnfolded((current) => current.includes(foldScope) ? current.filter((entry) => entry !== foldScope) : [...current, foldScope]);
11358
12568
  },
11359
12569
  children: folded ? t("board.group.expand", { count: String(bucket.items.length) }) : t("board.group.collapse")
11360
12570
  })
@@ -11363,6 +12573,50 @@ Please report this to https://github.com/markedjs/marked.`, e) {
11363
12573
  }, bucket.group);
11364
12574
  });
11365
12575
  };
12576
+ /** Every column and the archive first split by provider-owned source. */
12577
+ const renderSourceGroups = (view, tasks, compact, archived) => {
12578
+ const recency = archived || GROUPED_COLUMNS.includes(view);
12579
+ return groupTasksBySource(tasks, snapshot.grouping ?? []).map((bucket) => {
12580
+ const foldKey = sourceGroupFoldKey(view, bucket.id);
12581
+ const folded = isSourceGroupFolded(sourceFolds, view, bucket.id, searchActive);
12582
+ const label = bucket.local ? t("board.source.local") : bucket.label;
12583
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
12584
+ className: `${board_module_css_default.cardGroup} ${board_module_css_default.sourceGroup}`,
12585
+ "data-dsh-part": "card-group",
12586
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
12587
+ className: `${board_module_css_default.cardGroupHeader} ${board_module_css_default.sourceGroupHeader}`,
12588
+ children: [
12589
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12590
+ className: board_module_css_default.sourceGroupLabel,
12591
+ children: label
12592
+ }),
12593
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12594
+ className: board_module_css_default.cardGroupCount,
12595
+ children: bucket.items.length
12596
+ }),
12597
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
12598
+ type: "button",
12599
+ className: board_module_css_default.linkButton,
12600
+ "data-dsh-part": "card-group-toggle",
12601
+ "aria-expanded": !folded,
12602
+ disabled: searchActive,
12603
+ onClick: () => {
12604
+ setSourceFolds((current) => {
12605
+ const next = {
12606
+ ...current,
12607
+ [foldKey]: !isSourceGroupFolded(current, view, bucket.id, false)
12608
+ };
12609
+ writeSourceGroupFolds(globalThis.localStorage, next);
12610
+ return next;
12611
+ });
12612
+ },
12613
+ children: folded ? t("board.group.expand", { count: String(bucket.items.length) }) : t("board.group.collapse")
12614
+ })
12615
+ ]
12616
+ }), !folded && (recency ? renderRecencyGroups(foldKey, bucket.items, compact, archived) : bucket.items.map((task) => renderCard(task, compact)))]
12617
+ }, bucket.id);
12618
+ });
12619
+ };
11366
12620
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
11367
12621
  className: board_module_css_default.board,
11368
12622
  "data-dsh-taskboard-board": "",
@@ -11595,7 +12849,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
11595
12849
  })]
11596
12850
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
11597
12851
  className: board_module_css_default.cards,
11598
- children: [renderGrouped(ARCHIVE_COLUMN, visible, false, true), visible.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12852
+ children: [renderSourceGroups(ARCHIVE_COLUMN, visible, false, true), visible.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
11599
12853
  className: board_module_css_default.columnEmpty,
11600
12854
  children: tagFilter.length > 0 ? t("board.tagEmpty") : t("archive.empty")
11601
12855
  })]
@@ -11604,7 +12858,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
11604
12858
  const tasks = visible.filter((task) => task.status === column.status);
11605
12859
  const isManualDropTarget = MANUAL_STATUSES.includes(column.status);
11606
12860
  const compact = compactColumns.includes(column.status);
11607
- const grouped = GROUPED_COLUMNS.includes(column.status);
11608
12861
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
11609
12862
  className: board_module_css_default.column,
11610
12863
  "data-status": column.status,
@@ -11652,7 +12905,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
11652
12905
  ]
11653
12906
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
11654
12907
  className: board_module_css_default.cards,
11655
- children: [grouped ? renderGrouped(column.status, tasks, compact, false) : tasks.map((task) => renderCard(task, compact)), tasks.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12908
+ children: [renderSourceGroups(column.status, tasks, compact, false), tasks.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
11656
12909
  className: board_module_css_default.columnEmpty,
11657
12910
  children: tagFilter.length > 0 ? t("board.tagEmpty") : t("board.empty")
11658
12911
  })]
@@ -13677,7 +14930,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
13677
14930
  label: inheritRoute === void 0 ? t("settings.goalVerificationModelInheritUnknown") : t("settings.goalVerificationModelInherit", { model: inheritRoute.provider + "/" + inheritRoute.model })
13678
14931
  }, ...catalog.groups.flatMap((group) => group.models.map((model) => ({
13679
14932
  value: group.id + "/" + model.id,
13680
- label: (group.name ?? group.id) + " · " + (model.name ?? model.id)
14933
+ label: modelDisplayLabel({
14934
+ id: group.id + "/" + model.id,
14935
+ name: model.name ?? model.id,
14936
+ provider: group.id
14937
+ })
13681
14938
  })))];
13682
14939
  const stagedRoute = parseModelRoute(stagedSettings.model) ?? (inheritRoute === void 0 ? void 0 : {
13683
14940
  provider: inheritRoute.provider,
@@ -14134,369 +15391,86 @@ Please report this to https://github.com/markedjs/marked.`, e) {
14134
15391
  }),
14135
15392
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
14136
15393
  className: board_settings_module_css_default.powerLine,
14137
- children: t("settings.powerBoundary")
14138
- }),
14139
- power?.lastError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
14140
- className: board_settings_module_css_default.powerError,
14141
- children: t("settings.powerError", { error: power.lastError })
14142
- })
14143
- ]
14144
- })]
14145
- });
14146
- }
14147
- //#endregion
14148
- //#region src/core/degraded-reason.ts
14149
- /**
14150
- * The one degraded record naming `plugin`, or undefined when that row is not
14151
- * degraded (or the payload does not come from the shell's own shape). A
14152
- * plugin may appear once: the shell keys the ledger by package name and
14153
- * refreshes the record on every new failure.
14154
- * @param body - parsed JSON body of the health route.
14155
- * @param plugin - the real plugin package name to look for.
14156
- * @returns the degraded row, or undefined when the ledger does not name it.
14157
- */
14158
- function degradedRowOf(body, plugin) {
14159
- if (typeof body !== "object" || body === null) return void 0;
14160
- const ledger = body;
14161
- if (ledger.ok !== true || !Array.isArray(ledger.degraded)) return void 0;
14162
- for (const entry of ledger.degraded) {
14163
- if (typeof entry !== "object" || entry === null) continue;
14164
- const record = entry;
14165
- if (record.plugin !== plugin) continue;
14166
- const stage = record.stage === "import" || record.stage === "shape" || record.stage === "start" ? record.stage : void 0;
14167
- if (stage === void 0) continue;
14168
- return {
14169
- plugin,
14170
- stage,
14171
- reason: typeof record.reason === "string" ? record.reason : ""
14172
- };
14173
- }
14174
- }
14175
- /** The ledger owner pid a task-board lock reason names, when it names one. */
14176
- const OWNED_BY_PROCESS_RE = /already owned by process\s+(\d+)/;
14177
- /**
14178
- * The marker the ledger appends when it could NOT confirm the recorded PID
14179
- * belongs to the lock's real owner: the PID was reused by an unrelated process
14180
- * after a crash, and the reason then carries the manual-removal step instead.
14181
- * That reason must be rendered verbatim — telling the user to close "the other
14182
- * DSH instance" would send them after a process that never touched the board.
14183
- */
14184
- const UNCONFIRMED_OWNER_MARKER = "reused after a crash";
14185
- /**
14186
- * Extract the pid of the LIVE process a ledger-lock failure blames, when the
14187
- * reason identifies one. The task board's lock refusal is the one degraded
14188
- * reason that carries an owner the user can act on, so the panel renders the
14189
- * pid in its own sentence and adds the guidance that actually applies.
14190
- * @param reason - the shell's one-line failure reason.
14191
- * @returns the confirmed owner pid, or undefined when the reason names none or
14192
- * warns that the PID may have been reused (its own text owns the recovery).
14193
- */
14194
- function ledgerOwnerPid(reason) {
14195
- if (reason.includes(UNCONFIRMED_OWNER_MARKER)) return void 0;
14196
- const match = OWNED_BY_PROCESS_RE.exec(reason);
14197
- if (match === null) return void 0;
14198
- const pid = Number(match[1]);
14199
- return Number.isSafeInteger(pid) && pid > 0 ? pid : void 0;
14200
- }
14201
- //#endregion
14202
- //#region src/core/package-name.ts
14203
- /**
14204
- * npm identity of this plugin. The dsh-web-all degraded ledger is keyed by the
14205
- * real plugin package name of a family row, and this plugin's browser half
14206
- * must name its OWN row there to learn why its Host API is missing (issue
14207
- * #1730): the served bundle cannot derive the name, because a family row
14208
- * mounts the package from a versioned profile path. The host half spells the
14209
- * same name in its single-mount guard (src/index.ts); the two move together.
14210
- */
14211
- const TASK_BOARD_PACKAGE = "@linxin666/dsh-client-ui-task-board";
14212
- //#endregion
14213
- //#region src/protocol.ts
14214
- const TASK_BOARD_API_PREFIX = "/api/task-board";
14215
- /** Whether a decoded reply carries the three draft strings the form accepts. */
14216
- function isTaskParseDraft(value) {
14217
- if (typeof value !== "object" || value === null) return false;
14218
- const record = value;
14219
- return typeof record.title === "string" && typeof record.description === "string" && typeof record.prompt === "string";
14220
- }
14221
- //#endregion
14222
- //#region src/client/host-api.ts
14223
- /**
14224
- * Client-side base for the board's routes: DOCUMENT-RELATIVE (issue #1707).
14225
- *
14226
- * The host registers `TASK_BOARD_API_PREFIX` root-absolute; the page is served
14227
- * with `<base href="./">`, so the browser half must drop the leading slash or
14228
- * a sub-path deployment escapes its entry directory. Derived from the shared
14229
- * constant so host and client cannot drift.
14230
- */
14231
- const CLIENT_API_PREFIX = TASK_BOARD_API_PREFIX.slice(1);
14232
- const IMPORT_MARKER = "dsh.taskBoard.v2.hostImported";
14233
- const SOURCE_KEY = "dsh.taskBoard.v2.sourceId";
14234
- const IMPORT_REQUEST_KEY = "dsh.taskBoard.v2.importRequestId";
14235
- const REQUEST_TIMEOUT_MS = 15e3;
14236
- /** Re-notify the panel at most this often while the event stream stays broken. */
14237
- const STREAM_ERROR_NOTIFY_MS = 15e3;
14238
- /** Mirrors the Host's own parse budget; only used to phrase the timeout. */
14239
- const TASK_PARSE_TIMEOUT_SECONDS = 45;
14240
- /** Transport failure carrying a stable class next to its user-facing message. */
14241
- var HostApiError = class extends Error {
14242
- failure;
14243
- status;
14244
- constructor(failure, message, status) {
14245
- super(message);
14246
- this.failure = failure;
14247
- this.status = status;
14248
- this.name = "HostApiError";
14249
- }
14250
- };
14251
- /**
14252
- * Same-origin family health route served by the dsh-web-all shell: the
14253
- * degraded ledger, in which a family row that failed during apply appears WITH
14254
- * its reason. DOCUMENT-RELATIVE for the same reason as the board's own routes
14255
- * (issue #1707). A 404 here means the family shell is absent or older than the
14256
- * route, which is not itself a failure of the board.
14257
- */
14258
- const FAMILY_DEGRADED_ROUTE = "api/dsh-web-all/degraded";
14259
- /** Health-route ceiling: an unresponsive family shell must not hold the board's first paint. */
14260
- const DEGRADED_LOOKUP_TIMEOUT_MS = 2e3;
15394
+ children: t("settings.powerBoundary")
15395
+ }),
15396
+ power?.lastError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
15397
+ className: board_settings_module_css_default.powerError,
15398
+ children: t("settings.powerError", { error: power.lastError })
15399
+ })
15400
+ ]
15401
+ })]
15402
+ });
15403
+ }
15404
+ //#endregion
15405
+ //#region src/client/pending-verify.ts
14261
15406
  /**
14262
- * The failure text for a row this browser knows failed during start.
15407
+ * Bounded verification of the one board state the mirror knows is transient.
14263
15408
  *
14264
- * A ledger lock is the one class with an owner the user can act on, so its
14265
- * reason is unpacked into the pid plus what to do about it; every other
14266
- * degraded row is reported with the shell's own reason verbatim. The raw
14267
- * reason rides along either way, because it is the only text that names the
14268
- * lock file or the recovery step when the pid is not the whole story.
14269
- * @param reason - the shell's one-line failure reason (never empty).
15409
+ * A pushed frame is how the panel normally learns that the Host moved, and the
15410
+ * browser cannot verify that frames still arrive: an SSE connection that stops
15411
+ * delivering without closing leaves `EventSource` open and silent, so no error
15412
+ * fires and no frame comes. While the mirror still shows an execution the Host
15413
+ * has not settled, that silence looks exactly like a run still in progress —
15414
+ * the row a reader is looking at keeps saying "running" long after the Host
15415
+ * wrote the session id and settled it.
15416
+ *
15417
+ * So the mirror verifies exactly that state and nothing else: one state read per
15418
+ * {@link PENDING_VERIFICATION_MS} while at least one execution is still open,
15419
+ * disarmed by the snapshot itself as soon as the last one settles. A board with
15420
+ * nothing in flight reads nothing (the package rule: an idle board does not
15421
+ * poll), and a hidden page defers its reads until it is looked at again.
15422
+ *
15423
+ * @module dsh-task-board/client/pending-verify
14270
15424
  */
14271
- function degradedFailureMessage(reason) {
14272
- const pid = ledgerOwnerPid(reason);
14273
- if (pid === void 0) return {
14274
- failure: "degraded",
14275
- message: t("board.hostError.degraded", { detail: reason })
14276
- };
14277
- return {
14278
- failure: "ledger-locked",
14279
- message: t("board.hostError.ledgerLocked", {
14280
- pid: String(pid),
14281
- detail: reason
14282
- })
14283
- };
14284
- }
14285
15425
  /**
14286
- * The degraded record the family shell holds for THIS board, or undefined when
14287
- * the row is healthy, the shell is absent, or the answer is unusable. The
14288
- * lookup is best-effort by contract: any uncertainty keeps the caller's own
14289
- * failure text instead of replacing it with a weaker one.
14290
- * @param fetchImpl - fetch implementation (injected for tests).
14291
- * @returns the ledger's reason for this row, or undefined when it names none.
15426
+ * Verification cadence while an execution is open. It matches the interval the
15427
+ * transport already uses to recover from a stream error, so a missed frame and
15428
+ * a broken stream converge within the same bound.
14292
15429
  */
14293
- async function fetchDegradedReason(fetchImpl) {
14294
- const controller = new AbortController();
14295
- const timer = globalThis.setTimeout(() => {
14296
- controller.abort();
14297
- }, DEGRADED_LOOKUP_TIMEOUT_MS);
14298
- try {
14299
- const response = await fetchImpl(FAMILY_DEGRADED_ROUTE, {
14300
- signal: controller.signal,
14301
- headers: { accept: "application/json" },
14302
- cache: "no-store"
14303
- });
14304
- if (!response.ok) return void 0;
14305
- return degradedRowOf(await response.json(), TASK_BOARD_PACKAGE)?.reason;
14306
- } catch {
14307
- return;
14308
- } finally {
14309
- globalThis.clearTimeout(timer);
14310
- }
14311
- }
15430
+ const PENDING_VERIFICATION_MS = 15e3;
14312
15431
  /**
14313
- * Name the real reason this board's routes are missing (issue #1730).
14314
- *
14315
- * The core webserver answers an unmounted route with a bare 404, which cannot
14316
- * distinguish "this deployment never loaded the plugin" from "this row
14317
- * degraded during start" — a second DSH process holding `ledger-v2.lock` is
14318
- * the case that matters, because the panel's advice ("restart the service")
14319
- * is then false: the lock belongs to the other process, and restarting cannot
14320
- * win it. The family health route knows the difference, so the 404 is
14321
- * disambiguated there before anything is shown.
14322
- * @param fallback - copy for the plain "routes are not there" failure, which
14323
- * is route-specific (the board's state route and the AI-parse route phrase
14324
- * their own absence); it is also what is shown when the ledger names nothing.
14325
- * @param fetchImpl - fetch implementation (injected for tests).
14326
- * @returns the HostApiError to throw for a missing board route.
15432
+ * Watch the mirror and re-read the Host snapshot while it shows work in flight.
15433
+ * @param face - the mirror, the read, and the seams the loop runs on.
15434
+ * @param intervalMs - verification cadence in milliseconds.
15435
+ * @returns the disposer that releases the timer and the subscription.
14327
15436
  */
14328
- async function missingRouteFailure(fallback = t("board.hostError.notMounted"), fetchImpl = fetch) {
14329
- const absent = () => new HostApiError("not-mounted", fallback, 404);
14330
- const reason = await fetchDegradedReason(fetchImpl);
14331
- if (reason === void 0 || reason === "") return absent();
14332
- const described = degradedFailureMessage(reason);
14333
- return new HostApiError(described.failure, described.message, 404);
14334
- }
14335
- function uuid() {
14336
- return globalThis.crypto?.randomUUID?.() ?? `browser-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
15437
+ function startPendingVerification(face, intervalMs = PENDING_VERIFICATION_MS) {
15438
+ const schedule = face.schedule ?? ((run) => globalThis.setInterval(run, intervalMs));
15439
+ const cancel = face.cancel ?? ((handle) => {
15440
+ globalThis.clearInterval(handle);
15441
+ });
15442
+ const visible = face.visible ?? pageVisible;
15443
+ let handle;
15444
+ const stop = () => {
15445
+ if (handle === void 0) return;
15446
+ const current = handle;
15447
+ handle = void 0;
15448
+ cancel(current);
15449
+ };
15450
+ const tick = () => {
15451
+ if (!face.pending()) {
15452
+ stop();
15453
+ return;
15454
+ }
15455
+ if (!visible()) return;
15456
+ face.refresh();
15457
+ };
15458
+ const arm = () => {
15459
+ if (handle !== void 0 || !face.pending()) return;
15460
+ handle = schedule(tick);
15461
+ };
15462
+ const unsubscribe = face.subscribe(arm);
15463
+ arm();
15464
+ return () => {
15465
+ unsubscribe();
15466
+ stop();
15467
+ };
14337
15468
  }
14338
- /**
14339
- * Read one Host response without ever handing a non-JSON body to JSON.parse:
14340
- * the core webserver answers an unmounted `/api/*` path with the plain text
14341
- * "not found", which used to surface as a JavaScript parse error in the panel.
14342
- */
14343
- async function readJson(response) {
14344
- const text = await response.text();
14345
- let parsed;
14346
- let readable = false;
14347
- if (text.trim() !== "") try {
14348
- parsed = JSON.parse(text);
14349
- readable = true;
14350
- } catch {
14351
- readable = false;
14352
- }
14353
- const hostError = readable && typeof parsed === "object" && parsed !== null && typeof parsed.error === "string" ? parsed.error : void 0;
14354
- if (response.ok) {
14355
- if (!readable) throw new HostApiError("unexpected", t("board.hostError.unexpected", { status: String(response.status) }), response.status);
14356
- return parsed;
14357
- }
14358
- if (hostError !== void 0) {
14359
- if (hostError === "forbidden") throw new HostApiError("forbidden", t("board.hostError.forbidden"), response.status);
14360
- if (response.status === 503 || /lock/i.test(hostError)) throw new HostApiError("locked", t("board.hostError.locked", { detail: hostError }), response.status);
14361
- throw new HostApiError("rejected", hostError, response.status);
14362
- }
14363
- if (response.status === 404) throw await missingRouteFailure();
14364
- if (response.status === 403) throw new HostApiError("forbidden", t("board.hostError.forbidden"), 403);
14365
- if (response.status === 401) throw new HostApiError("unauthorized", t("board.hostError.unauthorized"), 401);
14366
- throw new HostApiError("unexpected", t("board.hostError.unexpected", { status: String(response.status) }), response.status);
15469
+ /** Whether the page is being looked at; a composition without a document counts as visible. */
15470
+ function pageVisible() {
15471
+ const state = globalThis.document?.visibilityState;
15472
+ return state === void 0 || state === "visible";
14367
15473
  }
14368
- var HttpTaskBoardHostTransport = class {
14369
- storage;
14370
- constructor(storage = globalThis.localStorage) {
14371
- this.storage = storage;
14372
- }
14373
- async bootstrap(legacy) {
14374
- const initial = await this.state();
14375
- const ledgerId = initial.scheduler.ledgerId;
14376
- if (legacy.length > 0 && ledgerId !== void 0 && this.storage?.getItem(IMPORT_MARKER) !== ledgerId) {
14377
- let sourceId = this.storage?.getItem(SOURCE_KEY);
14378
- if (sourceId === null || sourceId === void 0 || sourceId === "") {
14379
- sourceId = uuid();
14380
- this.storage?.setItem(SOURCE_KEY, sourceId);
14381
- }
14382
- let requestId = this.storage?.getItem(IMPORT_REQUEST_KEY);
14383
- if (requestId === null || requestId === void 0 || requestId === "") {
14384
- requestId = uuid();
14385
- this.storage?.setItem(IMPORT_REQUEST_KEY, requestId);
14386
- }
14387
- const snapshot = await this.post(requestId, {
14388
- kind: "import",
14389
- sourceId,
14390
- tasks: [...legacy]
14391
- });
14392
- this.storage?.setItem(IMPORT_MARKER, snapshot.scheduler.ledgerId ?? ledgerId);
14393
- return snapshot;
14394
- }
14395
- return initial;
14396
- }
14397
- async state() {
14398
- return await this.request(`${CLIENT_API_PREFIX}/state`, { cache: "no-store" });
14399
- }
14400
- async action(action, initiator) {
14401
- return await this.post(uuid(), action, initiator);
14402
- }
14403
- async post(requestId, action, initiator) {
14404
- const envelope = {
14405
- requestId,
14406
- action,
14407
- ...initiator === void 0 || initiator === "" ? {} : { initiator }
14408
- };
14409
- return await this.request(`${CLIENT_API_PREFIX}/action`, {
14410
- method: "POST",
14411
- headers: { "content-type": "application/json" },
14412
- body: JSON.stringify(envelope)
14413
- });
14414
- }
14415
- async request(url, init) {
14416
- const controller = new AbortController();
14417
- const timeout = globalThis.setTimeout(() => {
14418
- controller.abort();
14419
- }, REQUEST_TIMEOUT_MS);
14420
- try {
14421
- return await readJson(await fetch(url, {
14422
- ...init,
14423
- signal: controller.signal
14424
- }));
14425
- } catch (error) {
14426
- if (error instanceof HostApiError) throw error;
14427
- if (controller.signal.aborted) throw new HostApiError("timeout", t("board.hostError.timeout", { seconds: String(REQUEST_TIMEOUT_MS / 1e3) }));
14428
- throw new HostApiError("unreachable", t("board.hostError.unreachable"));
14429
- } finally {
14430
- globalThis.clearTimeout(timeout);
14431
- }
14432
- }
14433
- /**
14434
- * Ask the Host to turn pasted text into task fields. The route answers a
14435
- * typed failure (no model, timeout, unparseable reply) already phrased for
14436
- * the form, so the UI never renders a raw status code (issue #1540).
14437
- */
14438
- async parseDraft(request, signal) {
14439
- let response;
14440
- try {
14441
- response = await fetch(`${CLIENT_API_PREFIX}/parse`, {
14442
- method: "POST",
14443
- headers: { "content-type": "application/json" },
14444
- body: JSON.stringify(request),
14445
- ...signal === void 0 ? {} : { signal }
14446
- });
14447
- } catch {
14448
- throw new HostApiError("unreachable", t("board.hostError.unreachable"));
14449
- }
14450
- const text = await response.text();
14451
- let parsed;
14452
- let readable = false;
14453
- if (text.trim() !== "") try {
14454
- parsed = JSON.parse(text);
14455
- readable = true;
14456
- } catch {
14457
- readable = false;
14458
- }
14459
- const record = readable && typeof parsed === "object" && parsed !== null ? parsed : void 0;
14460
- if (response.ok) {
14461
- if (record !== void 0 && isTaskParseDraft(record.draft)) return record.draft;
14462
- throw new HostApiError("unexpected", t("new.aiParseFailed", { error: t("board.hostError.unexpected", { status: String(response.status) }) }), response.status);
14463
- }
14464
- if (response.status === 404) throw await missingRouteFailure(t("new.aiParseUnavailable"));
14465
- if (response.status === 403) throw new HostApiError("forbidden", t("board.hostError.forbidden"), 403);
14466
- if (response.status === 401) throw new HostApiError("unauthorized", t("board.hostError.unauthorized"), 401);
14467
- const code = typeof record?.code === "string" ? record.code : void 0;
14468
- if (code === "no-model") throw new HostApiError("rejected", t("new.aiParseNoModel"), response.status);
14469
- if (code === "timeout") throw new HostApiError("timeout", t("new.aiParseTimeout", { seconds: String(TASK_PARSE_TIMEOUT_SECONDS) }), response.status);
14470
- throw new HostApiError("rejected", t("new.aiParseFailed", { error: typeof record?.error === "string" && record.error !== "" ? record.error : String(response.status) }), response.status);
14471
- }
14472
- subscribe(listener) {
14473
- const events = new EventSource(`${CLIENT_API_PREFIX}/events`);
14474
- let lastStreamErrorNotify = 0;
14475
- events.onmessage = (message) => {
14476
- try {
14477
- const parsed = JSON.parse(message.data);
14478
- if (parsed === null || typeof parsed !== "object" || typeof parsed.revision !== "number") throw new Error("invalid event frame");
14479
- listener(parsed);
14480
- } catch {
14481
- listener();
14482
- }
14483
- };
14484
- events.onerror = () => {
14485
- const now = Date.now();
14486
- if (now - lastStreamErrorNotify < STREAM_ERROR_NOTIFY_MS) return;
14487
- lastStreamErrorNotify = now;
14488
- listener();
14489
- };
14490
- const onVisible = () => {
14491
- if (document.visibilityState === "visible") listener();
14492
- };
14493
- document.addEventListener("visibilitychange", onVisible);
14494
- return () => {
14495
- document.removeEventListener("visibilitychange", onVisible);
14496
- events.close();
14497
- };
14498
- }
14499
- };
14500
15474
  //#endregion
14501
15475
  //#region src/client/telemetry.ts
14502
15476
  /** localStorage key carrying the family-wide telemetry opt-out ('1' = off). */
@@ -14507,7 +15481,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
14507
15481
  /** The building package's version, when the bundle carries it. */
14508
15482
  function bakedVersion() {
14509
15483
  try {
14510
- return "0.4.12";
15484
+ return "0.4.14";
14511
15485
  } catch {
14512
15486
  return;
14513
15487
  }
@@ -14815,6 +15789,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
14815
15789
  unsubscribeController;
14816
15790
  /** Predicates registered before the controller exists, replayed on attach. */
14817
15791
  pendingVisibility = [];
15792
+ /** Source selectors registered before the controller exists, replayed on attach. */
15793
+ pendingGrouping = [];
14818
15794
  listeners = /* @__PURE__ */ new Set();
14819
15795
  /** Bind the live board controller (called when the UI mounts). */
14820
15796
  attach(controller) {
@@ -14825,6 +15801,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
14825
15801
  this.notify();
14826
15802
  });
14827
15803
  for (const predicate of this.pendingVisibility.splice(0)) controller.registerVisibility(predicate);
15804
+ for (const registration of this.pendingGrouping.splice(0)) if (registration.active) registration.dispose = controller.registerGrouping(registration.selector);
14828
15805
  this.notify();
14829
15806
  }
14830
15807
  /** Release the current controller (called when the UI unmounts). */
@@ -14853,6 +15830,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
14853
15830
  if (index !== -1) this.pendingVisibility.splice(index, 1);
14854
15831
  };
14855
15832
  }
15833
+ registerGrouping(selector) {
15834
+ if (this.controller !== void 0) return this.controller.registerGrouping(selector);
15835
+ const registration = {
15836
+ selector,
15837
+ active: true
15838
+ };
15839
+ this.pendingGrouping.push(registration);
15840
+ return () => {
15841
+ registration.active = false;
15842
+ registration.dispose?.();
15843
+ const index = this.pendingGrouping.indexOf(registration);
15844
+ if (index !== -1) this.pendingGrouping.splice(index, 1);
15845
+ };
15846
+ }
14856
15847
  subscribe(callback) {
14857
15848
  this.listeners.add(callback);
14858
15849
  return () => {
@@ -15010,6 +16001,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
15010
16001
  const disposers = [];
15011
16002
  liveController = controller;
15012
16003
  if (presetRoster !== void 0) controller.setExecutionOptions({ presets: presetRoster });
16004
+ disposers.push(startPendingVerification({
16005
+ pending: () => controller.getSnapshot().tasks.some(hasOpenExecution),
16006
+ refresh: () => {
16007
+ controller.refreshHostState();
16008
+ },
16009
+ subscribe: (listener) => controller.subscribe(listener)
16010
+ }));
15013
16011
  let followedDefaults = cardDefaultSignature(settingsForm.getSnapshot().value);
15014
16012
  disposers.push(settingsForm.subscribe(() => {
15015
16013
  const next = cardDefaultSignature(settingsForm.getSnapshot().value);