@skillfm/local 2.6.2 → 2.6.4
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.
|
@@ -10,7 +10,17 @@ export interface NpmInstallResult {
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function runNpmCi(installDir: string): Promise<NpmInstallResult>;
|
|
12
12
|
/**
|
|
13
|
-
* Verify that dist/
|
|
13
|
+
* Verify that dist/bundle/server.js still exists after npm install.
|
|
14
|
+
*
|
|
15
|
+
* Why dist/bundle/server.js (2026-04-26 Day -1 fix):
|
|
16
|
+
* shared/contracts/envelope-v2/skill-distribution.ts BUNDLE_REQUIRED_ENTRY_FILES
|
|
17
|
+
* declares 'dist/bundle/server.js' as the canonical entry (esbuild single-file inline
|
|
18
|
+
* bundle). tar-extractor already validates this at extract time. This post-install
|
|
19
|
+
* hook is a defense-in-depth re-check (catches accidental removal during npm install).
|
|
20
|
+
*
|
|
21
|
+
* Pre-fix bug: this checked installDir/runtime/server.js — wrong path entirely
|
|
22
|
+
* (TS source dir, no .js file would ever exist there in production). Test fixtures
|
|
23
|
+
* put server.js at runtime/ which masked the bug until live agent installation hit.
|
|
14
24
|
*/
|
|
15
25
|
export declare function verifyServerJs(installDir: string): void;
|
|
16
26
|
//# sourceMappingURL=npm-installer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npm-installer.d.ts","sourceRoot":"","sources":["../../src/skill-installer/npm-installer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"npm-installer.d.ts","sourceRoot":"","sources":["../../src/skill-installer/npm-installer.ts"],"names":[],"mappings":"AA4BA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAqE5E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CASvD"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
// skill-installer/npm-installer.ts
|
|
2
|
-
// Runs `npm
|
|
2
|
+
// Runs `npm install --omit=dev` in the install directory with a configurable timeout.
|
|
3
|
+
//
|
|
4
|
+
// Why `npm install` not `npm ci` (2026-04-26 Day -1 fix):
|
|
5
|
+
// skill bundles are produced by tar-on-disk in solutions/<slug>/ which is a workspace
|
|
6
|
+
// sub-package; in npm workspaces only the monorepo root carries package-lock.json.
|
|
7
|
+
// So bundles ship without a lock file. `npm ci` errors EUSAGE on missing lock —
|
|
8
|
+
// `npm install --omit=dev --no-audit --no-fund --no-save` does the right thing
|
|
9
|
+
// (resolve+install runtime deps, no telemetry/spam, no lock mutation in install dir).
|
|
3
10
|
import { spawn } from 'node:child_process';
|
|
4
11
|
import { existsSync } from 'node:fs';
|
|
5
12
|
import { join } from 'node:path';
|
|
@@ -25,7 +32,7 @@ export async function runNpmCi(installDir) {
|
|
|
25
32
|
return new Promise((resolve, reject) => {
|
|
26
33
|
const stderrChunks = [];
|
|
27
34
|
const stdoutChunks = [];
|
|
28
|
-
const child = spawn('npm', ['
|
|
35
|
+
const child = spawn('npm', ['install', '--omit=dev', '--no-audit', '--no-fund', '--no-save'], {
|
|
29
36
|
cwd: installDir,
|
|
30
37
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
31
38
|
env: {
|
|
@@ -70,12 +77,22 @@ export async function runNpmCi(installDir) {
|
|
|
70
77
|
});
|
|
71
78
|
}
|
|
72
79
|
/**
|
|
73
|
-
* Verify that dist/
|
|
80
|
+
* Verify that dist/bundle/server.js still exists after npm install.
|
|
81
|
+
*
|
|
82
|
+
* Why dist/bundle/server.js (2026-04-26 Day -1 fix):
|
|
83
|
+
* shared/contracts/envelope-v2/skill-distribution.ts BUNDLE_REQUIRED_ENTRY_FILES
|
|
84
|
+
* declares 'dist/bundle/server.js' as the canonical entry (esbuild single-file inline
|
|
85
|
+
* bundle). tar-extractor already validates this at extract time. This post-install
|
|
86
|
+
* hook is a defense-in-depth re-check (catches accidental removal during npm install).
|
|
87
|
+
*
|
|
88
|
+
* Pre-fix bug: this checked installDir/runtime/server.js — wrong path entirely
|
|
89
|
+
* (TS source dir, no .js file would ever exist there in production). Test fixtures
|
|
90
|
+
* put server.js at runtime/ which masked the bug until live agent installation hit.
|
|
74
91
|
*/
|
|
75
92
|
export function verifyServerJs(installDir) {
|
|
76
|
-
const serverJs = join(installDir, '
|
|
93
|
+
const serverJs = join(installDir, 'dist', 'bundle', 'server.js');
|
|
77
94
|
if (!existsSync(serverJs)) {
|
|
78
|
-
const err = new Error(`dist/
|
|
95
|
+
const err = new Error(`dist/bundle/server.js missing after npm install in ${installDir}`);
|
|
79
96
|
err.installCode = SKILL_INSTALL_ERROR_CODES.BUNDLE_MISSING_SERVER_JS;
|
|
80
97
|
throw err;
|
|
81
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npm-installer.js","sourceRoot":"","sources":["../../src/skill-installer/npm-installer.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,iFAAiF;
|
|
1
|
+
{"version":3,"file":"npm-installer.js","sourceRoot":"","sources":["../../src/skill-installer/npm-installer.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,sFAAsF;AACtF,EAAE;AACF,0DAA0D;AAC1D,wFAAwF;AACxF,qFAAqF;AACrF,kFAAkF;AAClF,iFAAiF;AACjF,wFAAwF;AAExF,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAGzF,iFAAiF;AACjF,MAAM,yBAAyB,GAAG,O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AY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,GAAG,GAAG,IAAI,KAAK,CACnB,wBAAwB,QAAQ,CAAC,OAAO,EAAE,CACO,CAAC;YACpD,GAAG,CAAC,WAAW,GAAG,yBAAyB,CAAC,oBAAoB,CAAC;YACjE,MAAM,CAAC,GAAG,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACjE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,MAAM,GAAG,GAAG,IAAI,KAAK,CACnB,sDAAsD,UAAU,EAAE,CACjB,CAAC;QACpD,GAAG,CAAC,WAAW,GAAG,yBAAyB,CAAC,wBAAwB,CAAC;QACrE,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skillfm/local",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.4",
|
|
4
4
|
"description": "SkillFM local sidecar \u2014 a tiny localhost HTTP proxy that lets any AI agent activate and run SkillFM skills in the current conversation without restarting its MCP runtime. Writes ~/.skillfm/local.json for service discovery.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|