@openspecui/core 1.6.2 → 2.1.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.
@@ -0,0 +1,86 @@
1
+ //#region src/hosted-app.ts
2
+ const OFFICIAL_APP_BASE_URL = "https://app.openspecui.com";
3
+ function isRecord(value) {
4
+ return typeof value === "object" && value !== null;
5
+ }
6
+ function withHttpsProtocol(value) {
7
+ if (/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//.test(value)) return value;
8
+ return `https://${value}`;
9
+ }
10
+ function parseVersionTuple(raw) {
11
+ const match = raw.trim().match(/^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/);
12
+ if (!match) return null;
13
+ return {
14
+ major: Number(match[1]),
15
+ minor: Number(match[2]),
16
+ patch: Number(match[3])
17
+ };
18
+ }
19
+ function parseCompatibilityRange(range) {
20
+ const match = range.trim().match(/^~(\d+)\.(\d+)\.\d+$/);
21
+ if (!match) return null;
22
+ return {
23
+ major: Number(match[1]),
24
+ minor: Number(match[2])
25
+ };
26
+ }
27
+ function normalizeHostedAppBaseUrl(input) {
28
+ const trimmed = input.trim();
29
+ if (!trimmed) throw new Error("Hosted app base URL must not be empty");
30
+ let parsed;
31
+ try {
32
+ parsed = new URL(withHttpsProtocol(trimmed));
33
+ } catch (error) {
34
+ throw new Error(`Invalid hosted app base URL: ${error instanceof Error ? error.message : String(error)}`);
35
+ }
36
+ parsed.hash = "";
37
+ parsed.search = "";
38
+ const pathname = parsed.pathname.replace(/\/+$/, "");
39
+ parsed.pathname = pathname.length > 0 ? pathname : "/";
40
+ return parsed.toString().replace(/\/$/, parsed.pathname === "/" ? "" : "");
41
+ }
42
+ function resolveHostedAppBaseUrl(options) {
43
+ return normalizeHostedAppBaseUrl(options.override?.trim() || options.configured?.trim() || OFFICIAL_APP_BASE_URL);
44
+ }
45
+ function buildHostedVersionManifestUrl(baseUrl) {
46
+ return `${normalizeHostedAppBaseUrl(baseUrl)}/version.json`;
47
+ }
48
+ function buildHostedLaunchUrl(options) {
49
+ const url = new URL(normalizeHostedAppBaseUrl(options.baseUrl));
50
+ url.searchParams.set("api", options.apiBaseUrl);
51
+ return url.toString();
52
+ }
53
+ function isHostedAppVersionManifest(value) {
54
+ if (!isRecord(value)) return false;
55
+ if (value.packageName !== "openspecui") return false;
56
+ if (typeof value.generatedAt !== "string") return false;
57
+ if (typeof value.defaultChannel !== "string") return false;
58
+ if (!isRecord(value.channels)) return false;
59
+ if (!Array.isArray(value.compatibility)) return false;
60
+ return Object.values(value.channels).every((channel) => {
61
+ if (!isRecord(channel)) return false;
62
+ return typeof channel.id === "string" && typeof channel.kind === "string" && typeof channel.selector === "string" && typeof channel.resolvedVersion === "string" && typeof channel.rootPath === "string" && typeof channel.shellPath === "string" && typeof channel.major === "number";
63
+ });
64
+ }
65
+ function isHostedBackendHealthResponse(value) {
66
+ if (!isRecord(value)) return false;
67
+ return value.status === "ok" && typeof value.projectDir === "string" && typeof value.projectName === "string" && typeof value.watcherEnabled === "boolean" && typeof value.openspecuiVersion === "string";
68
+ }
69
+ function resolveHostedChannelForVersion(manifest, version) {
70
+ const parsed = parseVersionTuple(version);
71
+ if (!parsed) return null;
72
+ for (const entry of manifest.compatibility) {
73
+ const range = parseCompatibilityRange(entry.range);
74
+ if (!range) continue;
75
+ if (!manifest.channels[entry.channel]) continue;
76
+ if (range.major === parsed.major && range.minor === parsed.minor) return entry.channel;
77
+ }
78
+ const exactMinorChannel = `v${parsed.major}.${parsed.minor}`;
79
+ if (manifest.channels[exactMinorChannel]) return exactMinorChannel;
80
+ const majorChannel = `v${parsed.major}`;
81
+ if (manifest.channels[majorChannel]) return majorChannel;
82
+ return manifest.channels[manifest.defaultChannel] ? manifest.defaultChannel : null;
83
+ }
84
+
85
+ //#endregion
86
+ export { isHostedBackendHealthResponse as a, resolveHostedChannelForVersion as c, isHostedAppVersionManifest as i, buildHostedLaunchUrl as n, normalizeHostedAppBaseUrl as o, buildHostedVersionManifestUrl as r, resolveHostedAppBaseUrl as s, OFFICIAL_APP_BASE_URL as t };
@@ -0,0 +1,46 @@
1
+ //#region src/hosted-app.d.ts
2
+ declare const OFFICIAL_APP_BASE_URL = "https://app.openspecui.com";
3
+ type HostedAppChannelKind = 'latest' | 'major' | 'minor';
4
+ interface HostedAppChannelManifest {
5
+ id: string;
6
+ kind: HostedAppChannelKind;
7
+ selector: string;
8
+ resolvedVersion: string;
9
+ rootPath: string;
10
+ shellPath: string;
11
+ major: number;
12
+ minor?: number;
13
+ }
14
+ interface HostedAppCompatibilityEntry {
15
+ range: string;
16
+ channel: string;
17
+ }
18
+ interface HostedAppVersionManifest {
19
+ packageName: 'openspecui';
20
+ generatedAt: string;
21
+ defaultChannel: string;
22
+ channels: Record<string, HostedAppChannelManifest>;
23
+ compatibility: HostedAppCompatibilityEntry[];
24
+ }
25
+ interface HostedBackendHealthResponse {
26
+ status: 'ok';
27
+ projectDir: string;
28
+ projectName: string;
29
+ watcherEnabled: boolean;
30
+ openspecuiVersion: string;
31
+ }
32
+ declare function normalizeHostedAppBaseUrl(input: string): string;
33
+ declare function resolveHostedAppBaseUrl(options: {
34
+ override?: string | null;
35
+ configured?: string | null;
36
+ }): string;
37
+ declare function buildHostedVersionManifestUrl(baseUrl: string): string;
38
+ declare function buildHostedLaunchUrl(options: {
39
+ baseUrl: string;
40
+ apiBaseUrl: string;
41
+ }): string;
42
+ declare function isHostedAppVersionManifest(value: unknown): value is HostedAppVersionManifest;
43
+ declare function isHostedBackendHealthResponse(value: unknown): value is HostedBackendHealthResponse;
44
+ declare function resolveHostedChannelForVersion(manifest: HostedAppVersionManifest, version: string): string | null;
45
+ //#endregion
46
+ export { HostedBackendHealthResponse as a, buildHostedVersionManifestUrl as c, normalizeHostedAppBaseUrl as d, resolveHostedAppBaseUrl as f, HostedAppVersionManifest as i, isHostedAppVersionManifest as l, HostedAppChannelManifest as n, OFFICIAL_APP_BASE_URL as o, resolveHostedChannelForVersion as p, HostedAppCompatibilityEntry as r, buildHostedLaunchUrl as s, HostedAppChannelKind as t, isHostedBackendHealthResponse as u };
@@ -0,0 +1,2 @@
1
+ import { a as HostedBackendHealthResponse, c as buildHostedVersionManifestUrl, d as normalizeHostedAppBaseUrl, f as resolveHostedAppBaseUrl, i as HostedAppVersionManifest, l as isHostedAppVersionManifest, n as HostedAppChannelManifest, o as OFFICIAL_APP_BASE_URL, p as resolveHostedChannelForVersion, r as HostedAppCompatibilityEntry, s as buildHostedLaunchUrl, t as HostedAppChannelKind, u as isHostedBackendHealthResponse } from "./hosted-app-CY1XHUcf.mjs";
2
+ export { HostedAppChannelKind, HostedAppChannelManifest, HostedAppCompatibilityEntry, HostedAppVersionManifest, HostedBackendHealthResponse, OFFICIAL_APP_BASE_URL, buildHostedLaunchUrl, buildHostedVersionManifestUrl, isHostedAppVersionManifest, isHostedBackendHealthResponse, normalizeHostedAppBaseUrl, resolveHostedAppBaseUrl, resolveHostedChannelForVersion };
@@ -0,0 +1,3 @@
1
+ import { a as isHostedBackendHealthResponse, c as resolveHostedChannelForVersion, i as isHostedAppVersionManifest, n as buildHostedLaunchUrl, o as normalizeHostedAppBaseUrl, r as buildHostedVersionManifestUrl, s as resolveHostedAppBaseUrl, t as OFFICIAL_APP_BASE_URL } from "./hosted-app-Bn-MNDZ0.mjs";
2
+
3
+ export { OFFICIAL_APP_BASE_URL, buildHostedLaunchUrl, buildHostedVersionManifestUrl, isHostedAppVersionManifest, isHostedBackendHealthResponse, normalizeHostedAppBaseUrl, resolveHostedAppBaseUrl, resolveHostedChannelForVersion };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
- import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-RBULE8_G.mjs";
1
+ import { a as HostedBackendHealthResponse, c as buildHostedVersionManifestUrl, d as normalizeHostedAppBaseUrl, f as resolveHostedAppBaseUrl, i as HostedAppVersionManifest, l as isHostedAppVersionManifest, n as HostedAppChannelManifest, o as OFFICIAL_APP_BASE_URL, p as resolveHostedChannelForVersion, r as HostedAppCompatibilityEntry, s as buildHostedLaunchUrl, t as HostedAppChannelKind, u as isHostedBackendHealthResponse } from "./hosted-app-CY1XHUcf.mjs";
2
+ import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-k65bc8bW.mjs";
2
3
  import { AsyncLocalStorage } from "node:async_hooks";
3
4
  import { z } from "zod";
4
5
  import { EventEmitter } from "events";
@@ -18,13 +19,13 @@ declare const ChangeFileSchema: z.ZodObject<{
18
19
  /** Optional byte size for files */
19
20
  size: z.ZodOptional<z.ZodNumber>;
20
21
  }, "strip", z.ZodTypeAny, {
21
- path: string;
22
22
  type: "file" | "directory";
23
+ path: string;
23
24
  content?: string | undefined;
24
25
  size?: number | undefined;
25
26
  }, {
26
- path: string;
27
27
  type: "file" | "directory";
28
+ path: string;
28
29
  content?: string | undefined;
29
30
  size?: number | undefined;
30
31
  }>;
@@ -1442,6 +1443,8 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1442
1443
  }, {
1443
1444
  theme?: "github" | "material" | "vscode" | "tokyo" | "gruvbox" | "monokai" | "nord" | undefined;
1444
1445
  }>>;
