@xcompiler/cli 0.2.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/LICENSE +201 -0
- package/NOTICE +10 -0
- package/README.CN.md +272 -0
- package/README.md +274 -0
- package/dist/acp/index.d.ts +1135 -0
- package/dist/acp/index.js +13452 -0
- package/dist/acp/index.js.map +1 -0
- package/dist/cli/xcompiler.d.ts +2 -0
- package/dist/cli/xcompiler.js +14815 -0
- package/dist/cli/xcompiler.js.map +1 -0
- package/dist/cli/xcompiler_build.d.ts +2 -0
- package/dist/cli/xcompiler_build.js +8009 -0
- package/dist/cli/xcompiler_build.js.map +1 -0
- package/dist/cli/xcompiler_run.d.ts +2 -0
- package/dist/cli/xcompiler_run.js +10736 -0
- package/dist/cli/xcompiler_run.js.map +1 -0
- package/dist/plugins/index.d.ts +809 -0
- package/dist/plugins/index.js +1829 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/runtime/runtime.d.ts +1217 -0
- package/dist/runtime/runtime.js +13397 -0
- package/dist/runtime/runtime.js.map +1 -0
- package/docs/acp.md +64 -0
- package/docs/plugin_api.md +106 -0
- package/docs/self_bootstrap.md +88 -0
- package/docs/versioning.md +33 -0
- package/package.json +108 -0
package/docs/acp.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# XCompiler ACP Adapter
|
|
2
|
+
|
|
3
|
+
XCompiler exposes an ACP Code Agent adapter over stdio:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
xcompiler acp
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The adapter is protocol-facing only. It maps ACP requests to the XCompiler Runtime and streams Runtime progress back through `session/update`.
|
|
10
|
+
|
|
11
|
+
## Supported ACP v1 Flow
|
|
12
|
+
|
|
13
|
+
- `initialize`
|
|
14
|
+
- `session/new`
|
|
15
|
+
- `session/prompt`
|
|
16
|
+
- `session/cancel`
|
|
17
|
+
- `session/close`
|
|
18
|
+
- `session/update`
|
|
19
|
+
- `session/request_permission`
|
|
20
|
+
|
|
21
|
+
The adapter keeps stdout reserved for JSON-RPC messages. Runtime logs and adapter diagnostics must go to stderr.
|
|
22
|
+
|
|
23
|
+
## Zed Local Configuration
|
|
24
|
+
|
|
25
|
+
When XCompiler is installed on PATH:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"agent_servers": {
|
|
30
|
+
"XCompiler": {
|
|
31
|
+
"command": "xcompiler",
|
|
32
|
+
"args": ["acp"],
|
|
33
|
+
"env": {}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For local development from this repository:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"agent_servers": {
|
|
44
|
+
"XCompiler Dev": {
|
|
45
|
+
"command": "node",
|
|
46
|
+
"args": [
|
|
47
|
+
"--import",
|
|
48
|
+
"tsx",
|
|
49
|
+
"/Users/ddk/Documents/Workspace/TOAA/src/cli/xcompiler.ts",
|
|
50
|
+
"acp"
|
|
51
|
+
],
|
|
52
|
+
"env": {}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Current Limitations
|
|
59
|
+
|
|
60
|
+
- The adapter supports Code Agent task execution, not general chat.
|
|
61
|
+
- Build-stage confirm/select interactions are mapped to `session/request_permission`.
|
|
62
|
+
- Free-form build-stage follow-up text is not yet modeled as a multi-turn ACP prompt loop.
|
|
63
|
+
- Runtime cancellation is best-effort until Runtime exposes hard cancellation.
|
|
64
|
+
- Official ACP registry publication still requires a real Zed smoke test and final registry metadata alignment.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# XCompiler Plugin API
|
|
2
|
+
|
|
3
|
+
XCompiler 的插件层位于核心流程与扩展能力之间。既支持直接传入 `XCompilerPlugin[]`,也提供 `loadPluginSources()` 从分离的 manifest 与模块入口执行 manifest-first 加载;当前仍不负责从网络安装第三方包或维护 marketplace。自举编排可通过 `@xcompiler/cli/runtime` 调用 `runBootstrap`,候选内部的 compile / run 仍触发相同生命周期 Hook。
|
|
4
|
+
|
|
5
|
+
## 清单与版本兼容
|
|
6
|
+
|
|
7
|
+
设计参考 [VS Code Extension Manifest](https://code.visualstudio.com/api/references/extension-manifest):插件元数据与可执行入口分离,唯一 ID、插件 SemVer 和宿主兼容声明都是必填项。XCompiler 使用可序列化的 `manifest`;`loadPluginSources()` 会先读取并检查全部 manifest,全部通过后才 import 任一模块,因此 registry / marketplace 可在不执行插件代码的前提下索引和预检。
|
|
8
|
+
|
|
9
|
+
XCompiler 核心版本和 Plugin API 版本独立演进:核心使用 SemVer(当前 `0.1.3`),Plugin API 使用整数主版本(当前 `1`)。每个插件清单必须声明:
|
|
10
|
+
|
|
11
|
+
| 字段 | 必填 | 语义 |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| `id` | 是 | 全局唯一稳定 ID;小写字母/数字/点/连字符/下划线 |
|
|
14
|
+
| `version` | 是 | 插件自身 SemVer |
|
|
15
|
+
| `apiVersion` | 是 | 插件面向的 XCompiler Plugin API 主版本 |
|
|
16
|
+
| `minXCompilerVersion` | 是 | 插件可运行的最低 XCompiler 核心 SemVer |
|
|
17
|
+
| `displayName/description/license/homepage/keywords` | 否 | 目录与展示元数据 |
|
|
18
|
+
|
|
19
|
+
`loadPluginSources()` 在模块 import 前检查全部 manifest 和重复 ID,并校验模块导出的运行时 manifest 与预检文件一致;拒绝事件可写入审计日志。直接传入已经 import 的 `XCompilerPlugin[]` 时,`PluginHost` 仍保证在任何 `setup()` 前完成同样检查,但无法撤销调用方此前执行的模块顶层代码。`checkPluginCompatibility()` 可供安装器、插件目录或配置预检复用。
|
|
20
|
+
|
|
21
|
+
版本常量从 `@xcompiler/cli/plugins` 导出;插件在 `setup(api)` 中也可读取 `api.xcompilerVersion` 和 `api.pluginApiVersion`。插件升级自身实现时递增 `manifest.version`;需要较新核心能力时提高 `manifest.minXCompilerVersion`;只有公共插件接口发生不兼容变化时,XCompiler 才递增 Plugin API 主版本。
|
|
22
|
+
|
|
23
|
+
## 模块边界
|
|
24
|
+
|
|
25
|
+
| 模块 | 责任 | 插件扩展点 |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `cli/compile` | 需求输入、澄清、计划生成和人工门 | `compile.*` |
|
|
28
|
+
| `llm/router` | provider 选择、fallback、审计 | `llm.*` |
|
|
29
|
+
| `core/engine` | V 模型调度、DEBUG 重试、质量门 | `run.*`、`step.*` |
|
|
30
|
+
| `agents/executor` | 单 Step 多轮工具执行 | 通过 `step.attempt.*` 和 `tool.*` 观察 |
|
|
31
|
+
| `tools` / `skills` | 原子能力与高阶能力组合 | `registerTool`、`registerSkill` |
|
|
32
|
+
| `plugins` | 注册、排序、异常隔离和 Hook 调度 | 公共插件 API |
|
|
33
|
+
|
|
34
|
+
安全边界保持不变:插件注册的 Tool 进入与内置 Tool 相同的白名单选择和 `EditGuard`;Hook 不能绕过 workspace 写入限制。
|
|
35
|
+
|
|
36
|
+
## 生命周期 Hooks
|
|
37
|
+
|
|
38
|
+
| Hook | 触发位置 |
|
|
39
|
+
|---|---|
|
|
40
|
+
| `compile.start` | 配置、审计和插件初始化完成后 |
|
|
41
|
+
| `compile.afterClarify` | 澄清问答及用户补充收集后 |
|
|
42
|
+
| `compile.beforeDecompose` | Planner 生成计划之前 |
|
|
43
|
+
| `compile.afterPlan` | 计划校准后、Schema/Lint 之前 |
|
|
44
|
+
| `compile.finish` | 计划和文档持久化后 |
|
|
45
|
+
| `llm.before/after/error` | 每次完整 LLM 调用外围 |
|
|
46
|
+
| `run.before/after/error` | PhaseEngine 整体运行外围 |
|
|
47
|
+
| `step.before/after/error` | 单个 V 模型 Step 外围 |
|
|
48
|
+
| `step.attempt.before/after` | 正常执行或 DEBUG retry 的每次尝试外围 |
|
|
49
|
+
| `tool.before/after/error` | Tool 调用外围(仍受 EditGuard 保护) |
|
|
50
|
+
|
|
51
|
+
同一 Hook 按 `priority` 从大到小执行;优先级相同时保持插件数组与注册顺序。插件错误默认记录审计并继续,插件可声明 `failureMode: 'fail'`,宿主也可启用 `strict` 强制失败。
|
|
52
|
+
|
|
53
|
+
## 示例
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
import type { XCompilerPlugin } from '@xcompiler/cli/plugins';
|
|
57
|
+
import { XCOMPILER_PLUGIN_API_VERSION } from '@xcompiler/cli/plugins';
|
|
58
|
+
import { runExecute } from '@xcompiler/cli/runtime';
|
|
59
|
+
|
|
60
|
+
export const policyPlugin: XCompilerPlugin = {
|
|
61
|
+
manifest: {
|
|
62
|
+
id: 'example.policy',
|
|
63
|
+
displayName: 'Example Policy',
|
|
64
|
+
description: 'Enforces organization plan policies.',
|
|
65
|
+
version: '1.0.0',
|
|
66
|
+
apiVersion: XCOMPILER_PLUGIN_API_VERSION,
|
|
67
|
+
minXCompilerVersion: '0.1.3',
|
|
68
|
+
license: 'Apache-2.0',
|
|
69
|
+
keywords: ['policy', 'compliance'],
|
|
70
|
+
},
|
|
71
|
+
failureMode: 'fail',
|
|
72
|
+
setup(api) {
|
|
73
|
+
api.on('compile.afterPlan', ({ plan }) => {
|
|
74
|
+
if (!plan.steps.some((step) => step.phase === 'TEST')) {
|
|
75
|
+
throw new Error('Every plan must contain a TEST step.');
|
|
76
|
+
}
|
|
77
|
+
}, { priority: 100 });
|
|
78
|
+
|
|
79
|
+
api.on('tool.before', ({ tool, args }) => {
|
|
80
|
+
// 只做策略检查;实际写入仍由 Tool + EditGuard 完成。
|
|
81
|
+
if (tool === 'write_file') console.log('write_file', args);
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
程序化调用:
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import { loadPluginSources } from '@xcompiler/cli/plugins';
|
|
91
|
+
|
|
92
|
+
const plugins = await loadPluginSources({
|
|
93
|
+
baseDir: process.cwd(),
|
|
94
|
+
sources: [{
|
|
95
|
+
manifestPath: 'plugins/example/plugin.json',
|
|
96
|
+
entryPath: 'plugins/example/index.js',
|
|
97
|
+
}],
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
await runExecute({
|
|
101
|
+
workspace,
|
|
102
|
+
planPath,
|
|
103
|
+
plugins,
|
|
104
|
+
pluginStrict: true,
|
|
105
|
+
});
|
|
106
|
+
```
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# XCompiler 功能自举设计
|
|
2
|
+
|
|
3
|
+
## 目标
|
|
4
|
+
|
|
5
|
+
功能自举指稳定版本 XCompiler-N 能读取自身工程,以完整 V 模型规划、实现并验证下一代
|
|
6
|
+
XCompiler-N+1;N+1 晋级后能够继续执行下一轮自举。自举不等同于进程内热更新,正在运行的
|
|
7
|
+
N 在本轮结束前始终是可信执行器。
|
|
8
|
+
|
|
9
|
+
## 信任与隔离边界
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
宿主 checkout(XCompiler-N,必须 clean)
|
|
13
|
+
│
|
|
14
|
+
├── base commit ──► 隔离 worktree / 候选分支
|
|
15
|
+
│ │
|
|
16
|
+
│ ├── intent=self 编译 V 模型计划
|
|
17
|
+
│ ├── 执行 CODE / TEST / DEBUG / DELIVERY
|
|
18
|
+
│ └── 确定性质量门
|
|
19
|
+
│
|
|
20
|
+
└── 人工晋级门 ──► git merge --ff-only ──► XCompiler-N+1
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- Step 内的 `git add .`、快照提交和 `reset --hard` 只允许发生在候选 worktree。
|
|
24
|
+
- 默认 worktree 位于 `.xcompiler/bootstrap/worktrees/<run-id>`,该目录不进入版本控制。
|
|
25
|
+
- 候选分支使用 `xcompiler/bootstrap/<run-id>`,报告位于
|
|
26
|
+
`.xcompiler/bootstrap/reports/<run-id>.md`。
|
|
27
|
+
- 自举开始时宿主必须 clean;晋级时再次验证宿主 HEAD 等于基线提交且仍为 clean。
|
|
28
|
+
- 质量门开始前记录候选 commit;门禁结束后候选 HEAD 必须未变化且 worktree 仍为 clean。
|
|
29
|
+
- 晋级合并已验证的精确 commit SHA,不按可能漂移的候选分支头合并。
|
|
30
|
+
|
|
31
|
+
## Self 计划约束
|
|
32
|
+
|
|
33
|
+
`self` 属于增量意图,加载已有 plan、项目记忆、源码/测试树、manifest,以及
|
|
34
|
+
`XCompiler_design.md`、本设计、实施计划和插件 API。
|
|
35
|
+
|
|
36
|
+
Planner 必须遵守:
|
|
37
|
+
|
|
38
|
+
- 保留现有 `package.json`、`tsconfig`、bin、CLI 入口、模块布局和公共导出。
|
|
39
|
+
- 不得为了满足新建工程规则创建 `src/main.ts`。
|
|
40
|
+
- 未涉及依赖或脚本时,不得把 `package.json` / `tsconfig.json` 列为 Step 输出。
|
|
41
|
+
- 每个 CODE / REFACTOR Step 只覆盖本次增量,并保留 ARCH → CODE → TEST 可追踪性。
|
|
42
|
+
|
|
43
|
+
## 质量门
|
|
44
|
+
|
|
45
|
+
候选版本执行完成后按顺序运行:
|
|
46
|
+
|
|
47
|
+
1. `npm run version:check`(必选;校验 package、lockfile 与运行时版本常量)
|
|
48
|
+
2. `npm run typecheck`(必选;缺少 script 也视为失败)
|
|
49
|
+
3. `npm test`(必选)
|
|
50
|
+
4. `npm run build`(必选)
|
|
51
|
+
5. `npm run lint`(必选;缺少 script 也视为失败)
|
|
52
|
+
6. 使用 `package.json.bin` 的首个入口执行 `node <entry> --help`(必选;缺少 bin 也视为失败)
|
|
53
|
+
7. 执行 `node <entry> bootstrap --help`,确认 N+1 仍暴露下一代自举入口(必选)
|
|
54
|
+
8. `npm pack --dry-run --json`(必选)
|
|
55
|
+
|
|
56
|
+
任一必选门失败,候选状态为 `qualification-failed`,禁止晋级。LLM 服务是否在线只影响
|
|
57
|
+
计划生成和 Step 执行,不改变确定性质量门的判定标准。
|
|
58
|
+
|
|
59
|
+
质量门当前优先运行在 subprocess 沙箱中:依赖使用锁文件执行 `npm ci --ignore-scripts`,
|
|
60
|
+
并使用独立 HOME、TMPDIR、npm cache 与最小环境变量,不继承 provider key、代理或其它
|
|
61
|
+
进程机密。subprocess 不能提供 Docker 级别的网络与资源硬隔离,因此候选 commit 完整性
|
|
62
|
+
检查仍是强制门禁。Docker 环境尚未完成实际环境验证,仅在显式传入
|
|
63
|
+
`--docker-qualification` 时实验启用;该模式把候选脚本置于 `--network none`、CPU / 内存 /
|
|
64
|
+
PID 限制和 `no-new-privileges` 下执行。
|
|
65
|
+
|
|
66
|
+
## CLI
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# 默认:生成候选分支、保留 worktree、写报告,不修改当前分支
|
|
70
|
+
xcompiler bootstrap -r /path/to/XCompiler -i self_req.md --yes
|
|
71
|
+
|
|
72
|
+
# 全部门禁通过后,在同一次运行末尾显式快进晋级
|
|
73
|
+
xcompiler bootstrap -r /path/to/XCompiler -i self_req.md --yes --promote
|
|
74
|
+
|
|
75
|
+
# 写完报告后删除 worktree,候选分支仍保留
|
|
76
|
+
xcompiler bootstrap -r /path/to/XCompiler -i self_req.md --yes --cleanup
|
|
77
|
+
|
|
78
|
+
# 实验选项:显式使用尚未完成环境验证的 Docker 质量门
|
|
79
|
+
xcompiler bootstrap -r /path/to/XCompiler -i self_req.md --yes --docker-qualification
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## 回滚与失败处理
|
|
83
|
+
|
|
84
|
+
- compile 取消、Step 失败或质量门失败:保留候选分支和 worktree供诊断,宿主不变。
|
|
85
|
+
- 晋级前失败:删除 worktree 和候选分支即可,不需要重置宿主仓库。
|
|
86
|
+
- 晋级后发现问题:通过新的修复提交或版本化 revert 处理,不复用执行期的硬重置。
|
|
87
|
+
- 自举报告记录 base/candidate commit、检查命令、耗时和变更文件,作为下一轮输入证据;
|
|
88
|
+
报告中的手工晋级命令绑定 candidate commit SHA,而不是分支名。
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# XCompiler 版本管理
|
|
2
|
+
|
|
3
|
+
`package.json` 是 XCompiler 核心版本和 Plugin API 版本的唯一真源:
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"version": "0.1.3",
|
|
8
|
+
"xcompiler": { "pluginApiVersion": 1 }
|
|
9
|
+
}
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`src/version.ts` 是自动生成的运行时常量,`package-lock.json` 由同一工具同步。不要手工修改这两个位置。
|
|
13
|
+
|
|
14
|
+
`npm run build` 通过 npm 的 `prebuild` 生命周期强制先执行 `version:check`;直接调用底层 `tsup` 不属于受支持的发布路径。`prepack` 和自举 qualification 也会独立重复校验,避免调用方使用 `--ignore-scripts` 时漏掉版本门禁。
|
|
15
|
+
|
|
16
|
+
## 常用命令
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# 检查 package、lockfile、CLI 运行时常量是否一致
|
|
20
|
+
npm run version:check
|
|
21
|
+
|
|
22
|
+
# 重新按 package.json 生成其他版本元数据
|
|
23
|
+
npm run version:sync
|
|
24
|
+
|
|
25
|
+
# 设置下一个核心版本并同步全部位置
|
|
26
|
+
npm run version:set -- 0.1.4
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
核心版本遵循 SemVer。发布 tag 必须是 `v<package version>`,例如 `v0.1.3`;Release workflow 会在测试和打包前强制校验,版本不一致时停止发布。二进制分发包内包含 `VERSION` 文件,CLI 的 `--version` 也读取同一个生成常量。
|
|
30
|
+
|
|
31
|
+
Plugin API 版本独立于核心版本,只在插件公共接口出现不兼容修改时递增整数主版本。插件自身使用 SemVer,并在 manifest 中强制声明 `apiVersion` 和 `minXCompilerVersion`;详细规则见 [plugin_api.md](plugin_api.md)。
|
|
32
|
+
|
|
33
|
+
审计内容默认使用 `redacted` 模式遮蔽 API key、token、密码等凭据。需要最小化留存时设置 `XC_AUDIT_CONTENT_MODE=metadata`(只保留长度和 SHA-256);只有在受控环境确实需要完整回放时才使用 `full`。
|
package/package.json
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xcompiler/cli",
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "XCompiler — AI Software Factory: V-model driven, multi-LLM orchestrated software development agent.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/TreeNeeBee/XCompiler.git"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"xcompiler": "dist/cli/xcompiler.js",
|
|
13
|
+
"xcompiler_build": "dist/cli/xcompiler_build.js",
|
|
14
|
+
"xcompiler_run": "dist/cli/xcompiler_run.js"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public",
|
|
18
|
+
"registry": "https://registry.npmjs.org"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/runtime/runtime.d.ts",
|
|
23
|
+
"import": "./dist/runtime/runtime.js"
|
|
24
|
+
},
|
|
25
|
+
"./plugins": {
|
|
26
|
+
"types": "./dist/plugins/index.d.ts",
|
|
27
|
+
"import": "./dist/plugins/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./runtime": {
|
|
30
|
+
"types": "./dist/runtime/runtime.d.ts",
|
|
31
|
+
"import": "./dist/runtime/runtime.js"
|
|
32
|
+
},
|
|
33
|
+
"./acp": {
|
|
34
|
+
"types": "./dist/acp/index.d.ts",
|
|
35
|
+
"import": "./dist/acp/index.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist/cli",
|
|
40
|
+
"dist/plugins",
|
|
41
|
+
"dist/runtime",
|
|
42
|
+
"dist/acp",
|
|
43
|
+
"docs/acp.md",
|
|
44
|
+
"docs/plugin_api.md",
|
|
45
|
+
"docs/self_bootstrap.md",
|
|
46
|
+
"docs/versioning.md",
|
|
47
|
+
"README.md",
|
|
48
|
+
"LICENSE",
|
|
49
|
+
"NOTICE"
|
|
50
|
+
],
|
|
51
|
+
"scripts": {
|
|
52
|
+
"version:check": "node scripts/version.mjs check",
|
|
53
|
+
"version:sync": "node scripts/version.mjs sync",
|
|
54
|
+
"version:set": "node scripts/version.mjs set",
|
|
55
|
+
"prepack": "npm run version:check",
|
|
56
|
+
"prebuild": "npm run version:check",
|
|
57
|
+
"build": "tsup",
|
|
58
|
+
"dev": "tsx src/cli/xcompiler.ts",
|
|
59
|
+
"dev:build": "tsx src/cli/xcompiler_build.ts",
|
|
60
|
+
"dev:run": "tsx src/cli/xcompiler_run.ts",
|
|
61
|
+
"typecheck": "tsc --noEmit",
|
|
62
|
+
"test": "vitest run",
|
|
63
|
+
"test:watch": "vitest",
|
|
64
|
+
"smoke:ollama": "node --import tsx scripts/smoke_ollama.ts",
|
|
65
|
+
"lint": "eslint \"src/**/*.ts\"",
|
|
66
|
+
"build:pkg": "tsup --config tsup.pkg.config.ts",
|
|
67
|
+
"package": "bash scripts/package.sh",
|
|
68
|
+
"package:native": "bash scripts/package.sh native",
|
|
69
|
+
"package:all": "bash scripts/package.sh all",
|
|
70
|
+
"package:linux-x64": "bash scripts/package.sh linux-x64",
|
|
71
|
+
"package:linux-arm64": "bash scripts/package.sh linux-arm64",
|
|
72
|
+
"package:macos-arm64": "bash scripts/package.sh macos-arm64",
|
|
73
|
+
"package:macos-x64": "bash scripts/package.sh macos-x64",
|
|
74
|
+
"package:win-x64": "bash scripts/package.sh win-x64"
|
|
75
|
+
},
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"@inquirer/prompts": "^8.5.2",
|
|
78
|
+
"chalk": "^5.3.0",
|
|
79
|
+
"commander": "^15.0.0",
|
|
80
|
+
"dotenv": "^17.4.2",
|
|
81
|
+
"jsonrepair": "^3.15.0",
|
|
82
|
+
"ora": "^9.4.1",
|
|
83
|
+
"simple-git": "^3.27.0",
|
|
84
|
+
"yaml": "^2.9.0",
|
|
85
|
+
"zod": "^4.4.3"
|
|
86
|
+
},
|
|
87
|
+
"devDependencies": {
|
|
88
|
+
"@eslint/js": "^10.0.1",
|
|
89
|
+
"@types/node": "^24.13.2",
|
|
90
|
+
"@yao-pkg/pkg": "^6.21.0",
|
|
91
|
+
"eslint": "^10.6.0",
|
|
92
|
+
"tsup": "^8.3.5",
|
|
93
|
+
"tsx": "^4.23.0",
|
|
94
|
+
"typescript": "^6.0.3",
|
|
95
|
+
"typescript-eslint": "^8.62.1",
|
|
96
|
+
"vitest": "^4.1.10"
|
|
97
|
+
},
|
|
98
|
+
"overrides": {
|
|
99
|
+
"esbuild": "0.28.1",
|
|
100
|
+
"tar": "7.5.19"
|
|
101
|
+
},
|
|
102
|
+
"engines": {
|
|
103
|
+
"node": ">=24"
|
|
104
|
+
},
|
|
105
|
+
"xcompiler": {
|
|
106
|
+
"pluginApiVersion": 1
|
|
107
|
+
}
|
|
108
|
+
}
|