@wrongstack/webui 0.273.1 → 0.275.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.d.ts CHANGED
@@ -428,6 +428,84 @@ interface WSSkillContent {
428
428
  sourceUrl?: string;
429
429
  };
430
430
  }
431
+ interface WSDesignKitSummary {
432
+ id: string;
433
+ name: string;
434
+ aesthetic: string;
435
+ bestFor: string;
436
+ stacks: string[];
437
+ tags: string[];
438
+ light: Record<string, string>;
439
+ dark: Record<string, string>;
440
+ }
441
+ interface WSDesignList {
442
+ type: 'design.list';
443
+ payload: {
444
+ kits: WSDesignKitSummary[];
445
+ activeKit: string | null;
446
+ stack: string | null;
447
+ overrides?: Record<string, string> | undefined;
448
+ error?: string | undefined;
449
+ };
450
+ }
451
+ interface WSDesignUse {
452
+ type: 'design.use';
453
+ payload: {
454
+ ok: boolean;
455
+ kit?: string | undefined;
456
+ name?: string | undefined;
457
+ aesthetic?: string | undefined;
458
+ stack?: string | undefined;
459
+ body?: string | undefined;
460
+ overrides?: Record<string, string> | undefined;
461
+ light?: Record<string, string> | undefined;
462
+ dark?: Record<string, string> | undefined;
463
+ error?: string | undefined;
464
+ };
465
+ }
466
+ interface WSDesignState {
467
+ type: 'design.state';
468
+ payload: {
469
+ activeKit: string | null;
470
+ stack: string | null;
471
+ overrides?: Record<string, string> | undefined;
472
+ };
473
+ }
474
+ interface WSDesignSet {
475
+ type: 'design.set';
476
+ payload: {
477
+ ok: boolean;
478
+ overrides?: Record<string, string> | undefined;
479
+ error?: string | undefined;
480
+ };
481
+ }
482
+ interface WSDesignMaterialize {
483
+ type: 'design.materialize';
484
+ payload: {
485
+ ok: boolean;
486
+ path?: string | undefined;
487
+ format?: string | undefined;
488
+ stack?: string | undefined;
489
+ error?: string | undefined;
490
+ };
491
+ }
492
+ interface WSDesignVerify {
493
+ type: 'design.verify';
494
+ payload: {
495
+ ok: boolean;
496
+ kit?: string | undefined;
497
+ filesScanned?: number | undefined;
498
+ score?: number | undefined;
499
+ violationCount?: number | undefined;
500
+ violations?: {
501
+ file: string;
502
+ line: number;
503
+ snippet: string;
504
+ reason: string;
505
+ }[] | undefined;
506
+ error?: string | undefined;
507
+ };
508
+ }
431
509
  interface WSSkillsInstalled {
432
510
  type: 'skills.installed';
433
511
  payload: {
@@ -542,9 +620,23 @@ interface WSStatsGet {
542
620
  messages: number;
543
621
  readFiles: number;
544
622
  tools: number;
623
+ sideEffectCount?: number | undefined;
545
624
  elapsedMs: number;
546
625
  };
547
626
  }
627
+ interface WSSideEffects {
628
+ type: 'side_effects';
629
+ payload: {
630
+ sideEffects: Array<{
631
+ toolUseId: string;
632
+ toolName: string;
633
+ ts: string;
634
+ input: Record<string, unknown>;
635
+ outcome?: string | undefined;
636
+ risk: string;
637
+ }>;
638
+ };
639
+ }
548
640
  interface WSSessionsList {
549
641
  type: 'sessions.list';
550
642
  payload: {
@@ -581,6 +673,7 @@ interface WSProviderModels {
581
673
  models: Array<{
582
674
  id: string;
583
675
  name: string;
676
+ description?: string | undefined;
584
677
  releaseDate?: string | undefined;
585
678
  contextWindow?: number | undefined;
586
679
  inputCost?: number | undefined;
@@ -712,7 +805,7 @@ interface WSAutoPhaseProgress {
712
805
  payload: Record<string, unknown>;
713
806
  }
714
807
  interface WSAutoPhaseLifecycle {
715
- type: 'autophase.paused' | 'autophase.resumed' | 'autophase.stopped' | 'autophase.saved' | 'autophase.completed' | 'autophase.failed' | 'autophase.error';
808
+ type: 'autophase.paused' | 'autophase.resumed' | 'autophase.stopped' | 'autophase.saved' | 'autophase.completed' | 'autophase.failed' | 'autophase.error' | 'autophase.cleared' | 'autophase.reverted';
716
809
  payload: Record<string, unknown>;
717
810
  }
718
811
  interface WSAutoPhaseList {
@@ -756,6 +849,8 @@ interface WorktreeHandleView {
756
849
  handleId: string;
757
850
  ownerId: string;
758
851
  ownerLabel: string;
852
+ /** Absolute checkout path (for open-in-terminal / remove). */
853
+ dir?: string | undefined;
759
854
  branch: string;
760
855
  baseBranch: string;
761
856
  status: 'allocating' | 'active' | 'committing' | 'merging' | 'merged' | 'needs-review' | 'failed';
@@ -789,12 +884,73 @@ interface WSWorktreeEvent {
789
884
  at: number;
790
885
  };
791
886
  }
887
+ /** One orphaned git artifact left by a previous/crashed run. */
888
+ interface WorktreeOrphanView {
889
+ /** Absolute checkout path (omitted for a branch-only orphan). */
890
+ dir?: string | undefined;
891
+ /** Branch name (`wstack/ap/*`), when known. */
892
+ branch?: string | undefined;
893
+ kind: 'worktree' | 'branch';
894
+ }
895
+ /** Disk-scanned orphan inventory + whether it is safe to clean right now. */
896
+ interface WSWorktreeOrphans {
897
+ type: 'worktree.orphans';
898
+ payload: {
899
+ orphans: WorktreeOrphanView[];
900
+ /** False while a run is live (in this session or another process). */
901
+ canClean: boolean;
902
+ /** Why cleaning is blocked, when canClean is false. */
903
+ reason?: string | undefined;
904
+ };
905
+ }
906
+ /** Outcome of a worktree-panel orphan cleanup (bulk or single remove). */
907
+ interface WSWorktreeCleanupResult {
908
+ type: 'worktree.cleanup_result';
909
+ payload: {
910
+ ok: boolean;
911
+ removed: number;
912
+ reason?: string | undefined;
913
+ };
914
+ }
915
+ /** Compact per-worktree change summary. */
916
+ interface WorktreeDiffSummary {
917
+ files: Array<{
918
+ path: string;
919
+ insertions: number;
920
+ deletions: number;
921
+ }>;
922
+ insertions: number;
923
+ deletions: number;
924
+ commits: number;
925
+ }
926
+ /** Outcome of a per-worktree squash-merge into base. */
927
+ interface WSWorktreeMergeResult {
928
+ type: 'worktree.merge_result';
929
+ payload: {
930
+ ok: boolean;
931
+ branch: string;
932
+ conflict?: boolean | undefined;
933
+ conflictFiles?: string[] | undefined;
934
+ reason?: string | undefined;
935
+ };
936
+ }
937
+ /** Result of a per-worktree "View changes" request. */
938
+ interface WSWorktreeDiffResult {
939
+ type: 'worktree.diff_result';
940
+ payload: {
941
+ dir: string;
942
+ summary: WorktreeDiffSummary | null;
943
+ };
944
+ }
792
945
  type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
793
946
  type: 'autophase.start';
794
947
  payload: {
795
948
  title: string;
796
949
  phases?: unknown[] | undefined;
797
950
  autonomous?: boolean | undefined;
951
+ /** Per-run override of git-worktree isolation. Omitted → env default
952
+ * (WRONGSTACK_AUTOPHASE_WORKTREES). false → run on the current branch. */
953
+ worktrees?: boolean | undefined;
798
954
  };
799
955
  } | {
800
956
  type: 'autophase.pause';
@@ -805,6 +961,12 @@ type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
805
961
  } | {
806
962
  type: 'autophase.stop';
807
963
  payload: Record<string, never>;
964
+ } | {
965
+ type: 'autophase.clear';
966
+ payload?: Record<string, never>;
967
+ } | {
968
+ type: 'autophase.revert';
969
+ payload?: Record<string, never>;
808
970
  } | {
809
971
  type: 'autophase.status';
810
972
  payload?: Record<string, never>;
@@ -975,6 +1137,35 @@ type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
975
1137
  payload?: {
976
1138
  runId?: string | undefined;
977
1139
  };
1140
+ } | {
1141
+ type: 'sdd.board.destroy';
1142
+ payload?: {
1143
+ runId?: string | undefined;
1144
+ revertMerged?: boolean | undefined;
1145
+ };
1146
+ } | {
1147
+ type: 'worktree.scan';
1148
+ payload?: Record<string, never>;
1149
+ } | {
1150
+ type: 'worktree.cleanup';
1151
+ payload?: Record<string, never>;
1152
+ } | {
1153
+ type: 'worktree.remove';
1154
+ payload: {
1155
+ dir?: string | undefined;
1156
+ branch?: string | undefined;
1157
+ };
1158
+ } | {
1159
+ type: 'worktree.merge';
1160
+ payload: {
1161
+ branch: string;
1162
+ };
1163
+ } | {
1164
+ type: 'worktree.diff';
1165
+ payload: {
1166
+ dir: string;
1167
+ baseBranch?: string | undefined;
1168
+ };
978
1169
  } | {
979
1170
  type: 'sdd.spec.start';
980
1171
  payload: {
@@ -998,6 +1189,9 @@ type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
998
1189
  model?: string | undefined;
999
1190
  provider?: string | undefined;
1000
1191
  fallbackModels?: string[] | undefined;
1192
+ /** Per-run override of git-worktree isolation. Omitted → env default
1193
+ * (WRONGSTACK_SDD_WORKTREES). false → run on the current branch. */
1194
+ worktrees?: boolean | undefined;
1001
1195
  };
1002
1196
  } | {
1003
1197
  type: 'abort';
@@ -1165,6 +1359,48 @@ type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
1165
1359
  name: string;
1166
1360
  source: string;
1167
1361
  };
1362
+ } | {
1363
+ type: 'prompts.list';
1364
+ } | {
1365
+ type: 'prompts.search';
1366
+ payload: {
1367
+ query?: string | undefined;
1368
+ category?: string | undefined;
1369
+ };
1370
+ } | {
1371
+ type: 'prompts.content';
1372
+ payload: {
1373
+ slug: string;
1374
+ };
1375
+ } | {
1376
+ type: 'prompts.favorite';
1377
+ payload: {
1378
+ slug: string;
1379
+ favorite: boolean;
1380
+ };
1381
+ } | {
1382
+ type: 'prompts.used';
1383
+ payload: {
1384
+ slug: string;
1385
+ };
1386
+ } | {
1387
+ type: 'prompts.recent';
1388
+ } | {
1389
+ type: 'prompts.create';
1390
+ payload: {
1391
+ title: string;
1392
+ content: string;
1393
+ description?: string | undefined;
1394
+ category?: string | undefined;
1395
+ tags?: string[] | undefined;
1396
+ variables?: {
1397
+ name: string;
1398
+ description?: string | undefined;
1399
+ required?: boolean | undefined;
1400
+ multiline?: boolean | undefined;
1401
+ enum?: string[] | undefined;
1402
+ }[] | undefined;
1403
+ };
1168
1404
  } | {
1169
1405
  type: 'diag.get';
1170
1406
  } | {
@@ -1379,6 +1615,30 @@ type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
1379
1615
  name: string;
1380
1616
  body: string;
1381
1617
  };
1618
+ } | {
1619
+ type: 'design.list';
1620
+ } | {
1621
+ type: 'design.use';
1622
+ payload: {
1623
+ kit: string;
1624
+ stack?: string | undefined;
1625
+ overrides?: Record<string, string> | undefined;
1626
+ };
1627
+ } | {
1628
+ type: 'design.state';
1629
+ } | {
1630
+ type: 'design.set';
1631
+ payload: {
1632
+ overrides: Record<string, string>;
1633
+ };
1634
+ } | {
1635
+ type: 'design.materialize';
1636
+ payload?: {
1637
+ stack?: string | undefined;
1638
+ out?: string | undefined;
1639
+ } | undefined;
1640
+ } | {
1641
+ type: 'design.verify';
1382
1642
  } | {
1383
1643
  type: 'mcp.list';
1384
1644
  } | {
@@ -1473,7 +1733,7 @@ type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
1473
1733
  } | {
1474
1734
  type: 'webui.shutdown';
1475
1735
  };
1476
- type WSServerMessage = WSSessionStart | WSSessionEnd | WSTextDelta | WSThinkingDelta | WSToolUseStart | WSToolProgress | WSToolExecuted | WSIterationStarted | WSIterationCompleted | WSIterationLimitReached | WSProviderResponse | WSProviderRetry | WSProviderError | WSProviderFallback | WSProviderStreamError | WSRunResult | WSSessionStats | WSError | WSToolConfirmNeeded | WSTrustPersisted | WSToolLoopDetected | WSDelegateStarted | WSDelegateCompleted | WSContextDebug | WSContextCompacted | WSCompactionFailed | WSContextRepaired | WSContextPct | WSContextMaxContext | WSTokenThreshold | WSTokenCostEstimateUnavailable | WSContextModesList | WSContextModeChanged | WSToolsList | WSMemoryList | WSSkillsList | WSSkillContent | WSSkillsInstalled | WSSkillsUninstalled | WSSkillsUpdated | WSSkillsCreated | WSSkillsEdited | WSSkillsExported | WSDiagGet | WSStatsGet | WSSessionsList | WSProviderCatalog | WSProviderModels | WSSavedProviders | WSProviderProbe | WSKeyOperationResult | WSFilesList | {
1736
+ type WSServerMessage = WSSessionStart | WSSessionEnd | WSTextDelta | WSThinkingDelta | WSToolUseStart | WSToolProgress | WSToolExecuted | WSIterationStarted | WSIterationCompleted | WSIterationLimitReached | WSProviderResponse | WSProviderRetry | WSProviderError | WSProviderFallback | WSProviderStreamError | WSRunResult | WSSessionStats | WSError | WSToolConfirmNeeded | WSTrustPersisted | WSToolLoopDetected | WSDelegateStarted | WSDelegateCompleted | WSContextDebug | WSContextCompacted | WSCompactionFailed | WSContextRepaired | WSContextPct | WSContextMaxContext | WSTokenThreshold | WSTokenCostEstimateUnavailable | WSContextModesList | WSContextModeChanged | WSToolsList | WSMemoryList | WSSkillsList | WSSkillContent | WSDesignList | WSDesignUse | WSDesignState | WSDesignSet | WSDesignMaterialize | WSDesignVerify | WSSkillsInstalled | WSSkillsUninstalled | WSSkillsUpdated | WSSkillsCreated | WSSkillsEdited | WSSkillsExported | WSDiagGet | WSStatsGet | WSSessionsList | WSProviderCatalog | WSProviderModels | WSSavedProviders | WSProviderProbe | WSKeyOperationResult | WSFilesList | {
1477
1737
  type: 'files.tree';
1478
1738
  payload: {
1479
1739
  root: string;
@@ -1516,12 +1776,22 @@ type WSServerMessage = WSSessionStart | WSSessionEnd | WSTextDelta | WSThinkingD
1516
1776
  payload: Record<string, unknown>;
1517
1777
  } | {
1518
1778
  type: 'sdd.board.snapshot';
1519
- payload: Record<string, unknown>;
1779
+ payload: Record<string, unknown> | null;
1520
1780
  } | {
1521
1781
  type: 'sdd.board.list';
1522
1782
  payload: {
1523
1783
  boards: unknown[];
1524
1784
  };
1785
+ } | {
1786
+ type: 'sdd.board.lifecycle_result';
1787
+ payload: {
1788
+ op: 'cleanup_worktrees' | 'rollback' | 'destroy';
1789
+ ok: boolean;
1790
+ removed?: number;
1791
+ reverted?: number;
1792
+ deleted?: string[];
1793
+ reason?: string;
1794
+ };
1525
1795
  } | {
1526
1796
  type: 'sdd.spec.snapshot';
1527
1797
  payload: Record<string, unknown>;
@@ -1545,7 +1815,7 @@ type WSServerMessage = WSSessionStart | WSSessionEnd | WSTextDelta | WSThinkingD
1545
1815
  payload: Record<string, unknown> & {
1546
1816
  kind: string;
1547
1817
  };
1548
- } | WSWorktreeState | WSWorktreeEvent | WSCollabState | WSCollabParticipantJoined | WSCollabParticipantLeft | WSCollabEvent | WSCollabAnnotationAdded | WSCollabAnnotationResolved | WSCollabPauseGranted | WSCollabPauseReleased | WSCollabInjectionGranted | {
1818
+ } | WSWorktreeState | WSWorktreeEvent | WSWorktreeOrphans | WSWorktreeCleanupResult | WSWorktreeMergeResult | WSWorktreeDiffResult | WSCollabState | WSCollabParticipantJoined | WSCollabParticipantLeft | WSCollabEvent | WSCollabAnnotationAdded | WSCollabAnnotationResolved | WSCollabPauseGranted | WSCollabPauseReleased | WSCollabInjectionGranted | {
1549
1819
  type: 'session.checkpoints';
1550
1820
  payload: {
1551
1821
  checkpoints: Array<{
@@ -2171,4 +2441,4 @@ interface WSCollabInjectionGranted {
2171
2441
  };
2172
2442
  }
2173
2443
 
2174
- export type { BroadcastFn, CollabPanelMessage, CollabRole, CompletionItemKind, MemoryScope, WSAgentStatusChanged, WSAgentTimelineMessage, WSAutoPhaseLifecycle, WSAutoPhaseList, WSAutoPhaseProgress, WSAutoPhaseState, WSClientMessage, WSCollabAnnotate, WSCollabAnnotationAdded, WSCollabAnnotationResolved, WSCollabEvent, WSCollabGrantControl, WSCollabInjectTool, WSCollabInjectionGranted, WSCollabJoin, WSCollabLeave, WSCollabParticipantJoined, WSCollabParticipantLeft, WSCollabPauseGranted, WSCollabPauseReleased, WSCollabRequestPause, WSCollabResolve, WSCollabResume, WSCollabState, WSCompactionFailed, WSCompletionRequest, WSCompletionResult, WSContextCompacted, WSContextDebug, WSContextMaxContext, WSContextModeChanged, WSContextModesList, WSContextPct, WSContextRepaired, WSDelegateCompleted, WSDelegateStarted, WSDiagGet, WSError, WSEternalIteration, WSFilesList, WSIterationCompleted, WSIterationLimitReached, WSIterationStarted, WSKeyOperationResult, WSMemoryList, WSMessage, WSModelSwitch, WSModesList, WSProviderCatalog, WSProviderError, WSProviderFallback, WSProviderModels, WSProviderProbe, WSProviderResponse, WSProviderRetry, WSProviderStreamError, WSRunResult, WSSavedProviders, WSServerMessage, WSSessionEnd, WSSessionStart, WSSessionStats, WSSessionsList, WSSkillContent, WSSkillsCreated, WSSkillsEdited, WSSkillsExported, WSSkillsInstalled, WSSkillsList, WSSkillsUninstalled, WSSkillsUpdated, WSStatsGet, WSTextDelta, WSThinkingDelta, WSTodosCleared, WSTodosUpdated, WSTokenCostEstimateUnavailable, WSTokenThreshold, WSToolConfirmNeeded, WSToolConfirmResult, WSToolExecuted, WSToolLoopDetected, WSToolProgress, WSToolUseStart, WSToolsList, WSTrustPersisted, WSUserMessage, WSWorktreeEvent, WSWorktreeState, WorktreeHandleView };
2444
+ export type { BroadcastFn, CollabPanelMessage, CollabRole, CompletionItemKind, MemoryScope, WSAgentStatusChanged, WSAgentTimelineMessage, WSAutoPhaseLifecycle, WSAutoPhaseList, WSAutoPhaseProgress, WSAutoPhaseState, WSClientMessage, WSCollabAnnotate, WSCollabAnnotationAdded, WSCollabAnnotationResolved, WSCollabEvent, WSCollabGrantControl, WSCollabInjectTool, WSCollabInjectionGranted, WSCollabJoin, WSCollabLeave, WSCollabParticipantJoined, WSCollabParticipantLeft, WSCollabPauseGranted, WSCollabPauseReleased, WSCollabRequestPause, WSCollabResolve, WSCollabResume, WSCollabState, WSCompactionFailed, WSCompletionRequest, WSCompletionResult, WSContextCompacted, WSContextDebug, WSContextMaxContext, WSContextModeChanged, WSContextModesList, WSContextPct, WSContextRepaired, WSDelegateCompleted, WSDelegateStarted, WSDesignKitSummary, WSDesignList, WSDesignMaterialize, WSDesignSet, WSDesignState, WSDesignUse, WSDesignVerify, WSDiagGet, WSError, WSEternalIteration, WSFilesList, WSIterationCompleted, WSIterationLimitReached, WSIterationStarted, WSKeyOperationResult, WSMemoryList, WSMessage, WSModelSwitch, WSModesList, WSProviderCatalog, WSProviderError, WSProviderFallback, WSProviderModels, WSProviderProbe, WSProviderResponse, WSProviderRetry, WSProviderStreamError, WSRunResult, WSSavedProviders, WSServerMessage, WSSessionEnd, WSSessionStart, WSSessionStats, WSSessionsList, WSSideEffects, WSSkillContent, WSSkillsCreated, WSSkillsEdited, WSSkillsExported, WSSkillsInstalled, WSSkillsList, WSSkillsUninstalled, WSSkillsUpdated, WSStatsGet, WSTextDelta, WSThinkingDelta, WSTodosCleared, WSTodosUpdated, WSTokenCostEstimateUnavailable, WSTokenThreshold, WSToolConfirmNeeded, WSToolConfirmResult, WSToolExecuted, WSToolLoopDetected, WSToolProgress, WSToolUseStart, WSToolsList, WSTrustPersisted, WSUserMessage, WSWorktreeCleanupResult, WSWorktreeDiffResult, WSWorktreeEvent, WSWorktreeMergeResult, WSWorktreeOrphans, WSWorktreeState, WorktreeDiffSummary, WorktreeHandleView, WorktreeOrphanView };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/webui",
3
- "version": "0.273.1",
3
+ "version": "0.275.0",
4
4
  "license": "MIT",
5
5
  "description": "Browser-based WebUI for WrongStack — React + Vite frontend with WebSocket backend that drives the same agent kernel as the CLI/TUI.",
6
6
  "keywords": [
@@ -50,7 +50,7 @@
50
50
  "main": "./dist/index.js",
51
51
  "types": "./dist/index.d.ts",
52
52
  "bin": {
53
- "webui": "./dist/server/entry.js"
53
+ "wstackui": "./dist/server/entry.js"
54
54
  },
55
55
  "dependencies": {
56
56
  "@fontsource-variable/ibm-plex-sans": "^5.2.8",
@@ -86,11 +86,11 @@
86
86
  "virtua": "^0.49.1",
87
87
  "ws": "^8.21.0",
88
88
  "zustand": "^5.0.14",
89
- "@wrongstack/mcp": "0.273.1",
90
- "@wrongstack/core": "0.273.1",
91
- "@wrongstack/tools": "0.273.1",
92
- "@wrongstack/runtime": "0.273.1",
93
- "@wrongstack/providers": "0.273.1"
89
+ "@wrongstack/core": "0.275.0",
90
+ "@wrongstack/providers": "0.275.0",
91
+ "@wrongstack/tools": "0.275.0",
92
+ "@wrongstack/mcp": "0.275.0",
93
+ "@wrongstack/runtime": "0.275.0"
94
94
  },
95
95
  "peerDependencies": {
96
96
  "node-pty": "^1.1.0"