@openspecui/core 6.0.0-beta.0 → 6.0.0-beta.1

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 (42) hide show
  1. package/dist/{cli-projection-DxnVGm2B.d.mts → cli-projection-CBvIiy5p.d.mts} +1 -1
  2. package/dist/cli-projection.d.mts +4 -4
  3. package/dist/{command-result-fkH3Ekdz.d.mts → command-result-CuWzPRAT.d.mts} +45 -45
  4. package/dist/dashboard-display.d.mts +22 -1
  5. package/dist/dashboard-display.mjs +42 -1
  6. package/dist/{dashboard-summary-transport-D2VBAIxg.mjs → dashboard-summary-transport-CYBuU4iT.mjs} +14 -0
  7. package/dist/{dashboard-summary-transport-CQ4is5_e.d.mts → dashboard-summary-transport-Dskh3E9-.d.mts} +5205 -4025
  8. package/dist/dashboard-summary-transport.d.mts +16 -16
  9. package/dist/dashboard-summary-transport.mjs +1 -1
  10. package/dist/hosted-app.d.mts +16 -16
  11. package/dist/hosted-contract.d.mts +16 -16
  12. package/dist/index.d.mts +16 -16
  13. package/dist/index.mjs +1 -1
  14. package/dist/{local-download-profiles-BL_rtlVM.d.mts → local-download-profiles-bYSSKmtx.d.mts} +1 -1
  15. package/dist/local-download-profiles.d.mts +2 -2
  16. package/dist/{notifications-CgJlLgLO.d.mts → notifications-Ak6LdCaL.d.mts} +17 -17
  17. package/dist/notifications.d.mts +2 -2
  18. package/dist/{openspec-projection-RohNZI4p.d.mts → openspec-projection-DU7RFRyA.d.mts} +1 -1
  19. package/dist/openspec-projection.d.mts +2 -2
  20. package/dist/{opsx-entity-D7kDQsze.d.mts → opsx-entity-6PnbYZZp.d.mts} +2 -2
  21. package/dist/opsx-entity.d.mts +6 -6
  22. package/dist/{opsx-schema-detail-BxDXEwDY.d.mts → opsx-schema-detail-CiqCYl2F.d.mts} +2 -2
  23. package/dist/opsx-schema-detail.d.mts +7 -7
  24. package/dist/{opsx-types-BJ8AjhrS.d.mts → opsx-types-Fs0tRnL2.d.mts} +301 -301
  25. package/dist/planning-cli-projection.d.mts +16 -16
  26. package/dist/{schemas-DS-JqAJ2.d.mts → schemas-D-6yi_I-.d.mts} +119 -119
  27. package/dist/{sounds-qhRgCy0F.d.mts → sounds-C24SzEHX.d.mts} +8 -8
  28. package/dist/sounds.d.mts +1 -1
  29. package/dist/spec-catalog.d.mts +16 -16
  30. package/dist/{store-mutation-protocol-5tfs-RmD.d.mts → store-mutation-protocol-3TzQ6ete.d.mts} +36 -36
  31. package/dist/store-mutation-protocol.d.mts +1 -1
  32. package/dist/{store-types-b554wAQJ.d.mts → store-types-CmDVyObq.d.mts} +1 -1
  33. package/dist/store-types.d.mts +4 -4
  34. package/dist/task-progress.d.mts +5 -5
  35. package/dist/{terminal-audio-tXDm_EDe.d.mts → terminal-audio-Rj1pLeSw.d.mts} +1 -1
  36. package/dist/terminal-audio.d.mts +2 -2
  37. package/dist/terminal-control.d.mts +2 -2
  38. package/dist/{terminal-invocation-BOvxThym.d.mts → terminal-invocation-G19ieMZy.d.mts} +67 -67
  39. package/dist/terminal-invocation.d.mts +1 -1
  40. package/dist/{translator-NKv1wo3o.d.mts → translator-CNmE1fAm.d.mts} +141 -141
  41. package/dist/translator.d.mts +1 -1
  42. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { n as CliJsonValue, t as CliCommandResult } from "./command-result-fkH3Ekdz.mjs";
