openspecui 2.1.4 → 2.1.6

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 (36) hide show
  1. package/dist/cli.mjs +30 -10
  2. package/dist/index.mjs +1 -1
  3. package/dist/{src-DFu4IXMV.mjs → src-DglsnBxF.mjs} +29 -13
  4. package/package.json +1 -1
  5. package/web/assets/CanvasRenderer-DvQQ868U.js +1 -0
  6. package/web/assets/WebGLRenderer-Btkopy84.js +1 -0
  7. package/web/assets/WebGPURenderer-mbRLbuQ3.js +1 -0
  8. package/web/assets/browserAll-BN5cmbzO.js +1 -0
  9. package/web/assets/{dist-BTVRljcR.js → dist-BVuO0PNY.js} +1 -1
  10. package/web/assets/{dist-DgX3giV5.js → dist-BcS7MN40.js} +1 -1
  11. package/web/assets/{dist-CmBUS2pv.js → dist-Bqlcw5p5.js} +1 -1
  12. package/web/assets/{dist-BrT5ZB4u.js → dist-CQFpUBQu.js} +1 -1
  13. package/web/assets/dist-CWn3VEyl.js +1 -0
  14. package/web/assets/{dist-D2RwSjME.js → dist-CxW4GGvi.js} +1 -1
  15. package/web/assets/{dist-CzSFLuL_.js → dist-DH4wkw64.js} +1 -1
  16. package/web/assets/{dist-2NaYosWh.js → dist-DHt45678.js} +1 -1
  17. package/web/assets/{dist-C4xLUyJU.js → dist-DZNziC27.js} +1 -1
  18. package/web/assets/dist-DgZXq45Q.js +1 -0
  19. package/web/assets/{dist-CTInPrv9.js → dist-KeQ1cUcv.js} +1 -1
  20. package/web/assets/dist-RktJObPI.js +1 -0
  21. package/web/assets/{ghostty-web-D47FqPw6.js → ghostty-web-DhqZ931y.js} +1 -1
  22. package/web/assets/index-XY2gI2Cr.js +1541 -0
  23. package/web/assets/{init-2-IXz72e.js → init-CUcnIfzq.js} +1 -1
  24. package/web/assets/trpc-Bc5K_hrC.js +1 -0
  25. package/web/assets/webworkerAll-BeYSpTrq.js +1 -0
  26. package/web/index.html +1 -1
  27. package/web/assets/CanvasRenderer-KAAm7LZA.js +0 -1
  28. package/web/assets/WebGLRenderer-B9M4OWqi.js +0 -1
  29. package/web/assets/WebGPURenderer-DUl1R9TQ.js +0 -1
  30. package/web/assets/browserAll-CPLObGbz.js +0 -1
  31. package/web/assets/dist-BpNz0wXg.js +0 -1
  32. package/web/assets/dist-BwEZ1BjI.js +0 -1
  33. package/web/assets/dist-D_Mefl-e.js +0 -1
  34. package/web/assets/index-DG_B7CJb.js +0 -1541
  35. package/web/assets/trpc-Dmbg5-3U.js +0 -1
  36. package/web/assets/webworkerAll-Cslz2r8a.js +0 -1
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as SchemaInfoSchema, c as toOpsxDisplayPath, d as CliExecutor, f as ConfigManager, g as __toESM, h as __commonJS, i as SchemaDetailSchema, l as buildHostedLaunchUrl, m as OpenSpecAdapter, o as SchemaResolutionSchema, p as DEFAULT_CONFIG, r as require_dist, s as TemplatesSchema, t as startServer, u as resolveHostedAppBaseUrl } from "./src-DFu4IXMV.mjs";
2
+ import { a as SchemaInfoSchema, c as toOpsxDisplayPath, d as CliExecutor, f as ConfigManager, g as __toESM, h as __commonJS, i as SchemaDetailSchema, l as buildHostedLaunchUrl, m as OpenSpecAdapter, o as SchemaResolutionSchema, p as DEFAULT_CONFIG, r as require_dist, s as TemplatesSchema, t as startServer, u as resolveHostedAppBaseUrl } from "./src-DglsnBxF.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { createServer } from "node:net";
5
5
  import { basename, dirname, extname, join, normalize, relative, resolve } from "path";
