agentix-cli 0.206.0 → 0.207.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/dist/{App-JDW5V4HT.js → App-64NXDO3Q.js} +2 -2
- package/dist/{ChatApp-SNM2PORO.js → ChatApp-LZSQ4233.js} +2 -2
- package/dist/{absorb-eval-WDAV4AI2.js → absorb-eval-XG6QUTN6.js} +2 -2
- package/dist/{adapter-C47BTKT6.js → adapter-SDLSX2ZH.js} +2 -2
- package/dist/{agent-EVMKJXJO.js → agent-TYURILCF.js} +2 -2
- package/dist/{board-dashboard-EUWXJNDW.js → board-dashboard-MLNL4EZ7.js} +46 -31
- package/dist/board-dashboard-MLNL4EZ7.js.map +1 -0
- package/dist/{chunk-KRHVM26D.js → chunk-2GAMPUOB.js} +2 -2
- package/dist/{chunk-PQUK6XEW.js → chunk-2W23ZJCP.js} +2 -2
- package/dist/chunk-3AHYZLGE.js +115 -0
- package/dist/chunk-3AHYZLGE.js.map +1 -0
- package/dist/{chunk-QASIUKZJ.js → chunk-3ALELN73.js} +2 -2
- package/dist/{chunk-ERVJLPS4.js → chunk-3FUW6RXU.js} +2 -2
- package/dist/{chunk-DOO4MUTS.js → chunk-3MUWPMC2.js} +2 -2
- package/dist/{chunk-PQX2VJUA.js → chunk-5YJ5GQCJ.js} +45 -45
- package/dist/chunk-5YJ5GQCJ.js.map +1 -0
- package/dist/{chunk-5STGF4MI.js → chunk-6TZQZGRI.js} +94 -94
- package/dist/chunk-6TZQZGRI.js.map +1 -0
- package/dist/{chunk-DV42WUMD.js → chunk-7MRDQLOS.js} +2 -2
- package/dist/{chunk-PW3WG6JT.js → chunk-AECUZTRB.js} +2 -2
- package/dist/{chunk-JT5PIBCM.js → chunk-B34OLAAC.js} +36 -36
- package/dist/chunk-B34OLAAC.js.map +1 -0
- package/dist/{chunk-CZVCT5ZV.js → chunk-BBMGXNHU.js} +2 -2
- package/dist/{chunk-RXX4MYFL.js → chunk-CRSHJYZQ.js} +2 -2
- package/dist/{chunk-2VSK6FAR.js → chunk-DH7Z3HRC.js} +2 -2
- package/dist/{chunk-UGRMFQAG.js → chunk-EOQNFLFJ.js} +2 -2
- package/dist/{chunk-TH2W2545.js → chunk-GJOKXP5D.js} +2 -2
- package/dist/chunk-KEUW6YLL.js +2 -0
- package/dist/{chunk-VJ5HC63R.js.map → chunk-KEUW6YLL.js.map} +1 -1
- package/dist/{chunk-V5LRR5I5.js → chunk-LTLH2CHG.js} +20 -14
- package/dist/chunk-LTLH2CHG.js.map +1 -0
- package/dist/chunk-LY4G7PCW.js +2 -0
- package/dist/chunk-LY4G7PCW.js.map +1 -0
- package/dist/{chunk-EJFPXG6I.js → chunk-NKSQNQ5V.js} +61 -61
- package/dist/chunk-NKSQNQ5V.js.map +1 -0
- package/dist/{chunk-PTZNM2JU.js → chunk-PSLSU6HC.js} +2 -2
- package/dist/{chunk-2P3SHT5I.js → chunk-RHXBLKBW.js} +2 -2
- package/dist/{chunk-CXFVIDJV.js → chunk-RWZGW2GQ.js} +2 -2
- package/dist/{chunk-IU63JGY3.js → chunk-TYKEHZZA.js} +2 -2
- package/dist/{chunk-USFOOYPM.js → chunk-UF3D5LFH.js} +2 -2
- package/dist/{chunk-IDGEDPRJ.js → chunk-VIWN3CXS.js} +3 -3
- package/dist/chunk-VIWN3CXS.js.map +1 -0
- package/dist/{chunk-245IOYDJ.js → chunk-VKEL4XNO.js} +2 -2
- package/dist/{chunk-WJMYBRM5.js → chunk-XEMW37IV.js} +2 -2
- package/dist/{chunk-MF46BC7J.js → chunk-XGCSWSVD.js} +2 -2
- package/dist/{chunk-BED4R5CS.js → chunk-XL7UWG36.js} +6 -6
- package/dist/{chunk-BED4R5CS.js.map → chunk-XL7UWG36.js.map} +1 -1
- package/dist/{chunk-DUCYRNCT.js → chunk-YLKEUO6K.js} +20 -20
- package/dist/chunk-YLKEUO6K.js.map +1 -0
- package/dist/{chunk-3B5HSNOF.js → chunk-ZEJ2ZG6K.js} +335 -327
- package/dist/chunk-ZEJ2ZG6K.js.map +1 -0
- package/dist/{chunk-SKCOIP5R.js → chunk-ZJXJN6GM.js} +3 -3
- package/dist/{chunk-OLKYIKAZ.js → chunk-ZT32DUC7.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{client-WN7YI7DE.js → client-HC5UIRHC.js} +2 -2
- package/dist/{config-QUXKGIZX.js → config-FUB5TUCM.js} +2 -2
- package/dist/config-mutate-5WSQJAJO.js +2 -0
- package/dist/{config-mutator-OLLQR3ZD.js → config-mutator-RALUVF77.js} +2 -2
- package/dist/{contributions-LL7B4BP3.js → contributions-SSQ2H2H6.js} +2 -2
- package/dist/doctor-FAC34AQ6.js +2 -0
- package/dist/{facts-ALJBF7IA.js → facts-XGZWX6CR.js} +2 -2
- package/dist/{follow-up-tool-I2HTKMP4.js → follow-up-tool-JCJSBAJF.js} +2 -2
- package/dist/{grants-2MNWGCSH.js → grants-TWDH3Z4K.js} +2 -2
- package/dist/hub-YAEE5GFW.js +2 -0
- package/dist/index.d.ts +146 -6
- package/dist/index.js +1 -1
- package/dist/{org-tool-JCGGJJU6.js → org-tool-YP256FUE.js} +2 -2
- package/dist/{program-NCFW4EEP.js → program-3I7GFFDP.js} +86 -86
- package/dist/{promote-NSPUPPHB.js → promote-NJWI2KUT.js} +2 -2
- package/dist/{query-VW63IHDI.js → query-O5EWN3YT.js} +2 -2
- package/dist/{query-settings-RS7DJI4H.js → query-settings-VKOJGJGC.js} +2 -2
- package/dist/registry-W77Q7ZGZ.js +2 -0
- package/dist/{request-planner-HZWQIRZO.js → request-planner-UY46HBKG.js} +2 -2
- package/dist/{review-candidates-2TXOUASP.js → review-candidates-A4BTJYML.js} +2 -2
- package/dist/rotation-memo-store-ZH6254YR.js +2 -0
- package/dist/rotation-memo-store-ZH6254YR.js.map +1 -0
- package/dist/{routing-ZV4VSZDV.js → routing-THT4U4KK.js} +2 -2
- package/dist/schedule-tool-FVBUHIDC.js +2 -0
- package/dist/{scheduler-SAID6RKQ.js → scheduler-MHTDA3ZS.js} +2 -2
- package/dist/{seat-XHBWBSTS.js → seat-NW3JTDGK.js} +2 -2
- package/dist/{select-QUCTTAH3.js → select-4DILJ2XW.js} +2 -2
- package/dist/{set-enabled-CGMXLFC6.js → set-enabled-DKQTH2PC.js} +2 -2
- package/dist/{sprint-tool-SWRYSX3Q.js → sprint-tool-43TSRPK4.js} +2 -2
- package/dist/{tool-MMH2JNP7.js → tool-7MI3GK2K.js} +2 -2
- package/dist/{tool-ELGOVIM5.js → tool-JYSRWVNB.js} +2 -2
- package/dist/{tool-6G63ZQW4.js → tool-NA7ZOWD5.js} +2 -2
- package/dist/{tool-DA25L4ND.js → tool-PQZ7NURW.js} +2 -2
- package/dist/{wiki-4ZL4QXA7.js → wiki-NR2KS3AT.js} +2 -2
- package/dist/wiki-enrich-EB2EOVDJ.js +2 -0
- package/dist/workspace-setup-GTSXWYU4.js +2 -0
- package/package.json +1 -1
- package/dist/board-dashboard-EUWXJNDW.js.map +0 -1
- package/dist/chunk-36X7D4JA.js +0 -2
- package/dist/chunk-36X7D4JA.js.map +0 -1
- package/dist/chunk-3B5HSNOF.js.map +0 -1
- package/dist/chunk-5STGF4MI.js.map +0 -1
- package/dist/chunk-DUCYRNCT.js.map +0 -1
- package/dist/chunk-EJFPXG6I.js.map +0 -1
- package/dist/chunk-IDGEDPRJ.js.map +0 -1
- package/dist/chunk-IFNXMUEG.js +0 -115
- package/dist/chunk-IFNXMUEG.js.map +0 -1
- package/dist/chunk-JT5PIBCM.js.map +0 -1
- package/dist/chunk-PQX2VJUA.js.map +0 -1
- package/dist/chunk-V5LRR5I5.js.map +0 -1
- package/dist/chunk-VJ5HC63R.js +0 -2
- package/dist/config-mutate-HJH24ITC.js +0 -2
- package/dist/doctor-X75KLAFA.js +0 -2
- package/dist/hub-7ASBN76I.js +0 -2
- package/dist/registry-6KREAROB.js +0 -2
- package/dist/rotation-memo-store-WMDI7NND.js +0 -2
- package/dist/rotation-memo-store-WMDI7NND.js.map +0 -1
- package/dist/schedule-tool-D357NLXS.js +0 -2
- package/dist/wiki-enrich-N5MUKDVW.js +0 -2
- package/dist/workspace-setup-QXFJRNSK.js +0 -2
- /package/dist/{App-JDW5V4HT.js.map → App-64NXDO3Q.js.map} +0 -0
- /package/dist/{ChatApp-SNM2PORO.js.map → ChatApp-LZSQ4233.js.map} +0 -0
- /package/dist/{absorb-eval-WDAV4AI2.js.map → absorb-eval-XG6QUTN6.js.map} +0 -0
- /package/dist/{adapter-C47BTKT6.js.map → adapter-SDLSX2ZH.js.map} +0 -0
- /package/dist/{agent-EVMKJXJO.js.map → agent-TYURILCF.js.map} +0 -0
- /package/dist/{chunk-KRHVM26D.js.map → chunk-2GAMPUOB.js.map} +0 -0
- /package/dist/{chunk-PQUK6XEW.js.map → chunk-2W23ZJCP.js.map} +0 -0
- /package/dist/{chunk-QASIUKZJ.js.map → chunk-3ALELN73.js.map} +0 -0
- /package/dist/{chunk-ERVJLPS4.js.map → chunk-3FUW6RXU.js.map} +0 -0
- /package/dist/{chunk-DOO4MUTS.js.map → chunk-3MUWPMC2.js.map} +0 -0
- /package/dist/{chunk-DV42WUMD.js.map → chunk-7MRDQLOS.js.map} +0 -0
- /package/dist/{chunk-PW3WG6JT.js.map → chunk-AECUZTRB.js.map} +0 -0
- /package/dist/{chunk-CZVCT5ZV.js.map → chunk-BBMGXNHU.js.map} +0 -0
- /package/dist/{chunk-RXX4MYFL.js.map → chunk-CRSHJYZQ.js.map} +0 -0
- /package/dist/{chunk-2VSK6FAR.js.map → chunk-DH7Z3HRC.js.map} +0 -0
- /package/dist/{chunk-UGRMFQAG.js.map → chunk-EOQNFLFJ.js.map} +0 -0
- /package/dist/{chunk-TH2W2545.js.map → chunk-GJOKXP5D.js.map} +0 -0
- /package/dist/{chunk-PTZNM2JU.js.map → chunk-PSLSU6HC.js.map} +0 -0
- /package/dist/{chunk-2P3SHT5I.js.map → chunk-RHXBLKBW.js.map} +0 -0
- /package/dist/{chunk-CXFVIDJV.js.map → chunk-RWZGW2GQ.js.map} +0 -0
- /package/dist/{chunk-IU63JGY3.js.map → chunk-TYKEHZZA.js.map} +0 -0
- /package/dist/{chunk-USFOOYPM.js.map → chunk-UF3D5LFH.js.map} +0 -0
- /package/dist/{chunk-245IOYDJ.js.map → chunk-VKEL4XNO.js.map} +0 -0
- /package/dist/{chunk-WJMYBRM5.js.map → chunk-XEMW37IV.js.map} +0 -0
- /package/dist/{chunk-MF46BC7J.js.map → chunk-XGCSWSVD.js.map} +0 -0
- /package/dist/{chunk-SKCOIP5R.js.map → chunk-ZJXJN6GM.js.map} +0 -0
- /package/dist/{chunk-OLKYIKAZ.js.map → chunk-ZT32DUC7.js.map} +0 -0
- /package/dist/{client-WN7YI7DE.js.map → client-HC5UIRHC.js.map} +0 -0
- /package/dist/{config-QUXKGIZX.js.map → config-FUB5TUCM.js.map} +0 -0
- /package/dist/{config-mutate-HJH24ITC.js.map → config-mutate-5WSQJAJO.js.map} +0 -0
- /package/dist/{config-mutator-OLLQR3ZD.js.map → config-mutator-RALUVF77.js.map} +0 -0
- /package/dist/{contributions-LL7B4BP3.js.map → contributions-SSQ2H2H6.js.map} +0 -0
- /package/dist/{doctor-X75KLAFA.js.map → doctor-FAC34AQ6.js.map} +0 -0
- /package/dist/{facts-ALJBF7IA.js.map → facts-XGZWX6CR.js.map} +0 -0
- /package/dist/{follow-up-tool-I2HTKMP4.js.map → follow-up-tool-JCJSBAJF.js.map} +0 -0
- /package/dist/{grants-2MNWGCSH.js.map → grants-TWDH3Z4K.js.map} +0 -0
- /package/dist/{hub-7ASBN76I.js.map → hub-YAEE5GFW.js.map} +0 -0
- /package/dist/{org-tool-JCGGJJU6.js.map → org-tool-YP256FUE.js.map} +0 -0
- /package/dist/{program-NCFW4EEP.js.map → program-3I7GFFDP.js.map} +0 -0
- /package/dist/{promote-NSPUPPHB.js.map → promote-NJWI2KUT.js.map} +0 -0
- /package/dist/{query-VW63IHDI.js.map → query-O5EWN3YT.js.map} +0 -0
- /package/dist/{query-settings-RS7DJI4H.js.map → query-settings-VKOJGJGC.js.map} +0 -0
- /package/dist/{registry-6KREAROB.js.map → registry-W77Q7ZGZ.js.map} +0 -0
- /package/dist/{request-planner-HZWQIRZO.js.map → request-planner-UY46HBKG.js.map} +0 -0
- /package/dist/{review-candidates-2TXOUASP.js.map → review-candidates-A4BTJYML.js.map} +0 -0
- /package/dist/{routing-ZV4VSZDV.js.map → routing-THT4U4KK.js.map} +0 -0
- /package/dist/{schedule-tool-D357NLXS.js.map → schedule-tool-FVBUHIDC.js.map} +0 -0
- /package/dist/{scheduler-SAID6RKQ.js.map → scheduler-MHTDA3ZS.js.map} +0 -0
- /package/dist/{seat-XHBWBSTS.js.map → seat-NW3JTDGK.js.map} +0 -0
- /package/dist/{select-QUCTTAH3.js.map → select-4DILJ2XW.js.map} +0 -0
- /package/dist/{set-enabled-CGMXLFC6.js.map → set-enabled-DKQTH2PC.js.map} +0 -0
- /package/dist/{sprint-tool-SWRYSX3Q.js.map → sprint-tool-43TSRPK4.js.map} +0 -0
- /package/dist/{tool-MMH2JNP7.js.map → tool-7MI3GK2K.js.map} +0 -0
- /package/dist/{tool-ELGOVIM5.js.map → tool-JYSRWVNB.js.map} +0 -0
- /package/dist/{tool-6G63ZQW4.js.map → tool-NA7ZOWD5.js.map} +0 -0
- /package/dist/{tool-DA25L4ND.js.map → tool-PQZ7NURW.js.map} +0 -0
- /package/dist/{wiki-4ZL4QXA7.js.map → wiki-NR2KS3AT.js.map} +0 -0
- /package/dist/{wiki-enrich-N5MUKDVW.js.map → wiki-enrich-EB2EOVDJ.js.map} +0 -0
- /package/dist/{workspace-setup-QXFJRNSK.js.map → workspace-setup-GTSXWYU4.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -616,6 +616,8 @@ interface McpStdioSpec {
|
|
|
616
616
|
env?: Record<string, string>;
|
|
617
617
|
/** Only these tools are listed and callable (see mcp-policy.ts). */
|
|
618
618
|
allowTools?: string[];
|
|
619
|
+
/** Listed tools that skip the write card (see mcp-policy.ts). */
|
|
620
|
+
readTools?: string[];
|
|
619
621
|
}
|
|
620
622
|
/** HTTP MCP server (Streamable HTTP transport) — POST JSON-RPC bodies to
|
|
621
623
|
* `url`, server may answer as `application/json` or stream as
|
|
@@ -630,9 +632,20 @@ interface McpHttpSpec {
|
|
|
630
632
|
headersEnv?: Record<string, string>;
|
|
631
633
|
/** Only these tools are listed and callable (see mcp-policy.ts). */
|
|
632
634
|
allowTools?: string[];
|
|
635
|
+
/** Listed tools that skip the write card (see mcp-policy.ts). */
|
|
636
|
+
readTools?: string[];
|
|
633
637
|
}
|
|
634
638
|
type McpServerSpec = McpStdioSpec | McpHttpSpec;
|
|
635
639
|
type McpServerMap = Record<string, McpServerSpec>;
|
|
640
|
+
/** Boot each declared server, list its tools, and return a pool that
|
|
641
|
+
* the orchestrator can drop into runAgenticLoop. A server that fails
|
|
642
|
+
* to initialize is dropped from the catalog (with a debug log) so one
|
|
643
|
+
* broken entry can't disable the whole tier. */
|
|
644
|
+
interface McpPoolOptions {
|
|
645
|
+
/** Asked before every call; a string refuses the call with that reason.
|
|
646
|
+
* The orchestrator tier passes the write-tool card here (#1736). */
|
|
647
|
+
beforeCall?: (name: string, input: Record<string, unknown>) => Promise<string | null>;
|
|
648
|
+
}
|
|
636
649
|
|
|
637
650
|
interface AgentContext {
|
|
638
651
|
techStack: TechStack;
|
|
@@ -693,6 +706,9 @@ interface GenerateOptions {
|
|
|
693
706
|
* src/agents/runtime.ts — CLI-backed tiers (claude-code, codex-cli)
|
|
694
707
|
* load their own `.mcp.json` natively and ignore this. */
|
|
695
708
|
mcpServers?: McpServerMap;
|
|
709
|
+
/** Asked before each MCP tool call; a string refuses it with that
|
|
710
|
+
* reason. The runtime wires the write-tool card here (#1736). */
|
|
711
|
+
beforeMcpCall?: McpPoolOptions["beforeCall"];
|
|
696
712
|
}
|
|
697
713
|
interface GenerateResult {
|
|
698
714
|
files: WriteResult;
|
|
@@ -1542,16 +1558,21 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1542
1558
|
* `${NAME}` placeholder, never as the secret. */
|
|
1543
1559
|
headersEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1544
1560
|
allowTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1561
|
+
/** Listed tools that only read though their names do not say so; they
|
|
1562
|
+
* skip the write confirmation card (#1736). */
|
|
1563
|
+
readTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1545
1564
|
}, "strip", z.ZodTypeAny, {
|
|
1546
1565
|
type: "http";
|
|
1547
1566
|
url: string;
|
|
1548
1567
|
allowTools?: string[] | undefined;
|
|
1568
|
+
readTools?: string[] | undefined;
|
|
1549
1569
|
headers?: Record<string, string> | undefined;
|
|
1550
1570
|
headersEnv?: Record<string, string> | undefined;
|
|
1551
1571
|
}, {
|
|
1552
1572
|
type: "http";
|
|
1553
1573
|
url: string;
|
|
1554
1574
|
allowTools?: string[] | undefined;
|
|
1575
|
+
readTools?: string[] | undefined;
|
|
1555
1576
|
headers?: Record<string, string> | undefined;
|
|
1556
1577
|
headersEnv?: Record<string, string> | undefined;
|
|
1557
1578
|
}>, z.ZodObject<{
|
|
@@ -1560,28 +1581,35 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1560
1581
|
args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1561
1582
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1562
1583
|
allowTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1584
|
+
/** Listed tools that only read though their names do not say so; they
|
|
1585
|
+
* skip the write confirmation card (#1736). */
|
|
1586
|
+
readTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1563
1587
|
}, "strip", z.ZodTypeAny, {
|
|
1564
1588
|
command: string;
|
|
1565
1589
|
args: string[];
|
|
1566
1590
|
type?: "stdio" | undefined;
|
|
1567
1591
|
env?: Record<string, string> | undefined;
|
|
1568
1592
|
allowTools?: string[] | undefined;
|
|
1593
|
+
readTools?: string[] | undefined;
|
|
1569
1594
|
}, {
|
|
1570
1595
|
command: string;
|
|
1571
1596
|
type?: "stdio" | undefined;
|
|
1572
1597
|
env?: Record<string, string> | undefined;
|
|
1573
1598
|
args?: string[] | undefined;
|
|
1574
1599
|
allowTools?: string[] | undefined;
|
|
1600
|
+
readTools?: string[] | undefined;
|
|
1575
1601
|
}>]>>>, Record<string, {
|
|
1576
1602
|
command: string;
|
|
1577
1603
|
args: string[];
|
|
1578
1604
|
type?: "stdio" | undefined;
|
|
1579
1605
|
env?: Record<string, string> | undefined;
|
|
1580
1606
|
allowTools?: string[] | undefined;
|
|
1607
|
+
readTools?: string[] | undefined;
|
|
1581
1608
|
} | {
|
|
1582
1609
|
type: "http";
|
|
1583
1610
|
url: string;
|
|
1584
1611
|
allowTools?: string[] | undefined;
|
|
1612
|
+
readTools?: string[] | undefined;
|
|
1585
1613
|
headers?: Record<string, string> | undefined;
|
|
1586
1614
|
headersEnv?: Record<string, string> | undefined;
|
|
1587
1615
|
}> | undefined, Record<string, {
|
|
@@ -1590,10 +1618,12 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1590
1618
|
env?: Record<string, string> | undefined;
|
|
1591
1619
|
args?: string[] | undefined;
|
|
1592
1620
|
allowTools?: string[] | undefined;
|
|
1621
|
+
readTools?: string[] | undefined;
|
|
1593
1622
|
} | {
|
|
1594
1623
|
type: "http";
|
|
1595
1624
|
url: string;
|
|
1596
1625
|
allowTools?: string[] | undefined;
|
|
1626
|
+
readTools?: string[] | undefined;
|
|
1597
1627
|
headers?: Record<string, string> | undefined;
|
|
1598
1628
|
headersEnv?: Record<string, string> | undefined;
|
|
1599
1629
|
}> | undefined>;
|
|
@@ -2150,10 +2180,12 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
2150
2180
|
type?: "stdio" | undefined;
|
|
2151
2181
|
env?: Record<string, string> | undefined;
|
|
2152
2182
|
allowTools?: string[] | undefined;
|
|
2183
|
+
readTools?: string[] | undefined;
|
|
2153
2184
|
} | {
|
|
2154
2185
|
type: "http";
|
|
2155
2186
|
url: string;
|
|
2156
2187
|
allowTools?: string[] | undefined;
|
|
2188
|
+
readTools?: string[] | undefined;
|
|
2157
2189
|
headers?: Record<string, string> | undefined;
|
|
2158
2190
|
headersEnv?: Record<string, string> | undefined;
|
|
2159
2191
|
}> | undefined;
|
|
@@ -2212,10 +2244,12 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
2212
2244
|
env?: Record<string, string> | undefined;
|
|
2213
2245
|
args?: string[] | undefined;
|
|
2214
2246
|
allowTools?: string[] | undefined;
|
|
2247
|
+
readTools?: string[] | undefined;
|
|
2215
2248
|
} | {
|
|
2216
2249
|
type: "http";
|
|
2217
2250
|
url: string;
|
|
2218
2251
|
allowTools?: string[] | undefined;
|
|
2252
|
+
readTools?: string[] | undefined;
|
|
2219
2253
|
headers?: Record<string, string> | undefined;
|
|
2220
2254
|
headersEnv?: Record<string, string> | undefined;
|
|
2221
2255
|
}> | undefined;
|
|
@@ -2781,16 +2815,21 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2781
2815
|
* `${NAME}` placeholder, never as the secret. */
|
|
2782
2816
|
headersEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2783
2817
|
allowTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2818
|
+
/** Listed tools that only read though their names do not say so; they
|
|
2819
|
+
* skip the write confirmation card (#1736). */
|
|
2820
|
+
readTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2784
2821
|
}, "strip", z.ZodTypeAny, {
|
|
2785
2822
|
type: "http";
|
|
2786
2823
|
url: string;
|
|
2787
2824
|
allowTools?: string[] | undefined;
|
|
2825
|
+
readTools?: string[] | undefined;
|
|
2788
2826
|
headers?: Record<string, string> | undefined;
|
|
2789
2827
|
headersEnv?: Record<string, string> | undefined;
|
|
2790
2828
|
}, {
|
|
2791
2829
|
type: "http";
|
|
2792
2830
|
url: string;
|
|
2793
2831
|
allowTools?: string[] | undefined;
|
|
2832
|
+
readTools?: string[] | undefined;
|
|
2794
2833
|
headers?: Record<string, string> | undefined;
|
|
2795
2834
|
headersEnv?: Record<string, string> | undefined;
|
|
2796
2835
|
}>, z.ZodObject<{
|
|
@@ -2799,28 +2838,35 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2799
2838
|
args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
2800
2839
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2801
2840
|
allowTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2841
|
+
/** Listed tools that only read though their names do not say so; they
|
|
2842
|
+
* skip the write confirmation card (#1736). */
|
|
2843
|
+
readTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2802
2844
|
}, "strip", z.ZodTypeAny, {
|
|
2803
2845
|
command: string;
|
|
2804
2846
|
args: string[];
|
|
2805
2847
|
type?: "stdio" | undefined;
|
|
2806
2848
|
env?: Record<string, string> | undefined;
|
|
2807
2849
|
allowTools?: string[] | undefined;
|
|
2850
|
+
readTools?: string[] | undefined;
|
|
2808
2851
|
}, {
|
|
2809
2852
|
command: string;
|
|
2810
2853
|
type?: "stdio" | undefined;
|
|
2811
2854
|
env?: Record<string, string> | undefined;
|
|
2812
2855
|
args?: string[] | undefined;
|
|
2813
2856
|
allowTools?: string[] | undefined;
|
|
2857
|
+
readTools?: string[] | undefined;
|
|
2814
2858
|
}>]>>>, Record<string, {
|
|
2815
2859
|
command: string;
|
|
2816
2860
|
args: string[];
|
|
2817
2861
|
type?: "stdio" | undefined;
|
|
2818
2862
|
env?: Record<string, string> | undefined;
|
|
2819
2863
|
allowTools?: string[] | undefined;
|
|
2864
|
+
readTools?: string[] | undefined;
|
|
2820
2865
|
} | {
|
|
2821
2866
|
type: "http";
|
|
2822
2867
|
url: string;
|
|
2823
2868
|
allowTools?: string[] | undefined;
|
|
2869
|
+
readTools?: string[] | undefined;
|
|
2824
2870
|
headers?: Record<string, string> | undefined;
|
|
2825
2871
|
headersEnv?: Record<string, string> | undefined;
|
|
2826
2872
|
}> | undefined, Record<string, {
|
|
@@ -2829,10 +2875,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2829
2875
|
env?: Record<string, string> | undefined;
|
|
2830
2876
|
args?: string[] | undefined;
|
|
2831
2877
|
allowTools?: string[] | undefined;
|
|
2878
|
+
readTools?: string[] | undefined;
|
|
2832
2879
|
} | {
|
|
2833
2880
|
type: "http";
|
|
2834
2881
|
url: string;
|
|
2835
2882
|
allowTools?: string[] | undefined;
|
|
2883
|
+
readTools?: string[] | undefined;
|
|
2836
2884
|
headers?: Record<string, string> | undefined;
|
|
2837
2885
|
headersEnv?: Record<string, string> | undefined;
|
|
2838
2886
|
}> | undefined>;
|
|
@@ -3389,10 +3437,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3389
3437
|
type?: "stdio" | undefined;
|
|
3390
3438
|
env?: Record<string, string> | undefined;
|
|
3391
3439
|
allowTools?: string[] | undefined;
|
|
3440
|
+
readTools?: string[] | undefined;
|
|
3392
3441
|
} | {
|
|
3393
3442
|
type: "http";
|
|
3394
3443
|
url: string;
|
|
3395
3444
|
allowTools?: string[] | undefined;
|
|
3445
|
+
readTools?: string[] | undefined;
|
|
3396
3446
|
headers?: Record<string, string> | undefined;
|
|
3397
3447
|
headersEnv?: Record<string, string> | undefined;
|
|
3398
3448
|
}> | undefined;
|
|
@@ -3451,10 +3501,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3451
3501
|
env?: Record<string, string> | undefined;
|
|
3452
3502
|
args?: string[] | undefined;
|
|
3453
3503
|
allowTools?: string[] | undefined;
|
|
3504
|
+
readTools?: string[] | undefined;
|
|
3454
3505
|
} | {
|
|
3455
3506
|
type: "http";
|
|
3456
3507
|
url: string;
|
|
3457
3508
|
allowTools?: string[] | undefined;
|
|
3509
|
+
readTools?: string[] | undefined;
|
|
3458
3510
|
headers?: Record<string, string> | undefined;
|
|
3459
3511
|
headersEnv?: Record<string, string> | undefined;
|
|
3460
3512
|
}> | undefined;
|
|
@@ -7246,6 +7298,27 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7246
7298
|
agents?: string[] | undefined;
|
|
7247
7299
|
channels?: string[] | undefined;
|
|
7248
7300
|
}>>>;
|
|
7301
|
+
/** While runs wait on memory or swap, close idle sessions a few at a
|
|
7302
|
+
* time, ahead of processPool.maxIdleSeconds. */
|
|
7303
|
+
closeIdle: z.ZodDefault<z.ZodObject<{
|
|
7304
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
7305
|
+
/** Most sessions closed per round. */
|
|
7306
|
+
maxPerRound: z.ZodDefault<z.ZodNumber>;
|
|
7307
|
+
/** Never close a session quiet for less than this. */
|
|
7308
|
+
minQuietSeconds: z.ZodDefault<z.ZodNumber>;
|
|
7309
|
+
/** Seconds between rounds, so the next reading shows the last one. */
|
|
7310
|
+
settleSeconds: z.ZodDefault<z.ZodNumber>;
|
|
7311
|
+
}, "strip", z.ZodTypeAny, {
|
|
7312
|
+
enabled: boolean;
|
|
7313
|
+
maxPerRound: number;
|
|
7314
|
+
minQuietSeconds: number;
|
|
7315
|
+
settleSeconds: number;
|
|
7316
|
+
}, {
|
|
7317
|
+
enabled?: boolean | undefined;
|
|
7318
|
+
maxPerRound?: number | undefined;
|
|
7319
|
+
minQuietSeconds?: number | undefined;
|
|
7320
|
+
settleSeconds?: number | undefined;
|
|
7321
|
+
}>>;
|
|
7249
7322
|
/** Queue order: owner > critical > normal > background, then age. */
|
|
7250
7323
|
priority: z.ZodDefault<z.ZodObject<{
|
|
7251
7324
|
ownerChannels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -7296,6 +7369,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7296
7369
|
agents?: string[] | undefined;
|
|
7297
7370
|
channels?: string[] | undefined;
|
|
7298
7371
|
}>;
|
|
7372
|
+
closeIdle: {
|
|
7373
|
+
enabled: boolean;
|
|
7374
|
+
maxPerRound: number;
|
|
7375
|
+
minQuietSeconds: number;
|
|
7376
|
+
settleSeconds: number;
|
|
7377
|
+
};
|
|
7299
7378
|
}, {
|
|
7300
7379
|
enabled?: boolean | undefined;
|
|
7301
7380
|
priority?: {
|
|
@@ -7328,6 +7407,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7328
7407
|
agents?: string[] | undefined;
|
|
7329
7408
|
channels?: string[] | undefined;
|
|
7330
7409
|
}> | undefined;
|
|
7410
|
+
closeIdle?: {
|
|
7411
|
+
enabled?: boolean | undefined;
|
|
7412
|
+
maxPerRound?: number | undefined;
|
|
7413
|
+
minQuietSeconds?: number | undefined;
|
|
7414
|
+
settleSeconds?: number | undefined;
|
|
7415
|
+
} | undefined;
|
|
7331
7416
|
}>>;
|
|
7332
7417
|
/** What the node reports about its own environment (src/node-env,
|
|
7333
7418
|
* #1531): GET /api/node, `agentx node` and the MCP tool `agentx_node`. */
|
|
@@ -8759,16 +8844,23 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
8759
8844
|
* agent's own chat, and a message the callee writes back to it lands
|
|
8760
8845
|
* there too. Off: such a send is queued and its answer only logged. */
|
|
8761
8846
|
callbackSends: z.ZodDefault<z.ZodBoolean>;
|
|
8847
|
+
/** How long a finished delegation's answer waits for the other ones
|
|
8848
|
+
* still running from the same chat, so the asking agent gets them in
|
|
8849
|
+
* one turn instead of one turn each (#1749). 0: only answers that
|
|
8850
|
+
* are already in are joined. */
|
|
8851
|
+
coalesceSeconds: z.ZodDefault<z.ZodNumber>;
|
|
8762
8852
|
}, "strip", z.ZodTypeAny, {
|
|
8763
8853
|
asyncWhenHuman: boolean;
|
|
8764
8854
|
timeoutMinutes: number;
|
|
8765
8855
|
requeueRelayOnRestart: boolean;
|
|
8766
8856
|
callbackSends: boolean;
|
|
8857
|
+
coalesceSeconds: number;
|
|
8767
8858
|
}, {
|
|
8768
8859
|
asyncWhenHuman?: boolean | undefined;
|
|
8769
8860
|
timeoutMinutes?: number | undefined;
|
|
8770
8861
|
requeueRelayOnRestart?: boolean | undefined;
|
|
8771
8862
|
callbackSends?: boolean | undefined;
|
|
8863
|
+
coalesceSeconds?: number | undefined;
|
|
8772
8864
|
}>>;
|
|
8773
8865
|
}, "strip", z.ZodTypeAny, {
|
|
8774
8866
|
enabled: boolean;
|
|
@@ -8777,6 +8869,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
8777
8869
|
timeoutMinutes: number;
|
|
8778
8870
|
requeueRelayOnRestart: boolean;
|
|
8779
8871
|
callbackSends: boolean;
|
|
8872
|
+
coalesceSeconds: number;
|
|
8780
8873
|
};
|
|
8781
8874
|
peers: {
|
|
8782
8875
|
name: string;
|
|
@@ -8804,6 +8897,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
8804
8897
|
timeoutMinutes?: number | undefined;
|
|
8805
8898
|
requeueRelayOnRestart?: boolean | undefined;
|
|
8806
8899
|
callbackSends?: boolean | undefined;
|
|
8900
|
+
coalesceSeconds?: number | undefined;
|
|
8807
8901
|
} | undefined;
|
|
8808
8902
|
peers?: {
|
|
8809
8903
|
name: string;
|
|
@@ -9864,11 +9958,6 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
9864
9958
|
draftAgent: z.ZodOptional<z.ZodString>;
|
|
9865
9959
|
wall: z.ZodDefault<z.ZodObject<{
|
|
9866
9960
|
rhythmHours: z.ZodOptional<z.ZodNumber>;
|
|
9867
|
-
/**
|
|
9868
|
-
* Canonical kind list — for autocomplete + doctor validation. Open string
|
|
9869
|
-
* schema so new services drop in without a bump; doctor warns when a kind
|
|
9870
|
-
* is outside this list.
|
|
9871
|
-
*/
|
|
9872
9961
|
projects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
9873
9962
|
name: z.ZodString;
|
|
9874
9963
|
repos: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -11330,10 +11419,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
11330
11419
|
type?: "stdio" | undefined;
|
|
11331
11420
|
env?: Record<string, string> | undefined;
|
|
11332
11421
|
allowTools?: string[] | undefined;
|
|
11422
|
+
readTools?: string[] | undefined;
|
|
11333
11423
|
} | {
|
|
11334
11424
|
type: "http";
|
|
11335
11425
|
url: string;
|
|
11336
11426
|
allowTools?: string[] | undefined;
|
|
11427
|
+
readTools?: string[] | undefined;
|
|
11337
11428
|
headers?: Record<string, string> | undefined;
|
|
11338
11429
|
headersEnv?: Record<string, string> | undefined;
|
|
11339
11430
|
}> | undefined;
|
|
@@ -11372,6 +11463,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
11372
11463
|
timeoutMinutes: number;
|
|
11373
11464
|
requeueRelayOnRestart: boolean;
|
|
11374
11465
|
callbackSends: boolean;
|
|
11466
|
+
coalesceSeconds: number;
|
|
11375
11467
|
};
|
|
11376
11468
|
peers: {
|
|
11377
11469
|
name: string;
|
|
@@ -12275,6 +12367,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
12275
12367
|
agents?: string[] | undefined;
|
|
12276
12368
|
channels?: string[] | undefined;
|
|
12277
12369
|
}>;
|
|
12370
|
+
closeIdle: {
|
|
12371
|
+
enabled: boolean;
|
|
12372
|
+
maxPerRound: number;
|
|
12373
|
+
minQuietSeconds: number;
|
|
12374
|
+
settleSeconds: number;
|
|
12375
|
+
};
|
|
12278
12376
|
};
|
|
12279
12377
|
environment: {
|
|
12280
12378
|
tools: (string | {
|
|
@@ -12668,10 +12766,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
12668
12766
|
env?: Record<string, string> | undefined;
|
|
12669
12767
|
args?: string[] | undefined;
|
|
12670
12768
|
allowTools?: string[] | undefined;
|
|
12769
|
+
readTools?: string[] | undefined;
|
|
12671
12770
|
} | {
|
|
12672
12771
|
type: "http";
|
|
12673
12772
|
url: string;
|
|
12674
12773
|
allowTools?: string[] | undefined;
|
|
12774
|
+
readTools?: string[] | undefined;
|
|
12675
12775
|
headers?: Record<string, string> | undefined;
|
|
12676
12776
|
headersEnv?: Record<string, string> | undefined;
|
|
12677
12777
|
}> | undefined;
|
|
@@ -12769,6 +12869,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
12769
12869
|
timeoutMinutes?: number | undefined;
|
|
12770
12870
|
requeueRelayOnRestart?: boolean | undefined;
|
|
12771
12871
|
callbackSends?: boolean | undefined;
|
|
12872
|
+
coalesceSeconds?: number | undefined;
|
|
12772
12873
|
} | undefined;
|
|
12773
12874
|
peers?: {
|
|
12774
12875
|
name: string;
|
|
@@ -13754,6 +13855,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
13754
13855
|
agents?: string[] | undefined;
|
|
13755
13856
|
channels?: string[] | undefined;
|
|
13756
13857
|
}> | undefined;
|
|
13858
|
+
closeIdle?: {
|
|
13859
|
+
enabled?: boolean | undefined;
|
|
13860
|
+
maxPerRound?: number | undefined;
|
|
13861
|
+
minQuietSeconds?: number | undefined;
|
|
13862
|
+
settleSeconds?: number | undefined;
|
|
13863
|
+
} | undefined;
|
|
13757
13864
|
} | undefined;
|
|
13758
13865
|
environment?: {
|
|
13759
13866
|
tools?: (string | {
|
|
@@ -19133,6 +19240,24 @@ declare class RunStore {
|
|
|
19133
19240
|
private clearIndex;
|
|
19134
19241
|
}
|
|
19135
19242
|
|
|
19243
|
+
interface ProcessKey {
|
|
19244
|
+
agentId: string;
|
|
19245
|
+
channel: string;
|
|
19246
|
+
chatId: string;
|
|
19247
|
+
}
|
|
19248
|
+
/** What `closeIdle` may close. Busy processes and open work are always spared. */
|
|
19249
|
+
interface CloseIdleRequest {
|
|
19250
|
+
max: number;
|
|
19251
|
+
/** Spare a process quiet for less than this: its chat is probably still going. */
|
|
19252
|
+
minQuietMs: number;
|
|
19253
|
+
/** Why, for the log line and the process's dead reason. */
|
|
19254
|
+
reason: string;
|
|
19255
|
+
/** Spare these too, e.g. a chat with a run on its way to this process. */
|
|
19256
|
+
skip?: (key: ProcessKey) => boolean;
|
|
19257
|
+
/** Only say which ones it would close. */
|
|
19258
|
+
dryRun?: boolean;
|
|
19259
|
+
}
|
|
19260
|
+
|
|
19136
19261
|
interface ResourceSample {
|
|
19137
19262
|
at: number;
|
|
19138
19263
|
memTotalMB: number;
|
|
@@ -19210,6 +19335,16 @@ interface AdmissionSettings {
|
|
|
19210
19335
|
/** Seconds between resource re-reads while work is waiting. */
|
|
19211
19336
|
sampleSeconds: number;
|
|
19212
19337
|
classes: Record<string, AdmissionClass>;
|
|
19338
|
+
/** Close idle sessions while runs wait on memory or swap. */
|
|
19339
|
+
closeIdle: {
|
|
19340
|
+
enabled: boolean;
|
|
19341
|
+
/** Most sessions closed per round. */
|
|
19342
|
+
maxPerRound: number;
|
|
19343
|
+
/** Never close a session quiet for less than this. */
|
|
19344
|
+
minQuietSeconds: number;
|
|
19345
|
+
/** Wait this long after a round: swap keeps falling for a while. */
|
|
19346
|
+
settleSeconds: number;
|
|
19347
|
+
};
|
|
19213
19348
|
priority: {
|
|
19214
19349
|
ownerChannels: string[];
|
|
19215
19350
|
/** People ids (config.people) whose turns run at owner priority. */
|
|
@@ -19270,6 +19405,7 @@ declare class AdmissionQueue {
|
|
|
19270
19405
|
private readonly sampler;
|
|
19271
19406
|
private readonly log;
|
|
19272
19407
|
private readonly now;
|
|
19408
|
+
private readonly closeIdle;
|
|
19273
19409
|
private waiting;
|
|
19274
19410
|
private running;
|
|
19275
19411
|
private starts;
|
|
@@ -19279,8 +19415,10 @@ declare class AdmissionQueue {
|
|
|
19279
19415
|
private timer;
|
|
19280
19416
|
private closedAt;
|
|
19281
19417
|
private lastReasons;
|
|
19418
|
+
private lastCloseRoundAt;
|
|
19419
|
+
private saidNothingToClose;
|
|
19282
19420
|
private readonly bootAt;
|
|
19283
|
-
constructor(settings: () => AdmissionSettings, sampler: ResourceSampler, log?: (msg: string) => void, now?: () => number);
|
|
19421
|
+
constructor(settings: () => AdmissionSettings, sampler: ResourceSampler, log?: (msg: string) => void, now?: () => number, closeIdle?: (req: CloseIdleRequest) => ProcessKey[]);
|
|
19284
19422
|
get closed(): boolean;
|
|
19285
19423
|
/** Waits until the run may start. A run with keepOnClose is never
|
|
19286
19424
|
* answered once the daemon is stopping. */
|
|
@@ -19305,6 +19443,8 @@ declare class AdmissionQueue {
|
|
|
19305
19443
|
/** Starts every waiting run that may start now, in queue order. */
|
|
19306
19444
|
pump(): Promise<void>;
|
|
19307
19445
|
private pass;
|
|
19446
|
+
/** One round of closing idle sessions, when memory or swap holds a run. */
|
|
19447
|
+
private closeIdleRound;
|
|
19308
19448
|
private admitEntry;
|
|
19309
19449
|
/** Re-checks while work waits: resources change without any release. */
|
|
19310
19450
|
private arm;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Oa as Tt,Pa as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt}from"./chunk-
|
|
1
|
+
import{Oa as Tt,Pa as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt}from"./chunk-ZEJ2ZG6K.js";import"./chunk-NKSQNQ5V.js";import"./chunk-GTJIKXDB.js";import"./chunk-CRSHJYZQ.js";import"./chunk-ZVP6GB4G.js";import"./chunk-XGCSWSVD.js";import"./chunk-IMLAPB7G.js";import"./chunk-EKJG63EJ.js";import"./chunk-2W23ZJCP.js";import"./chunk-JSCVOB4G.js";import"./chunk-JLBRNYKY.js";import"./chunk-BYEL7KKR.js";import"./chunk-TYKEHZZA.js";import"./chunk-MRIVENBY.js";import"./chunk-GJOKXP5D.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-UKUH662W.js";import"./chunk-3Q6MRG3P.js";import"./chunk-2VDO2HEK.js";import"./chunk-JWDJMFU6.js";import"./chunk-2P5NP4H6.js";import"./chunk-B4KQC3DG.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-Q3A5P373.js";import"./chunk-RWZGW2GQ.js";import"./chunk-QPABR72X.js";import"./chunk-A5GYG56I.js";import"./chunk-AECUZTRB.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-6TTGRTDO.js";import"./chunk-RX5O5637.js";import"./chunk-2GAMPUOB.js";import"./chunk-5ELIX7BQ.js";import"./chunk-X7UQY7CH.js";import"./chunk-IFUAP7UD.js";import"./chunk-KP7KDLZ2.js";import"./chunk-XVV7ZZ77.js";import{Ca as yt,m as lt,n as ct,o as dt,p as mt,q as pt}from"./chunk-6TZQZGRI.js";import"./chunk-B34OLAAC.js";import"./chunk-MEFPXHQJ.js";import"./chunk-7AB3QUGH.js";import{a as L}from"./chunk-BAXGL6TY.js";import{A as D,B as z,C as V,a as ye,b as we,c as Se,d as Ae,e as Ie,f as Oe,g as Ne,h as He,i as je,j as Ue,k as _e,l as I,m as q,n as Be,o as qe,p as Ye,q as O,r as ze,s as Ve,t as Xe,u as x,v as Y,w as Qe,x as Ze,y as et,z as wt}from"./chunk-5YJ5GQCJ.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-GV7S5BAX.js";import"./chunk-SZDACK6O.js";import"./chunk-VE3SSOQX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-VJVXEVZ7.js";import{u as ut}from"./chunk-VIWN3CXS.js";import"./chunk-RHXBLKBW.js";import"./chunk-3UOTLMXD.js";import"./chunk-VWTBHLMX.js";import"./chunk-BE64IJWM.js";import"./chunk-5ONH4ITT.js";import"./chunk-JRAG37V5.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GSX4NK2N.js";import"./chunk-HPRLRD4P.js";import"./chunk-PSLSU6HC.js";import{a as ht}from"./chunk-BBMGXNHU.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import"./chunk-ZJXJN6GM.js";import"./chunk-JTFCU5LH.js";import{f as gt,g as ft}from"./chunk-XEMW37IV.js";import"./chunk-WPNRDEHW.js";import"./chunk-LUOW2YHY.js";import"./chunk-4LWFJ4MZ.js";import"./chunk-BIJHMWXK.js";import"./chunk-EOQNFLFJ.js";import{j as it,k as rt,l as at}from"./chunk-VKEL4XNO.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-MYVHVJWZ.js";import"./chunk-QUFIUXMQ.js";import"./chunk-3AHYZLGE.js";import"./chunk-XL7UWG36.js";import"./chunk-MNG2AMKZ.js";import"./chunk-LY4G7PCW.js";import"./chunk-2HBEZV7L.js";import"./chunk-A7JSRDJL.js";import"./chunk-BERWTVG2.js";import"./chunk-AHWWJ7AF.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-DCIYOPJF.js";import{a as m,b as G}from"./chunk-7I7IEX4S.js";import{b as Fe,c as Le,d as A,e as De}from"./chunk-JHCI6XCJ.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{Fb as tt,Hb as st,Kb as ot,Rb as nt}from"./chunk-YLKEUO6K.js";import"./chunk-KEUW6YLL.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-YSCT6DPR.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
|
|
2
2
|
`)}
|
|
3
3
|
|
|
4
4
|
${t}`}async function It(o){let{loadLocalSkills:e}=await import("./loader-YFVSSYSL.js");return e(o)}async function Ot(o,e,t,s,i){let a=[{role:"system",content:`You are a skill author for the Agent Skills ecosystem (skills.sh).
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=org-tool-
|
|
1
|
+
import{b as d}from"./chunk-3MUWPMC2.js";import"./chunk-RKPAVWXF.js";import"./chunk-2GAMPUOB.js";import{b as c}from"./chunk-IFUAP7UD.js";import"./chunk-KP7KDLZ2.js";import"./chunk-VIWN3CXS.js";import"./chunk-RHXBLKBW.js";import"./chunk-3UOTLMXD.js";import"./chunk-FCPTN6NF.js";import"./chunk-7I7IEX4S.js";import"./chunk-YLKEUO6K.js";import"./chunk-KEUW6YLL.js";import"./chunk-UEEB3UTU.js";import"./chunk-VQRY4IDI.js";import"./chunk-YSCT6DPR.js";import"./chunk-QIJLFPWE.js";var u=new Set(["cron","heartbeat","api","a2a","mesh","approvals","requests"]);function p(n){return typeof n=="string"?n.trim():""}async function y(n,o){let i=o.fetch??fetch,h=o.daemonUrl.replace(/\/$/,""),a=o.env??process.env,s=(p(n.action)||"show").toLowerCase();if(s==="show")try{let e=await i(`${h}/api/org`,{headers:c(a),signal:AbortSignal.timeout(1e4)}),r=await e.json().catch(()=>({}));return e.ok?String(r.text??""):`Error: ${r?.error||`HTTP ${e.status}`}`}catch(e){return`Error: couldn't reach the daemon (${e?.message??e}).`}if(s!=="propose")return`Error: unknown action "${s}". Use show or propose.`;let t=d(n,a);if(!t)return"Error: couldn't tell which agent you are. Pass callerAgentId.";let l=t.channel&&t.chatId&&!u.has(t.channel)?{channel:t.channel,chatId:t.chatId,...t.accountId?{accountId:t.accountId}:{}}:void 0;try{let e=await i(`${h}/api/org/proposals`,{method:"POST",headers:{"Content-Type":"application/json",...c(a)},body:JSON.stringify({changes:n.changes,newAgent:n.newAgent,why:n.why,raised_by:t.agentId,...l?{reply:l}:{}}),signal:AbortSignal.timeout(1e4)}),r=await e.json().catch(()=>({}));return e.ok?[`Card ${r.card.id} is in the owner's Approvals inbox: "${r.text}"`,"Nothing is changed yet. On the owner's yes the daemon applies it and you get a message with the result; do not edit the org chart yourself.","Tell the owner it is waiting for their yes."].join(" "):`Not proposed: ${r?.error||`HTTP ${e.status}`}`}catch(e){return`Error: couldn't reach the daemon (${e?.message??e}).`}}export{y as runOrgTool};
|
|
2
|
+
//# sourceMappingURL=org-tool-YP256FUE.js.map
|