@openspecui/core 3.2.3 → 3.3.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/index.d.mts CHANGED
@@ -20,13 +20,13 @@ declare const ChangeFileSchema: z.ZodObject<{
20
20
  /** Optional byte size for files */
21
21
  size: z.ZodOptional<z.ZodNumber>;
22
22
  }, "strip", z.ZodTypeAny, {
23
- path: string;
24
23
  type: "file" | "directory";
24
+ path: string;
25
25
  content?: string | undefined;
26
26
  size?: number | undefined;
27
27
  }, {
28
- path: string;
29
28
  type: "file" | "directory";
29
+ path: string;
30
30
  content?: string | undefined;
31
31
  size?: number | undefined;
32
32
  }>;
@@ -307,11 +307,11 @@ declare const DeltaSpecSchema: z.ZodObject<{
307
307
  /** Raw markdown content of the delta spec */
308
308
  content: z.ZodString;
309
309
  }, "strip", z.ZodTypeAny, {
310
- content: string;
311
310
  specId: string;
312
- }, {
313
311
  content: string;
312
+ }, {
314
313
  specId: string;
314
+ content: string;
315
315
  }>;
316
316
  type DeltaSpec = z.infer<typeof DeltaSpecSchema>;
317
317
  /**
@@ -489,11 +489,11 @@ declare const ChangeSchema: z.ZodObject<{
489
489
  /** Raw markdown content of the delta spec */
490
490
  content: z.ZodString;
491
491
  }, "strip", z.ZodTypeAny, {
492
- content: string;
493
492
  specId: string;
494
- }, {
495
493
  content: string;
494
+ }, {
496
495
  specId: string;
496
+ content: string;
497
497
  }>, "many">>;
498
498
  /** Optional metadata */
499
499
  metadata: z.ZodOptional<z.ZodObject<{
@@ -550,8 +550,8 @@ declare const ChangeSchema: z.ZodObject<{
550
550
  } | undefined;
551
551
  design?: string | undefined;
552
552
  deltaSpecs?: {
553
- content: string;
554
553
  specId: string;
554
+ content: string;
555
555
  }[] | undefined;
556
556
  }, {
557
557
  id: string;
@@ -597,8 +597,8 @@ declare const ChangeSchema: z.ZodObject<{
597
597
  } | undefined;
598
598
  design?: string | undefined;
599
599
  deltaSpecs?: {
600
- content: string;
601
600
  specId: string;
601
+ content: string;
602
602
  }[] | undefined;
603
603
  }>;
604
604
  type Change = z.infer<typeof ChangeSchema>;
@@ -804,8 +804,8 @@ declare class OpenSpecAdapter {
804
804
  } | undefined;
805
805
  design?: string | undefined;
806
806
  deltaSpecs?: {
807
- content: string;
808
807
  specId: string;
808
+ content: string;
809
809
  }[] | undefined;
810
810
  }[];
811
811
  archivedCount: number;
@@ -1456,9 +1456,9 @@ type GitConfig = z.infer<typeof GitConfigSchema>;
1456
1456
  declare const OpsxConfigSchema: z.ZodObject<{
1457
1457
  agentInvocationMode: z.ZodDefault<z.ZodEnum<["compose", "command"]>>;
1458
1458
  }, "strip", z.ZodTypeAny, {
1459
- agentInvocationMode: "compose" | "command";
1459
+ agentInvocationMode: "command" | "compose";
1460
1460
  }, {
1461
- agentInvocationMode?: "compose" | "command" | undefined;
1461
+ agentInvocationMode?: "command" | "compose" | undefined;
1462
1462
  }>;
1463
1463
  type OpsxConfig = z.infer<typeof OpsxConfigSchema>;
1464
1464
  /**
@@ -1496,9 +1496,9 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1496
1496
  opsx: z.ZodDefault<z.ZodObject<{
1497
1497
  agentInvocationMode: z.ZodDefault<z.ZodEnum<["compose", "command"]>>;
1498
1498
  }, "strip", z.ZodTypeAny, {
1499
- agentInvocationMode: "compose" | "command";
1499
+ agentInvocationMode: "command" | "compose";
1500
1500
  }, {
1501
- agentInvocationMode?: "compose" | "command" | undefined;
1501
+ agentInvocationMode?: "command" | "compose" | undefined;
1502
1502
  }>>;
1503
1503
  /** 终端配置 */
1504
1504
  terminal: z.ZodDefault<z.ZodObject<{
@@ -1559,7 +1559,7 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1559
1559
  };
1560
1560
  appBaseUrl: string;
