agentix-cli 0.25.0 → 0.27.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/README.md +2 -0
- package/dist/{App-6Y7B3YQH.js → App-U52IPUK2.js} +2 -2
- package/dist/{ChatApp-KIEUJ2DS.js → ChatApp-XP4OMHPL.js} +2 -2
- package/dist/agent-V2CA4TXD.js +2 -0
- package/dist/article-fields-L4D2BOGY.js +2 -0
- package/dist/article-quality-44ONVGLN.js +3 -0
- package/dist/article-quality-44ONVGLN.js.map +1 -0
- package/dist/{audit-JU3HWISB.js → audit-4245CX6P.js} +2 -2
- package/dist/backfill-MTD2B62I.js +6 -0
- package/dist/backfill-MTD2B62I.js.map +1 -0
- package/dist/{board-dashboard-CQ5F4GPD.js → board-dashboard-TTMAYRLG.js} +2445 -519
- package/dist/board-dashboard-TTMAYRLG.js.map +1 -0
- package/dist/{builtin-FRKAQMFS.js → builtin-B67DMJ3M.js} +2 -2
- package/dist/calibration-ILS5OI44.js +2 -0
- package/dist/chunk-2T5W3ETS.js +5 -0
- package/dist/{chunk-FDMWOPEL.js.map → chunk-2T5W3ETS.js.map} +1 -1
- package/dist/chunk-3SCPRYJB.js +5 -0
- package/dist/chunk-3SCPRYJB.js.map +1 -0
- package/dist/chunk-4BR7D2OU.js +36 -0
- package/dist/chunk-4BR7D2OU.js.map +1 -0
- package/dist/{chunk-P4VWIVKN.js → chunk-52ZPELD2.js} +403 -29
- package/dist/chunk-52ZPELD2.js.map +1 -0
- package/dist/{chunk-5U35WAZF.js → chunk-77OV7346.js} +6 -6
- package/dist/chunk-77OV7346.js.map +1 -0
- package/dist/chunk-AJ5RMU7X.js +2 -0
- package/dist/chunk-AJ5RMU7X.js.map +1 -0
- package/dist/chunk-AJONZWLT.js +2 -0
- package/dist/chunk-AJONZWLT.js.map +1 -0
- package/dist/chunk-AX2PWSRT.js +114 -0
- package/dist/chunk-AX2PWSRT.js.map +1 -0
- package/dist/chunk-BH3GTCZ6.js +2 -0
- package/dist/chunk-BH3GTCZ6.js.map +1 -0
- package/dist/chunk-BPIRO4YD.js +126 -0
- package/dist/chunk-BPIRO4YD.js.map +1 -0
- package/dist/chunk-CJQQIRPD.js +13 -0
- package/dist/chunk-CJQQIRPD.js.map +1 -0
- package/dist/chunk-DCDQZR7I.js +24 -0
- package/dist/chunk-DCDQZR7I.js.map +1 -0
- package/dist/chunk-EVWEG3VD.js +3 -0
- package/dist/chunk-EVWEG3VD.js.map +1 -0
- package/dist/chunk-F4HZTZHW.js +2 -0
- package/dist/chunk-F4HZTZHW.js.map +1 -0
- package/dist/chunk-F6CNF7V3.js +25 -0
- package/dist/chunk-F6CNF7V3.js.map +1 -0
- package/dist/chunk-FIEJDZVC.js +121 -0
- package/dist/chunk-FIEJDZVC.js.map +1 -0
- package/dist/chunk-FIOB3MEX.js +2 -0
- package/dist/{chunk-H5D7ATXS.js → chunk-FKBGJYWQ.js} +5 -5
- package/dist/chunk-FKBGJYWQ.js.map +1 -0
- package/dist/chunk-GDWJUGB5.js +9 -0
- package/dist/chunk-GDWJUGB5.js.map +1 -0
- package/dist/{chunk-TRJTTBE2.js → chunk-IB3F7VBE.js} +7 -7
- package/dist/{chunk-TRJTTBE2.js.map → chunk-IB3F7VBE.js.map} +1 -1
- package/dist/chunk-IBUSGCLQ.js +109 -0
- package/dist/chunk-IBUSGCLQ.js.map +1 -0
- package/dist/{chunk-LDHPMJ7M.js → chunk-IWMW5432.js} +3 -3
- package/dist/chunk-IWMW5432.js.map +1 -0
- package/dist/chunk-K33GIBSE.js +2 -0
- package/dist/chunk-K33GIBSE.js.map +1 -0
- package/dist/chunk-L2IZPR6P.js +45 -0
- package/dist/chunk-L2IZPR6P.js.map +1 -0
- package/dist/chunk-L2WSPY6S.js +2 -0
- package/dist/chunk-L2WSPY6S.js.map +1 -0
- package/dist/chunk-LCIREYTD.js +54 -0
- package/dist/chunk-LCIREYTD.js.map +1 -0
- package/dist/chunk-LNRB5MCU.js +530 -0
- package/dist/chunk-LNRB5MCU.js.map +1 -0
- package/dist/chunk-OPHIXXGI.js +157 -0
- package/dist/chunk-OPHIXXGI.js.map +1 -0
- package/dist/{chunk-JTJIPNXY.js → chunk-PNWNVOEZ.js} +1 -1
- package/dist/chunk-PNWNVOEZ.js.map +1 -0
- package/dist/{chunk-LNXCJWOU.js → chunk-UFAGYX73.js} +45 -47
- package/dist/chunk-UFAGYX73.js.map +1 -0
- package/dist/{chunk-DJEZ2HVU.js → chunk-VDMYBPYB.js} +1 -1
- package/dist/chunk-VDMYBPYB.js.map +1 -0
- package/dist/chunk-VTE7L6LO.js +5 -0
- package/dist/{chunk-G57RZCXM.js.map → chunk-VTE7L6LO.js.map} +1 -1
- package/dist/chunk-W5C2GDNC.js +32 -0
- package/dist/{chunk-JP5IEXR7.js.map → chunk-W5C2GDNC.js.map} +1 -1
- package/dist/chunk-WPMX3VGI.js +3 -0
- package/dist/chunk-WPMX3VGI.js.map +1 -0
- package/dist/chunk-WZ72HX5C.js +1182 -0
- package/dist/chunk-WZ72HX5C.js.map +1 -0
- package/dist/chunk-ZTEU5JVQ.js +2 -0
- package/dist/chunk-ZTEU5JVQ.js.map +1 -0
- package/dist/{chunk-2WVX3LEC.js → chunk-ZVP6GB4G.js} +1 -1
- package/dist/chunk-ZVP6GB4G.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/client-PX25MD47.js +2 -0
- package/dist/{compaction-NWEMOSHA.js → compaction-FD4R23HZ.js} +4 -4
- package/dist/config-HL5F36V4.js +2 -0
- package/dist/config-mutator-HBX53OMJ.js +2 -0
- package/dist/{conflict-detector-D7VIYPDI.js → conflict-detector-ZPOT3M2C.js} +2 -2
- package/dist/conflict-detector-ZPOT3M2C.js.map +1 -0
- package/dist/context-planner-AQHJMVY2.js +17 -0
- package/dist/context-planner-AQHJMVY2.js.map +1 -0
- package/dist/debug-3MEUO2P2.js +2 -0
- package/dist/{discover-XJXQXXIO.js → discover-D4VVRNAI.js} +2 -2
- package/dist/discover-D4VVRNAI.js.map +1 -0
- package/dist/doctor-PBAH6XL3.js +2 -0
- package/dist/editor-chat-OB7IQOB5.js +137 -0
- package/dist/editor-chat-OB7IQOB5.js.map +1 -0
- package/dist/entry-triage-LK34TSQD.js +2 -0
- package/dist/entry-triage-LK34TSQD.js.map +1 -0
- package/dist/facts-YVEJOM7O.js +22 -0
- package/dist/facts-YVEJOM7O.js.map +1 -0
- package/dist/heal-FVLBHYP7.js +2 -0
- package/dist/index.d.ts +1073 -65
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/{ingest-whatsapp-LZE62INA.js → ingest-whatsapp-NS4OWDOU.js} +2 -2
- package/dist/loader-4ZGTK7LD.js +2 -0
- package/dist/loader-BOKE5M5S.js +2 -0
- package/dist/memory-extract-F5ZHWY5E.js +2 -0
- package/dist/{migrate-v2-QO7SLKIM.js → migrate-v2-V4WN2VVM.js} +2 -2
- package/dist/ntfy-X7EPB3TG.js +4 -0
- package/dist/ntfy-X7EPB3TG.js.map +1 -0
- package/dist/processes-WU23U2OJ.js +2 -0
- package/dist/program-YGXVCV2Y.js +2 -0
- package/dist/{projects-api-KRME2YKZ.js → projects-api-QE6L65SK.js} +2 -2
- package/dist/{projects-mutate-3NHVG437.js → projects-mutate-MY7JTLSZ.js} +2 -2
- package/dist/providers-KO2DODIO.js +2 -0
- package/dist/query-ZKTFJMNE.js +2 -0
- package/dist/questions-4B4KSPXG.js +3 -0
- package/dist/questions-4B4KSPXG.js.map +1 -0
- package/dist/recipes-7S4MC5OJ.js +2 -0
- package/dist/registry-PSZDPFZK.js +2 -0
- package/dist/review-candidates-AEUXRQQC.js +4 -0
- package/dist/review-candidates-AEUXRQQC.js.map +1 -0
- package/dist/review-store-B4YE3EFK.js +4 -0
- package/dist/review-store-B4YE3EFK.js.map +1 -0
- package/dist/{rotation-memo-B3EXXSEH.js → rotation-memo-7T75BLEX.js} +2 -2
- package/dist/routing-4PV66BK6.js +2 -0
- package/dist/routing-4PV66BK6.js.map +1 -0
- package/dist/runner-YRBVNYTY.js +2 -0
- package/dist/scheduler-GZZAN6ZG.js +2 -0
- package/dist/seat-VZ7AVO27.js +2 -0
- package/dist/select-F5I5PO2O.js +2 -0
- package/dist/select-F5I5PO2O.js.map +1 -0
- package/dist/store-MCOA6N4F.js +2 -0
- package/dist/{subagent-WV7QKQ3L.js → subagent-2SJHSSJS.js} +2 -2
- package/dist/{surface-usage-PRL6Z4U3.js → surface-usage-NS74AXSE.js} +2 -2
- package/dist/timers-PCB4ZIBD.js +2 -0
- package/dist/triage-backtest-JNO7RKX7.js +2 -0
- package/dist/triage-backtest-JNO7RKX7.js.map +1 -0
- package/dist/types-H5ENIUIT.js +2 -0
- package/dist/types-OIFU3KSQ.js +2 -0
- package/dist/web/workflow-editor.global.js +1542 -0
- package/dist/web/workflow-editor.global.js.map +1 -0
- package/dist/{whatsapp-state-XMTCSRXU.js → whatsapp-state-6D6FHHD2.js} +2 -2
- package/dist/wiki-N5SMP3DT.js +2 -0
- package/dist/wiki-N5SMP3DT.js.map +1 -0
- package/dist/workflows/templates/branching.yaml +1 -1
- package/dist/{workspace-setup-TBQAHYHJ.js → workspace-setup-B3F3TUDE.js} +2 -2
- package/dist/workspace-setup-B3F3TUDE.js.map +1 -0
- package/package.json +1 -1
- package/dist/agent-QGZIAZMY.js +0 -2
- package/dist/architect-SEPWMWS4.js +0 -2
- package/dist/board-dashboard-CQ5F4GPD.js.map +0 -1
- package/dist/chunk-2WVX3LEC.js.map +0 -1
- package/dist/chunk-3WQFCIB6.js +0 -24
- package/dist/chunk-3WQFCIB6.js.map +0 -1
- package/dist/chunk-4YCH6IZV.js +0 -2
- package/dist/chunk-53GCFZPR.js +0 -116
- package/dist/chunk-53GCFZPR.js.map +0 -1
- package/dist/chunk-53NRX2NA.js +0 -2
- package/dist/chunk-53NRX2NA.js.map +0 -1
- package/dist/chunk-5U35WAZF.js.map +0 -1
- package/dist/chunk-BFXONUUN.js +0 -108
- package/dist/chunk-BFXONUUN.js.map +0 -1
- package/dist/chunk-BFZUG66X.js +0 -45
- package/dist/chunk-BFZUG66X.js.map +0 -1
- package/dist/chunk-DJEZ2HVU.js.map +0 -1
- package/dist/chunk-FDMWOPEL.js +0 -5
- package/dist/chunk-FDWOECJY.js +0 -54
- package/dist/chunk-FDWOECJY.js.map +0 -1
- package/dist/chunk-G57RZCXM.js +0 -5
- package/dist/chunk-H5D7ATXS.js.map +0 -1
- package/dist/chunk-HA3XI7Z2.js +0 -155
- package/dist/chunk-HA3XI7Z2.js.map +0 -1
- package/dist/chunk-HR4JSRZS.js +0 -3
- package/dist/chunk-HR4JSRZS.js.map +0 -1
- package/dist/chunk-ISEBLHWX.js +0 -118
- package/dist/chunk-ISEBLHWX.js.map +0 -1
- package/dist/chunk-JP5IEXR7.js +0 -32
- package/dist/chunk-JTJIPNXY.js.map +0 -1
- package/dist/chunk-JXWAGMI2.js +0 -13
- package/dist/chunk-JXWAGMI2.js.map +0 -1
- package/dist/chunk-KUCCW2VG.js +0 -431
- package/dist/chunk-KUCCW2VG.js.map +0 -1
- package/dist/chunk-LDHPMJ7M.js.map +0 -1
- package/dist/chunk-LNXCJWOU.js.map +0 -1
- package/dist/chunk-NGSIRE4X.js +0 -126
- package/dist/chunk-NGSIRE4X.js.map +0 -1
- package/dist/chunk-P4VWIVKN.js.map +0 -1
- package/dist/chunk-Q6YO7LYE.js +0 -47
- package/dist/chunk-Q6YO7LYE.js.map +0 -1
- package/dist/chunk-SR3X25TN.js +0 -3
- package/dist/chunk-SR3X25TN.js.map +0 -1
- package/dist/chunk-TMKLHTCG.js +0 -971
- package/dist/chunk-TMKLHTCG.js.map +0 -1
- package/dist/chunk-VJUTQAPJ.js +0 -2
- package/dist/chunk-VJUTQAPJ.js.map +0 -1
- package/dist/client-GGVVLOOF.js +0 -2
- package/dist/config-7FSZFRTQ.js +0 -2
- package/dist/config-mutator-POCOYYJ4.js +0 -2
- package/dist/conflict-detector-D7VIYPDI.js.map +0 -1
- package/dist/context-planner-45GEWKGL.js +0 -17
- package/dist/context-planner-45GEWKGL.js.map +0 -1
- package/dist/debug-N3B5NVJU.js +0 -2
- package/dist/discover-XJXQXXIO.js.map +0 -1
- package/dist/doctor-DHLBEKA4.js +0 -2
- package/dist/heal-HZ3EQD52.js +0 -2
- package/dist/loader-5CA3O5GM.js +0 -2
- package/dist/loader-6IHUCPVO.js +0 -2
- package/dist/memory-extract-AENFVVO5.js +0 -2
- package/dist/processes-UIC4XXA6.js +0 -2
- package/dist/program-WVAVJFND.js +0 -2
- package/dist/providers-L27BJ5A6.js +0 -2
- package/dist/query-HZYYRCLU.js +0 -2
- package/dist/recipes-EPLE2SNT.js +0 -2
- package/dist/registry-T36ZIAWV.js +0 -2
- package/dist/runner-BFYDWPUO.js +0 -2
- package/dist/scheduler-GH7TIKYS.js +0 -2
- package/dist/store-I3HEWVLQ.js +0 -2
- package/dist/timers-5LPZN55J.js +0 -2
- package/dist/types-VECTMYTO.js +0 -2
- package/dist/types-Y6ZCZ52Z.js +0 -2
- package/dist/wiki-M6YNRFC4.js +0 -2
- /package/dist/{App-6Y7B3YQH.js.map → App-U52IPUK2.js.map} +0 -0
- /package/dist/{ChatApp-KIEUJ2DS.js.map → ChatApp-XP4OMHPL.js.map} +0 -0
- /package/dist/{agent-QGZIAZMY.js.map → agent-V2CA4TXD.js.map} +0 -0
- /package/dist/{architect-SEPWMWS4.js.map → article-fields-L4D2BOGY.js.map} +0 -0
- /package/dist/{audit-JU3HWISB.js.map → audit-4245CX6P.js.map} +0 -0
- /package/dist/{builtin-FRKAQMFS.js.map → builtin-B67DMJ3M.js.map} +0 -0
- /package/dist/{chunk-4YCH6IZV.js.map → calibration-ILS5OI44.js.map} +0 -0
- /package/dist/{client-GGVVLOOF.js.map → chunk-FIOB3MEX.js.map} +0 -0
- /package/dist/{config-7FSZFRTQ.js.map → client-PX25MD47.js.map} +0 -0
- /package/dist/{compaction-NWEMOSHA.js.map → compaction-FD4R23HZ.js.map} +0 -0
- /package/dist/{config-mutator-POCOYYJ4.js.map → config-HL5F36V4.js.map} +0 -0
- /package/dist/{debug-N3B5NVJU.js.map → config-mutator-HBX53OMJ.js.map} +0 -0
- /package/dist/{doctor-DHLBEKA4.js.map → debug-3MEUO2P2.js.map} +0 -0
- /package/dist/{heal-HZ3EQD52.js.map → doctor-PBAH6XL3.js.map} +0 -0
- /package/dist/{loader-5CA3O5GM.js.map → heal-FVLBHYP7.js.map} +0 -0
- /package/dist/{ingest-whatsapp-LZE62INA.js.map → ingest-whatsapp-NS4OWDOU.js.map} +0 -0
- /package/dist/{loader-6IHUCPVO.js.map → loader-4ZGTK7LD.js.map} +0 -0
- /package/dist/{memory-extract-AENFVVO5.js.map → loader-BOKE5M5S.js.map} +0 -0
- /package/dist/{processes-UIC4XXA6.js.map → memory-extract-F5ZHWY5E.js.map} +0 -0
- /package/dist/{migrate-v2-QO7SLKIM.js.map → migrate-v2-V4WN2VVM.js.map} +0 -0
- /package/dist/{program-WVAVJFND.js.map → processes-WU23U2OJ.js.map} +0 -0
- /package/dist/{providers-L27BJ5A6.js.map → program-YGXVCV2Y.js.map} +0 -0
- /package/dist/{projects-api-KRME2YKZ.js.map → projects-api-QE6L65SK.js.map} +0 -0
- /package/dist/{projects-mutate-3NHVG437.js.map → projects-mutate-MY7JTLSZ.js.map} +0 -0
- /package/dist/{query-HZYYRCLU.js.map → providers-KO2DODIO.js.map} +0 -0
- /package/dist/{recipes-EPLE2SNT.js.map → query-ZKTFJMNE.js.map} +0 -0
- /package/dist/{registry-T36ZIAWV.js.map → recipes-7S4MC5OJ.js.map} +0 -0
- /package/dist/{runner-BFYDWPUO.js.map → registry-PSZDPFZK.js.map} +0 -0
- /package/dist/{rotation-memo-B3EXXSEH.js.map → rotation-memo-7T75BLEX.js.map} +0 -0
- /package/dist/{scheduler-GH7TIKYS.js.map → runner-YRBVNYTY.js.map} +0 -0
- /package/dist/{store-I3HEWVLQ.js.map → scheduler-GZZAN6ZG.js.map} +0 -0
- /package/dist/{surface-usage-PRL6Z4U3.js.map → seat-VZ7AVO27.js.map} +0 -0
- /package/dist/{timers-5LPZN55J.js.map → store-MCOA6N4F.js.map} +0 -0
- /package/dist/{subagent-WV7QKQ3L.js.map → subagent-2SJHSSJS.js.map} +0 -0
- /package/dist/{types-VECTMYTO.js.map → surface-usage-NS74AXSE.js.map} +0 -0
- /package/dist/{types-Y6ZCZ52Z.js.map → timers-PCB4ZIBD.js.map} +0 -0
- /package/dist/{wiki-M6YNRFC4.js.map → types-H5ENIUIT.js.map} +0 -0
- /package/dist/{workspace-setup-TBQAHYHJ.js.map → types-OIFU3KSQ.js.map} +0 -0
- /package/dist/{whatsapp-state-XMTCSRXU.js.map → whatsapp-state-6D6FHHD2.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,31 @@ interface ProviderOptions {
|
|
|
29
29
|
* marks the task aborted in the registry; the underlying request
|
|
30
30
|
* can hang for hours waiting for the model to finish thinking. */
|
|
31
31
|
abortSignal?: AbortSignal;
|
|
32
|
+
/** Force the model to call one specific tool, making its whole reply the
|
|
33
|
+
* tool's structured `input`. Anthropic renders this as
|
|
34
|
+
* `tool_choice: {type:"tool", name}`; OpenAI as
|
|
35
|
+
* `tool_choice: {type:"function", function:{name}}`. Providers that
|
|
36
|
+
* can't force a tool (the claude-code CLI on OAuth) ignore it — callers
|
|
37
|
+
* must check `PROVIDER_CAPABILITIES[name].structuredOutput` first. */
|
|
38
|
+
toolChoice?: {
|
|
39
|
+
type: "tool";
|
|
40
|
+
name: string;
|
|
41
|
+
};
|
|
42
|
+
/** OpenAI-compatible structured-output passthrough. Anthropic ignores it;
|
|
43
|
+
* use `toolChoice` there instead. */
|
|
44
|
+
responseFormat?: {
|
|
45
|
+
type: "json_schema";
|
|
46
|
+
name: string;
|
|
47
|
+
schema: Record<string, unknown>;
|
|
48
|
+
};
|
|
49
|
+
/** Ask for the token distribution behind the answer. Only meaningful on
|
|
50
|
+
* OpenAI-compatible providers, and only useful when the answer is a
|
|
51
|
+
* single token — see src/decisions/backends/local-llm.ts, which is the
|
|
52
|
+
* one caller that has a use for it. */
|
|
53
|
+
logprobs?: {
|
|
54
|
+
enabled: true;
|
|
55
|
+
topK: number;
|
|
56
|
+
};
|
|
32
57
|
}
|
|
33
58
|
type StreamEvent = {
|
|
34
59
|
type: "text_delta";
|
|
@@ -423,12 +448,12 @@ declare function getLegacyTools(): Array<{
|
|
|
423
448
|
declare function formatToolsForSystemPrompt(): string;
|
|
424
449
|
declare const ALL_TOOL_NAMES: string[];
|
|
425
450
|
|
|
426
|
-
interface
|
|
427
|
-
/** The
|
|
451
|
+
interface AcmeToolContext {
|
|
452
|
+
/** The example.com user UUID this tool call impersonates. */
|
|
428
453
|
userId: string;
|
|
429
454
|
/** Logical agent id (for the audit table's X-Agent-Id column). */
|
|
430
455
|
agentId?: string;
|
|
431
|
-
/** Override the
|
|
456
|
+
/** Override the example.com base URL — defaults to ACME_API_URL env or https://example.com. */
|
|
432
457
|
apiUrl?: string;
|
|
433
458
|
}
|
|
434
459
|
|
|
@@ -517,10 +542,10 @@ declare const skillFrontmatterSchema: z.ZodObject<{
|
|
|
517
542
|
}>, "many">>;
|
|
518
543
|
/** If true, skill is auto-injected into context when triggers match (per-turn) */
|
|
519
544
|
autoInject: z.ZodOptional<z.ZodBoolean>;
|
|
520
|
-
/** Reference card ids cited by this skill (e.g. "
|
|
545
|
+
/** Reference card ids cited by this skill (e.g. "initech.gitlab.project.initech-v2").
|
|
521
546
|
* Audit lint flags FAILING when any id does not resolve. */
|
|
522
547
|
references: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
523
|
-
/** Skills this one delegates to (e.g.
|
|
548
|
+
/** Skills this one delegates to (e.g. initech-cx-email → [hotmail]). Audit lint
|
|
524
549
|
* flags FAILING when a delegate has no SKILL.md. */
|
|
525
550
|
delegatesTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
526
551
|
/** Free-form category — used by recipes and audit rules. Common values:
|
|
@@ -623,12 +648,12 @@ interface GenerateOptions {
|
|
|
623
648
|
lintCommand?: string;
|
|
624
649
|
maxAttempts?: number;
|
|
625
650
|
};
|
|
626
|
-
/** Enables the
|
|
651
|
+
/** Enables the acme workspace tool catalog (list_projects, create_task,
|
|
627
652
|
* …) in the agentic loop and threads the user_id through to the
|
|
628
|
-
* executor. Without this set, the
|
|
629
|
-
* agent's tool list — keeps non-
|
|
653
|
+
* executor. Without this set, the acme-tools are absent from the
|
|
654
|
+
* agent's tool list — keeps non-acme agents clean. The bearer is
|
|
630
655
|
* read from env at dispatch time and NEVER enters the prompt. */
|
|
631
|
-
|
|
656
|
+
acmeContext?: AcmeToolContext;
|
|
632
657
|
/** Provider-level options forwarded to `createProvider`. Today only
|
|
633
658
|
* `thinking` (for DeepSeek thinking-mode). Wired from
|
|
634
659
|
* `providers.<name>.thinking` in agentx.json by the daemon's
|
|
@@ -738,12 +763,12 @@ interface ToolExecutorOptions {
|
|
|
738
763
|
interactive?: boolean;
|
|
739
764
|
overwrite?: boolean;
|
|
740
765
|
dryRun?: boolean;
|
|
741
|
-
/** When set,
|
|
766
|
+
/** When set, acme-tools (list_projects, create_task, etc.) become
|
|
742
767
|
* available — the executor dispatches them by POSTing to
|
|
743
768
|
* /api/agent/tools with the server-held bearer. The bearer NEVER
|
|
744
|
-
* enters the model's prompt context. Omit to leave
|
|
769
|
+
* enters the model's prompt context. Omit to leave acme-tools off
|
|
745
770
|
* (the agent will see "Unknown tool" if it calls one anyway). */
|
|
746
|
-
|
|
771
|
+
acmeContext?: AcmeToolContext;
|
|
747
772
|
/** Operator-cancel signal. When fired we short-circuit `execute()`
|
|
748
773
|
* before dispatch and forward to execa as `cancelSignal` so a
|
|
749
774
|
* hung shell command can't outlive the abort. */
|
|
@@ -1070,7 +1095,7 @@ declare class PermissionManager {
|
|
|
1070
1095
|
}
|
|
1071
1096
|
declare const globalPermissions: PermissionManager;
|
|
1072
1097
|
|
|
1073
|
-
declare const HOOK_EVENTS: readonly ["pre:generate", "post:generate", "pre:file-write", "post:file-write", "pre:prompt", "post:response", "pre:command", "on:error", "pre:tool-call", "post:tool-call", "pre:channel-message", "post:channel-message", "pre:a2a-task", "pre:cron-run", "post:cron-run", "on:gitlab-pipeline", "on:gitlab-issue", "on:gitlab-mr", "on:gitlab-note", "on:github-issue", "on:github-pr", "on:github-push", "on:stripe-event", "on:sentry-issue", "on:vercel-deployment", "on:odoo-event", "on:hubspot-event"];
|
|
1098
|
+
declare const HOOK_EVENTS: readonly ["pre:generate", "post:generate", "pre:file-write", "post:file-write", "pre:prompt", "post:response", "pre:command", "on:error", "pre:tool-call", "post:tool-call", "pre:channel-message", "post:channel-message", "pre:a2a-task", "pre:cron-run", "post:cron-run", "on:gitlab-pipeline", "on:gitlab-issue", "on:gitlab-mr", "on:gitlab-note", "on:github-issue", "on:github-pr", "on:github-push", "on:n8n", "on:stripe-event", "on:sentry-issue", "on:vercel-deployment", "on:odoo-event", "on:hubspot-event"];
|
|
1074
1099
|
type HookEvent = (typeof HOOK_EVENTS)[number];
|
|
1075
1100
|
declare const BLOCKING_EVENTS: HookEvent[];
|
|
1076
1101
|
declare const hookDefinitionSchema: z.ZodObject<{
|
|
@@ -1512,8 +1537,8 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1512
1537
|
* .claude/settings.json permissions.allow with the codegraph_* tools,
|
|
1513
1538
|
* (c) appends a CodeGraph instruction section to the managed CLAUDE.md,
|
|
1514
1539
|
* and (d) background-indexes the workspace at daemon boot if .codegraph/
|
|
1515
|
-
* is missing. Off by default — flip on for coding agents (
|
|
1516
|
-
*
|
|
1540
|
+
* is missing. Off by default — flip on for coding agents (globex-v2-coder,
|
|
1541
|
+
* initech-v2-coder, umbrella-coding, etc.) where token-volume on exploration
|
|
1517
1542
|
* loops is the bottleneck. */
|
|
1518
1543
|
codegraph: z.ZodDefault<z.ZodBoolean>;
|
|
1519
1544
|
/** Per-agent override for the global `session.contextStrategy`. Lets
|
|
@@ -1523,7 +1548,7 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1523
1548
|
contextStrategy: z.ZodOptional<z.ZodEnum<["layered", "planner"]>>;
|
|
1524
1549
|
/** When true, the registry resolves references-recipes for this agent's
|
|
1525
1550
|
* workspace and renders a deterministic [Verified References] block at
|
|
1526
|
-
* priority 4.7. Off by default — flip on per agent (pm-
|
|
1551
|
+
* priority 4.7. Off by default — flip on per agent (pm-initech, devops-agent,
|
|
1527
1552
|
* etc.) once a `references/` registry exists in the agent's workspace
|
|
1528
1553
|
* or repo root. See src/agents/references/. */
|
|
1529
1554
|
contextReferences: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -1603,7 +1628,7 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1603
1628
|
integrations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1604
1629
|
/** Service identifier — open string, well-known values in INTEGRATION_KINDS. */
|
|
1605
1630
|
kind: z.ZodString;
|
|
1606
|
-
/** Human-readable label (e.g. "@cx_bot", "
|
|
1631
|
+
/** Human-readable label (e.g. "@cx_bot", "Acme CRM", "alex@example.com"). Unique per (agent, kind). */
|
|
1607
1632
|
label: z.ZodString;
|
|
1608
1633
|
credentials: z.ZodDefault<z.ZodObject<{
|
|
1609
1634
|
/** Env var holding the secret. Uppercase identifier; daemon resolves at use-time. */
|
|
@@ -1786,12 +1811,31 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1786
1811
|
metadata?: Record<string, string | number | boolean> | undefined;
|
|
1787
1812
|
}[] | undefined;
|
|
1788
1813
|
}>;
|
|
1789
|
-
declare const cronJobSchema: z.ZodObject<{
|
|
1814
|
+
declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
|
|
1790
1815
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1791
1816
|
schedule: z.ZodString;
|
|
1792
1817
|
timezone: z.ZodDefault<z.ZodString>;
|
|
1793
1818
|
agent: z.ZodString;
|
|
1794
|
-
prompt: z.ZodString
|
|
1819
|
+
prompt: z.ZodDefault<z.ZodString>;
|
|
1820
|
+
/**
|
|
1821
|
+
* A shell command to run INSTEAD of dispatching the agent.
|
|
1822
|
+
*
|
|
1823
|
+
* Seven of this fleet's twenty-six crons were a single command wrapped
|
|
1824
|
+
* in an agent, and every one of them carried a paragraph like "Run this
|
|
1825
|
+
* EXACT command. Do NOT substitute, rewrite, shorten, or fall back to
|
|
1826
|
+
* alternative commands." That paragraph is a scar: it exists because
|
|
1827
|
+
* models kept substituting, and no amount of prompt severity makes a
|
|
1828
|
+
* language model a deterministic executor.
|
|
1829
|
+
*
|
|
1830
|
+
* Measured before this existed: ~$0.31 and ~24s per run to execute one
|
|
1831
|
+
* `node script.js` and repeat ten lines of its output — a 114k-token
|
|
1832
|
+
* context for a job with no judgement in it at all.
|
|
1833
|
+
*
|
|
1834
|
+
* When set, the scheduler runs the command directly. No model, no
|
|
1835
|
+
* tokens, no improvisation. `agent` is still required and is who gets
|
|
1836
|
+
* told when it fails.
|
|
1837
|
+
*/
|
|
1838
|
+
command: z.ZodOptional<z.ZodString>;
|
|
1795
1839
|
timeout: z.ZodDefault<z.ZodNumber>;
|
|
1796
1840
|
model: z.ZodOptional<z.ZodString>;
|
|
1797
1841
|
/** Soft cap on output length. Claude Code CLI has no hard flag for this,
|
|
@@ -1821,6 +1865,7 @@ declare const cronJobSchema: z.ZodObject<{
|
|
|
1821
1865
|
timezone: string;
|
|
1822
1866
|
onError: ("notify" | "log" | "disable")[];
|
|
1823
1867
|
model?: string | undefined;
|
|
1868
|
+
command?: string | undefined;
|
|
1824
1869
|
notify?: {
|
|
1825
1870
|
channel: string;
|
|
1826
1871
|
chatId: string;
|
|
@@ -1828,11 +1873,44 @@ declare const cronJobSchema: z.ZodObject<{
|
|
|
1828
1873
|
} | undefined;
|
|
1829
1874
|
maxOutputTokens?: number | undefined;
|
|
1830
1875
|
}, {
|
|
1876
|
+
agent: string;
|
|
1877
|
+
schedule: string;
|
|
1878
|
+
model?: string | undefined;
|
|
1879
|
+
enabled?: boolean | undefined;
|
|
1880
|
+
command?: string | undefined;
|
|
1881
|
+
prompt?: string | undefined;
|
|
1882
|
+
timeout?: number | undefined;
|
|
1883
|
+
timezone?: string | undefined;
|
|
1884
|
+
notify?: {
|
|
1885
|
+
channel: string;
|
|
1886
|
+
chatId: string;
|
|
1887
|
+
accountId?: string | undefined;
|
|
1888
|
+
} | undefined;
|
|
1889
|
+
maxOutputTokens?: number | undefined;
|
|
1890
|
+
onError?: "notify" | "log" | "disable" | ("notify" | "log" | "disable")[] | undefined;
|
|
1891
|
+
}>, {
|
|
1892
|
+
enabled: boolean;
|
|
1831
1893
|
agent: string;
|
|
1832
1894
|
prompt: string;
|
|
1895
|
+
timeout: number;
|
|
1896
|
+
schedule: string;
|
|
1897
|
+
timezone: string;
|
|
1898
|
+
onError: ("notify" | "log" | "disable")[];
|
|
1899
|
+
model?: string | undefined;
|
|
1900
|
+
command?: string | undefined;
|
|
1901
|
+
notify?: {
|
|
1902
|
+
channel: string;
|
|
1903
|
+
chatId: string;
|
|
1904
|
+
accountId?: string | undefined;
|
|
1905
|
+
} | undefined;
|
|
1906
|
+
maxOutputTokens?: number | undefined;
|
|
1907
|
+
}, {
|
|
1908
|
+
agent: string;
|
|
1833
1909
|
schedule: string;
|
|
1834
1910
|
model?: string | undefined;
|
|
1835
1911
|
enabled?: boolean | undefined;
|
|
1912
|
+
command?: string | undefined;
|
|
1913
|
+
prompt?: string | undefined;
|
|
1836
1914
|
timeout?: number | undefined;
|
|
1837
1915
|
timezone?: string | undefined;
|
|
1838
1916
|
notify?: {
|
|
@@ -1960,8 +2038,8 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
1960
2038
|
* .claude/settings.json permissions.allow with the codegraph_* tools,
|
|
1961
2039
|
* (c) appends a CodeGraph instruction section to the managed CLAUDE.md,
|
|
1962
2040
|
* and (d) background-indexes the workspace at daemon boot if .codegraph/
|
|
1963
|
-
* is missing. Off by default — flip on for coding agents (
|
|
1964
|
-
*
|
|
2041
|
+
* is missing. Off by default — flip on for coding agents (globex-v2-coder,
|
|
2042
|
+
* initech-v2-coder, umbrella-coding, etc.) where token-volume on exploration
|
|
1965
2043
|
* loops is the bottleneck. */
|
|
1966
2044
|
codegraph: z.ZodDefault<z.ZodBoolean>;
|
|
1967
2045
|
/** Per-agent override for the global `session.contextStrategy`. Lets
|
|
@@ -1971,7 +2049,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
1971
2049
|
contextStrategy: z.ZodOptional<z.ZodEnum<["layered", "planner"]>>;
|
|
1972
2050
|
/** When true, the registry resolves references-recipes for this agent's
|
|
1973
2051
|
* workspace and renders a deterministic [Verified References] block at
|
|
1974
|
-
* priority 4.7. Off by default — flip on per agent (pm-
|
|
2052
|
+
* priority 4.7. Off by default — flip on per agent (pm-initech, devops-agent,
|
|
1975
2053
|
* etc.) once a `references/` registry exists in the agent's workspace
|
|
1976
2054
|
* or repo root. See src/agents/references/. */
|
|
1977
2055
|
contextReferences: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2051,7 +2129,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2051
2129
|
integrations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2052
2130
|
/** Service identifier — open string, well-known values in INTEGRATION_KINDS. */
|
|
2053
2131
|
kind: z.ZodString;
|
|
2054
|
-
/** Human-readable label (e.g. "@cx_bot", "
|
|
2132
|
+
/** Human-readable label (e.g. "@cx_bot", "Acme CRM", "alex@example.com"). Unique per (agent, kind). */
|
|
2055
2133
|
label: z.ZodString;
|
|
2056
2134
|
credentials: z.ZodDefault<z.ZodObject<{
|
|
2057
2135
|
/** Env var holding the secret. Uppercase identifier; daemon resolves at use-time. */
|
|
@@ -2485,7 +2563,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2485
2563
|
/** If set, the agent lives on a remote mesh peer (node id). Forces the
|
|
2486
2564
|
* username→agent map to resolve to this mapping even when a local
|
|
2487
2565
|
* agent's token resolves to the same GitLab user — prevents collisions
|
|
2488
|
-
* like two agents both claiming @devops-
|
|
2566
|
+
* like two agents both claiming @devops-acme. */
|
|
2489
2567
|
node: z.ZodOptional<z.ZodString>;
|
|
2490
2568
|
}, "strip", z.ZodTypeAny, {
|
|
2491
2569
|
agentId: string;
|
|
@@ -2626,6 +2704,37 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2626
2704
|
clientId?: string | undefined;
|
|
2627
2705
|
privateKeyFile?: string | undefined;
|
|
2628
2706
|
}>>;
|
|
2707
|
+
/** ntfy push notifications — outbound only. The operator-facing tap on
|
|
2708
|
+
* the shoulder: cron failures, task errors, and anything an agent decides
|
|
2709
|
+
* is worth interrupting a human for. `chatId` on an outgoing message is
|
|
2710
|
+
* the topic; empty falls back to `topic` here. */
|
|
2711
|
+
ntfy: z.ZodDefault<z.ZodObject<{
|
|
2712
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2713
|
+
/** Self-hosted ntfy base URL. Defaults to the public server. */
|
|
2714
|
+
server: z.ZodDefault<z.ZodString>;
|
|
2715
|
+
/** Default topic. Treat it as a secret — on ntfy.sh, knowing the topic
|
|
2716
|
+
* is the only thing needed to read or publish to it. */
|
|
2717
|
+
topic: z.ZodOptional<z.ZodString>;
|
|
2718
|
+
/** Access token for protected topics. */
|
|
2719
|
+
token: z.ZodOptional<z.ZodString>;
|
|
2720
|
+
/** 1 (min) .. 5 (max). ntfy's own default is 3. */
|
|
2721
|
+
defaultPriority: z.ZodDefault<z.ZodNumber>;
|
|
2722
|
+
defaultTitle: z.ZodOptional<z.ZodString>;
|
|
2723
|
+
}, "strip", z.ZodTypeAny, {
|
|
2724
|
+
enabled: boolean;
|
|
2725
|
+
server: string;
|
|
2726
|
+
defaultPriority: number;
|
|
2727
|
+
token?: string | undefined;
|
|
2728
|
+
topic?: string | undefined;
|
|
2729
|
+
defaultTitle?: string | undefined;
|
|
2730
|
+
}, {
|
|
2731
|
+
enabled?: boolean | undefined;
|
|
2732
|
+
token?: string | undefined;
|
|
2733
|
+
server?: string | undefined;
|
|
2734
|
+
topic?: string | undefined;
|
|
2735
|
+
defaultPriority?: number | undefined;
|
|
2736
|
+
defaultTitle?: string | undefined;
|
|
2737
|
+
}>>;
|
|
2629
2738
|
webrtc: z.ZodDefault<z.ZodObject<{
|
|
2630
2739
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2631
2740
|
/** ICE STUN servers for NAT discovery. Default is Google's public STUN. */
|
|
@@ -2866,6 +2975,14 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2866
2975
|
clientId?: string | undefined;
|
|
2867
2976
|
privateKeyFile?: string | undefined;
|
|
2868
2977
|
};
|
|
2978
|
+
ntfy: {
|
|
2979
|
+
enabled: boolean;
|
|
2980
|
+
server: string;
|
|
2981
|
+
defaultPriority: number;
|
|
2982
|
+
token?: string | undefined;
|
|
2983
|
+
topic?: string | undefined;
|
|
2984
|
+
defaultTitle?: string | undefined;
|
|
2985
|
+
};
|
|
2869
2986
|
webrtc: {
|
|
2870
2987
|
enabled: boolean;
|
|
2871
2988
|
stunServers: string[];
|
|
@@ -2979,6 +3096,14 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2979
3096
|
clientId?: string | undefined;
|
|
2980
3097
|
privateKeyFile?: string | undefined;
|
|
2981
3098
|
} | undefined;
|
|
3099
|
+
ntfy?: {
|
|
3100
|
+
enabled?: boolean | undefined;
|
|
3101
|
+
token?: string | undefined;
|
|
3102
|
+
server?: string | undefined;
|
|
3103
|
+
topic?: string | undefined;
|
|
3104
|
+
defaultPriority?: number | undefined;
|
|
3105
|
+
defaultTitle?: string | undefined;
|
|
3106
|
+
} | undefined;
|
|
2982
3107
|
webrtc?: {
|
|
2983
3108
|
enabled?: boolean | undefined;
|
|
2984
3109
|
stunServers?: string[] | undefined;
|
|
@@ -3010,12 +3135,31 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3010
3135
|
} | undefined;
|
|
3011
3136
|
} | undefined;
|
|
3012
3137
|
}>>;
|
|
3013
|
-
crons: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3138
|
+
crons: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
|
|
3014
3139
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3015
3140
|
schedule: z.ZodString;
|
|
3016
3141
|
timezone: z.ZodDefault<z.ZodString>;
|
|
3017
3142
|
agent: z.ZodString;
|
|
3018
|
-
prompt: z.ZodString
|
|
3143
|
+
prompt: z.ZodDefault<z.ZodString>;
|
|
3144
|
+
/**
|
|
3145
|
+
* A shell command to run INSTEAD of dispatching the agent.
|
|
3146
|
+
*
|
|
3147
|
+
* Seven of this fleet's twenty-six crons were a single command wrapped
|
|
3148
|
+
* in an agent, and every one of them carried a paragraph like "Run this
|
|
3149
|
+
* EXACT command. Do NOT substitute, rewrite, shorten, or fall back to
|
|
3150
|
+
* alternative commands." That paragraph is a scar: it exists because
|
|
3151
|
+
* models kept substituting, and no amount of prompt severity makes a
|
|
3152
|
+
* language model a deterministic executor.
|
|
3153
|
+
*
|
|
3154
|
+
* Measured before this existed: ~$0.31 and ~24s per run to execute one
|
|
3155
|
+
* `node script.js` and repeat ten lines of its output — a 114k-token
|
|
3156
|
+
* context for a job with no judgement in it at all.
|
|
3157
|
+
*
|
|
3158
|
+
* When set, the scheduler runs the command directly. No model, no
|
|
3159
|
+
* tokens, no improvisation. `agent` is still required and is who gets
|
|
3160
|
+
* told when it fails.
|
|
3161
|
+
*/
|
|
3162
|
+
command: z.ZodOptional<z.ZodString>;
|
|
3019
3163
|
timeout: z.ZodDefault<z.ZodNumber>;
|
|
3020
3164
|
model: z.ZodOptional<z.ZodString>;
|
|
3021
3165
|
/** Soft cap on output length. Claude Code CLI has no hard flag for this,
|
|
@@ -3045,6 +3189,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3045
3189
|
timezone: string;
|
|
3046
3190
|
onError: ("notify" | "log" | "disable")[];
|
|
3047
3191
|
model?: string | undefined;
|
|
3192
|
+
command?: string | undefined;
|
|
3048
3193
|
notify?: {
|
|
3049
3194
|
channel: string;
|
|
3050
3195
|
chatId: string;
|
|
@@ -3052,11 +3197,44 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3052
3197
|
} | undefined;
|
|
3053
3198
|
maxOutputTokens?: number | undefined;
|
|
3054
3199
|
}, {
|
|
3200
|
+
agent: string;
|
|
3201
|
+
schedule: string;
|
|
3202
|
+
model?: string | undefined;
|
|
3203
|
+
enabled?: boolean | undefined;
|
|
3204
|
+
command?: string | undefined;
|
|
3205
|
+
prompt?: string | undefined;
|
|
3206
|
+
timeout?: number | undefined;
|
|
3207
|
+
timezone?: string | undefined;
|
|
3208
|
+
notify?: {
|
|
3209
|
+
channel: string;
|
|
3210
|
+
chatId: string;
|
|
3211
|
+
accountId?: string | undefined;
|
|
3212
|
+
} | undefined;
|
|
3213
|
+
maxOutputTokens?: number | undefined;
|
|
3214
|
+
onError?: "notify" | "log" | "disable" | ("notify" | "log" | "disable")[] | undefined;
|
|
3215
|
+
}>, {
|
|
3216
|
+
enabled: boolean;
|
|
3055
3217
|
agent: string;
|
|
3056
3218
|
prompt: string;
|
|
3219
|
+
timeout: number;
|
|
3220
|
+
schedule: string;
|
|
3221
|
+
timezone: string;
|
|
3222
|
+
onError: ("notify" | "log" | "disable")[];
|
|
3223
|
+
model?: string | undefined;
|
|
3224
|
+
command?: string | undefined;
|
|
3225
|
+
notify?: {
|
|
3226
|
+
channel: string;
|
|
3227
|
+
chatId: string;
|
|
3228
|
+
accountId?: string | undefined;
|
|
3229
|
+
} | undefined;
|
|
3230
|
+
maxOutputTokens?: number | undefined;
|
|
3231
|
+
}, {
|
|
3232
|
+
agent: string;
|
|
3057
3233
|
schedule: string;
|
|
3058
3234
|
model?: string | undefined;
|
|
3059
3235
|
enabled?: boolean | undefined;
|
|
3236
|
+
command?: string | undefined;
|
|
3237
|
+
prompt?: string | undefined;
|
|
3060
3238
|
timeout?: number | undefined;
|
|
3061
3239
|
timezone?: string | undefined;
|
|
3062
3240
|
notify?: {
|
|
@@ -3201,6 +3379,21 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3201
3379
|
url: string;
|
|
3202
3380
|
token?: string | undefined;
|
|
3203
3381
|
}>, "many">>;
|
|
3382
|
+
/** Empty by default — a node publishes no inboxes until an operator
|
|
3383
|
+
* declares one, so this feature is opt-in per node. */
|
|
3384
|
+
inboxes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3385
|
+
name: z.ZodString;
|
|
3386
|
+
agent: z.ZodString;
|
|
3387
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3388
|
+
}, "strip", z.ZodTypeAny, {
|
|
3389
|
+
enabled: boolean;
|
|
3390
|
+
agent: string;
|
|
3391
|
+
name: string;
|
|
3392
|
+
}, {
|
|
3393
|
+
agent: string;
|
|
3394
|
+
name: string;
|
|
3395
|
+
enabled?: boolean | undefined;
|
|
3396
|
+
}>, "many">>;
|
|
3204
3397
|
discovery: z.ZodDefault<z.ZodEnum<["static", "mdns"]>>;
|
|
3205
3398
|
healthCheck: z.ZodDefault<z.ZodObject<{
|
|
3206
3399
|
interval: z.ZodDefault<z.ZodNumber>;
|
|
@@ -3219,6 +3412,11 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3219
3412
|
url: string;
|
|
3220
3413
|
token?: string | undefined;
|
|
3221
3414
|
}[];
|
|
3415
|
+
inboxes: {
|
|
3416
|
+
enabled: boolean;
|
|
3417
|
+
agent: string;
|
|
3418
|
+
name: string;
|
|
3419
|
+
}[];
|
|
3222
3420
|
discovery: "static" | "mdns";
|
|
3223
3421
|
healthCheck: {
|
|
3224
3422
|
timeout: number;
|
|
@@ -3231,6 +3429,11 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3231
3429
|
url: string;
|
|
3232
3430
|
token?: string | undefined;
|
|
3233
3431
|
}[] | undefined;
|
|
3432
|
+
inboxes?: {
|
|
3433
|
+
agent: string;
|
|
3434
|
+
name: string;
|
|
3435
|
+
enabled?: boolean | undefined;
|
|
3436
|
+
}[] | undefined;
|
|
3234
3437
|
discovery?: "static" | "mdns" | undefined;
|
|
3235
3438
|
healthCheck?: {
|
|
3236
3439
|
timeout?: number | undefined;
|
|
@@ -3400,6 +3603,22 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3400
3603
|
project?: string | undefined;
|
|
3401
3604
|
displayName?: string | undefined;
|
|
3402
3605
|
}>, "many">>;
|
|
3606
|
+
clients: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3607
|
+
name: z.ZodOptional<z.ZodString>;
|
|
3608
|
+
kind: z.ZodOptional<z.ZodEnum<["client", "internal", "own"]>>;
|
|
3609
|
+
respondWithin: z.ZodOptional<z.ZodString>;
|
|
3610
|
+
standing: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
3611
|
+
}, "strip", z.ZodTypeAny, {
|
|
3612
|
+
standing: string[];
|
|
3613
|
+
name?: string | undefined;
|
|
3614
|
+
kind?: "client" | "internal" | "own" | undefined;
|
|
3615
|
+
respondWithin?: string | undefined;
|
|
3616
|
+
}, {
|
|
3617
|
+
name?: string | undefined;
|
|
3618
|
+
kind?: "client" | "internal" | "own" | undefined;
|
|
3619
|
+
respondWithin?: string | undefined;
|
|
3620
|
+
standing?: string[] | undefined;
|
|
3621
|
+
}>>>;
|
|
3403
3622
|
workTickMinutes: z.ZodDefault<z.ZodNumber>;
|
|
3404
3623
|
idleQueueThreshold: z.ZodDefault<z.ZodNumber>;
|
|
3405
3624
|
standup: z.ZodDefault<z.ZodObject<{
|
|
@@ -3471,6 +3690,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3471
3690
|
project?: string | undefined;
|
|
3472
3691
|
displayName?: string | undefined;
|
|
3473
3692
|
}[];
|
|
3693
|
+
clients: Record<string, {
|
|
3694
|
+
standing: string[];
|
|
3695
|
+
name?: string | undefined;
|
|
3696
|
+
kind?: "client" | "internal" | "own" | undefined;
|
|
3697
|
+
respondWithin?: string | undefined;
|
|
3698
|
+
}>;
|
|
3474
3699
|
workTickMinutes: number;
|
|
3475
3700
|
idleQueueThreshold: number;
|
|
3476
3701
|
standup: {
|
|
@@ -3532,6 +3757,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3532
3757
|
project?: string | undefined;
|
|
3533
3758
|
displayName?: string | undefined;
|
|
3534
3759
|
}[] | undefined;
|
|
3760
|
+
clients?: Record<string, {
|
|
3761
|
+
name?: string | undefined;
|
|
3762
|
+
kind?: "client" | "internal" | "own" | undefined;
|
|
3763
|
+
respondWithin?: string | undefined;
|
|
3764
|
+
standing?: string[] | undefined;
|
|
3765
|
+
}> | undefined;
|
|
3535
3766
|
workTickMinutes?: number | undefined;
|
|
3536
3767
|
idleQueueThreshold?: number | undefined;
|
|
3537
3768
|
standup?: {
|
|
@@ -3554,7 +3785,8 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3554
3785
|
type: "gitlab";
|
|
3555
3786
|
projects: string[];
|
|
3556
3787
|
}>]>;
|
|
3557
|
-
primaryToolLabel: z.ZodOptional<z.ZodString>;
|
|
3788
|
+
primaryToolLabel: z.ZodOptional<z.ZodString>; /** Non-secret metadata — username, email, host URL, portal id, JID, etc.
|
|
3789
|
+
* Visible in the dashboard and to skills. */
|
|
3558
3790
|
labels: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3559
3791
|
name: z.ZodString;
|
|
3560
3792
|
color: z.ZodDefault<z.ZodString>;
|
|
@@ -3803,12 +4035,373 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3803
4035
|
bm25?: number | undefined;
|
|
3804
4036
|
} | undefined;
|
|
3805
4037
|
}>>;
|
|
4038
|
+
decisions: z.ZodDefault<z.ZodObject<{
|
|
4039
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
4040
|
+
dbPath: z.ZodDefault<z.ZodString>;
|
|
4041
|
+
/** State can contain message text. With this on, only the hash is kept,
|
|
4042
|
+
* which costs the ability to replay a decision offline. */
|
|
4043
|
+
redactState: z.ZodDefault<z.ZodBoolean>;
|
|
4044
|
+
/** Keep the serialized state for this many rows per seat, then prune to
|
|
4045
|
+
* hashes. Enough to replay and to grade an alternative backend on
|
|
4046
|
+
* identical inputs, without growing without bound. */
|
|
4047
|
+
keepStateRows: z.ZodDefault<z.ZodNumber>;
|
|
4048
|
+
defaultBackend: z.ZodDefault<z.ZodString>;
|
|
4049
|
+
backends: z.ZodDefault<z.ZodObject<{
|
|
4050
|
+
local: z.ZodDefault<z.ZodObject<{
|
|
4051
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
4052
|
+
model: z.ZodDefault<z.ZodString>;
|
|
4053
|
+
/** auto resolves to a forced tool where the provider guarantees one,
|
|
4054
|
+
* and JSON-in-text otherwise (claude-code on OAuth cannot force a
|
|
4055
|
+
* tool). Never resolves to logprobs: that costs one call per
|
|
4056
|
+
* question, so it has to be asked for. */
|
|
4057
|
+
structureMode: z.ZodDefault<z.ZodEnum<["auto", "tool", "text"]>>;
|
|
4058
|
+
normalizeProbabilities: z.ZodDefault<z.ZodBoolean>;
|
|
4059
|
+
nRetryMalformedStructure: z.ZodDefault<z.ZodNumber>;
|
|
4060
|
+
maxStateChars: z.ZodDefault<z.ZodNumber>;
|
|
4061
|
+
}, "strip", z.ZodTypeAny, {
|
|
4062
|
+
provider: string;
|
|
4063
|
+
model: string;
|
|
4064
|
+
structureMode: "tool" | "text" | "auto";
|
|
4065
|
+
normalizeProbabilities: boolean;
|
|
4066
|
+
nRetryMalformedStructure: number;
|
|
4067
|
+
maxStateChars: number;
|
|
4068
|
+
}, {
|
|
4069
|
+
provider?: string | undefined;
|
|
4070
|
+
model?: string | undefined;
|
|
4071
|
+
structureMode?: "tool" | "text" | "auto" | undefined;
|
|
4072
|
+
normalizeProbabilities?: boolean | undefined;
|
|
4073
|
+
nRetryMalformedStructure?: number | undefined;
|
|
4074
|
+
maxStateChars?: number | undefined;
|
|
4075
|
+
}>>;
|
|
4076
|
+
/** A simple-jev server (featherless-ai/simple-jev). Reads the model's
|
|
4077
|
+
* next-token logits rather than asking it to write a probability, so
|
|
4078
|
+
* the distribution is the model's posterior instead of a number it
|
|
4079
|
+
* chose. Still not calibrated to correctness — that comes from
|
|
4080
|
+
* `agentx decisions recalibrate`. */
|
|
4081
|
+
simpleJev: z.ZodDefault<z.ZodObject<{
|
|
4082
|
+
baseUrl: z.ZodDefault<z.ZodString>;
|
|
4083
|
+
model: z.ZodOptional<z.ZodString>;
|
|
4084
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
4085
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
4086
|
+
maxStateChars: z.ZodDefault<z.ZodNumber>;
|
|
4087
|
+
/** Their Choice takes 2-50 candidates, well under Jev's 255. */
|
|
4088
|
+
maxChoiceOptions: z.ZodDefault<z.ZodNumber>;
|
|
4089
|
+
}, "strip", z.ZodTypeAny, {
|
|
4090
|
+
baseUrl: string;
|
|
4091
|
+
timeoutMs: number;
|
|
4092
|
+
maxStateChars: number;
|
|
4093
|
+
maxChoiceOptions: number;
|
|
4094
|
+
model?: string | undefined;
|
|
4095
|
+
apiKeyEnv?: string | undefined;
|
|
4096
|
+
}, {
|
|
4097
|
+
model?: string | undefined;
|
|
4098
|
+
baseUrl?: string | undefined;
|
|
4099
|
+
apiKeyEnv?: string | undefined;
|
|
4100
|
+
timeoutMs?: number | undefined;
|
|
4101
|
+
maxStateChars?: number | undefined;
|
|
4102
|
+
maxChoiceOptions?: number | undefined;
|
|
4103
|
+
}>>;
|
|
4104
|
+
/** TypeSafe Jev through OpenRouter's alpha decisions endpoint.
|
|
4105
|
+
* Verified live 2026-09-19 — resolves to typesafe/jev-1.13-20260917,
|
|
4106
|
+
* provider "TypeSafe", ~0.5s round trip. The id is "jev-latest";
|
|
4107
|
+
* the namespaced "typesafe/jev-latest" 400s, and neither appears in
|
|
4108
|
+
* OpenRouter's public model list. Needs OPENROUTER_API_KEY. */
|
|
4109
|
+
jev: z.ZodDefault<z.ZodObject<{
|
|
4110
|
+
baseUrl: z.ZodDefault<z.ZodString>;
|
|
4111
|
+
path: z.ZodDefault<z.ZodString>;
|
|
4112
|
+
model: z.ZodDefault<z.ZodString>;
|
|
4113
|
+
apiKeyEnv: z.ZodDefault<z.ZodString>;
|
|
4114
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
4115
|
+
maxStateChars: z.ZodDefault<z.ZodNumber>;
|
|
4116
|
+
maxChoiceOptions: z.ZodDefault<z.ZodNumber>;
|
|
4117
|
+
}, "strip", z.ZodTypeAny, {
|
|
4118
|
+
model: string;
|
|
4119
|
+
path: string;
|
|
4120
|
+
baseUrl: string;
|
|
4121
|
+
apiKeyEnv: string;
|
|
4122
|
+
timeoutMs: number;
|
|
4123
|
+
maxStateChars: number;
|
|
4124
|
+
maxChoiceOptions: number;
|
|
4125
|
+
}, {
|
|
4126
|
+
model?: string | undefined;
|
|
4127
|
+
path?: string | undefined;
|
|
4128
|
+
baseUrl?: string | undefined;
|
|
4129
|
+
apiKeyEnv?: string | undefined;
|
|
4130
|
+
timeoutMs?: number | undefined;
|
|
4131
|
+
maxStateChars?: number | undefined;
|
|
4132
|
+
maxChoiceOptions?: number | undefined;
|
|
4133
|
+
}>>;
|
|
4134
|
+
/** Jev direct from TypeSafe rather than through OpenRouter. Same
|
|
4135
|
+
* contract, different billing and rate limits. Needs TYPESAFE_API_KEY. */
|
|
4136
|
+
typesafe: z.ZodDefault<z.ZodObject<{
|
|
4137
|
+
baseUrl: z.ZodDefault<z.ZodString>;
|
|
4138
|
+
path: z.ZodDefault<z.ZodString>;
|
|
4139
|
+
model: z.ZodDefault<z.ZodString>;
|
|
4140
|
+
apiKeyEnv: z.ZodDefault<z.ZodString>;
|
|
4141
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
4142
|
+
maxStateChars: z.ZodDefault<z.ZodNumber>;
|
|
4143
|
+
maxChoiceOptions: z.ZodDefault<z.ZodNumber>;
|
|
4144
|
+
}, "strip", z.ZodTypeAny, {
|
|
4145
|
+
model: string;
|
|
4146
|
+
path: string;
|
|
4147
|
+
baseUrl: string;
|
|
4148
|
+
apiKeyEnv: string;
|
|
4149
|
+
timeoutMs: number;
|
|
4150
|
+
maxStateChars: number;
|
|
4151
|
+
maxChoiceOptions: number;
|
|
4152
|
+
}, {
|
|
4153
|
+
model?: string | undefined;
|
|
4154
|
+
path?: string | undefined;
|
|
4155
|
+
baseUrl?: string | undefined;
|
|
4156
|
+
apiKeyEnv?: string | undefined;
|
|
4157
|
+
timeoutMs?: number | undefined;
|
|
4158
|
+
maxStateChars?: number | undefined;
|
|
4159
|
+
maxChoiceOptions?: number | undefined;
|
|
4160
|
+
}>>;
|
|
4161
|
+
}, "strip", z.ZodTypeAny, {
|
|
4162
|
+
local: {
|
|
4163
|
+
provider: string;
|
|
4164
|
+
model: string;
|
|
4165
|
+
structureMode: "tool" | "text" | "auto";
|
|
4166
|
+
normalizeProbabilities: boolean;
|
|
4167
|
+
nRetryMalformedStructure: number;
|
|
4168
|
+
maxStateChars: number;
|
|
4169
|
+
};
|
|
4170
|
+
simpleJev: {
|
|
4171
|
+
baseUrl: string;
|
|
4172
|
+
timeoutMs: number;
|
|
4173
|
+
maxStateChars: number;
|
|
4174
|
+
maxChoiceOptions: number;
|
|
4175
|
+
model?: string | undefined;
|
|
4176
|
+
apiKeyEnv?: string | undefined;
|
|
4177
|
+
};
|
|
4178
|
+
jev: {
|
|
4179
|
+
model: string;
|
|
4180
|
+
path: string;
|
|
4181
|
+
baseUrl: string;
|
|
4182
|
+
apiKeyEnv: string;
|
|
4183
|
+
timeoutMs: number;
|
|
4184
|
+
maxStateChars: number;
|
|
4185
|
+
maxChoiceOptions: number;
|
|
4186
|
+
};
|
|
4187
|
+
typesafe: {
|
|
4188
|
+
model: string;
|
|
4189
|
+
path: string;
|
|
4190
|
+
baseUrl: string;
|
|
4191
|
+
apiKeyEnv: string;
|
|
4192
|
+
timeoutMs: number;
|
|
4193
|
+
maxStateChars: number;
|
|
4194
|
+
maxChoiceOptions: number;
|
|
4195
|
+
};
|
|
4196
|
+
}, {
|
|
4197
|
+
local?: {
|
|
4198
|
+
provider?: string | undefined;
|
|
4199
|
+
model?: string | undefined;
|
|
4200
|
+
structureMode?: "tool" | "text" | "auto" | undefined;
|
|
4201
|
+
normalizeProbabilities?: boolean | undefined;
|
|
4202
|
+
nRetryMalformedStructure?: number | undefined;
|
|
4203
|
+
maxStateChars?: number | undefined;
|
|
4204
|
+
} | undefined;
|
|
4205
|
+
simpleJev?: {
|
|
4206
|
+
model?: string | undefined;
|
|
4207
|
+
baseUrl?: string | undefined;
|
|
4208
|
+
apiKeyEnv?: string | undefined;
|
|
4209
|
+
timeoutMs?: number | undefined;
|
|
4210
|
+
maxStateChars?: number | undefined;
|
|
4211
|
+
maxChoiceOptions?: number | undefined;
|
|
4212
|
+
} | undefined;
|
|
4213
|
+
jev?: {
|
|
4214
|
+
model?: string | undefined;
|
|
4215
|
+
path?: string | undefined;
|
|
4216
|
+
baseUrl?: string | undefined;
|
|
4217
|
+
apiKeyEnv?: string | undefined;
|
|
4218
|
+
timeoutMs?: number | undefined;
|
|
4219
|
+
maxStateChars?: number | undefined;
|
|
4220
|
+
maxChoiceOptions?: number | undefined;
|
|
4221
|
+
} | undefined;
|
|
4222
|
+
typesafe?: {
|
|
4223
|
+
model?: string | undefined;
|
|
4224
|
+
path?: string | undefined;
|
|
4225
|
+
baseUrl?: string | undefined;
|
|
4226
|
+
apiKeyEnv?: string | undefined;
|
|
4227
|
+
timeoutMs?: number | undefined;
|
|
4228
|
+
maxStateChars?: number | undefined;
|
|
4229
|
+
maxChoiceOptions?: number | undefined;
|
|
4230
|
+
} | undefined;
|
|
4231
|
+
}>>;
|
|
4232
|
+
seats: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodObject<{
|
|
4233
|
+
/** off: the seat is unreachable. shadow: runs and records, incumbent stays
|
|
4234
|
+
* authoritative. active: the answer is used. */
|
|
4235
|
+
mode: z.ZodDefault<z.ZodEnum<["off", "shadow", "active"]>>;
|
|
4236
|
+
/** Backend name from the decisions registry. Per-seat, so one seat can be
|
|
4237
|
+
* graded against a different backend than another at the same time. */
|
|
4238
|
+
backend: z.ZodOptional<z.ZodString>;
|
|
4239
|
+
model: z.ZodOptional<z.ZodString>;
|
|
4240
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
4241
|
+
/** Post-hoc temperature fitted on this seat's own labeled rows. 1 means
|
|
4242
|
+
* "not calibrated yet", which is where every seat starts — see
|
|
4243
|
+
* `agentx decisions calibrate`. */
|
|
4244
|
+
temperature: z.ZodDefault<z.ZodNumber>;
|
|
4245
|
+
/** Fraction of would-be-skips to run anyway. Not a tuning knob: a skipped
|
|
4246
|
+
* decision can never be graded, so without exploration an active seat's
|
|
4247
|
+
* metrics are computed on the biased sample it selected for itself.
|
|
4248
|
+
* Setting this to 0 in active mode means the calibration report stops
|
|
4249
|
+
* being trustworthy the day you promote the seat. */
|
|
4250
|
+
explore: z.ZodDefault<z.ZodNumber>;
|
|
4251
|
+
}, "strip", z.ZodTypeAny, {
|
|
4252
|
+
temperature: number;
|
|
4253
|
+
mode: "active" | "off" | "shadow";
|
|
4254
|
+
timeoutMs: number;
|
|
4255
|
+
explore: number;
|
|
4256
|
+
model?: string | undefined;
|
|
4257
|
+
backend?: string | undefined;
|
|
4258
|
+
}, {
|
|
4259
|
+
model?: string | undefined;
|
|
4260
|
+
temperature?: number | undefined;
|
|
4261
|
+
backend?: string | undefined;
|
|
4262
|
+
mode?: "active" | "off" | "shadow" | undefined;
|
|
4263
|
+
timeoutMs?: number | undefined;
|
|
4264
|
+
explore?: number | undefined;
|
|
4265
|
+
}>>>>;
|
|
4266
|
+
/** Model routing driven by the task-tier seat.
|
|
4267
|
+
*
|
|
4268
|
+
* `cheapModel` is the whole switch: with no model named, no task is
|
|
4269
|
+
* ever routed anywhere. The feature cannot turn itself on, because a
|
|
4270
|
+
* fleet quietly answering on a smaller model is a regression nobody
|
|
4271
|
+
* would see in the output. */
|
|
4272
|
+
routing: z.ZodDefault<z.ZodObject<{
|
|
4273
|
+
cheapModel: z.ZodOptional<z.ZodString>;
|
|
4274
|
+
}, "strip", z.ZodTypeAny, {
|
|
4275
|
+
cheapModel?: string | undefined;
|
|
4276
|
+
}, {
|
|
4277
|
+
cheapModel?: string | undefined;
|
|
4278
|
+
}>>;
|
|
4279
|
+
}, "strip", z.ZodTypeAny, {
|
|
4280
|
+
enabled: boolean;
|
|
4281
|
+
dbPath: string;
|
|
4282
|
+
redactState: boolean;
|
|
4283
|
+
keepStateRows: number;
|
|
4284
|
+
defaultBackend: string;
|
|
4285
|
+
backends: {
|
|
4286
|
+
local: {
|
|
4287
|
+
provider: string;
|
|
4288
|
+
model: string;
|
|
4289
|
+
structureMode: "tool" | "text" | "auto";
|
|
4290
|
+
normalizeProbabilities: boolean;
|
|
4291
|
+
nRetryMalformedStructure: number;
|
|
4292
|
+
maxStateChars: number;
|
|
4293
|
+
};
|
|
4294
|
+
simpleJev: {
|
|
4295
|
+
baseUrl: string;
|
|
4296
|
+
timeoutMs: number;
|
|
4297
|
+
maxStateChars: number;
|
|
4298
|
+
maxChoiceOptions: number;
|
|
4299
|
+
model?: string | undefined;
|
|
4300
|
+
apiKeyEnv?: string | undefined;
|
|
4301
|
+
};
|
|
4302
|
+
jev: {
|
|
4303
|
+
model: string;
|
|
4304
|
+
path: string;
|
|
4305
|
+
baseUrl: string;
|
|
4306
|
+
apiKeyEnv: string;
|
|
4307
|
+
timeoutMs: number;
|
|
4308
|
+
maxStateChars: number;
|
|
4309
|
+
maxChoiceOptions: number;
|
|
4310
|
+
};
|
|
4311
|
+
typesafe: {
|
|
4312
|
+
model: string;
|
|
4313
|
+
path: string;
|
|
4314
|
+
baseUrl: string;
|
|
4315
|
+
apiKeyEnv: string;
|
|
4316
|
+
timeoutMs: number;
|
|
4317
|
+
maxStateChars: number;
|
|
4318
|
+
maxChoiceOptions: number;
|
|
4319
|
+
};
|
|
4320
|
+
};
|
|
4321
|
+
seats: Record<string, {
|
|
4322
|
+
temperature: number;
|
|
4323
|
+
mode: "active" | "off" | "shadow";
|
|
4324
|
+
timeoutMs: number;
|
|
4325
|
+
explore: number;
|
|
4326
|
+
model?: string | undefined;
|
|
4327
|
+
backend?: string | undefined;
|
|
4328
|
+
}>;
|
|
4329
|
+
routing: {
|
|
4330
|
+
cheapModel?: string | undefined;
|
|
4331
|
+
};
|
|
4332
|
+
}, {
|
|
4333
|
+
enabled?: boolean | undefined;
|
|
4334
|
+
dbPath?: string | undefined;
|
|
4335
|
+
redactState?: boolean | undefined;
|
|
4336
|
+
keepStateRows?: number | undefined;
|
|
4337
|
+
defaultBackend?: string | undefined;
|
|
4338
|
+
backends?: {
|
|
4339
|
+
local?: {
|
|
4340
|
+
provider?: string | undefined;
|
|
4341
|
+
model?: string | undefined;
|
|
4342
|
+
structureMode?: "tool" | "text" | "auto" | undefined;
|
|
4343
|
+
normalizeProbabilities?: boolean | undefined;
|
|
4344
|
+
nRetryMalformedStructure?: number | undefined;
|
|
4345
|
+
maxStateChars?: number | undefined;
|
|
4346
|
+
} | undefined;
|
|
4347
|
+
simpleJev?: {
|
|
4348
|
+
model?: string | undefined;
|
|
4349
|
+
baseUrl?: string | undefined;
|
|
4350
|
+
apiKeyEnv?: string | undefined;
|
|
4351
|
+
timeoutMs?: number | undefined;
|
|
4352
|
+
maxStateChars?: number | undefined;
|
|
4353
|
+
maxChoiceOptions?: number | undefined;
|
|
4354
|
+
} | undefined;
|
|
4355
|
+
jev?: {
|
|
4356
|
+
model?: string | undefined;
|
|
4357
|
+
path?: string | undefined;
|
|
4358
|
+
baseUrl?: string | undefined;
|
|
4359
|
+
apiKeyEnv?: string | undefined;
|
|
4360
|
+
timeoutMs?: number | undefined;
|
|
4361
|
+
maxStateChars?: number | undefined;
|
|
4362
|
+
maxChoiceOptions?: number | undefined;
|
|
4363
|
+
} | undefined;
|
|
4364
|
+
typesafe?: {
|
|
4365
|
+
model?: string | undefined;
|
|
4366
|
+
path?: string | undefined;
|
|
4367
|
+
baseUrl?: string | undefined;
|
|
4368
|
+
apiKeyEnv?: string | undefined;
|
|
4369
|
+
timeoutMs?: number | undefined;
|
|
4370
|
+
maxStateChars?: number | undefined;
|
|
4371
|
+
maxChoiceOptions?: number | undefined;
|
|
4372
|
+
} | undefined;
|
|
4373
|
+
} | undefined;
|
|
4374
|
+
seats?: Record<string, {
|
|
4375
|
+
model?: string | undefined;
|
|
4376
|
+
temperature?: number | undefined;
|
|
4377
|
+
backend?: string | undefined;
|
|
4378
|
+
mode?: "active" | "off" | "shadow" | undefined;
|
|
4379
|
+
timeoutMs?: number | undefined;
|
|
4380
|
+
explore?: number | undefined;
|
|
4381
|
+
} | undefined> | undefined;
|
|
4382
|
+
routing?: {
|
|
4383
|
+
cheapModel?: string | undefined;
|
|
4384
|
+
} | undefined;
|
|
4385
|
+
}>>;
|
|
3806
4386
|
/** Workflow engine — declarative state machines that bind channel events
|
|
3807
4387
|
* to agents. Off by default; existing installs see no change until
|
|
3808
4388
|
* flipped. Definitions live under `dir` (default .agentx/workflows/). */
|
|
3809
4389
|
workflows: z.ZodDefault<z.ZodObject<{
|
|
3810
4390
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3811
4391
|
dir: z.ZodDefault<z.ZodString>;
|
|
4392
|
+
/** n8n keeps its several hundred connectors; we keep the agents. Point
|
|
4393
|
+
* this at your n8n and the workflow builder lists YOUR n8n workflows as
|
|
4394
|
+
* steps, so nobody has to copy a webhook URL by hand. */
|
|
4395
|
+
n8n: z.ZodDefault<z.ZodObject<{
|
|
4396
|
+
baseUrl: z.ZodDefault<z.ZodString>;
|
|
4397
|
+
apiKey: z.ZodDefault<z.ZodString>;
|
|
4398
|
+
}, "strip", z.ZodTypeAny, {
|
|
4399
|
+
apiKey: string;
|
|
4400
|
+
baseUrl: string;
|
|
4401
|
+
}, {
|
|
4402
|
+
apiKey?: string | undefined;
|
|
4403
|
+
baseUrl?: string | undefined;
|
|
4404
|
+
}>>;
|
|
3812
4405
|
matching: z.ZodDefault<z.ZodObject<{
|
|
3813
4406
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3814
4407
|
mode: z.ZodDefault<z.ZodEnum<["suggest", "auto"]>>;
|
|
@@ -3832,6 +4425,10 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3832
4425
|
}, "strip", z.ZodTypeAny, {
|
|
3833
4426
|
dir: string;
|
|
3834
4427
|
enabled: boolean;
|
|
4428
|
+
n8n: {
|
|
4429
|
+
apiKey: string;
|
|
4430
|
+
baseUrl: string;
|
|
4431
|
+
};
|
|
3835
4432
|
matching: {
|
|
3836
4433
|
enabled: boolean;
|
|
3837
4434
|
mode: "auto" | "suggest";
|
|
@@ -3842,6 +4439,10 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3842
4439
|
}, {
|
|
3843
4440
|
dir?: string | undefined;
|
|
3844
4441
|
enabled?: boolean | undefined;
|
|
4442
|
+
n8n?: {
|
|
4443
|
+
apiKey?: string | undefined;
|
|
4444
|
+
baseUrl?: string | undefined;
|
|
4445
|
+
} | undefined;
|
|
3845
4446
|
matching?: {
|
|
3846
4447
|
enabled?: boolean | undefined;
|
|
3847
4448
|
mode?: "auto" | "suggest" | undefined;
|
|
@@ -4014,6 +4615,17 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4014
4615
|
* Raise for Max 20×, lower if your workload stays under the cap naturally. */
|
|
4015
4616
|
maxClaudeCodeDispatchesPerHour: z.ZodDefault<z.ZodNumber>;
|
|
4016
4617
|
maxClaudeCodeDispatchesPer5h: z.ZodDefault<z.ZodNumber>;
|
|
4618
|
+
/** How many requests BEFORE the immediate predecessor to show the
|
|
4619
|
+
* session-continuity seat. 0 keeps today's two-message state exactly.
|
|
4620
|
+
*
|
|
4621
|
+
* Off by default on purpose. A probe over 27 hand-written turns found
|
|
4622
|
+
* that at 3, the seat's safety question (`needsHistory`) becomes
|
|
4623
|
+
* cleanly separable where two messages leave it straddling zero — but
|
|
4624
|
+
* that rests on 7 positive examples from synthetic scenarios, and this
|
|
4625
|
+
* seat's failure mode is the agent silently losing conversation
|
|
4626
|
+
* context. The promotion gate for that wants labelled production rows,
|
|
4627
|
+
* not a good afternoon on a fixture. Raise it to collect them. */
|
|
4628
|
+
continuityStateTurns: z.ZodDefault<z.ZodNumber>;
|
|
4017
4629
|
}, "strip", z.ZodTypeAny, {
|
|
4018
4630
|
contextStrategy: "layered" | "planner";
|
|
4019
4631
|
staleMinutes: number;
|
|
@@ -4021,6 +4633,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4021
4633
|
tierTwoThresholdTokens: number;
|
|
4022
4634
|
maxClaudeCodeDispatchesPerHour: number;
|
|
4023
4635
|
maxClaudeCodeDispatchesPer5h: number;
|
|
4636
|
+
continuityStateTurns: number;
|
|
4024
4637
|
}, {
|
|
4025
4638
|
contextStrategy?: "layered" | "planner" | undefined;
|
|
4026
4639
|
staleMinutes?: number | undefined;
|
|
@@ -4028,9 +4641,10 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4028
4641
|
tierTwoThresholdTokens?: number | undefined;
|
|
4029
4642
|
maxClaudeCodeDispatchesPerHour?: number | undefined;
|
|
4030
4643
|
maxClaudeCodeDispatchesPer5h?: number | undefined;
|
|
4644
|
+
continuityStateTurns?: number | undefined;
|
|
4031
4645
|
}>>;
|
|
4032
4646
|
/** Move B — JS/TS plugins. Each entry is an installed npm package name
|
|
4033
|
-
* (e.g. `agentx-plugin-mattermost` or `@
|
|
4647
|
+
* (e.g. `agentx-plugin-mattermost` or `@acme/plugin-mattermost`); the
|
|
4034
4648
|
* loader does a dynamic `import(name)` at boot, validates the manifest,
|
|
4035
4649
|
* and calls plugin.setup(ctx). Plugins can register channel adapters
|
|
4036
4650
|
* via ctx.addChannel() and subscribe to bus events via ctx.on(). Empty
|
|
@@ -4128,6 +4742,11 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4128
4742
|
url: string;
|
|
4129
4743
|
token?: string | undefined;
|
|
4130
4744
|
}[];
|
|
4745
|
+
inboxes: {
|
|
4746
|
+
enabled: boolean;
|
|
4747
|
+
agent: string;
|
|
4748
|
+
name: string;
|
|
4749
|
+
}[];
|
|
4131
4750
|
discovery: "static" | "mdns";
|
|
4132
4751
|
healthCheck: {
|
|
4133
4752
|
timeout: number;
|
|
@@ -4242,6 +4861,14 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4242
4861
|
clientId?: string | undefined;
|
|
4243
4862
|
privateKeyFile?: string | undefined;
|
|
4244
4863
|
};
|
|
4864
|
+
ntfy: {
|
|
4865
|
+
enabled: boolean;
|
|
4866
|
+
server: string;
|
|
4867
|
+
defaultPriority: number;
|
|
4868
|
+
token?: string | undefined;
|
|
4869
|
+
topic?: string | undefined;
|
|
4870
|
+
defaultTitle?: string | undefined;
|
|
4871
|
+
};
|
|
4245
4872
|
webrtc: {
|
|
4246
4873
|
enabled: boolean;
|
|
4247
4874
|
stunServers: string[];
|
|
@@ -4282,6 +4909,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4282
4909
|
timezone: string;
|
|
4283
4910
|
onError: ("notify" | "log" | "disable")[];
|
|
4284
4911
|
model?: string | undefined;
|
|
4912
|
+
command?: string | undefined;
|
|
4285
4913
|
notify?: {
|
|
4286
4914
|
channel: string;
|
|
4287
4915
|
chatId: string;
|
|
@@ -4366,9 +4994,67 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4366
4994
|
token?: string | undefined;
|
|
4367
4995
|
draftAgent?: string | undefined;
|
|
4368
4996
|
};
|
|
4997
|
+
decisions: {
|
|
4998
|
+
enabled: boolean;
|
|
4999
|
+
dbPath: string;
|
|
5000
|
+
redactState: boolean;
|
|
5001
|
+
keepStateRows: number;
|
|
5002
|
+
defaultBackend: string;
|
|
5003
|
+
backends: {
|
|
5004
|
+
local: {
|
|
5005
|
+
provider: string;
|
|
5006
|
+
model: string;
|
|
5007
|
+
structureMode: "tool" | "text" | "auto";
|
|
5008
|
+
normalizeProbabilities: boolean;
|
|
5009
|
+
nRetryMalformedStructure: number;
|
|
5010
|
+
maxStateChars: number;
|
|
5011
|
+
};
|
|
5012
|
+
simpleJev: {
|
|
5013
|
+
baseUrl: string;
|
|
5014
|
+
timeoutMs: number;
|
|
5015
|
+
maxStateChars: number;
|
|
5016
|
+
maxChoiceOptions: number;
|
|
5017
|
+
model?: string | undefined;
|
|
5018
|
+
apiKeyEnv?: string | undefined;
|
|
5019
|
+
};
|
|
5020
|
+
jev: {
|
|
5021
|
+
model: string;
|
|
5022
|
+
path: string;
|
|
5023
|
+
baseUrl: string;
|
|
5024
|
+
apiKeyEnv: string;
|
|
5025
|
+
timeoutMs: number;
|
|
5026
|
+
maxStateChars: number;
|
|
5027
|
+
maxChoiceOptions: number;
|
|
5028
|
+
};
|
|
5029
|
+
typesafe: {
|
|
5030
|
+
model: string;
|
|
5031
|
+
path: string;
|
|
5032
|
+
baseUrl: string;
|
|
5033
|
+
apiKeyEnv: string;
|
|
5034
|
+
timeoutMs: number;
|
|
5035
|
+
maxStateChars: number;
|
|
5036
|
+
maxChoiceOptions: number;
|
|
5037
|
+
};
|
|
5038
|
+
};
|
|
5039
|
+
seats: Record<string, {
|
|
5040
|
+
temperature: number;
|
|
5041
|
+
mode: "active" | "off" | "shadow";
|
|
5042
|
+
timeoutMs: number;
|
|
5043
|
+
explore: number;
|
|
5044
|
+
model?: string | undefined;
|
|
5045
|
+
backend?: string | undefined;
|
|
5046
|
+
}>;
|
|
5047
|
+
routing: {
|
|
5048
|
+
cheapModel?: string | undefined;
|
|
5049
|
+
};
|
|
5050
|
+
};
|
|
4369
5051
|
workflows: {
|
|
4370
5052
|
dir: string;
|
|
4371
5053
|
enabled: boolean;
|
|
5054
|
+
n8n: {
|
|
5055
|
+
apiKey: string;
|
|
5056
|
+
baseUrl: string;
|
|
5057
|
+
};
|
|
4372
5058
|
matching: {
|
|
4373
5059
|
enabled: boolean;
|
|
4374
5060
|
mode: "auto" | "suggest";
|
|
@@ -4412,6 +5098,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4412
5098
|
tierTwoThresholdTokens: number;
|
|
4413
5099
|
maxClaudeCodeDispatchesPerHour: number;
|
|
4414
5100
|
maxClaudeCodeDispatchesPer5h: number;
|
|
5101
|
+
continuityStateTurns: number;
|
|
4415
5102
|
};
|
|
4416
5103
|
plugins: string[];
|
|
4417
5104
|
processPool: {
|
|
@@ -4472,6 +5159,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4472
5159
|
project?: string | undefined;
|
|
4473
5160
|
displayName?: string | undefined;
|
|
4474
5161
|
}[];
|
|
5162
|
+
clients: Record<string, {
|
|
5163
|
+
standing: string[];
|
|
5164
|
+
name?: string | undefined;
|
|
5165
|
+
kind?: "client" | "internal" | "own" | undefined;
|
|
5166
|
+
respondWithin?: string | undefined;
|
|
5167
|
+
}>;
|
|
4475
5168
|
workTickMinutes: number;
|
|
4476
5169
|
idleQueueThreshold: number;
|
|
4477
5170
|
standup: {
|
|
@@ -4550,6 +5243,11 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4550
5243
|
url: string;
|
|
4551
5244
|
token?: string | undefined;
|
|
4552
5245
|
}[] | undefined;
|
|
5246
|
+
inboxes?: {
|
|
5247
|
+
agent: string;
|
|
5248
|
+
name: string;
|
|
5249
|
+
enabled?: boolean | undefined;
|
|
5250
|
+
}[] | undefined;
|
|
4553
5251
|
discovery?: "static" | "mdns" | undefined;
|
|
4554
5252
|
healthCheck?: {
|
|
4555
5253
|
timeout?: number | undefined;
|
|
@@ -4658,6 +5356,14 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4658
5356
|
clientId?: string | undefined;
|
|
4659
5357
|
privateKeyFile?: string | undefined;
|
|
4660
5358
|
} | undefined;
|
|
5359
|
+
ntfy?: {
|
|
5360
|
+
enabled?: boolean | undefined;
|
|
5361
|
+
token?: string | undefined;
|
|
5362
|
+
server?: string | undefined;
|
|
5363
|
+
topic?: string | undefined;
|
|
5364
|
+
defaultPriority?: number | undefined;
|
|
5365
|
+
defaultTitle?: string | undefined;
|
|
5366
|
+
} | undefined;
|
|
4661
5367
|
webrtc?: {
|
|
4662
5368
|
enabled?: boolean | undefined;
|
|
4663
5369
|
stunServers?: string[] | undefined;
|
|
@@ -4691,10 +5397,11 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4691
5397
|
} | undefined;
|
|
4692
5398
|
crons?: Record<string, {
|
|
4693
5399
|
agent: string;
|
|
4694
|
-
prompt: string;
|
|
4695
5400
|
schedule: string;
|
|
4696
5401
|
model?: string | undefined;
|
|
4697
5402
|
enabled?: boolean | undefined;
|
|
5403
|
+
command?: string | undefined;
|
|
5404
|
+
prompt?: string | undefined;
|
|
4698
5405
|
timeout?: number | undefined;
|
|
4699
5406
|
timezone?: string | undefined;
|
|
4700
5407
|
notify?: {
|
|
@@ -4788,6 +5495,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4788
5495
|
project?: string | undefined;
|
|
4789
5496
|
displayName?: string | undefined;
|
|
4790
5497
|
}[] | undefined;
|
|
5498
|
+
clients?: Record<string, {
|
|
5499
|
+
name?: string | undefined;
|
|
5500
|
+
kind?: "client" | "internal" | "own" | undefined;
|
|
5501
|
+
respondWithin?: string | undefined;
|
|
5502
|
+
standing?: string[] | undefined;
|
|
5503
|
+
}> | undefined;
|
|
4791
5504
|
workTickMinutes?: number | undefined;
|
|
4792
5505
|
idleQueueThreshold?: number | undefined;
|
|
4793
5506
|
standup?: {
|
|
@@ -4844,9 +5557,67 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4844
5557
|
}[] | undefined;
|
|
4845
5558
|
draftAgent?: string | undefined;
|
|
4846
5559
|
} | undefined;
|
|
5560
|
+
decisions?: {
|
|
5561
|
+
enabled?: boolean | undefined;
|
|
5562
|
+
dbPath?: string | undefined;
|
|
5563
|
+
redactState?: boolean | undefined;
|
|
5564
|
+
keepStateRows?: number | undefined;
|
|
5565
|
+
defaultBackend?: string | undefined;
|
|
5566
|
+
backends?: {
|
|
5567
|
+
local?: {
|
|
5568
|
+
provider?: string | undefined;
|
|
5569
|
+
model?: string | undefined;
|
|
5570
|
+
structureMode?: "tool" | "text" | "auto" | undefined;
|
|
5571
|
+
normalizeProbabilities?: boolean | undefined;
|
|
5572
|
+
nRetryMalformedStructure?: number | undefined;
|
|
5573
|
+
maxStateChars?: number | undefined;
|
|
5574
|
+
} | undefined;
|
|
5575
|
+
simpleJev?: {
|
|
5576
|
+
model?: string | undefined;
|
|
5577
|
+
baseUrl?: string | undefined;
|
|
5578
|
+
apiKeyEnv?: string | undefined;
|
|
5579
|
+
timeoutMs?: number | undefined;
|
|
5580
|
+
maxStateChars?: number | undefined;
|
|
5581
|
+
maxChoiceOptions?: number | undefined;
|
|
5582
|
+
} | undefined;
|
|
5583
|
+
jev?: {
|
|
5584
|
+
model?: string | undefined;
|
|
5585
|
+
path?: string | undefined;
|
|
5586
|
+
baseUrl?: string | undefined;
|
|
5587
|
+
apiKeyEnv?: string | undefined;
|
|
5588
|
+
timeoutMs?: number | undefined;
|
|
5589
|
+
maxStateChars?: number | undefined;
|
|
5590
|
+
maxChoiceOptions?: number | undefined;
|
|
5591
|
+
} | undefined;
|
|
5592
|
+
typesafe?: {
|
|
5593
|
+
model?: string | undefined;
|
|
5594
|
+
path?: string | undefined;
|
|
5595
|
+
baseUrl?: string | undefined;
|
|
5596
|
+
apiKeyEnv?: string | undefined;
|
|
5597
|
+
timeoutMs?: number | undefined;
|
|
5598
|
+
maxStateChars?: number | undefined;
|
|
5599
|
+
maxChoiceOptions?: number | undefined;
|
|
5600
|
+
} | undefined;
|
|
5601
|
+
} | undefined;
|
|
5602
|
+
seats?: Record<string, {
|
|
5603
|
+
model?: string | undefined;
|
|
5604
|
+
temperature?: number | undefined;
|
|
5605
|
+
backend?: string | undefined;
|
|
5606
|
+
mode?: "active" | "off" | "shadow" | undefined;
|
|
5607
|
+
timeoutMs?: number | undefined;
|
|
5608
|
+
explore?: number | undefined;
|
|
5609
|
+
} | undefined> | undefined;
|
|
5610
|
+
routing?: {
|
|
5611
|
+
cheapModel?: string | undefined;
|
|
5612
|
+
} | undefined;
|
|
5613
|
+
} | undefined;
|
|
4847
5614
|
workflows?: {
|
|
4848
5615
|
dir?: string | undefined;
|
|
4849
5616
|
enabled?: boolean | undefined;
|
|
5617
|
+
n8n?: {
|
|
5618
|
+
apiKey?: string | undefined;
|
|
5619
|
+
baseUrl?: string | undefined;
|
|
5620
|
+
} | undefined;
|
|
4850
5621
|
matching?: {
|
|
4851
5622
|
enabled?: boolean | undefined;
|
|
4852
5623
|
mode?: "auto" | "suggest" | undefined;
|
|
@@ -4890,6 +5661,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4890
5661
|
tierTwoThresholdTokens?: number | undefined;
|
|
4891
5662
|
maxClaudeCodeDispatchesPerHour?: number | undefined;
|
|
4892
5663
|
maxClaudeCodeDispatchesPer5h?: number | undefined;
|
|
5664
|
+
continuityStateTurns?: number | undefined;
|
|
4893
5665
|
} | undefined;
|
|
4894
5666
|
plugins?: string[] | undefined;
|
|
4895
5667
|
processPool?: {
|
|
@@ -4924,20 +5696,36 @@ interface PeerState {
|
|
|
4924
5696
|
consecutiveFailures: number;
|
|
4925
5697
|
/** Last probe error message — surfaced for debugging via /mesh. */
|
|
4926
5698
|
lastError?: string;
|
|
5699
|
+
/** True once the peer has answered at least one probe in this process.
|
|
5700
|
+
* Distinguishes "temporarily unreachable node we know hosts these
|
|
5701
|
+
* agents" from "peer configured but never seen" — only the former is
|
|
5702
|
+
* worth deferring messages for. */
|
|
5703
|
+
everHealthy: boolean;
|
|
4927
5704
|
}
|
|
4928
5705
|
declare class A2AMesh {
|
|
4929
5706
|
private peers;
|
|
4930
5707
|
private healthTimer?;
|
|
4931
5708
|
private config;
|
|
4932
5709
|
private log;
|
|
4933
|
-
/**
|
|
4934
|
-
*
|
|
4935
|
-
* live operator visibility
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
*
|
|
4940
|
-
|
|
5710
|
+
/** Listeners fired on peer state transitions (recovered / lost /
|
|
5711
|
+
* skills changed). The daemon bridges these into the EventBus for
|
|
5712
|
+
* live operator visibility; the router uses them to replay messages
|
|
5713
|
+
* it deferred while a peer was unreachable. */
|
|
5714
|
+
private peerChangeCallbacks;
|
|
5715
|
+
/** Register a listener for peer state transitions. Every registered
|
|
5716
|
+
* listener is called — an earlier single-callback field meant the
|
|
5717
|
+
* daemon's EventBus bridge silently displaced any other subscriber,
|
|
5718
|
+
* which is why the router could not learn about peer recovery.
|
|
5719
|
+
* Used to reach the daemon/router without a circular dependency. */
|
|
5720
|
+
onPeerChange(cb: (event: {
|
|
5721
|
+
peer: string;
|
|
5722
|
+
healthy: boolean;
|
|
5723
|
+
skills: string[];
|
|
5724
|
+
delta: "recovered" | "lost" | "skills-changed";
|
|
5725
|
+
}) => void): void;
|
|
5726
|
+
/** Fan a transition out to every listener. One throwing listener must
|
|
5727
|
+
* not stop the others or abort the discovery loop. */
|
|
5728
|
+
private emitPeerChange;
|
|
4941
5729
|
constructor(config: DaemonConfig, log?: (...args: unknown[]) => void);
|
|
4942
5730
|
/**
|
|
4943
5731
|
* Start the mesh: discover peers and begin health checks.
|
|
@@ -5007,7 +5795,7 @@ declare class A2AMesh {
|
|
|
5007
5795
|
* the sender used, instead of falling back to api/default. Without
|
|
5008
5796
|
* this, a GitLab webhook routed across the mesh lands in the
|
|
5009
5797
|
* recipient's api:default bucket with no project, no issue id, no
|
|
5010
|
-
* channelMeta — i.e., the
|
|
5798
|
+
* channelMeta — i.e., the globex/umbrella confusion incident on
|
|
5011
5799
|
* 2026-04-29 issue #709. Shape matches AgentTask.context. */
|
|
5012
5800
|
context?: Record<string, unknown>;
|
|
5013
5801
|
}): Promise<string>;
|
|
@@ -5040,7 +5828,7 @@ declare class A2AMesh {
|
|
|
5040
5828
|
*
|
|
5041
5829
|
* Peer lookup is tolerant: the `to` field comes from whichever daemon
|
|
5042
5830
|
* originated the signal, which often spells the same node differently
|
|
5043
|
-
* ("
|
|
5831
|
+
* ("HQ-Local" vs "hq-local"). Match on a normalized name so config
|
|
5044
5832
|
* drift across sides doesn't break the signaling path.
|
|
5045
5833
|
*/
|
|
5046
5834
|
sendSignal(peerName: string, signal: unknown): Promise<boolean>;
|
|
@@ -5067,6 +5855,18 @@ declare class A2AMesh {
|
|
|
5067
5855
|
* dashboards and /mesh; look them up per-request by peer name instead.
|
|
5068
5856
|
*/
|
|
5069
5857
|
authHeaders(peerName: string): Record<string, string>;
|
|
5858
|
+
/**
|
|
5859
|
+
* Find the peer that hosts `agentId`, including peers that are currently
|
|
5860
|
+
* unreachable but were healthy earlier in this process (their last-known
|
|
5861
|
+
* skill list is retained across a failed probe).
|
|
5862
|
+
*
|
|
5863
|
+
* Routing uses this to tell a genuinely unknown agent apart from one whose
|
|
5864
|
+
* node is simply down: the first is a drop, the second is a deferral.
|
|
5865
|
+
*/
|
|
5866
|
+
findAgentPeer(agentId: string): {
|
|
5867
|
+
peer: string;
|
|
5868
|
+
healthy: boolean;
|
|
5869
|
+
} | undefined;
|
|
5070
5870
|
directory(): Array<{
|
|
5071
5871
|
peer: string;
|
|
5072
5872
|
peerUrl: string;
|
|
@@ -5193,12 +5993,20 @@ declare class AgentXDaemon {
|
|
|
5193
5993
|
private workflowDispatcher?;
|
|
5194
5994
|
private workflowStore?;
|
|
5195
5995
|
private workflowRuns?;
|
|
5996
|
+
private wfHealth?;
|
|
5997
|
+
/** Shares the daemon's SQLite handle; absent when running without one. */
|
|
5998
|
+
private _assistant?;
|
|
5999
|
+
private assistantStore;
|
|
6000
|
+
/** Workflow health for the monitor. Cached for a minute: the dashboard
|
|
6001
|
+
* polls every 15s and dormancy does not change on that timescale. */
|
|
6002
|
+
private workflowHealth;
|
|
5196
6003
|
private db;
|
|
5197
6004
|
private loadedPlugins;
|
|
5198
6005
|
private readonly agentMemory;
|
|
5199
6006
|
private contacts;
|
|
5200
6007
|
/** Persistent-claude process registry. Null when no agent has
|
|
5201
6008
|
* persistentProcess: true (legacy spawn-per-task path). */
|
|
6009
|
+
private sessionMonitor?;
|
|
5202
6010
|
private processRegistry;
|
|
5203
6011
|
/** Unified observability bus. Publishers (workflow engine, mesh,
|
|
5204
6012
|
* channels, signals) emit here; subscribers (SSE, CLI, board
|
|
@@ -5219,6 +6027,11 @@ declare class AgentXDaemon {
|
|
|
5219
6027
|
* reload cron jobs + in-memory config. Channels / agents / mesh changes
|
|
5220
6028
|
* still require a restart — we log a warning so the operator knows.
|
|
5221
6029
|
*/
|
|
6030
|
+
/** Bring up the typed-decision seat: register in-tree backends, open the
|
|
6031
|
+
* shadow store, and hand the runtime its config. Best-effort — a seat
|
|
6032
|
+
* that cannot record still answers, and a seat that cannot answer
|
|
6033
|
+
* returns null and leaves its call site's existing behaviour alone. */
|
|
6034
|
+
private initDecisions;
|
|
5222
6035
|
private startConfigWatcher;
|
|
5223
6036
|
/**
|
|
5224
6037
|
* Re-read agentx.json, diff against the in-memory config, apply what we
|
|
@@ -5323,7 +6136,7 @@ declare class AgentXDaemon {
|
|
|
5323
6136
|
private handleMemoryApi;
|
|
5324
6137
|
private handleWorkflowEvent;
|
|
5325
6138
|
/** Mesh-callable outbound send. A peer's workflow `action.send` invokes
|
|
5326
|
-
* this when the channel lives on this node (e.g.
|
|
6139
|
+
* this when the channel lives on this node (e.g. peer-server hosts
|
|
5327
6140
|
* whatsapp; macbook's workflow forwards here). Just unwraps to the local
|
|
5328
6141
|
* router's outbound path so all the same per-account/per-bot resolution
|
|
5329
6142
|
* applies. Authentication is currently the mesh token at the network
|
|
@@ -5333,20 +6146,13 @@ declare class AgentXDaemon {
|
|
|
5333
6146
|
* every healthy mesh peer that hosts the channel — a channel's "true"
|
|
5334
6147
|
* chat list is spread across whichever nodes are actually paired
|
|
5335
6148
|
* (e.g. macbook has the channel enabled but WhatsApp Baileys is unpaired,
|
|
5336
|
-
* while
|
|
5337
|
-
* the author to pick from
|
|
6149
|
+
* while peer-server is paired; macbook's list is empty but we still want
|
|
6150
|
+
* the author to pick from peer-server's cache). Dedup by `id`; the first
|
|
5338
6151
|
* source with a given id wins.
|
|
5339
6152
|
*
|
|
5340
6153
|
* `sources` in the response tells the editor where the entries came from
|
|
5341
6154
|
* so it can show that metadata alongside. */
|
|
5342
6155
|
private handleChannelChats;
|
|
5343
|
-
/** Replay a draft as an ad-hoc workflow. The draft itself stays in
|
|
5344
|
-
* `_drafts/`; we register a copy as `_adhoc-replay-<draftId>-<ts>.yaml`
|
|
5345
|
-
* in the active store, hot-reload, and fire it through the dispatcher.
|
|
5346
|
-
* Input is sourced from a trace pulled out of the draft's
|
|
5347
|
-
* `sourceTaskIds` — caller can override which trace via `taskId` in the
|
|
5348
|
-
* body, or supply a payload directly via `input`. */
|
|
5349
|
-
private handleWorkflowDraftReplay;
|
|
5350
6156
|
/** Manual run endpoint used by `agentx workflow run <id>`. Only workflows
|
|
5351
6157
|
* whose trigger node is `trigger.manual` are runnable here — any other
|
|
5352
6158
|
* source expects a live event and shouldn't race with a manual kick. */
|
|
@@ -5677,6 +6483,13 @@ interface AgentResponse {
|
|
|
5677
6483
|
* actually is, so rotation decisions must use it, never `usage`.
|
|
5678
6484
|
* Undefined on non-streaming paths (result JSON has no per-call data). */
|
|
5679
6485
|
contextTokens?: number;
|
|
6486
|
+
/** Agentic-loop iterations the provider took inside THIS user turn, from
|
|
6487
|
+
* the CLI result event's `num_turns`. Distinct from a conversation turn:
|
|
6488
|
+
* one user message can cost many of these when the agent chains tools.
|
|
6489
|
+
* Benchmarks need it to tell "JEV made the agent cheaper" apart from
|
|
6490
|
+
* "JEV made the agent do less work". Undefined when the provider does
|
|
6491
|
+
* not report it. */
|
|
6492
|
+
numTurns?: number;
|
|
5680
6493
|
/** The model Claude actually billed for (from the CLI's init event). When
|
|
5681
6494
|
* absent, cost reporting should fall back to the model override / agent
|
|
5682
6495
|
* config. Knowing the billed model is what makes cache-aware pricing
|
|
@@ -5709,7 +6522,7 @@ interface TokenUsage {
|
|
|
5709
6522
|
* Non-streaming — waits for full response.
|
|
5710
6523
|
*/
|
|
5711
6524
|
declare function executeClaudeCode(agent: AgentDef, task: AgentTask, historyContext?: string, resumeSessionId?: string, abortSignal?: AbortSignal): Promise<AgentResponse>;
|
|
5712
|
-
declare function executeOpenCodeCli(agent: AgentDef, task: AgentTask, onDelta?: StreamCallback, historyContext?: string, resumeSessionId?: string, onEvent?: (event: any) => void, abortSignal?: AbortSignal): Promise<AgentResponse>;
|
|
6525
|
+
declare function executeOpenCodeCli(agent: AgentDef, task: AgentTask, onDelta?: StreamCallback, historyContext?: string, resumeSessionId?: string, onEvent?: (event: any) => void, abortSignal?: AbortSignal, onThinking?: ThinkingCallback): Promise<AgentResponse>;
|
|
5713
6526
|
/**
|
|
5714
6527
|
* Execute a task using the Claude Agent SDK (tier: "sdk").
|
|
5715
6528
|
*/
|
|
@@ -5722,12 +6535,12 @@ declare function executeSdk(agent: AgentDef, task: AgentTask, apiKey: string, hi
|
|
|
5722
6535
|
* lets the daemon's POST /chat?stream=true actually stream Claude/DeepSeek
|
|
5723
6536
|
* tokens — without it, the orchestrator returned only after the agentic
|
|
5724
6537
|
* loop finished and SSE clients saw `role` then `stop` with no content
|
|
5725
|
-
* between (the failure mode that surfaced on the
|
|
6538
|
+
* between (the failure mode that surfaced on the acme-public smoke test
|
|
5726
6539
|
* after the tier switch).
|
|
5727
6540
|
*/
|
|
5728
6541
|
/** Side-channel for reasoning/thinking chunks — distinct from
|
|
5729
6542
|
* StreamCallback so callers can route them to a different UI lane
|
|
5730
|
-
* (e.g. a collapsible thinking block on
|
|
6543
|
+
* (e.g. a collapsible thinking block on example.com, a dimmed terminal
|
|
5731
6544
|
* block in the dashboard) without polluting the visible response. */
|
|
5732
6545
|
type ThinkingCallback = (text: string) => void;
|
|
5733
6546
|
declare function executeOrchestrator(agent: AgentDef, task: AgentTask, apiKey?: string, historyContext?: string, onDelta?: StreamCallback, providerOpts?: {
|
|
@@ -5953,7 +6766,7 @@ interface SeededMessage {
|
|
|
5953
6766
|
timestamp: string;
|
|
5954
6767
|
externalId?: string;
|
|
5955
6768
|
/** Optional channel-side account/bot identity that handled this message
|
|
5956
|
-
* (e.g., Telegram accountId "
|
|
6769
|
+
* (e.g., Telegram accountId "acme_cx_bot"). Captured by adapters that
|
|
5957
6770
|
* shadow-log outbound, so seeded history preserves the audit trail of
|
|
5958
6771
|
* which bot identity actually sent each line. Renderers may ignore it. */
|
|
5959
6772
|
accountId?: string;
|
|
@@ -6179,6 +6992,15 @@ declare class SessionStore {
|
|
|
6179
6992
|
* Check if a native CLI session is stale (idle too long for resume to be useful).
|
|
6180
6993
|
* When stale, the resumed context will be too far behind — better to start fresh.
|
|
6181
6994
|
*/
|
|
6995
|
+
/**
|
|
6996
|
+
* How long since this session last did anything, in ms.
|
|
6997
|
+
*
|
|
6998
|
+
* Used to reason about whether the provider's prompt cache for it is
|
|
6999
|
+
* still warm — a cold cache changes which model is cheaper, because the
|
|
7000
|
+
* saving from a cached read only exists while the cache exists. Returns
|
|
7001
|
+
* null when there is no native session to resume.
|
|
7002
|
+
*/
|
|
7003
|
+
sessionIdleMs(agentId: string, channel: string, chatId: string): number | null;
|
|
6182
7004
|
isSessionStale(agentId: string, channel: string, chatId: string): boolean;
|
|
6183
7005
|
/**
|
|
6184
7006
|
* Build a summary of recent messages from OTHER sessions for the same agent today.
|
|
@@ -6394,6 +7216,30 @@ declare class WikiStore {
|
|
|
6394
7216
|
* Search articles by keyword. Returns articles the agent can read.
|
|
6395
7217
|
*/
|
|
6396
7218
|
search(query: string, agentId: string, maxResults?: number): WikiArticle[];
|
|
7219
|
+
/**
|
|
7220
|
+
* findRelevant, then re-ranked by the wiki-rerank seat.
|
|
7221
|
+
*
|
|
7222
|
+
* Recall comes from findRelevant rather than search() because
|
|
7223
|
+
* findRelevant is the function everything actually calls — search()
|
|
7224
|
+
* turned out to have no callers at all. Additive on purpose: the
|
|
7225
|
+
* synchronous findRelevant is untouched and its existing callers stay
|
|
7226
|
+
* as they are. Measured on the 12-query eval against this
|
|
7227
|
+
* wiki, re-ranking moves R@1 from 33.3% to 50.0% and R@3 from 41.7% to
|
|
7228
|
+
* 66.7%, for about $0.0005 and 550ms a query.
|
|
7229
|
+
*
|
|
7230
|
+
* Fail-open in every direction. Seat off, backend down, no key, fewer
|
|
7231
|
+
* than two candidates — all return BM25's own order, which is what the
|
|
7232
|
+
* caller would have got anyway.
|
|
7233
|
+
*
|
|
7234
|
+
* Note what this cannot do: it only reorders what BM25 shortlisted. In
|
|
7235
|
+
* the eval R@3 sat exactly on that ceiling, so every remaining miss was
|
|
7236
|
+
* an article BM25 never returned. Widening the shortlist does not fix
|
|
7237
|
+
* that — past 30 the extra candidates measurably diluted the ranking.
|
|
7238
|
+
*/
|
|
7239
|
+
findRelevantReranked(query: string, agentId?: string, maxResults?: number, opts?: {
|
|
7240
|
+
shortlist?: number;
|
|
7241
|
+
excerptChars?: number;
|
|
7242
|
+
}): Promise<WikiArticle[]>;
|
|
6397
7243
|
/**
|
|
6398
7244
|
* Find articles relevant to a message (for context injection).
|
|
6399
7245
|
*
|
|
@@ -6887,8 +7733,8 @@ declare const classificationSchema: z.ZodObject<{
|
|
|
6887
7733
|
channel?: string | undefined;
|
|
6888
7734
|
preview?: string | undefined;
|
|
6889
7735
|
agentId?: string | undefined;
|
|
6890
|
-
sender?: string | undefined;
|
|
6891
7736
|
confidence?: number | undefined;
|
|
7737
|
+
sender?: string | undefined;
|
|
6892
7738
|
}, {
|
|
6893
7739
|
path: string[];
|
|
6894
7740
|
status: "pending" | "approved" | "rejected";
|
|
@@ -6898,13 +7744,13 @@ declare const classificationSchema: z.ZodObject<{
|
|
|
6898
7744
|
channel?: string | undefined;
|
|
6899
7745
|
preview?: string | undefined;
|
|
6900
7746
|
agentId?: string | undefined;
|
|
7747
|
+
confidence?: number | undefined;
|
|
6901
7748
|
sender?: string | undefined;
|
|
6902
7749
|
proposedAxes?: Record<string, Record<string, string>> | undefined;
|
|
6903
7750
|
leaf?: {
|
|
6904
7751
|
output?: string | undefined;
|
|
6905
7752
|
input?: string | undefined;
|
|
6906
7753
|
} | undefined;
|
|
6907
|
-
confidence?: number | undefined;
|
|
6908
7754
|
}>;
|
|
6909
7755
|
type Classification = z.infer<typeof classificationSchema>;
|
|
6910
7756
|
/** Row in the fingerprint → path snap cache. */
|
|
@@ -7107,7 +7953,7 @@ declare class GraphStore {
|
|
|
7107
7953
|
* Commit a full classification path: for each path element that doesn't
|
|
7108
7954
|
* yet exist, infer its schema level by matching the proposed axes against
|
|
7109
7955
|
* the level's required axes (first match ≥ cursor wins — this handles
|
|
7110
|
-
* paths that skip levels, like business →
|
|
7956
|
+
* paths that skip levels, like business → acme where location is
|
|
7111
7957
|
* absent). Refreshes the node list between adds so callers in a loop
|
|
7112
7958
|
* don't hit "Node id already exists" on the second iteration.
|
|
7113
7959
|
*/
|
|
@@ -7125,6 +7971,10 @@ declare class GraphStore {
|
|
|
7125
7971
|
* state, not the original).
|
|
7126
7972
|
*/
|
|
7127
7973
|
listPendingClassifications(limit?: number): Classification[];
|
|
7974
|
+
/** Every classification, newest-first, collapsed one row per message.
|
|
7975
|
+
* The human-label queue needs the whole population rather than one
|
|
7976
|
+
* status, because the rows worth checking are the auto-approved ones. */
|
|
7977
|
+
listAllClassifications(): Classification[];
|
|
7128
7978
|
/** Same contract as listPendingClassifications but filtered to any status. */
|
|
7129
7979
|
listByStatus(status: Classification["status"], limit?: number): Classification[];
|
|
7130
7980
|
/**
|
|
@@ -7286,8 +8136,11 @@ declare class LandscapeBuilder {
|
|
|
7286
8136
|
interface RunningTask {
|
|
7287
8137
|
/** Unique id for this execution (timestamp-based). */
|
|
7288
8138
|
id: string;
|
|
7289
|
-
/** First 200 chars of the user message, for
|
|
8139
|
+
/** First 200 chars of the user message, for dense lists. */
|
|
7290
8140
|
messagePreview: string;
|
|
8141
|
+
/** The whole request. A task page shows what was actually asked, and the
|
|
8142
|
+
* preview cuts mid-sentence — or mid-JSON, which reads as a bug. */
|
|
8143
|
+
message: string;
|
|
7291
8144
|
/** Origin channel (telegram, whatsapp, gitlab, api, cron, business, a2a, …). */
|
|
7292
8145
|
channel: string;
|
|
7293
8146
|
/** Group / chat / issue id from which the task arrived. */
|
|
@@ -7330,6 +8183,11 @@ declare class AgentRegistry {
|
|
|
7330
8183
|
* prompt on every task. */
|
|
7331
8184
|
readonly agentMemory: AgentMemory;
|
|
7332
8185
|
private patternStore;
|
|
8186
|
+
/** Model to drop mechanical tasks onto, from
|
|
8187
|
+
* `decisions.routing.cheapModel`. Unset means no routing happens at
|
|
8188
|
+
* all — the feature is off until an operator names the model, so it
|
|
8189
|
+
* cannot silently downgrade a fleet that never asked for it. */
|
|
8190
|
+
private get cheapModel();
|
|
7333
8191
|
private rateLimiter;
|
|
7334
8192
|
private tokenTracker;
|
|
7335
8193
|
private landscape?;
|
|
@@ -7415,9 +8273,9 @@ declare class AgentRegistry {
|
|
|
7415
8273
|
* When `atMentionsOnly` is true, only `@`-prefixed mentions are considered.
|
|
7416
8274
|
* This is used for messages originating from another bot (cross-daemon
|
|
7417
8275
|
* Telegram cascades, for example) where we don't want bare-word matches
|
|
7418
|
-
* like "
|
|
8276
|
+
* like "marketing" in prose or "devops-globex" quoted in a reply to trigger
|
|
7419
8277
|
* agents spuriously. Intentional handoffs still work because agents
|
|
7420
|
-
* write explicit `@
|
|
8278
|
+
* write explicit `@acme_X_bot` handles.
|
|
7421
8279
|
*/
|
|
7422
8280
|
findByMention(text: string, opts?: {
|
|
7423
8281
|
atMentionsOnly?: boolean;
|
|
@@ -7443,6 +8301,16 @@ declare class AgentRegistry {
|
|
|
7443
8301
|
*
|
|
7444
8302
|
* Errors are swallowed by design — memory continuity is best-effort,
|
|
7445
8303
|
* it must never block or break the rotation it's hooked into. */
|
|
8304
|
+
/**
|
|
8305
|
+
* Ask the session-continuity seat whether to rotate before any
|
|
8306
|
+
* mechanical trigger fires. Returns true only for a confident,
|
|
8307
|
+
* active-mode early rotation.
|
|
8308
|
+
*
|
|
8309
|
+
* Never throws: askSeat is fail-open by contract, and everything else
|
|
8310
|
+
* here is a guarded read. Off, shadow, backend error and missing
|
|
8311
|
+
* history all return false, which is today's behaviour exactly.
|
|
8312
|
+
*/
|
|
8313
|
+
private maybeRotateForContinuity;
|
|
7446
8314
|
private captureRotationMemoAsync;
|
|
7447
8315
|
/**
|
|
7448
8316
|
* Build peer list for context engine.
|
|
@@ -7586,7 +8454,7 @@ declare class AgentRegistry {
|
|
|
7586
8454
|
totalTokens: number;
|
|
7587
8455
|
totalInput: number;
|
|
7588
8456
|
totalOutput: number;
|
|
7589
|
-
totalCacheRead: number;
|
|
8457
|
+
totalCacheRead: number; /** Runtime handover store — shared with MessageRouter via file on disk. */
|
|
7590
8458
|
totalCacheCreate: number;
|
|
7591
8459
|
cacheHitRatio: number;
|
|
7592
8460
|
totalErrors: number;
|
|
@@ -7946,7 +8814,7 @@ declare const businessConfigSchema: z.ZodObject<{
|
|
|
7946
8814
|
* existing agentx.json files validate without modification. */
|
|
7947
8815
|
projects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
7948
8816
|
/** Project identifier. For GitLab/GitHub: "owner/repo". For
|
|
7949
|
-
*
|
|
8817
|
+
* acme-internal projects: a stable string. */
|
|
7950
8818
|
id: z.ZodString;
|
|
7951
8819
|
/** AgentId of the PM for this project. Looked up by
|
|
7952
8820
|
* `Organization.pmFor(project)` at dispatch time. */
|
|
@@ -8001,6 +8869,32 @@ declare const businessConfigSchema: z.ZodObject<{
|
|
|
8001
8869
|
project?: string | undefined;
|
|
8002
8870
|
displayName?: string | undefined;
|
|
8003
8871
|
}>, "many">>;
|
|
8872
|
+
/** Overrides for derived clients. Keyed by client id; absent entries get
|
|
8873
|
+
* defaults, so this stays empty until you need a clock or an
|
|
8874
|
+
* authorization. */
|
|
8875
|
+
clients: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
8876
|
+
/** Display name. Defaults to the client id. */
|
|
8877
|
+
name: z.ZodOptional<z.ZodString>;
|
|
8878
|
+
/** "client" is someone who is waiting on you and can be let down; "own"
|
|
8879
|
+
* is your own product; "internal" is machinery with no external clock. */
|
|
8880
|
+
kind: z.ZodOptional<z.ZodEnum<["client", "internal", "own"]>>;
|
|
8881
|
+
/** How long a wait may last before it starts costing: "4h", "90m", "2d".
|
|
8882
|
+
* Unset means no external clock, so delay is flat. */
|
|
8883
|
+
respondWithin: z.ZodOptional<z.ZodString>;
|
|
8884
|
+
/** Capabilities an agent may exercise unattended. "*" means all. Ignored
|
|
8885
|
+
* for kind "client" — see mayProceedUnattended(). */
|
|
8886
|
+
standing: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
8887
|
+
}, "strip", z.ZodTypeAny, {
|
|
8888
|
+
standing: string[];
|
|
8889
|
+
name?: string | undefined;
|
|
8890
|
+
kind?: "client" | "internal" | "own" | undefined;
|
|
8891
|
+
respondWithin?: string | undefined;
|
|
8892
|
+
}, {
|
|
8893
|
+
name?: string | undefined;
|
|
8894
|
+
kind?: "client" | "internal" | "own" | undefined;
|
|
8895
|
+
respondWithin?: string | undefined;
|
|
8896
|
+
standing?: string[] | undefined;
|
|
8897
|
+
}>>>;
|
|
8004
8898
|
/** Work-tick cadence in minutes during business hours. Default 15. */
|
|
8005
8899
|
workTickMinutes: z.ZodDefault<z.ZodNumber>;
|
|
8006
8900
|
/** Max queue depth for an idle agent before skipping the work tick (avoids piling up). */
|
|
@@ -8089,6 +8983,12 @@ declare const businessConfigSchema: z.ZodObject<{
|
|
|
8089
8983
|
project?: string | undefined;
|
|
8090
8984
|
displayName?: string | undefined;
|
|
8091
8985
|
}[];
|
|
8986
|
+
clients: Record<string, {
|
|
8987
|
+
standing: string[];
|
|
8988
|
+
name?: string | undefined;
|
|
8989
|
+
kind?: "client" | "internal" | "own" | undefined;
|
|
8990
|
+
respondWithin?: string | undefined;
|
|
8991
|
+
}>;
|
|
8092
8992
|
workTickMinutes: number;
|
|
8093
8993
|
idleQueueThreshold: number;
|
|
8094
8994
|
standup: {
|
|
@@ -8150,6 +9050,12 @@ declare const businessConfigSchema: z.ZodObject<{
|
|
|
8150
9050
|
project?: string | undefined;
|
|
8151
9051
|
displayName?: string | undefined;
|
|
8152
9052
|
}[] | undefined;
|
|
9053
|
+
clients?: Record<string, {
|
|
9054
|
+
name?: string | undefined;
|
|
9055
|
+
kind?: "client" | "internal" | "own" | undefined;
|
|
9056
|
+
respondWithin?: string | undefined;
|
|
9057
|
+
standing?: string[] | undefined;
|
|
9058
|
+
}> | undefined;
|
|
8153
9059
|
workTickMinutes?: number | undefined;
|
|
8154
9060
|
idleQueueThreshold?: number | undefined;
|
|
8155
9061
|
standup?: {
|
|
@@ -8488,11 +9394,27 @@ declare class MessageRouter {
|
|
|
8488
9394
|
private inflight;
|
|
8489
9395
|
/** In-flight mesh forwards (this node is awaiting a peer's response).
|
|
8490
9396
|
* Counted so the daemon's shutdown drain can wait for these in addition
|
|
8491
|
-
* to local agent tasks — otherwise a
|
|
9397
|
+
* to local agent tasks — otherwise a peer restart mid-forward kills the
|
|
8492
9398
|
* awaiter, the peer's response lands on a dead connection, and the
|
|
8493
9399
|
* inflight-replay re-runs the task on the peer. */
|
|
8494
9400
|
private activeMeshForwards;
|
|
8495
9401
|
getActiveMeshForwardCount(): number;
|
|
9402
|
+
/** Messages addressed to an agent on a mesh peer that was unreachable at
|
|
9403
|
+
* the moment they arrived, keyed by peer name, replayed when the peer
|
|
9404
|
+
* comes back.
|
|
9405
|
+
*
|
|
9406
|
+
* Before this existed a peer flap was silently destructive: the routing
|
|
9407
|
+
* pipeline saw an agent that no healthy peer advertised, called it
|
|
9408
|
+
* `unknown_agent`, and dropped the message for good. The mesh recovers on
|
|
9409
|
+
* its own within a probe cycle (~60s), but nothing replayed what was lost
|
|
9410
|
+
* in between, so the person who @-mentioned the agent just watched it
|
|
9411
|
+
* ignore them. Deliberately in-memory: a daemon restart drops the queue,
|
|
9412
|
+
* which is the safe direction — a stale replay is worse than a miss.
|
|
9413
|
+
* Bounded by both age and count so a peer that never returns cannot grow
|
|
9414
|
+
* it without limit. */
|
|
9415
|
+
private deferredByPeer;
|
|
9416
|
+
private readonly MESH_DEFER_TTL_MS;
|
|
9417
|
+
private readonly MESH_DEFER_MAX_PER_PEER;
|
|
8496
9418
|
constructor(registry: AgentRegistry, config: DaemonConfig, hooks?: HookRegistry, log?: (...args: unknown[]) => void);
|
|
8497
9419
|
private loadDedupFromDisk;
|
|
8498
9420
|
private scheduleDedupSave;
|
|
@@ -8599,6 +9521,28 @@ declare class MessageRouter {
|
|
|
8599
9521
|
private attachUiExtras;
|
|
8600
9522
|
private adapterEdit;
|
|
8601
9523
|
private adapterReact;
|
|
9524
|
+
/**
|
|
9525
|
+
* Threads that have already been told about a mesh failure, keyed
|
|
9526
|
+
* `${channel}:${chatId}`. Cleared on the next success for that thread, so a
|
|
9527
|
+
* fresh outage notifies again but a burst inside one outage does not.
|
|
9528
|
+
*/
|
|
9529
|
+
private meshFailureNotified;
|
|
9530
|
+
/**
|
|
9531
|
+
* A mesh-routed task failed. React ❌ (as the agent, where the channel
|
|
9532
|
+
* supports identity) and — the FIRST time this thread fails — post one
|
|
9533
|
+
* short comment saying so.
|
|
9534
|
+
*
|
|
9535
|
+
* Why a comment at all: this used to be ❌-only, on the reasoning that
|
|
9536
|
+
* transient failures would pollute the thread. In practice a reporter who
|
|
9537
|
+
* @-mentions a bot and gets 👀 then silence assumes the bot is ignoring
|
|
9538
|
+
* them and keeps re-pinging — on acme/soylent#46 that was 9 mentions over
|
|
9539
|
+
* 74 minutes of upstream 529s, every one of them silently dropped. One
|
|
9540
|
+
* comment per outage is far cheaper than that. Nothing retries on its own,
|
|
9541
|
+
* so the text says plainly that a re-mention is what resumes it.
|
|
9542
|
+
*/
|
|
9543
|
+
private notifyMeshFailure;
|
|
9544
|
+
/** A mesh-routed task succeeded — re-arm the failure notice for this thread. */
|
|
9545
|
+
private clearMeshFailure;
|
|
8602
9546
|
private startTypingLoop;
|
|
8603
9547
|
private traceRoute;
|
|
8604
9548
|
private runRoutingPipeline;
|
|
@@ -8621,6 +9565,27 @@ declare class MessageRouter {
|
|
|
8621
9565
|
* Used when the channel adapter resolved the agent but it's not local.
|
|
8622
9566
|
*/
|
|
8623
9567
|
private handleViaMeshByAgentId;
|
|
9568
|
+
/**
|
|
9569
|
+
* Hold a message addressed to an agent on an unreachable peer.
|
|
9570
|
+
*
|
|
9571
|
+
* Deduped by the same `<channel>:<accountId>:<id>` key the inbound dedupe
|
|
9572
|
+
* uses, because the upstream that delivered the message often redelivers it
|
|
9573
|
+
* while the peer is still down (GitLab retries its webhook), and we do not
|
|
9574
|
+
* want the agent to answer the same mention twice on recovery.
|
|
9575
|
+
*/
|
|
9576
|
+
private deferForPeer;
|
|
9577
|
+
/**
|
|
9578
|
+
* Replay everything held for a peer that just came back.
|
|
9579
|
+
*
|
|
9580
|
+
* Runs sequentially: each entry is a real agent turn on the remote node,
|
|
9581
|
+
* and firing a backlog at it in parallel would spike a node that has only
|
|
9582
|
+
* just recovered. Entries older than the TTL are dropped rather than
|
|
9583
|
+
* answered — a reply to a 40-minute-old mention is noise.
|
|
9584
|
+
*/
|
|
9585
|
+
private replayDeferred;
|
|
9586
|
+
/** Held-message counts by peer — surfaced to the daemon for /health and
|
|
9587
|
+
* the dashboard so a growing backlog is visible rather than inferred. */
|
|
9588
|
+
getDeferredMeshCounts(): Record<string, number>;
|
|
8624
9589
|
/**
|
|
8625
9590
|
* Route to a specific named mesh peer by agentId.
|
|
8626
9591
|
* Used when preferNode is set on the incoming message.
|
|
@@ -8716,8 +9681,8 @@ declare class TelegramAdapter implements ChannelAdapter {
|
|
|
8716
9681
|
private groupStore;
|
|
8717
9682
|
/** Account IDs of bots currently active (member/administrator) in a group.
|
|
8718
9683
|
* Used by the router to pick the correct bot when an agent has multiple
|
|
8719
|
-
* Telegram accounts bound to it (e.g. pm-
|
|
8720
|
-
* @
|
|
9684
|
+
* Telegram accounts bound to it (e.g. pm-initech → both @acme_initech_bot and
|
|
9685
|
+
* @acme_pm_initech_bot) — the in-group account should win, otherwise messages
|
|
8721
9686
|
* to the absent bot get silently dropped by multi-account-dedup. */
|
|
8722
9687
|
getGroupBotAccounts(groupId: string): string[];
|
|
8723
9688
|
/**
|
|
@@ -9018,7 +9983,7 @@ declare class WhatsAppAdapter implements ChannelAdapter {
|
|
|
9018
9983
|
* Baileys' HistoryMessage shape to the channel-agnostic SeededMessage
|
|
9019
9984
|
* shape consumed by SessionStore on cold session create. Bounded by the
|
|
9020
9985
|
* caller's maxMessages/maxChars; fromMe → role:agent. The chatId is the
|
|
9021
|
-
* Baileys jid (e.g., "
|
|
9986
|
+
* Baileys jid (e.g., "1000000xxx@s.whatsapp.net" for DMs). */
|
|
9022
9987
|
seedHistory(chatId: string, opts: {
|
|
9023
9988
|
sinceISO?: string;
|
|
9024
9989
|
maxMessages: number;
|
|
@@ -9037,6 +10002,9 @@ interface CronJobState {
|
|
|
9037
10002
|
timezone: string;
|
|
9038
10003
|
agent: string;
|
|
9039
10004
|
prompt: string;
|
|
10005
|
+
/** Run this shell command instead of dispatching the agent. See the
|
|
10006
|
+
* cron schema in daemon/config.ts for why this exists. */
|
|
10007
|
+
command?: string;
|
|
9040
10008
|
timeout: number;
|
|
9041
10009
|
model?: string;
|
|
9042
10010
|
/** Soft output-length cap appended to the prompt at invocation time.
|
|
@@ -9088,6 +10056,23 @@ declare class CronScheduler {
|
|
|
9088
10056
|
setNotifyCallback(cb: CronNotifyCallback): void;
|
|
9089
10057
|
start(): Promise<void>;
|
|
9090
10058
|
stop(): Promise<void>;
|
|
10059
|
+
/** Node stores a timer delay in a 32-bit signed int. Anything larger is
|
|
10060
|
+
* silently coerced to 1ms — the timer fires IMMEDIATELY and only a
|
|
10061
|
+
* TimeoutOverflowWarning on stderr says why. ~24.8 days. */
|
|
10062
|
+
private static readonly MAX_TIMEOUT_MS;
|
|
10063
|
+
/**
|
|
10064
|
+
* Arm a timer for an absolute moment, however far away.
|
|
10065
|
+
*
|
|
10066
|
+
* A job scheduled further out than 24.8 days used to fire the instant
|
|
10067
|
+
* the daemon started, every restart, forever. A monthly accounting job
|
|
10068
|
+
* set for the 20th ran a month early on every deploy — and because the
|
|
10069
|
+
* only symptom was a warning about integers, it read as noise.
|
|
10070
|
+
*
|
|
10071
|
+
* Long waits are split into hops. Each hop recomputes the remaining time
|
|
10072
|
+
* from the TARGET rather than subtracting a constant, so the schedule
|
|
10073
|
+
* cannot drift across sleeps, clock adjustments or a slow hop.
|
|
10074
|
+
*/
|
|
10075
|
+
private armTimer;
|
|
9091
10076
|
private scheduleNext;
|
|
9092
10077
|
private scheduleRetry;
|
|
9093
10078
|
/**
|
|
@@ -9097,6 +10082,20 @@ declare class CronScheduler {
|
|
|
9097
10082
|
* until the 1c per-source promotion lands.
|
|
9098
10083
|
*/
|
|
9099
10084
|
private recordCronDecisionInLedger;
|
|
10085
|
+
/**
|
|
10086
|
+
* Run a cron whose work is a shell command, with no model involved.
|
|
10087
|
+
*
|
|
10088
|
+
* Failure handling deliberately mirrors the agent path — same
|
|
10089
|
+
* consecutiveErrors, same notify, same disable-after-three, same retry —
|
|
10090
|
+
* so an operator does not have to learn two sets of cron semantics
|
|
10091
|
+
* depending on how a job happens to be defined.
|
|
10092
|
+
*
|
|
10093
|
+
* Only the output TAIL is kept. The agent prompts this replaces all said
|
|
10094
|
+
* "report the exit code plus the last 10 lines", which was the right
|
|
10095
|
+
* instinct: a run record is read by a person after something broke, and
|
|
10096
|
+
* the end of the output is where the breakage is.
|
|
10097
|
+
*/
|
|
10098
|
+
private executeCommandJob;
|
|
9100
10099
|
private executeJob;
|
|
9101
10100
|
/**
|
|
9102
10101
|
* Detect cron jobs that should have fired while the daemon was down.
|
|
@@ -9139,6 +10138,15 @@ interface ProviderCapabilities {
|
|
|
9139
10138
|
vision: boolean;
|
|
9140
10139
|
thinking: boolean;
|
|
9141
10140
|
maxContext: number;
|
|
10141
|
+
/** Can be made to return a value matching a schema, rather than prose the
|
|
10142
|
+
* caller has to parse. False does NOT mean "no structured output" — it
|
|
10143
|
+
* means no *guarantee*, so callers fall back to JSON-in-text plus a
|
|
10144
|
+
* correction round. The claude-code CLI on an OAuth credential is the
|
|
10145
|
+
* case that matters: ClaudeCodeProvider.generateRaw() throws there. */
|
|
10146
|
+
structuredOutput: boolean;
|
|
10147
|
+
/** Exposes per-token logprobs. The only source of a probability that is
|
|
10148
|
+
* the model's own posterior rather than a number it wrote out. */
|
|
10149
|
+
logprobs: boolean;
|
|
9142
10150
|
}
|
|
9143
10151
|
declare const PROVIDER_CAPABILITIES: Record<string, ProviderCapabilities>;
|
|
9144
10152
|
/**
|