1
+ import { n as CliJsonValue, t as CliCommandResult } from "./command-result-CuWzPRAT.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/cli-projection.d.ts
@@ -1,6 +1,6 @@
1
- import "./command-result-fkH3Ekdz.mjs";
1
+ import "./command-result-CuWzPRAT.mjs";
2
2
  import "./document-translation-D50BnvVh.mjs";
3
- import "./sounds-qhRgCy0F.mjs";
4
- import "./notifications-CgJlLgLO.mjs";
5
- import { _ as toCliProjectionCommandEvidence, a as CliProjectionFailure, c as CliProjectionInvalidationCauseSchema, d as CliProjectionState, f as CliProjectionStateName, g as createCliProjectionStateSchema, h as cliProjectionStates, i as CliProjectionCommandEvidenceSchema, l as CliProjectionNotice, m as cliProjectionInvalidationCauses, n as CliProjectionCommandError, o as CliProjectionFailureSchema, p as CliProjectionStateNameSchema, r as CliProjectionCommandEvidence, s as CliProjectionInvalidationCause, t as CliJsonValueSchema, u as CliProjectionNoticeSchema, v as toCliProjectionFailure, y as toCliProjectionNotice } from "./cli-projection-DxnVGm2B.mjs";
3
+ import "./sounds-C24SzEHX.mjs";
4
+ import "./notifications-Ak6LdCaL.mjs";
5
+ import { _ as toCliProjectionCommandEvidence, a as CliProjectionFailure, c as CliProjectionInvalidationCauseSchema, d as CliProjectionState, f as CliProjectionStateName, g as createCliProjectionStateSchema, h as cliProjectionStates, i as CliProjectionCommandEvidenceSchema, l as CliProjectionNotice, m as cliProjectionInvalidationCauses, n as CliProjectionCommandError, o as CliProjectionFailureSchema, p as CliProjectionStateNameSchema, r as CliProjectionCommandEvidence, s as CliProjectionInvalidationCause, t as CliJsonValueSchema, u as CliProjectionNoticeSchema, v as toCliProjectionFailure, y as toCliProjectionNotice } from "./cli-projection-CBvIiy5p.mjs";
6
6
  export { CliJsonValueSchema, CliProjectionCommandError, CliProjectionCommandEvidence, CliProjectionCommandEvidenceSchema, CliProjectionFailure, CliProjectionFailureSchema, CliProjectionInvalidationCause, CliProjectionInvalidationCauseSchema, CliProjectionNotice, CliProjectionNoticeSchema, CliProjectionState, CliProjectionStateName, CliProjectionStateNameSchema, cliProjectionInvalidationCauses, cliProjectionStates, createCliProjectionStateSchema, toCliProjectionCommandEvidence, toCliProjectionFailure, toCliProjectionNotice };
@@ -1,5 +1,5 @@
1
1
  import { o as DocumentTranslationConfigUpdate } from "./document-translation-D50BnvVh.mjs";
