@noxsoft/anima 6.5.0 → 7.0.0
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/CHANGELOG.md +51 -0
- package/README.md +48 -0
- package/dist/{agent-VRQM14Xp.js → agent-BoAAHGEA.js} +3 -3
- package/dist/{agent-CnS0SRpT.js → agent-DuW0onwk.js} +4 -4
- package/dist/{agents-CvMRplDx.js → agents-BUXkSDns.js} +4 -4
- package/dist/{anthropic-direct-runner-C2Kwju-r.js → anthropic-direct-runner-DizCei79.js} +420 -4
- package/dist/{anthropic-direct-runner-BeYCnvZ8.js → anthropic-direct-runner-OjcTAH6g.js} +420 -3
- package/dist/{auth-choice-Dc5TAJwT.js → auth-choice-B1iGnjuE.js} +1 -1
- package/dist/{auth-choice-DY1saszS.js → auth-choice-HF9x6xk2.js} +1 -1
- package/dist/{banner-DAMtSjUF.js → banner-Dpa5d1If.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/canvas-host/a2ui/a2ui.bundle.js +16410 -18893
- package/dist/{channel-web-B8mzTSaY.js → channel-web-C5mzsaa3.js} +3 -3
- package/dist/{cli-hcHk5KuP.js → cli-Cuq4bIg4.js} +2 -2
- package/dist/{cli-D8exVpuI.js → cli-X9ikywQ3.js} +3 -3
- package/dist/{command-registry-D3VhxpWx.js → command-registry-9V4uqrBV.js} +12 -12
- package/dist/{completion-cli-B3BqQJq9.js → completion-cli-BtvcR-U5.js} +1 -1
- package/dist/{completion-cli-CepDzeW1.js → completion-cli-DNWDwhab.js} +2 -2
- package/dist/{config-cli-B6Np85rk.js → config-cli-DfHE3KG-.js} +1 -1
- package/dist/{config-cli-3CaIxSKo.js → config-cli-fleq7-gq.js} +1 -1
- package/dist/{configure-zXK6UZ51.js → configure-B2Mfnwy_.js} +3 -3
- package/dist/{configure-D88dg6mE.js → configure-SnvMHZPD.js} +7 -7
- package/dist/{configure-D882Bg7c.js → configure-ZWxixuRA.js} +3 -3
- package/dist/{configure-xpjwedvJ.js → configure-lkozxQed.js} +8 -8
- package/dist/context-mdxDsO1v.js +223 -0
- package/dist/control-ui/assets/{index-DVpMpG5G.js → index-D4wqLVMN.js} +2 -2
- package/dist/control-ui/assets/{index-DVpMpG5G.js.map → index-D4wqLVMN.js.map} +1 -1
- package/dist/control-ui/assets/index-DIEQjjCN.js +73 -0
- package/dist/control-ui/assets/index-DIEQjjCN.js.map +1 -0
- package/dist/control-ui/assets/{observers-CxfWf9RO.js → observers-B7MfWiIZ.js} +2 -2
- package/dist/control-ui/assets/{observers-CxfWf9RO.js.map → observers-B7MfWiIZ.js.map} +1 -1
- package/dist/control-ui/index.html +1 -1
- package/dist/{deps-DyT32VfN.js → deps-BKLIBKjK.js} +1 -1
- package/dist/{doctor-WpKCNZeO.js → doctor-D7kKyUVk.js} +4 -4
- package/dist/{doctor-DEnSKgHu.js → doctor-DmCnZ-jF.js} +4 -4
- package/dist/{doctor-completion-CypXc1Uo.js → doctor-completion-B9SBdMoR.js} +1 -1
- package/dist/{doctor-completion-CPff9UlF.js → doctor-completion-BBvW4_J9.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +1 -1
- package/dist/{gateway-cli-B_xsx5Nv.js → gateway-cli-CEM1vBuk.js} +15 -15
- package/dist/{gateway-cli-D3VBOA_i.js → gateway-cli-iumkTohn.js} +17 -17
- package/dist/{health-CabOEPQ0.js → health-B5N6_UOf.js} +3 -3
- package/dist/{health-C8KCBhuo.js → health-Cndq9b7A.js} +3 -3
- package/dist/{heartbeat-visibility-ZfNSbFcq.js → heartbeat-visibility-BQL13ZBH.js} +1 -1
- package/dist/{heartbeat-visibility-BjYY-mKG.js → heartbeat-visibility-CwcYugaR.js} +1 -1
- package/dist/{hooks-cli-Cs7GUa7G.js → hooks-cli-BZcvdIwE.js} +4 -4
- package/dist/{hooks-cli-DOs9WZ3K.js → hooks-cli-DSlPBQSY.js} +3 -3
- package/dist/index.js +10 -10
- package/dist/llm-slug-generator.js +1 -1
- package/dist/{login-BHnvW9HA.js → login-BEaBOSnw.js} +1 -1
- package/dist/{login-CrMpAZ0n.js → login-MzVPMRxL.js} +1 -1
- package/dist/{login-qr-DILcBA_q.js → login-qr-BjpDVBJE.js} +1 -1
- package/dist/{login-qr-CsAVGp00.js → login-qr-CxRI-tE2.js} +1 -1
- package/dist/{models-BM2_NkMu.js → models-CdNeYfSp.js} +4 -4
- package/dist/{models-cli-BpjeKsUz.js → models-cli-D7eSsPuk.js} +3 -3
- package/dist/{models-cli-BjY8wA-C.js → models-cli-fTZXo1zx.js} +5 -5
- package/dist/{onboard-DM9gULJN.js → onboard-C5K37NvY.js} +3 -3
- package/dist/{onboard-_-D81kAy.js → onboard-D-6QCnTi.js} +3 -3
- package/dist/{onboard-channels-UkphAdCy.js → onboard-channels-BsCq32Hn.js} +1 -1
- package/dist/{onboard-channels-CtT-RN60.js → onboard-channels-bx6oelzj.js} +1 -1
- package/dist/{onboarding-Djmm0PEM.js → onboarding-BeuMAyic.js} +4 -4
- package/dist/{onboarding-BB9PteK8.js → onboarding-CX1vIkcB.js} +4 -4
- package/dist/{outbound-send-deps-T_FgdfgW.js → outbound-send-deps-Y9AxHeLG.js} +1 -1
- package/dist/{pi-embedded-BMbtgOzv.js → pi-embedded-D15iww51.js} +1010 -104
- package/dist/{pi-embedded-DfbM3fAT.js → pi-embedded-DR8Pfd05.js} +1010 -104
- package/dist/{plugin-registry-QTkplP4s.js → plugin-registry-Do2D1nDk.js} +1 -1
- package/dist/{plugin-registry-DePMxn4z.js → plugin-registry-ME2FQAi-.js} +1 -1
- package/dist/plugin-sdk/affect/ego.d.ts +140 -0
- package/dist/plugin-sdk/agents/models-config.d.ts +5 -6
- package/dist/plugin-sdk/agents/noxsoft-runner.d.ts +3 -0
- package/dist/plugin-sdk/agents/openai-direct-runner.d.ts +41 -0
- package/dist/plugin-sdk/commands/steer.d.ts +49 -0
- package/dist/plugin-sdk/gateway/protocol/index.d.ts +2 -2
- package/dist/{plugins-cli-Dv0KQTWo.js → plugins-cli-CVFzwdmI.js} +4 -4
- package/dist/{plugins-cli-Bc9oU1ld.js → plugins-cli-CoVt2ewg.js} +3 -3
- package/dist/{program-CuwbF8YO.js → program-8rF4C_wd.js} +8 -8
- package/dist/{program-context-CxPfy-Wr.js → program-context-DP3qjW7A.js} +18 -18
- package/dist/{register.agent-DFQmkIEH.js → register.agent-BIrXCVtQ.js} +9 -9
- package/dist/{register.agent-DUjwGw9d.js → register.agent-DnkOx0U8.js} +7 -7
- package/dist/{register.anima-CtKNrpE8.js → register.anima-B36rTHUt.js} +2 -2
- package/dist/{register.anima-CRFHJu2J.js → register.anima-DXT9bM9A.js} +2 -2
- package/dist/{register.configure-CnEKV57N.js → register.configure-CuzJxZmk.js} +6 -6
- package/dist/{register.configure-CSSN07XN.js → register.configure-DCpvHX3m.js} +7 -7
- package/dist/{register.maintenance-fhcCB7ih.js → register.maintenance-CcxBFfv5.js} +10 -10
- package/dist/{register.maintenance-CU1A-90-.js → register.maintenance-Dla0H12S.js} +8 -8
- package/dist/{register.message-C1a0y2ZR.js → register.message-Brtushvp.js} +4 -4
- package/dist/{register.message-fM0jSKB8.js → register.message-CD7xV-jz.js} +5 -5
- package/dist/{register.onboard-BhPlqjFi.js → register.onboard-23Mra3LN.js} +11 -11
- package/dist/{register.onboard-B7Gavmvt.js → register.onboard-6CbODzQ6.js} +9 -9
- package/dist/{register.setup-CADdQUEN.js → register.setup-CqQw13Ky.js} +11 -11
- package/dist/{register.setup-0jPnMgnz.js → register.setup-DlVH7FKe.js} +9 -9
- package/dist/{register.status-health-sessions-Cu5fDT-z.js → register.status-health-sessions-CduFjFDB.js} +4 -4
- package/dist/{register.status-health-sessions-DdQsABr_.js → register.status-health-sessions-CxtgPKu9.js} +6 -6
- package/dist/{register.subclis-CZ91ufCy.js → register.subclis-CtANqD5P.js} +7 -7
- package/dist/{reply-DtHlnzOx.js → reply-93fMzde1.js} +610 -75
- package/dist/{reply-prefix-C8dIgJur.js → reply-prefix-B7Fb3fO8.js} +1 -1
- package/dist/{reply-prefix-DmWGtcH-.js → reply-prefix-BzdhJDqP.js} +1 -1
- package/dist/{run-Dfz_7j7t.js → run-CF3kHOGH.js} +1717 -83
- package/dist/{run-DqBQ-bGn.js → run-Cq_iTGK_.js} +1718 -84
- package/dist/{run-main-DGDW0fhx.js → run-main-BiIRcc6s.js} +17 -17
- package/dist/{server-node-events-Ca797E1d.js → server-node-events-B3Serk9L.js} +6 -6
- package/dist/{server-node-events-BR1aXVlu.js → server-node-events-DgvKcH5q.js} +5 -5
- package/dist/{session-C7IGnhd1.js → session-BMDpwIJu.js} +1 -1
- package/dist/{session-FmXsucR7.js → session-BzrnfWQ2.js} +2 -2
- package/dist/{session-DfsMJNG3.js → session-C_d9uvLf.js} +1 -1
- package/dist/{session-DLevr8Vd.js → session-jljC5QVG.js} +2 -2
- package/dist/{sessions-Dj7_4mkr.js → sessions-BmE5Z_1i.js} +1 -1
- package/dist/{settings-cli-DxNeu6kx.js → settings-cli-CZdlEmNi.js} +7 -7
- package/dist/{settings-cli-Dytfop1H.js → settings-cli-DsDqNpW_.js} +8 -8
- package/dist/{setup-token-B802CZwe.js → setup-token-C8Gg1P6T.js} +1 -1
- package/dist/{setup-token-DYh2QzJ-.js → setup-token-Lee4gM5w.js} +1 -1
- package/dist/{start-BqnPia0t.js → start-CK6urvnN.js} +17 -17
- package/dist/{start-C3fuLzX0.js → start-Cs1aPMq2.js} +15 -15
- package/dist/{status-CHGNPonc.js → status-BO5BIf81.js} +3 -3
- package/dist/{status-CxF6k_jr.js → status-COc4xMti.js} +1 -1
- package/dist/{status-tLgozFYL.js → status-C_NBOv_V.js} +1 -1
- package/dist/{status-DfZJJqNs.js → status-uakoP719.js} +4 -4
- package/dist/{subagent-registry-CPtElVX0.js → subagent-registry-fLI7QDKe.js} +449 -77
- package/dist/{update-cli-C-er5av6.js → update-cli-D3Ujz_cW.js} +10 -10
- package/dist/{update-cli-BuCw75tM.js → update-cli-DEe62XGU.js} +8 -8
- package/dist/{update-runner-kE8AMQt4.js → update-runner-DUl-g4mB.js} +1 -1
- package/dist/{update-runner-czCqHZCu.js → update-runner-DZfnquWO.js} +1 -1
- package/dist/{web-BHGK5GtV.js → web-C-cK9OCd.js} +1 -1
- package/dist/{web-DvTXV-fo.js → web-Di8j762D.js} +6 -6
- package/dist/{web-CyYunanU.js → web-Dybw4K7C.js} +6 -6
- package/dist/{web-so3pGceM.js → web-DzSlI8A6.js} +1 -1
- package/package.json +4 -4
- package/dist/context-B5X720Bs.js +0 -60
- package/dist/control-ui/assets/index-CBUvF5Mp.js +0 -72
- package/dist/control-ui/assets/index-CBUvF5Mp.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { H as getChildLogger, I as shouldLogVerbose, N as logVerbose, d as defaultRuntime, t as createSubsystemLogger } from "./subsystem-BAADN1B8.js";
|
|
2
2
|
import { E as toWhatsappJid, h as normalizeE164, m as jidToE164, p as isSelfChatMode, r as clamp, w as sleep, y as resolveJidToE164 } from "./utils-CLYlhJuc.js";
|
|
3
|
-
import { An as hasControlCommand, Dn as formatInboundEnvelope, En as resolveInboundDebounceMs, Fn as buildMentionRegexes, In as normalizeMentionText, On as resolveEnvelopeFormatOptions, Tn as createInboundDebouncer, cn as buildAgentSessionKey, ct as parseActivationCommand, er as resolveIdentityNamePrefix, fn as buildPairingReply, gn as dispatchReplyWithBufferedBlockDispatcher, hn as shouldAckReactionForWhatsApp, jn as shouldComputeCommandAuthorized, jr as finalizeInboundContext, ln as resolveAgentRoute, mn as recordChannelActivity, mr as registerUnhandledRejectionHandler, sr as enqueueSystemEvent, st as normalizeGroupActivation, t as getReplyFromConfig, tr as resolveMessagePrefix, xn as createDedupeCache } from "./reply-
|
|
3
|
+
import { An as hasControlCommand, Dn as formatInboundEnvelope, En as resolveInboundDebounceMs, Fn as buildMentionRegexes, In as normalizeMentionText, On as resolveEnvelopeFormatOptions, Tn as createInboundDebouncer, cn as buildAgentSessionKey, ct as parseActivationCommand, er as resolveIdentityNamePrefix, fn as buildPairingReply, gn as dispatchReplyWithBufferedBlockDispatcher, hn as shouldAckReactionForWhatsApp, jn as shouldComputeCommandAuthorized, jr as finalizeInboundContext, ln as resolveAgentRoute, mn as recordChannelActivity, mr as registerUnhandledRejectionHandler, sr as enqueueSystemEvent, st as normalizeGroupActivation, t as getReplyFromConfig, tr as resolveMessagePrefix, xn as createDedupeCache } from "./reply-93fMzde1.js";
|
|
4
4
|
import { i as buildAgentMainSessionKey, l as normalizeAgentId, o as buildGroupHistoryKey, r as DEFAULT_MAIN_KEY } from "./session-key-DAZmp8ll.js";
|
|
5
5
|
import { i as loadConfig } from "./config-DaD4FsAn.js";
|
|
6
6
|
import { I as resolveGroupSessionKey, a as readSessionUpdatedAt, c as updateLastRoute, i as loadSessionStore, o as recordSessionMetaFromInbound } from "./sessions-BOzeFzuL.js";
|
|
@@ -13,8 +13,8 @@ import { d as resolveChannelGroupPolicy, f as resolveChannelGroupRequireMention,
|
|
|
13
13
|
import { c as readWebSelfId, n as getWebAuthAgeMs } from "./auth-store-Jvgz2_l1.js";
|
|
14
14
|
import { r as formatDurationPrecise } from "./format-duration-CnGkTPRF.js";
|
|
15
15
|
import { i as markdownToWhatsApp, r as sendReactionWhatsApp } from "./outbound-fPqdCDR4.js";
|
|
16
|
-
import { a as downloadMediaMessage, c as normalizeMessageContent, i as waitForWaConnection, l as isJidGroup, n as formatError, o as extractMessageContent, r as getStatusCode, s as getContentType, t as createWaSocket, u as DisconnectReason } from "./session-
|
|
17
|
-
import { i as recordPendingHistoryEntryIfEnabled, n as DEFAULT_GROUP_HISTORY_LIMIT, r as buildHistoryContextFromEntries, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
16
|
+
import { a as downloadMediaMessage, c as normalizeMessageContent, i as waitForWaConnection, l as isJidGroup, n as formatError, o as extractMessageContent, r as getStatusCode, s as getContentType, t as createWaSocket, u as DisconnectReason } from "./session-jljC5QVG.js";
|
|
17
|
+
import { i as recordPendingHistoryEntryIfEnabled, n as DEFAULT_GROUP_HISTORY_LIMIT, r as buildHistoryContextFromEntries, t as createReplyPrefixOptions } from "./reply-prefix-B7Fb3fO8.js";
|
|
18
18
|
import { n as resolveWhatsAppAccount } from "./accounts-B_2nt5Cd.js";
|
|
19
19
|
import { randomUUID } from "node:crypto";
|
|
20
20
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -2,7 +2,7 @@ import "./paths-zhVksOvm.js";
|
|
|
2
2
|
import { t as createSubsystemLogger } from "./subsystem-BAADN1B8.js";
|
|
3
3
|
import "./utils-CLYlhJuc.js";
|
|
4
4
|
import "./pi-embedded-helpers-BZ9GspxK.js";
|
|
5
|
-
import { sn as loadAnimaPlugins } from "./reply-
|
|
5
|
+
import { sn as loadAnimaPlugins } from "./reply-93fMzde1.js";
|
|
6
6
|
import "./exec-BylR5qWS.js";
|
|
7
7
|
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-CXxC8FFX.js";
|
|
8
8
|
import "./model-selection-CY6r_3wt.js";
|
|
@@ -29,7 +29,7 @@ import "./auth-profiles-C-LuhW6c.js";
|
|
|
29
29
|
import "./file-lock-Z53aFHvY.js";
|
|
30
30
|
import "./model-auth-CHB3EySM.js";
|
|
31
31
|
import "./tokens-SP2Q7i59.js";
|
|
32
|
-
import "./anthropic-direct-runner-
|
|
32
|
+
import "./anthropic-direct-runner-OjcTAH6g.js";
|
|
33
33
|
import "./deliver-BKzX3YoN.js";
|
|
34
34
|
import "./memory-cli-DLtBA6r5.js";
|
|
35
35
|
import "./manager-D8VCuzru.js";
|
|
@@ -14,10 +14,10 @@ import "./shell-env-2QqHvBMl.js";
|
|
|
14
14
|
import "./client-CfLiulzK.js";
|
|
15
15
|
import "./call-B4lhqS6H.js";
|
|
16
16
|
import "./message-channel-DIHHKJhk.js";
|
|
17
|
-
import { m as loadAnimaPlugins } from "./subagent-registry-
|
|
17
|
+
import { m as loadAnimaPlugins } from "./subagent-registry-fLI7QDKe.js";
|
|
18
18
|
import "./sessions-C_3wTmSA.js";
|
|
19
19
|
import "./tokens-CmlI2hSz.js";
|
|
20
|
-
import "./anthropic-direct-runner-
|
|
20
|
+
import "./anthropic-direct-runner-DizCei79.js";
|
|
21
21
|
import "./pi-embedded-helpers-D2SLlgS4.js";
|
|
22
22
|
import "./sandbox-D-N7M7lp.js";
|
|
23
23
|
import "./chrome-CmxIwwsr.js";
|
|
@@ -43,7 +43,7 @@ import "./common-CqIa2poH.js";
|
|
|
43
43
|
import "./chunk-Cy0Bj0F3.js";
|
|
44
44
|
import "./parse-timeout-D4UO8pY_.js";
|
|
45
45
|
import "./active-listener-gGCoq55D.js";
|
|
46
|
-
import "./context-
|
|
46
|
+
import "./context-mdxDsO1v.js";
|
|
47
47
|
import "./pi-tools.policy-D2FusuQa.js";
|
|
48
48
|
import "./session-cost-usage-DnxtnK1E.js";
|
|
49
49
|
import "./control-service-3CI4vt1h.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as __exportAll } from "./chunk-BXK9XSlF.js";
|
|
2
2
|
import { St as hasHelpOrVersion, ht as buildParseArgv, yt as getPrimaryCommand } from "./entry.js";
|
|
3
3
|
import { r as resolveActionArgs } from "./helpers-DLgbkcEn.js";
|
|
4
|
-
import { r as registerSubCliCommands } from "./register.subclis-
|
|
4
|
+
import { r as registerSubCliCommands } from "./register.subclis-CtANqD5P.js";
|
|
5
5
|
|
|
6
6
|
//#region src/cli/program/command-registry.ts
|
|
7
7
|
var command_registry_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -21,7 +21,7 @@ const coreEntries = [
|
|
|
21
21
|
description: "Initialize ANIMA config and the agent workspace"
|
|
22
22
|
}],
|
|
23
23
|
register: async ({ program }) => {
|
|
24
|
-
(await import("./register.setup-
|
|
24
|
+
(await import("./register.setup-CqQw13Ky.js")).registerSetupCommand(program);
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -30,7 +30,7 @@ const coreEntries = [
|
|
|
30
30
|
description: "Interactive wizard for Gateway, workspace, and skills setup"
|
|
31
31
|
}],
|
|
32
32
|
register: async ({ program }) => {
|
|
33
|
-
(await import("./register.onboard-
|
|
33
|
+
(await import("./register.onboard-23Mra3LN.js")).registerOnboardCommand(program);
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
{
|
|
@@ -39,7 +39,7 @@ const coreEntries = [
|
|
|
39
39
|
description: "Interactive configuration for NoxSoft, memory, heartbeat, and identity"
|
|
40
40
|
}],
|
|
41
41
|
register: async ({ program }) => {
|
|
42
|
-
(await import("./register.configure-
|
|
42
|
+
(await import("./register.configure-DCpvHX3m.js")).registerConfigureCommand(program);
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
{
|
|
@@ -48,7 +48,7 @@ const coreEntries = [
|
|
|
48
48
|
description: "Advanced and complete settings for Gateway and CLI"
|
|
49
49
|
}],
|
|
50
50
|
register: async ({ program }) => {
|
|
51
|
-
(await import("./settings-cli-
|
|
51
|
+
(await import("./settings-cli-DsDqNpW_.js")).registerSettingsCli(program);
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
{
|
|
@@ -57,7 +57,7 @@ const coreEntries = [
|
|
|
57
57
|
description: "Read, write, and manage ANIMA configuration"
|
|
58
58
|
}],
|
|
59
59
|
register: async ({ program }) => {
|
|
60
|
-
(await import("./config-cli-
|
|
60
|
+
(await import("./config-cli-fleq7-gq.js")).registerConfigCli(program);
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
{
|
|
@@ -66,7 +66,7 @@ const coreEntries = [
|
|
|
66
66
|
description: "Diagnose and repair Gateway and daemon issues"
|
|
67
67
|
}],
|
|
68
68
|
register: async ({ program }) => {
|
|
69
|
-
(await import("./register.maintenance-
|
|
69
|
+
(await import("./register.maintenance-CcxBFfv5.js")).registerMaintenanceCommands(program);
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
{
|
|
@@ -87,7 +87,7 @@ const coreEntries = [
|
|
|
87
87
|
description: "Manage isolated agent workspaces, auth, and routing"
|
|
88
88
|
}],
|
|
89
89
|
register: async ({ program, ctx }) => {
|
|
90
|
-
(await import("./register.agent-
|
|
90
|
+
(await import("./register.agent-BIrXCVtQ.js")).registerAgentCommands(program, { agentChannelOptions: ctx.agentChannelOptions });
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
{
|
|
@@ -96,7 +96,7 @@ const coreEntries = [
|
|
|
96
96
|
description: "Send messages and perform channel actions"
|
|
97
97
|
}],
|
|
98
98
|
register: async ({ program, ctx }) => {
|
|
99
|
-
(await import("./register.message-
|
|
99
|
+
(await import("./register.message-CD7xV-jz.js")).registerMessageCommands(program, ctx);
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
{
|
|
@@ -115,7 +115,7 @@ const coreEntries = [
|
|
|
115
115
|
}
|
|
116
116
|
],
|
|
117
117
|
register: async ({ program }) => {
|
|
118
|
-
(await import("./register.status-health-sessions-
|
|
118
|
+
(await import("./register.status-health-sessions-CxtgPKu9.js")).registerStatusHealthSessionsCommands(program);
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
{
|
|
@@ -124,7 +124,7 @@ const coreEntries = [
|
|
|
124
124
|
description: "Set your Anthropic API key — the fastest way to get started"
|
|
125
125
|
}],
|
|
126
126
|
register: async ({ program }) => {
|
|
127
|
-
const { setupTokenCommand, hasAnthropicToken, autoDetectToken } = await import("./setup-token-
|
|
127
|
+
const { setupTokenCommand, hasAnthropicToken, autoDetectToken } = await import("./setup-token-C8Gg1P6T.js");
|
|
128
128
|
program.command("setup-token").description("Set your Anthropic API key — no claude CLI login needed").option("--token <key>", "Anthropic API key (sk-ant-api01-... or sk-ant-oat01-...)").option("--skip-validation", "Skip live API check (use if offline)").option("--json", "Output JSON result", false).addHelpText("after", `
|
|
129
129
|
Examples:
|
|
130
130
|
anima setup-token # Interactive — prompts for key + validates
|
|
@@ -179,7 +179,7 @@ Examples:
|
|
|
179
179
|
}
|
|
180
180
|
],
|
|
181
181
|
register: async ({ program }) => {
|
|
182
|
-
(await import("./register.anima-
|
|
182
|
+
(await import("./register.anima-DXT9bM9A.js")).registerAnimaCommands(program);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
];
|
|
@@ -2,7 +2,7 @@ import { n as __exportAll } from "./chunk-BXK9XSlF.js";
|
|
|
2
2
|
import { m as resolveStateDir } from "./paths-zhVksOvm.js";
|
|
3
3
|
import { a as routeLogsToStderr } from "./subsystem-BAADN1B8.js";
|
|
4
4
|
import { g as pathExists } from "./utils-CLYlhJuc.js";
|
|
5
|
-
import { i as registerCoreCliByName, o as getSubCliEntries, r as getCoreCliCommandNames, s as registerSubCliByName, t as getProgramContext } from "./program-context-
|
|
5
|
+
import { i as registerCoreCliByName, o as getSubCliEntries, r as getCoreCliCommandNames, s as registerSubCliByName, t as getProgramContext } from "./program-context-DP3qjW7A.js";
|
|
6
6
|
import os from "node:os";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as __exportAll } from "./chunk-BXK9XSlF.js";
|
|
2
2
|
import { $ as resolveStateDir, u as routeLogsToStderr } from "./entry.js";
|
|
3
3
|
import { h as pathExists } from "./utils-D1VGbO3C.js";
|
|
4
|
-
import { n as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-
|
|
5
|
-
import { n as getCoreCliCommandNames, r as registerCoreCliByName } from "./command-registry-
|
|
4
|
+
import { n as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-CtANqD5P.js";
|
|
5
|
+
import { n as getCoreCliCommandNames, r as registerCoreCliByName } from "./command-registry-9V4uqrBV.js";
|
|
6
6
|
import { t as getProgramContext } from "./program-context-Dw8HDTRz.js";
|
|
7
7
|
import os from "node:os";
|
|
8
8
|
import path from "node:path";
|
|
@@ -10,6 +10,6 @@ import "./env-DlTia1B4.js";
|
|
|
10
10
|
import "./shell-env-iPnSIi-t.js";
|
|
11
11
|
import "./manifest-registry-qF960vMH.js";
|
|
12
12
|
import "./links-DcilUrqq.js";
|
|
13
|
-
import { i as runConfigUnset, n as runConfigGet, r as runConfigSet, t as registerConfigCli } from "./configure-
|
|
13
|
+
import { i as runConfigUnset, n as runConfigGet, r as runConfigSet, t as registerConfigCli } from "./configure-SnvMHZPD.js";
|
|
14
14
|
|
|
15
15
|
export { registerConfigCli };
|
|
@@ -6,6 +6,6 @@ import "./manifest-registry-W_OfCIRP.js";
|
|
|
6
6
|
import "./config-BrVuTQ8R.js";
|
|
7
7
|
import "./shell-env-2QqHvBMl.js";
|
|
8
8
|
import "./links-BjjDMNIq.js";
|
|
9
|
-
import { i as runConfigUnset, n as runConfigGet, r as runConfigSet, t as registerConfigCli } from "./configure-
|
|
9
|
+
import { i as runConfigUnset, n as runConfigGet, r as runConfigSet, t as registerConfigCli } from "./configure-lkozxQed.js";
|
|
10
10
|
|
|
11
11
|
export { registerConfigCli, runConfigGet, runConfigUnset };
|
|
@@ -14,16 +14,16 @@ import { n as stylePromptMessage, r as stylePromptTitle, t as stylePromptHint }
|
|
|
14
14
|
import { t as resolveGatewayService } from "./service-Dd1DfPia.js";
|
|
15
15
|
import { n as resolveWideAreaDiscoveryDomain } from "./widearea-dns-CHAT20aR.js";
|
|
16
16
|
import { t as discoverGatewayBeacons } from "./bonjour-discovery-Co-b97Dz.js";
|
|
17
|
-
import { r as healthCommand } from "./health-
|
|
17
|
+
import { r as healthCommand } from "./health-B5N6_UOf.js";
|
|
18
18
|
import { n as ensureControlUiAssetsBuilt, t as formatHealthCheckFailure } from "./health-format-D-JJ5_S4.js";
|
|
19
|
-
import { a as applyModelFallbacksFromSelection, c as promptModelAllowlist, i as applyModelAllowlist, l as promptAuthChoiceGrouped, o as applyPrimaryModel, r as applyAuthChoice, s as promptDefaultModel, t as resolvePreferredProviderForAuthChoice } from "./auth-choice-
|
|
19
|
+
import { a as applyModelFallbacksFromSelection, c as promptModelAllowlist, i as applyModelAllowlist, l as promptAuthChoiceGrouped, o as applyPrimaryModel, r as applyAuthChoice, s as promptDefaultModel, t as resolvePreferredProviderForAuthChoice } from "./auth-choice-HF9x6xk2.js";
|
|
20
20
|
import { t as WizardCancelledError } from "./prompts-Bq4QGFQM.js";
|
|
21
21
|
import { n as logConfigUpdated } from "./logging-Chc1Sj6N.js";
|
|
22
22
|
import { t as note$1 } from "./note-iMYVGjpA.js";
|
|
23
23
|
import { t as validateIPv4AddressInput } from "./ipv4-CExV55ho.js";
|
|
24
24
|
import { t as installSkill } from "./skills-install-D6_qpRjW.js";
|
|
25
25
|
import { t as createClackPrompter } from "./clack-prompter-fZSmnHda.js";
|
|
26
|
-
import { n as setupChannels, t as noteChannelStatus } from "./onboard-channels-
|
|
26
|
+
import { n as setupChannels, t as noteChannelStatus } from "./onboard-channels-bx6oelzj.js";
|
|
27
27
|
import { t as ensureSystemdUserLingerInteractive } from "./systemd-linger-BVwGXVS0.js";
|
|
28
28
|
import { confirm, intro, outro, select, text } from "@clack/prompts";
|
|
29
29
|
|
|
@@ -2,7 +2,7 @@ import "./paths-zhVksOvm.js";
|
|
|
2
2
|
import { A as info, V as theme, d as defaultRuntime, k as danger } from "./subsystem-BAADN1B8.js";
|
|
3
3
|
import { C as shortenHomePath } from "./utils-CLYlhJuc.js";
|
|
4
4
|
import "./pi-embedded-helpers-BZ9GspxK.js";
|
|
5
|
-
import "./reply-
|
|
5
|
+
import "./reply-93fMzde1.js";
|
|
6
6
|
import "./exec-BylR5qWS.js";
|
|
7
7
|
import "./agent-scope-CXxC8FFX.js";
|
|
8
8
|
import "./model-selection-CY6r_3wt.js";
|
|
@@ -30,7 +30,7 @@ import "./auth-profiles-C-LuhW6c.js";
|
|
|
30
30
|
import "./file-lock-Z53aFHvY.js";
|
|
31
31
|
import "./model-auth-CHB3EySM.js";
|
|
32
32
|
import "./tokens-SP2Q7i59.js";
|
|
33
|
-
import "./anthropic-direct-runner-
|
|
33
|
+
import "./anthropic-direct-runner-OjcTAH6g.js";
|
|
34
34
|
import "./deliver-BKzX3YoN.js";
|
|
35
35
|
import "./memory-cli-DLtBA6r5.js";
|
|
36
36
|
import "./manager-D8VCuzru.js";
|
|
@@ -66,10 +66,10 @@ import "./systemd-Bx76sJ3M.js";
|
|
|
66
66
|
import "./service-Dd1DfPia.js";
|
|
67
67
|
import "./widearea-dns-CHAT20aR.js";
|
|
68
68
|
import "./bonjour-discovery-Co-b97Dz.js";
|
|
69
|
-
import "./health-
|
|
69
|
+
import "./health-B5N6_UOf.js";
|
|
70
70
|
import "./plugin-auto-enable-CtYcdTju.js";
|
|
71
71
|
import "./health-format-D-JJ5_S4.js";
|
|
72
|
-
import "./auth-choice-
|
|
72
|
+
import "./auth-choice-HF9x6xk2.js";
|
|
73
73
|
import "./prompts-Bq4QGFQM.js";
|
|
74
74
|
import "./noxsoft-bootstrap-CrlkSFzd.js";
|
|
75
75
|
import "./logging-Chc1Sj6N.js";
|
|
@@ -80,8 +80,8 @@ import "./skills-install-D6_qpRjW.js";
|
|
|
80
80
|
import "./npm-registry-spec-Br4B4I_3.js";
|
|
81
81
|
import "./clack-prompter-fZSmnHda.js";
|
|
82
82
|
import "./installs-Bi6UipiE.js";
|
|
83
|
-
import "./onboard-channels-
|
|
84
|
-
import { a as CONFIGURE_WIZARD_SECTIONS, i as buildGatewayAuthConfig, n as configureCommandWithSections, o as parseConfigureWizardSections, r as runConfigureWizard, t as configureCommand } from "./configure-
|
|
83
|
+
import "./onboard-channels-bx6oelzj.js";
|
|
84
|
+
import { a as CONFIGURE_WIZARD_SECTIONS, i as buildGatewayAuthConfig, n as configureCommandWithSections, o as parseConfigureWizardSections, r as runConfigureWizard, t as configureCommand } from "./configure-B2Mfnwy_.js";
|
|
85
85
|
import "./systemd-linger-BVwGXVS0.js";
|
|
86
86
|
import JSON5 from "json5";
|
|
87
87
|
|
|
@@ -293,7 +293,7 @@ async function runConfigSet(opts) {
|
|
|
293
293
|
}
|
|
294
294
|
function registerConfigCli(program) {
|
|
295
295
|
const cmd = program.command("config").description("Read, write, and manage ANIMA configuration").addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/config", "docs.noxsoft.net/anima/cli/config")}\n`).option("--section <section>", "Configure wizard sections (repeatable). Use with no subcommand.", (value, previous) => [...previous, value], []).action(async (opts) => {
|
|
296
|
-
const { CONFIGURE_WIZARD_SECTIONS, configureCommand, configureCommandWithSections, parseConfigureWizardSections } = await import("./configure-
|
|
296
|
+
const { CONFIGURE_WIZARD_SECTIONS, configureCommand, configureCommandWithSections, parseConfigureWizardSections } = await import("./configure-SnvMHZPD.js");
|
|
297
297
|
const { sections, invalid } = parseConfigureWizardSections(opts.section);
|
|
298
298
|
if (sections.length === 0) {
|
|
299
299
|
await configureCommand(defaultRuntime);
|
|
@@ -13,16 +13,16 @@ import { n as stylePromptMessage, r as stylePromptTitle, t as stylePromptHint }
|
|
|
13
13
|
import { t as resolveGatewayService } from "./service-4VfZwSv1.js";
|
|
14
14
|
import { n as resolveWideAreaDiscoveryDomain } from "./widearea-dns-CtU9Fx7K.js";
|
|
15
15
|
import { t as discoverGatewayBeacons } from "./bonjour-discovery-D3HFfTyG.js";
|
|
16
|
-
import { r as healthCommand } from "./health-
|
|
16
|
+
import { r as healthCommand } from "./health-Cndq9b7A.js";
|
|
17
17
|
import { n as ensureControlUiAssetsBuilt, t as formatHealthCheckFailure } from "./health-format-BLnFZCH_.js";
|
|
18
|
-
import { a as applyModelFallbacksFromSelection, c as promptModelAllowlist, i as applyModelAllowlist, l as promptAuthChoiceGrouped, o as applyPrimaryModel, r as applyAuthChoice, s as promptDefaultModel, t as resolvePreferredProviderForAuthChoice } from "./auth-choice-
|
|
18
|
+
import { a as applyModelFallbacksFromSelection, c as promptModelAllowlist, i as applyModelAllowlist, l as promptAuthChoiceGrouped, o as applyPrimaryModel, r as applyAuthChoice, s as promptDefaultModel, t as resolvePreferredProviderForAuthChoice } from "./auth-choice-B1iGnjuE.js";
|
|
19
19
|
import { t as WizardCancelledError } from "./prompts-BmgT_kkv.js";
|
|
20
20
|
import { n as logConfigUpdated } from "./logging-_rCcBkls.js";
|
|
21
21
|
import { t as note$1 } from "./note-CeLGcHqv.js";
|
|
22
22
|
import { t as validateIPv4AddressInput } from "./ipv4-DfMwLQ0d.js";
|
|
23
23
|
import { t as installSkill } from "./skills-install-Qw2oU8L8.js";
|
|
24
24
|
import { t as createClackPrompter } from "./clack-prompter-0JW5kry0.js";
|
|
25
|
-
import { n as setupChannels, t as noteChannelStatus } from "./onboard-channels-
|
|
25
|
+
import { n as setupChannels, t as noteChannelStatus } from "./onboard-channels-BsCq32Hn.js";
|
|
26
26
|
import { t as ensureSystemdUserLingerInteractive } from "./systemd-linger-CxGmIy_5.js";
|
|
27
27
|
import { confirm, intro, outro, select, text } from "@clack/prompts";
|
|
28
28
|
|
|
@@ -16,10 +16,10 @@ import "./shell-env-2QqHvBMl.js";
|
|
|
16
16
|
import "./client-CfLiulzK.js";
|
|
17
17
|
import "./call-B4lhqS6H.js";
|
|
18
18
|
import "./message-channel-DIHHKJhk.js";
|
|
19
|
-
import "./subagent-registry-
|
|
19
|
+
import "./subagent-registry-fLI7QDKe.js";
|
|
20
20
|
import "./sessions-C_3wTmSA.js";
|
|
21
21
|
import "./tokens-CmlI2hSz.js";
|
|
22
|
-
import "./anthropic-direct-runner-
|
|
22
|
+
import "./anthropic-direct-runner-DizCei79.js";
|
|
23
23
|
import "./pi-embedded-helpers-D2SLlgS4.js";
|
|
24
24
|
import "./sandbox-D-N7M7lp.js";
|
|
25
25
|
import "./chrome-CmxIwwsr.js";
|
|
@@ -45,7 +45,7 @@ import "./common-CqIa2poH.js";
|
|
|
45
45
|
import "./chunk-Cy0Bj0F3.js";
|
|
46
46
|
import "./parse-timeout-D4UO8pY_.js";
|
|
47
47
|
import "./active-listener-gGCoq55D.js";
|
|
48
|
-
import "./context-
|
|
48
|
+
import "./context-mdxDsO1v.js";
|
|
49
49
|
import "./pi-tools.policy-D2FusuQa.js";
|
|
50
50
|
import "./session-cost-usage-DnxtnK1E.js";
|
|
51
51
|
import "./control-service-3CI4vt1h.js";
|
|
@@ -64,11 +64,11 @@ import "./systemd-6iLWJxQQ.js";
|
|
|
64
64
|
import "./service-4VfZwSv1.js";
|
|
65
65
|
import "./widearea-dns-CtU9Fx7K.js";
|
|
66
66
|
import "./bonjour-discovery-D3HFfTyG.js";
|
|
67
|
-
import "./health-
|
|
67
|
+
import "./health-Cndq9b7A.js";
|
|
68
68
|
import "./catalog-B-TAbJ2o.js";
|
|
69
69
|
import "./plugin-auto-enable-DhuD30Je.js";
|
|
70
70
|
import "./health-format-BLnFZCH_.js";
|
|
71
|
-
import "./auth-choice-
|
|
71
|
+
import "./auth-choice-B1iGnjuE.js";
|
|
72
72
|
import "./prompts-BmgT_kkv.js";
|
|
73
73
|
import "./noxsoft-bootstrap-C4dSx7K_.js";
|
|
74
74
|
import "./logging-_rCcBkls.js";
|
|
@@ -79,8 +79,8 @@ import "./skills-install-Qw2oU8L8.js";
|
|
|
79
79
|
import "./npm-registry-spec-jf7Mowdn.js";
|
|
80
80
|
import "./clack-prompter-0JW5kry0.js";
|
|
81
81
|
import "./installs-a4Vz_J08.js";
|
|
82
|
-
import "./onboard-channels-
|
|
83
|
-
import { a as CONFIGURE_WIZARD_SECTIONS, i as buildGatewayAuthConfig, n as configureCommandWithSections, o as parseConfigureWizardSections, r as runConfigureWizard, t as configureCommand } from "./configure-
|
|
82
|
+
import "./onboard-channels-BsCq32Hn.js";
|
|
83
|
+
import { a as CONFIGURE_WIZARD_SECTIONS, i as buildGatewayAuthConfig, n as configureCommandWithSections, o as parseConfigureWizardSections, r as runConfigureWizard, t as configureCommand } from "./configure-ZWxixuRA.js";
|
|
84
84
|
import "./systemd-linger-CxGmIy_5.js";
|
|
85
85
|
import JSON5 from "json5";
|
|
86
86
|
|
|
@@ -292,7 +292,7 @@ async function runConfigSet(opts) {
|
|
|
292
292
|
}
|
|
293
293
|
function registerConfigCli(program) {
|
|
294
294
|
const cmd = program.command("config").description("Read, write, and manage ANIMA configuration").addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/config", "docs.noxsoft.net/anima/cli/config")}\n`).option("--section <section>", "Configure wizard sections (repeatable). Use with no subcommand.", (value, previous) => [...previous, value], []).action(async (opts) => {
|
|
295
|
-
const { CONFIGURE_WIZARD_SECTIONS, configureCommand, configureCommandWithSections, parseConfigureWizardSections } = await import("./configure-
|
|
295
|
+
const { CONFIGURE_WIZARD_SECTIONS, configureCommand, configureCommandWithSections, parseConfigureWizardSections } = await import("./configure-lkozxQed.js");
|
|
296
296
|
const { sections, invalid } = parseConfigureWizardSections(opts.section);
|
|
297
297
|
if (sections.length === 0) {
|
|
298
298
|
await configureCommand(defaultRuntime);
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { t as resolveAnimaAgentDir } from "./agent-paths-niQrLbGc.js";
|
|
2
|
+
import { i as loadConfig } from "./config-BrVuTQ8R.js";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import fs from "node:fs/promises";
|
|
5
|
+
|
|
6
|
+
//#region src/agents/models-config.ts
|
|
7
|
+
/**
|
|
8
|
+
* Models configuration — Multi-provider
|
|
9
|
+
*
|
|
10
|
+
* ANIMA 6.5+ supports direct API runners for Anthropic, Google, OpenAI,
|
|
11
|
+
* and AWS Bedrock. This file seeds the models.json with all known models
|
|
12
|
+
* so the PI SDK ModelRegistry can discover them for the model catalog.
|
|
13
|
+
*/
|
|
14
|
+
/** Seed catalog — all models ANIMA can route to via direct runners. */
|
|
15
|
+
const SEED_MODELS = [
|
|
16
|
+
{
|
|
17
|
+
id: "gpt-5.4",
|
|
18
|
+
name: "GPT-5.4",
|
|
19
|
+
provider: "openai",
|
|
20
|
+
contextWindow: 1048576,
|
|
21
|
+
reasoning: true,
|
|
22
|
+
input: ["text", "image"]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "gpt-5.2",
|
|
26
|
+
name: "GPT-5.2",
|
|
27
|
+
provider: "openai",
|
|
28
|
+
contextWindow: 256e3,
|
|
29
|
+
reasoning: true,
|
|
30
|
+
input: ["text", "image"]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "gpt-4.1",
|
|
34
|
+
name: "GPT-4.1",
|
|
35
|
+
provider: "openai",
|
|
36
|
+
contextWindow: 1048576,
|
|
37
|
+
reasoning: false,
|
|
38
|
+
input: ["text", "image"]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "gpt-4.1-mini",
|
|
42
|
+
name: "GPT-4.1 Mini",
|
|
43
|
+
provider: "openai",
|
|
44
|
+
contextWindow: 1048576,
|
|
45
|
+
reasoning: false,
|
|
46
|
+
input: ["text", "image"]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: "gpt-4.1-nano",
|
|
50
|
+
name: "GPT-4.1 Nano",
|
|
51
|
+
provider: "openai",
|
|
52
|
+
contextWindow: 1048576,
|
|
53
|
+
reasoning: false,
|
|
54
|
+
input: ["text"]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "gpt-4o",
|
|
58
|
+
name: "GPT-4o",
|
|
59
|
+
provider: "openai",
|
|
60
|
+
contextWindow: 128e3,
|
|
61
|
+
reasoning: false,
|
|
62
|
+
input: ["text", "image"]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "gpt-4o-mini",
|
|
66
|
+
name: "GPT-4o Mini",
|
|
67
|
+
provider: "openai",
|
|
68
|
+
contextWindow: 128e3,
|
|
69
|
+
reasoning: false,
|
|
70
|
+
input: ["text", "image"]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "o3",
|
|
74
|
+
name: "o3",
|
|
75
|
+
provider: "openai",
|
|
76
|
+
contextWindow: 2e5,
|
|
77
|
+
reasoning: true,
|
|
78
|
+
input: ["text", "image"]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "o3-mini",
|
|
82
|
+
name: "o3-mini",
|
|
83
|
+
provider: "openai",
|
|
84
|
+
contextWindow: 2e5,
|
|
85
|
+
reasoning: true,
|
|
86
|
+
input: ["text"]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "o4-mini",
|
|
90
|
+
name: "o4-mini",
|
|
91
|
+
provider: "openai",
|
|
92
|
+
contextWindow: 2e5,
|
|
93
|
+
reasoning: true,
|
|
94
|
+
input: ["text", "image"]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "gemini-2.5-flash",
|
|
98
|
+
name: "Gemini 2.5 Flash",
|
|
99
|
+
provider: "google",
|
|
100
|
+
contextWindow: 1048576,
|
|
101
|
+
reasoning: true,
|
|
102
|
+
input: ["text", "image"]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "gemini-2.5-pro",
|
|
106
|
+
name: "Gemini 2.5 Pro",
|
|
107
|
+
provider: "google",
|
|
108
|
+
contextWindow: 1048576,
|
|
109
|
+
reasoning: true,
|
|
110
|
+
input: ["text", "image"]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "gemini-2.0-flash",
|
|
114
|
+
name: "Gemini 2.0 Flash",
|
|
115
|
+
provider: "google",
|
|
116
|
+
contextWindow: 1048576,
|
|
117
|
+
reasoning: false,
|
|
118
|
+
input: ["text", "image"]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "claude-opus-4-6",
|
|
122
|
+
name: "Claude Opus 4.6",
|
|
123
|
+
provider: "anthropic",
|
|
124
|
+
contextWindow: 1e6,
|
|
125
|
+
reasoning: true,
|
|
126
|
+
input: ["text", "image"]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "claude-sonnet-4-6",
|
|
130
|
+
name: "Claude Sonnet 4.6",
|
|
131
|
+
provider: "anthropic",
|
|
132
|
+
contextWindow: 1e6,
|
|
133
|
+
reasoning: true,
|
|
134
|
+
input: ["text", "image"]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "claude-haiku-4-5",
|
|
138
|
+
name: "Claude Haiku 4.5",
|
|
139
|
+
provider: "anthropic",
|
|
140
|
+
contextWindow: 2e5,
|
|
141
|
+
reasoning: false,
|
|
142
|
+
input: ["text", "image"]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "amazon.nova-micro-v1:0",
|
|
146
|
+
name: "Amazon Nova Micro",
|
|
147
|
+
provider: "amazon-bedrock",
|
|
148
|
+
contextWindow: 128e3,
|
|
149
|
+
reasoning: false,
|
|
150
|
+
input: ["text"]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: "amazon.nova-lite-v1:0",
|
|
154
|
+
name: "Amazon Nova Lite",
|
|
155
|
+
provider: "amazon-bedrock",
|
|
156
|
+
contextWindow: 3e5,
|
|
157
|
+
reasoning: false,
|
|
158
|
+
input: ["text", "image"]
|
|
159
|
+
}
|
|
160
|
+
];
|
|
161
|
+
async function ensureAnimaModelsJson(config, agentDirOverride) {
|
|
162
|
+
const agentDir = agentDirOverride?.trim() ? agentDirOverride.trim() : resolveAnimaAgentDir();
|
|
163
|
+
await fs.mkdir(agentDir, {
|
|
164
|
+
recursive: true,
|
|
165
|
+
mode: 448
|
|
166
|
+
});
|
|
167
|
+
const targetPath = path.join(agentDir, "models.json");
|
|
168
|
+
let existingData = {};
|
|
169
|
+
try {
|
|
170
|
+
const raw = await fs.readFile(targetPath, "utf8");
|
|
171
|
+
existingData = JSON.parse(raw);
|
|
172
|
+
} catch {}
|
|
173
|
+
const existingModels = Array.isArray(existingData.models) ? existingData.models : [];
|
|
174
|
+
const existingIds = new Set(existingModels.filter((m) => typeof m?.id === "string").map((m) => `${m.provider}/${m.id}`));
|
|
175
|
+
const merged = [...existingModels];
|
|
176
|
+
for (const seed of SEED_MODELS) {
|
|
177
|
+
const key = `${seed.provider}/${seed.id}`;
|
|
178
|
+
if (!existingIds.has(key)) {
|
|
179
|
+
merged.push(seed);
|
|
180
|
+
existingIds.add(key);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
const content = JSON.stringify({
|
|
184
|
+
providers: existingData.providers ?? {},
|
|
185
|
+
models: merged
|
|
186
|
+
}, null, 2) + "\n";
|
|
187
|
+
let existing = "";
|
|
188
|
+
try {
|
|
189
|
+
existing = await fs.readFile(targetPath, "utf8");
|
|
190
|
+
} catch {}
|
|
191
|
+
if (existing === content) return {
|
|
192
|
+
agentDir,
|
|
193
|
+
wrote: false
|
|
194
|
+
};
|
|
195
|
+
await fs.writeFile(targetPath, content, { mode: 384 });
|
|
196
|
+
return {
|
|
197
|
+
agentDir,
|
|
198
|
+
wrote: true
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region src/agents/context.ts
|
|
204
|
+
const MODEL_CACHE = /* @__PURE__ */ new Map();
|
|
205
|
+
(async () => {
|
|
206
|
+
try {
|
|
207
|
+
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-BZryRo8-.js").then((n) => n.r);
|
|
208
|
+
await ensureAnimaModelsJson(loadConfig());
|
|
209
|
+
const agentDir = resolveAnimaAgentDir();
|
|
210
|
+
const models = discoverModels(discoverAuthStorage(agentDir), agentDir).getAll();
|
|
211
|
+
for (const m of models) {
|
|
212
|
+
if (!m?.id) continue;
|
|
213
|
+
if (typeof m.contextWindow === "number" && m.contextWindow > 0) MODEL_CACHE.set(m.id, m.contextWindow);
|
|
214
|
+
}
|
|
215
|
+
} catch {}
|
|
216
|
+
})();
|
|
217
|
+
function lookupContextTokens(modelId) {
|
|
218
|
+
if (!modelId) return;
|
|
219
|
+
return MODEL_CACHE.get(modelId);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
//#endregion
|
|
223
|
+
export { ensureAnimaModelsJson as n, lookupContextTokens as t };
|