@agentxm/client-core 0.4.2 → 0.4.5
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 +11 -0
- package/dist/src/unstable/lint/catalog/index.d.ts +1 -1
- package/dist/src/unstable/lint/catalog/index.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/index.js +1 -1
- package/dist/src/unstable/lint/catalog/index.js.map +1 -1
- package/dist/src/unstable/lint/catalog/skill/manifest-present.d.ts +7 -1
- package/dist/src/unstable/lint/catalog/skill/manifest-present.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/skill/manifest-present.js +8 -2
- package/dist/src/unstable/lint/catalog/skill/manifest-present.js.map +1 -1
- package/dist/src/unstable/lint/catalog/skill-accessor/contexts.d.ts +6 -1
- package/dist/src/unstable/lint/catalog/skill-accessor/contexts.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/skill-accessor/contexts.js +6 -1
- package/dist/src/unstable/lint/catalog/skill-accessor/contexts.js.map +1 -1
- package/dist/src/unstable/lint/catalog/skill-accessor/vft.d.ts +19 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/vft.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/skill-accessor/vft.js +52 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/vft.js.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace-accessor/contexts.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace-accessor/contexts.js +7 -3
- package/dist/src/unstable/lint/catalog/workspace-accessor/contexts.js.map +1 -1
- package/dist/src/unstable/lint/context.d.ts +17 -0
- package/dist/src/unstable/lint/context.d.ts.map +1 -1
- package/dist/src/unstable/lint/index.d.ts +1 -1
- package/dist/src/unstable/lint/index.d.ts.map +1 -1
- package/dist/src/unstable/lint/index.js +1 -1
- package/dist/src/unstable/lint/index.js.map +1 -1
- package/package.json +51 -45
- package/site-content/install.cmd +80 -0
- package/site-content/install.md +268 -61
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @agentxm/client-core
|
|
2
|
+
|
|
3
|
+
> ⚠️ **Unstable, unsupported library.** This package exists to support the
|
|
4
|
+
> [`axm.sh`](https://www.npmjs.com/package/axm.sh) CLI. Its APIs live under
|
|
5
|
+
> `./unstable/*` and can change or disappear in any release without notice.
|
|
6
|
+
>
|
|
7
|
+
> **Use the [`axm.sh`](https://www.npmjs.com/package/axm.sh) CLI instead.**
|
|
8
|
+
>
|
|
9
|
+
> See https://axm.sh.
|
|
10
|
+
|
|
11
|
+
MIT © 2025-2026 AgentXM, Inc.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
export { skillRules } from "./skill.js";
|
|
17
17
|
export { packRules } from "./pack.js";
|
|
18
18
|
export { workspaceRules } from "./workspace.js";
|
|
19
|
-
export { makeVftSkillFileAccessor, type VFTNode } from "./skill-accessor/vft.js";
|
|
19
|
+
export { makeVftSkillFileAccessor, makeVftSkillFileAccessorScoped, type VFTNode, } from "./skill-accessor/vft.js";
|
|
20
20
|
export { makePlatformSkillFileAccessor, type SkillAccessorPlatform, } from "./skill-accessor/platform.js";
|
|
21
21
|
export { buildSkillRuleContexts, type InstalledSkillInfo, type SkillIndexView, } from "./skill-accessor/contexts.js";
|
|
22
22
|
export { makeVftPackFileAccessor, type PackVFTNode } from "./pack-accessor/vft.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/unstable/lint/catalog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/unstable/lint/catalog/index.ts"],"names":[],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skillRules } from "./skill.js";
|
|
|
20
20
|
export { packRules } from "./pack.js";
|
|
21
21
|
export { workspaceRules } from "./workspace.js";
|
|
22
22
|
// Phase 3a accessor + context-builder helpers.
|
|
23
|
-
export { makeVftSkillFileAccessor } from "./skill-accessor/vft.js";
|
|
23
|
+
export { makeVftSkillFileAccessor, makeVftSkillFileAccessorScoped, } from "./skill-accessor/vft.js";
|
|
24
24
|
export { makePlatformSkillFileAccessor, } from "./skill-accessor/platform.js";
|
|
25
25
|
export { buildSkillRuleContexts, } from "./skill-accessor/contexts.js";
|
|
26
26
|
// Phase 3b accessor + context-builder helpers.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/unstable/lint/catalog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,+CAA+C;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/unstable/lint/catalog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,+CAA+C;AAC/C,OAAO,EACL,wBAAwB,EACxB,8BAA8B,GAE/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,6BAA6B,GAE9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sBAAsB,GAGvB,MAAM,8BAA8B,CAAC;AAEtC,+CAA+C;AAC/C,OAAO,EAAE,uBAAuB,EAAoB,MAAM,wBAAwB,CAAC;AACnF,OAAO,EACL,4BAA4B,GAE7B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,qBAAqB,GAGtB,MAAM,6BAA6B,CAAC;AAErC,+CAA+C;AAC/C,OAAO,EACL,iCAAiC,GAIlC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC7B,+BAA+B,EAC/B,sBAAsB,EACtB,wBAAwB,EACxB,8BAA8B,EAC9B,uBAAuB,GAMxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,GAE5B,MAAM,oCAAoC,CAAC;AAE5C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA0B;IACtD,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;CACnC,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `skill/manifest-present` — native skills must have a `skill.json` at the
|
|
3
|
-
*
|
|
3
|
+
* extension package root.
|
|
4
|
+
*
|
|
5
|
+
* Reads through `context.packageFiles` (package-root accessor) rather than
|
|
6
|
+
* `context.files` (content-root accessor). For native skills, the package
|
|
7
|
+
* root contains `skill.json` and a `src/` directory holding the skill
|
|
8
|
+
* content; `context.files` is rooted at `src/`, so `skill.json` is only
|
|
9
|
+
* reachable via `packageFiles`.
|
|
4
10
|
*
|
|
5
11
|
* Native-only via `check` early-return: when `subject.isNative === false`
|
|
6
12
|
* (managed-external skills without a declared manifest), the rule produces
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-present.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/skill/manifest-present.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"manifest-present.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/skill/manifest-present.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAmB,YAAY,EAAE,MAAM,eAAe,CAAC;AAKnE,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,gBAAgB,CA4B9D,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `skill/manifest-present` — native skills must have a `skill.json` at the
|
|
3
|
-
*
|
|
3
|
+
* extension package root.
|
|
4
|
+
*
|
|
5
|
+
* Reads through `context.packageFiles` (package-root accessor) rather than
|
|
6
|
+
* `context.files` (content-root accessor). For native skills, the package
|
|
7
|
+
* root contains `skill.json` and a `src/` directory holding the skill
|
|
8
|
+
* content; `context.files` is rooted at `src/`, so `skill.json` is only
|
|
9
|
+
* reachable via `packageFiles`.
|
|
4
10
|
*
|
|
5
11
|
* Native-only via `check` early-return: when `subject.isNative === false`
|
|
6
12
|
* (managed-external skills without a declared manifest), the rule produces
|
|
@@ -24,7 +30,7 @@ export const manifestPresentRule = {
|
|
|
24
30
|
if (!context.subject.isNative) {
|
|
25
31
|
return Effect.succeed([]);
|
|
26
32
|
}
|
|
27
|
-
return Effect.map(context.
|
|
33
|
+
return Effect.map(context.packageFiles.exists(SKILL_JSON), (present) => {
|
|
28
34
|
if (present) {
|
|
29
35
|
return [];
|
|
30
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-present.js","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/skill/manifest-present.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"manifest-present.js","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/skill/manifest-present.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,MAAM,OAAO,GAAG,wBAAwB,CAAC;AACzC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEhC,MAAM,CAAC,MAAM,mBAAmB,GAAmC;IACjE,EAAE,EAAE,OAAO;IACX,WAAW,EAAE,mDAAmD;IAChE,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,OAAO;IACjB,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE;QACjB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;YAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC5B,CAAC;QACD,OAAO,MAAM,CAAC,GAAG,CACf,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,EACvC,CAAC,OAAO,EAAkC,EAAE;YAC1C,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,EAAE,CAAC;YACZ,CAAC;YACD,OAAO;gBACL;oBACE,IAAI,EAAE,UAAU;oBAChB,MAAM,EAAE,OAAO;oBACf,QAAQ,EAAE,OAAO;oBACjB,OAAO,EACL,wIAAwI;oBAC1I,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;iBAC/B;aACF,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -13,8 +13,12 @@
|
|
|
13
13
|
* once per skill, so rules don't re-read + re-parse).
|
|
14
14
|
* - `displayRoot` — posix-relative root used by the renderer; the caller
|
|
15
15
|
* picks per provenance (see the table below).
|
|
16
|
-
* - `files` — the pre-bound `SkillFileAccessor
|
|
16
|
+
* - `files` — the pre-bound content-root `SkillFileAccessor` (rooted at the
|
|
17
|
+
* directory containing `SKILL.md`). The caller chooses VFT or
|
|
17
18
|
* platform-backed.
|
|
19
|
+
* - `packageFiles` — the pre-bound package-root `SkillFileAccessor` (rooted
|
|
20
|
+
* at the directory containing `skill.json` for native skills). For
|
|
21
|
+
* non-native skills, callers MAY alias `files`.
|
|
18
22
|
*
|
|
19
23
|
* Provenance → `displayRoot` table:
|
|
20
24
|
*
|
|
@@ -40,6 +44,7 @@ export interface InstalledSkillInfo {
|
|
|
40
44
|
readonly skillJson: unknown;
|
|
41
45
|
readonly displayRoot: string;
|
|
42
46
|
readonly files: SkillFileAccessor;
|
|
47
|
+
readonly packageFiles: SkillFileAccessor;
|
|
43
48
|
}
|
|
44
49
|
/**
|
|
45
50
|
* Minimal structural shape of the WorkspaceIndex subset `buildSkillRuleContexts`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/skill-accessor/contexts.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/skill-accessor/contexts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAM5E;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,YAAY,EAAE,iBAAiB,CAAC;CAC1C;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC7D;AAMD;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,cAAc,KAAG,aAAa,CAAC,gBAAgB,CAW1F,CAAC"}
|
|
@@ -13,8 +13,12 @@
|
|
|
13
13
|
* once per skill, so rules don't re-read + re-parse).
|
|
14
14
|
* - `displayRoot` — posix-relative root used by the renderer; the caller
|
|
15
15
|
* picks per provenance (see the table below).
|
|
16
|
-
* - `files` — the pre-bound `SkillFileAccessor
|
|
16
|
+
* - `files` — the pre-bound content-root `SkillFileAccessor` (rooted at the
|
|
17
|
+
* directory containing `SKILL.md`). The caller chooses VFT or
|
|
17
18
|
* platform-backed.
|
|
19
|
+
* - `packageFiles` — the pre-bound package-root `SkillFileAccessor` (rooted
|
|
20
|
+
* at the directory containing `skill.json` for native skills). For
|
|
21
|
+
* non-native skills, callers MAY alias `files`.
|
|
18
22
|
*
|
|
19
23
|
* Provenance → `displayRoot` table:
|
|
20
24
|
*
|
|
@@ -45,6 +49,7 @@ export const buildSkillRuleContexts = (index) => index.installedSkills.map((info
|
|
|
45
49
|
skillJson: info.skillJson,
|
|
46
50
|
},
|
|
47
51
|
files: info.files,
|
|
52
|
+
packageFiles: info.packageFiles,
|
|
48
53
|
displayRoot: info.displayRoot,
|
|
49
54
|
}));
|
|
50
55
|
//# sourceMappingURL=contexts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contexts.js","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/skill-accessor/contexts.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"contexts.js","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/skill-accessor/contexts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAmCH,gFAAgF;AAChF,yBAAyB;AACzB,gFAAgF;AAEhF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAqB,EAAmC,EAAE,CAC/F,KAAK,CAAC,eAAe,CAAC,GAAG,CACvB,CAAC,IAAI,EAAoB,EAAE,CAAC,CAAC;IAC3B,OAAO,EAAE;QACP,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,SAAS,EAAE,IAAI,CAAC,SAAS;KAC1B;IACD,KAAK,EAAE,IAAI,CAAC,KAAK;IACjB,YAAY,EAAE,IAAI,CAAC,YAAY;IAC/B,WAAW,EAAE,IAAI,CAAC,WAAW;CAC9B,CAAC,CACH,CAAC"}
|
|
@@ -55,4 +55,23 @@ export interface VFTNode {
|
|
|
55
55
|
* @experimental This API is unstable and may change without notice.
|
|
56
56
|
*/
|
|
57
57
|
export declare const makeVftSkillFileAccessor: (tree: VFTNode) => SkillFileAccessor;
|
|
58
|
+
/**
|
|
59
|
+
* Build a VFT-backed `SkillFileAccessor` rooted at a sub-path of the tree.
|
|
60
|
+
*
|
|
61
|
+
* Publish callers use this when the archive layout nests the skill content
|
|
62
|
+
* under a directory (for native managed skills: `src/` holds the content
|
|
63
|
+
* accessor root while the archive root holds the extension package). The
|
|
64
|
+
* `prefix` is a posix path relative to the tree root; every rule-supplied
|
|
65
|
+
* path is resolved as `<prefix>/<path>` before dispatching to the tree.
|
|
66
|
+
*
|
|
67
|
+
* Bounds enforcement matches {@link makeVftSkillFileAccessor} — path traversal
|
|
68
|
+
* checks run on the caller-supplied path before the prefix is applied, so
|
|
69
|
+
* rules still cannot escape above the scoped root.
|
|
70
|
+
*
|
|
71
|
+
* The prefix itself is normalized posix (leading `./` and trailing `/` stripped);
|
|
72
|
+
* an empty or `.` prefix is equivalent to {@link makeVftSkillFileAccessor}.
|
|
73
|
+
*
|
|
74
|
+
* @experimental This API is unstable and may change without notice.
|
|
75
|
+
*/
|
|
76
|
+
export declare const makeVftSkillFileAccessorScoped: (tree: VFTNode, prefix: string) => SkillFileAccessor;
|
|
58
77
|
//# sourceMappingURL=vft.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vft.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/skill-accessor/vft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,KAAK,EAAmB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAM3E;;;;;;;;GAQG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IACjD;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAC;CACjE;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,GAAI,MAAM,OAAO,KAAG,iBAqBxD,CAAC"}
|
|
1
|
+
{"version":3,"file":"vft.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/skill-accessor/vft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,KAAK,EAAmB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAM3E;;;;;;;;GAQG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IACjD;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAC;CACjE;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,GAAI,MAAM,OAAO,KAAG,iBAqBxD,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,8BAA8B,GACzC,MAAM,OAAO,EACb,QAAQ,MAAM,KACb,iBA2BF,CAAC"}
|
|
@@ -56,6 +56,58 @@ export const makeVftSkillFileAccessor = (tree) => {
|
|
|
56
56
|
},
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* Build a VFT-backed `SkillFileAccessor` rooted at a sub-path of the tree.
|
|
61
|
+
*
|
|
62
|
+
* Publish callers use this when the archive layout nests the skill content
|
|
63
|
+
* under a directory (for native managed skills: `src/` holds the content
|
|
64
|
+
* accessor root while the archive root holds the extension package). The
|
|
65
|
+
* `prefix` is a posix path relative to the tree root; every rule-supplied
|
|
66
|
+
* path is resolved as `<prefix>/<path>` before dispatching to the tree.
|
|
67
|
+
*
|
|
68
|
+
* Bounds enforcement matches {@link makeVftSkillFileAccessor} — path traversal
|
|
69
|
+
* checks run on the caller-supplied path before the prefix is applied, so
|
|
70
|
+
* rules still cannot escape above the scoped root.
|
|
71
|
+
*
|
|
72
|
+
* The prefix itself is normalized posix (leading `./` and trailing `/` stripped);
|
|
73
|
+
* an empty or `.` prefix is equivalent to {@link makeVftSkillFileAccessor}.
|
|
74
|
+
*
|
|
75
|
+
* @experimental This API is unstable and may change without notice.
|
|
76
|
+
*/
|
|
77
|
+
export const makeVftSkillFileAccessorScoped = (tree, prefix) => {
|
|
78
|
+
const normalizedPrefix = normalizePrefix(prefix);
|
|
79
|
+
if (normalizedPrefix === "") {
|
|
80
|
+
return makeVftSkillFileAccessor(tree);
|
|
81
|
+
}
|
|
82
|
+
const join = (path) => path === "" ? normalizedPrefix : `${normalizedPrefix}/${path}`;
|
|
83
|
+
return {
|
|
84
|
+
exists: (path) => {
|
|
85
|
+
const normalized = normalizeAndCheck(path);
|
|
86
|
+
if (normalized.kind !== "ok") {
|
|
87
|
+
return Effect.succeed(false);
|
|
88
|
+
}
|
|
89
|
+
return Effect.succeed(tree.hasFile(join(normalized.path)));
|
|
90
|
+
},
|
|
91
|
+
readBytes: (path) => {
|
|
92
|
+
const normalized = normalizeAndCheck(path);
|
|
93
|
+
if (normalized.kind === "escape") {
|
|
94
|
+
return failFileAccess(path, "path-escape", `path escapes the accessor root: ${path}`);
|
|
95
|
+
}
|
|
96
|
+
const bytes = tree.getFile(join(normalized.path));
|
|
97
|
+
if (bytes === undefined) {
|
|
98
|
+
return failFileAccess(path, "read-error", `file not found at ${path}`);
|
|
99
|
+
}
|
|
100
|
+
return Effect.succeed(bytes);
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
const normalizePrefix = (prefix) => {
|
|
105
|
+
const stripped = prefix.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/+$/, "");
|
|
106
|
+
if (stripped === "" || stripped === ".") {
|
|
107
|
+
return "";
|
|
108
|
+
}
|
|
109
|
+
return stripped;
|
|
110
|
+
};
|
|
59
111
|
const normalizeAndCheck = (path) => {
|
|
60
112
|
if (path === "" || path === "." || path === "./") {
|
|
61
113
|
return { kind: "ok", path: "" };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vft.js","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/skill-accessor/vft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AA4BxC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,IAAa,EAAqB,EAAE;IAC3E,OAAO;QACL,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YACf,MAAM,UAAU,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAC3C,IAAI,UAAU,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;gBAC7B,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC/B,CAAC;YACD,OAAO,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,UAAU,CAAC,UAAU,CAAC;QACnC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;KAC1B,CAAC;IACF,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM,0BAA0B,KAAG,iBAUzE,CAAC"}
|
|
@@ -83,12 +83,14 @@ export const registryPackDisplayRoot = (owner, name) => `.axm/extensions/${owner
|
|
|
83
83
|
* @experimental This API is unstable and may change without notice.
|
|
84
84
|
*/
|
|
85
85
|
export const buildNativeInstalledSkillInfo = (args) => {
|
|
86
|
-
const
|
|
86
|
+
const packageRoot = args.platform.path.resolve(args.workspaceRoot, `.axm/extensions/${args.owner}/skills/${args.name}`);
|
|
87
|
+
const contentRoot = args.platform.path.resolve(packageRoot, "src");
|
|
87
88
|
return {
|
|
88
89
|
isNative: true,
|
|
89
90
|
skillJson: args.skillJson,
|
|
90
91
|
displayRoot: registryNativeSkillDisplayRoot(args.owner, args.name),
|
|
91
|
-
files: makePlatformSkillFileAccessor(args.platform,
|
|
92
|
+
files: makePlatformSkillFileAccessor(args.platform, contentRoot),
|
|
93
|
+
packageFiles: makePlatformSkillFileAccessor(args.platform, packageRoot),
|
|
92
94
|
};
|
|
93
95
|
};
|
|
94
96
|
/**
|
|
@@ -98,11 +100,13 @@ export const buildNativeInstalledSkillInfo = (args) => {
|
|
|
98
100
|
*/
|
|
99
101
|
export const buildExternalInstalledSkillInfo = (args) => {
|
|
100
102
|
const absoluteRoot = args.platform.path.resolve(args.workspaceRoot, `.axm/extensions/external/skills/${args.name}`);
|
|
103
|
+
const accessor = makePlatformSkillFileAccessor(args.platform, absoluteRoot);
|
|
101
104
|
return {
|
|
102
105
|
isNative: false,
|
|
103
106
|
skillJson: undefined,
|
|
104
107
|
displayRoot: externalSkillDisplayRoot(args.name),
|
|
105
|
-
files:
|
|
108
|
+
files: accessor,
|
|
109
|
+
packageFiles: accessor,
|
|
106
110
|
};
|
|
107
111
|
};
|
|
108
112
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contexts.js","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/workspace-accessor/contexts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EACL,sBAAsB,GAGvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,qBAAqB,GAGtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,iCAAiC,EAAE,MAAM,eAAe,CAAC;AAuClE;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,IAAmC,EACb,EAAE;IACxB,MAAM,SAAS,GAAG,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnD,MAAM,QAAQ,GAAG,iCAAiC,CAAC;QACjD,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,IAAI,CAAC,KAAK;KAClB,CAAC,CAAC;IACH,OAAO;QACL,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;QACxD,SAAS,EAAE,QAAQ;QACnB,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,EAAE;KACpC,CAAC;AACJ,CAAC,CAAC;AAEF,gFAAgF;AAChF,4BAA4B;AAC5B,gFAAgF;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ACJ,CAAC,CAAC;AAgBF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,IAAgC,EAAqB,EAAE;IAC5F,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAC7C,IAAI,CAAC,aAAa,EAClB,mBAAmB,IAAI,CAAC,KAAK,UAAU,IAAI,CAAC,IAAI,EAAE,CACnD,CAAC;IACF,OAAO;QACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,WAAW,EAAE,uBAAuB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC;QAC3D,KAAK,EAAE,4BAA4B,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC;KACjE,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -159,7 +159,24 @@ export interface WorkspaceLintAccessor {
|
|
|
159
159
|
*/
|
|
160
160
|
export interface SkillRuleContext<S = SkillContent> {
|
|
161
161
|
readonly subject: S;
|
|
162
|
+
/**
|
|
163
|
+
* Content-root accessor. Rooted at the directory containing `SKILL.md`.
|
|
164
|
+
* For native (registry-installed) skills this is the `src/` sub-directory
|
|
165
|
+
* of the extension package; for non-native skills it is the skill's own
|
|
166
|
+
* directory. Rules validating skill content (`skill-md-present`,
|
|
167
|
+
* `frontmatter-parseable`, and any future rule evaluating files that
|
|
168
|
+
* render into agent directories) read through this accessor.
|
|
169
|
+
*/
|
|
162
170
|
readonly files: SkillFileAccessor;
|
|
171
|
+
/**
|
|
172
|
+
* Package-root accessor. Rooted at the skill's extension package root —
|
|
173
|
+
* the directory containing `skill.json` for native skills. For non-native
|
|
174
|
+
* skills that have no package/content split, this MAY alias `files`.
|
|
175
|
+
* Rules validating package-shape concerns (`manifest-present` and any
|
|
176
|
+
* future rule inspecting files at or above the content root) read through
|
|
177
|
+
* this accessor.
|
|
178
|
+
*/
|
|
179
|
+
readonly packageFiles: SkillFileAccessor;
|
|
163
180
|
readonly displayRoot: string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,CAAC,SAAS,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;CACpC"}
|
|
@@ -24,5 +24,5 @@ export { issuesToFindings } from "./issues-to-findings.js";
|
|
|
24
24
|
export type { LintConfig, LintRuleSeverity, LintRulesMap } from "./config.js";
|
|
25
25
|
export { LintConfigSchema, LintRuleSeveritySchema, LintRulesMapSchema, platformCanonicalLintConfig, registerLintRuleIds, registeredLintRuleIds, } from "./config.js";
|
|
26
26
|
export { collectAutofixableEntries, collectRenderedFindings, countFindings, detectPublishGateDrift, evaluateAllCatalogs, renderFindingsText, resolveLintExitCategory, summarizeEvaluations, toLintHumanBlocks, toLintJsonDocument, type FindingCounts, type FixSummary, type GroupEvaluations, type LintHumanBlock, type LintHumanDiagnostic, type LintHumanReporter, type LintExitCategory, type LintJsonDocument, type LintJsonFinding, type LintSummary, type RenderFindingsArgs, type RenderedFinding, } from "./cli.js";
|
|
27
|
-
export { allCatalogRuleIds, buildExternalInstalledSkillInfo, buildInstalledPackInfo, buildNativeInstalledSkillInfo, buildPackRuleContexts, buildSkillRuleContexts, buildWorkspaceRuleContext, externalSkillDisplayRoot, isPerExtensionOperationName, makePlatformPackFileAccessor, makePlatformSkillFileAccessor, makePlatformWorkspaceLintAccessor, makeVftPackFileAccessor, makeVftSkillFileAccessor, packRules, PER_EXTENSION_OPERATION_NAMES, registryNativeSkillDisplayRoot, registryPackDisplayRoot, skillRules, workspaceRules, type BuildInstalledPackInfoArgs, type BuildInstalledSkillInfoExternalArgs, type BuildInstalledSkillInfoNativeArgs, type BuildWorkspaceRuleContextArgs, type InstalledPackInfo, type InstalledSkillInfo, type PackAccessorPlatform, type PackIndexView, type PackVFTNode, type PerExtensionOperationName, type PlatformWorkspaceLintAccessorArgs, type SkillAccessorPlatform, type SkillIndexView, type VFTNode, type WorkspaceAccessorPlatform, type WorkspaceIndex, type WorkspaceIndexView, } from "./catalog/index.js";
|
|
27
|
+
export { allCatalogRuleIds, buildExternalInstalledSkillInfo, buildInstalledPackInfo, buildNativeInstalledSkillInfo, buildPackRuleContexts, buildSkillRuleContexts, buildWorkspaceRuleContext, externalSkillDisplayRoot, isPerExtensionOperationName, makePlatformPackFileAccessor, makePlatformSkillFileAccessor, makePlatformWorkspaceLintAccessor, makeVftPackFileAccessor, makeVftSkillFileAccessor, makeVftSkillFileAccessorScoped, packRules, PER_EXTENSION_OPERATION_NAMES, registryNativeSkillDisplayRoot, registryPackDisplayRoot, skillRules, workspaceRules, type BuildInstalledPackInfoArgs, type BuildInstalledSkillInfoExternalArgs, type BuildInstalledSkillInfoNativeArgs, type BuildWorkspaceRuleContextArgs, type InstalledPackInfo, type InstalledSkillInfo, type PackAccessorPlatform, type PackIndexView, type PackVFTNode, type PerExtensionOperationName, type PlatformWorkspaceLintAccessorArgs, type SkillAccessorPlatform, type SkillIndexView, type VFTNode, type WorkspaceAccessorPlatform, type WorkspaceIndex, type WorkspaceIndexView, } from "./catalog/index.js";
|
|
28
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/unstable/lint/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,YAAY,EACV,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,eAAe,EACf,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAGvF,YAAY,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB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,iCAAiC,EACtC,KAAK,6BAA6B,EAClC,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC9B,KAAK,iCAAiC,EACtC,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/unstable/lint/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,YAAY,EACV,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,eAAe,EACf,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAGvF,YAAY,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAKrB,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,eAAe,GACrB,MAAM,UAAU,CAAC;AAMlB,OAAO,EACL,iBAAiB,EACjB,+BAA+B,EAC/B,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,iCAAiC,EACjC,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,SAAS,EACT,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EACvB,UAAU,EACV,cAAc,EACd,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,EACxC,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,EAClC,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC9B,KAAK,iCAAiC,EACtC,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB,MAAM,oBAAoB,CAAC"}
|
|
@@ -31,5 +31,5 @@ export { collectAutofixableEntries, collectRenderedFindings, countFindings, dete
|
|
|
31
31
|
// Phase 3c lands `workspaceRules`). Importing this index triggers each
|
|
32
32
|
// catalog's module-load `registerLintRuleIds(...)` call so
|
|
33
33
|
// `.axm/settings.json` `lint.rules` keys can reference any exported rule id.
|
|
34
|
-
export { allCatalogRuleIds, buildExternalInstalledSkillInfo, buildInstalledPackInfo, buildNativeInstalledSkillInfo, buildPackRuleContexts, buildSkillRuleContexts, buildWorkspaceRuleContext, externalSkillDisplayRoot, isPerExtensionOperationName, makePlatformPackFileAccessor, makePlatformSkillFileAccessor, makePlatformWorkspaceLintAccessor, makeVftPackFileAccessor, makeVftSkillFileAccessor, packRules, PER_EXTENSION_OPERATION_NAMES, registryNativeSkillDisplayRoot, registryPackDisplayRoot, skillRules, workspaceRules, } from "./catalog/index.js";
|
|
34
|
+
export { allCatalogRuleIds, buildExternalInstalledSkillInfo, buildInstalledPackInfo, buildNativeInstalledSkillInfo, buildPackRuleContexts, buildSkillRuleContexts, buildWorkspaceRuleContext, externalSkillDisplayRoot, isPerExtensionOperationName, makePlatformPackFileAccessor, makePlatformSkillFileAccessor, makePlatformWorkspaceLintAccessor, makeVftPackFileAccessor, makeVftSkillFileAccessor, makeVftSkillFileAccessorScoped, packRules, PER_EXTENSION_OPERATION_NAMES, registryNativeSkillDisplayRoot, registryPackDisplayRoot, skillRules, workspaceRules, } from "./catalog/index.js";
|
|
35
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/unstable/lint/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAgBH,yCAAyC;AACzC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAkB,MAAM,eAAe,CAAC;AAqBvF,iBAAiB;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,2BAA2B;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAI3D,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAErB,0EAA0E;AAC1E,wEAAwE;AACxE,2BAA2B;AAC3B,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GAanB,MAAM,UAAU,CAAC;AAElB,0EAA0E;AAC1E,uEAAuE;AACvE,2DAA2D;AAC3D,6EAA6E;AAC7E,OAAO,EACL,iBAAiB,EACjB,+BAA+B,EAC/B,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,iCAAiC,EACjC,uBAAuB,EACvB,wBAAwB,EACxB,SAAS,EACT,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EACvB,UAAU,EACV,cAAc,GAkBf,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/unstable/lint/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAgBH,yCAAyC;AACzC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAkB,MAAM,eAAe,CAAC;AAqBvF,iBAAiB;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,2BAA2B;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAI3D,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAErB,0EAA0E;AAC1E,wEAAwE;AACxE,2BAA2B;AAC3B,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GAanB,MAAM,UAAU,CAAC;AAElB,0EAA0E;AAC1E,uEAAuE;AACvE,2DAA2D;AAC3D,6EAA6E;AAC7E,OAAO,EACL,iBAAiB,EACjB,+BAA+B,EAC/B,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,iCAAiC,EACjC,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,SAAS,EACT,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EACvB,UAAU,EACV,cAAc,GAkBf,MAAM,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentxm/client-core",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "Core library for the axm agent extension manager",
|
|
3
|
+
"version": "0.4.5",
|
|
4
|
+
"description": "Core library for the axm agent extension manager. Unstable and unsupported — use the axm.sh CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"homepage": "https://axm.sh",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/agentxm/axm/issues"
|
|
10
|
+
},
|
|
11
|
+
"author": "AgentXM <hello@agentxm.ai> (https://agentxm.ai)",
|
|
7
12
|
"repository": {
|
|
8
13
|
"type": "git",
|
|
9
14
|
"url": "https://github.com/agentxm/axm.git",
|
|
@@ -11,175 +16,176 @@
|
|
|
11
16
|
},
|
|
12
17
|
"exports": {
|
|
13
18
|
"./unstable/app-error": {
|
|
14
|
-
"types": "./src/unstable/app-error/index.ts",
|
|
19
|
+
"types": "./dist/src/unstable/app-error/index.d.ts",
|
|
15
20
|
"default": "./dist/src/unstable/app-error/index.js"
|
|
16
21
|
},
|
|
17
22
|
"./unstable/prompt-cancelled": {
|
|
18
|
-
"types": "./src/unstable/cli-prompt/prompt-cancelled.ts",
|
|
23
|
+
"types": "./dist/src/unstable/cli-prompt/prompt-cancelled.d.ts",
|
|
19
24
|
"default": "./dist/src/unstable/cli-prompt/prompt-cancelled.js"
|
|
20
25
|
},
|
|
21
26
|
"./unstable/version-constraints": {
|
|
22
|
-
"types": "./src/unstable/version-constraints/version-constraints.ts",
|
|
27
|
+
"types": "./dist/src/unstable/version-constraints/version-constraints.d.ts",
|
|
23
28
|
"default": "./dist/src/unstable/version-constraints/version-constraints.js"
|
|
24
29
|
},
|
|
25
30
|
"./unstable/branding": {
|
|
26
|
-
"types": "./src/unstable/branding.ts",
|
|
31
|
+
"types": "./dist/src/unstable/branding.d.ts",
|
|
27
32
|
"default": "./dist/src/unstable/branding.js"
|
|
28
33
|
},
|
|
29
34
|
"./unstable/date-time": {
|
|
30
|
-
"types": "./src/unstable/date-time.ts",
|
|
35
|
+
"types": "./dist/src/unstable/date-time.d.ts",
|
|
31
36
|
"default": "./dist/src/unstable/date-time.js"
|
|
32
37
|
},
|
|
33
38
|
"./unstable/utils": {
|
|
34
|
-
"types": "./src/unstable/utils/index.ts",
|
|
39
|
+
"types": "./dist/src/unstable/utils/index.d.ts",
|
|
35
40
|
"default": "./dist/src/unstable/utils/index.js"
|
|
36
41
|
},
|
|
37
42
|
"./unstable/agents": {
|
|
38
|
-
"types": "./src/unstable/agents/index.ts",
|
|
43
|
+
"types": "./dist/src/unstable/agents/index.d.ts",
|
|
39
44
|
"default": "./dist/src/unstable/agents/index.js"
|
|
40
45
|
},
|
|
41
46
|
"./unstable/extensions": {
|
|
42
|
-
"types": "./src/unstable/extensions/index.ts",
|
|
47
|
+
"types": "./dist/src/unstable/extensions/index.d.ts",
|
|
43
48
|
"default": "./dist/src/unstable/extensions/index.js"
|
|
44
49
|
},
|
|
45
50
|
"./unstable/extensions/common": {
|
|
46
|
-
"types": "./src/unstable/extensions/common.ts",
|
|
51
|
+
"types": "./dist/src/unstable/extensions/common.d.ts",
|
|
47
52
|
"default": "./dist/src/unstable/extensions/common.js"
|
|
48
53
|
},
|
|
49
54
|
"./unstable/extensions/fqn": {
|
|
50
|
-
"types": "./src/unstable/extensions/fqn.ts",
|
|
55
|
+
"types": "./dist/src/unstable/extensions/fqn.d.ts",
|
|
51
56
|
"default": "./dist/src/unstable/extensions/fqn.js"
|
|
52
57
|
},
|
|
53
58
|
"./unstable/extensions/handle": {
|
|
54
|
-
"types": "./src/unstable/extensions/handle.ts",
|
|
59
|
+
"types": "./dist/src/unstable/extensions/handle.d.ts",
|
|
55
60
|
"default": "./dist/src/unstable/extensions/handle.js"
|
|
56
61
|
},
|
|
57
62
|
"./unstable/extensions/registry-source": {
|
|
58
|
-
"types": "./src/unstable/extensions/registry-source.ts",
|
|
63
|
+
"types": "./dist/src/unstable/extensions/registry-source.d.ts",
|
|
59
64
|
"default": "./dist/src/unstable/extensions/registry-source.js"
|
|
60
65
|
},
|
|
61
66
|
"./unstable/lockfile": {
|
|
62
|
-
"types": "./src/unstable/lockfile/index.ts",
|
|
67
|
+
"types": "./dist/src/unstable/lockfile/index.d.ts",
|
|
63
68
|
"default": "./dist/src/unstable/lockfile/index.js"
|
|
64
69
|
},
|
|
65
70
|
"./unstable/schema": {
|
|
66
|
-
"types": "./src/unstable/schema/index.ts",
|
|
71
|
+
"types": "./dist/src/unstable/schema/index.d.ts",
|
|
67
72
|
"default": "./dist/src/unstable/schema/index.js"
|
|
68
73
|
},
|
|
69
74
|
"./unstable/settings": {
|
|
70
|
-
"types": "./src/unstable/settings/index.ts",
|
|
75
|
+
"types": "./dist/src/unstable/settings/index.d.ts",
|
|
71
76
|
"default": "./dist/src/unstable/settings/index.js"
|
|
72
77
|
},
|
|
73
78
|
"./unstable/sources": {
|
|
74
|
-
"types": "./src/unstable/sources/index.ts",
|
|
79
|
+
"types": "./dist/src/unstable/sources/index.d.ts",
|
|
75
80
|
"default": "./dist/src/unstable/sources/index.js"
|
|
76
81
|
},
|
|
77
82
|
"./unstable/cli-flags": {
|
|
78
|
-
"types": "./src/unstable/cli-flags/index.ts",
|
|
83
|
+
"types": "./dist/src/unstable/cli-flags/index.d.ts",
|
|
79
84
|
"default": "./dist/src/unstable/cli-flags/index.js"
|
|
80
85
|
},
|
|
81
86
|
"./unstable/cli-runtime": {
|
|
82
|
-
"types": "./src/unstable/cli-runtime/index.ts",
|
|
87
|
+
"types": "./dist/src/unstable/cli-runtime/index.d.ts",
|
|
83
88
|
"default": "./dist/src/unstable/cli-runtime/index.js"
|
|
84
89
|
},
|
|
85
90
|
"./unstable/telemetry": {
|
|
86
|
-
"types": "./src/unstable/telemetry/index.ts",
|
|
91
|
+
"types": "./dist/src/unstable/telemetry/index.d.ts",
|
|
87
92
|
"default": "./dist/src/unstable/telemetry/index.js"
|
|
88
93
|
},
|
|
89
94
|
"./unstable/cli-renderer": {
|
|
90
|
-
"types": "./src/unstable/cli-renderer/index.ts",
|
|
95
|
+
"types": "./dist/src/unstable/cli-renderer/index.d.ts",
|
|
91
96
|
"default": "./dist/src/unstable/cli-renderer/index.js"
|
|
92
97
|
},
|
|
93
98
|
"./unstable/git": {
|
|
94
|
-
"types": "./src/unstable/git/index.ts",
|
|
99
|
+
"types": "./dist/src/unstable/git/index.d.ts",
|
|
95
100
|
"default": "./dist/src/unstable/git/index.js"
|
|
96
101
|
},
|
|
97
102
|
"./unstable/registry": {
|
|
98
|
-
"types": "./src/unstable/registry/index.ts",
|
|
103
|
+
"types": "./dist/src/unstable/registry/index.d.ts",
|
|
99
104
|
"default": "./dist/src/unstable/registry/index.js"
|
|
100
105
|
},
|
|
101
106
|
"./unstable/auth": {
|
|
102
|
-
"types": "./src/unstable/auth/index.ts",
|
|
107
|
+
"types": "./dist/src/unstable/auth/index.d.ts",
|
|
103
108
|
"default": "./dist/src/unstable/auth/index.js"
|
|
104
109
|
},
|
|
105
110
|
"./unstable/plan": {
|
|
106
|
-
"types": "./src/unstable/plan/index.ts",
|
|
111
|
+
"types": "./dist/src/unstable/plan/index.d.ts",
|
|
107
112
|
"default": "./dist/src/unstable/plan/index.js"
|
|
108
113
|
},
|
|
109
114
|
"./unstable/lint": {
|
|
110
|
-
"types": "./src/unstable/lint/index.ts",
|
|
115
|
+
"types": "./dist/src/unstable/lint/index.d.ts",
|
|
111
116
|
"default": "./dist/src/unstable/lint/index.js"
|
|
112
117
|
},
|
|
113
118
|
"./unstable/workspace": {
|
|
114
|
-
"types": "./src/unstable/workspace/index.ts",
|
|
119
|
+
"types": "./dist/src/unstable/workspace/index.d.ts",
|
|
115
120
|
"default": "./dist/src/unstable/workspace/index.js"
|
|
116
121
|
},
|
|
117
122
|
"./unstable/source-resolution": {
|
|
118
|
-
"types": "./src/unstable/source-resolution/index.ts",
|
|
123
|
+
"types": "./dist/src/unstable/source-resolution/index.d.ts",
|
|
119
124
|
"default": "./dist/src/unstable/source-resolution/index.js"
|
|
120
125
|
},
|
|
121
126
|
"./unstable/skills": {
|
|
122
|
-
"types": "./src/unstable/skills/index.ts",
|
|
127
|
+
"types": "./dist/src/unstable/skills/index.d.ts",
|
|
123
128
|
"default": "./dist/src/unstable/skills/index.js"
|
|
124
129
|
},
|
|
125
130
|
"./unstable/packs": {
|
|
126
|
-
"types": "./src/unstable/packs/index.ts",
|
|
131
|
+
"types": "./dist/src/unstable/packs/index.d.ts",
|
|
127
132
|
"default": "./dist/src/unstable/packs/index.js"
|
|
128
133
|
},
|
|
129
134
|
"./unstable/commands": {
|
|
130
|
-
"types": "./src/unstable/commands/index.ts",
|
|
135
|
+
"types": "./dist/src/unstable/commands/index.d.ts",
|
|
131
136
|
"default": "./dist/src/unstable/commands/index.js"
|
|
132
137
|
},
|
|
133
138
|
"./unstable/mcp-servers": {
|
|
134
|
-
"types": "./src/unstable/mcp-servers/index.ts",
|
|
139
|
+
"types": "./dist/src/unstable/mcp-servers/index.d.ts",
|
|
135
140
|
"default": "./dist/src/unstable/mcp-servers/index.js"
|
|
136
141
|
},
|
|
137
142
|
"./unstable/workflows": {
|
|
138
|
-
"types": "./src/unstable/workflows/index.ts",
|
|
143
|
+
"types": "./dist/src/unstable/workflows/index.d.ts",
|
|
139
144
|
"default": "./dist/src/unstable/workflows/index.js"
|
|
140
145
|
},
|
|
141
146
|
"./unstable/publish": {
|
|
142
|
-
"types": "./src/unstable/publish/index.ts",
|
|
147
|
+
"types": "./dist/src/unstable/publish/index.d.ts",
|
|
143
148
|
"default": "./dist/src/unstable/publish/index.js"
|
|
144
149
|
},
|
|
145
150
|
"./unstable/site-content/schemas/*": "./site-content/__generated__/schemas/*",
|
|
146
151
|
"./unstable/site-content/*": "./site-content/*",
|
|
147
152
|
"./unstable/install-method": {
|
|
148
|
-
"types": "./src/unstable/install-method/install-method.ts",
|
|
153
|
+
"types": "./dist/src/unstable/install-method/install-method.d.ts",
|
|
149
154
|
"default": "./dist/src/unstable/install-method/install-method.js"
|
|
150
155
|
},
|
|
151
156
|
"./unstable/install-meta": {
|
|
152
|
-
"types": "./src/unstable/install-meta/install-meta.ts",
|
|
157
|
+
"types": "./dist/src/unstable/install-meta/install-meta.d.ts",
|
|
153
158
|
"default": "./dist/src/unstable/install-meta/install-meta.js"
|
|
154
159
|
},
|
|
155
160
|
"./unstable/update-check": {
|
|
156
|
-
"types": "./src/unstable/update-check/update-check.ts",
|
|
161
|
+
"types": "./dist/src/unstable/update-check/update-check.d.ts",
|
|
157
162
|
"default": "./dist/src/unstable/update-check/update-check.js"
|
|
158
163
|
},
|
|
159
164
|
"./unstable/version-resolution": {
|
|
160
|
-
"types": "./src/unstable/version-resolution/version-resolution.ts",
|
|
165
|
+
"types": "./dist/src/unstable/version-resolution/version-resolution.d.ts",
|
|
161
166
|
"default": "./dist/src/unstable/version-resolution/version-resolution.js"
|
|
162
167
|
},
|
|
163
168
|
"./unstable/packaging": {
|
|
164
|
-
"types": "./src/unstable/packaging/index.ts",
|
|
169
|
+
"types": "./dist/src/unstable/packaging/index.d.ts",
|
|
165
170
|
"default": "./dist/src/unstable/packaging/index.js"
|
|
166
171
|
},
|
|
167
172
|
"./unstable/discover": {
|
|
168
|
-
"types": "./src/unstable/discover/index.ts",
|
|
173
|
+
"types": "./dist/src/unstable/discover/index.d.ts",
|
|
169
174
|
"default": "./dist/src/unstable/discover/index.js"
|
|
170
175
|
},
|
|
171
176
|
"./unstable/subagents": {
|
|
172
|
-
"types": "./src/unstable/subagents/index.ts",
|
|
177
|
+
"types": "./dist/src/unstable/subagents/index.d.ts",
|
|
173
178
|
"default": "./dist/src/unstable/subagents/index.js"
|
|
174
179
|
},
|
|
175
180
|
"./unstable/cli/prompt": {
|
|
176
|
-
"types": "./src/unstable/cli/prompt/index.ts",
|
|
181
|
+
"types": "./dist/src/unstable/cli/prompt/index.d.ts",
|
|
177
182
|
"default": "./dist/src/unstable/cli/prompt/index.js"
|
|
178
183
|
}
|
|
179
184
|
},
|
|
180
185
|
"files": [
|
|
181
186
|
"dist/src/",
|
|
182
|
-
"site-content/"
|
|
187
|
+
"site-content/",
|
|
188
|
+
"!**/*.map"
|
|
183
189
|
],
|
|
184
190
|
"publishConfig": {
|
|
185
191
|
"access": "public"
|
|
@@ -209,6 +215,6 @@
|
|
|
209
215
|
"typescript": "^5.9.3",
|
|
210
216
|
"vitest": "^4.0.0",
|
|
211
217
|
"yaml": "^2.8.2",
|
|
212
|
-
"@agentxm/client-utils": "0.4.
|
|
218
|
+
"@agentxm/client-utils": "^0.4.5"
|
|
213
219
|
}
|
|
214
220
|
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
setlocal
|
|
3
|
+
|
|
4
|
+
rem Install script for axm - the extension manager for AI coding agents.
|
|
5
|
+
rem Usage: curl -fsSL -o install.cmd https://axm.sh/install.cmd && install.cmd
|
|
6
|
+
|
|
7
|
+
if defined AXM_INSTALL_BASE_URL (
|
|
8
|
+
set "BINARY_URL=%AXM_INSTALL_BASE_URL%/axm-windows-x64.exe"
|
|
9
|
+
) else (
|
|
10
|
+
set "BINARY_URL=https://github.com/agentxm/axm/releases/latest/download/axm-windows-x64.exe"
|
|
11
|
+
)
|
|
12
|
+
set "INSTALL_DIR=%LOCALAPPDATA%\axm"
|
|
13
|
+
set "INSTALL_PATH=%INSTALL_DIR%\axm.exe"
|
|
14
|
+
|
|
15
|
+
call :check_curl
|
|
16
|
+
call :install_axm
|
|
17
|
+
call :verify
|
|
18
|
+
goto :eof
|
|
19
|
+
|
|
20
|
+
:check_curl
|
|
21
|
+
where curl >nul 2>&1
|
|
22
|
+
if %errorlevel% neq 0 (
|
|
23
|
+
echo Error: curl is required but not found.
|
|
24
|
+
echo curl is included with Windows 10 and later.
|
|
25
|
+
echo.
|
|
26
|
+
echo If you are on an older version of Windows, use the PowerShell installer instead:
|
|
27
|
+
echo irm https://axm.sh/install.ps1 ^| iex
|
|
28
|
+
exit /b 1
|
|
29
|
+
)
|
|
30
|
+
goto :eof
|
|
31
|
+
|
|
32
|
+
:install_axm
|
|
33
|
+
echo Installing axm...
|
|
34
|
+
|
|
35
|
+
if not exist "%INSTALL_DIR%" (
|
|
36
|
+
mkdir "%INSTALL_DIR%"
|
|
37
|
+
if %errorlevel% neq 0 (
|
|
38
|
+
echo Error: Failed to create install directory: %INSTALL_DIR%
|
|
39
|
+
exit /b 1
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
curl -fsSL -o "%INSTALL_PATH%" "%BINARY_URL%"
|
|
44
|
+
if %errorlevel% neq 0 (
|
|
45
|
+
echo Error: Failed to download axm binary.
|
|
46
|
+
echo URL: %BINARY_URL%
|
|
47
|
+
exit /b 1
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
rem Write install metadata
|
|
51
|
+
set "META_FILE=%INSTALL_DIR%\install-meta.json"
|
|
52
|
+
for /f %%i in ('powershell -NoProfile -Command "[DateTime]::UtcNow.ToString(\"yyyy-MM-dd'T'HH:mm:ss'Z'\")"') do set "TIMESTAMP=%%i"
|
|
53
|
+
if %errorlevel% neq 0 (
|
|
54
|
+
echo Error: Failed to generate install timestamp.
|
|
55
|
+
exit /b 1
|
|
56
|
+
)
|
|
57
|
+
echo {"method": "script", "installedAt": "%TIMESTAMP%"}>"%META_FILE%"
|
|
58
|
+
goto :eof
|
|
59
|
+
|
|
60
|
+
:verify
|
|
61
|
+
where axm >nul 2>&1
|
|
62
|
+
if %errorlevel% neq 0 (
|
|
63
|
+
echo.
|
|
64
|
+
echo axm was installed to %INSTALL_PATH%
|
|
65
|
+
echo but is not on your PATH.
|
|
66
|
+
echo.
|
|
67
|
+
echo To add it, run:
|
|
68
|
+
echo setx PATH "%%PATH%%;%INSTALL_DIR%"
|
|
69
|
+
echo.
|
|
70
|
+
echo Then open a new terminal and run:
|
|
71
|
+
echo axm --version
|
|
72
|
+
echo.
|
|
73
|
+
goto :eof
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
echo.
|
|
77
|
+
axm --version
|
|
78
|
+
echo.
|
|
79
|
+
echo Done! Run 'axm auth login' to authenticate.
|
|
80
|
+
goto :eof
|
package/site-content/install.md
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
# Install axm
|
|
2
2
|
|
|
3
|
-
**DONE WHEN:** `axm --version
|
|
3
|
+
**DONE WHEN:** `axm --version` succeeds and (if the user chose workspace setup)
|
|
4
|
+
`axm setup` has completed.
|
|
4
5
|
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
## TODO
|
|
8
9
|
|
|
9
|
-
- [ ]
|
|
10
|
-
- [ ]
|
|
11
|
-
|
|
10
|
+
- [ ] Detect existing install (`axm --version`)
|
|
11
|
+
- [ ] If installed: `axm upgrade`. Otherwise: detect available package
|
|
12
|
+
managers (brew, npm) and pick the install method
|
|
13
|
+
- [ ] If multiple install methods are available: ask the user which to use
|
|
14
|
+
- [ ] Run the chosen installer
|
|
15
|
+
- [ ] Verify `axm --version`
|
|
16
|
+
- [ ] Check sign-in state with `axm whoami --json`
|
|
17
|
+
- [ ] If not signed in: ask the user to choose between signing in to
|
|
18
|
+
AgentXM.ai or going directly to workspace setup
|
|
19
|
+
- [ ] If the user chose to sign in: hand off signup/login, then re-check
|
|
20
|
+
`axm whoami`
|
|
21
|
+
- [ ] Run `axm setup --yes` to initialize the project workspace
|
|
12
22
|
|
|
13
23
|
---
|
|
14
24
|
|
|
@@ -16,12 +26,118 @@
|
|
|
16
26
|
|
|
17
27
|
axm is the open extension manager for AI coding agents. It lets you discover,
|
|
18
28
|
install, publish, and manage skills, commands, subagents, MCP servers, and
|
|
19
|
-
extension packs across your AI agents from a single CLI.
|
|
29
|
+
extension packs across your AI agents from a single CLI. axm is the CLI;
|
|
30
|
+
[AgentXM.ai](https://agentxm.ai) is the extension registry it connects to —
|
|
31
|
+
accounts, publishing, and extension discovery live there. An AgentXM.ai
|
|
32
|
+
account is only required for publishing extensions or installing private
|
|
33
|
+
extensions; public extensions install without an account.
|
|
20
34
|
|
|
21
|
-
##
|
|
35
|
+
## Detect existing install
|
|
22
36
|
|
|
23
|
-
|
|
24
|
-
|
|
37
|
+
Before installing, check whether axm is already on the machine. This is a
|
|
38
|
+
**probe** — "not installed" is an expected outcome, not a failure. Invoke it
|
|
39
|
+
so the shell exits 0 on either branch and the signal lives in stdout (see
|
|
40
|
+
**Probe commands** under Invariants):
|
|
41
|
+
|
|
42
|
+
On macOS / Linux:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
command -v axm >/dev/null 2>&1 && axm --version || echo "NOT_INSTALLED"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
On Windows (PowerShell):
|
|
49
|
+
|
|
50
|
+
```powershell
|
|
51
|
+
if (Get-Command axm -ErrorAction SilentlyContinue) { axm --version } else { "NOT_INSTALLED" }
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Branch on the output:
|
|
55
|
+
|
|
56
|
+
- **Prints `X.Y.Z`** → axm is installed. Upgrade it to the latest version
|
|
57
|
+
and skip the Install section:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
axm upgrade
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`axm upgrade` auto-detects how axm was installed. For script installs it
|
|
64
|
+
downloads and swaps the binary in place. For Homebrew or npm installs it
|
|
65
|
+
prints the exact command to run (`brew upgrade agentxm/tap/axm` or
|
|
66
|
+
`npm update -g axm.sh`) — run whichever it emits, then re-run the probe
|
|
67
|
+
above. Continue to **Verify** when done.
|
|
68
|
+
|
|
69
|
+
- **Prints `NOT_INSTALLED`** → axm is not installed. Continue to **Install**.
|
|
70
|
+
- **Prints anything else** → treat as not installed and reinstall via the
|
|
71
|
+
Install section.
|
|
72
|
+
|
|
73
|
+
## Choose install method
|
|
74
|
+
|
|
75
|
+
axm can be installed via a standalone binary script, Homebrew, or npm. Pick
|
|
76
|
+
based on what's already on the machine — don't install a new package manager
|
|
77
|
+
just to install axm.
|
|
78
|
+
|
|
79
|
+
### 1. Detect available package managers
|
|
80
|
+
|
|
81
|
+
Check which package managers are installed. A manager is "available" if the
|
|
82
|
+
`--version` command exits successfully.
|
|
83
|
+
|
|
84
|
+
On macOS / Linux:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
brew --version >/dev/null 2>&1 && echo "brew: available"
|
|
88
|
+
npm --version >/dev/null 2>&1 && echo "npm: available"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
On Windows (PowerShell):
|
|
92
|
+
|
|
93
|
+
```powershell
|
|
94
|
+
if (Get-Command brew -ErrorAction SilentlyContinue) { "brew: available" }
|
|
95
|
+
if (Get-Command npm -ErrorAction SilentlyContinue) { "npm: available" }
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 2. Pick the method
|
|
99
|
+
|
|
100
|
+
Use this decision table — same logic on every platform:
|
|
101
|
+
|
|
102
|
+
| Detected managers | Chosen method |
|
|
103
|
+
| ------------------------------ | ------------------------------------------------------------- |
|
|
104
|
+
| Neither | Install script (Option A on macOS/Linux, Option B on Windows) |
|
|
105
|
+
| Homebrew only | Homebrew (Option D) |
|
|
106
|
+
| npm only | npm (Option E) |
|
|
107
|
+
| Homebrew and npm (two or more) | **STOP AND ASK** the user — see the prompt below |
|
|
108
|
+
|
|
109
|
+
The install script is always a valid fallback. If a package-manager install
|
|
110
|
+
fails, retry with Option A or B.
|
|
111
|
+
|
|
112
|
+
### 3. Ask the user when multiple managers are available
|
|
113
|
+
|
|
114
|
+
All three options install the same axm binary. **The main difference is how
|
|
115
|
+
you'll update it later.** Frame the choice that way when asking.
|
|
116
|
+
|
|
117
|
+
**STOP HERE AND ASK THE USER:**
|
|
118
|
+
|
|
119
|
+
> Multiple install methods are available on this machine. The main
|
|
120
|
+
> difference is how you'll update axm later — pick the update path that
|
|
121
|
+
> matches how you manage other tools.
|
|
122
|
+
>
|
|
123
|
+
> 1. **Install script** (recommended) — Updates via `axm upgrade`
|
|
124
|
+
> (self-managed, independent of any package manager). Standalone binary
|
|
125
|
+
> installed to `~/.axm/bin` (macOS/Linux) or `%LOCALAPPDATA%\axm`
|
|
126
|
+
> (Windows). No extra tools required.
|
|
127
|
+
> 2. **Homebrew** — Updates via `brew upgrade agentxm/tap/axm`, alongside
|
|
128
|
+
> your other brew packages. Choose this if you already manage most CLIs
|
|
129
|
+
> with brew.
|
|
130
|
+
> 3. **npm** — Updates via `npm update -g axm.sh`, alongside your other
|
|
131
|
+
> global npm packages. Choose this if axm is part of a Node.js-heavy
|
|
132
|
+
> environment. Requires Node.js.
|
|
133
|
+
|
|
134
|
+
Wait for the user's response before continuing. Then run the corresponding
|
|
135
|
+
option below.
|
|
136
|
+
|
|
137
|
+
## Install
|
|
138
|
+
|
|
139
|
+
Each option below installs a persistent `axm` binary on the machine. Run the
|
|
140
|
+
option selected in **Choose install method**.
|
|
25
141
|
|
|
26
142
|
### Option A: macOS / Linux (install script)
|
|
27
143
|
|
|
@@ -74,67 +190,181 @@ PATH:
|
|
|
74
190
|
export PATH="$(npm config get prefix)/bin:$PATH"
|
|
75
191
|
```
|
|
76
192
|
|
|
77
|
-
|
|
193
|
+
## Verify
|
|
78
194
|
|
|
79
195
|
```bash
|
|
80
196
|
axm --version
|
|
81
197
|
# Expected: X.Y.Z
|
|
82
198
|
```
|
|
83
199
|
|
|
84
|
-
|
|
200
|
+
---
|
|
85
201
|
|
|
86
|
-
|
|
202
|
+
EXECUTE NOW: Run the probe from **Detect existing install** (not bare
|
|
203
|
+
`axm --version` — see **Probe commands** under Invariants). If the output
|
|
204
|
+
is `X.Y.Z`, run `axm upgrade`. If the output is `NOT_INSTALLED`, detect
|
|
205
|
+
available package managers per **Choose install method**, ask the user if
|
|
206
|
+
more than one is available, and run the chosen installer. Stop when the
|
|
207
|
+
probe prints `X.Y.Z`, then proceed to **Check sign-in state**.
|
|
87
208
|
|
|
88
|
-
|
|
209
|
+
---
|
|
89
210
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
211
|
+
## Check sign-in state
|
|
212
|
+
|
|
213
|
+
axm is installed. Before continuing, detect whether this machine is already
|
|
214
|
+
signed in to AgentXM.ai — the result decides whether to ask the user about
|
|
215
|
+
signing in or skip straight to workspace setup. This is a **probe** — "not
|
|
216
|
+
signed in" is an expected outcome, not a failure. Invoke it so the shell
|
|
217
|
+
exits 0 on either branch and the signal lives in stdout (see **Probe
|
|
218
|
+
commands** under Invariants):
|
|
93
219
|
|
|
94
|
-
|
|
95
|
-
extract a reusable token:
|
|
220
|
+
On macOS / Linux:
|
|
96
221
|
|
|
97
222
|
```bash
|
|
98
|
-
|
|
223
|
+
axm whoami --json 2>/dev/null || echo '{"type":"error","code":"AUTH_LOGIN_REQUIRED"}'
|
|
99
224
|
```
|
|
100
225
|
|
|
101
|
-
|
|
226
|
+
On Windows (PowerShell):
|
|
102
227
|
|
|
103
|
-
```
|
|
104
|
-
axm
|
|
228
|
+
```powershell
|
|
229
|
+
try { axm whoami --json } catch { '{"type":"error","code":"AUTH_LOGIN_REQUIRED"}' }
|
|
105
230
|
```
|
|
106
231
|
|
|
107
|
-
|
|
232
|
+
Branch on the JSON `type` field in stdout:
|
|
108
233
|
|
|
109
|
-
|
|
234
|
+
- **`type` is not `"error"`** (identity payload) → already signed in. Skip
|
|
235
|
+
to **Workspace setup**.
|
|
236
|
+
- **`type` is `"error"`** (typically with `code` = `AUTH_LOGIN_REQUIRED`) →
|
|
237
|
+
not signed in. Continue to **Ask the user what to do next**.
|
|
110
238
|
|
|
111
|
-
|
|
112
|
-
axm whoami
|
|
113
|
-
# Expected: displays your handle and account
|
|
114
|
-
```
|
|
239
|
+
## Ask the user what to do next
|
|
115
240
|
|
|
116
|
-
|
|
241
|
+
This machine is not signed in to AgentXM.ai.
|
|
242
|
+
|
|
243
|
+
Before asking, tell the user why the choice matters: signing in is only
|
|
244
|
+
needed to publish extensions or install private extensions, so the workspace
|
|
245
|
+
can still be set up without it. The choice is about whether to do that
|
|
246
|
+
sign-in now or defer it.
|
|
247
|
+
|
|
248
|
+
**STOP HERE AND ASK THE USER:**
|
|
249
|
+
|
|
250
|
+
> axm is installed. Before setting up the project workspace, would you like
|
|
251
|
+
> to sign in to AgentXM.ai? Signing in is only needed if you plan to
|
|
252
|
+
> publish extensions or install private extensions — public extensions
|
|
253
|
+
> install without an account.
|
|
254
|
+
>
|
|
255
|
+
> 1. **Sign up or log in to AgentXM.ai** (recommended if you plan to
|
|
256
|
+
> publish extensions or install private extensions)
|
|
257
|
+
> 2. **Proceed to setting up your project workspace** (you can sign in
|
|
258
|
+
> later with `axm login`)
|
|
259
|
+
|
|
260
|
+
Wait for the user's response before continuing.
|
|
117
261
|
|
|
118
|
-
|
|
119
|
-
|
|
262
|
+
- **Option 1** → continue with **Sign up or log in to AgentXM.ai** below,
|
|
263
|
+
then **Workspace setup**.
|
|
264
|
+
- **Option 2** → skip to **Workspace setup**.
|
|
120
265
|
|
|
121
266
|
---
|
|
122
267
|
|
|
123
|
-
##
|
|
268
|
+
## Sign up or log in to AgentXM.ai
|
|
124
269
|
|
|
125
|
-
|
|
270
|
+
AgentXM.ai is the extension registry that axm connects to. Accounts live on
|
|
271
|
+
AgentXM.ai, not in the CLI — `axm login` signs this machine in to an
|
|
272
|
+
AgentXM.ai account.
|
|
273
|
+
|
|
274
|
+
### If the user does not have an AgentXM.ai account
|
|
275
|
+
|
|
276
|
+
You cannot create an account for the user. Hand off:
|
|
277
|
+
|
|
278
|
+
1. Tell the user to open https://agentxm.ai/signup and create an account —
|
|
279
|
+
explain that this sets up the AgentXM.ai account that `axm login` will
|
|
280
|
+
later authenticate against, and that axm can't create the account
|
|
281
|
+
because signup happens through the web.
|
|
282
|
+
2. Wait for the user to confirm signup is complete.
|
|
283
|
+
3. Continue to **Log in** below.
|
|
284
|
+
|
|
285
|
+
### Log in
|
|
286
|
+
|
|
287
|
+
Explain to the user what logging in will do before handing off: it proves
|
|
288
|
+
to AgentXM.ai that this machine belongs to their account, and stores a
|
|
289
|
+
local token so subsequent `axm` commands can reach the registry.
|
|
290
|
+
|
|
291
|
+
Offer both paths and let the user pick:
|
|
292
|
+
|
|
293
|
+
- **Interactive (recommended):** ask the user to run `axm login` in their
|
|
294
|
+
terminal. Tell them this opens a browser for a one-time OAuth device
|
|
295
|
+
flow; axm can't run it on their behalf because the browser step requires
|
|
296
|
+
them to be present.
|
|
297
|
+
- **Non-interactive:** ask the user to export `AXM_TOKEN` in the
|
|
298
|
+
environment where axm will run. Explain that `AXM_TOKEN` is a
|
|
299
|
+
pre-generated credential that skips the browser step; you must not
|
|
300
|
+
paste a token the user has not shared with you.
|
|
301
|
+
|
|
302
|
+
Wait for the user to confirm sign-in is complete. Tell them you're about to
|
|
303
|
+
re-run the sign-in probe to verify the sign-in succeeded before moving on.
|
|
304
|
+
Use the same wrapper form as **Check sign-in state** so an unfinished
|
|
305
|
+
sign-in doesn't surface as a tool error:
|
|
126
306
|
|
|
127
307
|
```bash
|
|
128
|
-
|
|
129
|
-
|
|
308
|
+
axm whoami --json 2>/dev/null || echo '{"type":"error","code":"AUTH_LOGIN_REQUIRED"}'
|
|
309
|
+
```
|
|
130
310
|
|
|
131
|
-
|
|
132
|
-
|
|
311
|
+
If the JSON `type` is not `"error"` (identity payload), continue to
|
|
312
|
+
**Workspace setup**. If `type` is `"error"`, the sign-in did not complete —
|
|
313
|
+
explain which check failed and ask the user to retry the same path or
|
|
314
|
+
switch paths.
|
|
133
315
|
|
|
134
|
-
|
|
135
|
-
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Workspace setup
|
|
319
|
+
|
|
320
|
+
Before running the command, tell the user what it will do to their project:
|
|
321
|
+
create `.axm/` configuration files, install default extensions (including
|
|
322
|
+
`@agentxm/skills/axm`), and register agent discovery symlinks in the
|
|
323
|
+
current working directory.
|
|
324
|
+
|
|
325
|
+
Run:
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
axm setup --yes
|
|
136
329
|
```
|
|
137
330
|
|
|
331
|
+
Once it succeeds, consult the installed `@agentxm/skills/axm` skill for
|
|
332
|
+
day-to-day operations — workspace scenarios (greenfield, brownfield,
|
|
333
|
+
unmanaged skills), extension management, and publishing.
|
|
334
|
+
|
|
335
|
+
## Invariants
|
|
336
|
+
|
|
337
|
+
- **Probe commands exit 0.** `axm --version` and `axm whoami --json` have
|
|
338
|
+
expected non-zero exit paths ("not installed", "not signed in") that are
|
|
339
|
+
part of the flow, not failures. Always invoke them using the wrappers in
|
|
340
|
+
**Detect existing install** and **Check sign-in state** so the shell
|
|
341
|
+
exits 0 on either branch and the signal lives in stdout; branch on the
|
|
342
|
+
output, not the exit code. Bare invocations surface expected non-zero
|
|
343
|
+
exits as tool errors in the agent's transcript, which is jarring and
|
|
344
|
+
implies something went wrong.
|
|
345
|
+
- **Explain why you're asking.** Whenever you need the user's consent, input,
|
|
346
|
+
or out-of-band action — picking an install method, running `axm login`,
|
|
347
|
+
opening a signup URL, approving a command you'd otherwise run yourself —
|
|
348
|
+
state the purpose first: what you're about to do, why it's needed for
|
|
349
|
+
this install, and what the user should do next. No yes/no prompts without
|
|
350
|
+
context; no command handoffs without explaining the effect.
|
|
351
|
+
- **Never** run `axm login` without explicit user consent. The device flow
|
|
352
|
+
opens a browser and requires the user to be present. When requesting
|
|
353
|
+
consent, tell the user that `axm login` will open a browser, complete an
|
|
354
|
+
OAuth device flow with AgentXM.ai, and store a local token so axm can
|
|
355
|
+
talk to the registry on their behalf.
|
|
356
|
+
- **Never** set or paste an `AXM_TOKEN` the user has not shared. If the
|
|
357
|
+
user is providing a token, explain that it authenticates the CLI against
|
|
358
|
+
the user's AgentXM.ai account for the current shell session.
|
|
359
|
+
- **Always** re-run `axm whoami` after any user-driven sign-in step before
|
|
360
|
+
running `axm setup`. Tell the user you're verifying the sign-in succeeded
|
|
361
|
+
before moving on.
|
|
362
|
+
- **Resume, do not restart.** If the user completes sign-in out-of-band and
|
|
363
|
+
returns, skip to **Workspace setup** — do not re-ask which option they
|
|
364
|
+
picked.
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
138
368
|
## Troubleshooting
|
|
139
369
|
|
|
140
370
|
**`axm: command not found`**
|
|
@@ -157,26 +387,3 @@ The fix depends on how you installed:
|
|
|
157
387
|
```bash
|
|
158
388
|
export PATH="$(npm config get prefix)/bin:$PATH"
|
|
159
389
|
```
|
|
160
|
-
|
|
161
|
-
**Not authenticated / `AUTH_LOGIN_REQUIRED`**
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
axm auth login
|
|
165
|
-
# Or for non-interactive: export AXM_TOKEN=<token>
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
**Wrong account**
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
axm auth logout && axm auth login
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
**Registry unreachable**
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
# Check connectivity to the default registry
|
|
178
|
-
curl -sf https://registry.agentxm.ai/v1/health || echo "Registry unreachable"
|
|
179
|
-
# Or override the built-in default source for development/testing:
|
|
180
|
-
export AXM_REGISTRY_LOCATION=http://localhost:4300
|
|
181
|
-
# AXM_REGISTRY_LOCATION may also be a file path or file:// URL
|
|
182
|
-
```
|