@hivemagnus/magnus-agent 1.1.7 → 1.1.10
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/NOTICE +5 -0
- package/README.md +5 -0
- package/dist/agent.js +6 -2
- package/dist/ardent-context-bundle.json +1 -0
- package/dist/executors/ardent-context-adoption.d.ts +80 -0
- package/dist/executors/ardent-context-adoption.js +314 -0
- package/dist/executors/ardent-manager.d.ts +2 -0
- package/dist/executors/ardent-manager.js +72 -5
- package/dist/executors/command-executor.js +34 -7
- package/dist/executors/command-ledger.d.ts +81 -2
- package/dist/executors/command-ledger.js +162 -11
- package/dist/executors/command-refusal.d.ts +43 -0
- package/dist/executors/command-refusal.js +32 -0
- package/dist/executors/cron-manager.js +23 -9
- package/dist/executors/enrollment-drain.js +4 -2
- package/dist/executors/managed-http.js +58 -17
- package/dist/security/command-result-signature.d.ts +42 -0
- package/dist/security/command-result-signature.js +19 -0
- package/dist/security/managed-context.d.ts +2 -0
- package/dist/upgrade/preflight.d.ts +28 -0
- package/dist/upgrade/preflight.js +62 -0
- package/dist/upgrade/routes.js +18 -3
- package/dist/upgrade/self-upgrade.d.ts +41 -4
- package/dist/upgrade/self-upgrade.js +112 -18
- package/package.json +5 -3
package/NOTICE
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Magnus includes a context-only adoption bundle containing Emberfold 0.1.0.
|
|
2
|
+
Emberfold is licensed under Apache-2.0.
|
|
3
|
+
Source: https://github.com/ChefTaco/emberfold
|
|
4
|
+
Its LICENSE and NOTICE are retained in the bundle and installed with the engine.
|
|
5
|
+
The bundle also contains Zod 4.6.7 under the MIT license, retained with Zod.
|
package/README.md
CHANGED
|
@@ -263,6 +263,11 @@ its name, for example `MAGNUS_AGENT_ARDENT_PACKAGES=@hivemagnus/ardent,@legacy-s
|
|
|
263
263
|
Older sidecars with the `{name, version, sha256}` shape are accepted unchanged.
|
|
264
264
|
Profile channel maps accept any channel key that matches `[a-z][a-z0-9_-]{0,31}`.
|
|
265
265
|
|
|
266
|
+
For adopting Emberfold without replacing the existing runtime, see
|
|
267
|
+
[context-only Ardent adoption](../../docs/ARDENT_CONTEXT_ADOPTION.md). The release
|
|
268
|
+
bundles the exact context adapter and engine; managed staging verifies continuity
|
|
269
|
+
in isolated data before activation exercises an actual old-runtime rollback.
|
|
270
|
+
|
|
266
271
|
## Development
|
|
267
272
|
|
|
268
273
|
```bash
|
package/dist/agent.js
CHANGED
|
@@ -7,6 +7,7 @@ import { controlApiFetch } from './tls.js';
|
|
|
7
7
|
import { startSpan, formatTraceparent } from './collectors/otel-collector.js';
|
|
8
8
|
import { collectHermesState } from './executors/hermes-manager.js';
|
|
9
9
|
import { existsSync } from 'node:fs';
|
|
10
|
+
import { heartbeatDrift } from './upgrade/preflight.js';
|
|
10
11
|
import { confirmTrial, controlApiUnreachable, recordTrialAlive, selfUpgradeStatus, trialOf } from './upgrade/self-upgrade.js';
|
|
11
12
|
import { commandLedger } from './executors/command-executor.js';
|
|
12
13
|
const HEARTBEAT_INTERVAL_MS = 30_000; // 30s
|
|
@@ -77,8 +78,11 @@ async function collectHealthWithDeadline() {
|
|
|
77
78
|
}
|
|
78
79
|
/** Self-upgrade status for the heartbeat, with the sticky local enrollment marker. */
|
|
79
80
|
async function heartbeatSelfUpgrade() {
|
|
80
|
-
const
|
|
81
|
-
|
|
81
|
+
const marker = await commandLedger.enrollmentMarker();
|
|
82
|
+
if (marker.error)
|
|
83
|
+
logger.warn(`Local enrollment marker could not be read: ${marker.error}`);
|
|
84
|
+
return { ...selfUpgradeStatus(AGENT_VERSION), ...heartbeatDrift(commandLedger),
|
|
85
|
+
managedEnrollment: marker.marker ? { nodeId: marker.marker.nodeId, nodeFqdn: marker.marker.nodeFqdn } : null, managedEnrollmentState: marker.state };
|
|
82
86
|
}
|
|
83
87
|
/** Stop the heartbeat loop. */
|
|
84
88
|
export function stopHeartbeatLoop() {
|