@aegisagentics/agent 0.2.0 → 0.2.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/npm/install.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  detectCodexHome,
17
17
  prepareCodexPluginInstallTarget
18
18
  } from "./lib/codex-runtime.js";
19
- import { ensureNativeBinary } from "./lib/release-download.js";
19
+ import { ensureManagedRuntime } from "./lib/bootstrap-runtime.js";
20
20
 
21
21
  async function main() {
22
22
  const binaryPath = resolveBinaryPath();
@@ -38,7 +38,7 @@ async function main() {
38
38
 
39
39
  if (command.kind === "codex-plugin") {
40
40
  if (command.codexPluginAction === "install") {
41
- const status = await ensureBootstrapBinary(binaryPath);
41
+ const status = await ensureBootstrapBinary(binaryPath, "install");
42
42
  if (status !== 0) {
43
43
  return status;
44
44
  }
@@ -56,8 +56,8 @@ async function main() {
56
56
  codexPluginFailed = status !== 0;
57
57
  }
58
58
 
59
- if (!fs.existsSync(binaryPath) && command.nativeArgs[0] !== "uninstall") {
60
- const status = await ensureBootstrapBinary(binaryPath);
59
+ if (command.nativeArgs[0] !== "uninstall") {
60
+ const status = await ensureBootstrapBinary(binaryPath, command.nativeArgs[0]);
61
61
  if (status !== 0) {
62
62
  return status;
63
63
  }
@@ -95,15 +95,14 @@ async function main() {
95
95
  return codexPluginFailed ? 1 : 0;
96
96
  }
97
97
 
98
- async function ensureBootstrapBinary(binaryPath) {
99
- if (process.env.AEGIS_AGENT_BINARY_PATH) {
100
- return 0;
101
- }
102
- if (fs.existsSync(binaryPath) && process.env.AEGIS_AGENT_FORCE_BINARY_DOWNLOAD !== "1") {
103
- return 0;
104
- }
98
+ async function ensureBootstrapBinary(binaryPath, commandName) {
105
99
  try {
106
- const result = await ensureNativeBinary({ binaryPath });
100
+ const result = await ensureManagedRuntime({
101
+ binaryPath,
102
+ commandName,
103
+ binaryOverride: Boolean(process.env.AEGIS_AGENT_BINARY_PATH),
104
+ forceDownload: process.env.AEGIS_AGENT_FORCE_BINARY_DOWNLOAD === "1"
105
+ });
107
106
  if (result.downloaded) {
108
107
  console.log(`Downloaded Aegis Agent runtime: ${binaryPath}`);
109
108
  }
@@ -0,0 +1,23 @@
1
+ import fs from "node:fs";
2
+
3
+ import { ensureNativeBinary } from "./release-download.js";
4
+
5
+ export async function ensureManagedRuntime({
6
+ binaryPath,
7
+ commandName,
8
+ binaryOverride = false,
9
+ forceDownload = false,
10
+ download = ensureNativeBinary
11
+ }) {
12
+ if (binaryOverride || commandName === "uninstall") {
13
+ return { binaryPath, downloaded: false };
14
+ }
15
+
16
+ const refreshForInstall = commandName === "install";
17
+ const force = refreshForInstall || forceDownload;
18
+ if (fs.existsSync(binaryPath) && !force) {
19
+ return { binaryPath, downloaded: false };
20
+ }
21
+
22
+ return await download({ binaryPath, force });
23
+ }
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "schemaVersion": "aegis.agent_release_manifest.v1",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "releaseBaseUrl": "https://aegisagentics.com/releases/aegis-agent",
5
- "createdAt": "2026-10-01T08:54:06.769Z",
5
+ "createdAt": "2026-10-01T09:22:45.760Z",
6
6
  "artifacts": {
7
7
  "darwin-arm64": {
8
- "path": "versions/0.2.0/darwin-arm64/aegis-agent.tar.gz",
9
- "sha256": "be7c13efb0f6f644c44d4f4e8f00e79d7ed0853dec84e9628d05cccfc4eb1a3d",
10
- "sizeBytes": 2292252
8
+ "path": "versions/0.2.1/darwin-arm64/aegis-agent.tar.gz",
9
+ "sha256": "36a561e524273dc7c08b1388a01d6c5f0f43ffdcff0643ecc876e5194a54a608",
10
+ "sizeBytes": 2295321
11
11
  },
12
12
  "darwin-x64": {
13
- "path": "versions/0.2.0/darwin-x64/aegis-agent.tar.gz",
14
- "sha256": "b5e7b72a9128fa09e36ed81c8859643266fb2b0b2bbe2178c90f8684786f2f1e",
15
- "sizeBytes": 2392387
13
+ "path": "versions/0.2.1/darwin-x64/aegis-agent.tar.gz",
14
+ "sha256": "76b5bf4ad9bdd7cc036ae52cc4b8a741819c174b56fd39f43d9459ca72cd896a",
15
+ "sizeBytes": 2395547
16
16
  },
17
17
  "linux-x64": {
18
- "path": "versions/0.2.0/linux-x64/aegis-agent.tar.gz",
19
- "sha256": "ce394577fc7d835591f8a9514c571555c3fc20e21403ddf5980e3874b6808ce6",
20
- "sizeBytes": 2523841
18
+ "path": "versions/0.2.1/linux-x64/aegis-agent.tar.gz",
19
+ "sha256": "8d00dd70e95138263a94209bda17c17537371c3a1b2ec4b0971912fb0d0c4177",
20
+ "sizeBytes": 2526674
21
21
  }
22
22
  }
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aegisagentics/agent",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Aegis Agent local installer and hook runtime for Codex, Claude Code, Cursor, and OpenClaw.",
5
5
  "type": "module",
6
6
  "repository": {