@aigne/afs-cli 1.11.0-beta.1 → 1.11.0-beta.10
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/README.md +262 -15
- package/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/_virtual/rolldown_runtime.mjs +7 -0
- package/dist/cli.cjs +40 -0
- package/dist/cli.d.cts +2 -0
- package/dist/cli.d.mts +2 -1
- package/dist/cli.mjs +36 -24
- package/dist/cli.mjs.map +1 -0
- package/dist/config/afs-loader.cjs +578 -0
- package/dist/config/afs-loader.d.cts +19 -0
- package/dist/config/afs-loader.d.cts.map +1 -0
- package/dist/config/afs-loader.d.mts +19 -0
- package/dist/config/afs-loader.d.mts.map +1 -0
- package/dist/config/afs-loader.mjs +576 -0
- package/dist/config/afs-loader.mjs.map +1 -0
- package/dist/config/env.cjs +46 -0
- package/dist/config/env.mjs +46 -0
- package/dist/config/env.mjs.map +1 -0
- package/dist/config/loader.cjs +219 -0
- package/dist/config/loader.mjs +217 -0
- package/dist/config/loader.mjs.map +1 -0
- package/dist/config/mount-commands.cjs +226 -0
- package/dist/config/mount-commands.d.cts +14 -0
- package/dist/config/mount-commands.d.cts.map +1 -0
- package/dist/config/mount-commands.d.mts +14 -0
- package/dist/config/mount-commands.d.mts.map +1 -0
- package/dist/config/mount-commands.mjs +220 -0
- package/dist/config/mount-commands.mjs.map +1 -0
- package/dist/config/schema.cjs +99 -0
- package/dist/config/schema.mjs +98 -0
- package/dist/config/schema.mjs.map +1 -0
- package/dist/core/commands/delete.cjs +41 -0
- package/dist/core/commands/delete.d.cts +18 -0
- package/dist/core/commands/delete.d.cts.map +1 -0
- package/dist/core/commands/delete.d.mts +18 -0
- package/dist/core/commands/delete.d.mts.map +1 -0
- package/dist/core/commands/delete.mjs +42 -0
- package/dist/core/commands/delete.mjs.map +1 -0
- package/dist/core/commands/exec.cjs +98 -0
- package/dist/core/commands/exec.d.cts +26 -0
- package/dist/core/commands/exec.d.cts.map +1 -0
- package/dist/core/commands/exec.d.mts +26 -0
- package/dist/core/commands/exec.d.mts.map +1 -0
- package/dist/core/commands/exec.mjs +99 -0
- package/dist/core/commands/exec.mjs.map +1 -0
- package/dist/core/commands/explain.cjs +278 -0
- package/dist/core/commands/explain.d.cts +25 -0
- package/dist/core/commands/explain.d.cts.map +1 -0
- package/dist/core/commands/explain.d.mts +25 -0
- package/dist/core/commands/explain.d.mts.map +1 -0
- package/dist/core/commands/explain.mjs +279 -0
- package/dist/core/commands/explain.mjs.map +1 -0
- package/dist/core/commands/explore.cjs +30 -0
- package/dist/core/commands/explore.d.mts +2 -0
- package/dist/core/commands/explore.mjs +31 -0
- package/dist/core/commands/explore.mjs.map +1 -0
- package/dist/core/commands/index.cjs +36 -0
- package/dist/core/commands/index.d.cts +21 -0
- package/dist/core/commands/index.d.cts.map +1 -0
- package/dist/core/commands/index.d.mts +24 -0
- package/dist/core/commands/index.d.mts.map +1 -0
- package/dist/core/commands/index.mjs +37 -0
- package/dist/core/commands/index.mjs.map +1 -0
- package/dist/core/commands/ls.cjs +57 -0
- package/dist/core/commands/ls.d.cts +21 -0
- package/dist/core/commands/ls.d.cts.map +1 -0
- package/dist/core/commands/ls.d.mts +21 -0
- package/dist/core/commands/ls.d.mts.map +1 -0
- package/dist/core/commands/ls.mjs +58 -0
- package/dist/core/commands/ls.mjs.map +1 -0
- package/dist/core/commands/mount.cjs +222 -0
- package/dist/core/commands/mount.d.cts +35 -0
- package/dist/core/commands/mount.d.cts.map +1 -0
- package/dist/core/commands/mount.d.mts +35 -0
- package/dist/core/commands/mount.d.mts.map +1 -0
- package/dist/core/commands/mount.mjs +223 -0
- package/dist/core/commands/mount.mjs.map +1 -0
- package/dist/core/commands/read.cjs +48 -0
- package/dist/core/commands/read.d.cts +17 -0
- package/dist/core/commands/read.d.cts.map +1 -0
- package/dist/core/commands/read.d.mts +17 -0
- package/dist/core/commands/read.d.mts.map +1 -0
- package/dist/core/commands/read.mjs +49 -0
- package/dist/core/commands/read.mjs.map +1 -0
- package/dist/core/commands/search.cjs +40 -0
- package/dist/core/commands/search.d.mts +2 -0
- package/dist/core/commands/search.mjs +41 -0
- package/dist/core/commands/search.mjs.map +1 -0
- package/dist/core/commands/serve.cjs +267 -0
- package/dist/core/commands/serve.d.mts +2 -0
- package/dist/core/commands/serve.mjs +267 -0
- package/dist/core/commands/serve.mjs.map +1 -0
- package/dist/core/commands/stat.cjs +53 -0
- package/dist/core/commands/stat.d.cts +17 -0
- package/dist/core/commands/stat.d.cts.map +1 -0
- package/dist/core/commands/stat.d.mts +17 -0
- package/dist/core/commands/stat.d.mts.map +1 -0
- package/dist/core/commands/stat.mjs +54 -0
- package/dist/core/commands/stat.mjs.map +1 -0
- package/dist/core/commands/types.cjs +18 -0
- package/dist/core/commands/types.d.cts +54 -0
- package/dist/core/commands/types.d.cts.map +1 -0
- package/dist/core/commands/types.d.mts +54 -0
- package/dist/core/commands/types.d.mts.map +1 -0
- package/dist/core/commands/types.mjs +19 -0
- package/dist/core/commands/types.mjs.map +1 -0
- package/dist/core/commands/write.cjs +70 -0
- package/dist/core/commands/write.d.cts +20 -0
- package/dist/core/commands/write.d.cts.map +1 -0
- package/dist/core/commands/write.d.mts +20 -0
- package/dist/core/commands/write.d.mts.map +1 -0
- package/dist/core/commands/write.mjs +71 -0
- package/dist/core/commands/write.mjs.map +1 -0
- package/dist/core/executor/index.cjs +196 -0
- package/dist/core/executor/index.d.cts +77 -0
- package/dist/core/executor/index.d.cts.map +1 -0
- package/dist/core/executor/index.d.mts +77 -0
- package/dist/core/executor/index.d.mts.map +1 -0
- package/dist/core/executor/index.mjs +195 -0
- package/dist/core/executor/index.mjs.map +1 -0
- package/dist/core/formatters/delete.cjs +37 -0
- package/dist/core/formatters/delete.d.cts +18 -0
- package/dist/core/formatters/delete.d.cts.map +1 -0
- package/dist/core/formatters/delete.d.mts +18 -0
- package/dist/core/formatters/delete.d.mts.map +1 -0
- package/dist/core/formatters/delete.mjs +37 -0
- package/dist/core/formatters/delete.mjs.map +1 -0
- package/dist/core/formatters/exec.cjs +60 -0
- package/dist/core/formatters/exec.d.cts +18 -0
- package/dist/core/formatters/exec.d.cts.map +1 -0
- package/dist/core/formatters/exec.d.mts +18 -0
- package/dist/core/formatters/exec.d.mts.map +1 -0
- package/dist/core/formatters/exec.mjs +60 -0
- package/dist/core/formatters/exec.mjs.map +1 -0
- package/dist/core/formatters/explain.cjs +99 -0
- package/dist/core/formatters/explain.d.cts +11 -0
- package/dist/core/formatters/explain.d.cts.map +1 -0
- package/dist/core/formatters/explain.d.mts +11 -0
- package/dist/core/formatters/explain.d.mts.map +1 -0
- package/dist/core/formatters/explain.mjs +98 -0
- package/dist/core/formatters/explain.mjs.map +1 -0
- package/dist/core/formatters/index.d.mts +9 -0
- package/dist/core/formatters/ls.cjs +179 -0
- package/dist/core/formatters/ls.d.cts +20 -0
- package/dist/core/formatters/ls.d.cts.map +1 -0
- package/dist/core/formatters/ls.d.mts +20 -0
- package/dist/core/formatters/ls.d.mts.map +1 -0
- package/dist/core/formatters/ls.mjs +179 -0
- package/dist/core/formatters/ls.mjs.map +1 -0
- package/dist/core/formatters/mount.cjs +55 -0
- package/dist/core/formatters/mount.d.cts +15 -0
- package/dist/core/formatters/mount.d.cts.map +1 -0
- package/dist/core/formatters/mount.d.mts +15 -0
- package/dist/core/formatters/mount.d.mts.map +1 -0
- package/dist/core/formatters/mount.mjs +55 -0
- package/dist/core/formatters/mount.mjs.map +1 -0
- package/dist/core/formatters/read.cjs +100 -0
- package/dist/core/formatters/read.d.cts +22 -0
- package/dist/core/formatters/read.d.cts.map +1 -0
- package/dist/core/formatters/read.d.mts +22 -0
- package/dist/core/formatters/read.d.mts.map +1 -0
- package/dist/core/formatters/read.mjs +100 -0
- package/dist/core/formatters/read.mjs.map +1 -0
- package/dist/core/formatters/search.cjs +44 -0
- package/dist/core/formatters/search.d.mts +1 -0
- package/dist/core/formatters/search.mjs +44 -0
- package/dist/core/formatters/search.mjs.map +1 -0
- package/dist/core/formatters/stat.cjs +155 -0
- package/dist/core/formatters/stat.d.cts +15 -0
- package/dist/core/formatters/stat.d.cts.map +1 -0
- package/dist/core/formatters/stat.d.mts +15 -0
- package/dist/core/formatters/stat.d.mts.map +1 -0
- package/dist/core/formatters/stat.mjs +155 -0
- package/dist/core/formatters/stat.mjs.map +1 -0
- package/dist/core/formatters/write.cjs +51 -0
- package/dist/core/formatters/write.d.cts +22 -0
- package/dist/core/formatters/write.d.cts.map +1 -0
- package/dist/core/formatters/write.d.mts +22 -0
- package/dist/core/formatters/write.d.mts.map +1 -0
- package/dist/core/formatters/write.mjs +51 -0
- package/dist/core/formatters/write.mjs.map +1 -0
- package/dist/core/helpers/exec-args.cjs +142 -0
- package/dist/core/helpers/exec-args.d.cts +46 -0
- package/dist/core/helpers/exec-args.d.cts.map +1 -0
- package/dist/core/helpers/exec-args.d.mts +46 -0
- package/dist/core/helpers/exec-args.d.mts.map +1 -0
- package/dist/core/helpers/exec-args.mjs +139 -0
- package/dist/core/helpers/exec-args.mjs.map +1 -0
- package/dist/core/helpers/stdin.cjs +41 -0
- package/dist/core/helpers/stdin.d.cts +15 -0
- package/dist/core/helpers/stdin.d.cts.map +1 -0
- package/dist/core/helpers/stdin.d.mts +15 -0
- package/dist/core/helpers/stdin.d.mts.map +1 -0
- package/dist/core/helpers/stdin.mjs +41 -0
- package/dist/core/helpers/stdin.mjs.map +1 -0
- package/dist/core/index.cjs +49 -0
- package/dist/core/index.d.cts +24 -0
- package/dist/core/index.d.mts +25 -0
- package/dist/core/index.mjs +24 -0
- package/dist/core/path-utils.cjs +1 -0
- package/dist/core/path-utils.mjs +3 -0
- package/dist/core/types.d.cts +24 -0
- package/dist/core/types.d.cts.map +1 -0
- package/dist/core/types.d.mts +24 -0
- package/dist/core/types.d.mts.map +1 -0
- package/dist/credential/auth-server.cjs +247 -0
- package/dist/credential/auth-server.mjs +247 -0
- package/dist/credential/auth-server.mjs.map +1 -0
- package/dist/credential/cli-auth-context.cjs +86 -0
- package/dist/credential/cli-auth-context.d.mts +1 -0
- package/dist/credential/cli-auth-context.mjs +86 -0
- package/dist/credential/cli-auth-context.mjs.map +1 -0
- package/dist/credential/index.cjs +5 -0
- package/dist/credential/index.d.mts +4 -0
- package/dist/credential/index.mjs +7 -0
- package/dist/credential/mcp-auth-context.cjs +186 -0
- package/dist/credential/mcp-auth-context.d.mts +1 -0
- package/dist/credential/mcp-auth-context.mjs +186 -0
- package/dist/credential/mcp-auth-context.mjs.map +1 -0
- package/dist/credential/resolver.cjs +127 -0
- package/dist/credential/resolver.d.mts +1 -0
- package/dist/credential/resolver.mjs +127 -0
- package/dist/credential/resolver.mjs.map +1 -0
- package/dist/credential/store.cjs +106 -0
- package/dist/credential/store.d.cts +30 -0
- package/dist/credential/store.d.cts.map +1 -0
- package/dist/credential/store.d.mts +30 -0
- package/dist/credential/store.d.mts.map +1 -0
- package/dist/credential/store.mjs +106 -0
- package/dist/credential/store.mjs.map +1 -0
- package/dist/errors.cjs +18 -0
- package/dist/errors.mjs +18 -0
- package/dist/errors.mjs.map +1 -0
- package/dist/explorer/actions.cjs +311 -0
- package/dist/explorer/actions.mjs +305 -0
- package/dist/explorer/actions.mjs.map +1 -0
- package/dist/explorer/components/dialog.cjs +508 -0
- package/dist/explorer/components/dialog.mjs +509 -0
- package/dist/explorer/components/dialog.mjs.map +1 -0
- package/dist/explorer/components/file-list.cjs +107 -0
- package/dist/explorer/components/file-list.mjs +107 -0
- package/dist/explorer/components/file-list.mjs.map +1 -0
- package/dist/explorer/components/function-bar.cjs +55 -0
- package/dist/explorer/components/function-bar.mjs +55 -0
- package/dist/explorer/components/function-bar.mjs.map +1 -0
- package/dist/explorer/components/index.cjs +5 -0
- package/dist/explorer/components/index.mjs +7 -0
- package/dist/explorer/components/metadata-panel.cjs +219 -0
- package/dist/explorer/components/metadata-panel.mjs +219 -0
- package/dist/explorer/components/metadata-panel.mjs.map +1 -0
- package/dist/explorer/components/status-bar.cjs +53 -0
- package/dist/explorer/components/status-bar.mjs +54 -0
- package/dist/explorer/components/status-bar.mjs.map +1 -0
- package/dist/explorer/keybindings.cjs +214 -0
- package/dist/explorer/keybindings.mjs +213 -0
- package/dist/explorer/keybindings.mjs.map +1 -0
- package/dist/explorer/screen.cjs +251 -0
- package/dist/explorer/screen.d.cts +23 -0
- package/dist/explorer/screen.d.cts.map +1 -0
- package/dist/explorer/screen.d.mts +23 -0
- package/dist/explorer/screen.d.mts.map +1 -0
- package/dist/explorer/screen.mjs +250 -0
- package/dist/explorer/screen.mjs.map +1 -0
- package/dist/explorer/state.cjs +53 -0
- package/dist/explorer/state.mjs +53 -0
- package/dist/explorer/state.mjs.map +1 -0
- package/dist/explorer/theme.cjs +160 -0
- package/dist/explorer/theme.mjs +157 -0
- package/dist/explorer/theme.mjs.map +1 -0
- package/dist/index.cjs +12 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.mts +7 -4
- package/dist/index.mjs +7 -2
- package/dist/mcp/http-transport.cjs +87 -0
- package/dist/mcp/http-transport.mjs +87 -0
- package/dist/mcp/http-transport.mjs.map +1 -0
- package/dist/mcp/prompts.cjs +48 -0
- package/dist/mcp/prompts.mjs +48 -0
- package/dist/mcp/prompts.mjs.map +1 -0
- package/dist/mcp/resources.cjs +25 -0
- package/dist/mcp/resources.mjs +25 -0
- package/dist/mcp/resources.mjs.map +1 -0
- package/dist/mcp/server.cjs +74 -0
- package/dist/mcp/server.mjs +73 -0
- package/dist/mcp/server.mjs.map +1 -0
- package/dist/mcp/tools.cjs +152 -0
- package/dist/mcp/tools.mjs +152 -0
- package/dist/mcp/tools.mjs.map +1 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/dist/index.d.cts +10 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/dist/index.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/dist/index.d.mts +10 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/dist/index.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/dist/types.d.cts +46 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/dist/types.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/dist/types.d.mts +46 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/dist/types.d.mts.map +1 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/dist/urlpattern.cjs +902 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/dist/urlpattern.mjs +902 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/dist/urlpattern.mjs.map +1 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/index.cjs +6 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/index.mjs +8 -0
- package/dist/node_modules/.pnpm/urlpattern-polyfill@10.1.0/node_modules/urlpattern-polyfill/index.mjs.map +1 -0
- package/dist/path-utils.cjs +105 -0
- package/dist/path-utils.d.cts +50 -0
- package/dist/path-utils.d.cts.map +1 -0
- package/dist/path-utils.d.mts +50 -0
- package/dist/path-utils.d.mts.map +1 -0
- package/dist/path-utils.mjs +104 -0
- package/dist/path-utils.mjs.map +1 -0
- package/dist/repl.cjs +491 -0
- package/dist/repl.d.cts +15 -0
- package/dist/repl.d.cts.map +1 -0
- package/dist/repl.d.mts +16 -0
- package/dist/repl.d.mts.map +1 -0
- package/dist/repl.mjs +491 -0
- package/dist/repl.mjs.map +1 -0
- package/dist/serve.cjs +146 -0
- package/dist/serve.d.cts +41 -0
- package/dist/serve.d.cts.map +1 -0
- package/dist/serve.d.mts +41 -0
- package/dist/serve.d.mts.map +1 -0
- package/dist/serve.mjs +146 -0
- package/dist/serve.mjs.map +1 -0
- package/dist/ui/header.cjs +12 -0
- package/dist/ui/header.mjs +13 -0
- package/dist/ui/header.mjs.map +1 -0
- package/dist/ui/index.cjs +8 -0
- package/dist/ui/index.mjs +9 -0
- package/dist/ui/index.mjs.map +1 -0
- package/dist/ui/terminal.cjs +88 -0
- package/dist/ui/terminal.mjs +88 -0
- package/dist/ui/terminal.mjs.map +1 -0
- package/dist/version.cjs +9 -0
- package/dist/version.d.cts +5 -0
- package/dist/version.d.cts.map +1 -0
- package/dist/version.d.mts +5 -0
- package/dist/version.d.mts.map +1 -0
- package/dist/version.mjs +9 -0
- package/dist/version.mjs.map +1 -0
- package/package.json +77 -11
- package/.turbo/turbo-build.log +0 -18
- package/.turbo/turbo-check-types.log +0 -4
- package/dist/version--p6A8sKX.mjs +0 -5
- package/src/cli.test.ts +0 -8
- package/src/cli.ts +0 -29
- package/src/index.ts +0 -7
- package/src/version.ts +0 -1
- package/tsconfig.json +0 -16
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
const require_mount_commands = require('../../config/mount-commands.cjs');
|
|
2
|
+
const require_explain = require('../formatters/explain.cjs');
|
|
3
|
+
const require_path_utils = require('../../path-utils.cjs');
|
|
4
|
+
require('../path-utils.cjs');
|
|
5
|
+
const require_types = require('./types.cjs');
|
|
6
|
+
|
|
7
|
+
//#region src/core/commands/explain.ts
|
|
8
|
+
/**
|
|
9
|
+
* Create explain command factory
|
|
10
|
+
*/
|
|
11
|
+
function createExplainCommand(options) {
|
|
12
|
+
return {
|
|
13
|
+
command: "explain [topic]",
|
|
14
|
+
describe: "Explain AFS concepts or paths",
|
|
15
|
+
builder: { topic: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "Topic (mount, path, uri) or AFS path (e.g., /src)"
|
|
18
|
+
} },
|
|
19
|
+
handler: async (argv) => {
|
|
20
|
+
const target = argv.topic;
|
|
21
|
+
if (!target) {
|
|
22
|
+
options.onResult({
|
|
23
|
+
command: "explain",
|
|
24
|
+
result: explainOverview(),
|
|
25
|
+
format: require_explain.formatExplainOutput
|
|
26
|
+
});
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (target.startsWith("/") || target.startsWith("@") || target.startsWith("$")) {
|
|
30
|
+
const result = await getPathExplanation(await require_types.resolveAFS(options), target, require_path_utils.cliPathToCanonical(target));
|
|
31
|
+
options.onResult({
|
|
32
|
+
command: "explain",
|
|
33
|
+
result,
|
|
34
|
+
format: require_explain.formatPathExplainOutput
|
|
35
|
+
});
|
|
36
|
+
} else {
|
|
37
|
+
let afs;
|
|
38
|
+
try {
|
|
39
|
+
afs = await require_types.resolveAFS(options);
|
|
40
|
+
} catch {}
|
|
41
|
+
if (afs) try {
|
|
42
|
+
const canonicalPath = require_path_utils.cliPathToCanonical(`/${target}`);
|
|
43
|
+
const explainResult = await afs.explain(canonicalPath);
|
|
44
|
+
if (explainResult.format === "markdown" && explainResult.content) {
|
|
45
|
+
options.onResult({
|
|
46
|
+
command: "explain",
|
|
47
|
+
result: {
|
|
48
|
+
path: `/${target}`,
|
|
49
|
+
type: "explained",
|
|
50
|
+
markdown: explainResult.content
|
|
51
|
+
},
|
|
52
|
+
format: require_explain.formatPathExplainOutput
|
|
53
|
+
});
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
} catch {}
|
|
57
|
+
const cwd = options.cwd ?? process.cwd();
|
|
58
|
+
const result = await getConceptExplanation(target.toLowerCase(), cwd, afs);
|
|
59
|
+
options.onResult({
|
|
60
|
+
command: "explain",
|
|
61
|
+
result,
|
|
62
|
+
format: require_explain.formatExplainOutput
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Get explanation for a path
|
|
70
|
+
*/
|
|
71
|
+
async function getPathExplanation(afs, path, canonicalPath) {
|
|
72
|
+
try {
|
|
73
|
+
try {
|
|
74
|
+
const explainResult = await afs.explain(canonicalPath);
|
|
75
|
+
if (explainResult.format === "markdown" && explainResult.content) return {
|
|
76
|
+
path,
|
|
77
|
+
type: "explained",
|
|
78
|
+
markdown: explainResult.content
|
|
79
|
+
};
|
|
80
|
+
} catch {}
|
|
81
|
+
let entry;
|
|
82
|
+
try {
|
|
83
|
+
entry = (await afs.stat(canonicalPath)).data;
|
|
84
|
+
} catch {}
|
|
85
|
+
if (!entry) try {
|
|
86
|
+
entry = (await afs.read(canonicalPath)).data;
|
|
87
|
+
} catch {}
|
|
88
|
+
if (!entry) return {
|
|
89
|
+
path,
|
|
90
|
+
type: "unknown"
|
|
91
|
+
};
|
|
92
|
+
const metadata = entry.meta || {};
|
|
93
|
+
const entryType = metadata.kind === "afs:executable" ? "exec" : typeof metadata.childrenCount === "number" ? "directory" : "file";
|
|
94
|
+
const result = {
|
|
95
|
+
path: entry.path,
|
|
96
|
+
type: entryType,
|
|
97
|
+
description: metadata.description,
|
|
98
|
+
meta: {}
|
|
99
|
+
};
|
|
100
|
+
if (metadata.provider) result.meta.provider = String(metadata.provider);
|
|
101
|
+
if (metadata.permissions) {
|
|
102
|
+
const perms = metadata.permissions;
|
|
103
|
+
result.meta.permissions = Array.isArray(perms) ? perms.join(", ") : String(perms);
|
|
104
|
+
}
|
|
105
|
+
if (entryType === "exec") {
|
|
106
|
+
if (metadata.inputs) result.inputs = Array.isArray(metadata.inputs) ? metadata.inputs : [String(metadata.inputs)];
|
|
107
|
+
if (metadata.outputs) result.outputs = Array.isArray(metadata.outputs) ? metadata.outputs : [String(metadata.outputs)];
|
|
108
|
+
if (metadata.errors) result.errors = Array.isArray(metadata.errors) ? metadata.errors : [String(metadata.errors)];
|
|
109
|
+
if (metadata.sideEffects) result.sideEffects = Array.isArray(metadata.sideEffects) ? metadata.sideEffects : [String(metadata.sideEffects)];
|
|
110
|
+
}
|
|
111
|
+
if (Object.keys(result.meta).length === 0) delete result.meta;
|
|
112
|
+
return result;
|
|
113
|
+
} catch (err) {
|
|
114
|
+
return {
|
|
115
|
+
path,
|
|
116
|
+
type: "error",
|
|
117
|
+
description: err instanceof Error ? err.message : String(err)
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Get explanation for a concept
|
|
123
|
+
*/
|
|
124
|
+
async function getConceptExplanation(topic, cwd, afs) {
|
|
125
|
+
switch (topic) {
|
|
126
|
+
case "mount":
|
|
127
|
+
case "mounts": return explainMounts(cwd, afs);
|
|
128
|
+
case "path":
|
|
129
|
+
case "paths": return explainPaths();
|
|
130
|
+
case "uri":
|
|
131
|
+
case "provider":
|
|
132
|
+
case "providers": return explainUri();
|
|
133
|
+
default: return {
|
|
134
|
+
topic: "Unknown Topic",
|
|
135
|
+
explanation: `Unknown topic: ${topic}\n\nAvailable topics: overview, mount, path, uri`
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function explainOverview() {
|
|
140
|
+
return {
|
|
141
|
+
topic: "AFS Overview",
|
|
142
|
+
explanation: `AFS (Abstract File System) is a virtual filesystem that unifies different data sources into a single namespace.
|
|
143
|
+
|
|
144
|
+
Core Concepts:
|
|
145
|
+
- mount: Mount a data source to a virtual path
|
|
146
|
+
- path: Virtual path, e.g., /src, /data
|
|
147
|
+
- uri: Data source address, e.g., fs://, git://, sqlite://
|
|
148
|
+
|
|
149
|
+
Data Flow:
|
|
150
|
+
User Path -> AFS -> /{mount} -> Provider -> Actual Data`,
|
|
151
|
+
examples: [
|
|
152
|
+
"afs mount add /src fs:///path/to/source",
|
|
153
|
+
"afs ls /src",
|
|
154
|
+
"afs read /src/file.txt"
|
|
155
|
+
]
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
async function explainMounts(cwd, afs) {
|
|
159
|
+
const result = await require_mount_commands.configMountListCommand(cwd);
|
|
160
|
+
if (result.mounts.length === 0) {
|
|
161
|
+
if (afs) try {
|
|
162
|
+
const listResult = await afs.list("$afs:/");
|
|
163
|
+
if (listResult.data?.length) return {
|
|
164
|
+
topic: "Mounts",
|
|
165
|
+
explanation: `Runtime mounts (mounted via API):\n\n${listResult.data.map((entry) => ` ${entry.path} (runtime mount)`).join("\n")}`,
|
|
166
|
+
examples: listResult.data.slice(0, 3).map((entry) => `afs ls ${entry.path}`)
|
|
167
|
+
};
|
|
168
|
+
} catch {}
|
|
169
|
+
return {
|
|
170
|
+
topic: "Mounts",
|
|
171
|
+
explanation: `No mounts configured.
|
|
172
|
+
|
|
173
|
+
Use mount add to add a mount:
|
|
174
|
+
afs mount add <path> <uri>
|
|
175
|
+
|
|
176
|
+
path: Virtual path for accessing data in AFS
|
|
177
|
+
uri: Data source URI specifying the data origin`,
|
|
178
|
+
examples: ["afs mount add /src fs:///Users/me/project", "afs mount add /data sqlite:///data.db"]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
return {
|
|
182
|
+
topic: "Mounts",
|
|
183
|
+
explanation: `Current mount configuration:
|
|
184
|
+
|
|
185
|
+
${result.mounts.map((m) => ` ${m.path}${m.description ? ` - ${m.description}` : ""}`).join("\n")}
|
|
186
|
+
|
|
187
|
+
After mounting, data is accessed via the mount path:
|
|
188
|
+
path="/src" -> /src`,
|
|
189
|
+
examples: result.mounts.map((m) => `afs ls ${m.path}`)
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function explainPaths() {
|
|
193
|
+
return {
|
|
194
|
+
topic: "Paths",
|
|
195
|
+
explanation: `AFS Path Structure:
|
|
196
|
+
|
|
197
|
+
/ Root directory
|
|
198
|
+
/{mount} Mounted data source
|
|
199
|
+
/{mount}/{path} Files/nodes within a mount
|
|
200
|
+
|
|
201
|
+
Path Mapping:
|
|
202
|
+
config: path="/src" -> access: /src
|
|
203
|
+
config: path="/data" -> access: /data
|
|
204
|
+
|
|
205
|
+
Mounts are accessed directly at their configured path.`
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
function explainUri() {
|
|
209
|
+
return {
|
|
210
|
+
topic: "URI",
|
|
211
|
+
explanation: `AFS URI Schemes and Objects:
|
|
212
|
+
|
|
213
|
+
fs:// Local Filesystem Provider
|
|
214
|
+
Format: fs:///absolute/path or fs://./relative/path
|
|
215
|
+
Operations: list, read, write, delete
|
|
216
|
+
|
|
217
|
+
git:// Git Repository Provider
|
|
218
|
+
Format: git:///local/repo or git://github.com/user/repo?branch=main
|
|
219
|
+
Operations: list, read, exec (diff, create-branch, commit, merge)
|
|
220
|
+
|
|
221
|
+
sqlite:// SQLite Database Provider
|
|
222
|
+
Format: sqlite:///path/to/db.sqlite
|
|
223
|
+
Operations: list, read, exec (SQL queries)
|
|
224
|
+
|
|
225
|
+
json:// JSON Data Provider
|
|
226
|
+
Format: json:///path/to/data.json
|
|
227
|
+
Operations: list, read, write
|
|
228
|
+
|
|
229
|
+
toml:// TOML Data Provider
|
|
230
|
+
Format: toml:///path/to/config.toml
|
|
231
|
+
Operations: list, read, write
|
|
232
|
+
|
|
233
|
+
sandbox:// Sandboxed Script Execution Provider
|
|
234
|
+
Format: sandbox:///path/to/scripts
|
|
235
|
+
Operations: list, read, exec
|
|
236
|
+
|
|
237
|
+
github:// GitHub Issues/PRs Provider
|
|
238
|
+
Format: github://owner/repo
|
|
239
|
+
Operations: list, read, exec (create-issue, close-issue, etc.)
|
|
240
|
+
|
|
241
|
+
http:// HTTP Proxy Provider
|
|
242
|
+
Format: http://host:port/path
|
|
243
|
+
Operations: list, read
|
|
244
|
+
|
|
245
|
+
mcp:// MCP Server Provider
|
|
246
|
+
Format: mcp:///path/to/server
|
|
247
|
+
Operations: list, read, exec
|
|
248
|
+
|
|
249
|
+
s3:// AWS S3 Storage Provider
|
|
250
|
+
Format: s3://bucket-name
|
|
251
|
+
Operations: list, read, write, delete
|
|
252
|
+
|
|
253
|
+
gcs:// Google Cloud Storage Provider
|
|
254
|
+
Format: gcs://bucket-name
|
|
255
|
+
Operations: list, read, write, delete
|
|
256
|
+
|
|
257
|
+
ec2:// AWS EC2 Instances Provider
|
|
258
|
+
Format: ec2://region
|
|
259
|
+
Operations: list, read, exec (run-instances)
|
|
260
|
+
|
|
261
|
+
gce:// Google Compute Engine Provider
|
|
262
|
+
Format: gce://project/zone
|
|
263
|
+
Operations: list, read, exec
|
|
264
|
+
|
|
265
|
+
dns:// Cloud DNS Provider
|
|
266
|
+
Format: dns://provider (route53, clouddns)
|
|
267
|
+
Operations: list, read`,
|
|
268
|
+
examples: [
|
|
269
|
+
"afs mount add /src fs:///Users/me/project",
|
|
270
|
+
"afs mount add /repo git://github.com/user/repo",
|
|
271
|
+
"afs mount add /db sqlite:///data.sqlite",
|
|
272
|
+
"afs mount add /s3 s3://my-bucket"
|
|
273
|
+
]
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
//#endregion
|
|
278
|
+
exports.createExplainCommand = createExplainCommand;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CommandFactoryOptions } from "./types.cjs";
|
|
2
|
+
import { CommandModule } from "yargs";
|
|
3
|
+
|
|
4
|
+
//#region src/core/commands/explain.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Result for concept explanations (mount, paths, uri, overview)
|
|
7
|
+
*/
|
|
8
|
+
interface ExplainResult {
|
|
9
|
+
topic: string;
|
|
10
|
+
explanation: string;
|
|
11
|
+
examples?: string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Explain command arguments
|
|
15
|
+
*/
|
|
16
|
+
interface ExplainArgs {
|
|
17
|
+
topic?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Create explain command factory
|
|
21
|
+
*/
|
|
22
|
+
declare function createExplainCommand(options: CommandFactoryOptions): CommandModule<unknown, ExplainArgs>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ExplainArgs, ExplainResult, createExplainCommand };
|
|
25
|
+
//# sourceMappingURL=explain.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explain.d.cts","names":[],"sources":["../../../src/core/commands/explain.ts"],"mappings":";;;;;;;UAiBiB,aAAA;EACf,KAAA;EACA,WAAA;EACA,QAAA;AAAA;;;;UAsBe,WAAA;EACf,KAAA;AAAA;;;;iBAMc,oBAAA,CACd,OAAA,EAAS,qBAAA,GACR,aAAA,UAAuB,WAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CommandFactoryOptions } from "./types.mjs";
|
|
2
|
+
import { CommandModule } from "yargs";
|
|
3
|
+
|
|
4
|
+
//#region src/core/commands/explain.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Result for concept explanations (mount, paths, uri, overview)
|
|
7
|
+
*/
|
|
8
|
+
interface ExplainResult {
|
|
9
|
+
topic: string;
|
|
10
|
+
explanation: string;
|
|
11
|
+
examples?: string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Explain command arguments
|
|
15
|
+
*/
|
|
16
|
+
interface ExplainArgs {
|
|
17
|
+
topic?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Create explain command factory
|
|
21
|
+
*/
|
|
22
|
+
declare function createExplainCommand(options: CommandFactoryOptions): CommandModule<unknown, ExplainArgs>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ExplainArgs, ExplainResult, createExplainCommand };
|
|
25
|
+
//# sourceMappingURL=explain.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explain.d.mts","names":[],"sources":["../../../src/core/commands/explain.ts"],"mappings":";;;;;;;UAiBiB,aAAA;EACf,KAAA;EACA,WAAA;EACA,QAAA;AAAA;;;;UAsBe,WAAA;EACf,KAAA;AAAA;;;;iBAMc,oBAAA,CACd,OAAA,EAAS,qBAAA,GACR,aAAA,UAAuB,WAAA"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { configMountListCommand } from "../../config/mount-commands.mjs";
|
|
2
|
+
import { formatExplainOutput, formatPathExplainOutput } from "../formatters/explain.mjs";
|
|
3
|
+
import { cliPathToCanonical } from "../../path-utils.mjs";
|
|
4
|
+
import "../path-utils.mjs";
|
|
5
|
+
import { resolveAFS } from "./types.mjs";
|
|
6
|
+
|
|
7
|
+
//#region src/core/commands/explain.ts
|
|
8
|
+
/**
|
|
9
|
+
* Create explain command factory
|
|
10
|
+
*/
|
|
11
|
+
function createExplainCommand(options) {
|
|
12
|
+
return {
|
|
13
|
+
command: "explain [topic]",
|
|
14
|
+
describe: "Explain AFS concepts or paths",
|
|
15
|
+
builder: { topic: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "Topic (mount, path, uri) or AFS path (e.g., /src)"
|
|
18
|
+
} },
|
|
19
|
+
handler: async (argv) => {
|
|
20
|
+
const target = argv.topic;
|
|
21
|
+
if (!target) {
|
|
22
|
+
options.onResult({
|
|
23
|
+
command: "explain",
|
|
24
|
+
result: explainOverview(),
|
|
25
|
+
format: formatExplainOutput
|
|
26
|
+
});
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (target.startsWith("/") || target.startsWith("@") || target.startsWith("$")) {
|
|
30
|
+
const result = await getPathExplanation(await resolveAFS(options), target, cliPathToCanonical(target));
|
|
31
|
+
options.onResult({
|
|
32
|
+
command: "explain",
|
|
33
|
+
result,
|
|
34
|
+
format: formatPathExplainOutput
|
|
35
|
+
});
|
|
36
|
+
} else {
|
|
37
|
+
let afs;
|
|
38
|
+
try {
|
|
39
|
+
afs = await resolveAFS(options);
|
|
40
|
+
} catch {}
|
|
41
|
+
if (afs) try {
|
|
42
|
+
const canonicalPath = cliPathToCanonical(`/${target}`);
|
|
43
|
+
const explainResult = await afs.explain(canonicalPath);
|
|
44
|
+
if (explainResult.format === "markdown" && explainResult.content) {
|
|
45
|
+
options.onResult({
|
|
46
|
+
command: "explain",
|
|
47
|
+
result: {
|
|
48
|
+
path: `/${target}`,
|
|
49
|
+
type: "explained",
|
|
50
|
+
markdown: explainResult.content
|
|
51
|
+
},
|
|
52
|
+
format: formatPathExplainOutput
|
|
53
|
+
});
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
} catch {}
|
|
57
|
+
const cwd = options.cwd ?? process.cwd();
|
|
58
|
+
const result = await getConceptExplanation(target.toLowerCase(), cwd, afs);
|
|
59
|
+
options.onResult({
|
|
60
|
+
command: "explain",
|
|
61
|
+
result,
|
|
62
|
+
format: formatExplainOutput
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Get explanation for a path
|
|
70
|
+
*/
|
|
71
|
+
async function getPathExplanation(afs, path, canonicalPath) {
|
|
72
|
+
try {
|
|
73
|
+
try {
|
|
74
|
+
const explainResult = await afs.explain(canonicalPath);
|
|
75
|
+
if (explainResult.format === "markdown" && explainResult.content) return {
|
|
76
|
+
path,
|
|
77
|
+
type: "explained",
|
|
78
|
+
markdown: explainResult.content
|
|
79
|
+
};
|
|
80
|
+
} catch {}
|
|
81
|
+
let entry;
|
|
82
|
+
try {
|
|
83
|
+
entry = (await afs.stat(canonicalPath)).data;
|
|
84
|
+
} catch {}
|
|
85
|
+
if (!entry) try {
|
|
86
|
+
entry = (await afs.read(canonicalPath)).data;
|
|
87
|
+
} catch {}
|
|
88
|
+
if (!entry) return {
|
|
89
|
+
path,
|
|
90
|
+
type: "unknown"
|
|
91
|
+
};
|
|
92
|
+
const metadata = entry.meta || {};
|
|
93
|
+
const entryType = metadata.kind === "afs:executable" ? "exec" : typeof metadata.childrenCount === "number" ? "directory" : "file";
|
|
94
|
+
const result = {
|
|
95
|
+
path: entry.path,
|
|
96
|
+
type: entryType,
|
|
97
|
+
description: metadata.description,
|
|
98
|
+
meta: {}
|
|
99
|
+
};
|
|
100
|
+
if (metadata.provider) result.meta.provider = String(metadata.provider);
|
|
101
|
+
if (metadata.permissions) {
|
|
102
|
+
const perms = metadata.permissions;
|
|
103
|
+
result.meta.permissions = Array.isArray(perms) ? perms.join(", ") : String(perms);
|
|
104
|
+
}
|
|
105
|
+
if (entryType === "exec") {
|
|
106
|
+
if (metadata.inputs) result.inputs = Array.isArray(metadata.inputs) ? metadata.inputs : [String(metadata.inputs)];
|
|
107
|
+
if (metadata.outputs) result.outputs = Array.isArray(metadata.outputs) ? metadata.outputs : [String(metadata.outputs)];
|
|
108
|
+
if (metadata.errors) result.errors = Array.isArray(metadata.errors) ? metadata.errors : [String(metadata.errors)];
|
|
109
|
+
if (metadata.sideEffects) result.sideEffects = Array.isArray(metadata.sideEffects) ? metadata.sideEffects : [String(metadata.sideEffects)];
|
|
110
|
+
}
|
|
111
|
+
if (Object.keys(result.meta).length === 0) delete result.meta;
|
|
112
|
+
return result;
|
|
113
|
+
} catch (err) {
|
|
114
|
+
return {
|
|
115
|
+
path,
|
|
116
|
+
type: "error",
|
|
117
|
+
description: err instanceof Error ? err.message : String(err)
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Get explanation for a concept
|
|
123
|
+
*/
|
|
124
|
+
async function getConceptExplanation(topic, cwd, afs) {
|
|
125
|
+
switch (topic) {
|
|
126
|
+
case "mount":
|
|
127
|
+
case "mounts": return explainMounts(cwd, afs);
|
|
128
|
+
case "path":
|
|
129
|
+
case "paths": return explainPaths();
|
|
130
|
+
case "uri":
|
|
131
|
+
case "provider":
|
|
132
|
+
case "providers": return explainUri();
|
|
133
|
+
default: return {
|
|
134
|
+
topic: "Unknown Topic",
|
|
135
|
+
explanation: `Unknown topic: ${topic}\n\nAvailable topics: overview, mount, path, uri`
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function explainOverview() {
|
|
140
|
+
return {
|
|
141
|
+
topic: "AFS Overview",
|
|
142
|
+
explanation: `AFS (Abstract File System) is a virtual filesystem that unifies different data sources into a single namespace.
|
|
143
|
+
|
|
144
|
+
Core Concepts:
|
|
145
|
+
- mount: Mount a data source to a virtual path
|
|
146
|
+
- path: Virtual path, e.g., /src, /data
|
|
147
|
+
- uri: Data source address, e.g., fs://, git://, sqlite://
|
|
148
|
+
|
|
149
|
+
Data Flow:
|
|
150
|
+
User Path -> AFS -> /{mount} -> Provider -> Actual Data`,
|
|
151
|
+
examples: [
|
|
152
|
+
"afs mount add /src fs:///path/to/source",
|
|
153
|
+
"afs ls /src",
|
|
154
|
+
"afs read /src/file.txt"
|
|
155
|
+
]
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
async function explainMounts(cwd, afs) {
|
|
159
|
+
const result = await configMountListCommand(cwd);
|
|
160
|
+
if (result.mounts.length === 0) {
|
|
161
|
+
if (afs) try {
|
|
162
|
+
const listResult = await afs.list("$afs:/");
|
|
163
|
+
if (listResult.data?.length) return {
|
|
164
|
+
topic: "Mounts",
|
|
165
|
+
explanation: `Runtime mounts (mounted via API):\n\n${listResult.data.map((entry) => ` ${entry.path} (runtime mount)`).join("\n")}`,
|
|
166
|
+
examples: listResult.data.slice(0, 3).map((entry) => `afs ls ${entry.path}`)
|
|
167
|
+
};
|
|
168
|
+
} catch {}
|
|
169
|
+
return {
|
|
170
|
+
topic: "Mounts",
|
|
171
|
+
explanation: `No mounts configured.
|
|
172
|
+
|
|
173
|
+
Use mount add to add a mount:
|
|
174
|
+
afs mount add <path> <uri>
|
|
175
|
+
|
|
176
|
+
path: Virtual path for accessing data in AFS
|
|
177
|
+
uri: Data source URI specifying the data origin`,
|
|
178
|
+
examples: ["afs mount add /src fs:///Users/me/project", "afs mount add /data sqlite:///data.db"]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
return {
|
|
182
|
+
topic: "Mounts",
|
|
183
|
+
explanation: `Current mount configuration:
|
|
184
|
+
|
|
185
|
+
${result.mounts.map((m) => ` ${m.path}${m.description ? ` - ${m.description}` : ""}`).join("\n")}
|
|
186
|
+
|
|
187
|
+
After mounting, data is accessed via the mount path:
|
|
188
|
+
path="/src" -> /src`,
|
|
189
|
+
examples: result.mounts.map((m) => `afs ls ${m.path}`)
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function explainPaths() {
|
|
193
|
+
return {
|
|
194
|
+
topic: "Paths",
|
|
195
|
+
explanation: `AFS Path Structure:
|
|
196
|
+
|
|
197
|
+
/ Root directory
|
|
198
|
+
/{mount} Mounted data source
|
|
199
|
+
/{mount}/{path} Files/nodes within a mount
|
|
200
|
+
|
|
201
|
+
Path Mapping:
|
|
202
|
+
config: path="/src" -> access: /src
|
|
203
|
+
config: path="/data" -> access: /data
|
|
204
|
+
|
|
205
|
+
Mounts are accessed directly at their configured path.`
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
function explainUri() {
|
|
209
|
+
return {
|
|
210
|
+
topic: "URI",
|
|
211
|
+
explanation: `AFS URI Schemes and Objects:
|
|
212
|
+
|
|
213
|
+
fs:// Local Filesystem Provider
|
|
214
|
+
Format: fs:///absolute/path or fs://./relative/path
|
|
215
|
+
Operations: list, read, write, delete
|
|
216
|
+
|
|
217
|
+
git:// Git Repository Provider
|
|
218
|
+
Format: git:///local/repo or git://github.com/user/repo?branch=main
|
|
219
|
+
Operations: list, read, exec (diff, create-branch, commit, merge)
|
|
220
|
+
|
|
221
|
+
sqlite:// SQLite Database Provider
|
|
222
|
+
Format: sqlite:///path/to/db.sqlite
|
|
223
|
+
Operations: list, read, exec (SQL queries)
|
|
224
|
+
|
|
225
|
+
json:// JSON Data Provider
|
|
226
|
+
Format: json:///path/to/data.json
|
|
227
|
+
Operations: list, read, write
|
|
228
|
+
|
|
229
|
+
toml:// TOML Data Provider
|
|
230
|
+
Format: toml:///path/to/config.toml
|
|
231
|
+
Operations: list, read, write
|
|
232
|
+
|
|
233
|
+
sandbox:// Sandboxed Script Execution Provider
|
|
234
|
+
Format: sandbox:///path/to/scripts
|
|
235
|
+
Operations: list, read, exec
|
|
236
|
+
|
|
237
|
+
github:// GitHub Issues/PRs Provider
|
|
238
|
+
Format: github://owner/repo
|
|
239
|
+
Operations: list, read, exec (create-issue, close-issue, etc.)
|
|
240
|
+
|
|
241
|
+
http:// HTTP Proxy Provider
|
|
242
|
+
Format: http://host:port/path
|
|
243
|
+
Operations: list, read
|
|
244
|
+
|
|
245
|
+
mcp:// MCP Server Provider
|
|
246
|
+
Format: mcp:///path/to/server
|
|
247
|
+
Operations: list, read, exec
|
|
248
|
+
|
|
249
|
+
s3:// AWS S3 Storage Provider
|
|
250
|
+
Format: s3://bucket-name
|
|
251
|
+
Operations: list, read, write, delete
|
|
252
|
+
|
|
253
|
+
gcs:// Google Cloud Storage Provider
|
|
254
|
+
Format: gcs://bucket-name
|
|
255
|
+
Operations: list, read, write, delete
|
|
256
|
+
|
|
257
|
+
ec2:// AWS EC2 Instances Provider
|
|
258
|
+
Format: ec2://region
|
|
259
|
+
Operations: list, read, exec (run-instances)
|
|
260
|
+
|
|
261
|
+
gce:// Google Compute Engine Provider
|
|
262
|
+
Format: gce://project/zone
|
|
263
|
+
Operations: list, read, exec
|
|
264
|
+
|
|
265
|
+
dns:// Cloud DNS Provider
|
|
266
|
+
Format: dns://provider (route53, clouddns)
|
|
267
|
+
Operations: list, read`,
|
|
268
|
+
examples: [
|
|
269
|
+
"afs mount add /src fs:///Users/me/project",
|
|
270
|
+
"afs mount add /repo git://github.com/user/repo",
|
|
271
|
+
"afs mount add /db sqlite:///data.sqlite",
|
|
272
|
+
"afs mount add /s3 s3://my-bucket"
|
|
273
|
+
]
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
//#endregion
|
|
278
|
+
export { createExplainCommand };
|
|
279
|
+
//# sourceMappingURL=explain.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explain.mjs","names":[],"sources":["../../../src/core/commands/explain.ts"],"sourcesContent":["/**\n * explain Command - Core Implementation\n *\n * Explains AFS paths or concepts.\n * Matches old version output format with topic/explanation/examples structure.\n */\n\nimport type { AFS } from \"@aigne/afs\";\nimport type { CommandModule } from \"yargs\";\nimport { configMountListCommand } from \"../../config/mount-commands.js\";\nimport { formatExplainOutput, formatPathExplainOutput } from \"../formatters/index.js\";\nimport { cliPathToCanonical } from \"../path-utils.js\";\nimport { type CommandFactoryOptions, resolveAFS } from \"./types.js\";\n\n/**\n * Result for concept explanations (mount, paths, uri, overview)\n */\nexport interface ExplainResult {\n topic: string;\n explanation: string;\n examples?: string[];\n}\n\n/**\n * Result for path explanations\n */\nexport interface PathExplainResult {\n path: string;\n type: string;\n description?: string;\n inputs?: string[];\n outputs?: string[];\n errors?: string[];\n sideEffects?: string[];\n meta?: Record<string, string>;\n /** When set, the formatter renders this markdown directly instead of structured fields */\n markdown?: string;\n}\n\n/**\n * Explain command arguments\n */\nexport interface ExplainArgs {\n topic?: string;\n}\n\n/**\n * Create explain command factory\n */\nexport function createExplainCommand(\n options: CommandFactoryOptions,\n): CommandModule<unknown, ExplainArgs> {\n return {\n command: \"explain [topic]\",\n describe: \"Explain AFS concepts or paths\",\n builder: {\n topic: {\n type: \"string\",\n description: \"Topic (mount, path, uri) or AFS path (e.g., /src)\",\n },\n },\n handler: async (argv) => {\n const target = argv.topic;\n\n // No target - explain overview\n if (!target) {\n options.onResult({\n command: \"explain\",\n result: explainOverview(),\n format: formatExplainOutput,\n });\n return;\n }\n\n // Priority: try as path first, then as concept\n const isPath = target.startsWith(\"/\") || target.startsWith(\"@\") || target.startsWith(\"$\");\n\n if (isPath) {\n const afs = await resolveAFS(options);\n const canonicalPath = cliPathToCanonical(target);\n const result = await getPathExplanation(afs, target, canonicalPath);\n options.onResult({ command: \"explain\", result, format: formatPathExplainOutput });\n } else {\n // Not obviously a path — try as path first, fall back to concept\n let afs: AFS | undefined;\n try {\n afs = await resolveAFS(options);\n } catch {}\n\n if (afs) {\n try {\n const canonicalPath = cliPathToCanonical(`/${target}`);\n const explainResult = await afs.explain(canonicalPath);\n if (explainResult.format === \"markdown\" && explainResult.content) {\n options.onResult({\n command: \"explain\",\n result: { path: `/${target}`, type: \"explained\", markdown: explainResult.content },\n format: formatPathExplainOutput,\n });\n return;\n }\n } catch {\n // Not a valid path, fall through to concept\n }\n }\n\n const cwd = options.cwd ?? process.cwd();\n const result = await getConceptExplanation(target.toLowerCase(), cwd, afs);\n options.onResult({\n command: \"explain\",\n result,\n format: formatExplainOutput,\n });\n }\n },\n };\n}\n\n/**\n * Get explanation for a path\n */\nasync function getPathExplanation(\n afs: AFS,\n path: string,\n canonicalPath: string,\n): Promise<PathExplainResult> {\n try {\n // Always try afs.explain() first — transparent passthrough to provider explain\n try {\n const explainResult = await afs.explain(canonicalPath);\n if (explainResult.format === \"markdown\" && explainResult.content) {\n return {\n path,\n type: \"explained\",\n markdown: explainResult.content,\n };\n }\n } catch {\n // explain not available, fall through to stat-based logic\n }\n\n // Fallback: stat-based explanation\n let entry:\n | { path: string; meta?: Record<string, unknown> | null; content?: unknown }\n | undefined;\n\n try {\n const statResult = await afs.stat(canonicalPath);\n entry = statResult.data;\n } catch {}\n\n if (!entry) {\n try {\n const readResult = await afs.read(canonicalPath);\n entry = readResult.data;\n } catch {}\n }\n\n if (!entry) {\n return {\n path,\n type: \"unknown\",\n };\n }\n\n const metadata = entry.meta || {};\n // Determine type from childrenCount: if defined, it has children (directory-like); otherwise file-like\n const entryType =\n metadata.kind === \"afs:executable\"\n ? \"exec\"\n : typeof metadata.childrenCount === \"number\"\n ? \"directory\"\n : \"file\";\n\n const result: PathExplainResult = {\n path: entry.path,\n type: entryType,\n description: metadata.description as string | undefined,\n meta: {},\n };\n\n // Add metadata\n if (metadata.provider) {\n result.meta!.provider = String(metadata.provider);\n }\n if (metadata.permissions) {\n const perms = metadata.permissions;\n result.meta!.permissions = Array.isArray(perms) ? perms.join(\", \") : String(perms);\n }\n\n // For exec type, try to get schema info\n if (entryType === \"exec\") {\n if (metadata.inputs) {\n result.inputs = Array.isArray(metadata.inputs)\n ? (metadata.inputs as string[])\n : [String(metadata.inputs)];\n }\n if (metadata.outputs) {\n result.outputs = Array.isArray(metadata.outputs)\n ? (metadata.outputs as string[])\n : [String(metadata.outputs)];\n }\n if (metadata.errors) {\n result.errors = Array.isArray(metadata.errors)\n ? (metadata.errors as string[])\n : [String(metadata.errors)];\n }\n if (metadata.sideEffects) {\n result.sideEffects = Array.isArray(metadata.sideEffects)\n ? (metadata.sideEffects as string[])\n : [String(metadata.sideEffects)];\n }\n }\n\n // Clean up empty metadata\n if (Object.keys(result.meta!).length === 0) {\n delete result.meta;\n }\n\n return result;\n } catch (err) {\n return {\n path,\n type: \"error\",\n description: err instanceof Error ? err.message : String(err),\n };\n }\n}\n\n/**\n * Get explanation for a concept\n */\nasync function getConceptExplanation(\n topic: string,\n cwd: string,\n afs?: AFS,\n): Promise<ExplainResult> {\n switch (topic) {\n case \"mount\":\n case \"mounts\":\n return explainMounts(cwd, afs);\n case \"path\":\n case \"paths\":\n return explainPaths();\n case \"uri\":\n case \"provider\":\n case \"providers\":\n return explainUri();\n default:\n return {\n topic: \"Unknown Topic\",\n explanation: `Unknown topic: ${topic}\\n\\nAvailable topics: overview, mount, path, uri`,\n };\n }\n}\n\nfunction explainOverview(): ExplainResult {\n return {\n topic: \"AFS Overview\",\n explanation: `AFS (Abstract File System) is a virtual filesystem that unifies different data sources into a single namespace.\n\nCore Concepts:\n- mount: Mount a data source to a virtual path\n- path: Virtual path, e.g., /src, /data\n- uri: Data source address, e.g., fs://, git://, sqlite://\n\nData Flow:\n User Path -> AFS -> /{mount} -> Provider -> Actual Data`,\n examples: [\"afs mount add /src fs:///path/to/source\", \"afs ls /src\", \"afs read /src/file.txt\"],\n };\n}\n\nasync function explainMounts(cwd: string, afs?: AFS): Promise<ExplainResult> {\n const result = await configMountListCommand(cwd);\n\n if (result.mounts.length === 0) {\n // Try runtime mounts if no config mounts\n if (afs) {\n try {\n const listResult = await afs.list(\"$afs:/\");\n if (listResult.data?.length) {\n const runtimeMounts = listResult.data\n .map((entry) => ` ${entry.path} (runtime mount)`)\n .join(\"\\n\");\n\n return {\n topic: \"Mounts\",\n explanation: `Runtime mounts (mounted via API):\\n\\n${runtimeMounts}`,\n examples: listResult.data.slice(0, 3).map((entry) => `afs ls ${entry.path}`),\n };\n }\n } catch {}\n }\n\n return {\n topic: \"Mounts\",\n explanation: `No mounts configured.\n\nUse mount add to add a mount:\n afs mount add <path> <uri>\n\npath: Virtual path for accessing data in AFS\nuri: Data source URI specifying the data origin`,\n examples: [\n \"afs mount add /src fs:///Users/me/project\",\n \"afs mount add /data sqlite:///data.db\",\n ],\n };\n }\n\n const mountList = result.mounts\n .map((m) => ` ${m.path}${m.description ? ` - ${m.description}` : \"\"}`)\n .join(\"\\n\");\n\n return {\n topic: \"Mounts\",\n explanation: `Current mount configuration:\n\n${mountList}\n\nAfter mounting, data is accessed via the mount path:\n path=\"/src\" -> /src`,\n examples: result.mounts.map((m) => `afs ls ${m.path}`),\n };\n}\n\nfunction explainPaths(): ExplainResult {\n return {\n topic: \"Paths\",\n explanation: `AFS Path Structure:\n\n/ Root directory\n/{mount} Mounted data source\n/{mount}/{path} Files/nodes within a mount\n\nPath Mapping:\n config: path=\"/src\" -> access: /src\n config: path=\"/data\" -> access: /data\n\nMounts are accessed directly at their configured path.`,\n };\n}\n\nfunction explainUri(): ExplainResult {\n return {\n topic: \"URI\",\n explanation: `AFS URI Schemes and Objects:\n\nfs:// Local Filesystem Provider\n Format: fs:///absolute/path or fs://./relative/path\n Operations: list, read, write, delete\n\ngit:// Git Repository Provider\n Format: git:///local/repo or git://github.com/user/repo?branch=main\n Operations: list, read, exec (diff, create-branch, commit, merge)\n\nsqlite:// SQLite Database Provider\n Format: sqlite:///path/to/db.sqlite\n Operations: list, read, exec (SQL queries)\n\njson:// JSON Data Provider\n Format: json:///path/to/data.json\n Operations: list, read, write\n\ntoml:// TOML Data Provider\n Format: toml:///path/to/config.toml\n Operations: list, read, write\n\nsandbox:// Sandboxed Script Execution Provider\n Format: sandbox:///path/to/scripts\n Operations: list, read, exec\n\ngithub:// GitHub Issues/PRs Provider\n Format: github://owner/repo\n Operations: list, read, exec (create-issue, close-issue, etc.)\n\nhttp:// HTTP Proxy Provider\n Format: http://host:port/path\n Operations: list, read\n\nmcp:// MCP Server Provider\n Format: mcp:///path/to/server\n Operations: list, read, exec\n\ns3:// AWS S3 Storage Provider\n Format: s3://bucket-name\n Operations: list, read, write, delete\n\ngcs:// Google Cloud Storage Provider\n Format: gcs://bucket-name\n Operations: list, read, write, delete\n\nec2:// AWS EC2 Instances Provider\n Format: ec2://region\n Operations: list, read, exec (run-instances)\n\ngce:// Google Compute Engine Provider\n Format: gce://project/zone\n Operations: list, read, exec\n\ndns:// Cloud DNS Provider\n Format: dns://provider (route53, clouddns)\n Operations: list, read`,\n examples: [\n \"afs mount add /src fs:///Users/me/project\",\n \"afs mount add /repo git://github.com/user/repo\",\n \"afs mount add /db sqlite:///data.sqlite\",\n \"afs mount add /s3 s3://my-bucket\",\n ],\n };\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const require_types = require('./types.cjs');
|
|
2
|
+
const require_version = require('../../version.cjs');
|
|
3
|
+
|
|
4
|
+
//#region src/core/commands/explore.ts
|
|
5
|
+
/**
|
|
6
|
+
* Create explore command
|
|
7
|
+
*/
|
|
8
|
+
function createExploreCommand(options) {
|
|
9
|
+
return {
|
|
10
|
+
command: "explore [path]",
|
|
11
|
+
describe: "Interactive TUI explorer",
|
|
12
|
+
builder: { path: {
|
|
13
|
+
type: "string",
|
|
14
|
+
default: "/",
|
|
15
|
+
description: "Starting path"
|
|
16
|
+
} },
|
|
17
|
+
handler: async (argv) => {
|
|
18
|
+
const afs = await require_types.resolveAFS(options);
|
|
19
|
+
const { createExplorerScreen } = await Promise.resolve().then(() => require("../../explorer/screen.cjs"));
|
|
20
|
+
await createExplorerScreen({
|
|
21
|
+
afs,
|
|
22
|
+
startPath: argv.path,
|
|
23
|
+
version: require_version.VERSION
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
exports.createExploreCommand = createExploreCommand;
|