@openspecui/core 1.0.0 → 1.0.2
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 +157 -87
- package/dist/index.mjs +518 -148
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -17,13 +17,13 @@ declare const ChangeFileSchema: z.ZodObject<{
|
|
|
17
17
|
/** Optional byte size for files */
|
|
18
18
|
size: z.ZodOptional<z.ZodNumber>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
type: "file" | "directory";
|
|
21
20
|
path: string;
|
|
21
|
+
type: "file" | "directory";
|
|
22
22
|
content?: string | undefined;
|
|
23
23
|
size?: number | undefined;
|
|
24
24
|
}, {
|
|
25
|
-
type: "file" | "directory";
|
|
26
25
|
path: string;
|
|
26
|
+
type: "file" | "directory";
|
|
27
27
|
content?: string | undefined;
|
|
28
28
|
size?: number | undefined;
|
|
29
29
|
}>;
|
|
@@ -1284,16 +1284,40 @@ declare function createFileChangeObservable(watcher: OpenSpecWatcher): {
|
|
|
1284
1284
|
};
|
|
1285
1285
|
//#endregion
|
|
1286
1286
|
//#region src/config.d.ts
|
|
1287
|
+
type RunnerId = 'configured' | 'openspec' | 'npx' | 'bunx' | 'deno' | 'pnpm' | 'yarn';
|
|
1288
|
+
interface CliRunnerCandidate {
|
|
1289
|
+
id: RunnerId;
|
|
1290
|
+
source: string;
|
|
1291
|
+
commandParts: readonly string[];
|
|
1292
|
+
}
|
|
1293
|
+
interface CliRunnerAttempt {
|
|
1294
|
+
source: string;
|
|
1295
|
+
command: string;
|
|
1296
|
+
success: boolean;
|
|
1297
|
+
version?: string;
|
|
1298
|
+
error?: string;
|
|
1299
|
+
exitCode: number | null;
|
|
1300
|
+
}
|
|
1301
|
+
interface ResolvedCliRunner {
|
|
1302
|
+
source: string;
|
|
1303
|
+
command: string;
|
|
1304
|
+
commandParts: readonly string[];
|
|
1305
|
+
version?: string;
|
|
1306
|
+
attempts: readonly CliRunnerAttempt[];
|
|
1307
|
+
}
|
|
1287
1308
|
/**
|
|
1288
1309
|
* 解析 CLI 命令字符串为数组
|
|
1289
1310
|
*
|
|
1290
1311
|
* 支持两种格式:
|
|
1291
1312
|
* 1. JSON 数组:以 `[` 开头,如 `["npx", "@fission-ai/openspec"]`
|
|
1292
|
-
* 2.
|
|
1293
|
-
*
|
|
1294
|
-
* 注意:简单字符串解析不支持带引号的参数,如需复杂命令请使用 JSON 数组格式
|
|
1313
|
+
* 2. shell-like 字符串:支持引号与基础转义
|
|
1295
1314
|
*/
|
|
1296
1315
|
declare function parseCliCommand(command: string): string[];
|
|
1316
|
+
declare function buildCliRunnerCandidates(options: {
|
|
1317
|
+
configuredCommandParts?: readonly string[];
|
|
1318
|
+
userAgent?: string | null;
|
|
1319
|
+
}): readonly CliRunnerCandidate[];
|
|
1320
|
+
declare function createCleanCliEnv(baseEnv?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
1297
1321
|
/** CLI 嗅探结果 */
|
|
1298
1322
|
interface CliSniffResult {
|
|
1299
1323
|
/** 是否存在全局 openspec 命令 */
|
|
@@ -1325,6 +1349,26 @@ declare function getDefaultCliCommand(): Promise<readonly string[]>;
|
|
|
1325
1349
|
* 获取默认 CLI 命令的字符串形式(用于 UI 显示)
|
|
1326
1350
|
*/
|
|
1327
1351
|
declare function getDefaultCliCommandString(): Promise<string>;
|
|
1352
|
+
declare const TerminalConfigSchema: z.ZodObject<{
|
|
1353
|
+
fontSize: z.ZodDefault<z.ZodNumber>;
|
|
1354
|
+
fontFamily: z.ZodDefault<z.ZodString>;
|
|
1355
|
+
cursorBlink: z.ZodDefault<z.ZodBoolean>;
|
|
1356
|
+
cursorStyle: z.ZodDefault<z.ZodEnum<["block", "underline", "bar"]>>;
|
|
1357
|
+
scrollback: z.ZodDefault<z.ZodNumber>;
|
|
1358
|
+
}, "strip", z.ZodTypeAny, {
|
|
1359
|
+
fontSize: number;
|
|
1360
|
+
fontFamily: string;
|
|
1361
|
+
cursorBlink: boolean;
|
|
1362
|
+
cursorStyle: "block" | "underline" | "bar";
|
|
1363
|
+
scrollback: number;
|
|
1364
|
+
}, {
|
|
1365
|
+
fontSize?: number | undefined;
|
|
1366
|
+
fontFamily?: string | undefined;
|
|
1367
|
+
cursorBlink?: boolean | undefined;
|
|
1368
|
+
cursorStyle?: "block" | "underline" | "bar" | undefined;
|
|
1369
|
+
scrollback?: number | undefined;
|
|
1370
|
+
}>;
|
|
1371
|
+
type TerminalConfig = z.infer<typeof TerminalConfigSchema>;
|
|
1328
1372
|
/**
|
|
1329
1373
|
* OpenSpecUI 配置 Schema
|
|
1330
1374
|
*
|
|
@@ -1335,36 +1379,73 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
|
|
|
1335
1379
|
cli: z.ZodDefault<z.ZodObject<{
|
|
1336
1380
|
/** CLI 命令前缀 */
|
|
1337
1381
|
command: z.ZodOptional<z.ZodString>;
|
|
1382
|
+
/** CLI 命令参数 */
|
|
1383
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1338
1384
|
}, "strip", z.ZodTypeAny, {
|
|
1339
1385
|
command?: string | undefined;
|
|
1386
|
+
args?: string[] | undefined;
|
|
1340
1387
|
}, {
|
|
1341
1388
|
command?: string | undefined;
|
|
1389
|
+
args?: string[] | undefined;
|
|
1342
1390
|
}>>;
|
|
1343
|
-
/**
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1391
|
+
/** 主题 */
|
|
1392
|
+
theme: z.ZodDefault<z.ZodEnum<["light", "dark", "system"]>>;
|
|
1393
|
+
/** 终端配置 */
|
|
1394
|
+
terminal: z.ZodDefault<z.ZodObject<{
|
|
1395
|
+
fontSize: z.ZodDefault<z.ZodNumber>;
|
|
1396
|
+
fontFamily: z.ZodDefault<z.ZodString>;
|
|
1397
|
+
cursorBlink: z.ZodDefault<z.ZodBoolean>;
|
|
1398
|
+
cursorStyle: z.ZodDefault<z.ZodEnum<["block", "underline", "bar"]>>;
|
|
1399
|
+
scrollback: z.ZodDefault<z.ZodNumber>;
|
|
1347
1400
|
}, "strip", z.ZodTypeAny, {
|
|
1348
|
-
|
|
1401
|
+
fontSize: number;
|
|
1402
|
+
fontFamily: string;
|
|
1403
|
+
cursorBlink: boolean;
|
|
1404
|
+
cursorStyle: "block" | "underline" | "bar";
|
|
1405
|
+
scrollback: number;
|
|
1349
1406
|
}, {
|
|
1350
|
-
|
|
1407
|
+
fontSize?: number | undefined;
|
|
1408
|
+
fontFamily?: string | undefined;
|
|
1409
|
+
cursorBlink?: boolean | undefined;
|
|
1410
|
+
cursorStyle?: "block" | "underline" | "bar" | undefined;
|
|
1411
|
+
scrollback?: number | undefined;
|
|
1351
1412
|
}>>;
|
|
1352
1413
|
}, "strip", z.ZodTypeAny, {
|
|
1353
1414
|
cli: {
|
|
1354
1415
|
command?: string | undefined;
|
|
1416
|
+
args?: string[] | undefined;
|
|
1355
1417
|
};
|
|
1356
|
-
|
|
1357
|
-
|
|
1418
|
+
theme: "light" | "dark" | "system";
|
|
1419
|
+
terminal: {
|
|
1420
|
+
fontSize: number;
|
|
1421
|
+
fontFamily: string;
|
|
1422
|
+
cursorBlink: boolean;
|
|
1423
|
+
cursorStyle: "block" | "underline" | "bar";
|
|
1424
|
+
scrollback: number;
|
|
1358
1425
|
};
|
|
1359
1426
|
}, {
|
|
1360
1427
|
cli?: {
|
|
1361
1428
|
command?: string | undefined;
|
|
1429
|
+
args?: string[] | undefined;
|
|
1362
1430
|
} | undefined;
|
|
1363
|
-
|
|
1364
|
-
|
|
1431
|
+
theme?: "light" | "dark" | "system" | undefined;
|
|
1432
|
+
terminal?: {
|
|
1433
|
+
fontSize?: number | undefined;
|
|
1434
|
+
fontFamily?: string | undefined;
|
|
1435
|
+
cursorBlink?: boolean | undefined;
|
|
1436
|
+
cursorStyle?: "block" | "underline" | "bar" | undefined;
|
|
1437
|
+
scrollback?: number | undefined;
|
|
1365
1438
|
} | undefined;
|
|
1366
1439
|
}>;
|
|
1367
1440
|
type OpenSpecUIConfig = z.infer<typeof OpenSpecUIConfigSchema>;
|
|
1441
|
+
type OpenSpecUIConfigUpdate = {
|
|
1442
|
+
cli?: {
|
|
1443
|
+
command?: string | null;
|
|
1444
|
+
args?: string[] | null;
|
|
1445
|
+
};
|
|
1446
|
+
theme?: OpenSpecUIConfig['theme'];
|
|
1447
|
+
terminal?: Partial<TerminalConfig>;
|
|
1448
|
+
};
|
|
1368
1449
|
/** 默认配置(静态,用于测试和类型) */
|
|
1369
1450
|
declare const DEFAULT_CONFIG: OpenSpecUIConfig;
|
|
1370
1451
|
/**
|
|
@@ -1375,6 +1456,9 @@ declare const DEFAULT_CONFIG: OpenSpecUIConfig;
|
|
|
1375
1456
|
*/
|
|
1376
1457
|
declare class ConfigManager {
|
|
1377
1458
|
private configPath;
|
|
1459
|
+
private projectDir;
|
|
1460
|
+
private resolvedRunner;
|
|
1461
|
+
private resolvingRunnerPromise;
|
|
1378
1462
|
constructor(projectDir: string);
|
|
1379
1463
|
/**
|
|
1380
1464
|
* 读取配置(响应式)
|
|
@@ -1388,23 +1472,41 @@ declare class ConfigManager {
|
|
|
1388
1472
|
*
|
|
1389
1473
|
* 会触发文件监听,自动更新订阅者。
|
|
1390
1474
|
*/
|
|
1391
|
-
writeConfig(config:
|
|
1475
|
+
writeConfig(config: OpenSpecUIConfigUpdate): Promise<void>;
|
|
1476
|
+
/**
|
|
1477
|
+
* 解析并缓存可用 CLI runner。
|
|
1478
|
+
*/
|
|
1479
|
+
private resolveCliRunner;
|
|
1480
|
+
private resolveCliRunnerUncached;
|
|
1392
1481
|
/**
|
|
1393
1482
|
* 获取 CLI 命令(数组形式)
|
|
1394
|
-
*
|
|
1395
|
-
* 优先级:配置文件 > 全局 openspec 命令 > npx fallback
|
|
1396
|
-
*
|
|
1397
|
-
* @returns CLI 命令数组,如 `['openspec']` 或 `['npx', '@fission-ai/openspec']`
|
|
1398
1483
|
*/
|
|
1399
1484
|
getCliCommand(): Promise<readonly string[]>;
|
|
1400
1485
|
/**
|
|
1401
1486
|
* 获取 CLI 命令的字符串形式(用于 UI 显示)
|
|
1402
1487
|
*/
|
|
1403
1488
|
getCliCommandString(): Promise<string>;
|
|
1489
|
+
/**
|
|
1490
|
+
* 获取 CLI 解析结果(用于诊断)
|
|
1491
|
+
*/
|
|
1492
|
+
getResolvedCliRunner(): Promise<ResolvedCliRunner>;
|
|
1493
|
+
/**
|
|
1494
|
+
* 清理 CLI 解析缓存(用于 ENOENT 自愈)
|
|
1495
|
+
*/
|
|
1496
|
+
invalidateResolvedCliRunner(): void;
|
|
1404
1497
|
/**
|
|
1405
1498
|
* 设置 CLI 命令
|
|
1406
1499
|
*/
|
|
1407
1500
|
setCliCommand(command: string): Promise<void>;
|
|
1501
|
+
private getConfiguredCommandParts;
|
|
1502
|
+
/**
|
|
1503
|
+
* 设置主题
|
|
1504
|
+
*/
|
|
1505
|
+
setTheme(theme: OpenSpecUIConfig['theme']): Promise<void>;
|
|
1506
|
+
/**
|
|
1507
|
+
* 设置终端配置(部分更新)
|
|
1508
|
+
*/
|
|
1509
|
+
setTerminalConfig(terminal: Partial<TerminalConfig>): Promise<void>;
|
|
1408
1510
|
}
|
|
1409
1511
|
//#endregion
|
|
1410
1512
|
//#region src/cli-executor.d.ts
|
|
@@ -1424,48 +1526,26 @@ interface CliStreamEvent {
|
|
|
1424
1526
|
/**
|
|
1425
1527
|
* CLI 执行器
|
|
1426
1528
|
*
|
|
1427
|
-
* 负责调用外部 openspec CLI
|
|
1428
|
-
*
|
|
1429
|
-
* - ['npx', '@fission-ai/openspec'] (默认)
|
|
1430
|
-
* - ['openspec'] (全局安装)
|
|
1431
|
-
* - 自定义数组或字符串
|
|
1432
|
-
*
|
|
1433
|
-
* 注意:所有命令都使用 shell: false 执行,避免 shell 注入风险
|
|
1529
|
+
* 负责调用外部 openspec CLI 命令,统一通过 ConfigManager 的 runner 解析结果执行。
|
|
1530
|
+
* 所有命令都使用 shell: false,避免 shell 注入风险。
|
|
1434
1531
|
*/
|
|
1435
1532
|
declare class CliExecutor {
|
|
1436
1533
|
private configManager;
|
|
1437
1534
|
private projectDir;
|
|
1438
1535
|
constructor(configManager: ConfigManager, projectDir: string);
|
|
1439
|
-
/**
|
|
1440
|
-
* 创建干净的环境变量,移除 pnpm 特有的配置
|
|
1441
|
-
* 避免 pnpm 环境变量污染 npx/npm 执行
|
|
1442
|
-
*/
|
|
1443
|
-
private getCleanEnv;
|
|
1444
|
-
/**
|
|
1445
|
-
* 构建完整命令数组
|
|
1446
|
-
*
|
|
1447
|
-
* @param args CLI 参数,如 ['init'] 或 ['archive', 'change-id']
|
|
1448
|
-
* @returns [command, ...commandArgs, ...args]
|
|
1449
|
-
*/
|
|
1450
1536
|
private buildCommandArray;
|
|
1537
|
+
private runCommandOnce;
|
|
1538
|
+
private executeInternal;
|
|
1451
1539
|
/**
|
|
1452
1540
|
* 执行 CLI 命令
|
|
1453
|
-
*
|
|
1454
|
-
* @param args CLI 参数,如 ['init'] 或 ['archive', 'change-id']
|
|
1455
|
-
* @returns 执行结果
|
|
1456
1541
|
*/
|
|
1457
1542
|
execute(args: string[]): Promise<CliResult>;
|
|
1458
1543
|
/**
|
|
1459
1544
|
* 执行 openspec init(非交互式)
|
|
1460
|
-
*
|
|
1461
|
-
* @param tools 工具列表,如 ['claude', 'cursor'] 或 'all' 或 'none'
|
|
1462
1545
|
*/
|
|
1463
1546
|
init(tools?: string[] | 'all' | 'none'): Promise<CliResult>;
|
|
1464
1547
|
/**
|
|
1465
1548
|
* 执行 openspec archive <changeId>(非交互式)
|
|
1466
|
-
*
|
|
1467
|
-
* @param changeId 要归档的 change ID
|
|
1468
|
-
* @param options 选项
|
|
1469
1549
|
*/
|
|
1470
1550
|
archive(changeId: string, options?: {
|
|
1471
1551
|
skipSpecs?: boolean;
|
|
@@ -1493,19 +1573,16 @@ declare class CliExecutor {
|
|
|
1493
1573
|
validateStream(type: 'spec' | 'change' | undefined, id: string | undefined, onEvent: (event: CliStreamEvent) => void): Promise<() => void>;
|
|
1494
1574
|
/**
|
|
1495
1575
|
* 检查 CLI 是否可用
|
|
1496
|
-
* @param timeout 超时时间(毫秒),默认 10 秒
|
|
1497
1576
|
*/
|
|
1498
1577
|
checkAvailability(timeout?: number): Promise<{
|
|
1499
1578
|
available: boolean;
|
|
1500
1579
|
version?: string;
|
|
1501
1580
|
error?: string;
|
|
1581
|
+
effectiveCommand?: string;
|
|
1582
|
+
tried?: string[];
|
|
1502
1583
|
}>;
|
|
1503
1584
|
/**
|
|
1504
1585
|
* 流式执行 CLI 命令
|
|
1505
|
-
*
|
|
1506
|
-
* @param args CLI 参数
|
|
1507
|
-
* @param onEvent 事件回调
|
|
1508
|
-
* @returns 取消函数
|
|
1509
1586
|
*/
|
|
1510
1587
|
executeStream(args: string[], onEvent: (event: CliStreamEvent) => void): Promise<() => void>;
|
|
1511
1588
|
/**
|
|
@@ -1521,13 +1598,6 @@ declare class CliExecutor {
|
|
|
1521
1598
|
}, onEvent: (event: CliStreamEvent) => void): Promise<() => void>;
|
|
1522
1599
|
/**
|
|
1523
1600
|
* 流式执行任意命令(数组形式)
|
|
1524
|
-
*
|
|
1525
|
-
* 用于执行不需要 openspec CLI 前缀的命令,如 npm install。
|
|
1526
|
-
* 使用 shell: false 避免 shell 注入风险。
|
|
1527
|
-
*
|
|
1528
|
-
* @param command 命令数组,如 ['npm', 'install', '-g', '@fission-ai/openspec']
|
|
1529
|
-
* @param onEvent 事件回调
|
|
1530
|
-
* @returns 取消函数
|
|
1531
1601
|
*/
|
|
1532
1602
|
executeCommandStream(command: readonly string[], onEvent: (event: CliStreamEvent) => void): () => void;
|
|
1533
1603
|
}
|
|
@@ -1603,14 +1673,14 @@ declare const ArtifactStatusSchema: z.ZodObject<{
|
|
|
1603
1673
|
missingDeps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1604
1674
|
relativePath: z.ZodOptional<z.ZodString>;
|
|
1605
1675
|
}, "strip", z.ZodTypeAny, {
|
|
1606
|
-
status: "done" | "ready" | "blocked";
|
|
1607
1676
|
id: string;
|
|
1677
|
+
status: "done" | "ready" | "blocked";
|
|
1608
1678
|
outputPath: string;
|
|
1609
1679
|
missingDeps?: string[] | undefined;
|
|
1610
1680
|
relativePath?: string | undefined;
|
|
1611
1681
|
}, {
|
|
1612
|
-
status: "done" | "ready" | "blocked";
|
|
1613
1682
|
id: string;
|
|
1683
|
+
status: "done" | "ready" | "blocked";
|
|
1614
1684
|
outputPath: string;
|
|
1615
1685
|
missingDeps?: string[] | undefined;
|
|
1616
1686
|
relativePath?: string | undefined;
|
|
@@ -1628,14 +1698,14 @@ declare const ChangeStatusSchema: z.ZodObject<{
|
|
|
1628
1698
|
missingDeps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1629
1699
|
relativePath: z.ZodOptional<z.ZodString>;
|
|
1630
1700
|
}, "strip", z.ZodTypeAny, {
|
|
1631
|
-
status: "done" | "ready" | "blocked";
|
|
1632
1701
|
id: string;
|
|
1702
|
+
status: "done" | "ready" | "blocked";
|
|
1633
1703
|
outputPath: string;
|
|
1634
1704
|
missingDeps?: string[] | undefined;
|
|
1635
1705
|
relativePath?: string | undefined;
|
|
1636
1706
|
}, {
|
|
1637
|
-
status: "done" | "ready" | "blocked";
|
|
1638
1707
|
id: string;
|
|
1708
|
+
status: "done" | "ready" | "blocked";
|
|
1639
1709
|
outputPath: string;
|
|
1640
1710
|
missingDeps?: string[] | undefined;
|
|
1641
1711
|
relativePath?: string | undefined;
|
|
@@ -1646,8 +1716,8 @@ declare const ChangeStatusSchema: z.ZodObject<{
|
|
|
1646
1716
|
isComplete: boolean;
|
|
1647
1717
|
applyRequires: string[];
|
|
1648
1718
|
artifacts: {
|
|
1649
|
-
status: "done" | "ready" | "blocked";
|
|
1650
1719
|
id: string;
|
|
1720
|
+
status: "done" | "ready" | "blocked";
|
|
1651
1721
|
outputPath: string;
|
|
1652
1722
|
missingDeps?: string[] | undefined;
|
|
1653
1723
|
relativePath?: string | undefined;
|
|
@@ -1658,8 +1728,8 @@ declare const ChangeStatusSchema: z.ZodObject<{
|
|
|
1658
1728
|
isComplete: boolean;
|
|
1659
1729
|
applyRequires: string[];
|
|
1660
1730
|
artifacts: {
|
|
1661
|
-
status: "done" | "ready" | "blocked";
|
|
1662
1731
|
id: string;
|
|
1732
|
+
status: "done" | "ready" | "blocked";
|
|
1663
1733
|
outputPath: string;
|
|
1664
1734
|
missingDeps?: string[] | undefined;
|
|
1665
1735
|
relativePath?: string | undefined;
|
|
@@ -1672,13 +1742,13 @@ declare const DependencyInfoSchema: z.ZodObject<{
|
|
|
1672
1742
|
path: z.ZodString;
|
|
1673
1743
|
description: z.ZodString;
|
|
1674
1744
|
}, "strip", z.ZodTypeAny, {
|
|
1675
|
-
path: string;
|
|
1676
1745
|
id: string;
|
|
1746
|
+
path: string;
|
|
1677
1747
|
description: string;
|
|
1678
1748
|
done: boolean;
|
|
1679
1749
|
}, {
|
|
1680
|
-
path: string;
|
|
1681
1750
|
id: string;
|
|
1751
|
+
path: string;
|
|
1682
1752
|
description: string;
|
|
1683
1753
|
done: boolean;
|
|
1684
1754
|
}>;
|
|
@@ -1786,13 +1856,13 @@ declare const ArtifactInstructionsSchema: z.ZodObject<{
|
|
|
1786
1856
|
path: z.ZodString;
|
|
1787
1857
|
description: z.ZodString;
|
|
1788
1858
|
}, "strip", z.ZodTypeAny, {
|
|
1789
|
-
path: string;
|
|
1790
1859
|
id: string;
|
|
1860
|
+
path: string;
|
|
1791
1861
|
description: string;
|
|
1792
1862
|
done: boolean;
|
|
1793
1863
|
}, {
|
|
1794
|
-
path: string;
|
|
1795
1864
|
id: string;
|
|
1865
|
+
path: string;
|
|
1796
1866
|
description: string;
|
|
1797
1867
|
done: boolean;
|
|
1798
1868
|
}>, "many">;
|
|
@@ -1806,8 +1876,8 @@ declare const ArtifactInstructionsSchema: z.ZodObject<{
|
|
|
1806
1876
|
artifactId: string;
|
|
1807
1877
|
template: string;
|
|
1808
1878
|
dependencies: {
|
|
1809
|
-
path: string;
|
|
1810
1879
|
id: string;
|
|
1880
|
+
path: string;
|
|
1811
1881
|
description: string;
|
|
1812
1882
|
done: boolean;
|
|
1813
1883
|
}[];
|
|
@@ -1824,8 +1894,8 @@ declare const ArtifactInstructionsSchema: z.ZodObject<{
|
|
|
1824
1894
|
artifactId: string;
|
|
1825
1895
|
template: string;
|
|
1826
1896
|
dependencies: {
|
|
1827
|
-
path: string;
|
|
1828
1897
|
id: string;
|
|
1898
|
+
path: string;
|
|
1829
1899
|
description: string;
|
|
1830
1900
|
done: boolean;
|
|
1831
1901
|
}[];
|
|
@@ -1867,16 +1937,16 @@ declare const SchemaResolutionSchema: z.ZodObject<{
|
|
|
1867
1937
|
source: "project" | "user" | "package";
|
|
1868
1938
|
}>, "many">;
|
|
1869
1939
|
}, "strip", z.ZodTypeAny, {
|
|
1870
|
-
path: string;
|
|
1871
1940
|
name: string;
|
|
1941
|
+
path: string;
|
|
1872
1942
|
source: "project" | "user" | "package";
|
|
1873
1943
|
shadows: {
|
|
1874
1944
|
path: string;
|
|
1875
1945
|
source: "project" | "user" | "package";
|
|
1876
1946
|
}[];
|
|
1877
1947
|
}, {
|
|
1878
|
-
path: string;
|
|
1879
1948
|
name: string;
|
|
1949
|
+
path: string;
|
|
1880
1950
|
source: "project" | "user" | "package";
|
|
1881
1951
|
shadows: {
|
|
1882
1952
|
path: string;
|
|
@@ -2174,20 +2244,20 @@ declare const PtySessionInfoSchema: z.ZodObject<{
|
|
|
2174
2244
|
isExited: z.ZodBoolean;
|
|
2175
2245
|
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
2176
2246
|
}, "strip", z.ZodTypeAny, {
|
|
2247
|
+
id: string;
|
|
2177
2248
|
command: string;
|
|
2178
2249
|
args: string[];
|
|
2179
2250
|
platform: "windows" | "macos" | "common";
|
|
2180
2251
|
exitCode: number | null;
|
|
2181
2252
|
title: string;
|
|
2182
|
-
id: string;
|
|
2183
2253
|
isExited: boolean;
|
|
2184
2254
|
}, {
|
|
2255
|
+
id: string;
|
|
2185
2256
|
command: string;
|
|
2186
2257
|
args: string[];
|
|
2187
2258
|
platform: "windows" | "macos" | "common";
|
|
2188
2259
|
exitCode: number | null;
|
|
2189
2260
|
title: string;
|
|
2190
|
-
id: string;
|
|
2191
2261
|
isExited: boolean;
|
|
2192
2262
|
}>;
|
|
2193
2263
|
declare const PtyCreateMessageSchema: z.ZodObject<{
|
|
@@ -2432,42 +2502,42 @@ declare const PtyListResponseSchema: z.ZodObject<{
|
|
|
2432
2502
|
isExited: z.ZodBoolean;
|
|
2433
2503
|
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
2434
2504
|
}, "strip", z.ZodTypeAny, {
|
|
2505
|
+
id: string;
|
|
2435
2506
|
command: string;
|
|
2436
2507
|
args: string[];
|
|
2437
2508
|
platform: "windows" | "macos" | "common";
|
|
2438
2509
|
exitCode: number | null;
|
|
2439
2510
|
title: string;
|
|
2440
|
-
id: string;
|
|
2441
2511
|
isExited: boolean;
|
|
2442
2512
|
}, {
|
|
2513
|
+
id: string;
|
|
2443
2514
|
command: string;
|
|
2444
2515
|
args: string[];
|
|
2445
2516
|
platform: "windows" | "macos" | "common";
|
|
2446
2517
|
exitCode: number | null;
|
|
2447
2518
|
title: string;
|
|
2448
|
-
id: string;
|
|
2449
2519
|
isExited: boolean;
|
|
2450
2520
|
}>, "many">;
|
|
2451
2521
|
}, "strip", z.ZodTypeAny, {
|
|
2452
2522
|
type: "list";
|
|
2453
2523
|
sessions: {
|
|
2524
|
+
id: string;
|
|
2454
2525
|
command: string;
|
|
2455
2526
|
args: string[];
|
|
2456
2527
|
platform: "windows" | "macos" | "common";
|
|
2457
2528
|
exitCode: number | null;
|
|
2458
2529
|
title: string;
|
|
2459
|
-
id: string;
|
|
2460
2530
|
isExited: boolean;
|
|
2461
2531
|
}[];
|
|
2462
2532
|
}, {
|
|
2463
2533
|
type: "list";
|
|
2464
2534
|
sessions: {
|
|
2535
|
+
id: string;
|
|
2465
2536
|
command: string;
|
|
2466
2537
|
args: string[];
|
|
2467
2538
|
platform: "windows" | "macos" | "common";
|
|
2468
2539
|
exitCode: number | null;
|
|
2469
2540
|
title: string;
|
|
2470
|
-
id: string;
|
|
2471
2541
|
isExited: boolean;
|
|
2472
2542
|
}[];
|
|
2473
2543
|
}>;
|
|
@@ -2478,14 +2548,14 @@ declare const PtyErrorResponseSchema: z.ZodObject<{
|
|
|
2478
2548
|
message: z.ZodString;
|
|
2479
2549
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
2480
2550
|
}, "strip", z.ZodTypeAny, {
|
|
2481
|
-
type: "error";
|
|
2482
2551
|
code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND";
|
|
2483
2552
|
message: string;
|
|
2553
|
+
type: "error";
|
|
2484
2554
|
sessionId?: string | undefined;
|
|
2485
2555
|
}, {
|
|
2486
|
-
type: "error";
|
|
2487
2556
|
code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND";
|
|
2488
2557
|
message: string;
|
|
2558
|
+
type: "error";
|
|
2489
2559
|
sessionId?: string | undefined;
|
|
2490
2560
|
}>;
|
|
2491
2561
|
declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -2562,42 +2632,42 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2562
2632
|
isExited: z.ZodBoolean;
|
|
2563
2633
|
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
2564
2634
|
}, "strip", z.ZodTypeAny, {
|
|
2635
|
+
id: string;
|
|
2565
2636
|
command: string;
|
|
2566
2637
|
args: string[];
|
|
2567
2638
|
platform: "windows" | "macos" | "common";
|
|
2568
2639
|
exitCode: number | null;
|
|
2569
2640
|
title: string;
|
|
2570
|
-
id: string;
|
|
2571
2641
|
isExited: boolean;
|
|
2572
2642
|
}, {
|
|
2643
|
+
id: string;
|
|
2573
2644
|
command: string;
|
|
2574
2645
|
args: string[];
|
|
2575
2646
|
platform: "windows" | "macos" | "common";
|
|
2576
2647
|
exitCode: number | null;
|
|
2577
2648
|
title: string;
|
|
2578
|
-
id: string;
|
|
2579
2649
|
isExited: boolean;
|
|
2580
2650
|
}>, "many">;
|
|
2581
2651
|
}, "strip", z.ZodTypeAny, {
|
|
2582
2652
|
type: "list";
|
|
2583
2653
|
sessions: {
|
|
2654
|
+
id: string;
|
|
2584
2655
|
command: string;
|
|
2585
2656
|
args: string[];
|
|
2586
2657
|
platform: "windows" | "macos" | "common";
|
|
2587
2658
|
exitCode: number | null;
|
|
2588
2659
|
title: string;
|
|
2589
|
-
id: string;
|
|
2590
2660
|
isExited: boolean;
|
|
2591
2661
|
}[];
|
|
2592
2662
|
}, {
|
|
2593
2663
|
type: "list";
|
|
2594
2664
|
sessions: {
|
|
2665
|
+
id: string;
|
|
2595
2666
|
command: string;
|
|
2596
2667
|
args: string[];
|
|
2597
2668
|
platform: "windows" | "macos" | "common";
|
|
2598
2669
|
exitCode: number | null;
|
|
2599
2670
|
title: string;
|
|
2600
|
-
id: string;
|
|
2601
2671
|
isExited: boolean;
|
|
2602
2672
|
}[];
|
|
2603
2673
|
}>, z.ZodObject<{
|
|
@@ -2606,14 +2676,14 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2606
2676
|
message: z.ZodString;
|
|
2607
2677
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
2608
2678
|
}, "strip", z.ZodTypeAny, {
|
|
2609
|
-
type: "error";
|
|
2610
2679
|
code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND";
|
|
2611
2680
|
message: string;
|
|
2681
|
+
type: "error";
|
|
2612
2682
|
sessionId?: string | undefined;
|
|
2613
2683
|
}, {
|
|
2614
|
-
type: "error";
|
|
2615
2684
|
code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND";
|
|
2616
2685
|
message: string;
|
|
2686
|
+
type: "error";
|
|
2617
2687
|
sessionId?: string | undefined;
|
|
2618
2688
|
}>]>;
|
|
2619
2689
|
type PtyClientMessage = z.infer<typeof PtyClientMessageSchema>;
|
|
@@ -2621,4 +2691,4 @@ type PtyServerMessage = z.infer<typeof PtyServerMessageSchema>;
|
|
|
2621
2691
|
type PtySessionInfo = z.infer<typeof PtySessionInfoSchema>;
|
|
2622
2692
|
type PtyPlatform = z.infer<typeof PtyPlatformSchema>;
|
|
2623
2693
|
//#endregion
|
|
2624
|
-
export { type AIToolOption, AI_TOOLS, type ApplyInstructions, ApplyInstructionsSchema, type ApplyTask, ApplyTaskSchema, type ArchiveMeta, type ArtifactInstructions, ArtifactInstructionsSchema, type ArtifactStatus, ArtifactStatusSchema, type Change, type ChangeFile, ChangeFileSchema, type ChangeMeta, ChangeSchema, type ChangeStatus, ChangeStatusSchema, CliExecutor, type CliResult, type CliSniffResult, type CliStreamEvent, ConfigManager, DEFAULT_CONFIG, type Delta, type DeltaOperation, DeltaOperationType, DeltaSchema, type DeltaSpec, DeltaSpecSchema, type DependencyInfo, DependencyInfoSchema, type ExportSnapshot, type FileChangeEvent, type FileChangeType, MarkdownParser, OpenSpecAdapter, type OpenSpecUIConfig, OpenSpecUIConfigSchema, OpenSpecWatcher, OpsxKernel, type PathCallback, ProjectWatcher, 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 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 ToolConfig, type ValidationIssue, type ValidationResult, Validator, type WatchEvent, type WatchEventType, acquireWatcher, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getProjectWatcher, getToolById, getWatchedProjectDir, initWatcherPool, isGlobPattern, isToolConfigured, isWatcherPoolInitialized, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, sniffGlobalCli };
|
|
2694
|
+
export { type AIToolOption, AI_TOOLS, type ApplyInstructions, ApplyInstructionsSchema, type ApplyTask, ApplyTaskSchema, type ArchiveMeta, type ArtifactInstructions, ArtifactInstructionsSchema, type ArtifactStatus, ArtifactStatusSchema, type Change, type ChangeFile, ChangeFileSchema, type ChangeMeta, ChangeSchema, type ChangeStatus, ChangeStatusSchema, CliExecutor, type CliResult, type CliRunnerAttempt, type CliSniffResult, type CliStreamEvent, ConfigManager, DEFAULT_CONFIG, 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, 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 ToolConfig, type ValidationIssue, type ValidationResult, Validator, type WatchEvent, type WatchEventType, acquireWatcher, buildCliRunnerCandidates, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getProjectWatcher, getToolById, getWatchedProjectDir, initWatcherPool, isGlobPattern, isToolConfigured, isWatcherPoolInitialized, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, sniffGlobalCli };
|