@@ -4508,7 +4508,7 @@ var yargs_default = Yargs;
4508
4508
  //#endregion
4509
4509
  //#region package.json
4510
4510
  var import_dist = require_dist();
4511
- var version = "2.1.4";
4511
+ var version = "2.1.6";
4512
4512
 
4513
4513
  //#endregion
4514
4514
  //#region src/export.ts
@@ -5362,6 +5362,29 @@ async function findAvailablePort(startPort, maxAttempts = 10) {
5362
5362
  throw new Error(`No available port found in range ${startPort}-${startPort + maxAttempts - 1}`);
5363
5363
  }
5364
5364
 
5365
+ //#endregion
5366
+ //#region src/startup-banner.ts
5367
+ const STARTUP_BANNER_TOP = "┌─────────────────────────────────────────────┐";
5368
+ const STARTUP_BANNER_BOTTOM = "└─────────────────────────────────────────────┘";
5369
+ const STARTUP_BANNER_INNER_WIDTH = 45;
5370
+ function centerBannerText(text, width = STARTUP_BANNER_INNER_WIDTH) {
5371
+ if (text.length >= width) return text.slice(0, width);
5372
+ const totalPadding = width - text.length;
5373
+ const leftPadding = Math.floor(totalPadding / 2);
5374
+ const rightPadding = totalPadding - leftPadding;
5375
+ return `${" ".repeat(leftPadding)}${text}${" ".repeat(rightPadding)}`;
5376
+ }
5377
+ function buildStartupBanner({ projectDir, version: version$1 }) {
5378
+ return `
5379
+ ${STARTUP_BANNER_TOP}
5380
+ │${centerBannerText(`OpenSpec UI v${version$1}`)}│
5381
+ │ Visual interface for spec-driven dev │
5382
+ ${STARTUP_BANNER_BOTTOM}
5383
+
5384
+ 📁 Project: ${projectDir}
5385
+ `;
5386
+ }
5387
+
5365
5388
  //#endregion
5366
5389
  //#region src/cli.ts
5367
5390
  const __dirname = dirname$1(fileURLToPath(import.meta.url));