2
- import { p as NotificationSettings } from "./notifications-CgJlLgLO.mjs";
2
+ import { p as NotificationSettings } from "./notifications-Ak6LdCaL.mjs";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/cli-contracts/common.d.ts
@@ -6255,12 +6255,12 @@ declare const CliApplyInstructionsSchema: z.ZodUnion<[z.ZodObject<{
6255
6255
  remaining: z.ZodNumber;
6256
6256
  }, "strip", z.ZodTypeAny, {
6257
6257
  total: number;
6258
- remaining: number;
6259
6258
  complete: number;
6259
+ remaining: number;
6260
6260
  }, {
6261
6261
  total: number;
6262
- remaining: number;
6263
6262
  complete: number;
6263
+ remaining: number;
6264
6264
  }>;
6265
6265
  tasks: z.ZodArray<z.ZodObject<{
6266
6266
  id: z.ZodString;
@@ -6405,12 +6405,12 @@ declare const CliApplyInstructionsSchema: z.ZodUnion<[z.ZodObject<{
6405
6405
  remaining: z.ZodNumber;
6406
6406
  }, "strip", z.ZodTypeAny, {
6407
6407
  total: number;
6408
- remaining: number;
6409
6408
  complete: number;
6409
+ remaining: number;
6410
6410
  }, {
6411
6411
  total: number;
6412
- remaining: number;
6413
6412
  complete: number;
6413
+ remaining: number;
6414
6414
  }>;
6415
6415
  tasks: z.ZodArray<z.ZodObject<{
6416
6416
  id: z.ZodString;
@@ -6555,12 +6555,12 @@ declare const CliApplyInstructionsSchema: z.ZodUnion<[z.ZodObject<{
6555
6555
  remaining: z.ZodNumber;
6556
6556
  }, "strip", z.ZodTypeAny, {
6557
6557
  total: number;
6558
- remaining: number;
6559
6558
  complete: number;
6559
+ remaining: number;
6560
6560
  }, {
6561
6561
  total: number;
6562
- remaining: number;
6563
6562
  complete: number;
6563
+ remaining: number;
6564
6564
  }>;
6565
6565
  tasks: z.ZodArray<z.ZodObject<{
6566
6566
  id: z.ZodString;
@@ -8104,13 +8104,13 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
8104
8104
  } | undefined;
8105
8105
  }>>;
8106
8106
  }, "strip", z.ZodTypeAny, {
8107
- git: {
8108
- diffEagerLineBudget: number;
8109
- };
8110
8107
  cli: {
8111
8108
  command?: string | undefined;
8112
8109
  args?: string[] | undefined;
8113
8110
  };
8111
+ git: {
8112
+ diffEagerLineBudget: number;
8113
+ };
8114
8114
  terminal: {
8115
8115
  fontSize: number;
8116
8116
  fontFamily: string;
@@ -8124,22 +8124,6 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
8124
8124
  bellSound: "silent" | "builtin:Basso" | "builtin:Blow" | "builtin:Bottle" | "builtin:Frog" | "builtin:Funk" | "builtin:Glass" | "builtin:Hero" | "builtin:Morse" | "builtin:Ping" | "builtin:Pop" | "builtin:Purr" | "builtin:Sosumi" | "builtin:Submarine" | "builtin:Tink" | `custom:${string}`;
8125
8125
  bellVolume: number;
8126
8126
  };
8127
- theme: "light" | "dark" | "system";
8128
- codeEditor: {
8129
- theme: "monokai" | "nord" | "github" | "material" | "vscode" | "tokyo" | "gruvbox";
8130
- };
8131
- appBaseUrl: string;
8132
- opsx: {
8133
- agentInvocationMode: "command" | "compose";
8134
- };
8135
- dashboard: {
8136
- trendPointLimit: number;
8137
- };
8138
- notifications: {
8139
- sound: "silent" | "builtin:Basso" | "builtin:Blow" | "builtin:Bottle" | "builtin:Frog" | "builtin:Funk" | "builtin:Glass" | "builtin:Hero" | "builtin:Morse" | "builtin:Ping" | "builtin:Pop" | "builtin:Purr" | "builtin:Sosumi" | "builtin:Submarine" | "builtin:Tink" | `custom:${string}`;
8140
- volume: number;
8141
- systemNotificationsEnabled: boolean;
8142
- };
8143
8127
  translation: {
8144
8128
  enabled: boolean;
8145
8129
  targetLanguage: string;
@@ -8164,14 +8148,30 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
8164
8148
  };
8165
8149
  };
8166
8150
  };
8151
+ theme: "light" | "dark" | "system";
8152
+ codeEditor: {
8153
+ theme: "monokai" | "nord" | "github" | "material" | "vscode" | "tokyo" | "gruvbox";
8154
+ };
8155
+ appBaseUrl: string;
8156
+ opsx: {
8157
+ agentInvocationMode: "command" | "compose";
8158
+ };
8159
+ dashboard: {
8160
+ trendPointLimit: number;
8161
+ };
8162
+ notifications: {
8163
+ sound: "silent" | "builtin:Basso" | "builtin:Blow" | "builtin:Bottle" | "builtin:Frog" | "builtin:Funk" | "builtin:Glass" | "builtin:Hero" | "builtin:Morse" | "builtin:Ping" | "builtin:Pop" | "builtin:Purr" | "builtin:Sosumi" | "builtin:Submarine" | "builtin:Tink" | `custom:${string}`;
8164
+ volume: number;
8165
+ systemNotificationsEnabled: boolean;
8166
+ };
8167
8167
  }, {
8168
- git?: {
8169
- diffEagerLineBudget?: number | undefined;
8170
- } | undefined;
8171
8168
  cli?: {
8172
8169
  command?: string | undefined;
8173
8170
  args?: string[] | undefined;
8174
8171
  } | undefined;
8172
+ git?: {
8173
+ diffEagerLineBudget?: number | undefined;
8174
+ } | undefined;
8175
8175
  terminal?: {
8176
8176
  fontSize?: number | undefined;
8177
8177
  fontFamily?: string | undefined;
@@ -8185,22 +8185,6 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
8185
8185
  bellSound?: unknown;
8186
8186
  bellVolume?: number | undefined;
8187
8187
  } | undefined;
8188
- theme?: "light" | "dark" | "system" | undefined;
8189
- codeEditor?: {
8190
- theme?: "monokai" | "nord" | "github" | "material" | "vscode" | "tokyo" | "gruvbox" | undefined;
8191
- } | undefined;
8192
- appBaseUrl?: string | undefined;
8193
- opsx?: {
8194
- agentInvocationMode?: "command" | "compose" | undefined;
8195
- } | undefined;
8196
- dashboard?: {
8197
- trendPointLimit?: number | undefined;
8198
- } | undefined;
8199
- notifications?: {
8200
- sound?: unknown;
8201
- volume?: number | undefined;
8202
- systemNotificationsEnabled?: boolean | undefined;
8203
- } | undefined;
8204
8188
  translation?: {
8205
8189
  enabled?: boolean | undefined;
8206
8190
  targetLanguage?: string | undefined;
@@ -8225,6 +8209,22 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
8225
8209
  } | undefined;
8226
8210
  } | undefined;
8227
8211
  } | undefined;
