@sapiom/agent-core
Advanced tools
+8
-0
| # @sapiom/orchestration-core | ||
| ## 0.10.4 | ||
| ### Patch Changes | ||
| - 0bf040f: Fix `check` / `sapiom_dev_agents_check` always failing with `TYPECHECK_FAILED` on Windows | ||
| `runTypecheck` ran the project's compiler via the bare `node_modules/.bin/tsc` shim. On Windows that extensionless file is a POSIX sh script (npm ships the real launcher as `tsc.cmd`), which `execFileSync` cannot execute — it threw a spawn error with empty output, so the check reported `TYPECHECK_FAILED` with the generic "Run `tsc --noEmit` for details" hint even when the project's own `tsc --noEmit` passed cleanly. It now runs TypeScript's JS entry (`node_modules/typescript/bin/tsc`) under the current Node binary, which is platform-independent and avoids `.bin`/`.cmd`/PATHEXT/shell entirely. | ||
| ## 0.10.3 | ||
@@ -4,0 +12,0 @@ |
@@ -51,9 +51,10 @@ "use strict"; | ||
| function runTypecheck(sourceDir) { | ||
| const tscBin = node_path_1.default.join(sourceDir, "node_modules", ".bin", "tsc"); | ||
| if (!(0, node_fs_1.existsSync)(tscBin)) { | ||
| const dir = node_path_1.default.resolve(sourceDir); | ||
| const tscScript = node_path_1.default.join(dir, "node_modules", "typescript", "bin", "tsc"); | ||
| if (!(0, node_fs_1.existsSync)(tscScript)) { | ||
| return "typecheck skipped — TypeScript is not installed (run npm install first)"; | ||
| } | ||
| try { | ||
| (0, node_child_process_1.execFileSync)(tscBin, ["--noEmit"], { | ||
| cwd: sourceDir, | ||
| (0, node_child_process_1.execFileSync)(process.execPath, [tscScript, "--noEmit"], { | ||
| cwd: dir, | ||
| stdio: ["ignore", "pipe", "pipe"], | ||
@@ -60,0 +61,0 @@ }); |
@@ -8,2 +8,3 @@ export declare const CONFIG_FILE = "sapiom.json"; | ||
| forkId?: string; | ||
| starterId?: string; | ||
| repoFullName?: string; | ||
@@ -10,0 +11,0 @@ defaultBranch?: string; |
@@ -199,5 +199,5 @@ "use strict"; | ||
| (0, node_fs_1.writeFileSync)(node_path_1.default.join(devDir, "stubs.json"), JSON.stringify({ version: 1, steps: {} }, null, 2) + "\n"); | ||
| (0, config_js_1.writeConfig)(targetDir, {}); | ||
| (0, config_js_1.writeConfig)(targetDir, { starterId: template }); | ||
| const gitInitialized = initGitRepo(targetDir); | ||
| return { targetDir, template, projectName, gitInitialized }; | ||
| } |
| export declare const VERSION_FALLBACK: { | ||
| readonly agent: "0.9.3"; | ||
| readonly tools: "0.26.1"; | ||
| readonly tools: "0.26.2"; | ||
| }; |
@@ -6,3 +6,3 @@ "use strict"; | ||
| agent: "0.9.3", | ||
| tools: "0.26.1", | ||
| tools: "0.26.2", | ||
| }; |
@@ -10,9 +10,10 @@ import { execFileSync } from "node:child_process"; | ||
| export function runTypecheck(sourceDir) { | ||
| const tscBin = path.join(sourceDir, "node_modules", ".bin", "tsc"); | ||
| if (!existsSync(tscBin)) { | ||
| const dir = path.resolve(sourceDir); | ||
| const tscScript = path.join(dir, "node_modules", "typescript", "bin", "tsc"); | ||
| if (!existsSync(tscScript)) { | ||
| return "typecheck skipped — TypeScript is not installed (run npm install first)"; | ||
| } | ||
| try { | ||
| execFileSync(tscBin, ["--noEmit"], { | ||
| cwd: sourceDir, | ||
| execFileSync(process.execPath, [tscScript, "--noEmit"], { | ||
| cwd: dir, | ||
| stdio: ["ignore", "pipe", "pipe"], | ||
@@ -19,0 +20,0 @@ }); |
@@ -8,2 +8,3 @@ export declare const CONFIG_FILE = "sapiom.json"; | ||
| forkId?: string; | ||
| starterId?: string; | ||
| repoFullName?: string; | ||
@@ -10,0 +11,0 @@ defaultBranch?: string; |
@@ -188,5 +188,5 @@ import { execFileSync } from "node:child_process"; | ||
| writeFileSync(path.join(devDir, "stubs.json"), JSON.stringify({ version: 1, steps: {} }, null, 2) + "\n"); | ||
| writeConfig(targetDir, {}); | ||
| writeConfig(targetDir, { starterId: template }); | ||
| const gitInitialized = initGitRepo(targetDir); | ||
| return { targetDir, template, projectName, gitInitialized }; | ||
| } |
| export declare const VERSION_FALLBACK: { | ||
| readonly agent: "0.9.3"; | ||
| readonly tools: "0.26.1"; | ||
| readonly tools: "0.26.2"; | ||
| }; |
| export const VERSION_FALLBACK = { | ||
| agent: "0.9.3", | ||
| tools: "0.26.1", | ||
| tools: "0.26.2", | ||
| }; |
+2
-2
| { | ||
| "name": "@sapiom/agent-core", | ||
| "version": "0.10.3", | ||
| "version": "0.10.4", | ||
| "description": "Pure, stateless core functions for scaffolding, validating, and operating Sapiom agents — shared by the CLI and MCP packages.", | ||
@@ -43,3 +43,3 @@ "license": "MIT", | ||
| "@sapiom/analytics-core": "^0.2.1", | ||
| "@sapiom/tools": "^0.26.1" | ||
| "@sapiom/tools": "^0.26.2" | ||
| }, | ||
@@ -46,0 +46,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
498547
0.2%5765
0.07%Updated