@@ -5405,18 +5428,15 @@ async function main() {
5405
5428
  }, async (argv) => {
5406
5429
  const projectDir = resolve$1(originalCwd, argv["project-dir"] || argv.dir || ".");
5407
5430
  const useHostedApp = argv.app !== void 0;
5408
- console.log(`
5409
- ┌─────────────────────────────────────────────┐
5410
- │ OpenSpec UI │
5411
- │ Visual interface for spec-driven dev │
5412
- └─────────────────────────────────────────────┘
5413
- `);
5414
- console.log(`📁 Project: ${projectDir}`);
5431
+ const localVersion = getVersion();
5432
+ console.log(buildStartupBanner({
5433
+ projectDir,
5434
+ version: localVersion
5435
+ }));
5415
5436
  console.log("");
5416
5437
  let server = null;
5417
5438
  let localHostedApp = null;
5418
5439
  try {
5419
- const localVersion = getVersion();
5420
5440
  let hostedBaseUrl = null;
5421
5441
  if (useHostedApp) {
5422
5442
  const workspace = resolveLocalHostedAppWorkspace(__dirname);
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { n as createServer, t as startServer } from "./src-DFu4IXMV.mjs";
1
+ import { n as createServer, t as startServer } from "./src-DglsnBxF.mjs";
2
2
 
3
3
  export { createServer, startServer };
@@ -23193,6 +23193,19 @@ var DashboardOverviewService = class {
23193
23193
  }
23194
23194
  };
23195
23195
 
23196
+ //#endregion
23197
+ //#region ../core/src/dashboard-display.ts
23198
+ const DASHBOARD_RECENT_LIST_LIMIT = 10;
23199
+ function compareDashboardItemsByUpdatedAt(left, right) {
23200
+ return right.updatedAt - left.updatedAt || left.id.localeCompare(right.id);
23201
+ }
23202
+ function sortDashboardItemsByUpdatedAt(items) {
23203
+ return [...items].sort(compareDashboardItemsByUpdatedAt);
23204
+ }
23205
+ function selectRecentDashboardItems(items, limit = DASHBOARD_RECENT_LIST_LIMIT) {
23206
+ return sortDashboardItemsByUpdatedAt(items).slice(0, Math.max(0, Math.trunc(limit)));
23207
+ }
23208
+
23196
23209
  //#endregion
23197
23210
  //#region ../server/src/dashboard-git-snapshot.ts
23198
23211
  const execFileAsync$1 = promisify$1(execFile);
@@ -23689,12 +23702,13 @@ async function loadDashboardOverview(ctx, reason = "dashboard-refresh") {
23689
23702
  ctx.adapter.listChangesWithMeta(),
23690
23703
  ctx.adapter.listArchivedChangesWithMeta()
23691
23704
  ]);
23692
- const activeChanges = changeMetas.map((changeMeta) => ({
23705
+ const allActiveChanges = changeMetas.map((changeMeta) => ({
23693
23706
  id: changeMeta.id,
23694
23707
  name: changeMeta.name ?? changeMeta.id,
23695
23708
  progress: changeMeta.progress,
23696
23709
  updatedAt: changeMeta.updatedAt
23697
- })).sort((a, b) => b.updatedAt - a.updatedAt);
23710
+ }));
23711
+ const activeChanges = selectRecentDashboardItems(allActiveChanges);
23698
23712
  const archivedChanges = (await Promise.all(archiveMetas.map(async (meta) => {
23699
23713
  const change = await ctx.adapter.readArchivedChange(meta.id);
23700
23714
  if (!change) return null;
@@ -23705,7 +23719,7 @@ async function loadDashboardOverview(ctx, reason = "dashboard-refresh") {
23705
23719
  tasksCompleted: change.tasks.filter((task) => task.completed).length
23706
23720
  };
23707
23721
  }))).filter((item) => item !== null);
23708
- const specifications = (await Promise.all(specMetas.map(async (meta) => {
23722
+ const allSpecifications = (await Promise.all(specMetas.map(async (meta) => {
23709
23723
  const spec = await ctx.adapter.readSpec(meta.id);
23710
23724
  if (!spec) return null;
23711
23725
  return {
@@ -23714,13 +23728,14 @@ async function loadDashboardOverview(ctx, reason = "dashboard-refresh") {
23714
23728
  requirements: spec.requirements.length,
23715
23729
  updatedAt: meta.updatedAt
23716
23730
  };
23717
- }))).filter((item) => item !== null).sort((a, b) => b.requirements - a.requirements || b.updatedAt - a.updatedAt);
23718
- const requirements = specifications.reduce((sum, spec) => sum + spec.requirements, 0);
23719
- const tasksTotal = activeChanges.reduce((sum, change) => sum + change.progress.total, 0);
23720
- const tasksCompleted = activeChanges.reduce((sum, change) => sum + change.progress.completed, 0);
23731
+ }))).filter((item) => item !== null);
23732
+ const specifications = selectRecentDashboardItems(allSpecifications);
23733
+ const requirements = allSpecifications.reduce((sum, spec) => sum + spec.requirements, 0);
23734
+ const tasksTotal = allActiveChanges.reduce((sum, change) => sum + change.progress.total, 0);
23735
+ const tasksCompleted = allActiveChanges.reduce((sum, change) => sum + change.progress.completed, 0);
23721
23736
  const archivedTasksCompleted = archivedChanges.reduce((sum, change) => sum + change.tasksCompleted, 0);
23722
23737
  const taskCompletionPercent = tasksTotal > 0 ? Math.round(tasksCompleted / tasksTotal * 100) : null;
23723
- const inProgressChanges = activeChanges.filter((change) => change.progress.total > 0 && change.progress.completed < change.progress.total).length;
23738
+ const inProgressChanges = allActiveChanges.filter((change) => change.progress.total > 0 && change.progress.completed < change.progress.total).length;
23724
23739
  const specificationTrendEvents = specMetas.flatMap((spec) => {
23725
23740
  const ts = resolveTrendTimestamp(spec.createdAt, spec.updatedAt);
23726
23741
  return ts === null ? [] : [{
@@ -23736,7 +23751,7 @@ async function loadDashboardOverview(ctx, reason = "dashboard-refresh") {
23736
23751
  }];
23737
23752
  });
23738
23753
  const specMetaById = new Map(specMetas.map((meta) => [meta.id, meta]));
23739
- const requirementTrendEvents = specifications.flatMap((spec) => {
23754
+ const requirementTrendEvents = allSpecifications.flatMap((spec) => {
23740
23755
  const meta = specMetaById.get(spec.id);
23741
23756
  const ts = resolveTrendTimestamp(meta?.updatedAt, meta?.createdAt);
23742
23757
  return ts === null ? [] : [{
@@ -23744,7 +23759,7 @@ async function loadDashboardOverview(ctx, reason = "dashboard-refresh") {
23744
23759
  value: spec.requirements
23745
23760
  }];
23746
23761
  });
23747
- const hasObjectiveSpecificationTrend = specificationTrendEvents.length > 0 || specifications.length === 0;
23762
+ const hasObjectiveSpecificationTrend = specificationTrendEvents.length > 0 || allSpecifications.length === 0;
23748
23763
  const hasObjectiveRequirementTrend = requirementTrendEvents.length > 0 || requirements === 0;
23749
23764
  const hasObjectiveCompletedTrend = completedTrendEvents.length > 0 || archiveMetas.length === 0;
23750
23765
  const config = await ctx.configManager.readConfig();
@@ -23818,9 +23833,9 @@ async function loadDashboardOverview(ctx, reason = "dashboard-refresh") {
23818
23833
  });
23819
23834
  return {
23820
23835
  summary: {
23821
- specifications: specifications.length,
23836
+ specifications: allSpecifications.length,
23822
23837
  requirements,
23823
- activeChanges: activeChanges.length,
23838
+ activeChanges: allActiveChanges.length,
23824
23839
  inProgressChanges,
23825
23840
  completedChanges: archiveMetas.length,
23826
23841
  archivedTasksCompleted,
@@ -25991,7 +26006,8 @@ async function startServer(config, setupApp) {
25991
26006
  //#endregion
25992
26007
  //#region src/web-assets.ts
25993
26008
  function getWebAssetsDirCandidates(runtimeDir) {
25994
- return [join$1(runtimeDir, "..", "web"), join$1(runtimeDir, "..", "..", "web", "dist")];
26009
+ const prodPath = join$1(runtimeDir, "..", "web");
26010
+ return [join$1(runtimeDir, "..", "..", "web", "dist"), prodPath];
25995
26011
  }
25996
26012
 
25997
26013
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openspecui",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "description": "OpenSpec UI - Visual interface for spec-driven development",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -0,0 +1 @@
1
+ import"./Geometry-CNDxiJq_.js";import{r as e}from"./index-XY2gI2Cr.js";export{e as CanvasRenderer};
@@ -0,0 +1 @@
1
+ import"./Geometry-CNDxiJq_.js";import{n as e}from"./index-XY2gI2Cr.js";export{e as WebGLRenderer};
@@ -0,0 +1 @@
1
+ import"./Geometry-CNDxiJq_.js";import{t as e}from"./index-XY2gI2Cr.js";export{e as WebGPURenderer};
@@ -0,0 +1 @@
1
+ import{it as e,x as t}from"./Geometry-CNDxiJq_.js";import{c as n,l as r,o as i,s as a}from"./index-XY2gI2Cr.js";import"./init-CUcnIfzq.js";e.add(r),e.mixin(t,n),e.add(a),e.mixin(t,i);