8212
+ theme?: "light" | "dark" | "system" | undefined;
8213
+ codeEditor?: {
8214
+ theme?: "monokai" | "nord" | "github" | "material" | "vscode" | "tokyo" | "gruvbox" | undefined;
8215
+ } | undefined;
8216
+ appBaseUrl?: string | undefined;
8217
+ opsx?: {
8218
+ agentInvocationMode?: "command" | "compose" | undefined;
8219
+ } | undefined;
8220
+ dashboard?: {
8221
+ trendPointLimit?: number | undefined;
8222
+ } | undefined;
8223
+ notifications?: {
8224
+ sound?: unknown;
8225
+ volume?: number | undefined;
8226
+ systemNotificationsEnabled?: boolean | undefined;
8227
+ } | undefined;
8228
8228
  }>;
8229
8229
  type OpenSpecUIConfig = z.infer<typeof OpenSpecUIConfigSchema>;
8230
8230
  type OpenSpecUIConfigUpdate = {
@@ -1,5 +1,24 @@
1
1
  //#region src/dashboard-display.d.ts
2
+ /**
3
+ * Orthogonal intents (updated 2026-07-28 Asia/Shanghai):
4
+ * 1. Select bounded Dashboard rows with deterministic ordering.
5
+ * 2. Resolve archive dates identically across Server and browser/static consumers.
6
+ * 3. Apply the objective bounded archive-range policy without owning UI state.
7
+ *
8
+ * Original request (2026-07-28): replace Dashboard Workflow Progress with ReadonlyKanban.
9
+ */
2
10
  declare const DASHBOARD_RECENT_LIST_LIMIT = 10;
11
+ type DashboardArchiveRange = '7d' | '30d' | '90d' | 'all';
12
+ interface DashboardArchiveTimeSource {
13
+ id: string;
14
+ updatedAt: number;
15
+ }
16
+ /** Parse a valid UTC calendar date from an archive id prefix. */
17
+ declare function parseDatedArchiveIdTimestamp(id: string): number | null;
18
+ /** Resolve the archive timestamp from its dated id, then its physical update time. */
19
+ declare function resolveArchiveTimestamp(archive: DashboardArchiveTimeSource): number;
20
+ /** Test whether an archive belongs to a user-selected trailing range. */
21
+ declare function isArchiveInRange(archive: DashboardArchiveTimeSource, range: DashboardArchiveRange, now?: number): boolean;
3
22
  interface DashboardRecentListItem {
4
23
  id: string;
5
24
  updatedAt: number;
@@ -7,5 +26,7 @@ interface DashboardRecentListItem {
7
26
  declare function compareDashboardItemsByUpdatedAt<T extends DashboardRecentListItem>(left: T, right: T): number;
8
27
  declare function sortDashboardItemsByUpdatedAt<T extends DashboardRecentListItem>(items: readonly T[]): T[];
9
28
  declare function selectRecentDashboardItems<T extends DashboardRecentListItem>(items: readonly T[], limit?: number): T[];
29
+ /** Select recent archives by objective archive time rather than incidental directory mtime. */
30
+ declare function selectRecentDashboardArchives<T extends DashboardArchiveTimeSource>(items: readonly T[], limit?: number): T[];
10
31
  //#endregion
11
- export { DASHBOARD_RECENT_LIST_LIMIT, DashboardRecentListItem, compareDashboardItemsByUpdatedAt, selectRecentDashboardItems, sortDashboardItemsByUpdatedAt };
32
+ export { DASHBOARD_RECENT_LIST_LIMIT, DashboardArchiveRange, DashboardArchiveTimeSource, DashboardRecentListItem, compareDashboardItemsByUpdatedAt, isArchiveInRange, parseDatedArchiveIdTimestamp, resolveArchiveTimestamp, selectRecentDashboardArchives, selectRecentDashboardItems, sortDashboardItemsByUpdatedAt };
@@ -1,5 +1,42 @@
1
1
  //#region src/dashboard-display.ts
2
+ /**
3
+ * Orthogonal intents (updated 2026-07-28 Asia/Shanghai):
4
+ * 1. Select bounded Dashboard rows with deterministic ordering.
5
+ * 2. Resolve archive dates identically across Server and browser/static consumers.
6
+ * 3. Apply the objective bounded archive-range policy without owning UI state.
7
+ *
8
+ * Original request (2026-07-28): replace Dashboard Workflow Progress with ReadonlyKanban.
9
+ */
2
10
  const DASHBOARD_RECENT_LIST_LIMIT = 10;
11
+ const ARCHIVE_RANGE_DAYS = {
12
+ "7d": 7,
13
+ "30d": 30,
14
+ "90d": 90,
15
+ all: null
16
+ };
17
+ const ARCHIVE_DATE_PREFIX = /^(\d{4})-(\d{2})-(\d{2})(?:-|$)/;
18
+ /** Parse a valid UTC calendar date from an archive id prefix. */
19
+ function parseDatedArchiveIdTimestamp(id) {
20
+ const match = ARCHIVE_DATE_PREFIX.exec(id);
21
+ if (!match) return null;
22
+ const year = Number(match[1]);
23
+ const month = Number(match[2]);
24
+ const day = Number(match[3]);
25
+ const timestamp = Date.UTC(year, month - 1, day);
26
+ const parsed = new Date(timestamp);
27
+ if (!Number.isFinite(timestamp) || parsed.getUTCFullYear() !== year || parsed.getUTCMonth() !== month - 1 || parsed.getUTCDate() !== day) return null;
28
+ return timestamp;
29
+ }
30
+ /** Resolve the archive timestamp from its dated id, then its physical update time. */
31
+ function resolveArchiveTimestamp(archive) {
32
+ return parseDatedArchiveIdTimestamp(archive.id) ?? archive.updatedAt;
33
+ }
34
+ /** Test whether an archive belongs to a user-selected trailing range. */
35
+ function isArchiveInRange(archive, range, now = Date.now()) {
36
+ const days = ARCHIVE_RANGE_DAYS[range];
37
+ if (days === null) return true;
38
+ return resolveArchiveTimestamp(archive) >= now - days * 24 * 60 * 60 * 1e3;
39
+ }
3
40
  function compareDashboardItemsByUpdatedAt(left, right) {
4
41
  return right.updatedAt - left.updatedAt || left.id.localeCompare(right.id);
5
42
  }
@@ -9,6 +46,10 @@ function sortDashboardItemsByUpdatedAt(items) {
9
46
  function selectRecentDashboardItems(items, limit = DASHBOARD_RECENT_LIST_LIMIT) {
10
47
  return sortDashboardItemsByUpdatedAt(items).slice(0, Math.max(0, Math.trunc(limit)));
11
48
  }
49
+ /** Select recent archives by objective archive time rather than incidental directory mtime. */
50
+ function selectRecentDashboardArchives(items, limit = DASHBOARD_RECENT_LIST_LIMIT) {
51
+ return [...items].sort((left, right) => resolveArchiveTimestamp(right) - resolveArchiveTimestamp(left) || left.id.localeCompare(right.id)).slice(0, Math.max(0, Math.trunc(limit)));
52
+ }
12
53
 
13
54
  //#endregion
14
- export { DASHBOARD_RECENT_LIST_LIMIT, compareDashboardItemsByUpdatedAt, selectRecentDashboardItems, sortDashboardItemsByUpdatedAt };
55
+ export { DASHBOARD_RECENT_LIST_LIMIT, compareDashboardItemsByUpdatedAt, isArchiveInRange, parseDatedArchiveIdTimestamp, resolveArchiveTimestamp, selectRecentDashboardArchives, selectRecentDashboardItems, sortDashboardItemsByUpdatedAt };
@@ -8,10 +8,12 @@ import { z } from "zod";
8
8
  * 1. Define Dashboard metrics, trends, planning projections, and Git snapshot contracts.
9
9
  * 2. Preserve backend-issued Code binding provenance on live Git snapshots.
10
10
  * 3. Split independently refreshable Summary and Trends facts from the aggregate Dashboard compatibility view.
11
+ * 4. Carry objective Kanban phase counts and bounded archive summaries without workflow inference.
11
12
  *
12
13
  * Original request (2026-07-19): "代码已经提交,开始review。如果有问题,那么可更新change。"
13
14
  * Derived requirement (2026-07-19): Checkpoint 6.11 binds Dashboard snapshots to their Code token.
14
15
  * Original request (2026-07-23): "现在页面数据的加载数据非常慢(比如dashboard页面、changes页面都要等待非常久,页面刷新后,似乎后台没有缓存一样,也要加载很久。"
16
+ * Original request (2026-07-28): replace Dashboard Workflow Progress with ReadonlyKanban.
15
17
  */
16
18
  const DASHBOARD_METRIC_KEYS = [
17
19
  "specifications",
@@ -127,6 +129,18 @@ const DashboardSummaryProjectionSchema = z.object({
127
129
  name: z.string(),
128
130
  trackedTaskProgress: TrackedTaskProgressSchema,
129
131
  updatedAt: z.number()
132
+ })),
133
+ trackedTaskPhaseCounts: z.object({
134
+ "no-tasks": z.number(),
135
+ "in-progress": z.number(),
136
+ complete: z.number()
137
+ }),
138
+ recentArchives: z.array(z.object({
139
+ id: z.string(),
140
+ name: z.string(),
141
+ trackedTaskProgress: TrackedTaskProgressSchema,
142
+ archivedAt: z.number(),
143
+ updatedAt: z.number()
130
144
  }))
131
145
  });
132
146
  const DashboardTrendsProjectionSchema = z.object({