1446
+ /** Hosted app 基础 URL(空字符串表示使用官方默认值) */
1447
+ appBaseUrl: z.ZodDefault<z.ZodString>;
1445
1448
  /** 终端配置 */
1446
1449
  terminal: z.ZodDefault<z.ZodObject<{
1447
1450
  fontSize: z.ZodDefault<z.ZodNumber>;
@@ -1482,6 +1485,7 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1482
1485
  codeEditor: {
1483
1486
  theme: "github" | "material" | "vscode" | "tokyo" | "gruvbox" | "monokai" | "nord";
1484
1487
  };
1488
+ appBaseUrl: string;
1485
1489
  terminal: {
1486
1490
  fontSize: number;
1487
1491
  fontFamily: string;
@@ -1502,6 +1506,7 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1502
1506
  codeEditor?: {
1503
1507
  theme?: "github" | "material" | "vscode" | "tokyo" | "gruvbox" | "monokai" | "nord" | undefined;
1504
1508
  } | undefined;
1509
+ appBaseUrl?: string | undefined;
1505
1510
  terminal?: {
1506
1511
  fontSize?: number | undefined;
1507
1512
  fontFamily?: string | undefined;
@@ -1522,6 +1527,7 @@ type OpenSpecUIConfigUpdate = {
1522
1527
  };
1523
1528
  theme?: OpenSpecUIConfig['theme'];
1524
1529
  codeEditor?: Partial<OpenSpecUIConfig['codeEditor']>;
1530
+ appBaseUrl?: OpenSpecUIConfig['appBaseUrl'];
1525
1531
  terminal?: Partial<TerminalConfig>;
1526
1532
  dashboard?: Partial<DashboardConfig>;
1527
1533
  };
@@ -1622,7 +1628,11 @@ declare class CliExecutor {
1622
1628
  /**
1623
1629
  * 执行 openspec init(非交互式)
1624
1630
  */
1625
- init(tools?: string[] | 'all' | 'none'): Promise<CliResult>;
1631
+ init(options?: {
1632
+ tools?: string[] | 'all' | 'none';
1633
+ profile?: 'core' | 'custom';
1634
+ force?: boolean;
1635
+ }): Promise<CliResult>;
1626
1636
  /**
1627
1637
  * 执行 openspec archive <changeId>(非交互式)
1628
1638
  */
@@ -1667,7 +1677,11 @@ declare class CliExecutor {
1667
1677
  /**
1668
1678
  * 流式执行 openspec init
1669
1679
  */
1670
- initStream(tools: string[] | 'all' | 'none', onEvent: (event: CliStreamEvent) => void): Promise<() => void>;
1680
+ initStream(options: {
1681
+ tools?: string[] | 'all' | 'none';
1682
+ profile?: 'core' | 'custom';
1683
+ force?: boolean;
1684
+ }, onEvent: (event: CliStreamEvent) => void): Promise<() => void>;
1671
1685
  /**
1672
1686
  * 流式执行 openspec archive
1673
1687
  */
@@ -1845,14 +1859,14 @@ declare const ArtifactStatusSchema: z.ZodObject<{
1845
1859
  missingDeps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1846
1860
  relativePath: z.ZodOptional<z.ZodString>;
1847
1861
  }, "strip", z.ZodTypeAny, {
1848
- id: string;
1849
1862
  status: "done" | "ready" | "blocked";
1863
+ id: string;
1850
1864
  outputPath: string;
1851
1865
  missingDeps?: string[] | undefined;
1852
1866
  relativePath?: string | undefined;
1853
1867
  }, {
1854
- id: string;
1855
1868
  status: "done" | "ready" | "blocked";
1869
+ id: string;
1856
1870
  outputPath: string;
1857
1871
  missingDeps?: string[] | undefined;
1858
1872
  relativePath?: string | undefined;
@@ -1870,14 +1884,14 @@ declare const ChangeStatusSchema: z.ZodObject<{
1870
1884
  missingDeps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1871
1885
  relativePath: z.ZodOptional<z.ZodString>;
1872
1886
  }, "strip", z.ZodTypeAny, {
1873
- id: string;
1874
1887
  status: "done" | "ready" | "blocked";
1888
+ id: string;
1875
1889
  outputPath: string;
1876
1890
  missingDeps?: string[] | undefined;
1877
1891
  relativePath?: string | undefined;
1878
1892
  }, {
1879
- id: string;
1880
1893
  status: "done" | "ready" | "blocked";
1894
+ id: string;
1881
1895
  outputPath: string;
1882
1896
  missingDeps?: string[] | undefined;
1883
1897
  relativePath?: string | undefined;
@@ -1888,8 +1902,8 @@ declare const ChangeStatusSchema: z.ZodObject<{
1888
1902
  isComplete: boolean;
1889
1903
  applyRequires: string[];
1890
1904
  artifacts: {
1891
- id: string;
1892
1905
  status: "done" | "ready" | "blocked";
1906
+ id: string;
1893
1907
  outputPath: string;
1894
1908
  missingDeps?: string[] | undefined;
1895
1909
  relativePath?: string | undefined;
@@ -1900,8 +1914,8 @@ declare const ChangeStatusSchema: z.ZodObject<{
1900
1914
  isComplete: boolean;
1901
1915
  applyRequires: string[];
1902
1916
  artifacts: {
1903
- id: string;
1904
1917
  status: "done" | "ready" | "blocked";
1918
+ id: string;
1905
1919
  outputPath: string;
1906
1920
  missingDeps?: string[] | undefined;
1907
1921
  relativePath?: string | undefined;
@@ -1914,13 +1928,13 @@ declare const DependencyInfoSchema: z.ZodObject<{
1914
1928
  path: z.ZodString;
1915
1929
  description: z.ZodString;
1916
1930
  }, "strip", z.ZodTypeAny, {
1917
- id: string;
1918
1931
  path: string;
1932
+ id: string;
1919
1933
  description: string;
1920
1934
  done: boolean;
1921
1935
  }, {
1922
- id: string;
1923
1936
  path: string;
1937
+ id: string;
1924
1938
  description: string;
1925
1939
  done: boolean;
1926
1940
  }>;
@@ -2028,13 +2042,13 @@ declare const ArtifactInstructionsSchema: z.ZodObject<{
2028
2042
  path: z.ZodString;
2029
2043
  description: z.ZodString;
2030
2044
  }, "strip", z.ZodTypeAny, {
2031
- id: string;
2032
2045
  path: string;
2046
+ id: string;
2033
2047
  description: string;
2034
2048
  done: boolean;
2035
2049
  }, {
2036
- id: string;
2037
2050
  path: string;
2051
+ id: string;
2038
2052
  description: string;
2039
2053
  done: boolean;
2040
2054
  }>, "many">;
@@ -2048,8 +2062,8 @@ declare const ArtifactInstructionsSchema: z.ZodObject<{
2048
2062
  artifactId: string;
2049
2063
  template: string;
2050
2064
  dependencies: {
2051
- id: string;
2052
2065
  path: string;
2066
+ id: string;
2053
2067
  description: string;
2054
2068
  done: boolean;
2055
2069
  }[];
@@ -2066,8 +2080,8 @@ declare const ArtifactInstructionsSchema: z.ZodObject<{
2066
2080
  artifactId: string;
2067
2081
  template: string;
2068
2082
  dependencies: {
2069
- id: string;
2070
2083
  path: string;
2084
+ id: string;
2071
2085
  description: string;
2072
2086
  done: boolean;
2073
2087
  }[];
@@ -2113,8 +2127,8 @@ declare const SchemaResolutionSchema: z.ZodObject<{
2113
2127
  displayPath?: string | undefined;
2114
2128
  }>, "many">;
2115
2129
  }, "strip", z.ZodTypeAny, {
2116
- name: string;
2117
2130
  path: string;
2131
+ name: string;
2118
2132
  source: "project" | "user" | "package";
2119
2133
  shadows: {
2120
2134
  path: string;
@@ -2123,8 +2137,8 @@ declare const SchemaResolutionSchema: z.ZodObject<{
2123
2137
  }[];
2124
2138
  displayPath?: string | undefined;
2125
2139
  }, {
2126
- name: string;
2127
2140
  path: string;
2141
+ name: string;
2128
2142
  source: "project" | "user" | "package";
2129
2143
  shadows: {
2130
2144
  path: string;
@@ -2464,22 +2478,22 @@ declare const PtySessionInfoSchema: z.ZodObject<{
2464
2478
  closeTip: z.ZodOptional<z.ZodString>;
2465
2479
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2466
2480
  }, "strip", z.ZodTypeAny, {
2467
- id: string;
2468
2481
  command: string;
2469
2482
  args: string[];
2470
2483
  platform: "windows" | "macos" | "common";
2471
2484
  exitCode: number | null;
2472
2485
  title: string;
2486
+ id: string;
2473
2487
  isExited: boolean;
2474
2488
  closeTip?: string | undefined;
2475
2489
  closeCallbackUrl?: string | Record<string, string> | undefined;
2476
2490
  }, {
2477
- id: string;
2478
2491
  command: string;
2479
2492
  args: string[];
2480
2493
  platform: "windows" | "macos" | "common";
2481
2494
  exitCode: number | null;
2482
2495
  title: string;
2496
+ id: string;
2483
2497
  isExited: boolean;
2484
2498
  closeTip?: string | undefined;
2485
2499
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2496,19 +2510,19 @@ declare const PtyCreateMessageSchema: z.ZodObject<{
2496
2510
  }, "strip", z.ZodTypeAny, {
2497
2511
  type: "create";
2498
2512
  requestId: string;
2499
- command?: string | undefined;
2500
- args?: string[] | undefined;
2501
2513
  cols?: number | undefined;
2502
2514
  rows?: number | undefined;
2515
+ command?: string | undefined;
2516
+ args?: string[] | undefined;
2503
2517
  closeTip?: string | undefined;
2504
2518
  closeCallbackUrl?: string | Record<string, string> | undefined;
2505
2519
  }, {
2506
2520
  type: "create";
2507
2521
  requestId: string;
2508
- command?: string | undefined;
2509
- args?: string[] | undefined;
2510
2522
  cols?: number | undefined;
2511
2523
  rows?: number | undefined;
2524
+ command?: string | undefined;
2525
+ args?: string[] | undefined;
2512
2526
  closeTip?: string | undefined;
2513
2527
  closeCallbackUrl?: string | Record<string, string> | undefined;
2514
2528
  }>;
@@ -2586,19 +2600,19 @@ declare const PtyClientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2586
2600
  }, "strip", z.ZodTypeAny, {
2587
2601
  type: "create";
2588
2602
  requestId: string;
2589
- command?: string | undefined;
2590
- args?: string[] | undefined;
2591
2603
  cols?: number | undefined;
2592
2604
  rows?: number | undefined;
2605
+ command?: string | undefined;
2606
+ args?: string[] | undefined;
2593
2607
  closeTip?: string | undefined;
2594
2608
  closeCallbackUrl?: string | Record<string, string> | undefined;
2595
2609
  }, {
2596
2610
  type: "create";
2597
2611
  requestId: string;
2598
- command?: string | undefined;
2599
- args?: string[] | undefined;
2600
2612
  cols?: number | undefined;
2601
2613
  rows?: number | undefined;
2614
+ command?: string | undefined;
2615
+ args?: string[] | undefined;
2602
2616
  closeTip?: string | undefined;
2603
2617
  closeCallbackUrl?: string | Record<string, string> | undefined;
2604
2618
  }>, z.ZodObject<{
@@ -2740,22 +2754,22 @@ declare const PtyListResponseSchema: z.ZodObject<{
2740
2754
  closeTip: z.ZodOptional<z.ZodString>;
2741
2755
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2742
2756
  }, "strip", z.ZodTypeAny, {
2743
- id: string;
2744
2757
  command: string;
2745
2758
  args: string[];
2746
2759
  platform: "windows" | "macos" | "common";
2747
2760
  exitCode: number | null;
2748
2761
  title: string;
2762
+ id: string;
2749
2763
  isExited: boolean;
2750
2764
  closeTip?: string | undefined;
2751
2765
  closeCallbackUrl?: string | Record<string, string> | undefined;
2752
2766
  }, {
2753
- id: string;
2754
2767
  command: string;
2755
2768
  args: string[];
2756
2769
  platform: "windows" | "macos" | "common";
2757
2770
  exitCode: number | null;
2758
2771
  title: string;
2772
+ id: string;
2759
2773
  isExited: boolean;
2760
2774
  closeTip?: string | undefined;
2761
2775
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2763,12 +2777,12 @@ declare const PtyListResponseSchema: z.ZodObject<{
2763
2777
  }, "strip", z.ZodTypeAny, {
2764
2778
  type: "list";
2765
2779
  sessions: {
2766
- id: string;
2767
2780
  command: string;
2768
2781
  args: string[];
2769
2782
  platform: "windows" | "macos" | "common";
2770
2783
  exitCode: number | null;
2771
2784
  title: string;
2785
+ id: string;
2772
2786
  isExited: boolean;
2773
2787
  closeTip?: string | undefined;
2774
2788
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2776,12 +2790,12 @@ declare const PtyListResponseSchema: z.ZodObject<{
2776
2790
  }, {
2777
2791
  type: "list";
2778
2792
  sessions: {
2779
- id: string;
2780
2793
  command: string;
2781
2794
  args: string[];
2782
2795
  platform: "windows" | "macos" | "common";
2783
2796
  exitCode: number | null;
2784
2797
  title: string;
2798
+ id: string;
2785
2799
  isExited: boolean;
2786
2800
  closeTip?: string | undefined;
2787
2801
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2794,14 +2808,14 @@ declare const PtyErrorResponseSchema: z.ZodObject<{
2794
2808
  message: z.ZodString;
2795
2809
  sessionId: z.ZodOptional<z.ZodString>;
2796
2810
  }, "strip", z.ZodTypeAny, {
2811
+ type: "error";
2797
2812
  code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND" | "PTY_CREATE_FAILED";
2798
2813
  message: string;
2799
- type: "error";
2800
2814
  sessionId?: string | undefined;
2801
2815
  }, {
2816
+ type: "error";
2802
2817
  code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND" | "PTY_CREATE_FAILED";
2803
2818
  message: string;
2804
- type: "error";
2805
2819
  sessionId?: string | undefined;
2806
2820
  }>;
2807
2821
  declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -2880,22 +2894,22 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2880
2894
  closeTip: z.ZodOptional<z.ZodString>;
2881
2895
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2882
2896
  }, "strip", z.ZodTypeAny, {
2883
- id: string;
2884
2897
  command: string;
2885
2898
  args: string[];
2886
2899
  platform: "windows" | "macos" | "common";
2887
2900
  exitCode: number | null;
2888
2901
  title: string;
2902
+ id: string;
2889
2903
  isExited: boolean;
2890
2904
  closeTip?: string | undefined;
2891
2905
  closeCallbackUrl?: string | Record<string, string> | undefined;
2892
2906
  }, {
2893
- id: string;
2894
2907
  command: string;
2895
2908
  args: string[];
2896
2909
  platform: "windows" | "macos" | "common";
2897
2910
  exitCode: number | null;
2898
2911
  title: string;
2912
+ id: string;
2899
2913
  isExited: boolean;
2900
2914
  closeTip?: string | undefined;
2901
2915
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2903,12 +2917,12 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2903
2917
  }, "strip", z.ZodTypeAny, {
2904
2918
  type: "list";
2905
2919
  sessions: {
2906
- id: string;
2907
2920
  command: string;
2908
2921
  args: string[];
2909
2922
  platform: "windows" | "macos" | "common";
2910
2923
  exitCode: number | null;
2911
2924
  title: string;
2925
+ id: string;
2912
2926
  isExited: boolean;
2913
2927
  closeTip?: string | undefined;
2914
2928
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2916,12 +2930,12 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2916
2930
  }, {
2917
2931
  type: "list";
2918
2932
  sessions: {
2919
- id: string;
2920
2933
  command: string;
2921
2934
  args: string[];
2922
2935
  platform: "windows" | "macos" | "common";
2923
2936
  exitCode: number | null;
2924
2937
  title: string;
2938
+ id: string;
2925
2939
  isExited: boolean;
2926
2940
  closeTip?: string | undefined;
2927
2941
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2932,14 +2946,14 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2932
2946
  message: z.ZodString;
2933
2947
  sessionId: z.ZodOptional<z.ZodString>;
2934
2948
  }, "strip", z.ZodTypeAny, {
2949
+ type: "error";
2935
2950
  code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND" | "PTY_CREATE_FAILED";
2936
2951
  message: string;
2937
- type: "error";
2938
2952
  sessionId?: string | undefined;
2939
2953
  }, {
2954
+ type: "error";
2940
2955
  code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND" | "PTY_CREATE_FAILED";
2941
2956
  message: string;
2942
- type: "error";
2943
2957
  sessionId?: string | undefined;
2944
2958
  }>]>;
2945
2959
  type PtyClientMessage = z.infer<typeof PtyClientMessageSchema>;
@@ -2947,4 +2961,4 @@ type PtyServerMessage = z.infer<typeof PtyServerMessageSchema>;
2947
2961
  type PtySessionInfo = z.infer<typeof PtySessionInfoSchema>;
2948
2962
  type PtyPlatform = z.infer<typeof PtyPlatformSchema>;
2949
2963
  //#endregion
2950
- export { type AIToolOption, AI_TOOLS, type ApplyInstructions, 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, 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, MarkdownParser, OpenSpecAdapter, type OpenSpecUIConfig, OpenSpecUIConfigSchema, type OpenSpecUIConfigUpdate, OpenSpecWatcher, OpsxKernel, type PathCallback, ProjectWatcher, type ProjectWatcherReinitializeReason, type ProjectWatcherRuntimeStatus, 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, type Task, TaskSchema, type TemplateContentMap, type TemplatesMap, TemplatesSchema, type TerminalConfig, TerminalConfigSchema, type TerminalRendererEngine, TerminalRendererEngineSchema, type ToolConfig, VIRTUAL_PROJECT_DIRNAME, type ValidationIssue, type ValidationResult, Validator, type WatchEvent, type WatchEventType, type WatcherRuntimeStatus, acquireWatcher, buildCliRunnerCandidates, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getProjectWatcher, getToolById, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, sniffGlobalCli, toOpsxDisplayPath };
2964
+ export { type AIToolOption, AI_TOOLS, type ApplyInstructions, 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, 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 HostedAppChannelKind, type HostedAppChannelManifest, type HostedAppCompatibilityEntry, type HostedAppVersionManifest, type HostedBackendHealthResponse, MarkdownParser, OFFICIAL_APP_BASE_URL, OpenSpecAdapter, type OpenSpecUIConfig, OpenSpecUIConfigSchema, type OpenSpecUIConfigUpdate, OpenSpecWatcher, OpsxKernel, type PathCallback, ProjectWatcher, type ProjectWatcherReinitializeReason, type ProjectWatcherRuntimeStatus, 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, type Task, TaskSchema, type TemplateContentMap, type TemplatesMap, TemplatesSchema, type TerminalConfig, TerminalConfigSchema, type TerminalRendererEngine, TerminalRendererEngineSchema, type ToolConfig, VIRTUAL_PROJECT_DIRNAME, type ValidationIssue, type ValidationResult, Validator, type WatchEvent, type WatchEventType, type WatcherRuntimeStatus, acquireWatcher, buildCliRunnerCandidates, buildHostedLaunchUrl, buildHostedVersionManifestUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getProjectWatcher, getToolById, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedAppVersionManifest, isHostedBackendHealthResponse, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, resolveHostedChannelForVersion, sniffGlobalCli, toOpsxDisplayPath };
package/dist/index.mjs CHANGED
@@ -1,4 +1,5 @@
1
- import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-DYIjMsbM.mjs";
1
+ import { a as isHostedBackendHealthResponse, c as resolveHostedChannelForVersion, i as isHostedAppVersionManifest, n as buildHostedLaunchUrl, o as normalizeHostedAppBaseUrl, r as buildHostedVersionManifestUrl, s as resolveHostedAppBaseUrl, t as OFFICIAL_APP_BASE_URL } from "./hosted-app-Bn-MNDZ0.mjs";
2
+ import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-D-YbNUvQ.mjs";
2
3
  import { mkdir, readFile, rename, writeFile } from "fs/promises";
3
4
  import { dirname, join } from "path";
4
5
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -1473,7 +1474,7 @@ var OpenSpecAdapter = class {
1473
1474
  });
1474
1475
  }
1475
1476
  async collectChangeFiles(root, dir) {
1476
- const names = await reactiveReadDir(dir, { includeHidden: false });
1477
+ const names = await reactiveReadDir(dir, { includeHidden: true });
1477
1478
  const files = [];
1478
1479
  for (const name of names) {
1479
1480
  const fullPath = join(dir, name);
@@ -2330,6 +2331,7 @@ const OpenSpecUIConfigSchema = z.object({
2330
2331
  }).default({}),
2331
2332
  theme: z.enum(THEME_VALUES).default("system"),
2332
2333
  codeEditor: CodeEditorConfigSchema.default(CodeEditorConfigSchema.parse({})),
2334
+ appBaseUrl: z.string().default(""),
2333
2335
  terminal: TerminalConfigSchema.default(TerminalConfigSchema.parse({})),
2334
2336
  dashboard: DashboardConfigSchema.default(DashboardConfigSchema.parse({}))
2335
2337
  });
@@ -2338,6 +2340,7 @@ const DEFAULT_CONFIG = {
2338
2340
  cli: {},
2339
2341
  theme: "system",
2340
2342
  codeEditor: CodeEditorConfigSchema.parse({}),
2343
+ appBaseUrl: "",
2341
2344
  terminal: TerminalConfigSchema.parse({}),
2342
2345
  dashboard: DashboardConfigSchema.parse({})
2343
2346
  };
@@ -2406,6 +2409,7 @@ var ConfigManager = class {
2406
2409
  ...current.codeEditor,
2407
2410
  ...config.codeEditor
2408
2411
  },
2412
+ appBaseUrl: config.appBaseUrl ?? current.appBaseUrl,
2409
2413
  terminal: {
2410
2414
  ...current.terminal,
2411
2415
  ...config.terminal
@@ -2619,13 +2623,15 @@ var CliExecutor = class {
2619
2623
  /**
2620
2624
  * 执行 openspec init(非交互式)
2621
2625
  */
2622
- async init(tools = "all") {
2623
- const toolsArg = Array.isArray(tools) ? tools.join(",") : tools;
2624
- return this.execute([
2625
- "init",
2626
- "--tools",
2627
- toolsArg
2628
- ]);
2626
+ async init(options) {
2627
+ const args = ["init"];
2628
+ if (options?.tools !== void 0) {
2629
+ const toolsArg = Array.isArray(options.tools) ? options.tools.join(",") : options.tools;
2630
+ args.push("--tools", toolsArg);
2631
+ }
2632
+ if (options?.profile) args.push("--profile", options.profile);
2633
+ if (options?.force) args.push("--force");
2634
+ return this.execute(args);
2629
2635
  }
2630
2636
  /**
2631
2637
  * 执行 openspec archive <changeId>(非交互式)
@@ -2792,13 +2798,15 @@ var CliExecutor = class {
2792
2798
  /**
2793
2799
  * 流式执行 openspec init
2794
2800
  */
2795
- initStream(tools, onEvent) {
2796
- const toolsArg = Array.isArray(tools) ? tools.join(",") : tools;
2797
- return this.executeStream([
2798
- "init",
2799
- "--tools",
2800
- toolsArg
2801
- ], onEvent);
2801
+ initStream(options, onEvent) {
2802
+ const args = ["init"];
2803
+ if (options.tools !== void 0) {
2804
+ const toolsArg = Array.isArray(options.tools) ? options.tools.join(",") : options.tools;
2805
+ args.push("--tools", toolsArg);
2806
+ }
2807
+ if (options.profile) args.push("--profile", options.profile);
2808
+ if (options.force) args.push("--force");
2809
+ return this.executeStream(args, onEvent);
2802
2810
  }
2803
2811
  /**
2804
2812
  * 流式执行 openspec archive
@@ -2883,7 +2891,9 @@ const SKILL_NAMES = [
2883
2891
  "openspec-sync-specs",
2884
2892
  "openspec-archive-change",
2885
2893
  "openspec-bulk-archive-change",
2886
- "openspec-verify-change"
2894
+ "openspec-verify-change",
2895
+ "openspec-onboard",
2896
+ "openspec-propose"
2887
2897
  ];
2888
2898
  /**
2889
2899
  * 所有支持的 AI 工具配置
@@ -3002,6 +3012,13 @@ const AI_TOOLS = [
3002
3012
  successLabel: "Kilo Code",
3003
3013
  skillsDir: ".kilocode"
3004
3014
  },
3015
+ {
3016
+ name: "Kiro",
3017
+ value: "kiro",
3018
+ available: true,
3019
+ successLabel: "Kiro",
3020
+ skillsDir: ".kiro"
3021
+ },
3005
3022
  {
3006
3023
  name: "OpenCode",
3007
3024
  value: "opencode",
@@ -3009,6 +3026,13 @@ const AI_TOOLS = [
3009
3026
  successLabel: "OpenCode",
3010
3027
  skillsDir: ".opencode"
3011
3028
  },
3029
+ {
3030
+ name: "Pi",
3031
+ value: "pi",
3032
+ available: true,
3033
+ successLabel: "Pi",
3034
+ skillsDir: ".pi"
3035
+ },
3012
3036
  {
3013
3037
  name: "Qoder",
3014
3038
  value: "qoder",
@@ -4055,4 +4079,4 @@ const PtyServerMessageSchema = z.discriminatedUnion("type", [
4055
4079
  ]);
4056
4080
 
4057
4081
  //#endregion
4058
- export { AI_TOOLS, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, ChangeFileSchema, ChangeSchema, ChangeStatusSchema, CliExecutor, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, MarkdownParser, OpenSpecAdapter, OpenSpecUIConfigSchema, OpenSpecWatcher, 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, TaskSchema, TemplatesSchema, TerminalConfigSchema, TerminalRendererEngineSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, buildCliRunnerCandidates, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getProjectWatcher, getToolById, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, sniffGlobalCli, toOpsxDisplayPath };
4082
+ export { AI_TOOLS, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, ChangeFileSchema, ChangeSchema, ChangeStatusSchema, CliExecutor, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, MarkdownParser, OFFICIAL_APP_BASE_URL, OpenSpecAdapter, OpenSpecUIConfigSchema, OpenSpecWatcher, 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, TaskSchema, TemplatesSchema, TerminalConfigSchema, TerminalRendererEngineSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, buildCliRunnerCandidates, buildHostedLaunchUrl, buildHostedVersionManifestUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getProjectWatcher, getToolById, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedAppVersionManifest, isHostedBackendHealthResponse, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, resolveHostedChannelForVersion, sniffGlobalCli, toOpsxDisplayPath };
@@ -1,2 +1,2 @@
1
- import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-RBULE8_G.mjs";
1
+ import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-k65bc8bW.mjs";
2
2
  export { VIRTUAL_PROJECT_DIRNAME, toOpsxDisplayPath };
@@ -1,3 +1,3 @@
1
- import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-DYIjMsbM.mjs";
1
+ import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-D-YbNUvQ.mjs";
2
2
 
3
3
  export { VIRTUAL_PROJECT_DIRNAME, toOpsxDisplayPath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openspecui/core",
3
- "version": "1.6.2",
3
+ "version": "2.1.0",
4
4
  "description": "Core OpenSpec adapter and parser",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -10,6 +10,10 @@
10
10
  "import": "./dist/index.mjs",
11
11
  "types": "./dist/index.d.mts"
12
12
  },
13
+ "./hosted-app": {
14
+ "import": "./dist/hosted-app.mjs",
15
+ "types": "./dist/hosted-app.d.mts"
16
+ },
13
17
  "./opsx-display-path": {
14
18
  "import": "./dist/opsx-display-path.mjs",
15
19
  "types": "./dist/opsx-display-path.d.mts"
@@ -33,8 +37,8 @@
33
37
  "typescript": "^5.0.0"
34
38
  },
35
39
  "scripts": {
36
- "build": "tsdown src/index.ts src/opsx-display-path.ts --format esm --dts",
37
- "dev": "tsdown src/index.ts src/opsx-display-path.ts --format esm --dts --watch",
40
+ "build": "tsdown src/index.ts src/opsx-display-path.ts src/hosted-app.ts --format esm --dts",
41
+ "dev": "tsdown src/index.ts src/opsx-display-path.ts src/hosted-app.ts --format esm --dts --watch",
38
42
  "test": "vitest run",
39
43
  "test:watch": "vitest",
40
44
  "typecheck": "tsc --noEmit"