🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@sapiom/agent-core

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sapiom/agent-core - npm Package Compare versions

Comparing version
0.10.1
to
0.10.2
+9
-0
CHANGELOG.md
# @sapiom/orchestration-core
## 0.10.2
### Patch Changes
- 87636c1: Make bundled starters work from a fresh Agent Studio session by preserving Studio-owned state, writing the project discovery marker, and handing Claude the local scaffold MCP tool directly.
- Updated dependencies [cc1ac0c]
- @sapiom/tools@0.26.0
- @sapiom/agent@0.9.3
## 0.10.1

@@ -4,0 +13,0 @@

+16
-1

@@ -16,2 +16,3 @@ "use strict";

const node_url_1 = require("node:url");
const config_js_1 = require("./config.js");
const errors_js_1 = require("./errors.js");

@@ -115,2 +116,4 @@ const version_fallback_generated_js_1 = require("./version-fallback.generated.js");

const full = node_path_1.default.join(dir, entry);
if (entry === ".sapiom" && (0, node_fs_1.lstatSync)(full).isDirectory())
continue;
if ((0, node_fs_1.statSync)(full).isDirectory())

@@ -122,2 +125,13 @@ walk(full, onFile);

}
function isScaffoldableTarget(targetDir) {
if (!(0, node_fs_1.existsSync)(targetDir))
return true;
const entries = (0, node_fs_1.readdirSync)(targetDir);
if (entries.length === 0)
return true;
if (entries.length !== 1 || entries[0] !== ".sapiom")
return false;
const studioState = (0, node_fs_1.lstatSync)(node_path_1.default.join(targetDir, ".sapiom"));
return studioState.isDirectory() && !studioState.isSymbolicLink();
}
function copyTemplate(templateDir, targetDir, replacements) {

@@ -164,3 +178,3 @@ (0, node_fs_1.cpSync)(templateDir, targetDir, { recursive: true });

const projectName = opts.projectName ?? node_path_1.default.basename(targetDir);
if ((0, node_fs_1.existsSync)(targetDir) && (0, node_fs_1.readdirSync)(targetDir).length > 0) {
if (!isScaffoldableTarget(targetDir)) {
throw new errors_js_1.AgentOperationError({

@@ -189,4 +203,5 @@ code: "DIR_NOT_EMPTY",

(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, {});
const gitInitialized = initGitRepo(targetDir);
return { targetDir, template, projectName, gitInitialized };
}
+2
-2
export declare const VERSION_FALLBACK: {
readonly agent: "0.9.2";
readonly tools: "0.25.0";
readonly agent: "0.9.3";
readonly tools: "0.26.0";
};

@@ -5,4 +5,4 @@ "use strict";

exports.VERSION_FALLBACK = {
agent: "0.9.2",
tools: "0.25.0",
agent: "0.9.3",
tools: "0.26.0",
};
import { execFileSync } from "node:child_process";
import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, statSync, writeFileSync, } from "node:fs";
import { cpSync, existsSync, lstatSync, mkdirSync, readdirSync, readFileSync, renameSync, statSync, writeFileSync, } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { writeConfig } from "./config.js";
import { AgentOperationError } from "./errors.js";

@@ -103,2 +104,4 @@ import { VERSION_FALLBACK } from "./version-fallback.generated.js";

const full = path.join(dir, entry);
if (entry === ".sapiom" && lstatSync(full).isDirectory())
continue;
if (statSync(full).isDirectory())

@@ -110,2 +113,13 @@ walk(full, onFile);

}
function isScaffoldableTarget(targetDir) {
if (!existsSync(targetDir))
return true;
const entries = readdirSync(targetDir);
if (entries.length === 0)
return true;
if (entries.length !== 1 || entries[0] !== ".sapiom")
return false;
const studioState = lstatSync(path.join(targetDir, ".sapiom"));
return studioState.isDirectory() && !studioState.isSymbolicLink();
}
function copyTemplate(templateDir, targetDir, replacements) {

@@ -152,3 +166,3 @@ cpSync(templateDir, targetDir, { recursive: true });

const projectName = opts.projectName ?? path.basename(targetDir);
if (existsSync(targetDir) && readdirSync(targetDir).length > 0) {
if (!isScaffoldableTarget(targetDir)) {
throw new AgentOperationError({

@@ -177,4 +191,5 @@ code: "DIR_NOT_EMPTY",

writeFileSync(path.join(devDir, "stubs.json"), JSON.stringify({ version: 1, steps: {} }, null, 2) + "\n");
writeConfig(targetDir, {});
const gitInitialized = initGitRepo(targetDir);
return { targetDir, template, projectName, gitInitialized };
}
export declare const VERSION_FALLBACK: {
readonly agent: "0.9.2";
readonly tools: "0.25.0";
readonly agent: "0.9.3";
readonly tools: "0.26.0";
};
export const VERSION_FALLBACK = {
agent: "0.9.2",
tools: "0.25.0",
agent: "0.9.3",
tools: "0.26.0",
};
{
"name": "@sapiom/agent-core",
"version": "0.10.1",
"version": "0.10.2",
"description": "Pure, stateless core functions for scaffolding, validating, and operating Sapiom agents — shared by the CLI and MCP packages.",

@@ -40,6 +40,6 @@ "license": "MIT",

"esbuild": "^0.28.1",
"@sapiom/agent": "^0.9.2",
"@sapiom/agent": "^0.9.3",
"@sapiom/agent-runtime": "^0.4.3",
"@sapiom/analytics-core": "^0.2.1",
"@sapiom/tools": "^0.25.0"
"@sapiom/tools": "^0.26.0"
},

@@ -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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet