agentplugged 1.0.3 → 1.0.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.
- package/dist/agent-commands.js +16 -0
- package/dist/main.js +22 -0
- package/package.json +8 -8
package/dist/agent-commands.js
CHANGED
|
@@ -20035,6 +20035,17 @@ function compareSemver(a, b) {
|
|
|
20035
20035
|
}
|
|
20036
20036
|
return 0;
|
|
20037
20037
|
}
|
|
20038
|
+
/** The engine version `method.yaml` pins in the repository's main working folder, if readable. */
|
|
20039
|
+
async function mainCheckoutPin(files) {
|
|
20040
|
+
try {
|
|
20041
|
+
const text = await files.readMainCheckoutText?.(METHOD_CONFIG_PATH);
|
|
20042
|
+
if (text === void 0) return void 0;
|
|
20043
|
+
const version = parseDocument(text).toJS()?.engine_version;
|
|
20044
|
+
return SemverSchema.safeParse(version).success ? version : void 0;
|
|
20045
|
+
} catch {
|
|
20046
|
+
return;
|
|
20047
|
+
}
|
|
20048
|
+
}
|
|
20038
20049
|
/**
|
|
20039
20050
|
* Checks, before anything is written, that the running engine may work on this product:
|
|
20040
20051
|
* a `format_version` newer than the engine knows stops with `UPGRADE_REQUIRED`, an older one with
|
|
@@ -20077,6 +20088,11 @@ async function checkEngine(files, options) {
|
|
|
20077
20088
|
overridden: false,
|
|
20078
20089
|
older: false
|
|
20079
20090
|
};
|
|
20091
|
+
if (!options.upgrade && !options.engineAny && compareSemver(options.engineVersion, pinned) > 0 && await mainCheckoutPin(files) === options.engineVersion) return {
|
|
20092
|
+
pinned,
|
|
20093
|
+
overridden: false,
|
|
20094
|
+
older: false
|
|
20095
|
+
};
|
|
20080
20096
|
const details = {
|
|
20081
20097
|
path: METHOD_CONFIG_PATH,
|
|
20082
20098
|
pinned,
|
package/dist/main.js
CHANGED
|
@@ -6299,6 +6299,28 @@ var NodeWorkspaceFiles = class {
|
|
|
6299
6299
|
async readBytes(path) {
|
|
6300
6300
|
return new Uint8Array(await readFile(this.resolve(path)));
|
|
6301
6301
|
}
|
|
6302
|
+
async readMainCheckoutText(path) {
|
|
6303
|
+
try {
|
|
6304
|
+
const target = this.resolve(path);
|
|
6305
|
+
for (let top = this.root;; top = dirname(top)) {
|
|
6306
|
+
const marker = join(top, ".git");
|
|
6307
|
+
const info = await stat(marker).catch(() => void 0);
|
|
6308
|
+
if (info?.isDirectory() === true) return void 0;
|
|
6309
|
+
if (info?.isFile() === true) {
|
|
6310
|
+
const named = /^gitdir:\s*(.+?)\s*$/m.exec(await readFile(marker, "utf8"))?.[1];
|
|
6311
|
+
if (named === void 0) return void 0;
|
|
6312
|
+
const own = resolve(top, named);
|
|
6313
|
+
const common = resolve(own, (await readFile(join(own, "commondir"), "utf8")).trim());
|
|
6314
|
+
if (basename(common) !== ".git") return void 0;
|
|
6315
|
+
const main = join(dirname(common), relative(top, this.root));
|
|
6316
|
+
return await readFile(join(main, relative(this.root, target)), "utf8");
|
|
6317
|
+
}
|
|
6318
|
+
if (dirname(top) === top) return void 0;
|
|
6319
|
+
}
|
|
6320
|
+
} catch {
|
|
6321
|
+
return;
|
|
6322
|
+
}
|
|
6323
|
+
}
|
|
6302
6324
|
/**
|
|
6303
6325
|
* Writes to a temporary file next to the target, then renames it over the target. A symbolic
|
|
6304
6326
|
* link is followed, so the real file is replaced and the creator's link is kept.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentplugged",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Install the AgentPlugged method in a repository and make its agents callable from Claude Code, Codex, Antigravity/Gemini CLI and Cursor.",
|
|
5
5
|
"releaseSummary": "The engine updates itself: your session moves to a newer version between two calls, with nothing to reconnect.",
|
|
6
6
|
"license": "FSL-1.1-MIT",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"koffi": "~3.3.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@agentplugged/adapters-git": "1.0.
|
|
51
|
-
"@agentplugged/adapters-tools": "1.0.
|
|
52
|
-
"@agentplugged/core": "1.0.
|
|
53
|
-
"@agentplugged/crypto": "1.0.
|
|
54
|
-
"@agentplugged/i18n": "1.0.
|
|
55
|
-
"@agentplugged/mcp": "1.0.
|
|
50
|
+
"@agentplugged/adapters-git": "1.0.4",
|
|
51
|
+
"@agentplugged/adapters-tools": "1.0.4",
|
|
52
|
+
"@agentplugged/core": "1.0.4",
|
|
53
|
+
"@agentplugged/crypto": "1.0.4",
|
|
54
|
+
"@agentplugged/i18n": "1.0.4",
|
|
55
|
+
"@agentplugged/mcp": "1.0.4",
|
|
56
56
|
"@agentplugged/method": "0.0.0",
|
|
57
|
-
"@agentplugged/protocol": "1.0.
|
|
57
|
+
"@agentplugged/protocol": "1.0.4",
|
|
58
58
|
"@biomejs/biome": "~2.5.15",
|
|
59
59
|
"@modelcontextprotocol/client": "~2.3.0",
|
|
60
60
|
"@types/node": "^24.19.1",
|