@agentxm/client-core 0.6.2 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/unstable/install-meta/install-meta.d.ts +1 -1
- package/dist/src/unstable/install-meta/install-meta.js +1 -1
- package/dist/src/unstable/install-method/install-method.d.ts +1 -4
- package/dist/src/unstable/install-method/install-method.d.ts.map +1 -1
- package/dist/src/unstable/install-method/install-method.js +29 -24
- package/dist/src/unstable/install-method/install-method.js.map +1 -1
- package/dist/src/unstable/update-check/update-check.d.ts.map +1 -1
- package/dist/src/unstable/update-check/update-check.js +1 -11
- package/dist/src/unstable/update-check/update-check.js.map +1 -1
- package/dist/src/unstable/utils/environment.d.ts +3 -3
- package/dist/src/unstable/utils/environment.d.ts.map +1 -1
- package/dist/src/unstable/utils/environment.js +7 -9
- package/dist/src/unstable/utils/environment.js.map +1 -1
- package/package.json +2 -2
- package/site-content/docs/quickstart.md +4 -4
- package/site-content/install.cmd +2 -2
- package/site-content/install.md +122 -286
- package/site-content/install.ps1 +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* InstallMeta service — reads and writes `install-meta.json`.
|
|
3
3
|
*
|
|
4
4
|
* The metadata file lives at `~/.axm/install-meta.json` (Unix)
|
|
5
|
-
* or `%
|
|
5
|
+
* or `%USERPROFILE%\.axm\install-meta.json` (Windows).
|
|
6
6
|
*
|
|
7
7
|
* @experimental This API is unstable and may change without notice.
|
|
8
8
|
* @packageDocumentation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* InstallMeta service — reads and writes `install-meta.json`.
|
|
3
3
|
*
|
|
4
4
|
* The metadata file lives at `~/.axm/install-meta.json` (Unix)
|
|
5
|
-
* or `%
|
|
5
|
+
* or `%USERPROFILE%\.axm\install-meta.json` (Windows).
|
|
6
6
|
*
|
|
7
7
|
* @experimental This API is unstable and may change without notice.
|
|
8
8
|
* @packageDocumentation
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
import * as Effect from "effect/Effect";
|
|
11
11
|
import * as FileSystem from "effect/FileSystem";
|
|
12
12
|
import * as Layer from "effect/Layer";
|
|
13
|
-
import * as Option from "effect/Option";
|
|
14
13
|
import * as Path from "effect/Path";
|
|
15
14
|
import * as Schema from "effect/Schema";
|
|
16
15
|
import * as ServiceMap from "effect/Context";
|
|
17
16
|
declare const Script_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly<A> & {
|
|
18
17
|
readonly _tag: "Script";
|
|
19
18
|
} & import("effect/Pipeable").Pipeable;
|
|
20
|
-
/** Installed via the install script (~/.axm/bin/ or %
|
|
19
|
+
/** Installed via the install script (~/.axm/bin/ or %USERPROFILE%\.axm\bin\). */
|
|
21
20
|
export declare class Script extends Script_base<{
|
|
22
21
|
readonly execPath: string;
|
|
23
22
|
}> {
|
|
@@ -67,8 +66,6 @@ export interface InstallMethodInputs {
|
|
|
67
66
|
readonly execPath: string;
|
|
68
67
|
readonly importMetaUrl: string;
|
|
69
68
|
readonly homeDir: string;
|
|
70
|
-
readonly platform: string;
|
|
71
|
-
readonly localAppData: Option.Option<string>;
|
|
72
69
|
}
|
|
73
70
|
/**
|
|
74
71
|
* Detect install method from the given inputs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-method.d.ts","sourceRoot":"","sources":["../../../../src/unstable/install-method/install-method.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"install-method.d.ts","sourceRoot":"","sources":["../../../../src/unstable/install-method/install-method.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAC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,MAAM,iBAAiB,sEA2B7B,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,QAAQ,mBAAmB,yEAe1D,CAAC"}
|
|
@@ -15,11 +15,11 @@ import * as Option from "effect/Option";
|
|
|
15
15
|
import * as Path from "effect/Path";
|
|
16
16
|
import * as Schema from "effect/Schema";
|
|
17
17
|
import * as ServiceMap from "effect/Context";
|
|
18
|
-
import { resolveAxmDataDirPure } from "../utils/index.js";
|
|
18
|
+
import { envOption, resolveAxmDataDirPure } from "../utils/index.js";
|
|
19
19
|
// -----------------------------------------------------------------------------
|
|
20
20
|
// Tagged union type
|
|
21
21
|
// -----------------------------------------------------------------------------
|
|
22
|
-
/** Installed via the install script (~/.axm/bin/ or %
|
|
22
|
+
/** Installed via the install script (~/.axm/bin/ or %USERPROFILE%\.axm\bin\). */
|
|
23
23
|
export class Script extends Data.TaggedClass("Script") {
|
|
24
24
|
}
|
|
25
25
|
/** Installed via Homebrew (/Cellar/ in realpath of execPath). */
|
|
@@ -65,18 +65,11 @@ export class InstallMethod extends ServiceMap.Service()("@agentxm/client-core/un
|
|
|
65
65
|
// -----------------------------------------------------------------------------
|
|
66
66
|
const isScriptInstall = (inputs) => {
|
|
67
67
|
const normalized = inputs.execPath.replace(/\\/g, "/");
|
|
68
|
-
//
|
|
69
|
-
const
|
|
70
|
-
if (normalized.startsWith(
|
|
68
|
+
// Script installer: ~/.axm/bin/ on Unix, %USERPROFILE%\.axm\bin\ on Windows.
|
|
69
|
+
const scriptPattern = `${inputs.homeDir.replace(/\\/g, "/")}/.axm/bin/`;
|
|
70
|
+
if (normalized.startsWith(scriptPattern)) {
|
|
71
71
|
return Option.some(new Script({ execPath: inputs.execPath }));
|
|
72
72
|
}
|
|
73
|
-
// Windows: %LOCALAPPDATA%\axm\
|
|
74
|
-
if (Option.isSome(inputs.localAppData)) {
|
|
75
|
-
const winPattern = `${inputs.localAppData.value.replace(/\\/g, "/")}/axm/`;
|
|
76
|
-
if (normalized.startsWith(winPattern)) {
|
|
77
|
-
return Option.some(new Script({ execPath: inputs.execPath }));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
73
|
return Option.none();
|
|
81
74
|
};
|
|
82
75
|
const isHomebrewInstall = (realExecPath) => {
|
|
@@ -113,7 +106,7 @@ const metaMethodToType = (method, inputs) => {
|
|
|
113
106
|
export const detectFromInputs = (inputs) => Effect.gen(function* () {
|
|
114
107
|
const fs = yield* FileSystem.FileSystem;
|
|
115
108
|
const path = yield* Path.Path;
|
|
116
|
-
// Priority 1: Script install (exec path in ~/.axm/bin/
|
|
109
|
+
// Priority 1: Script install (exec path in ~/.axm/bin/)
|
|
117
110
|
const scriptResult = isScriptInstall(inputs);
|
|
118
111
|
if (Option.isSome(scriptResult))
|
|
119
112
|
return scriptResult.value;
|
|
@@ -129,7 +122,7 @@ export const detectFromInputs = (inputs) => Effect.gen(function* () {
|
|
|
129
122
|
if (Option.isSome(npmResult))
|
|
130
123
|
return npmResult.value;
|
|
131
124
|
// Priority 4: install-meta.json fallback
|
|
132
|
-
const metaDir = resolveAxmDataDirPure(path.join, inputs.
|
|
125
|
+
const metaDir = resolveAxmDataDirPure(path.join, inputs.homeDir);
|
|
133
126
|
const metaPath = path.join(metaDir, "install-meta.json");
|
|
134
127
|
const metaResult = yield* readInstallMeta(fs, metaPath);
|
|
135
128
|
if (Option.isSome(metaResult)) {
|
|
@@ -150,6 +143,24 @@ const readInstallMeta = (fs, metaPath) => Effect.gen(function* () {
|
|
|
150
143
|
return Option.none();
|
|
151
144
|
return Option.some(decoded.value.method);
|
|
152
145
|
});
|
|
146
|
+
const selectHomeDir = (platform, home, userProfile, homePath) => {
|
|
147
|
+
if (platform === "win32") {
|
|
148
|
+
if (Option.isSome(userProfile))
|
|
149
|
+
return userProfile.value;
|
|
150
|
+
if (Option.isSome(home))
|
|
151
|
+
return home.value;
|
|
152
|
+
if (Option.isSome(homePath))
|
|
153
|
+
return homePath.value;
|
|
154
|
+
return "/tmp";
|
|
155
|
+
}
|
|
156
|
+
if (Option.isSome(home))
|
|
157
|
+
return home.value;
|
|
158
|
+
if (Option.isSome(userProfile))
|
|
159
|
+
return userProfile.value;
|
|
160
|
+
if (Option.isSome(homePath))
|
|
161
|
+
return homePath.value;
|
|
162
|
+
return "/tmp";
|
|
163
|
+
};
|
|
153
164
|
// -----------------------------------------------------------------------------
|
|
154
165
|
// Live layer
|
|
155
166
|
// -----------------------------------------------------------------------------
|
|
@@ -157,21 +168,15 @@ export const InstallMethodLive = Layer.effect(InstallMethod, Effect.gen(function
|
|
|
157
168
|
const fs = yield* FileSystem.FileSystem;
|
|
158
169
|
const pathService = yield* Path.Path;
|
|
159
170
|
// Capture runtime inputs once at layer construction
|
|
160
|
-
const homeDir = yield* Effect.sync(() => {
|
|
161
|
-
// Cross-platform home directory resolution
|
|
162
|
-
// eslint-disable-next-line no-restricted-properties -- Centralized env var access for home dir
|
|
163
|
-
return process.env["HOME"] ?? process.env["USERPROFILE"] ?? process.env["HOMEPATH"] ?? "/tmp";
|
|
164
|
-
});
|
|
165
171
|
const platform = yield* Effect.sync(() => process.platform);
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
172
|
+
const home = yield* envOption("HOME");
|
|
173
|
+
const userProfile = yield* envOption("USERPROFILE");
|
|
174
|
+
const homePath = yield* envOption("HOMEPATH");
|
|
175
|
+
const homeDir = selectHomeDir(platform, home, userProfile, homePath);
|
|
169
176
|
const inputs = {
|
|
170
177
|
execPath: process.execPath,
|
|
171
178
|
importMetaUrl: import.meta.url,
|
|
172
179
|
homeDir,
|
|
173
|
-
platform,
|
|
174
|
-
localAppData,
|
|
175
180
|
};
|
|
176
181
|
const detect = () => detectFromInputs(inputs).pipe(Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, pathService));
|
|
177
182
|
return { detect };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-method.js","sourceRoot":"","sources":["../../../../src/unstable/install-method/install-method.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"install-method.js","sourceRoot":"","sources":["../../../../src/unstable/install-method/install-method.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAErE,gFAAgF;AAChF,oBAAoB;AACpB,gFAAgF;AAEhF,iFAAiF;AACjF,MAAM,OAAO,MAAO,SAAQ,IAAI,CAAC,WAAW,CAAC,QAAQ,CAEnD;CAAG;AAEL,iEAAiE;AACjE,MAAM,OAAO,QAAS,SAAQ,IAAI,CAAC,WAAW,CAAC,UAAU,CAEvD;CAAG;AAEL,gEAAgE;AAChE,MAAM,OAAO,GAAI,SAAQ,IAAI,CAAC,WAAW,CAAC,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AoB,KAC5B,MAAM,CAAC;CACb;;AAED;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,gBAEhC;CAAG;AAMJ;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,SAAS,gBAAgB,KAAG,OAKJ,CAAC;AAIpD;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,iBAAiB,EACzB,SAAS,MAAM,EACf,QAAQ,MAAM,EACd,WAAU,oBAA8B,KACvC,MASF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,EAAE,KAAK,IAAI,KAAG,OAI3D,CAAC;AAiBF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,WAAW,MAAM;;;iCAiB/C,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,WAAW,MAAM,EAAE,eAAe,MAAM,kEAarE,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,WAAW,MAAM,EAAE,cAAc,MAAM;sBAIpC,MAAM;qBAAmB,MAAM;;sBAA/B,MAAM;qBAAmB,MAAM;iCAMxE,CAAC;AAML,eAAO,MAAM,eAAe,oEA+B3B,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,WAAW,MAAM,uEA6B9C,CAAC"}
|
|
@@ -49,17 +49,7 @@ export const shouldSkip = (context) => context.isJsonOutput ||
|
|
|
49
49
|
context.isUpgradeCommand ||
|
|
50
50
|
(context.isNonInteractive && !context.isAgentSession) ||
|
|
51
51
|
(!context.isStderrTTY && !context.isAgentSession);
|
|
52
|
-
const notificationCommand = (
|
|
53
|
-
switch (method._tag) {
|
|
54
|
-
case "Script":
|
|
55
|
-
case "Unknown":
|
|
56
|
-
return "axm upgrade";
|
|
57
|
-
case "Homebrew":
|
|
58
|
-
return "brew upgrade agentxm/tap/axm";
|
|
59
|
-
case "Npm":
|
|
60
|
-
return "npm update -g axm.sh";
|
|
61
|
-
}
|
|
62
|
-
};
|
|
52
|
+
const notificationCommand = (_method) => "axm upgrade";
|
|
63
53
|
/**
|
|
64
54
|
* Build an install-method-aware notification message.
|
|
65
55
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-check.js","sourceRoot":"","sources":["../../../../src/unstable/update-check/update-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAGjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAC3C,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;AAElD,gFAAgF;AAChF,eAAe;AACf,gFAAgF;AAEhF,sDAAsD;AACtD,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC;IAClD,aAAa,EAAE,MAAM,CAAC,MAAM;IAC5B,SAAS,EAAE,MAAM,CAAC,MAAM;CACzB,CAAC,CAAC;AAKH,MAAM,oCAAoC,GAAG,MAAM,CAAC,mBAAmB,CACrE,MAAM,CAAC,cAAc,CAAC,sBAAsB,CAAC,CAC9C,CAAC;AA6CF;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,UAAU,CAAC,OAAO,EAAmC,CACpF,qEAAqE,CACtE;CAAG;AAEJ,gFAAgF;AAChF,eAAe;AACf,gFAAgF;AA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AAM,UAAU,GAAqC,CAAC,aAAa,EAAE,EAAE,CACrE,gBAAgB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,IAAI,CAC7C,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,UAAU,EAAE,EAAE,CAAC,EAChD,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAC9C,CAAC;IAEJ,MAAM,iBAAiB,GAA4C,CAAC,YAAY,EAAE,EAAE,CAClF,yBAAyB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,IAAI,CACrD,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,UAAU,EAAE,EAAE,CAAC,CACjD,CAAC;IAEJ,OAAO;QACL,SAAS;QACT,UAAU;QACV,iBAAiB;QACjB,UAAU;QACV,mBAAmB;KACS,CAAC;AACjC,CAAC,CAAC,CACH,CAAC"}
|
|
@@ -20,16 +20,16 @@ export declare const isRoot: () => boolean;
|
|
|
20
20
|
/** Returns true if /.dockerenv or /.containerenv exists. Requires FileSystem. */
|
|
21
21
|
export declare const isContainer: Effect.Effect<boolean, never, FileSystem.FileSystem>;
|
|
22
22
|
/**
|
|
23
|
-
* Pure data-dir resolution given explicit
|
|
23
|
+
* Pure data-dir resolution given explicit home-directory inputs.
|
|
24
24
|
* Shared by `resolveAxmDataDir` (reads process globals) and call sites
|
|
25
25
|
* that supply inputs directly for testability.
|
|
26
26
|
*/
|
|
27
|
-
export declare const resolveAxmDataDirPure: (pathJoin: (...segments: ReadonlyArray<string>) => string,
|
|
27
|
+
export declare const resolveAxmDataDirPure: (pathJoin: (...segments: ReadonlyArray<string>) => string, homeDir: string) => string;
|
|
28
28
|
/**
|
|
29
29
|
* Resolve the axm data directory using platform conventions.
|
|
30
30
|
*
|
|
31
31
|
* - Unix: `~/.axm/`
|
|
32
|
-
* - Windows: `%
|
|
32
|
+
* - Windows: `%USERPROFILE%\.axm\`
|
|
33
33
|
*/
|
|
34
34
|
export declare const resolveAxmDataDir: (pathJoin: (...segments: ReadonlyArray<string>) => string) => Effect.Effect<string, never, never>;
|
|
35
35
|
/** Returns true if /proc/version contains "microsoft". Requires FileSystem. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../../src/unstable/utils/environment.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,0EAA0E;AAC1E,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAClB,CAAC;AAE3D,sFAAsF;AACtF,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CACtC,CAAC;AAE/C,4DAA4D;AAC5D,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAExC,CAAC;AAEF,+CAA+C;AAC/C,eAAO,MAAM,MAAM,QAAO,OAAmC,CAAC;AAE9D,iFAAiF;AACjF,eAAO,MAAM,WAAW,sDAUtB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAChC,UAAU,CAAC,GAAG,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,MAAM,EACxD,
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../../src/unstable/utils/environment.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,0EAA0E;AAC1E,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAClB,CAAC;AAE3D,sFAAsF;AACtF,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CACtC,CAAC;AAE/C,4DAA4D;AAC5D,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAExC,CAAC;AAEF,+CAA+C;AAC/C,eAAO,MAAM,MAAM,QAAO,OAAmC,CAAC;AAE9D,iFAAiF;AACjF,eAAO,MAAM,WAAW,sDAUtB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAChC,UAAU,CAAC,GAAG,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,MAAM,EACxD,SAAS,MAAM,KACd,MAEF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,CAAC,GAAG,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,MAAM,wCAQtF,CAAC;AAEL,+EAA+E;AAC/E,eAAO,MAAM,KAAK,sDAQhB,CAAC"}
|
|
@@ -33,27 +33,25 @@ export const isContainer = Effect.gen(function* () {
|
|
|
33
33
|
return containerExists;
|
|
34
34
|
});
|
|
35
35
|
/**
|
|
36
|
-
* Pure data-dir resolution given explicit
|
|
36
|
+
* Pure data-dir resolution given explicit home-directory inputs.
|
|
37
37
|
* Shared by `resolveAxmDataDir` (reads process globals) and call sites
|
|
38
38
|
* that supply inputs directly for testability.
|
|
39
39
|
*/
|
|
40
|
-
export const resolveAxmDataDirPure = (pathJoin,
|
|
41
|
-
if (platform === "win32" && localAppData !== undefined) {
|
|
42
|
-
return pathJoin(localAppData, "axm");
|
|
43
|
-
}
|
|
40
|
+
export const resolveAxmDataDirPure = (pathJoin, homeDir) => {
|
|
44
41
|
return pathJoin(homeDir, ".axm");
|
|
45
42
|
};
|
|
46
43
|
/**
|
|
47
44
|
* Resolve the axm data directory using platform conventions.
|
|
48
45
|
*
|
|
49
46
|
* - Unix: `~/.axm/`
|
|
50
|
-
* - Windows: `%
|
|
47
|
+
* - Windows: `%USERPROFILE%\.axm\`
|
|
51
48
|
*/
|
|
52
49
|
export const resolveAxmDataDir = (pathJoin) => Effect.sync(() => {
|
|
53
50
|
const platform = process.platform;
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
const homeDir = platform === "win32"
|
|
52
|
+
? (readEnv("USERPROFILE") ?? readEnv("HOME") ?? readEnv("HOMEPATH") ?? "/tmp")
|
|
53
|
+
: (readEnv("HOME") ?? readEnv("USERPROFILE") ?? readEnv("HOMEPATH") ?? "/tmp");
|
|
54
|
+
return resolveAxmDataDirPure(pathJoin, homeDir);
|
|
57
55
|
});
|
|
58
56
|
/** Returns true if /proc/version contains "microsoft". Requires FileSystem. */
|
|
59
57
|
export const isWSL = Effect.gen(function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../src/unstable/utils/environment.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,uHAAuH;AACvH,MAAM,OAAO,GAAG,CAAC,IAAY,EAAsB,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAExE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAY,EAAwC,EAAE,CAC9E,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAE3D,sFAAsF;AACtF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE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G,KAAK,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjG,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1B,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,EAAE;SACtB,cAAc,CAAC,eAAe,CAAC;SAC/B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAChD,OAAO,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentxm/client-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
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",
|
|
@@ -218,6 +218,6 @@
|
|
|
218
218
|
"typescript": "^5.9.3",
|
|
219
219
|
"vitest": "^4.1.5",
|
|
220
220
|
"yaml": "^2.8.4",
|
|
221
|
-
"@agentxm/client-utils": "^0.
|
|
221
|
+
"@agentxm/client-utils": "^0.7.1"
|
|
222
222
|
}
|
|
223
223
|
}
|
|
@@ -183,18 +183,18 @@ Add this line to your shell profile (`~/.bashrc`, `~/.zshrc`, or `~/.profile`) t
|
|
|
183
183
|
**Native Install (Windows PowerShell):**
|
|
184
184
|
|
|
185
185
|
```powershell
|
|
186
|
-
$env:Path = "$env:
|
|
186
|
+
$env:Path = "$env:USERPROFILE\.axm\bin;" + $env:Path
|
|
187
187
|
```
|
|
188
188
|
|
|
189
|
-
To make it permanent, add `%
|
|
189
|
+
To make it permanent, add `%USERPROFILE%\.axm\bin` to your system PATH via Settings > System > Environment Variables.
|
|
190
190
|
|
|
191
191
|
**Native Install (Windows CMD):**
|
|
192
192
|
|
|
193
193
|
```cmd
|
|
194
|
-
set PATH=%
|
|
194
|
+
set PATH=%USERPROFILE%\.axm\bin;%PATH%
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
-
To make it permanent, add `%
|
|
197
|
+
To make it permanent, add `%USERPROFILE%\.axm\bin` to your system PATH via Settings > System > Environment Variables.
|
|
198
198
|
|
|
199
199
|
**Homebrew:**
|
|
200
200
|
|
package/site-content/install.cmd
CHANGED
|
@@ -9,8 +9,9 @@ if defined AXM_INSTALL_BASE_URL (
|
|
|
9
9
|
) else (
|
|
10
10
|
set "BINARY_URL=https://github.com/agentxm/axm/releases/latest/download/axm-windows-x64.exe"
|
|
11
11
|
)
|
|
12
|
-
set "INSTALL_DIR=%
|
|
12
|
+
set "INSTALL_DIR=%USERPROFILE%\.axm\bin"
|
|
13
13
|
set "INSTALL_PATH=%INSTALL_DIR%\axm.exe"
|
|
14
|
+
set "META_FILE=%USERPROFILE%\.axm\install-meta.json"
|
|
14
15
|
|
|
15
16
|
call :check_curl
|
|
16
17
|
call :install_axm
|
|
@@ -48,7 +49,6 @@ if %errorlevel% neq 0 (
|
|
|
48
49
|
)
|
|
49
50
|
|
|
50
51
|
rem Write install metadata
|
|
51
|
-
set "META_FILE=%INSTALL_DIR%\install-meta.json"
|
|
52
52
|
for /f %%i in ('powershell -NoProfile -Command "[DateTime]::UtcNow.ToString(\"yyyy-MM-dd'T'HH:mm:ss'Z'\")"') do set "TIMESTAMP=%%i"
|
|
53
53
|
if %errorlevel% neq 0 (
|
|
54
54
|
echo Error: Failed to generate install timestamp.
|
package/site-content/install.md
CHANGED
|
@@ -1,364 +1,200 @@
|
|
|
1
1
|
# Install AXM
|
|
2
2
|
|
|
3
|
-
**DONE WHEN:** `axm --version` succeeds and (if the user chose workspace
|
|
4
|
-
`axm setup` has completed.
|
|
3
|
+
**DONE WHEN:** `axm --version` succeeds and (if the user chose workspace
|
|
4
|
+
setup) `axm setup` has completed.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## TODO
|
|
9
|
-
|
|
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 sign in to AgentXM.ai or proceed
|
|
18
|
-
to workspace setup; on the sign-in choice, hand off signup/login and
|
|
19
|
-
re-check `axm whoami`
|
|
20
|
-
- [ ] Run `axm setup --yes` to initialize the project workspace
|
|
21
|
-
- [ ] Load pre-req help topics: `axm help getting-started` and
|
|
22
|
-
`axm help basic-usage`
|
|
6
|
+
## Flow
|
|
23
7
|
|
|
24
|
-
|
|
8
|
+
1. Probe for existing install → upgrade or install.
|
|
9
|
+
2. Verify `axm --version`.
|
|
10
|
+
3. Probe sign-in → ask the user → optionally hand off `axm login`.
|
|
11
|
+
4. Run `axm setup --yes`.
|
|
12
|
+
5. Read `.axm/extensions/@agentxm/skills/axm/src/SKILL.md`, then load
|
|
13
|
+
`axm help getting-started` and `axm help basic-usage`.
|
|
25
14
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
AXM (Agent eXtension Manager) is the open extension manager for AI coding
|
|
29
|
-
agents — discover, install, publish, and manage skills, commands, subagents,
|
|
30
|
-
MCP servers, and packs from a single CLI.
|
|
31
|
-
[AgentXM.ai](https://agentxm.ai) is the extension registry AXM connects to.
|
|
32
|
-
An AgentXM.ai account is only required for publishing extensions or
|
|
33
|
-
installing private extensions; public extensions install without an account.
|
|
15
|
+
## Invariants
|
|
34
16
|
|
|
35
|
-
|
|
17
|
+
- **Probes exit 0.** `axm --version` and `axm whoami --json` have expected
|
|
18
|
+
non-zero exit paths ("not installed", "not signed in") that are part of
|
|
19
|
+
the flow. Always invoke them via the wrappers below and branch on stdout,
|
|
20
|
+
not the exit code.
|
|
21
|
+
- **Explain before asking.** Every stop-and-ask and command handoff states
|
|
22
|
+
what it does, why it's needed, and what the user should do next. Bare
|
|
23
|
+
yes/no prompts are non-conforming.
|
|
24
|
+
- **Guide sign-in, do not execute it.** Never run `axm login` without
|
|
25
|
+
explicit consent; never paste an `AXM_TOKEN` the user has not shared.
|
|
26
|
+
- **Resume, do not restart.** If the user completes sign-in out-of-band,
|
|
27
|
+
skip to **Workspace setup** — do not re-ask which option they picked.
|
|
28
|
+
- **Option 2 (defer sign-in) is legitimate, not a fallback.** Do not
|
|
29
|
+
re-prompt later in the flow.
|
|
36
30
|
|
|
37
|
-
|
|
38
|
-
it so the shell exits 0 on either branch and the signal lives in stdout
|
|
39
|
-
(see **Probe commands** under Invariants):
|
|
31
|
+
---
|
|
40
32
|
|
|
41
|
-
|
|
33
|
+
## 1. Detect existing install
|
|
42
34
|
|
|
43
35
|
```bash
|
|
36
|
+
# macOS / Linux
|
|
44
37
|
command -v axm >/dev/null 2>&1 && axm --version || echo "NOT_INSTALLED"
|
|
45
38
|
```
|
|
46
39
|
|
|
47
|
-
On Windows (PowerShell):
|
|
48
|
-
|
|
49
40
|
```powershell
|
|
41
|
+
# Windows (PowerShell)
|
|
50
42
|
if (Get-Command axm -ErrorAction SilentlyContinue) { axm --version } else { "NOT_INSTALLED" }
|
|
51
43
|
```
|
|
52
44
|
|
|
53
|
-
Branch on
|
|
54
|
-
|
|
55
|
-
- **Prints `X.Y.Z`** → AXM is installed. Upgrade and skip the Install section:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
axm upgrade
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`axm upgrade` auto-detects the install method and either swaps the binary
|
|
62
|
-
in place (script installs) or prints the right `brew`/`npm` command to
|
|
63
|
-
run. If it prints a command, run it and re-run the probe above. Continue
|
|
64
|
-
to **Verify** when done.
|
|
65
|
-
|
|
66
|
-
- **Prints `NOT_INSTALLED`** → AXM is not installed. Continue to **Install**.
|
|
67
|
-
- **Prints anything else** → treat as not installed and reinstall via the
|
|
68
|
-
Install section.
|
|
69
|
-
|
|
70
|
-
## Choose install method
|
|
71
|
-
|
|
72
|
-
AXM can be installed via a standalone binary script, Homebrew, or npm. Pick
|
|
73
|
-
based on what's already on the machine — don't install a new package manager
|
|
74
|
-
just to install AXM.
|
|
75
|
-
|
|
76
|
-
### 1. Detect available package managers
|
|
77
|
-
|
|
78
|
-
A manager is "available" if `--version` exits successfully.
|
|
79
|
-
|
|
80
|
-
On macOS / Linux:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
brew --version >/dev/null 2>&1 && echo "brew: available"
|
|
84
|
-
npm --version >/dev/null 2>&1 && echo "npm: available"
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
On Windows (PowerShell):
|
|
88
|
-
|
|
89
|
-
```powershell
|
|
90
|
-
if (Get-Command brew -ErrorAction SilentlyContinue) { "brew: available" }
|
|
91
|
-
if (Get-Command npm -ErrorAction SilentlyContinue) { "npm: available" }
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### 2. Pick the method
|
|
95
|
-
|
|
96
|
-
Use this decision table — same logic on every platform:
|
|
97
|
-
|
|
98
|
-
| Detected managers | Chosen method |
|
|
99
|
-
| ------------------------------ | ------------------------------------------------------------- |
|
|
100
|
-
| Neither | Install script (Option A on macOS/Linux, Option B on Windows) |
|
|
101
|
-
| Homebrew only | Homebrew (Option D) |
|
|
102
|
-
| npm only | npm (Option E) |
|
|
103
|
-
| Homebrew and npm (two or more) | **STOP AND ASK** the user — see the prompt below |
|
|
104
|
-
|
|
105
|
-
The install script is always a valid fallback. If a package-manager install
|
|
106
|
-
fails, retry with Option A or B.
|
|
107
|
-
|
|
108
|
-
### 3. Ask the user when multiple managers are available
|
|
109
|
-
|
|
110
|
-
All three options install the same `axm` binary. **The main difference is how
|
|
111
|
-
you'll update it later.** Frame the choice that way when asking.
|
|
112
|
-
|
|
113
|
-
**STOP HERE AND ASK THE USER:**
|
|
114
|
-
|
|
115
|
-
> Multiple install methods are available on this machine. The main
|
|
116
|
-
> difference is how you'll update AXM later — pick the update path that
|
|
117
|
-
> matches how you manage other tools.
|
|
118
|
-
>
|
|
119
|
-
> 1. **Install script** (recommended) — Updates via `axm upgrade`
|
|
120
|
-
> (self-managed, independent of any package manager). Standalone binary
|
|
121
|
-
> installed to `~/.axm/bin` (macOS/Linux) or `%LOCALAPPDATA%\axm`
|
|
122
|
-
> (Windows). No extra tools required.
|
|
123
|
-
> 2. **Homebrew** — Updates via `brew upgrade agentxm/tap/axm`, alongside
|
|
124
|
-
> your other brew packages. Choose this if you already manage most CLIs
|
|
125
|
-
> with brew.
|
|
126
|
-
> 3. **npm** — Updates via `npm update -g axm.sh`, alongside your other
|
|
127
|
-
> global npm packages. Choose this if AXM is part of a Node.js-heavy
|
|
128
|
-
> environment. Requires Node.js.
|
|
129
|
-
|
|
130
|
-
Wait for the user's response before continuing. Then run the corresponding
|
|
131
|
-
option below.
|
|
132
|
-
|
|
133
|
-
## Install
|
|
134
|
-
|
|
135
|
-
Each option below installs a persistent `axm` binary on the machine. Run the
|
|
136
|
-
option selected in **Choose install method**.
|
|
137
|
-
|
|
138
|
-
If `axm` is not found after any install option, see **Troubleshooting**.
|
|
139
|
-
|
|
140
|
-
### Option A: macOS / Linux (install script)
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
curl -fsSL https://axm.sh/install.sh | sh
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
Installs to `~/.axm/bin/axm`.
|
|
45
|
+
Branch on stdout:
|
|
147
46
|
|
|
148
|
-
|
|
47
|
+
- **`X.Y.Z`** → installed. Run `axm upgrade` (auto-detects the install
|
|
48
|
+
method and upgrades script, Homebrew, and npm installs). Skip to **§3**.
|
|
49
|
+
- **`NOT_INSTALLED`** or anything else → continue to **§2**.
|
|
149
50
|
|
|
150
|
-
|
|
151
|
-
irm https://axm.sh/install.ps1 | iex
|
|
152
|
-
```
|
|
51
|
+
## 2. Install
|
|
153
52
|
|
|
154
|
-
|
|
53
|
+
### Choose the method
|
|
155
54
|
|
|
156
|
-
|
|
55
|
+
A manager is "available" if its `--version` exits 0 (`brew --version`,
|
|
56
|
+
`npm --version`; PowerShell: `Get-Command brew|npm`). Don't install a new
|
|
57
|
+
package manager just to install AXM.
|
|
157
58
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
59
|
+
| Detected | Method |
|
|
60
|
+
| ----------------- | ----------------------------------------------- |
|
|
61
|
+
| Neither | Install script (A on macOS/Linux, B on Windows) |
|
|
62
|
+
| Homebrew only | Homebrew (D) |
|
|
63
|
+
| npm only | npm (E) |
|
|
64
|
+
| Both brew and npm | **Ask the user** (see below) |
|
|
161
65
|
|
|
162
|
-
|
|
66
|
+
The install script is always a valid fallback if a package-manager install
|
|
67
|
+
fails.
|
|
163
68
|
|
|
164
|
-
###
|
|
69
|
+
### Ask when multiple managers are available
|
|
165
70
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
```
|
|
71
|
+
All three install the same `axm` binary; **the difference is how you update
|
|
72
|
+
it later.** Frame the choice that way, then ask the user to pick one:
|
|
169
73
|
|
|
170
|
-
|
|
74
|
+
1. **Install script** (recommended) — self-managed via `axm upgrade`,
|
|
75
|
+
independent of any package manager. Installs to `~/.axm/bin`
|
|
76
|
+
(macOS/Linux) or `%USERPROFILE%\.axm\bin` (Windows).
|
|
77
|
+
2. **Homebrew** — `brew upgrade agentxm/tap/axm`, alongside other brew
|
|
78
|
+
packages. Pick this if most CLIs are managed with brew.
|
|
79
|
+
3. **npm** — `npm install -g axm.sh`, alongside other global npm packages.
|
|
80
|
+
Pick this if AXM is part of a Node.js-heavy environment. Requires Node.js.
|
|
171
81
|
|
|
172
|
-
|
|
82
|
+
Wait for the user's choice before running an installer.
|
|
173
83
|
|
|
174
|
-
|
|
175
|
-
npm install -g axm.sh
|
|
176
|
-
```
|
|
84
|
+
### Run the installer
|
|
177
85
|
|
|
178
|
-
|
|
86
|
+
| Option | Platform | Command |
|
|
87
|
+
| ------ | ------------- | --------------------------------------------------------------------- |
|
|
88
|
+
| A | macOS / Linux | `curl -fsSL https://axm.sh/install.sh \| sh` |
|
|
89
|
+
| B | Windows (PS) | `irm https://axm.sh/install.ps1 \| iex` |
|
|
90
|
+
| C | Windows (CMD) | `curl -fsSL -o install.cmd https://axm.sh/install.cmd && install.cmd` |
|
|
91
|
+
| D | Homebrew | `brew install agentxm/tap/axm` |
|
|
92
|
+
| E | npm (any OS) | `npm install -g axm.sh` |
|
|
179
93
|
|
|
180
|
-
|
|
181
|
-
axm
|
|
182
|
-
# Expected: X.Y.Z
|
|
183
|
-
```
|
|
94
|
+
Install locations: `~/.axm/bin/axm` (script, macOS/Linux);
|
|
95
|
+
`%USERPROFILE%\.axm\bin\axm.exe` (script, Windows).
|
|
184
96
|
|
|
185
|
-
|
|
97
|
+
### Verify
|
|
186
98
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
is `X.Y.Z`, run `axm upgrade`. If the output is `NOT_INSTALLED`, detect
|
|
190
|
-
available package managers per **Choose install method**, ask the user if
|
|
191
|
-
more than one is available, and run the chosen installer. Stop when the
|
|
192
|
-
probe prints `X.Y.Z`, then proceed to **Check sign-in state**.
|
|
99
|
+
Re-run the probe from **§1**. Expect `X.Y.Z`. If `axm` is not found, see
|
|
100
|
+
**Troubleshooting**.
|
|
193
101
|
|
|
194
102
|
---
|
|
195
103
|
|
|
196
|
-
## Check sign-in state
|
|
197
|
-
|
|
198
|
-
Detect whether this machine is signed in to AgentXM.ai — the result decides
|
|
199
|
-
whether to ask the user about signing in or skip to workspace setup. Like
|
|
200
|
-
**Detect existing install**, this is a **probe** — invoke it so the shell
|
|
201
|
-
exits 0 on either branch and the signal lives in stdout:
|
|
202
|
-
|
|
203
|
-
On macOS / Linux:
|
|
104
|
+
## 3. Check sign-in state
|
|
204
105
|
|
|
205
106
|
```bash
|
|
107
|
+
# macOS / Linux
|
|
206
108
|
axm whoami --json 2>/dev/null || echo '{"type":"error","code":"AUTH_LOGIN_REQUIRED"}'
|
|
207
109
|
```
|
|
208
110
|
|
|
209
|
-
On Windows (PowerShell):
|
|
210
|
-
|
|
211
111
|
```powershell
|
|
112
|
+
# Windows (PowerShell)
|
|
212
113
|
try { axm whoami --json } catch { '{"type":"error","code":"AUTH_LOGIN_REQUIRED"}' }
|
|
213
114
|
```
|
|
214
115
|
|
|
215
|
-
Branch on the JSON `type` field
|
|
116
|
+
Branch on the JSON `type` field:
|
|
216
117
|
|
|
217
|
-
-
|
|
218
|
-
|
|
219
|
-
- **`type` is `"error"`** (typically with `code` = `AUTH_LOGIN_REQUIRED`) →
|
|
220
|
-
not signed in. Continue to **Ask the user what to do next**.
|
|
118
|
+
- **Not `"error"`** (identity payload) → signed in. Skip to **§5**.
|
|
119
|
+
- **`"error"`** (typically `code` = `AUTH_LOGIN_REQUIRED`) → continue to **§4**.
|
|
221
120
|
|
|
222
|
-
## Ask the user
|
|
121
|
+
## 4. Ask the user about sign-in
|
|
223
122
|
|
|
224
|
-
|
|
123
|
+
Tell the user _why_ the choice matters: signing in is only needed to publish
|
|
124
|
+
extensions or install private extensions; the workspace can still be set up
|
|
125
|
+
without it. Then ask them to pick:
|
|
225
126
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
sign-in now or defer it.
|
|
127
|
+
1. **Sign up or log in to AgentXM.ai** (recommended if publishing or
|
|
128
|
+
installing private extensions).
|
|
129
|
+
2. **Proceed to workspace setup** (can sign in later with `axm login`).
|
|
230
130
|
|
|
231
|
-
**Do not run `axm login`, `axm setup`, or any
|
|
232
|
-
|
|
131
|
+
**Do not run `axm login`, `axm setup`, or any signed-in command until the
|
|
132
|
+
user has picked.** Wait for the response, then:
|
|
233
133
|
|
|
234
|
-
**
|
|
134
|
+
- Option 1 → continue with **Sign in** below, then **§5**.
|
|
135
|
+
- Option 2 → skip to **§5**.
|
|
235
136
|
|
|
236
|
-
|
|
237
|
-
> to sign in to AgentXM.ai? Signing in is only needed if you plan to
|
|
238
|
-
> publish extensions or install private extensions — public extensions
|
|
239
|
-
> install without an account.
|
|
240
|
-
>
|
|
241
|
-
> 1. **Sign up or log in to AgentXM.ai** (recommended if you plan to
|
|
242
|
-
> publish extensions or install private extensions)
|
|
243
|
-
> 2. **Proceed to setting up your project workspace** (you can sign in
|
|
244
|
-
> later with `axm login`)
|
|
137
|
+
### Sign in
|
|
245
138
|
|
|
246
|
-
|
|
139
|
+
If the user has no AgentXM.ai account, point them to
|
|
140
|
+
https://agentxm.ai/signup — explain that signup happens through the web and
|
|
141
|
+
AXM can't create the account on their behalf. Wait for confirmation, then
|
|
142
|
+
continue.
|
|
247
143
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
---
|
|
253
|
-
|
|
254
|
-
## Sign up or log in to AgentXM.ai
|
|
255
|
-
|
|
256
|
-
`axm login` signs this machine in to an AgentXM.ai account.
|
|
257
|
-
|
|
258
|
-
### If the user does not have an AgentXM.ai account
|
|
259
|
-
|
|
260
|
-
You cannot create an account for the user. Hand off:
|
|
261
|
-
|
|
262
|
-
1. Tell the user to open https://agentxm.ai/signup and create an account —
|
|
263
|
-
explain that this sets up the AgentXM.ai account that `axm login` will
|
|
264
|
-
later authenticate against, and that AXM can't create the account
|
|
265
|
-
because signup happens through the web.
|
|
266
|
-
2. Wait for the user to confirm signup is complete.
|
|
267
|
-
3. Continue to **Log in** below.
|
|
268
|
-
|
|
269
|
-
### Log in
|
|
270
|
-
|
|
271
|
-
Explain to the user what logging in will do before handing off: it proves
|
|
272
|
-
to AgentXM.ai that this machine belongs to their account, and stores a
|
|
273
|
-
local token so subsequent `axm` commands can reach the registry.
|
|
274
|
-
|
|
275
|
-
Offer both paths and let the user pick:
|
|
144
|
+
Before handing off `axm login`, explain what it does: it proves the machine
|
|
145
|
+
belongs to their account and stores a local token so subsequent `axm`
|
|
146
|
+
commands can reach the registry. Offer both paths:
|
|
276
147
|
|
|
277
148
|
- **Interactive (recommended):** ask the user to run `axm login` in their
|
|
278
|
-
terminal.
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
149
|
+
terminal. It opens a browser for a one-time authorization flow; AXM can't
|
|
150
|
+
run it on their behalf because the browser step requires the user. In
|
|
151
|
+
SSH/CI/Codespaces or with `--device-code`, AXM falls back to a five-minute
|
|
152
|
+
device-code flow.
|
|
282
153
|
- **Non-interactive:** ask the user to export `AXM_TOKEN` in the
|
|
283
|
-
environment where AXM will run.
|
|
284
|
-
|
|
285
|
-
|
|
154
|
+
environment where AXM will run. `AXM_TOKEN` is a pre-generated credential
|
|
155
|
+
that skips the browser step; never paste a token the user has not shared
|
|
156
|
+
with you.
|
|
286
157
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
is not `"error"`, continue to **Workspace setup**. If `type` is `"error"`,
|
|
290
|
-
the sign-in did not complete — ask the user to retry the same path or
|
|
291
|
-
switch paths.
|
|
158
|
+
After the user confirms, re-run the probe from **§3**. If `type` is still
|
|
159
|
+
`"error"`, ask them to retry the same path or switch paths.
|
|
292
160
|
|
|
293
161
|
---
|
|
294
162
|
|
|
295
|
-
## Workspace setup
|
|
296
|
-
|
|
297
|
-
Before running the command, tell the user what it will do to their project:
|
|
298
|
-
create `.axm/` configuration files, install default extensions (including
|
|
299
|
-
`@agentxm/skills/axm`), and register agent discovery symlinks in the
|
|
300
|
-
current working directory.
|
|
163
|
+
## 5. Workspace setup
|
|
301
164
|
|
|
302
|
-
|
|
165
|
+
Before running, tell the user `axm setup` will: create `.axm/` configuration
|
|
166
|
+
files in the current directory, install default extensions (including
|
|
167
|
+
`@agentxm/skills/axm`), and register agent discovery symlinks.
|
|
303
168
|
|
|
304
169
|
```bash
|
|
305
170
|
axm setup --yes
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
Once it succeeds, load the two pre-req help topics before doing any other
|
|
309
|
-
AXM work in this session — they cover what `axm setup` produced and the
|
|
310
|
-
files an agent must understand before changing workspace state:
|
|
311
|
-
|
|
312
|
-
```bash
|
|
171
|
+
cat .axm/extensions/@agentxm/skills/axm/src/SKILL.md
|
|
313
172
|
axm help getting-started
|
|
314
173
|
axm help basic-usage
|
|
315
174
|
```
|
|
316
175
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
covers the key workspace files (`.axm/settings.json`, `axm-lock.yaml`,
|
|
320
|
-
`.axm/extensions/`), the commit policy (`.axm/` and `axm-lock.yaml` must
|
|
321
|
-
be checked in, not gitignored), and how to act safely in an existing
|
|
322
|
-
workspace.
|
|
176
|
+
After setup, read the installed AXM skill and both help topics before doing
|
|
177
|
+
any other AXM work in this session:
|
|
323
178
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
brownfield, unmanaged skills), extension management, and publishing.
|
|
327
|
-
|
|
328
|
-
## Invariants
|
|
179
|
+
- **`.axm/extensions/@agentxm/skills/axm/src/SKILL.md`** — agent rules for
|
|
180
|
+
safe AXM CLI use, permissions, output modes, and day-to-day operations.
|
|
329
181
|
|
|
330
|
-
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
consent request states what the action does, why it's needed, and what
|
|
337
|
-
the user should do next. Bare yes/no prompts and bare command handoffs
|
|
338
|
-
are non-conforming.
|
|
339
|
-
- **Guide sign-in, do not execute sign-in.** Never run `axm login` without
|
|
340
|
-
explicit user consent; never set or paste an `AXM_TOKEN` the user has
|
|
341
|
-
not shared. The device flow requires the user's browser; the token is
|
|
342
|
-
the user's credential.
|
|
343
|
-
- **Always** re-run the `axm whoami --json` probe after any user-driven
|
|
344
|
-
sign-in step before running `axm setup`.
|
|
345
|
-
- **Option 2 is legitimate, not a fallback.** If the user chose to defer
|
|
346
|
-
sign-in, do not re-prompt later in the flow. Signing in is deferred,
|
|
347
|
-
not required.
|
|
348
|
-
- **Resume, do not restart.** If the user completes sign-in out-of-band and
|
|
349
|
-
returns, skip to **Workspace setup** — do not re-ask which option they
|
|
350
|
-
picked.
|
|
182
|
+
- **`getting-started`** — first-time workspace setup; explains what `axm
|
|
183
|
+
setup` just produced.
|
|
184
|
+
- **`basic-usage`** — the key workspace files (`.axm/settings.json`,
|
|
185
|
+
`axm-lock.yaml`, `.axm/extensions/`), the commit policy (`.axm/` and
|
|
186
|
+
`axm-lock.yaml` must be checked in, not gitignored), and how to act safely
|
|
187
|
+
in an existing workspace.
|
|
351
188
|
|
|
352
189
|
---
|
|
353
190
|
|
|
354
191
|
## Troubleshooting
|
|
355
192
|
|
|
356
|
-
**`axm: command not found`** —
|
|
193
|
+
**`axm: command not found`** — install bin directory is not on PATH:
|
|
357
194
|
|
|
358
|
-
- **
|
|
359
|
-
|
|
360
|
-
- **
|
|
361
|
-
|
|
362
|
-
`$env:Path = "$env:LOCALAPPDATA\axm;$env:Path"`.
|
|
195
|
+
- **Script (macOS/Linux):** `export PATH="$HOME/.axm/bin:$PATH"`; persist in
|
|
196
|
+
`~/.bashrc` / `~/.zshrc`.
|
|
197
|
+
- **Script (Windows):** add `%USERPROFILE%\.axm\bin` to PATH via System
|
|
198
|
+
Environment Variables, or `$env:Path = "$env:USERPROFILE\.axm\bin;$env:Path"`.
|
|
363
199
|
- **Homebrew:** `brew link axm`.
|
|
364
200
|
- **npm:** `export PATH="$(npm config get prefix)/bin:$PATH"`.
|
package/site-content/install.ps1
CHANGED
|
@@ -38,7 +38,7 @@ function Download-Binary {
|
|
|
38
38
|
|
|
39
39
|
$artifact = "axm-windows-${Arch}.exe"
|
|
40
40
|
$downloadUrl = "$BASE_URL/$artifact"
|
|
41
|
-
$installDir = Join-Path $env:
|
|
41
|
+
$installDir = Join-Path $env:USERPROFILE ".axm\bin"
|
|
42
42
|
$target = Join-Path $installDir "axm.exe"
|
|
43
43
|
|
|
44
44
|
Write-Host "Detected platform: windows-$Arch"
|
|
@@ -69,7 +69,7 @@ function Download-Binary {
|
|
|
69
69
|
Write-Host "Installed to $target"
|
|
70
70
|
|
|
71
71
|
# Write install metadata
|
|
72
|
-
$metaFile = Join-Path $installDir "install-meta.json"
|
|
72
|
+
$metaFile = Join-Path (Split-Path $installDir -Parent) "install-meta.json"
|
|
73
73
|
$timestamp = [DateTime]::UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ")
|
|
74
74
|
$metaContent = "{`"method`": `"script`", `"installedAt`": `"$timestamp`"}"
|
|
75
75
|
Set-Content -Path $metaFile -Value $metaContent -Encoding UTF8
|