@noxsoft/anima 3.0.0 → 3.0.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/dist/{accounts-4HFzweNO.js → accounts-ZMhj636e.js} +38 -38
- package/dist/{acp-cli-CHsShBeX.js → acp-cli-PhWp41mc.js} +2 -2
- package/dist/{agent-rY3gCqJE.js → agent-DvWSUuKy.js} +1 -1
- package/dist/{agent-events-BiKKV3wj.js → agent-events-iR_gRjZA.js} +2 -2
- package/dist/{agent-scope-BXuH9s05.js → agent-scope-DWKQJUUZ.js} +3 -3
- package/dist/{agents-GDJBET4Z.js → agents-DAg3VWr9.js} +1 -1
- package/dist/{audit-B_3ewOwt.js → audit-Cm50mcVm.js} +3 -3
- package/dist/{auth-choice-BTMheCDo.js → auth-choice-CPDNhDPT.js} +17 -4
- package/dist/{auth-profiles-xk_1uopf.js → auth-profiles-BqrAPweI.js} +9 -9
- package/dist/{auth-store-Bis9WSLR.js → auth-store-eNVxoq_h.js} +13 -13
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +22 -22
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +8 -8
- package/dist/{call-BBzfZU0_.js → call-C0Yk2qNb.js} +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-web-BBctXTmi.js → channel-web-Co4IvTdB.js} +5 -5
- package/dist/{chrome-CVfcErE4.js → chrome-_87P03u5.js} +7 -7
- package/dist/{chrome-C1KpzLwu.js → chrome-s7nTgmbn.js} +12 -12
- package/dist/{chunk-Cguey_55.js → chunk-lDG_8LI5.js} +2 -2
- package/dist/{clack-prompter-S0pujJNH.js → clack-prompter-DXovYg0Q.js} +1 -1
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-B2StCcqh.js → cli-BkI8EYn3.js} +9 -9
- package/dist/{client-oEG5cM5Q.js → client-BM5PkIwQ.js} +3 -3
- package/dist/{command-registry-D5y3Nn9i.js → command-registry-Cl3Z-qsS.js} +7 -7
- package/dist/{common-DgcMt-pi.js → common-DbouukNi.js} +2 -2
- package/dist/{completion-cli-CDsbJ-p2.js → completion-cli-BB3_g8w5.js} +1 -1
- package/dist/{completion-cli-CqZwlvs2.js → completion-cli-DcTEhrAe.js} +2 -2
- package/dist/{config-CrQw7iqE.js → config-H_VHtPeY.js} +27 -27
- package/dist/{config-cli-Brwjz25Y.js → config-cli-DCNRWoyW.js} +1 -1
- package/dist/{config-cli-CaUpfkTl.js → config-cli-VB37XAkf.js} +1 -1
- package/dist/{configure-B_PLPDkP.js → configure-CkmVabju.js} +5 -5
- package/dist/{configure-QwZPOdBf.js → configure-Du07BFtQ.js} +1 -1
- package/dist/{control-service-DptjbgYI.js → control-service-BpEnt1xS.js} +3 -3
- package/dist/{cron-cli-CpzhiW5t.js → cron-cli-BT0i4_jA.js} +3 -3
- package/dist/{daemon-cli-CV9nly9k.js → daemon-cli-DlHFi5Gm.js} +2 -2
- package/dist/{deliver-Bri9Y1qG.js → deliver-DyQtnfXd.js} +14 -14
- package/dist/{deps-DcinYE4_.js → deps-DoPMG4GI.js} +1 -1
- package/dist/{dispatcher-CiJKNMU3.js → dispatcher-wmQlHNsm.js} +1 -1
- package/dist/{doctor-qFADypWz.js → doctor-BxzkshQH.js} +1 -1
- package/dist/{doctor-BDWGCEMG.js → doctor-C3foAiuj.js} +6 -6
- package/dist/{doctor-completion-DguJOZqA.js → doctor-completion-CZgNNZVd.js} +1 -1
- package/dist/{doctor-completion-BY4djQTY.js → doctor-completion-VtjYTwcS.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{exec-DJTRaYS6.js → exec-CK8CHr7j.js} +7 -7
- package/dist/{exec-approvals-cli-ESNXHzjZ.js → exec-approvals-cli-CAwe3fFV.js} +3 -3
- package/dist/{frontmatter-DDYuWuK5.js → frontmatter-BBFYH_d2.js} +2 -2
- package/dist/{gateway-cli-B091bAD6.js → gateway-cli-BKmCrkp2.js} +26 -26
- package/dist/{gateway-cli-CUmQFMSU.js → gateway-cli-D0mD_UV8.js} +6 -6
- package/dist/{gateway-rpc-hgK9OB-O.js → gateway-rpc-elmeRwyu.js} +1 -1
- package/dist/{health-CH8yZB2L.js → health-Cb_2WS_Z.js} +3 -3
- package/dist/{hooks-cli-DBAcPJTk.js → hooks-cli-BkaD_Vnq.js} +10 -10
- package/dist/{image-ops-ZMEg1-kE.js → image-ops-DJjERl7d.js} +2 -2
- package/dist/index.js +17 -17
- package/dist/json-file-Dvrir7_o.js +25 -0
- package/dist/llm-slug-generator.js +5 -5
- package/dist/{login-Bdyk0es6.js → login-CBsXoiD_.js} +1 -1
- package/dist/{login-DP5hIYxG.js → login-CdRss5_H.js} +5 -5
- package/dist/{login-qr-DOt_1aAq.js → login-qr-DoNanonP.js} +10 -10
- package/dist/{login-qr-DQS-8_PV.js → login-qr-aHN20jEV.js} +1 -1
- package/dist/{logs-cli-VAcUvvxS.js → logs-cli-DbdMIph-.js} +3 -3
- package/dist/{manager-CHN3-66K.js → manager-BlXVqzLP.js} +14 -14
- package/dist/{model-auth-C4Jglp-Y.js → model-auth-ChSwMwh7.js} +3 -3
- package/dist/{model-selection-BsVvfxCt.js → model-selection-DPoLkg_t.js} +1 -1
- package/dist/{node-cli-BujxFy1-.js → node-cli-Bcrlhaq3.js} +6 -6
- package/dist/{onboard-B006xiEP.js → onboard-5GREpC8E.js} +5 -5
- package/dist/{onboard-BqpDno7i.js → onboard-D8Khq7CJ.js} +2 -2
- package/dist/{onboard-channels-BQ5lwRDU.js → onboard-channels-CuDv5j-L.js} +1 -1
- package/dist/{onboard-helpers-K7wUCSoE.js → onboard-helpers-CMW6MSXA.js} +1 -1
- package/dist/{onboarding-DXQ0Qtq6.js → onboarding-B_Gs5W53.js} +6 -6
- package/dist/{onboarding-BLFJufto.js → onboarding-CGG6jZ0y.js} +3 -3
- package/dist/{outbound-DdFghG1N.js → outbound-DK71dddk.js} +6 -6
- package/dist/{paths-OaazGgrn.js → paths-CmZenvlb.js} +2 -2
- package/dist/{paths-B-AkG5FD.js → paths-D2eokayo.js} +3 -3
- package/dist/{pi-auth-json-CYnJfuU-.js → pi-auth-json-BYN-DI5a.js} +7 -7
- package/dist/{pi-embedded-helpers-CeMv9QXO.js → pi-embedded-helpers-CvYnWzAn.js} +44 -44
- package/dist/{plugin-registry-BsdLXCVX.js → plugin-registry-CIluPn2C.js} +1 -1
- package/dist/{plugins-cli-OPa7o4qd.js → plugins-cli-CgSDRx-C.js} +10 -10
- package/dist/{program-CzWSwu9I.js → program-Dk1iylK1.js} +2 -2
- package/dist/{program-context-C8DYJdS-.js → program-context-r2WimvLs.js} +23 -23
- package/dist/{prompts-Cm8eJ-i3.js → prompts-BT5ztuUd.js} +17 -4
- package/dist/{pw-ai-DVQKx_ca.js → pw-ai-q5Enhcu7.js} +4 -4
- package/dist/{pw-ai-Rz1I4vvf.js → pw-ai-ycVS073z.js} +1 -1
- package/dist/{qmd-manager-lcdr9Faq.js → qmd-manager-D_lZFetA.js} +7 -7
- package/dist/{register.agent-DY1YeTsP.js → register.agent-BCbrZgZT.js} +15 -15
- package/dist/{register.agent-B_gLj3iW.js → register.agent-sq78vQTz.js} +2 -2
- package/dist/{register.configure-BHsLGGdB.js → register.configure-CM8ScF9N.js} +15 -15
- package/dist/{register.configure-De5ZyOFg.js → register.configure-w6Ptx3C9.js} +2 -2
- package/dist/{register.maintenance-DSQmEYe7.js → register.maintenance-B15nWIhc.js} +16 -16
- package/dist/{register.maintenance-Bcb2lf7H.js → register.maintenance-Chm2rk_s.js} +5 -5
- package/dist/{register.onboard-COEVeozO.js → register.onboard-B7Ozkx53.js} +7 -7
- package/dist/{register.onboard-DUWYMOX1.js → register.onboard-k9Rd9qzS.js} +19 -19
- package/dist/{register.setup-D__YdHzY.js → register.setup-BId1QGzk.js} +7 -7
- package/dist/{register.setup-fJdxj_9G.js → register.setup-CN1yxMOl.js} +19 -19
- package/dist/{register.status-health-sessions-BsGFhOsG.js → register.status-health-sessions-CNUs9w8v.js} +13 -13
- package/dist/{register.subclis-D2HE_7Rz.js → register.subclis-N7uAMRX_.js} +3 -3
- package/dist/{reply-B5IU75jY.js → reply-BJ3jrefM.js} +12 -12
- package/dist/{reply-prefix-B90kjTag.js → reply-prefix-DBJU0o4f.js} +2 -2
- package/dist/{routes-D7OuiEUz.js → routes-CNqS9gOj.js} +2 -2
- package/dist/{run-main-BTol0uPD.js → run-main-DA4rt9qc.js} +6 -6
- package/dist/{sandbox-cli-CRzBRQ9r.js → sandbox-cli-BsMjNBFN.js} +3 -3
- package/dist/{security-cli-CVkFh9a9.js → security-cli-pupt3tx1.js} +6 -6
- package/dist/{semantic-BTp-RtM8.js → semantic-BcioSN1d.js} +1 -1
- package/dist/{server-context-CHGGYs6i.js → server-context-CcPmRFx_.js} +4 -4
- package/dist/{server-node-events-DMEsGLU8.js → server-node-events-DNDwVJH_.js} +5 -5
- package/dist/{session-BpAyGjL3.js → session-D53RZP3i.js} +6 -6
- package/dist/{session-CzBccNiw.js → session-DTRcP2Sj.js} +1 -1
- package/dist/{shell-env-5vFwNQcz.js → shell-env-BBHdjHEl.js} +1 -1
- package/dist/{soul-D4rF0iXu.js → soul-CXGTzaKZ.js} +1 -1
- package/dist/{sqlite-B3u2TqVF.js → sqlite-B-dYyac7.js} +4 -4
- package/dist/{status-CHuLEuXT.js → status-DNUP2mgR.js} +5 -5
- package/dist/{status-CTYln2fY.js → status-DYGeQK4c.js} +1 -1
- package/dist/{subagent-registry-jwfG4kCT.js → subagent-registry-D4idxv3D.js} +1 -1
- package/dist/{subagent-registry-xUCd2ZX9.js → subagent-registry-DjB3VS5s.js} +28 -28
- package/dist/{subsystem-BlEuMJjX.js → subsystem-CJTCKTwb.js} +13 -13
- package/dist/{system-cli-C8kg1fwg.js → system-cli-BNhplLHn.js} +3 -3
- package/dist/{tool-images-2qKyjXUj.js → tool-images-DBOSl4NL.js} +2 -2
- package/dist/{tui-cli-CypnMid4.js → tui-cli-ByERfWnP.js} +6 -6
- package/dist/{tui-DBbVe-hW.js → tui-dHcni7fC.js} +2 -2
- package/dist/{update-cli-CATjbP1k.js → update-cli-CGVsahIi.js} +5 -5
- package/dist/{update-cli-C6zUK6ap.js → update-cli-D7SyNIoQ.js} +17 -17
- package/dist/{update-runner-B-JShOyr.js → update-runner-DeNUEGyr.js} +1 -1
- package/dist/{usage-kmpmqBES.js → usage-DSZ_juox.js} +20 -20
- package/dist/{web-CTS-vEIT.js → web-DY2TrPoD.js} +86 -86
- package/dist/{web-EevNfpKp.js → web-DyUoZrMO.js} +13 -13
- package/dist/{whatsapp-actions-qDftmVCc.js → whatsapp-actions-B_fglZZt.js} +13 -13
- package/dist/{workspace-CZlo4alz.js → workspace-xzxJwPTB.js} +5 -5
- package/package.json +2 -1
- package/dist/json-file-CZ3ssFR9.js +0 -25
- /package/dist/{config-Btt1rkoB.js → config-COtiNNtV.js} +0 -0
- /package/dist/{input-provenance-B0pwc6mp.js → input-provenance-MbkIKHHL.js} +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { i as resolveGatewayPort, t as STATE_DIR } from "./paths-
|
|
2
|
-
import { E as resolveAgentIdFromSessionKey, T as normalizeMainKey, _ as DEFAULT_AGENT_ID, a as DEFAULT_IDENTITY_FILENAME, c as DEFAULT_USER_FILENAME, h as resolveAnimaPackageRootSync, i as DEFAULT_HEARTBEAT_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SOUL_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME, w as normalizeAgentId, y as buildAgentMainSessionKey } from "./workspace-
|
|
3
|
-
import { j as resolvePreferredAnimaTmpDir, l as getChatChannelMeta, m as requireActivePluginRegistry, n as defaultRuntime, o as CHANNEL_IDS, s as CHAT_CHANNEL_ORDER, t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import { S as resolveConfigDir, b as normalizeE164, j as truncateUtf16Safe, l as CONFIG_DIR, m as escapeRegExp, n as runExec, w as resolveUserPath } from "./exec-
|
|
5
|
-
import { l as resolveSessionAgentId, n as resolveAgentConfig } from "./agent-scope-
|
|
6
|
-
import { A as normalizeMessageChannel, C as normalizeChannelId, a as resizeToJpeg, k as listDeliverableMessageChannels, n as getImageMetadata, o as detectMime, s as extensionForMime } from "./image-ops-
|
|
7
|
-
import { a as writeConfigFile, c as parseDurationMs, h as resolveMemorySlotDecision, m as resolveEnableState, n as loadConfig, p as normalizePluginsConfig, s as parseByteSize, t as createConfigIO, u as loadPluginManifestRegistry } from "./config-
|
|
1
|
+
import { i as resolveGatewayPort, t as STATE_DIR } from "./paths-D2eokayo.js";
|
|
2
|
+
import { E as resolveAgentIdFromSessionKey, T as normalizeMainKey, _ as DEFAULT_AGENT_ID, a as DEFAULT_IDENTITY_FILENAME, c as DEFAULT_USER_FILENAME, h as resolveAnimaPackageRootSync, i as DEFAULT_HEARTBEAT_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SOUL_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME, w as normalizeAgentId, y as buildAgentMainSessionKey } from "./workspace-xzxJwPTB.js";
|
|
3
|
+
import { j as resolvePreferredAnimaTmpDir, l as getChatChannelMeta, m as requireActivePluginRegistry, n as defaultRuntime, o as CHANNEL_IDS, s as CHAT_CHANNEL_ORDER, t as createSubsystemLogger } from "./subsystem-CJTCKTwb.js";
|
|
4
|
+
import { S as resolveConfigDir, b as normalizeE164, j as truncateUtf16Safe, l as CONFIG_DIR, m as escapeRegExp, n as runExec, w as resolveUserPath } from "./exec-CK8CHr7j.js";
|
|
5
|
+
import { l as resolveSessionAgentId, n as resolveAgentConfig } from "./agent-scope-DWKQJUUZ.js";
|
|
6
|
+
import { A as normalizeMessageChannel, C as normalizeChannelId, a as resizeToJpeg, k as listDeliverableMessageChannels, n as getImageMetadata, o as detectMime, s as extensionForMime } from "./image-ops-DJjERl7d.js";
|
|
7
|
+
import { a as writeConfigFile, c as parseDurationMs, h as resolveMemorySlotDecision, m as resolveEnableState, n as loadConfig, p as normalizePluginsConfig, s as parseByteSize, t as createConfigIO, u as loadPluginManifestRegistry } from "./config-H_VHtPeY.js";
|
|
8
8
|
import { t as parseBooleanValue } from "./boolean-BsqeuxE6.js";
|
|
9
|
-
import { n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-
|
|
9
|
+
import { n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-CmZenvlb.js";
|
|
10
10
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-D0hT93vo.js";
|
|
11
|
-
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, C as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, D as DEFAULT_ANIMA_BROWSER_ENABLED, E as DEFAULT_ANIMA_BROWSER_COLOR, O as DEFAULT_ANIMA_BROWSER_PROFILE_NAME, T as DEFAULT_AI_SNAPSHOT_MAX_CHARS, _ as ensureChromeExtensionRelayServer, a as resolveAnimaUserDataDir, b as isLoopbackHost, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, h as getHeadersWithAuth, i as launchAnimaChrome, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, n as isChromeCdpReady, o as stopAnimaChrome, p as appendCdpPath, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as stopChromeExtensionRelayServer, w as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS } from "./chrome-
|
|
12
|
-
import { a as parseFrontmatterBlock, c as resolveRuntimePlatform, i as resolveAnimaManifestBlock, n as normalizeStringList, o as hasBinary, r as parseFrontmatterBool, s as isConfigPathTruthyWithDefaults, t as getFrontmatterString } from "./frontmatter-
|
|
11
|
+
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, C as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, D as DEFAULT_ANIMA_BROWSER_ENABLED, E as DEFAULT_ANIMA_BROWSER_COLOR, O as DEFAULT_ANIMA_BROWSER_PROFILE_NAME, T as DEFAULT_AI_SNAPSHOT_MAX_CHARS, _ as ensureChromeExtensionRelayServer, a as resolveAnimaUserDataDir, b as isLoopbackHost, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, h as getHeadersWithAuth, i as launchAnimaChrome, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, n as isChromeCdpReady, o as stopAnimaChrome, p as appendCdpPath, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as stopChromeExtensionRelayServer, w as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS } from "./chrome-s7nTgmbn.js";
|
|
12
|
+
import { a as parseFrontmatterBlock, c as resolveRuntimePlatform, i as resolveAnimaManifestBlock, n as normalizeStringList, o as hasBinary, r as parseFrontmatterBool, s as isConfigPathTruthyWithDefaults, t as getFrontmatterString } from "./frontmatter-BBFYH_d2.js";
|
|
13
13
|
import { n as formatErrorMessage, t as extractErrorCode } from "./errors-DzK5Mvu0.js";
|
|
14
14
|
import fs from "node:fs/promises";
|
|
15
15
|
import os from "node:os";
|
|
16
16
|
import path from "node:path";
|
|
17
|
-
import
|
|
17
|
+
import fsSync, { existsSync } from "node:fs";
|
|
18
18
|
import { spawn } from "node:child_process";
|
|
19
19
|
import { fileURLToPath } from "node:url";
|
|
20
20
|
import crypto from "node:crypto";
|
|
@@ -492,7 +492,7 @@ function releaseAllLocksSync() {
|
|
|
492
492
|
if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
|
|
493
493
|
} catch {}
|
|
494
494
|
try {
|
|
495
|
-
|
|
495
|
+
fsSync.rmSync(held.lockPath, { force: true });
|
|
496
496
|
} catch {}
|
|
497
497
|
HELD_LOCKS.delete(sessionFile);
|
|
498
498
|
}
|
|
@@ -714,7 +714,7 @@ function isCacheEnabled(ttlMs) {
|
|
|
714
714
|
}
|
|
715
715
|
function getFileMtimeMs(filePath) {
|
|
716
716
|
try {
|
|
717
|
-
return
|
|
717
|
+
return fsSync.statSync(filePath).mtimeMs;
|
|
718
718
|
} catch {
|
|
719
719
|
return;
|
|
720
720
|
}
|
|
@@ -791,7 +791,7 @@ function loadSessionStore(storePath, opts = {}) {
|
|
|
791
791
|
let store = {};
|
|
792
792
|
let mtimeMs = getFileMtimeMs(storePath);
|
|
793
793
|
try {
|
|
794
|
-
const raw =
|
|
794
|
+
const raw = fsSync.readFileSync(storePath, "utf-8");
|
|
795
795
|
const parsed = JSON.parse(raw);
|
|
796
796
|
if (isSessionStoreRecord(parsed)) store = parsed;
|
|
797
797
|
mtimeMs = getFileMtimeMs(storePath) ?? mtimeMs;
|
|
@@ -929,7 +929,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
|
|
|
929
929
|
}
|
|
930
930
|
async function getSessionFileSize(storePath) {
|
|
931
931
|
try {
|
|
932
|
-
return (await
|
|
932
|
+
return (await fsSync.promises.stat(storePath)).size;
|
|
933
933
|
} catch {
|
|
934
934
|
return null;
|
|
935
935
|
}
|
|
@@ -946,7 +946,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
946
946
|
if (fileSize <= maxBytes) return false;
|
|
947
947
|
const backupPath = `${storePath}.bak.${Date.now()}`;
|
|
948
948
|
try {
|
|
949
|
-
await
|
|
949
|
+
await fsSync.promises.rename(storePath, backupPath);
|
|
950
950
|
log$1.info("rotated session store file", {
|
|
951
951
|
backupPath: path.basename(backupPath),
|
|
952
952
|
sizeBytes: fileSize
|
|
@@ -957,11 +957,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
957
957
|
try {
|
|
958
958
|
const dir = path.dirname(storePath);
|
|
959
959
|
const baseName = path.basename(storePath);
|
|
960
|
-
const backups = (await
|
|
960
|
+
const backups = (await fsSync.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
|
|
961
961
|
const maxBackups = 3;
|
|
962
962
|
if (backups.length > maxBackups) {
|
|
963
963
|
const toDelete = backups.slice(maxBackups);
|
|
964
|
-
for (const old of toDelete) await
|
|
964
|
+
for (const old of toDelete) await fsSync.promises.unlink(path.join(dir, old)).catch(() => void 0);
|
|
965
965
|
log$1.info("cleaned up old session store backups", { deleted: toDelete.length });
|
|
966
966
|
}
|
|
967
967
|
} catch {}
|
|
@@ -998,11 +998,11 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
998
998
|
await rotateSessionFile(storePath, maintenance.rotateBytes);
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
|
-
await
|
|
1001
|
+
await fsSync.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
1002
1002
|
const json = JSON.stringify(store, null, 2);
|
|
1003
1003
|
if (process.platform === "win32") {
|
|
1004
1004
|
try {
|
|
1005
|
-
await
|
|
1005
|
+
await fsSync.promises.writeFile(storePath, json, "utf-8");
|
|
1006
1006
|
} catch (err) {
|
|
1007
1007
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") return;
|
|
1008
1008
|
throw err;
|
|
@@ -1011,21 +1011,21 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
1013
1013
|
try {
|
|
1014
|
-
await
|
|
1014
|
+
await fsSync.promises.writeFile(tmp, json, {
|
|
1015
1015
|
mode: 384,
|
|
1016
1016
|
encoding: "utf-8"
|
|
1017
1017
|
});
|
|
1018
|
-
await
|
|
1019
|
-
await
|
|
1018
|
+
await fsSync.promises.rename(tmp, storePath);
|
|
1019
|
+
await fsSync.promises.chmod(storePath, 384);
|
|
1020
1020
|
} catch (err) {
|
|
1021
1021
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") {
|
|
1022
1022
|
try {
|
|
1023
|
-
await
|
|
1024
|
-
await
|
|
1023
|
+
await fsSync.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
1024
|
+
await fsSync.promises.writeFile(storePath, json, {
|
|
1025
1025
|
mode: 384,
|
|
1026
1026
|
encoding: "utf-8"
|
|
1027
1027
|
});
|
|
1028
|
-
await
|
|
1028
|
+
await fsSync.promises.chmod(storePath, 384);
|
|
1029
1029
|
} catch (err2) {
|
|
1030
1030
|
if ((err2 && typeof err2 === "object" && "code" in err2 ? String(err2.code) : null) === "ENOENT") return;
|
|
1031
1031
|
throw err2;
|
|
@@ -1034,7 +1034,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
throw err;
|
|
1036
1036
|
} finally {
|
|
1037
|
-
await
|
|
1037
|
+
await fsSync.promises.rm(tmp, { force: true });
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
1040
|
async function updateSessionStore(storePath, mutator, opts) {
|
|
@@ -1252,8 +1252,8 @@ function resolveMirroredTranscriptText(params) {
|
|
|
1252
1252
|
return trimmed ? trimmed : null;
|
|
1253
1253
|
}
|
|
1254
1254
|
async function ensureSessionHeader(params) {
|
|
1255
|
-
if (
|
|
1256
|
-
await
|
|
1255
|
+
if (fsSync.existsSync(params.sessionFile)) return;
|
|
1256
|
+
await fsSync.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
|
|
1257
1257
|
const header = {
|
|
1258
1258
|
type: "session",
|
|
1259
1259
|
version: CURRENT_SESSION_VERSION,
|
|
@@ -1261,7 +1261,7 @@ async function ensureSessionHeader(params) {
|
|
|
1261
1261
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1262
1262
|
cwd: process.cwd()
|
|
1263
1263
|
};
|
|
1264
|
-
await
|
|
1264
|
+
await fsSync.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
|
|
1265
1265
|
}
|
|
1266
1266
|
async function appendAssistantMessageToSessionTranscript(params) {
|
|
1267
1267
|
const sessionKey = params.sessionKey.trim();
|
|
@@ -2202,13 +2202,13 @@ function shortPath(value) {
|
|
|
2202
2202
|
//#region src/agents/skills/bundled-dir.ts
|
|
2203
2203
|
function looksLikeSkillsDir(dir) {
|
|
2204
2204
|
try {
|
|
2205
|
-
const entries =
|
|
2205
|
+
const entries = fsSync.readdirSync(dir, { withFileTypes: true });
|
|
2206
2206
|
for (const entry of entries) {
|
|
2207
2207
|
if (entry.name.startsWith(".")) continue;
|
|
2208
2208
|
const fullPath = path.join(dir, entry.name);
|
|
2209
2209
|
if (entry.isFile() && entry.name.endsWith(".md")) return true;
|
|
2210
2210
|
if (entry.isDirectory()) {
|
|
2211
|
-
if (
|
|
2211
|
+
if (fsSync.existsSync(path.join(fullPath, "SKILL.md"))) return true;
|
|
2212
2212
|
}
|
|
2213
2213
|
}
|
|
2214
2214
|
} catch {
|
|
@@ -2223,7 +2223,7 @@ function resolveBundledSkillsDir(opts = {}) {
|
|
|
2223
2223
|
const execPath = opts.execPath ?? process.execPath;
|
|
2224
2224
|
const execDir = path.dirname(execPath);
|
|
2225
2225
|
const sibling = path.join(execDir, "skills");
|
|
2226
|
-
if (
|
|
2226
|
+
if (fsSync.existsSync(sibling)) return sibling;
|
|
2227
2227
|
} catch {}
|
|
2228
2228
|
try {
|
|
2229
2229
|
const moduleUrl = opts.moduleUrl ?? import.meta.url;
|
|
@@ -2279,7 +2279,7 @@ function resolvePluginSkillDirs(params) {
|
|
|
2279
2279
|
const trimmed = raw.trim();
|
|
2280
2280
|
if (!trimmed) continue;
|
|
2281
2281
|
const candidate = path.resolve(record.rootDir, trimmed);
|
|
2282
|
-
if (!
|
|
2282
|
+
if (!fsSync.existsSync(candidate)) {
|
|
2283
2283
|
log.warn(`plugin skill path not found (${record.id}): ${candidate}`);
|
|
2284
2284
|
continue;
|
|
2285
2285
|
}
|
|
@@ -2306,7 +2306,7 @@ async function serializeByKey(key, task) {
|
|
|
2306
2306
|
|
|
2307
2307
|
//#endregion
|
|
2308
2308
|
//#region src/agents/skills/workspace.ts
|
|
2309
|
-
const fsp =
|
|
2309
|
+
const fsp = fsSync.promises;
|
|
2310
2310
|
const skillsLogger = createSubsystemLogger("skills");
|
|
2311
2311
|
const skillCommandDebugOnce = /* @__PURE__ */ new Set();
|
|
2312
2312
|
function debugSkillCommandOnce(messageKey, message, meta) {
|
|
@@ -2399,7 +2399,7 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
2399
2399
|
return Array.from(merged.values()).map((skill) => {
|
|
2400
2400
|
let frontmatter = {};
|
|
2401
2401
|
try {
|
|
2402
|
-
frontmatter = parseFrontmatter(
|
|
2402
|
+
frontmatter = parseFrontmatter(fsSync.readFileSync(skill.filePath, "utf-8"));
|
|
2403
2403
|
} catch {}
|
|
2404
2404
|
return {
|
|
2405
2405
|
skill,
|
|
@@ -2606,7 +2606,7 @@ function isModuleNotFoundError(err) {
|
|
|
2606
2606
|
}
|
|
2607
2607
|
async function loadPwAiModule(mode) {
|
|
2608
2608
|
try {
|
|
2609
|
-
return await import("./pw-ai-
|
|
2609
|
+
return await import("./pw-ai-q5Enhcu7.js");
|
|
2610
2610
|
} catch (err) {
|
|
2611
2611
|
if (mode === "soft") return null;
|
|
2612
2612
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -4321,11 +4321,11 @@ async function movePathToTrash(targetPath) {
|
|
|
4321
4321
|
return targetPath;
|
|
4322
4322
|
} catch {
|
|
4323
4323
|
const trashDir = path.join(os.homedir(), ".Trash");
|
|
4324
|
-
|
|
4324
|
+
fsSync.mkdirSync(trashDir, { recursive: true });
|
|
4325
4325
|
const base = path.basename(targetPath);
|
|
4326
4326
|
let dest = path.join(trashDir, `${base}-${Date.now()}`);
|
|
4327
|
-
if (
|
|
4328
|
-
|
|
4327
|
+
if (fsSync.existsSync(dest)) dest = path.join(trashDir, `${base}-${Date.now()}-${Math.random()}`);
|
|
4328
|
+
fsSync.renameSync(targetPath, dest);
|
|
4329
4329
|
return dest;
|
|
4330
4330
|
}
|
|
4331
4331
|
}
|
|
@@ -4403,7 +4403,7 @@ function createBrowserProfilesService(ctx) {
|
|
|
4403
4403
|
} catch {}
|
|
4404
4404
|
const userDataDir = resolveAnimaUserDataDir(name);
|
|
4405
4405
|
const profileDir = path.dirname(userDataDir);
|
|
4406
|
-
if (
|
|
4406
|
+
if (fsSync.existsSync(profileDir)) {
|
|
4407
4407
|
await movePathToTrash(profileDir);
|
|
4408
4408
|
deleted = true;
|
|
4409
4409
|
}
|
|
@@ -5064,13 +5064,13 @@ function createProfileContext(opts, profile) {
|
|
|
5064
5064
|
const userDataDir = resolveAnimaUserDataDir(profile.name);
|
|
5065
5065
|
const profileState = getProfileState();
|
|
5066
5066
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
5067
|
-
await (await import("./pw-ai-
|
|
5067
|
+
await (await import("./pw-ai-q5Enhcu7.js")).closePlaywrightBrowserConnection();
|
|
5068
5068
|
} catch {}
|
|
5069
5069
|
if (profileState.running) await stopRunningBrowser();
|
|
5070
5070
|
try {
|
|
5071
|
-
await (await import("./pw-ai-
|
|
5071
|
+
await (await import("./pw-ai-q5Enhcu7.js")).closePlaywrightBrowserConnection();
|
|
5072
5072
|
} catch {}
|
|
5073
|
-
if (!
|
|
5073
|
+
if (!fsSync.existsSync(userDataDir)) return {
|
|
5074
5074
|
moved: false,
|
|
5075
5075
|
from: userDataDir
|
|
5076
5076
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __exportAll } from "./chunk-BXK9XSlF.js";
|
|
2
2
|
import { T as getActivePluginRegistry, t as createSubsystemLogger } from "./subsystem-BaJ-PqmA.js";
|
|
3
|
-
import { K as loadAnimaPlugins } from "./reply-
|
|
3
|
+
import { K as loadAnimaPlugins } from "./reply-BJ3jrefM.js";
|
|
4
4
|
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-vpVhWds3.js";
|
|
5
5
|
import { i as loadConfig } from "./config-9JRRXykP.js";
|
|
6
6
|
|
|
@@ -2,8 +2,8 @@ import { m as resolveStateDir } from "./paths-zhVksOvm.js";
|
|
|
2
2
|
import { B as theme, u as defaultRuntime } from "./subsystem-BaJ-PqmA.js";
|
|
3
3
|
import { C as shortenHomePath, S as shortenHomeInString, _ as resolveConfigDir, b as resolveUserPath } from "./utils-RdHkpqQp.js";
|
|
4
4
|
import "./pi-embedded-helpers-6Tb87sgU.js";
|
|
5
|
-
import "./subagent-registry-
|
|
6
|
-
import "./reply-
|
|
5
|
+
import "./subagent-registry-D4idxv3D.js";
|
|
6
|
+
import "./reply-BJ3jrefM.js";
|
|
7
7
|
import "./exec-Bsq6vlwp.js";
|
|
8
8
|
import "./agent-scope-vpVhWds3.js";
|
|
9
9
|
import "./model-selection-C2dz3AhV.js";
|
|
@@ -22,11 +22,11 @@ import "./model-auth-DUHamQTz.js";
|
|
|
22
22
|
import "./cli-session-CIhvoVRb.js";
|
|
23
23
|
import "./tokens-BLOye_TP.js";
|
|
24
24
|
import "./sandbox-wL61f1WP.js";
|
|
25
|
-
import "./chrome-
|
|
25
|
+
import "./chrome-_87P03u5.js";
|
|
26
26
|
import { _ as promptYesNo } from "./auth-B8ry4GB_.js";
|
|
27
|
-
import "./server-context-
|
|
27
|
+
import "./server-context-CcPmRFx_.js";
|
|
28
28
|
import "./skills-DsdcfeyV.js";
|
|
29
|
-
import "./routes-
|
|
29
|
+
import "./routes-CNqS9gOj.js";
|
|
30
30
|
import "./ports-CmAt9mb6.js";
|
|
31
31
|
import "./message-channel-BbkwF58_.js";
|
|
32
32
|
import "./plugins-CFb1gJ4N.js";
|
|
@@ -36,8 +36,8 @@ import "./parse-timeout-qnHqZvCW.js";
|
|
|
36
36
|
import "./chunk-DprzQA5H.js";
|
|
37
37
|
import "./deliver-tQREYhAr.js";
|
|
38
38
|
import "./pi-tools.policy-BoWzLBtH.js";
|
|
39
|
-
import "./client-
|
|
40
|
-
import "./call-
|
|
39
|
+
import "./client-BM5PkIwQ.js";
|
|
40
|
+
import "./call-C0Yk2qNb.js";
|
|
41
41
|
import "./memory-cli-CDMb58Y3.js";
|
|
42
42
|
import "./manager-1ZMunRXe.js";
|
|
43
43
|
import "./sqlite-EkbWHNXu.js";
|
|
@@ -51,8 +51,8 @@ import { t as formatDocsLink } from "./links-NgE0SEVZ.js";
|
|
|
51
51
|
import "./progress-gdB4V88Q.js";
|
|
52
52
|
import "./logging-1vypRz8h.js";
|
|
53
53
|
import "./auth-store-DWgI4Vj8.js";
|
|
54
|
-
import "./control-service-
|
|
55
|
-
import "./dispatcher-
|
|
54
|
+
import "./control-service-BpEnt1xS.js";
|
|
55
|
+
import "./dispatcher-wmQlHNsm.js";
|
|
56
56
|
import "./pi-model-discovery-HH8RvApN.js";
|
|
57
57
|
import "./delivery-queue-CdUtwMZr.js";
|
|
58
58
|
import "./session-cost-usage-CYdqhmt6.js";
|
|
@@ -60,7 +60,7 @@ import { t as renderTable } from "./table-BDer4ZEZ.js";
|
|
|
60
60
|
import "./skill-scanner-BA9Rv4AE.js";
|
|
61
61
|
import { i as resolveArchiveKind } from "./archive-BZANtsGY.js";
|
|
62
62
|
import "./npm-registry-spec-C6ePuyB4.js";
|
|
63
|
-
import { t as buildPluginStatusReport } from "./status-
|
|
63
|
+
import { t as buildPluginStatusReport } from "./status-DYGeQK4c.js";
|
|
64
64
|
import { i as resolvePluginInstallDir, n as installPluginFromNpmSpec, r as installPluginFromPath, t as recordPluginInstall } from "./installs-BSwkFdS_.js";
|
|
65
65
|
import { n as updateNpmInstalledPlugins } from "./update-D4AflGlu.js";
|
|
66
66
|
import fs from "node:fs";
|
|
@@ -56,8 +56,8 @@ import "./auth-store-BEUCdUFj.js";
|
|
|
56
56
|
import "./dispatcher-BhzRMibw.js";
|
|
57
57
|
import "./delivery-queue-BqJKnOa_.js";
|
|
58
58
|
import "./session-cost-usage-lfPU35Sb.js";
|
|
59
|
-
import "./register.subclis-
|
|
60
|
-
import { i as registerProgramCommands } from "./command-registry-
|
|
59
|
+
import "./register.subclis-N7uAMRX_.js";
|
|
60
|
+
import { i as registerProgramCommands } from "./command-registry-Cl3Z-qsS.js";
|
|
61
61
|
import { r as setProgramContext } from "./program-context-DItEQSzX.js";
|
|
62
62
|
import { r as listChannelPluginCatalogEntries } from "./catalog-BWBjaCdR.js";
|
|
63
63
|
import { t as forceFreePort } from "./ports-DYWXkfSI.js";
|
|
@@ -19,70 +19,70 @@ const entries = [
|
|
|
19
19
|
name: "acp",
|
|
20
20
|
description: "Agent Control Protocol bridge for ANIMA agents",
|
|
21
21
|
register: async (program) => {
|
|
22
|
-
(await import("./acp-cli-
|
|
22
|
+
(await import("./acp-cli-PhWp41mc.js")).registerAcpCli(program);
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
name: "gateway",
|
|
27
27
|
description: "ANIMA Gateway management and control",
|
|
28
28
|
register: async (program) => {
|
|
29
|
-
(await import("./gateway-cli-
|
|
29
|
+
(await import("./gateway-cli-BKmCrkp2.js")).registerGatewayCli(program);
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
name: "daemon",
|
|
34
34
|
description: "ANIMA Gateway service lifecycle management",
|
|
35
35
|
register: async (program) => {
|
|
36
|
-
(await import("./daemon-cli-
|
|
36
|
+
(await import("./daemon-cli-DlHFi5Gm.js").then((n) => n.t)).registerDaemonCli(program);
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
name: "logs",
|
|
41
41
|
description: "Stream and tail Gateway runtime logs",
|
|
42
42
|
register: async (program) => {
|
|
43
|
-
(await import("./logs-cli-
|
|
43
|
+
(await import("./logs-cli-DbdMIph-.js")).registerLogsCli(program);
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
name: "system",
|
|
48
48
|
description: "System events, heartbeat lifecycle, and presence monitoring",
|
|
49
49
|
register: async (program) => {
|
|
50
|
-
(await import("./system-cli-
|
|
50
|
+
(await import("./system-cli-BNhplLHn.js")).registerSystemCli(program);
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
name: "approvals",
|
|
55
55
|
description: "Execution approval policies and allowlists",
|
|
56
56
|
register: async (program) => {
|
|
57
|
-
(await import("./exec-approvals-cli-
|
|
57
|
+
(await import("./exec-approvals-cli-CAwe3fFV.js")).registerExecApprovalsCli(program);
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
name: "node",
|
|
62
62
|
description: "Run and manage a headless compute node",
|
|
63
63
|
register: async (program) => {
|
|
64
|
-
(await import("./node-cli-
|
|
64
|
+
(await import("./node-cli-Bcrlhaq3.js")).registerNodeCli(program);
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
name: "sandbox",
|
|
69
69
|
description: "Docker-based agent isolation and sandboxing",
|
|
70
70
|
register: async (program) => {
|
|
71
|
-
(await import("./sandbox-cli-
|
|
71
|
+
(await import("./sandbox-cli-BsMjNBFN.js")).registerSandboxCli(program);
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
name: "tui",
|
|
76
76
|
description: "Interactive terminal interface for the Gateway",
|
|
77
77
|
register: async (program) => {
|
|
78
|
-
(await import("./tui-cli-
|
|
78
|
+
(await import("./tui-cli-ByERfWnP.js")).registerTuiCli(program);
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
name: "cron",
|
|
83
83
|
description: "Scheduled task automation via the Gateway",
|
|
84
84
|
register: async (program) => {
|
|
85
|
-
(await import("./cron-cli-
|
|
85
|
+
(await import("./cron-cli-BT0i4_jA.js")).registerCronCli(program);
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
{
|
|
@@ -103,7 +103,7 @@ const entries = [
|
|
|
103
103
|
name: "hooks",
|
|
104
104
|
description: "Agent hook lifecycle and dependency management",
|
|
105
105
|
register: async (program) => {
|
|
106
|
-
(await import("./hooks-cli-
|
|
106
|
+
(await import("./hooks-cli-BkaD_Vnq.js")).registerHooksCli(program);
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
{
|
|
@@ -117,8 +117,8 @@ const entries = [
|
|
|
117
117
|
name: "plugins",
|
|
118
118
|
description: "Install, update, and manage ANIMA extensions",
|
|
119
119
|
register: async (program) => {
|
|
120
|
-
(await import("./plugins-cli-
|
|
121
|
-
const { registerPluginCliCommands } = await import("./cli-
|
|
120
|
+
(await import("./plugins-cli-CgSDRx-C.js")).registerPluginsCli(program);
|
|
121
|
+
const { registerPluginCliCommands } = await import("./cli-BkI8EYn3.js");
|
|
122
122
|
registerPluginCliCommands(program, await loadConfig());
|
|
123
123
|
}
|
|
124
124
|
},
|
|
@@ -126,7 +126,7 @@ const entries = [
|
|
|
126
126
|
name: "security",
|
|
127
127
|
description: "Security auditing and hardening tools",
|
|
128
128
|
register: async (program) => {
|
|
129
|
-
(await import("./security-cli-
|
|
129
|
+
(await import("./security-cli-pupt3tx1.js")).registerSecurityCli(program);
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
{
|
|
@@ -140,14 +140,14 @@ const entries = [
|
|
|
140
140
|
name: "update",
|
|
141
141
|
description: "Update ANIMA to the latest version",
|
|
142
142
|
register: async (program) => {
|
|
143
|
-
(await import("./update-cli-
|
|
143
|
+
(await import("./update-cli-D7SyNIoQ.js")).registerUpdateCli(program);
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
name: "completion",
|
|
148
148
|
description: "Generate shell completion for tab-complete support",
|
|
149
149
|
register: async (program) => {
|
|
150
|
-
(await import("./completion-cli-
|
|
150
|
+
(await import("./completion-cli-BB3_g8w5.js").then((n) => n.n)).registerCompletionCli(program);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
];
|
|
@@ -215,7 +215,7 @@ const coreEntries = [
|
|
|
215
215
|
description: "Initialize ANIMA config and the agent workspace"
|
|
216
216
|
}],
|
|
217
217
|
register: async ({ program }) => {
|
|
218
|
-
(await import("./register.setup-
|
|
218
|
+
(await import("./register.setup-CN1yxMOl.js")).registerSetupCommand(program);
|
|
219
219
|
}
|
|
220
220
|
},
|
|
221
221
|
{
|
|
@@ -224,7 +224,7 @@ const coreEntries = [
|
|
|
224
224
|
description: "Interactive wizard for Gateway, workspace, and skills setup"
|
|
225
225
|
}],
|
|
226
226
|
register: async ({ program }) => {
|
|
227
|
-
(await import("./register.onboard-
|
|
227
|
+
(await import("./register.onboard-k9Rd9qzS.js")).registerOnboardCommand(program);
|
|
228
228
|
}
|
|
229
229
|
},
|
|
230
230
|
{
|
|
@@ -233,7 +233,7 @@ const coreEntries = [
|
|
|
233
233
|
description: "Interactive configuration for NoxSoft, memory, heartbeat, and identity"
|
|
234
234
|
}],
|
|
235
235
|
register: async ({ program }) => {
|
|
236
|
-
(await import("./register.configure-
|
|
236
|
+
(await import("./register.configure-CM8ScF9N.js")).registerConfigureCommand(program);
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
239
|
{
|
|
@@ -242,7 +242,7 @@ const coreEntries = [
|
|
|
242
242
|
description: "Read, write, and manage ANIMA configuration"
|
|
243
243
|
}],
|
|
244
244
|
register: async ({ program }) => {
|
|
245
|
-
(await import("./config-cli-
|
|
245
|
+
(await import("./config-cli-DCNRWoyW.js")).registerConfigCli(program);
|
|
246
246
|
}
|
|
247
247
|
},
|
|
248
248
|
{
|
|
@@ -251,7 +251,7 @@ const coreEntries = [
|
|
|
251
251
|
description: "Diagnose and repair Gateway and daemon issues"
|
|
252
252
|
}],
|
|
253
253
|
register: async ({ program }) => {
|
|
254
|
-
(await import("./register.maintenance-
|
|
254
|
+
(await import("./register.maintenance-B15nWIhc.js")).registerMaintenanceCommands(program);
|
|
255
255
|
}
|
|
256
256
|
},
|
|
257
257
|
{
|
|
@@ -272,7 +272,7 @@ const coreEntries = [
|
|
|
272
272
|
description: "Manage isolated agent workspaces, auth, and routing"
|
|
273
273
|
}],
|
|
274
274
|
register: async ({ program, ctx }) => {
|
|
275
|
-
(await import("./register.agent-
|
|
275
|
+
(await import("./register.agent-BCbrZgZT.js")).registerAgentCommands(program, { agentChannelOptions: ctx.agentChannelOptions });
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
{
|
|
@@ -291,7 +291,7 @@ const coreEntries = [
|
|
|
291
291
|
}
|
|
292
292
|
],
|
|
293
293
|
register: async ({ program }) => {
|
|
294
|
-
(await import("./register.status-health-sessions-
|
|
294
|
+
(await import("./register.status-health-sessions-CNUs9w8v.js")).registerStatusHealthSessionsCommands(program);
|
|
295
295
|
}
|
|
296
296
|
},
|
|
297
297
|
{
|
|
@@ -17,6 +17,22 @@ import crypto from "node:crypto";
|
|
|
17
17
|
*/
|
|
18
18
|
const TOKEN_PATH = path.join(os.homedir(), ".noxsoft-agent-token");
|
|
19
19
|
const NOXSOFT_AUTH_BASE = "https://auth.noxsoft.net/api/agents";
|
|
20
|
+
function isRecord(value) {
|
|
21
|
+
return typeof value === "object" && value !== null;
|
|
22
|
+
}
|
|
23
|
+
function coerceAgentIdentity(payload) {
|
|
24
|
+
if (!isRecord(payload)) return null;
|
|
25
|
+
if ("agent" in payload) return coerceAgentIdentity(payload.agent);
|
|
26
|
+
const id = typeof payload.id === "string" ? payload.id : typeof payload.agent_id === "string" ? payload.agent_id : null;
|
|
27
|
+
const name = typeof payload.name === "string" ? payload.name : null;
|
|
28
|
+
const displayName = typeof payload.display_name === "string" ? payload.display_name : typeof payload.displayName === "string" ? payload.displayName : null;
|
|
29
|
+
if (!id || !name || !displayName) return null;
|
|
30
|
+
return {
|
|
31
|
+
id,
|
|
32
|
+
name,
|
|
33
|
+
display_name: displayName
|
|
34
|
+
};
|
|
35
|
+
}
|
|
20
36
|
function getToken() {
|
|
21
37
|
try {
|
|
22
38
|
const token = fs.readFileSync(TOKEN_PATH, "utf-8").trim();
|
|
@@ -82,10 +98,7 @@ async function authenticateToken(token) {
|
|
|
82
98
|
headers: { Authorization: `Bearer ${token}` }
|
|
83
99
|
});
|
|
84
100
|
if (!response.ok) return null;
|
|
85
|
-
|
|
86
|
-
if ("agent" in data && data.agent) return data.agent;
|
|
87
|
-
if ("id" in data && "name" in data && "display_name" in data) return data;
|
|
88
|
-
return null;
|
|
101
|
+
return coerceAgentIdentity(await response.json());
|
|
89
102
|
} catch {
|
|
90
103
|
return null;
|
|
91
104
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./paths-
|
|
2
|
-
import { j as resolvePreferredAnimaTmpDir } from "./subsystem-
|
|
3
|
-
import "./exec-
|
|
1
|
+
import "./paths-D2eokayo.js";
|
|
2
|
+
import { j as resolvePreferredAnimaTmpDir } from "./subsystem-CJTCKTwb.js";
|
|
3
|
+
import "./exec-CK8CHr7j.js";
|
|
4
4
|
import { t as formatCliCommand } from "./command-format-CZk1W3UP.js";
|
|
5
|
-
import { d as normalizeCdpWsUrl, g as withCdpSocket, h as getHeadersWithAuth, m as fetchJson, p as appendCdpPath, t as getChromeWebSocketUrl, u as formatAriaSnapshot } from "./chrome-
|
|
5
|
+
import { d as normalizeCdpWsUrl, g as withCdpSocket, h as getHeadersWithAuth, m as fetchJson, p as appendCdpPath, t as getChromeWebSocketUrl, u as formatAriaSnapshot } from "./chrome-s7nTgmbn.js";
|
|
6
6
|
import { n as formatErrorMessage } from "./errors-DzK5Mvu0.js";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
8
8
|
import path from "node:path";
|
|
@@ -4,7 +4,7 @@ import "./utils-RdHkpqQp.js";
|
|
|
4
4
|
import "./exec-Bsq6vlwp.js";
|
|
5
5
|
import { n as formatErrorMessage } from "./errors-DjZBTJJ3.js";
|
|
6
6
|
import { t as formatCliCommand } from "./command-format-B1WxXbeU.js";
|
|
7
|
-
import { d as normalizeCdpWsUrl, g as withCdpSocket, h as getHeadersWithAuth, m as fetchJson, p as appendCdpPath, t as getChromeWebSocketUrl, u as formatAriaSnapshot } from "./chrome-
|
|
7
|
+
import { d as normalizeCdpWsUrl, g as withCdpSocket, h as getHeadersWithAuth, m as fetchJson, p as appendCdpPath, t as getChromeWebSocketUrl, u as formatAriaSnapshot } from "./chrome-_87P03u5.js";
|
|
8
8
|
import "./ports-CmAt9mb6.js";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import fs from "node:fs/promises";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { s as resolveStateDir } from "./paths-
|
|
2
|
-
import { M as parseAgentSessionKey } from "./workspace-
|
|
3
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import "./exec-
|
|
5
|
-
import { s as resolveAgentWorkspaceDir } from "./agent-scope-
|
|
6
|
-
import "./paths-
|
|
7
|
-
import { n as buildSessionEntry, r as listSessionFilesForAgent, t as requireNodeSqlite } from "./sqlite-
|
|
1
|
+
import { s as resolveStateDir } from "./paths-D2eokayo.js";
|
|
2
|
+
import { M as parseAgentSessionKey } from "./workspace-xzxJwPTB.js";
|
|
3
|
+
import { t as createSubsystemLogger } from "./subsystem-CJTCKTwb.js";
|
|
4
|
+
import "./exec-CK8CHr7j.js";
|
|
5
|
+
import { s as resolveAgentWorkspaceDir } from "./agent-scope-DWKQJUUZ.js";
|
|
6
|
+
import "./paths-CmZenvlb.js";
|
|
7
|
+
import { n as buildSessionEntry, r as listSessionFilesForAgent, t as requireNodeSqlite } from "./sqlite-B-dYyac7.js";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
import path from "node:path";
|