akm-cli 0.4.1 → 0.5.0-rc1
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/asset-registry.js +7 -0
- package/dist/asset-spec.js +35 -0
- package/dist/cli.js +1120 -31
- package/dist/completions.js +2 -2
- package/dist/config-cli.js +41 -0
- package/dist/config.js +62 -0
- package/dist/file-context.js +2 -1
- package/dist/github.js +20 -1
- package/dist/indexer.js +55 -5
- package/dist/init.js +11 -0
- package/dist/install-audit.js +53 -8
- package/dist/installed-kits.js +2 -0
- package/dist/llm.js +64 -23
- package/dist/matchers.js +56 -4
- package/dist/metadata.js +68 -4
- package/dist/paths.js +3 -0
- package/dist/registry-install.js +36 -7
- package/dist/registry-resolve.js +25 -0
- package/dist/renderers.js +182 -2
- package/dist/search-fields.js +4 -0
- package/dist/search-source.js +12 -8
- package/dist/setup.js +158 -33
- package/dist/stash-add.js +84 -11
- package/dist/stash-providers/git.js +182 -44
- package/dist/stash-show.js +56 -1
- package/dist/stash-source-manage.js +14 -4
- package/dist/templates/wiki-templates.js +100 -0
- package/dist/vault.js +290 -0
- package/dist/wiki.js +886 -0
- package/dist/workflow-authoring.js +131 -0
- package/dist/workflow-cli.js +44 -0
- package/dist/workflow-db.js +55 -0
- package/dist/workflow-markdown.js +251 -0
- package/dist/workflow-runs.js +364 -0
- package/package.json +2 -1
- package/LICENSE +0 -374
package/dist/asset-registry.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* `local-search.ts` import from, eliminating the import-order dependency
|
|
11
11
|
* entirely.
|
|
12
12
|
*/
|
|
13
|
+
import { buildWorkflowAction } from "./renderers";
|
|
13
14
|
/** Map asset types to their primary renderer names. */
|
|
14
15
|
export const TYPE_TO_RENDERER = {
|
|
15
16
|
script: "script-source",
|
|
@@ -18,6 +19,9 @@ export const TYPE_TO_RENDERER = {
|
|
|
18
19
|
agent: "agent-md",
|
|
19
20
|
knowledge: "knowledge-md",
|
|
20
21
|
memory: "memory-md",
|
|
22
|
+
workflow: "workflow-md",
|
|
23
|
+
vault: "vault-env",
|
|
24
|
+
wiki: "wiki-md",
|
|
21
25
|
};
|
|
22
26
|
/** Map asset types to action builder functions for search results. */
|
|
23
27
|
export const ACTION_BUILDERS = {
|
|
@@ -27,6 +31,9 @@ export const ACTION_BUILDERS = {
|
|
|
27
31
|
agent: (ref) => `akm show ${ref} -> dispatch with full prompt`,
|
|
28
32
|
knowledge: (ref) => `akm show ${ref} -> read reference material`,
|
|
29
33
|
memory: (ref) => `akm show ${ref} -> recall context`,
|
|
34
|
+
workflow: (ref) => buildWorkflowAction(ref),
|
|
35
|
+
vault: (ref) => `akm vault list ${ref} -> see key names; eval "$(akm vault load ${ref})" -> load values into the current shell (values never echoed)`,
|
|
36
|
+
wiki: (ref) => `akm show ${ref} -> read the wiki page`,
|
|
30
37
|
};
|
|
31
38
|
/**
|
|
32
39
|
* Register a type-to-renderer mapping.
|
package/dist/asset-spec.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { registerActionBuilder, registerTypeRenderer } from "./asset-registry";
|
|
3
3
|
import { toPosix } from "./common";
|
|
4
|
+
import { buildWorkflowAction } from "./renderers";
|
|
4
5
|
const markdownSpec = {
|
|
5
6
|
isRelevantFile: (fileName) => path.extname(fileName).toLowerCase() === ".md",
|
|
6
7
|
toCanonicalName: (typeRoot, filePath) => {
|
|
@@ -53,8 +54,42 @@ const ASSET_SPECS_INTERNAL = {
|
|
|
53
54
|
command: { stashDir: "commands", ...markdownSpec },
|
|
54
55
|
agent: { stashDir: "agents", ...markdownSpec },
|
|
55
56
|
knowledge: { stashDir: "knowledge", ...markdownSpec },
|
|
57
|
+
workflow: {
|
|
58
|
+
stashDir: "workflows",
|
|
59
|
+
...markdownSpec,
|
|
60
|
+
rendererName: "workflow-md",
|
|
61
|
+
actionBuilder: (ref) => buildWorkflowAction(ref),
|
|
62
|
+
},
|
|
56
63
|
script: { stashDir: "scripts", ...scriptSpec },
|
|
57
64
|
memory: { stashDir: "memories", ...markdownSpec },
|
|
65
|
+
vault: {
|
|
66
|
+
stashDir: "vaults",
|
|
67
|
+
isRelevantFile: (fileName) => fileName === ".env" || fileName.endsWith(".env"),
|
|
68
|
+
toCanonicalName: (typeRoot, filePath) => {
|
|
69
|
+
const rel = toPosix(path.relative(typeRoot, filePath));
|
|
70
|
+
const fileName = path.basename(rel);
|
|
71
|
+
// Treat ".env" as the "default" vault; "<name>.env" → "<name>"
|
|
72
|
+
if (fileName === ".env") {
|
|
73
|
+
const dir = path.dirname(rel);
|
|
74
|
+
return dir === "." || dir === "" ? "default" : `${dir}/default`;
|
|
75
|
+
}
|
|
76
|
+
const stripped = rel.endsWith(".env") ? rel.slice(0, -4) : rel;
|
|
77
|
+
return stripped;
|
|
78
|
+
},
|
|
79
|
+
toAssetPath: (typeRoot, name) => {
|
|
80
|
+
if (name === "default")
|
|
81
|
+
return path.join(typeRoot, ".env");
|
|
82
|
+
return path.join(typeRoot, name.endsWith(".env") ? name : `${name}.env`);
|
|
83
|
+
},
|
|
84
|
+
rendererName: "vault-env",
|
|
85
|
+
actionBuilder: (ref) => `akm vault list ${ref} -> see key names; eval "$(akm vault load ${ref})" -> load values into the current shell (values never echoed)`,
|
|
86
|
+
},
|
|
87
|
+
wiki: {
|
|
88
|
+
stashDir: "wikis",
|
|
89
|
+
...markdownSpec,
|
|
90
|
+
rendererName: "wiki-md",
|
|
91
|
+
actionBuilder: (ref) => `akm show ${ref} -> read the wiki page`,
|
|
92
|
+
},
|
|
58
93
|
};
|
|
59
94
|
export const ASSET_SPECS = ASSET_SPECS_INTERNAL;
|
|
60
95
|
/**
|