1561
1561
  opsx: {
1562
- agentInvocationMode: "compose" | "command";
1562
+ agentInvocationMode: "command" | "compose";
1563
1563
  };
1564
1564
  terminal: {
1565
1565
  fontSize: number;
@@ -1589,7 +1589,7 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1589
1589
  } | undefined;
1590
1590
  appBaseUrl?: string | undefined;
1591
1591
  opsx?: {
1592
- agentInvocationMode?: "compose" | "command" | undefined;
1592
+ agentInvocationMode?: "command" | "compose" | undefined;
1593
1593
  } | undefined;
1594
1594
  terminal?: {
1595
1595
  fontSize?: number | undefined;
@@ -2441,7 +2441,10 @@ interface ExportSnapshot {
2441
2441
  specs: Array<{
2442
2442
  id: string;
2443
2443
  name: string;
2444
+ /** Processed markdown shown by default in static OpenSpecUI. */
2444
2445
  content: string;
2446
+ /** Original source markdown, preserved for raw/source views. */
2447
+ sourceContent?: string;
2445
2448
  overview: string;
2446
2449
  requirements: Array<{
2447
2450
  id: string;
@@ -2457,9 +2460,14 @@ interface ExportSnapshot {
2457
2460
  changes: Array<{
2458
2461
  id: string;
2459
2462
  name: string;
2463
+ /** Processed proposal markdown shown by default in static OpenSpecUI. */
2460
2464
  proposal: string;
2465
+ /** Original source proposal markdown. */
2466
+ sourceProposal?: string;
2461
2467
  tasks?: string;
2468
+ sourceTasks?: string;
2462
2469
  design?: string;
2470
+ sourceDesign?: string;
2463
2471
  why: string;
2464
2472
  whatChanges: string;
2465
2473
  parsedTasks: Array<{
@@ -2470,7 +2478,10 @@ interface ExportSnapshot {
2470
2478
  }>;
2471
2479
  deltas: Array<{
2472
2480
  capability: string;
2481
+ /** Processed delta spec markdown. */
2473
2482
  content: string;
2483
+ /** Original source delta spec markdown. */
2484
+ sourceContent?: string;
2474
2485
  }>;
2475
2486
  progress: {
2476
2487
  total: number;
@@ -2483,9 +2494,14 @@ interface ExportSnapshot {
2483
2494
  archives: Array<{
2484
2495
  id: string;
2485
2496
  name: string;
2497
+ /** Processed proposal markdown shown by default in static OpenSpecUI. */
2486
2498
  proposal: string;
2499
+ /** Original source proposal markdown. */
2500
+ sourceProposal?: string;
2487
2501
  tasks?: string;
2502
+ sourceTasks?: string;
2488
2503
  design?: string;
2504
+ sourceDesign?: string;
2489
2505
  why: string;
2490
2506
  whatChanges: string;
2491
2507
  parsedTasks: Array<{
@@ -2580,6 +2596,131 @@ interface GitWorktreeHandoff {
2580
2596
  serverUrl: string;
2581
2597
  }
2582
2598
  //#endregion
2599
+ //#region src/hooks.d.ts
2600
+ declare const OPENSPECUI_HOOKS_VERSION = 1;
2601
+ /** Severity level for diagnostics returned by project hooks. */
2602
+ type HookDiagnosticLevel = 'info' | 'warning' | 'error';
2603
+ /** Non-fatal hook diagnostic surfaced with the processed result. */
2604
+ interface HookDiagnosticV1 {
2605
+ level: HookDiagnosticLevel;
2606
+ message: string;
2607
+ }
2608
+ /** Project-scoped lifecycle helpers available to hooks. */
2609
+ interface HookLifecycleV1 {
2610
+ /**
2611
+ * Register cleanup work for the project hook runtime.
2612
+ *
2613
+ * This lifecycle is project-scoped, not call-scoped, so daemon-style hooks can
2614
+ * keep one process alive for the OpenSpecUI session.
2615
+ */
2616
+ onDispose(cleanup: () => void | Promise<void>): void;
2617
+ }
2618
+ /** OpenSpecUI consumer requesting a processed document projection. */
2619
+ type DocumentConsumerV1 = 'view' | 'search' | 'export';
2620
+ /** Document read mode; source reads bypass hooks and stay audit-safe. */
2621
+ type DocumentReadModeV1 = 'source' | 'processed';
2622
+ /** Stable identity for the OpenSpec document currently being read. */
2623
+ interface DocumentRefV1 {
2624
+ stage: 'project' | 'main' | 'change' | 'archive';
2625
+ kind: 'project' | 'spec' | 'proposal' | 'design' | 'tasks' | 'delta-spec';
2626
+ relativePath: string;
2627
+ absolutePath: string;
2628
+ specId?: string;
2629
+ changeId?: string;
2630
+ }
2631
+ /** Context passed to `onReadDocument`. */
2632
+ interface ReadDocumentContextV1 {
2633
+ version: typeof OPENSPECUI_HOOKS_VERSION;
2634
+ projectDir: string;
2635
+ consumer: DocumentConsumerV1;
2636
+ document: DocumentRefV1;
2637
+ signal: AbortSignal;
2638
+ lifecycle: HookLifecycleV1;
2639
+ }
2640
+ /** Markdown projection returned by document reads and `onReadDocument`. */
2641
+ interface ReadDocumentResultV1 {
2642
+ markdown: string;
2643
+ sourceLabel?: string;
2644
+ title?: string;
2645
+ diagnostics?: HookDiagnosticV1[];
2646
+ watchFiles?: string[];
2647
+ }
2648
+ /** Intercepts processed OpenSpec markdown reads for view, search, and export. */
2649
+ type OnReadDocumentHookV1 = (ctx: ReadDocumentContextV1, read: () => Promise<ReadDocumentResultV1>) => Promise<ReadDocumentResultV1>;
2650
+ /** OPSX workflow action names that can be customized by `onRunWorkflow`. */
2651
+ type WorkflowActionV1 = 'explore' | 'propose' | 'new' | 'continue' | 'ff' | 'apply' | 'verify' | 'sync' | 'archive' | 'bulk-archive' | 'onboard';
2652
+ /** Invocation mode requested by the UI before action-specific fallback resolution. */
2653
+ type WorkflowRequestedModeV1 = 'compose' | 'command' | 'direct';
2654
+ /** Normalized OPSX workflow input passed to `onRunWorkflow`. */
2655
+ type RunWorkflowInputV1 = {
2656
+ action: 'explore' | 'propose';
2657
+ text: string;
2658
+ } | {
2659
+ action: 'new';
2660
+ changeId: string;
2661
+ schema?: string;
2662
+ description?: string;
2663
+ extraArgs: string[];
2664
+ } | {
2665
+ action: 'continue' | 'ff';
2666
+ changeId: string;
2667
+ artifactId: string;
2668
+ schema?: string;
2669
+ } | {
2670
+ action: 'apply' | 'archive' | 'verify' | 'sync';
2671
+ changeId: string;
2672
+ schema?: string;
2673
+ strict?: boolean;
2674
+ } | {
2675
+ action: 'bulk-archive';
2676
+ changeIds?: string[];
2677
+ schema?: string;
2678
+ } | {
2679
+ action: 'onboard';
2680
+ };
2681
+ /** Actual invocation mode after OpenSpecUI applies action capability rules. */
2682
+ interface WorkflowInvocationModeResolutionV1 {
2683
+ requestedMode: WorkflowRequestedModeV1;
2684
+ actualMode: WorkflowRequestedModeV1;
2685
+ fallbackReason: string | null;
2686
+ }
2687
+ /** Context passed to `onRunWorkflow`. */
2688
+ interface RunWorkflowContextV1 {
2689
+ version: typeof OPENSPECUI_HOOKS_VERSION;
2690
+ projectDir: string;
2691
+ action: WorkflowActionV1;
2692
+ requestedMode: WorkflowRequestedModeV1;
2693
+ input: RunWorkflowInputV1;
2694
+ signal: AbortSignal;
2695
+ lifecycle: HookLifecycleV1;
2696
+ }
2697
+ /** Final OPSX invocation payload produced by OpenSpecUI or `onRunWorkflow`. */
2698
+ type RunWorkflowResultV1 = {
2699
+ kind: 'agent-prompt';
2700
+ text: string;
2701
+ format: 'markdown';
2702
+ mode?: WorkflowInvocationModeResolutionV1;
2703
+ diagnostics?: HookDiagnosticV1[];
2704
+ } | {
2705
+ kind: 'agent-command';
2706
+ text: string;
2707
+ mode?: WorkflowInvocationModeResolutionV1;
2708
+ diagnostics?: HookDiagnosticV1[];
2709
+ } | {
2710
+ kind: 'cli-command';
2711
+ command: string;
2712
+ args: string[];
2713
+ mode?: WorkflowInvocationModeResolutionV1;
2714
+ diagnostics?: HookDiagnosticV1[];
2715
+ };
2716
+ /** Intercepts the final OPSX invocation payload before the UI runs it. */
2717
+ type OnRunWorkflowHookV1 = (ctx: RunWorkflowContextV1, run: () => Promise<RunWorkflowResultV1>) => Promise<RunWorkflowResultV1>;
2718
+ /** Project hook module shape exported from `openspec/openspecui.hooks.ts`. */
2719
+ interface OpenSpecUIHooksV1 {
2720
+ onReadDocument?: OnReadDocumentHookV1;
2721
+ onRunWorkflow?: OnRunWorkflowHookV1;
2722
+ }
2723
+ //#endregion
2583
2724
  //#region src/runtime-types.d.ts
2584
2725
  type ProjectRecoveryStatus = {
2585
2726
  state: 'idle';
@@ -2721,22 +2862,22 @@ declare const PtySessionInfoSchema: z.ZodObject<{
2721
2862
  closeTip: z.ZodOptional<z.ZodString>;
2722
2863
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2723
2864
  }, "strip", z.ZodTypeAny, {
2724
- id: string;
2725
2865
  command: string;
2726
2866
  args: string[];
2727
2867
  platform: "windows" | "macos" | "common";
2728
2868
  exitCode: number | null;
2729
2869
  title: string;
2870
+ id: string;
2730
2871
  isExited: boolean;
2731
2872
  closeTip?: string | undefined;
2732
2873
  closeCallbackUrl?: string | Record<string, string> | undefined;
2733
2874
  }, {
2734
- id: string;
2735
2875
  command: string;
2736
2876
  args: string[];
2737
2877
  platform: "windows" | "macos" | "common";
2738
2878
  exitCode: number | null;
2739
2879
  title: string;
2880
+ id: string;
2740
2881
  isExited: boolean;
2741
2882
  closeTip?: string | undefined;
2742
2883
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2753,19 +2894,19 @@ declare const PtyCreateMessageSchema: z.ZodObject<{
2753
2894
  }, "strip", z.ZodTypeAny, {
2754
2895
  type: "create";
2755
2896
  requestId: string;
2756
- command?: string | undefined;
2757
- args?: string[] | undefined;
2758
2897
  cols?: number | undefined;
2759
2898
  rows?: number | undefined;
2899
+ command?: string | undefined;
2900
+ args?: string[] | undefined;
2760
2901
  closeTip?: string | undefined;
2761
2902
  closeCallbackUrl?: string | Record<string, string> | undefined;
2762
2903
  }, {
2763
2904
  type: "create";
2764
2905
  requestId: string;
2765
- command?: string | undefined;
2766
- args?: string[] | undefined;
2767
2906
  cols?: number | undefined;
2768
2907
  rows?: number | undefined;
2908
+ command?: string | undefined;
2909
+ args?: string[] | undefined;
2769
2910
  closeTip?: string | undefined;
2770
2911
  closeCallbackUrl?: string | Record<string, string> | undefined;
2771
2912
  }>;
@@ -2843,19 +2984,19 @@ declare const PtyClientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2843
2984
  }, "strip", z.ZodTypeAny, {
2844
2985
  type: "create";
2845
2986
  requestId: string;
2846
- command?: string | undefined;
2847
- args?: string[] | undefined;
2848
2987
  cols?: number | undefined;
2849
2988
  rows?: number | undefined;
2989
+ command?: string | undefined;
2990
+ args?: string[] | undefined;
2850
2991
  closeTip?: string | undefined;
2851
2992
  closeCallbackUrl?: string | Record<string, string> | undefined;
2852
2993
  }, {
2853
2994
  type: "create";
2854
2995
  requestId: string;
2855
- command?: string | undefined;
2856
- args?: string[] | undefined;
2857
2996
  cols?: number | undefined;
2858
2997
  rows?: number | undefined;
2998
+ command?: string | undefined;
2999
+ args?: string[] | undefined;
2859
3000
  closeTip?: string | undefined;
2860
3001
  closeCallbackUrl?: string | Record<string, string> | undefined;
2861
3002
  }>, z.ZodObject<{
@@ -2997,22 +3138,22 @@ declare const PtyListResponseSchema: z.ZodObject<{
2997
3138
  closeTip: z.ZodOptional<z.ZodString>;
2998
3139
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2999
3140
  }, "strip", z.ZodTypeAny, {
3000
- id: string;
3001
3141
  command: string;
3002
3142
  args: string[];
3003
3143
  platform: "windows" | "macos" | "common";
3004
3144
  exitCode: number | null;
3005
3145
  title: string;
3146
+ id: string;
3006
3147
  isExited: boolean;
3007
3148
  closeTip?: string | undefined;
3008
3149
  closeCallbackUrl?: string | Record<string, string> | undefined;
3009
3150
  }, {
3010
- id: string;
3011
3151
  command: string;
3012
3152
  args: string[];
3013
3153
  platform: "windows" | "macos" | "common";
3014
3154
  exitCode: number | null;
3015
3155
  title: string;
3156
+ id: string;
3016
3157
  isExited: boolean;
3017
3158
  closeTip?: string | undefined;
3018
3159
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3020,12 +3161,12 @@ declare const PtyListResponseSchema: z.ZodObject<{
3020
3161
  }, "strip", z.ZodTypeAny, {
3021
3162
  type: "list";
3022
3163
  sessions: {
3023
- id: string;
3024
3164
  command: string;
3025
3165
  args: string[];
3026
3166
  platform: "windows" | "macos" | "common";
3027
3167
  exitCode: number | null;
3028
3168
  title: string;
3169
+ id: string;
3029
3170
  isExited: boolean;
3030
3171
  closeTip?: string | undefined;
3031
3172
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3033,12 +3174,12 @@ declare const PtyListResponseSchema: z.ZodObject<{
3033
3174
  }, {
3034
3175
  type: "list";
3035
3176
  sessions: {
3036
- id: string;
3037
3177
  command: string;
3038
3178
  args: string[];
3039
3179
  platform: "windows" | "macos" | "common";
3040
3180
  exitCode: number | null;
3041
3181
  title: string;
3182
+ id: string;
3042
3183
  isExited: boolean;
3043
3184
  closeTip?: string | undefined;
3044
3185
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3137,22 +3278,22 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
3137
3278
  closeTip: z.ZodOptional<z.ZodString>;
3138
3279
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
3139
3280
  }, "strip", z.ZodTypeAny, {
3140
- id: string;
3141
3281
  command: string;
3142
3282
  args: string[];
3143
3283
  platform: "windows" | "macos" | "common";
3144
3284
  exitCode: number | null;
3145
3285
  title: string;
3286
+ id: string;
3146
3287
  isExited: boolean;
3147
3288
  closeTip?: string | undefined;
3148
3289
  closeCallbackUrl?: string | Record<string, string> | undefined;
3149
3290
  }, {
3150
- id: string;
3151
3291
  command: string;
3152
3292
  args: string[];
3153
3293
  platform: "windows" | "macos" | "common";
3154
3294
  exitCode: number | null;
3155
3295
  title: string;
3296
+ id: string;
3156
3297
  isExited: boolean;
3157
3298
  closeTip?: string | undefined;
3158
3299
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3160,12 +3301,12 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
3160
3301
  }, "strip", z.ZodTypeAny, {
3161
3302
  type: "list";
3162
3303
  sessions: {
3163
- id: string;
3164
3304
  command: string;
3165
3305
  args: string[];
3166
3306
  platform: "windows" | "macos" | "common";
3167
3307
  exitCode: number | null;
3168
3308
  title: string;
3309
+ id: string;
3169
3310
  isExited: boolean;
3170
3311
  closeTip?: string | undefined;
3171
3312
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3173,12 +3314,12 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
3173
3314
  }, {
3174
3315
  type: "list";
3175
3316
  sessions: {
3176
- id: string;
3177
3317
  command: string;
3178
3318
  args: string[];
3179
3319
  platform: "windows" | "macos" | "common";
3180
3320
  exitCode: number | null;
3181
3321
  title: string;
3322
+ id: string;
3182
3323
  isExited: boolean;
3183
3324
  closeTip?: string | undefined;
3184
3325
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3204,4 +3345,4 @@ type PtyServerMessage = z.infer<typeof PtyServerMessageSchema>;
3204
3345
  type PtySessionInfo = z.infer<typeof PtySessionInfoSchema>;
3205
3346
  type PtyPlatform = z.infer<typeof PtyPlatformSchema>;
3206
3347
  //#endregion
3207
- export { type AIToolOption, AI_TOOLS, type ApplyInstructions, ApplyInstructionsContextFilesSchema, ApplyInstructionsSchema, type ApplyTask, ApplyTaskSchema, type ArchiveMeta, type ArtifactInstructions, ArtifactInstructionsSchema, type ArtifactStatus, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, type Change, type ChangeFile, ChangeFileSchema, type ChangeMeta, ChangeSchema, type ChangeStatus, ChangeStatusSchema, CliExecutor, type CliResult, type CliRunnerAttempt, type CliSniffResult, type CliStreamEvent, type CodeEditorTheme, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET, DEFAULT_TERMINAL_DARK_THEME, DEFAULT_TERMINAL_LIGHT_THEME, DEFAULT_TERMINAL_THEME_MODE, type DashboardCardAvailability, type DashboardConfig, DashboardConfigSchema, type DashboardGitCommitEntry, type DashboardGitDiffStats, type DashboardGitEntry, type DashboardGitSnapshot, type DashboardGitUncommittedEntry, type DashboardGitWorktree, type DashboardMetricKey, type DashboardOverview, type DashboardSummary, type DashboardTrendKind, type DashboardTrendMeta, type DashboardTrendPoint, type DashboardTriColorTrendPoint, type Delta, type DeltaOperation, DeltaOperationType, DeltaSchema, type DeltaSpec, DeltaSpecSchema, type DependencyInfo, DependencyInfoSchema, type ExportSnapshot, type FileChangeEvent, type FileChangeType, type GitConfig, GitConfigSchema, type GitEntriesPage, type GitEntryCursor, type GitEntryDetail, type GitEntryFileDiff, type GitEntryFilePatch, type GitEntryFileSource, type GitEntryFileSummary, type GitEntryFiles, type GitEntryPatch, type GitEntrySelector, type GitEntryShell, type GitFileChangeType, type GitPatchFile, type GitPatchState, type GitWorktreeHandoff, type GitWorktreeOverview, type GitWorktreeSummary, HOSTED_SHELL_PROTOCOL_VERSION, type HostedBackendHealthResponse, MarkdownParser, OFFICIAL_APP_BASE_URL, OPSX_AGENT_INVOCATION_MODE_VALUES, OpenSpecAdapter, type OpenSpecUIConfig, OpenSpecUIConfigSchema, type OpenSpecUIConfigUpdate, OpenSpecWatcher, type OpsxAgentInvocationMode, OpsxAgentInvocationModeSchema, type OpsxConfig, OpsxConfigSchema, OpsxKernel, type PathCallback, type ProjectRecoveryStatus, type ProjectResidencyEvictionReason, type ProjectResidencyStatus, ProjectWatcher, type ProjectWatcherReinitializeReason, type ProjectWatcherRuntimeStatus, type ProjectWatcherRuntimeStatusListener, PtyAttachMessageSchema, PtyBufferResponseSchema, type PtyClientMessage, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, type PtyPlatform, PtyPlatformSchema, PtyResizeMessageSchema, type PtyServerMessage, PtyServerMessageSchema, type PtySessionInfo, PtyTitleResponseSchema, ReactiveContext, ReactiveState, type ReactiveStateOptions, type Requirement, RequirementSchema, type ResolvedCliRunner, type SchemaArtifact, SchemaArtifactSchema, type SchemaDetail, SchemaDetailSchema, type SchemaInfo, SchemaInfoSchema, type SchemaResolution, SchemaResolutionSchema, type Spec, type SpecMeta, SpecSchema, TERMINAL_THEME_MODE_VALUES, TERMINAL_THEME_VALUES, TOOL_WORKFLOW_TO_SKILL_DIR, type Task, TaskSchema, type TemplateContentMap, type TemplatesMap, TemplatesSchema, type TerminalConfig, TerminalConfigSchema, type TerminalRendererEngine, TerminalRendererEngineSchema, type TerminalThemeId, type TerminalThemeMode, TerminalThemeModeSchema, TerminalThemeSchema, type ToolConfig, type ToolInitDelivery, type ToolInitState, type ToolInitStatus, type ToolWorkflowId, VIRTUAL_PROJECT_DIRNAME, type ValidationIssue, type ValidationResult, Validator, type WatchEvent, type WatchEventType, type WatcherRuntimeStatus, acquireWatcher, buildCliRunnerCandidates, buildEmbeddedUiLaunchUrl, buildHostedLaunchUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getProjectWatcher, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedBackendHealthResponse, isSupportedEmbeddedUiUrl, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeEmbeddedUiUrl, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, sniffGlobalCli, subscribeWatcherRuntimeStatus, toOpsxDisplayPath };
3348
+ export { type AIToolOption, AI_TOOLS, type ApplyInstructions, ApplyInstructionsContextFilesSchema, ApplyInstructionsSchema, type ApplyTask, ApplyTaskSchema, type ArchiveMeta, type ArtifactInstructions, ArtifactInstructionsSchema, type ArtifactStatus, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, type Change, type ChangeFile, ChangeFileSchema, type ChangeMeta, ChangeSchema, type ChangeStatus, ChangeStatusSchema, CliExecutor, type CliResult, type CliRunnerAttempt, type CliSniffResult, type CliStreamEvent, type CodeEditorTheme, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET, DEFAULT_TERMINAL_DARK_THEME, DEFAULT_TERMINAL_LIGHT_THEME, DEFAULT_TERMINAL_THEME_MODE, type DashboardCardAvailability, type DashboardConfig, DashboardConfigSchema, type DashboardGitCommitEntry, type DashboardGitDiffStats, type DashboardGitEntry, type DashboardGitSnapshot, type DashboardGitUncommittedEntry, type DashboardGitWorktree, type DashboardMetricKey, type DashboardOverview, type DashboardSummary, type DashboardTrendKind, type DashboardTrendMeta, type DashboardTrendPoint, type DashboardTriColorTrendPoint, type Delta, type DeltaOperation, DeltaOperationType, DeltaSchema, type DeltaSpec, DeltaSpecSchema, type DependencyInfo, DependencyInfoSchema, type DocumentConsumerV1, type DocumentReadModeV1, type DocumentRefV1, type ExportSnapshot, type FileChangeEvent, type FileChangeType, type GitConfig, GitConfigSchema, type GitEntriesPage, type GitEntryCursor, type GitEntryDetail, type GitEntryFileDiff, type GitEntryFilePatch, type GitEntryFileSource, type GitEntryFileSummary, type GitEntryFiles, type GitEntryPatch, type GitEntrySelector, type GitEntryShell, type GitFileChangeType, type GitPatchFile, type GitPatchState, type GitWorktreeHandoff, type GitWorktreeOverview, type GitWorktreeSummary, HOSTED_SHELL_PROTOCOL_VERSION, type HookDiagnosticLevel, type HookDiagnosticV1, type HookLifecycleV1, type HostedBackendHealthResponse, MarkdownParser, OFFICIAL_APP_BASE_URL, OPENSPECUI_HOOKS_VERSION, OPSX_AGENT_INVOCATION_MODE_VALUES, type OnReadDocumentHookV1, type OnRunWorkflowHookV1, OpenSpecAdapter, type OpenSpecUIConfig, OpenSpecUIConfigSchema, type OpenSpecUIConfigUpdate, type OpenSpecUIHooksV1, OpenSpecWatcher, type OpsxAgentInvocationMode, OpsxAgentInvocationModeSchema, type OpsxConfig, OpsxConfigSchema, OpsxKernel, type PathCallback, type ProjectRecoveryStatus, type ProjectResidencyEvictionReason, type ProjectResidencyStatus, ProjectWatcher, type ProjectWatcherReinitializeReason, type ProjectWatcherRuntimeStatus, type ProjectWatcherRuntimeStatusListener, PtyAttachMessageSchema, PtyBufferResponseSchema, type PtyClientMessage, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, type PtyPlatform, PtyPlatformSchema, PtyResizeMessageSchema, type PtyServerMessage, PtyServerMessageSchema, type PtySessionInfo, PtyTitleResponseSchema, ReactiveContext, ReactiveState, type ReactiveStateOptions, type ReadDocumentContextV1, type ReadDocumentResultV1, type Requirement, RequirementSchema, type ResolvedCliRunner, type RunWorkflowContextV1, type RunWorkflowInputV1, type RunWorkflowResultV1, type SchemaArtifact, SchemaArtifactSchema, type SchemaDetail, SchemaDetailSchema, type SchemaInfo, SchemaInfoSchema, type SchemaResolution, SchemaResolutionSchema, type Spec, type SpecMeta, SpecSchema, TERMINAL_THEME_MODE_VALUES, TERMINAL_THEME_VALUES, TOOL_WORKFLOW_TO_SKILL_DIR, type Task, TaskSchema, type TemplateContentMap, type TemplatesMap, TemplatesSchema, type TerminalConfig, TerminalConfigSchema, type TerminalRendererEngine, TerminalRendererEngineSchema, type TerminalThemeId, type TerminalThemeMode, TerminalThemeModeSchema, TerminalThemeSchema, type ToolConfig, type ToolInitDelivery, type ToolInitState, type ToolInitStatus, type ToolWorkflowId, VIRTUAL_PROJECT_DIRNAME, type ValidationIssue, type ValidationResult, Validator, type WatchEvent, type WatchEventType, type WatcherRuntimeStatus, type WorkflowActionV1, type WorkflowInvocationModeResolutionV1, type WorkflowRequestedModeV1, acquireWatcher, buildCliRunnerCandidates, buildEmbeddedUiLaunchUrl, buildHostedLaunchUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getProjectWatcher, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedBackendHealthResponse, isSupportedEmbeddedUiUrl, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeEmbeddedUiUrl, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, sniffGlobalCli, subscribeWatcherRuntimeStatus, toOpsxDisplayPath };
package/dist/index.mjs CHANGED
@@ -3699,6 +3699,10 @@ const DASHBOARD_METRIC_KEYS = [
3699
3699
  "taskCompletionPercent"
3700
3700
  ];
3701
3701
 
3702
+ //#endregion
3703
+ //#region src/hooks.ts
3704
+ const OPENSPECUI_HOOKS_VERSION = 1;
3705
+
3702
3706
  //#endregion
3703
3707
  //#region src/opsx-types.ts
3704
3708
  /** Check if an outputPath contains glob pattern characters */
@@ -4638,4 +4642,4 @@ const PtyServerMessageSchema = z.discriminatedUnion("type", [
4638
4642
  ]);
4639
4643
 
4640
4644
  //#endregion
4641
- export { AI_TOOLS, ApplyInstructionsContextFilesSchema, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, ChangeFileSchema, ChangeSchema, ChangeStatusSchema, CliExecutor, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET, DEFAULT_TERMINAL_DARK_THEME, DEFAULT_TERMINAL_LIGHT_THEME, DEFAULT_TERMINAL_THEME_MODE, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, GitConfigSchema, HOSTED_SHELL_PROTOCOL_VERSION, MarkdownParser, OFFICIAL_APP_BASE_URL, OPSX_AGENT_INVOCATION_MODE_VALUES, OpenSpecAdapter, OpenSpecUIConfigSchema, OpenSpecWatcher, OpsxAgentInvocationModeSchema, OpsxConfigSchema, OpsxKernel, ProjectWatcher, PtyAttachMessageSchema, PtyBufferResponseSchema, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, PtyPlatformSchema, PtyResizeMessageSchema, PtyServerMessageSchema, PtyTitleResponseSchema, ReactiveContext, ReactiveState, RequirementSchema, SchemaArtifactSchema, SchemaDetailSchema, SchemaInfoSchema, SchemaResolutionSchema, SpecSchema, TERMINAL_THEME_MODE_VALUES, TERMINAL_THEME_VALUES, TOOL_WORKFLOW_TO_SKILL_DIR, TaskSchema, TemplatesSchema, TerminalConfigSchema, TerminalRendererEngineSchema, TerminalThemeModeSchema, TerminalThemeSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, buildCliRunnerCandidates, buildEmbeddedUiLaunchUrl, buildHostedLaunchUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getProjectWatcher, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedBackendHealthResponse, isSupportedEmbeddedUiUrl, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeEmbeddedUiUrl, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, sniffGlobalCli, subscribeWatcherRuntimeStatus, toOpsxDisplayPath };
4645
+ export { AI_TOOLS, ApplyInstructionsContextFilesSchema, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, ChangeFileSchema, ChangeSchema, ChangeStatusSchema, CliExecutor, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET, DEFAULT_TERMINAL_DARK_THEME, DEFAULT_TERMINAL_LIGHT_THEME, DEFAULT_TERMINAL_THEME_MODE, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, GitConfigSchema, HOSTED_SHELL_PROTOCOL_VERSION, MarkdownParser, OFFICIAL_APP_BASE_URL, OPENSPECUI_HOOKS_VERSION, OPSX_AGENT_INVOCATION_MODE_VALUES, OpenSpecAdapter, OpenSpecUIConfigSchema, OpenSpecWatcher, OpsxAgentInvocationModeSchema, OpsxConfigSchema, OpsxKernel, ProjectWatcher, PtyAttachMessageSchema, PtyBufferResponseSchema, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, PtyPlatformSchema, PtyResizeMessageSchema, PtyServerMessageSchema, PtyTitleResponseSchema, ReactiveContext, ReactiveState, RequirementSchema, SchemaArtifactSchema, SchemaDetailSchema, SchemaInfoSchema, SchemaResolutionSchema, SpecSchema, TERMINAL_THEME_MODE_VALUES, TERMINAL_THEME_VALUES, TOOL_WORKFLOW_TO_SKILL_DIR, TaskSchema, TemplatesSchema, TerminalConfigSchema, TerminalRendererEngineSchema, TerminalThemeModeSchema, TerminalThemeSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, buildCliRunnerCandidates, buildEmbeddedUiLaunchUrl, buildHostedLaunchUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getProjectWatcher, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedBackendHealthResponse, isSupportedEmbeddedUiUrl, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeEmbeddedUiUrl, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, sniffGlobalCli, subscribeWatcherRuntimeStatus, toOpsxDisplayPath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openspecui/core",
3
- "version": "3.2.3",
3
+ "version": "3.3.0",
4
4
  "description": "Core OpenSpec adapter and parser",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",