@ai-coders/installer 0.6.0 → 0.6.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/CHANGELOG.md +8 -0
- package/dist/products/second-brain/bearer.js +2 -6
- package/dist/products/second-brain/bearer.js.map +1 -1
- package/dist/products/second-brain/bootstrap.js +2 -6
- package/dist/products/second-brain/bootstrap.js.map +1 -1
- package/dist/products/second-brain/stderr.d.ts +12 -0
- package/dist/products/second-brain/stderr.js +29 -0
- package/dist/products/second-brain/stderr.js.map +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @ai-coders/installer
|
|
2
2
|
|
|
3
|
+
## [0.6.1](https://github.com/vinilana/ai-coders-installers/compare/v0.6.0...v0.6.1) (2026-08-31)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* extract error line from Node crash reports in stderr ([2b8ea37](https://github.com/vinilana/ai-coders-installers/commit/2b8ea37f2ed3f4d9ed9a0155490e0121c67ec0a6))
|
|
9
|
+
* **second-brain:** surface the real error from Node crash reports ([2193d11](https://github.com/vinilana/ai-coders-installers/commit/2193d119f8adec12d9e9e2615626228172373d41))
|
|
10
|
+
|
|
3
11
|
## [0.6.0](https://github.com/vinilana/ai-coders-installers/compare/v0.5.0...v0.6.0) (2026-08-25)
|
|
4
12
|
|
|
5
13
|
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { randomBytes } from "node:crypto";
|
|
12
12
|
import { vpsEnvPath, withBearerCredentials } from "./envfile.js";
|
|
13
|
+
import { failureMessageFromStderr } from "./stderr.js";
|
|
13
14
|
export function generateBearerToken() {
|
|
14
15
|
// 32 bytes → 43 base64url characters, above the engine's 32-character
|
|
15
16
|
// minimum and safe for parseEnv.
|
|
@@ -65,14 +66,9 @@ export function interpretAccountIdLookup(result) {
|
|
|
65
66
|
};
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
|
-
const lastLine = result.stderr
|
|
69
|
-
.split("\n")
|
|
70
|
-
.map((line) => line.trim())
|
|
71
|
-
.filter((line) => line !== "")
|
|
72
|
-
.at(-1);
|
|
73
69
|
return {
|
|
74
70
|
kind: "failed",
|
|
75
|
-
message:
|
|
71
|
+
message: failureMessageFromStderr(result.stderr, "The owner account id could not be read."),
|
|
76
72
|
};
|
|
77
73
|
}
|
|
78
74
|
//# sourceMappingURL=bearer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bearer.js","sourceRoot":"","sources":["../../../packages/second-brain/src/bearer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"bearer.js","sourceRoot":"","sources":["../../../packages/second-brain/src/bearer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,UAAU,mBAAmB;IACjC,sEAAsE;IACtE,iCAAiC;IACjC,OAAO,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GACjC,0DAA0D;IAC1D,mFAAmF,CAAC;AAEtF,MAAM,UAAU,yBAAyB,CAAC,KAAa;IACrD,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;IACD,wEAAwE;I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AK,EAAE,CAAC;QACxE,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;YACjB,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,yDAAyD;aACnE,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,wBAAwB,CAC/B,MAAM,CAAC,MAAM,EACb,yCAAyC,CAC1C;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { failureMessageFromStderr } from "./stderr.js";
|
|
1
2
|
export const ownerBootstrapCommand = "cd /opt/second-brain && docker compose run --rm -T " +
|
|
2
3
|
"auth node dist/services/auth/bootstrap-noninteractive.js";
|
|
3
4
|
/**
|
|
@@ -26,14 +27,9 @@ export function interpretBootstrapResult(result) {
|
|
|
26
27
|
if (result.stderr.includes("The OAuth owner account already exists.")) {
|
|
27
28
|
return { kind: "already-exists" };
|
|
28
29
|
}
|
|
29
|
-
const lastLine = result.stderr
|
|
30
|
-
.split("\n")
|
|
31
|
-
.map((line) => line.trim())
|
|
32
|
-
.filter((line) => line !== "")
|
|
33
|
-
.at(-1);
|
|
34
30
|
return {
|
|
35
31
|
kind: "failed",
|
|
36
|
-
message:
|
|
32
|
+
message: failureMessageFromStderr(result.stderr, "The owner account could not be created."),
|
|
37
33
|
};
|
|
38
34
|
}
|
|
39
35
|
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../../packages/second-brain/src/bootstrap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../../packages/second-brain/src/bootstrap.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,MAAM,qBAAqB,GAChC,qDAAqD;IACrD,0DAA0D,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAC5B,+DAA+D;IAC/D,yCAAyC,CAAC;AAE5C;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CACtC,KAAa,EACb,QAAgB;IAEhB,KAAK,MAAM,KAAK,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC;QACtC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IACD,OAAO,GAAG,KAAK,KAAK,QAAQ,IAAI,CAAC;AACnC,CAAC;AAOD,MAAM,UAAU,wBAAwB,CACtC,MAAwB;IAExB,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC;QACxE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC7B,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,yCAAyC,CAAC,EAAE,CAAC;QACtE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IACpC,CAAC;IACD,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,wBAAwB,CAC/B,MAAM,CAAC,MAAM,EACb,yCAAyC,CAC1C;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Picks the most informative stderr line for a failure message.
|
|
3
|
+
*
|
|
4
|
+
* When a Node.js script inside a container dies on an uncaught exception,
|
|
5
|
+
* stderr ends with stack frames and a bare "Node.js vX.Y.Z" footer — the
|
|
6
|
+
* least useful lines of the whole report. Surfacing the last raw line then
|
|
7
|
+
* tells a member nothing (see the create-owner step showing only the Node
|
|
8
|
+
* version). This helper drops that noise and prefers the line naming the
|
|
9
|
+
* error itself, while leaving the engine's stable one-line failure
|
|
10
|
+
* sentences untouched.
|
|
11
|
+
*/
|
|
12
|
+
export declare function failureMessageFromStderr(stderr: string, fallback: string): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Picks the most informative stderr line for a failure message.
|
|
3
|
+
*
|
|
4
|
+
* When a Node.js script inside a container dies on an uncaught exception,
|
|
5
|
+
* stderr ends with stack frames and a bare "Node.js vX.Y.Z" footer — the
|
|
6
|
+
* least useful lines of the whole report. Surfacing the last raw line then
|
|
7
|
+
* tells a member nothing (see the create-owner step showing only the Node
|
|
8
|
+
* version). This helper drops that noise and prefers the line naming the
|
|
9
|
+
* error itself, while leaving the engine's stable one-line failure
|
|
10
|
+
* sentences untouched.
|
|
11
|
+
*/
|
|
12
|
+
const nodeVersionFooter = /^Node\.js v\d+\.\d+\.\d+$/u;
|
|
13
|
+
const stackFrame = /^at\s/u;
|
|
14
|
+
const caretMarker = /^\^+$/u;
|
|
15
|
+
// Matches "Error:", "TypeError:", "AggregateError [ECONNREFUSED]:", … —
|
|
16
|
+
// the class name ends in "Error" as a whole word.
|
|
17
|
+
const errorLine = /Error\b/u;
|
|
18
|
+
export function failureMessageFromStderr(stderr, fallback) {
|
|
19
|
+
const lines = stderr
|
|
20
|
+
.split("\n")
|
|
21
|
+
.map((line) => line.trim())
|
|
22
|
+
.filter((line) => line !== "" &&
|
|
23
|
+
!nodeVersionFooter.test(line) &&
|
|
24
|
+
!stackFrame.test(line) &&
|
|
25
|
+
!caretMarker.test(line));
|
|
26
|
+
const lastErrorLine = lines.filter((line) => errorLine.test(line)).at(-1);
|
|
27
|
+
return lastErrorLine ?? lines.at(-1) ?? fallback;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=stderr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stderr.js","sourceRoot":"","sources":["../../../packages/second-brain/src/stderr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,iBAAiB,GAAG,4BAA4B,CAAC;AACvD,MAAM,UAAU,GAAG,QAAQ,CAAC;AAC5B,MAAM,WAAW,GAAG,QAAQ,CAAC;AAC7B,wEAAwE;AACxE,kDAAkD;AAClD,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B,MAAM,UAAU,wBAAwB,CACtC,MAAc,EACd,QAAgB;IAEhB,MAAM,KAAK,GAAG,MAAM;SACjB,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CACL,CAAC,IAAI,EAAE,EAAE,CACP,IAAI,KAAK,EAAE;QACX,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;QAC7B,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;QACtB,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAC1B,CAAC;IACJ,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,OAAO,aAAa,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC;AACnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-coders/installer",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "AI Coders product installers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"start": "npm run build && node dist/cli.js"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@invokta/mcp": "0.
|
|
38
|
+
"@invokta/mcp": "0.7.0",
|
|
39
39
|
"libsodium-wrappers": "^0.8.4",
|
|
40
40
|
"ssh2": "^1.17.0",
|
|
41
41
|
"tar": "7.5.22",
|