@aigne/afs-cli 1.11.0-beta.1

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,18 @@
1
+
2
+ > @aigne/afs-cli@1.11.0-beta.1 build /home/runner/work/afs/afs/packages/cli
3
+ > tsdown src/index.ts src/cli.ts --format esm --dts
4
+
5
+ ℹ tsdown v0.20.0-beta.3 powered by rolldown v1.0.0-beta.60
6
+ ℹ entry: src/index.ts, src/cli.ts
7
+ ℹ tsconfig: tsconfig.json
8
+ ℹ Build start
9
+ ℹ Granting execute permission to dist/cli.mjs
10
+ ℹ dist/cli.mjs 0.76 kB │ gzip: 0.54 kB
11
+ ℹ dist/index.mjs 0.07 kB │ gzip: 0.08 kB
12
+ ℹ dist/version--p6A8sKX.mjs 0.09 kB │ gzip: 0.10 kB
13
+ ℹ dist/index.d.mts 0.10 kB │ gzip: 0.11 kB
14
+ ℹ dist/cli.d.mts 0.01 kB │ gzip: 0.03 kB
15
+ ℹ 5 files, total: 1.03 kB
16
+ [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugin `rolldown-plugin-dts:generate`. See https://rolldown.rs/options/checks#plugintimings for more details.
17
+
18
+ ✔ Build complete in 7128ms
@@ -0,0 +1,4 @@
1
+
2
+ > @aigne/afs-cli@1.11.0-beta.1 check-types /home/runner/work/afs/afs/packages/cli
3
+ > tsc --noEmit
4
+
package/LICENSE.md ADDED
@@ -0,0 +1,26 @@
1
+ # Proprietary License
2
+
3
+ Copyright (c) 2024-2025 ArcBlock, Inc. All Rights Reserved.
4
+
5
+ This software and associated documentation files (the "Software") are proprietary
6
+ and confidential. Unauthorized copying, modification, distribution, or use of
7
+ this Software, via any medium, is strictly prohibited.
8
+
9
+ The Software is provided for internal use only within ArcBlock, Inc. and its
10
+ authorized affiliates.
11
+
12
+ ## No License Granted
13
+
14
+ No license, express or implied, is granted to any party for any purpose.
15
+ All rights are reserved by ArcBlock, Inc.
16
+
17
+ ## Public Artifact Distribution
18
+
19
+ Portions of this Software may be released publicly under separate open-source
20
+ licenses (such as MIT License) through designated public repositories. Such
21
+ public releases are governed by their respective licenses and do not affect
22
+ the proprietary nature of this repository.
23
+
24
+ ## Contact
25
+
26
+ For licensing inquiries, contact: legal@arcblock.io
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # @aigne/afs-cli
2
+
3
+ AFS 命令行工具
4
+
5
+ ## 命令
6
+
7
+ | 命令 | 功能 |
8
+ |------|------|
9
+ | `afs ls [path]` | 列出目录内容 |
10
+ | `afs cat <path>` | 读取文件内容 |
11
+ | `afs write <path>` | 写入文件 |
12
+ | `afs search <path> <pattern>` | 搜索内容 |
13
+ | `afs exec <path> <action>` | 执行操作 |
14
+ | `afs explain <path>` | 语义解释 |
15
+
16
+ ## 输出模式
17
+
18
+ ```bash
19
+ # 默认: Machine Truth (LLM/脚本友好)
20
+ afs ls /modules/local-fs
21
+
22
+ # JSON 结构化输出
23
+ afs ls /modules/local-fs --json
24
+
25
+ # LLM 优化输出
26
+ afs ls /modules/local-fs --view=llm
27
+
28
+ # 人类友好输出
29
+ afs ls /modules/local-fs --view=human
30
+ ```
31
+
32
+ ## 运行模式
33
+
34
+ - **直接模式** (默认): 直接调用 `@aigne/afs` 库
35
+ - **daemon 模式** (`--daemon`): 通过 afsd 代理,支持状态持久化
36
+
37
+ ## 退出码
38
+
39
+ | 码 | 含义 |
40
+ |----|------|
41
+ | 0 | 成功 |
42
+ | 1 | 一般错误 |
43
+ | 2 | 参数错误 |
44
+ | 3 | 资源未找到 |
45
+ | 4 | 权限拒绝 |
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ export { };
package/dist/cli.mjs ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import { t as VERSION } from "./version--p6A8sKX.mjs";
3
+
4
+ //#region src/cli.ts
5
+ /**
6
+ * AFS CLI - Command Line Interface
7
+ *
8
+ * 命令:
9
+ * - afs ls [path] 列出目录
10
+ * - afs cat <path> 读取文件
11
+ * - afs write <path> 写入文件
12
+ * - afs search <path> <pattern> 搜索内容
13
+ * - afs exec <path> <action> 执行操作
14
+ * - afs explain <path> 语义解释
15
+ *
16
+ * 输出模式:
17
+ * - 默认: Machine Truth (LLM/脚本友好)
18
+ * - --json: 结构化 JSON
19
+ * - --view=llm: LLM 优化输出
20
+ * - --view=human: 人类友好格式
21
+ *
22
+ * 运行模式:
23
+ * - 直接模式 (默认): 直接调用 @aigne/afs
24
+ * - daemon 模式 (--daemon): 通过 afsd 代理
25
+ */
26
+ console.log(`afs-cli v${VERSION}`);
27
+
28
+ //#endregion
29
+ export { };
@@ -0,0 +1,4 @@
1
+ //#region src/version.d.ts
2
+ declare const VERSION = "1.11.0-beta";
3
+ //#endregion
4
+ export { VERSION };
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { t as VERSION } from "./version--p6A8sKX.mjs";
2
+
3
+ export { VERSION };
@@ -0,0 +1,5 @@
1
+ //#region src/version.ts
2
+ const VERSION = "1.11.0-beta";
3
+
4
+ //#endregion
5
+ export { VERSION as t };
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@aigne/afs-cli",
3
+ "version": "1.11.0-beta.1",
4
+ "description": "AFS Command Line Interface",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "bin": {
8
+ "afs": "./dist/cli.js"
9
+ },
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.js",
13
+ "types": "./dist/index.d.ts"
14
+ }
15
+ },
16
+ "dependencies": {
17
+ "@aigne/afs": "1.11.0-beta.1"
18
+ },
19
+ "devDependencies": {
20
+ "tsdown": "^0.20.0-beta.3",
21
+ "typescript": "^5.9.0"
22
+ },
23
+ "scripts": {
24
+ "build": "tsdown src/index.ts src/cli.ts --format esm --dts",
25
+ "dev": "tsdown src/index.ts src/cli.ts --format esm --dts --watch",
26
+ "test": "bun test",
27
+ "check-types": "tsc --noEmit"
28
+ }
29
+ }
@@ -0,0 +1,8 @@
1
+ import { describe, expect, it } from "bun:test";
2
+ import { VERSION } from "./version.js";
3
+
4
+ describe("afs-cli", () => {
5
+ it("should have correct version", () => {
6
+ expect(VERSION).toBe("1.11.0-beta");
7
+ });
8
+ });
package/src/cli.ts ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * AFS CLI - Command Line Interface
5
+ *
6
+ * 命令:
7
+ * - afs ls [path] 列出目录
8
+ * - afs cat <path> 读取文件
9
+ * - afs write <path> 写入文件
10
+ * - afs search <path> <pattern> 搜索内容
11
+ * - afs exec <path> <action> 执行操作
12
+ * - afs explain <path> 语义解释
13
+ *
14
+ * 输出模式:
15
+ * - 默认: Machine Truth (LLM/脚本友好)
16
+ * - --json: 结构化 JSON
17
+ * - --view=llm: LLM 优化输出
18
+ * - --view=human: 人类友好格式
19
+ *
20
+ * 运行模式:
21
+ * - 直接模式 (默认): 直接调用 @aigne/afs
22
+ * - daemon 模式 (--daemon): 通过 afsd 代理
23
+ */
24
+
25
+ import { VERSION } from "./version.js";
26
+
27
+ console.log(`afs-cli v${VERSION}`);
28
+
29
+ // TODO: 实现 CLI
package/src/index.ts ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @aigne/afs-cli
3
+ *
4
+ * AFS Command Line Interface
5
+ */
6
+
7
+ export { VERSION } from "./version.js";
package/src/version.ts ADDED
@@ -0,0 +1 @@
1
+ export const VERSION = "1.11.0-beta";
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "declaration": true,
7
+ "outDir": "./dist",
8
+ "rootDir": "./src",
9
+ "strict": true,
10
+ "esModuleInterop": true,
11
+ "skipLibCheck": true,
12
+ "forceConsistentCasingInFileNames": true
13
+ },
14
+ "include": ["src/**/*"],
15
+ "exclude": ["node_modules", "dist"]
16
+ }