agentix-cli 0.43.0 → 0.44.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.
Files changed (116) hide show
  1. package/apps/mac-helper/Resources/AppIcon.png +0 -0
  2. package/apps/mac-helper/Sources/AgentXHelper/Notify.swift +51 -0
  3. package/apps/mac-helper/Sources/AgentXHelper/main.swift +15 -1
  4. package/apps/mac-helper/build.sh +25 -2
  5. package/dist/{App-HSRGG5VA.js → App-QTUGMHG7.js} +2 -2
  6. package/dist/{ChatApp-4FOU6Q3S.js → ChatApp-634FDG3W.js} +2 -2
  7. package/dist/{agent-54NUP2Z3.js → agent-3XDPLWMX.js} +2 -2
  8. package/dist/{board-dashboard-HLTVSSGW.js → board-dashboard-OYGL7Z7X.js} +455 -161
  9. package/dist/board-dashboard-OYGL7Z7X.js.map +1 -0
  10. package/dist/{chunk-H4MIYENA.js → chunk-6HMZ5TTM.js} +2 -2
  11. package/dist/{chunk-SJPLXXCI.js → chunk-7A7RC3R4.js} +2 -2
  12. package/dist/{chunk-2HNKBYQ6.js → chunk-7HHVZJO4.js} +192 -208
  13. package/dist/chunk-7HHVZJO4.js.map +1 -0
  14. package/dist/chunk-BIFJSQB5.js +123 -0
  15. package/dist/chunk-BIFJSQB5.js.map +1 -0
  16. package/dist/{chunk-WBGROLOX.js → chunk-BTGPZ6B7.js} +2 -2
  17. package/dist/{chunk-X763UOES.js → chunk-ICZPZYYR.js} +2 -2
  18. package/dist/{chunk-RCVGIKC2.js → chunk-MTVRYTLL.js} +2 -2
  19. package/dist/{chunk-B32HVIDN.js → chunk-NSYY5NCR.js} +3 -3
  20. package/dist/chunk-NSYY5NCR.js.map +1 -0
  21. package/dist/chunk-P2Y7DFFP.js +36 -0
  22. package/dist/chunk-P2Y7DFFP.js.map +1 -0
  23. package/dist/{chunk-XRPMP6A5.js → chunk-Q3Q6FTFY.js} +151 -148
  24. package/dist/chunk-Q3Q6FTFY.js.map +1 -0
  25. package/dist/chunk-QJANPP4C.js +15 -0
  26. package/dist/chunk-QJANPP4C.js.map +1 -0
  27. package/dist/{chunk-REPZID5M.js → chunk-SAFAI4AV.js} +43 -43
  28. package/dist/chunk-SAFAI4AV.js.map +1 -0
  29. package/dist/chunk-T76YTN34.js +178 -0
  30. package/dist/chunk-T76YTN34.js.map +1 -0
  31. package/dist/chunk-TCJ3SMOF.js +9 -0
  32. package/dist/chunk-TCJ3SMOF.js.map +1 -0
  33. package/dist/{chunk-RQKUQOFC.js → chunk-TNFOGJWZ.js} +2 -2
  34. package/dist/{chunk-FAJEBVZE.js → chunk-V5FZJUK4.js} +2 -2
  35. package/dist/chunk-WLVQDEOT.js +2 -0
  36. package/dist/chunk-WLVQDEOT.js.map +1 -0
  37. package/dist/{chunk-B5HKRYCU.js → chunk-YQVR2HQS.js} +2 -2
  38. package/dist/cli.js +1 -1
  39. package/dist/cli.js.map +1 -1
  40. package/dist/client-NTC667CA.js +2 -0
  41. package/dist/config-5V444ZFW.js +2 -0
  42. package/dist/config-mutator-E6NQLFWR.js +2 -0
  43. package/dist/doctor-5HDW5F66.js +2 -0
  44. package/dist/{editor-chat-OB7IQOB5.js → editor-chat-MOMQHMO4.js} +2 -2
  45. package/dist/editor-chat-MOMQHMO4.js.map +1 -0
  46. package/dist/index.d.ts +462 -46
  47. package/dist/index.js +1 -1
  48. package/dist/index.js.map +1 -1
  49. package/dist/program-HGI5C2MP.js +2 -0
  50. package/dist/query-6EMTLCHQ.js +2 -0
  51. package/dist/registry-5QOY65FS.js +2 -0
  52. package/dist/{request-planner-326NOKPZ.js → request-planner-KYQCJDAW.js} +2 -2
  53. package/dist/{review-candidates-LEOPEOEG.js → review-candidates-BFAWNDOR.js} +2 -2
  54. package/dist/routing-OC3QJI3W.js +2 -0
  55. package/dist/schedule-tool-VQCNMBJF.js +8 -0
  56. package/dist/schedule-tool-VQCNMBJF.js.map +1 -0
  57. package/dist/scheduler-NRXPVG7P.js +2 -0
  58. package/dist/seat-3WT3VJC2.js +2 -0
  59. package/dist/{select-L4VIYSFJ.js → select-KPQWIC22.js} +2 -2
  60. package/dist/web/activity-graph.global.js.map +1 -1
  61. package/dist/web/workflow-editor.global.js +1 -1
  62. package/dist/web/workflow-editor.global.js.map +1 -1
  63. package/dist/wiki-5JORBO4G.js +2 -0
  64. package/package.json +2 -1
  65. package/dist/board-dashboard-HLTVSSGW.js.map +0 -1
  66. package/dist/chunk-2HNKBYQ6.js.map +0 -1
  67. package/dist/chunk-B32HVIDN.js.map +0 -1
  68. package/dist/chunk-DIKZWTL5.js +0 -170
  69. package/dist/chunk-DIKZWTL5.js.map +0 -1
  70. package/dist/chunk-F6CNF7V3.js +0 -25
  71. package/dist/chunk-F6CNF7V3.js.map +0 -1
  72. package/dist/chunk-IAG6FI3Q.js +0 -13
  73. package/dist/chunk-IAG6FI3Q.js.map +0 -1
  74. package/dist/chunk-NZ6AQIKJ.js +0 -121
  75. package/dist/chunk-NZ6AQIKJ.js.map +0 -1
  76. package/dist/chunk-P7LNYB53.js +0 -9
  77. package/dist/chunk-P7LNYB53.js.map +0 -1
  78. package/dist/chunk-REPZID5M.js.map +0 -1
  79. package/dist/chunk-XRPMP6A5.js.map +0 -1
  80. package/dist/client-6BGTH2TT.js +0 -2
  81. package/dist/config-SRTXHGSK.js +0 -2
  82. package/dist/config-mutator-KJ5GEMVV.js +0 -2
  83. package/dist/doctor-J4FLV45L.js +0 -2
  84. package/dist/editor-chat-OB7IQOB5.js.map +0 -1
  85. package/dist/program-LYFTYF7E.js +0 -2
  86. package/dist/query-ZSUBNWOL.js +0 -2
  87. package/dist/registry-OMUDCBKM.js +0 -2
  88. package/dist/routing-AWIRBYGU.js +0 -2
  89. package/dist/scheduler-PGGYW5AB.js +0 -2
  90. package/dist/seat-XB4EGUKJ.js +0 -2
  91. package/dist/wiki-GBC6I7ZX.js +0 -2
  92. /package/dist/{App-HSRGG5VA.js.map → App-QTUGMHG7.js.map} +0 -0
  93. /package/dist/{ChatApp-4FOU6Q3S.js.map → ChatApp-634FDG3W.js.map} +0 -0
  94. /package/dist/{agent-54NUP2Z3.js.map → agent-3XDPLWMX.js.map} +0 -0
  95. /package/dist/{chunk-H4MIYENA.js.map → chunk-6HMZ5TTM.js.map} +0 -0
  96. /package/dist/{chunk-SJPLXXCI.js.map → chunk-7A7RC3R4.js.map} +0 -0
  97. /package/dist/{chunk-WBGROLOX.js.map → chunk-BTGPZ6B7.js.map} +0 -0
  98. /package/dist/{chunk-X763UOES.js.map → chunk-ICZPZYYR.js.map} +0 -0
  99. /package/dist/{chunk-RCVGIKC2.js.map → chunk-MTVRYTLL.js.map} +0 -0
  100. /package/dist/{chunk-RQKUQOFC.js.map → chunk-TNFOGJWZ.js.map} +0 -0
  101. /package/dist/{chunk-FAJEBVZE.js.map → chunk-V5FZJUK4.js.map} +0 -0
  102. /package/dist/{chunk-B5HKRYCU.js.map → chunk-YQVR2HQS.js.map} +0 -0
  103. /package/dist/{client-6BGTH2TT.js.map → client-NTC667CA.js.map} +0 -0
  104. /package/dist/{config-SRTXHGSK.js.map → config-5V444ZFW.js.map} +0 -0
  105. /package/dist/{config-mutator-KJ5GEMVV.js.map → config-mutator-E6NQLFWR.js.map} +0 -0
  106. /package/dist/{doctor-J4FLV45L.js.map → doctor-5HDW5F66.js.map} +0 -0
  107. /package/dist/{program-LYFTYF7E.js.map → program-HGI5C2MP.js.map} +0 -0
  108. /package/dist/{query-ZSUBNWOL.js.map → query-6EMTLCHQ.js.map} +0 -0
  109. /package/dist/{registry-OMUDCBKM.js.map → registry-5QOY65FS.js.map} +0 -0
  110. /package/dist/{request-planner-326NOKPZ.js.map → request-planner-KYQCJDAW.js.map} +0 -0
  111. /package/dist/{review-candidates-LEOPEOEG.js.map → review-candidates-BFAWNDOR.js.map} +0 -0
  112. /package/dist/{routing-AWIRBYGU.js.map → routing-OC3QJI3W.js.map} +0 -0
  113. /package/dist/{scheduler-PGGYW5AB.js.map → scheduler-NRXPVG7P.js.map} +0 -0
  114. /package/dist/{seat-XB4EGUKJ.js.map → seat-3WT3VJC2.js.map} +0 -0
  115. /package/dist/{select-L4VIYSFJ.js.map → select-KPQWIC22.js.map} +0 -0
  116. /package/dist/{wiki-GBC6I7ZX.js.map → wiki-5JORBO4G.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1624,6 +1624,11 @@ declare const agentConfigSchema: z.ZodObject<{
1624
1624
  * - "public": external apps can POST /api/public/agents/<id>/messages
1625
1625
  * with a scoped token (agent:<id> or agent:*). */
1626
1626
  access: z.ZodDefault<z.ZodEnum<["private", "public"]>>;
1627
+ /** Governance override for agent-facing management tools. An admin agent
1628
+ * may pause, resume and request deletion of schedules created by other
1629
+ * agents or by the operator. It never approves anything: approval of a
1630
+ * create/delete request stays operator-only (`agentx schedule approve`). */
1631
+ admin: z.ZodOptional<z.ZodBoolean>;
1627
1632
  /** Per-agent third-party integrations registry. Declares which services
1628
1633
  * this agent has credentials for (telegram-bot, hubspot, gitlab-user,
1629
1634
  * gmail, etc.). Secrets stay in env vars / keyring; this block holds
@@ -1743,7 +1748,7 @@ declare const agentConfigSchema: z.ZodObject<{
1743
1748
  narrate?: "all" | "on" | "off" | undefined;
1744
1749
  }>>;
1745
1750
  /** How this agent appears on screen: its own cursor, drawn by the Mac
1746
- * helper and click-through, never Anis's real mouse. See
1751
+ * helper and click-through, never the person's real mouse. See
1747
1752
  * src/voice/presence.ts. */
1748
1753
  presence: z.ZodOptional<z.ZodObject<{
1749
1754
  /** Cursor colour, as #RRGGBB. Default: derived from the agent id. */
@@ -1752,7 +1757,7 @@ declare const agentConfigSchema: z.ZodObject<{
1752
1757
  initial: z.ZodOptional<z.ZodString>;
1753
1758
  /** Name shown under the cursor. Default: the agent's name. */
1754
1759
  label: z.ZodOptional<z.ZodString>;
1755
- /** May this agent click and type for Anis (presence mode "act")?
1760
+ /** May this agent click and type for the person (presence mode "act")?
1756
1761
  * Off by default: without it, "act" becomes "teach". */
1757
1762
  allowActions: z.ZodOptional<z.ZodBoolean>;
1758
1763
  }, "strip", z.ZodTypeAny, {
@@ -1782,7 +1787,7 @@ declare const agentConfigSchema: z.ZodObject<{
1782
1787
  billing: "api" | "subscription";
1783
1788
  toolUseRequired: string[];
1784
1789
  persistentProcess: boolean;
1785
- queueMode: "collect" | "followup" | "drop";
1790
+ queueMode: "drop" | "collect" | "followup";
1786
1791
  heartbeat: {
1787
1792
  enabled: boolean;
1788
1793
  prompt: string;
@@ -1821,6 +1826,7 @@ declare const agentConfigSchema: z.ZodObject<{
1821
1826
  }> | undefined;
1822
1827
  contextStrategy?: "layered" | "planner" | undefined;
1823
1828
  gitlabAutoReply?: boolean | undefined;
1829
+ admin?: boolean | undefined;
1824
1830
  voice?: {
1825
1831
  system?: string | Record<string, string> | undefined;
1826
1832
  provider?: "system" | "elevenlabs" | undefined;
@@ -1867,7 +1873,7 @@ declare const agentConfigSchema: z.ZodObject<{
1867
1873
  toolUseRequired?: string[] | undefined;
1868
1874
  gitlabAutoReply?: boolean | undefined;
1869
1875
  persistentProcess?: boolean | undefined;
1870
- queueMode?: "collect" | "followup" | "drop" | undefined;
1876
+ queueMode?: "drop" | "collect" | "followup" | undefined;
1871
1877
  heartbeat?: {
1872
1878
  enabled?: boolean | undefined;
1873
1879
  prompt?: string | undefined;
@@ -1875,6 +1881,7 @@ declare const agentConfigSchema: z.ZodObject<{
1875
1881
  intervalMinutes?: number | undefined;
1876
1882
  } | undefined;
1877
1883
  access?: "private" | "public" | undefined;
1884
+ admin?: boolean | undefined;
1878
1885
  integrations?: {
1879
1886
  label: string;
1880
1887
  kind: string;
@@ -1907,7 +1914,7 @@ declare const agentConfigSchema: z.ZodObject<{
1907
1914
  allowActions?: boolean | undefined;
1908
1915
  } | undefined;
1909
1916
  }>;
1910
- declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
1917
+ declare const cronJobSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
1911
1918
  enabled: z.ZodDefault<z.ZodBoolean>;
1912
1919
  schedule: z.ZodString;
1913
1920
  timezone: z.ZodDefault<z.ZodString>;
@@ -1938,7 +1945,12 @@ declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
1938
1945
  * but appending an instruction to the prompt is reliably honored. Use
1939
1946
  * 1500 for briefs, 500 for status pings, 300 for pure classifiers. */
1940
1947
  maxOutputTokens: z.ZodOptional<z.ZodNumber>;
1941
- onError: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodEnum<["log", "notify", "disable"]>, z.ZodArray<z.ZodEnum<["log", "notify", "disable"]>, "many">]>>, ("notify" | "log" | "disable")[], "notify" | "log" | "disable" | ("notify" | "log" | "disable")[] | undefined>;
1948
+ /** How much this routine may do: `report` (read-only), `propose` (branch,
1949
+ * commit, MR/draft; never merge/deploy/delete) or `act` (the agent's full
1950
+ * permissions — the default). Enforced per run by the guard, not by the
1951
+ * prompt; only the claude-code tier can enforce it, others refuse. */
1952
+ autonomy: z.ZodOptional<z.ZodEnum<["report", "propose", "act"]>>;
1953
+ onError: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodEnum<["log", "notify", "disable"]>, z.ZodArray<z.ZodEnum<["log", "notify", "disable"]>, "many">]>>, ("notify" | "disable" | "log")[], "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined>;
1942
1954
  notify: z.ZodOptional<z.ZodObject<{
1943
1955
  channel: z.ZodString;
1944
1956
  chatId: z.ZodString;
@@ -1952,6 +1964,31 @@ declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
1952
1964
  chatId: string;
1953
1965
  accountId?: string | undefined;
1954
1966
  }>>;
1967
+ /** Secret that lets an external system fire this job now via
1968
+ * `POST /routines/<id>/fire`. Reference an env var (`"${MY_TOKEN}"`);
1969
+ * a job without one cannot be fired. See src/daemon/routine-fire.ts. */
1970
+ fireToken: z.ZodOptional<z.ZodString>;
1971
+ /** Agent id that created this job through the agent `schedule` tool.
1972
+ * Absent for operator-created jobs. Drives the ownership rule: an agent
1973
+ * manages only the routines it created, unless it is `admin`. */
1974
+ createdBy: z.ZodOptional<z.ZodString>;
1975
+ /** Pending operator approval for an agent-requested change. While a
1976
+ * `create` is pending the job never runs, whatever `enabled` says; a
1977
+ * pending `delete` leaves the job as it was until approved. Cleared by
1978
+ * `agentx schedule approve|reject <id>`. */
1979
+ approval: z.ZodOptional<z.ZodObject<{
1980
+ action: z.ZodEnum<["create", "delete"]>;
1981
+ requestedBy: z.ZodString;
1982
+ requestedAt: z.ZodString;
1983
+ }, "strip", z.ZodTypeAny, {
1984
+ action: "delete" | "create";
1985
+ requestedBy: string;
1986
+ requestedAt: string;
1987
+ }, {
1988
+ action: "delete" | "create";
1989
+ requestedBy: string;
1990
+ requestedAt: string;
1991
+ }>>;
1955
1992
  }, "strip", z.ZodTypeAny, {
1956
1993
  enabled: boolean;
1957
1994
  agent: string;
@@ -1959,7 +1996,7 @@ declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
1959
1996
  timeout: number;
1960
1997
  schedule: string;
1961
1998
  timezone: string;
1962
- onError: ("notify" | "log" | "disable")[];
1999
+ onError: ("notify" | "disable" | "log")[];
1963
2000
  model?: string | undefined;
1964
2001
  command?: string | undefined;
1965
2002
  notify?: {
@@ -1968,6 +2005,14 @@ declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
1968
2005
  accountId?: string | undefined;
1969
2006
  } | undefined;
1970
2007
  maxOutputTokens?: number | undefined;
2008
+ autonomy?: "report" | "propose" | "act" | undefined;
2009
+ fireToken?: string | undefined;
2010
+ createdBy?: string | undefined;
2011
+ approval?: {
2012
+ action: "delete" | "create";
2013
+ requestedBy: string;
2014
+ requestedAt: string;
2015
+ } | undefined;
1971
2016
  }, {
1972
2017
  agent: string;
1973
2018
  schedule: string;
@@ -1983,7 +2028,15 @@ declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
1983
2028
  accountId?: string | undefined;
1984
2029
  } | undefined;
1985
2030
  maxOutputTokens?: number | undefined;
1986
- onError?: "notify" | "log" | "disable" | ("notify" | "log" | "disable")[] | undefined;
2031
+ autonomy?: "report" | "propose" | "act" | undefined;
2032
+ onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
2033
+ fireToken?: string | undefined;
2034
+ createdBy?: string | undefined;
2035
+ approval?: {
2036
+ action: "delete" | "create";
2037
+ requestedBy: string;
2038
+ requestedAt: string;
2039
+ } | undefined;
1987
2040
  }>, {
1988
2041
  enabled: boolean;
1989
2042
  agent: string;
@@ -1991,7 +2044,7 @@ declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
1991
2044
  timeout: number;
1992
2045
  schedule: string;
1993
2046
  timezone: string;
1994
- onError: ("notify" | "log" | "disable")[];
2047
+ onError: ("notify" | "disable" | "log")[];
1995
2048
  model?: string | undefined;
1996
2049
  command?: string | undefined;
1997
2050
  notify?: {
@@ -2000,6 +2053,14 @@ declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
2000
2053
  accountId?: string | undefined;
2001
2054
  } | undefined;
2002
2055
  maxOutputTokens?: number | undefined;
2056
+ autonomy?: "report" | "propose" | "act" | undefined;
2057
+ fireToken?: string | undefined;
2058
+ createdBy?: string | undefined;
2059
+ approval?: {
2060
+ action: "delete" | "create";
2061
+ requestedBy: string;
2062
+ requestedAt: string;
2063
+ } | undefined;
2003
2064
  }, {
2004
2065
  agent: string;
2005
2066
  schedule: string;
@@ -2015,7 +2076,63 @@ declare const cronJobSchema: z.ZodEffects<z.ZodObject<{
2015
2076
  accountId?: string | undefined;
2016
2077
  } | undefined;
2017
2078
  maxOutputTokens?: number | undefined;
2018
- onError?: "notify" | "log" | "disable" | ("notify" | "log" | "disable")[] | undefined;
2079
+ autonomy?: "report" | "propose" | "act" | undefined;
2080
+ onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
2081
+ fireToken?: string | undefined;
2082
+ createdBy?: string | undefined;
2083
+ approval?: {
2084
+ action: "delete" | "create";
2085
+ requestedBy: string;
2086
+ requestedAt: string;
2087
+ } | undefined;
2088
+ }>, {
2089
+ enabled: boolean;
2090
+ agent: string;
2091
+ prompt: string;
2092
+ timeout: number;
2093
+ schedule: string;
2094
+ timezone: string;
2095
+ onError: ("notify" | "disable" | "log")[];
2096
+ model?: string | undefined;
2097
+ command?: string | undefined;
2098
+ notify?: {
2099
+ channel: string;
2100
+ chatId: string;
2101
+ accountId?: string | undefined;
2102
+ } | undefined;
2103
+ maxOutputTokens?: number | undefined;
2104
+ autonomy?: "report" | "propose" | "act" | undefined;
2105
+ fireToken?: string | undefined;
2106
+ createdBy?: string | undefined;
2107
+ approval?: {
2108
+ action: "delete" | "create";
2109
+ requestedBy: string;
2110
+ requestedAt: string;
2111
+ } | undefined;
2112
+ }, {
2113
+ agent: string;
2114
+ schedule: string;
2115
+ model?: string | undefined;
2116
+ enabled?: boolean | undefined;
2117
+ command?: string | undefined;
2118
+ prompt?: string | undefined;
2119
+ timeout?: number | undefined;
2120
+ timezone?: string | undefined;
2121
+ notify?: {
2122
+ channel: string;
2123
+ chatId: string;
2124
+ accountId?: string | undefined;
2125
+ } | undefined;
2126
+ maxOutputTokens?: number | undefined;
2127
+ autonomy?: "report" | "propose" | "act" | undefined;
2128
+ onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
2129
+ fireToken?: string | undefined;
2130
+ createdBy?: string | undefined;
2131
+ approval?: {
2132
+ action: "delete" | "create";
2133
+ requestedBy: string;
2134
+ requestedAt: string;
2135
+ } | undefined;
2019
2136
  }>;
2020
2137
  declare const meshPeerSchema: z.ZodObject<{
2021
2138
  url: z.ZodString;
@@ -2221,6 +2338,11 @@ declare const daemonConfigSchema: z.ZodObject<{
2221
2338
  * - "public": external apps can POST /api/public/agents/<id>/messages
2222
2339
  * with a scoped token (agent:<id> or agent:*). */
2223
2340
  access: z.ZodDefault<z.ZodEnum<["private", "public"]>>;
2341
+ /** Governance override for agent-facing management tools. An admin agent
2342
+ * may pause, resume and request deletion of schedules created by other
2343
+ * agents or by the operator. It never approves anything: approval of a
2344
+ * create/delete request stays operator-only (`agentx schedule approve`). */
2345
+ admin: z.ZodOptional<z.ZodBoolean>;
2224
2346
  /** Per-agent third-party integrations registry. Declares which services
2225
2347
  * this agent has credentials for (telegram-bot, hubspot, gitlab-user,
2226
2348
  * gmail, etc.). Secrets stay in env vars / keyring; this block holds
@@ -2340,7 +2462,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2340
2462
  narrate?: "all" | "on" | "off" | undefined;
2341
2463
  }>>;
2342
2464
  /** How this agent appears on screen: its own cursor, drawn by the Mac
2343
- * helper and click-through, never Anis's real mouse. See
2465
+ * helper and click-through, never the person's real mouse. See
2344
2466
  * src/voice/presence.ts. */
2345
2467
  presence: z.ZodOptional<z.ZodObject<{
2346
2468
  /** Cursor colour, as #RRGGBB. Default: derived from the agent id. */
@@ -2349,7 +2471,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2349
2471
  initial: z.ZodOptional<z.ZodString>;
2350
2472
  /** Name shown under the cursor. Default: the agent's name. */
2351
2473
  label: z.ZodOptional<z.ZodString>;
2352
- /** May this agent click and type for Anis (presence mode "act")?
2474
+ /** May this agent click and type for the person (presence mode "act")?
2353
2475
  * Off by default: without it, "act" becomes "teach". */
2354
2476
  allowActions: z.ZodOptional<z.ZodBoolean>;
2355
2477
  }, "strip", z.ZodTypeAny, {
@@ -2379,7 +2501,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2379
2501
  billing: "api" | "subscription";
2380
2502
  toolUseRequired: string[];
2381
2503
  persistentProcess: boolean;
2382
- queueMode: "collect" | "followup" | "drop";
2504
+ queueMode: "drop" | "collect" | "followup";
2383
2505
  heartbeat: {
2384
2506
  enabled: boolean;
2385
2507
  prompt: string;
@@ -2418,6 +2540,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2418
2540
  }> | undefined;
2419
2541
  contextStrategy?: "layered" | "planner" | undefined;
2420
2542
  gitlabAutoReply?: boolean | undefined;
2543
+ admin?: boolean | undefined;
2421
2544
  voice?: {
2422
2545
  system?: string | Record<string, string> | undefined;
2423
2546
  provider?: "system" | "elevenlabs" | undefined;
@@ -2464,7 +2587,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2464
2587
  toolUseRequired?: string[] | undefined;
2465
2588
  gitlabAutoReply?: boolean | undefined;
2466
2589
  persistentProcess?: boolean | undefined;
2467
- queueMode?: "collect" | "followup" | "drop" | undefined;
2590
+ queueMode?: "drop" | "collect" | "followup" | undefined;
2468
2591
  heartbeat?: {
2469
2592
  enabled?: boolean | undefined;
2470
2593
  prompt?: string | undefined;
@@ -2472,6 +2595,7 @@ declare const daemonConfigSchema: z.ZodObject<{
2472
2595
  intervalMinutes?: number | undefined;
2473
2596
  } | undefined;
2474
2597
  access?: "private" | "public" | undefined;
2598
+ admin?: boolean | undefined;
2475
2599
  integrations?: {
2476
2600
  label: string;
2477
2601
  kind: string;
@@ -2544,13 +2668,13 @@ declare const daemonConfigSchema: z.ZodObject<{
2544
2668
  * per-account list (user id, chat id, @username). */
2545
2669
  allowFrom: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2546
2670
  }, "strip", z.ZodTypeAny, {
2547
- dm: "block" | "pair";
2548
2671
  group: "all" | "mention-required";
2672
+ dm: "block" | "pair";
2549
2673
  allowFrom?: string[] | undefined;
2550
2674
  }, {
2675
+ group?: "all" | "mention-required" | undefined;
2551
2676
  allowFrom?: string[] | undefined;
2552
2677
  dm?: "block" | "pair" | undefined;
2553
- group?: "all" | "mention-required" | undefined;
2554
2678
  }>>;
2555
2679
  }, "strip", z.ZodTypeAny, {
2556
2680
  enabled: boolean;
@@ -2561,8 +2685,8 @@ declare const daemonConfigSchema: z.ZodObject<{
2561
2685
  allowFrom?: string[] | undefined;
2562
2686
  }>;
2563
2687
  policy: {
2564
- dm: "block" | "pair";
2565
2688
  group: "all" | "mention-required";
2689
+ dm: "block" | "pair";
2566
2690
  allowFrom?: string[] | undefined;
2567
2691
  };
2568
2692
  }, {
@@ -2574,9 +2698,9 @@ declare const daemonConfigSchema: z.ZodObject<{
2574
2698
  pollInbound?: boolean | undefined;
2575
2699
  }> | undefined;
2576
2700
  policy?: {
2701
+ group?: "all" | "mention-required" | undefined;
2577
2702
  allowFrom?: string[] | undefined;
2578
2703
  dm?: "block" | "pair" | undefined;
2579
- group?: "all" | "mention-required" | undefined;
2580
2704
  } | undefined;
2581
2705
  }>>;
2582
2706
  whatsapp: z.ZodDefault<z.ZodObject<{
@@ -2772,12 +2896,12 @@ declare const daemonConfigSchema: z.ZodObject<{
2772
2896
  }>, "many">>;
2773
2897
  }, "strip", z.ZodTypeAny, {
2774
2898
  enabled: boolean;
2899
+ host: string;
2775
2900
  routes: {
2776
2901
  agent: string;
2777
2902
  project: string;
2778
2903
  }[];
2779
2904
  webhookPort: number;
2780
- host: string;
2781
2905
  autoReplyLegacy: boolean;
2782
2906
  agentMappings: {
2783
2907
  agentId: string;
@@ -2791,13 +2915,13 @@ declare const daemonConfigSchema: z.ZodObject<{
2791
2915
  }, {
2792
2916
  enabled?: boolean | undefined;
2793
2917
  token?: string | undefined;
2918
+ host?: string | undefined;
2794
2919
  routes?: {
2795
2920
  agent: string;
2796
2921
  project: string;
2797
2922
  }[] | undefined;
2798
2923
  webhookPort?: number | undefined;
2799
2924
  webhookSecret?: string | undefined;
2800
- host?: string | undefined;
2801
2925
  autoReplyLegacy?: boolean | undefined;
2802
2926
  agentMappings?: {
2803
2927
  agentId: string;
@@ -3087,12 +3211,12 @@ declare const daemonConfigSchema: z.ZodObject<{
3087
3211
  }, "strip", z.ZodTypeAny, {
3088
3212
  gitlab: {
3089
3213
  enabled: boolean;
3214
+ host: string;
3090
3215
  routes: {
3091
3216
  agent: string;
3092
3217
  project: string;
3093
3218
  }[];
3094
3219
  webhookPort: number;
3095
- host: string;
3096
3220
  autoReplyLegacy: boolean;
3097
3221
  agentMappings: {
3098
3222
  agentId: string;
@@ -3141,8 +3265,8 @@ declare const daemonConfigSchema: z.ZodObject<{
3141
3265
  allowFrom?: string[] | undefined;
3142
3266
  }>;
3143
3267
  policy: {
3144
- dm: "block" | "pair";
3145
3268
  group: "all" | "mention-required";
3269
+ dm: "block" | "pair";
3146
3270
  allowFrom?: string[] | undefined;
3147
3271
  };
3148
3272
  };
@@ -3209,13 +3333,13 @@ declare const daemonConfigSchema: z.ZodObject<{
3209
3333
  gitlab?: {
3210
3334
  enabled?: boolean | undefined;
3211
3335
  token?: string | undefined;
3336
+ host?: string | undefined;
3212
3337
  routes?: {
3213
3338
  agent: string;
3214
3339
  project: string;
3215
3340
  }[] | undefined;
3216
3341
  webhookPort?: number | undefined;
3217
3342
  webhookSecret?: string | undefined;
3218
- host?: string | undefined;
3219
3343
  autoReplyLegacy?: boolean | undefined;
3220
3344
  agentMappings?: {
3221
3345
  agentId: string;
@@ -3262,9 +3386,9 @@ declare const daemonConfigSchema: z.ZodObject<{
3262
3386
  pollInbound?: boolean | undefined;
3263
3387
  }> | undefined;
3264
3388
  policy?: {
3389
+ group?: "all" | "mention-required" | undefined;
3265
3390
  allowFrom?: string[] | undefined;
3266
3391
  dm?: "block" | "pair" | undefined;
3267
- group?: "all" | "mention-required" | undefined;
3268
3392
  } | undefined;
3269
3393
  } | undefined;
3270
3394
  github?: {
@@ -3327,7 +3451,7 @@ declare const daemonConfigSchema: z.ZodObject<{
3327
3451
  } | undefined;
3328
3452
  } | undefined;
3329
3453
  }>>;
3330
- crons: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
3454
+ crons: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodEffects<z.ZodObject<{
3331
3455
  enabled: z.ZodDefault<z.ZodBoolean>;
3332
3456
  schedule: z.ZodString;
3333
3457
  timezone: z.ZodDefault<z.ZodString>;
@@ -3358,7 +3482,12 @@ declare const daemonConfigSchema: z.ZodObject<{
3358
3482
  * but appending an instruction to the prompt is reliably honored. Use
3359
3483
  * 1500 for briefs, 500 for status pings, 300 for pure classifiers. */
3360
3484
  maxOutputTokens: z.ZodOptional<z.ZodNumber>;
3361
- onError: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodEnum<["log", "notify", "disable"]>, z.ZodArray<z.ZodEnum<["log", "notify", "disable"]>, "many">]>>, ("notify" | "log" | "disable")[], "notify" | "log" | "disable" | ("notify" | "log" | "disable")[] | undefined>;
3485
+ /** How much this routine may do: `report` (read-only), `propose` (branch,
3486
+ * commit, MR/draft; never merge/deploy/delete) or `act` (the agent's full
3487
+ * permissions — the default). Enforced per run by the guard, not by the
3488
+ * prompt; only the claude-code tier can enforce it, others refuse. */
3489
+ autonomy: z.ZodOptional<z.ZodEnum<["report", "propose", "act"]>>;
3490
+ onError: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodEnum<["log", "notify", "disable"]>, z.ZodArray<z.ZodEnum<["log", "notify", "disable"]>, "many">]>>, ("notify" | "disable" | "log")[], "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined>;
3362
3491
  notify: z.ZodOptional<z.ZodObject<{
3363
3492
  channel: z.ZodString;
3364
3493
  chatId: z.ZodString;
@@ -3372,6 +3501,31 @@ declare const daemonConfigSchema: z.ZodObject<{
3372
3501
  chatId: string;
3373
3502
  accountId?: string | undefined;
3374
3503
  }>>;
3504
+ /** Secret that lets an external system fire this job now via
3505
+ * `POST /routines/<id>/fire`. Reference an env var (`"${MY_TOKEN}"`);
3506
+ * a job without one cannot be fired. See src/daemon/routine-fire.ts. */
3507
+ fireToken: z.ZodOptional<z.ZodString>;
3508
+ /** Agent id that created this job through the agent `schedule` tool.
3509
+ * Absent for operator-created jobs. Drives the ownership rule: an agent
3510
+ * manages only the routines it created, unless it is `admin`. */
3511
+ createdBy: z.ZodOptional<z.ZodString>;
3512
+ /** Pending operator approval for an agent-requested change. While a
3513
+ * `create` is pending the job never runs, whatever `enabled` says; a
3514
+ * pending `delete` leaves the job as it was until approved. Cleared by
3515
+ * `agentx schedule approve|reject <id>`. */
3516
+ approval: z.ZodOptional<z.ZodObject<{
3517
+ action: z.ZodEnum<["create", "delete"]>;
3518
+ requestedBy: z.ZodString;
3519
+ requestedAt: z.ZodString;
3520
+ }, "strip", z.ZodTypeAny, {
3521
+ action: "delete" | "create";
3522
+ requestedBy: string;
3523
+ requestedAt: string;
3524
+ }, {
3525
+ action: "delete" | "create";
3526
+ requestedBy: string;
3527
+ requestedAt: string;
3528
+ }>>;
3375
3529
  }, "strip", z.ZodTypeAny, {
3376
3530
  enabled: boolean;
3377
3531
  agent: string;
@@ -3379,7 +3533,55 @@ declare const daemonConfigSchema: z.ZodObject<{
3379
3533
  timeout: number;
3380
3534
  schedule: string;
3381
3535
  timezone: string;
3382
- onError: ("notify" | "log" | "disable")[];
3536
+ onError: ("notify" | "disable" | "log")[];
3537
+ model?: string | undefined;
3538
+ command?: string | undefined;
3539
+ notify?: {
3540
+ channel: string;
3541
+ chatId: string;
3542
+ accountId?: string | undefined;
3543
+ } | undefined;
3544
+ maxOutputTokens?: number | undefined;
3545
+ autonomy?: "report" | "propose" | "act" | undefined;
3546
+ fireToken?: string | undefined;
3547
+ createdBy?: string | undefined;
3548
+ approval?: {
3549
+ action: "delete" | "create";
3550
+ requestedBy: string;
3551
+ requestedAt: string;
3552
+ } | undefined;
3553
+ }, {
3554
+ agent: string;
3555
+ schedule: string;
3556
+ model?: string | undefined;
3557
+ enabled?: boolean | undefined;
3558
+ command?: string | undefined;
3559
+ prompt?: string | undefined;
3560
+ timeout?: number | undefined;
3561
+ timezone?: string | undefined;
3562
+ notify?: {
3563
+ channel: string;
3564
+ chatId: string;
3565
+ accountId?: string | undefined;
3566
+ } | undefined;
3567
+ maxOutputTokens?: number | undefined;
3568
+ autonomy?: "report" | "propose" | "act" | undefined;
3569
+ onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
3570
+ fireToken?: string | undefined;
3571
+ createdBy?: string | undefined;
3572
+ approval?: {
3573
+ action: "delete" | "create";
3574
+ requestedBy: string;
3575
+ requestedAt: string;
3576
+ } | undefined;
3577
+ }>, {
3578
+ enabled: boolean;
3579
+ agent: string;
3580
+ prompt: string;
3581
+ timeout: number;
3582
+ schedule: string;
3583
+ timezone: string;
3584
+ onError: ("notify" | "disable" | "log")[];
3383
3585
  model?: string | undefined;
3384
3586
  command?: string | undefined;
3385
3587
  notify?: {
@@ -3388,6 +3590,14 @@ declare const daemonConfigSchema: z.ZodObject<{
3388
3590
  accountId?: string | undefined;
3389
3591
  } | undefined;
3390
3592
  maxOutputTokens?: number | undefined;
3593
+ autonomy?: "report" | "propose" | "act" | undefined;
3594
+ fireToken?: string | undefined;
3595
+ createdBy?: string | undefined;
3596
+ approval?: {
3597
+ action: "delete" | "create";
3598
+ requestedBy: string;
3599
+ requestedAt: string;
3600
+ } | undefined;
3391
3601
  }, {
3392
3602
  agent: string;
3393
3603
  schedule: string;
@@ -3403,7 +3613,15 @@ declare const daemonConfigSchema: z.ZodObject<{
3403
3613
  accountId?: string | undefined;
3404
3614
  } | undefined;
3405
3615
  maxOutputTokens?: number | undefined;
3406
- onError?: "notify" | "log" | "disable" | ("notify" | "log" | "disable")[] | undefined;
3616
+ autonomy?: "report" | "propose" | "act" | undefined;
3617
+ onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
3618
+ fireToken?: string | undefined;
3619
+ createdBy?: string | undefined;
3620
+ approval?: {
3621
+ action: "delete" | "create";
3622
+ requestedBy: string;
3623
+ requestedAt: string;
3624
+ } | undefined;
3407
3625
  }>, {
3408
3626
  enabled: boolean;
3409
3627
  agent: string;
@@ -3411,7 +3629,7 @@ declare const daemonConfigSchema: z.ZodObject<{
3411
3629
  timeout: number;
3412
3630
  schedule: string;
3413
3631
  timezone: string;
3414
- onError: ("notify" | "log" | "disable")[];
3632
+ onError: ("notify" | "disable" | "log")[];
3415
3633
  model?: string | undefined;
3416
3634
  command?: string | undefined;
3417
3635
  notify?: {
@@ -3420,6 +3638,14 @@ declare const daemonConfigSchema: z.ZodObject<{
3420
3638
  accountId?: string | undefined;
3421
3639
  } | undefined;
3422
3640
  maxOutputTokens?: number | undefined;
3641
+ autonomy?: "report" | "propose" | "act" | undefined;
3642
+ fireToken?: string | undefined;
3643
+ createdBy?: string | undefined;
3644
+ approval?: {
3645
+ action: "delete" | "create";
3646
+ requestedBy: string;
3647
+ requestedAt: string;
3648
+ } | undefined;
3423
3649
  }, {
3424
3650
  agent: string;
3425
3651
  schedule: string;
@@ -3435,7 +3661,15 @@ declare const daemonConfigSchema: z.ZodObject<{
3435
3661
  accountId?: string | undefined;
3436
3662
  } | undefined;
3437
3663
  maxOutputTokens?: number | undefined;
3438
- onError?: "notify" | "log" | "disable" | ("notify" | "log" | "disable")[] | undefined;
3664
+ autonomy?: "report" | "propose" | "act" | undefined;
3665
+ onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
3666
+ fireToken?: string | undefined;
3667
+ createdBy?: string | undefined;
3668
+ approval?: {
3669
+ action: "delete" | "create";
3670
+ requestedBy: string;
3671
+ requestedAt: string;
3672
+ } | undefined;
3439
3673
  }>>>;
3440
3674
  services: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
3441
3675
  name: z.ZodString;
@@ -3531,7 +3765,38 @@ declare const daemonConfigSchema: z.ZodObject<{
3531
3765
  taskError?: boolean | undefined;
3532
3766
  taskQueued?: boolean | undefined;
3533
3767
  }>>;
3768
+ /** What `agentx notify` does on this machine when it delivers: a desktop
3769
+ * banner and a system sound. macOS only; see src/notify/local.ts. */
3770
+ local: z.ZodDefault<z.ZodObject<{
3771
+ banner: z.ZodDefault<z.ZodBoolean>;
3772
+ sound: z.ZodDefault<z.ZodBoolean>;
3773
+ /** A name from /System/Library/Sounds, without the extension. */
3774
+ soundName: z.ZodDefault<z.ZodString>;
3775
+ volume: z.ZodDefault<z.ZodNumber>;
3776
+ /** Image for the AgentX Helper icon on banners (.png, .jpg, .icns).
3777
+ * Unset: the AgentX logo. Applied by `agentx desktop install`. */
3778
+ icon: z.ZodOptional<z.ZodString>;
3779
+ }, "strip", z.ZodTypeAny, {
3780
+ banner: boolean;
3781
+ sound: boolean;
3782
+ soundName: string;
3783
+ volume: number;
3784
+ icon?: string | undefined;
3785
+ }, {
3786
+ banner?: boolean | undefined;
3787
+ sound?: boolean | undefined;
3788
+ soundName?: string | undefined;
3789
+ volume?: number | undefined;
3790
+ icon?: string | undefined;
3791
+ }>>;
3534
3792
  }, "strip", z.ZodTypeAny, {
3793
+ local: {
3794
+ banner: boolean;
3795
+ sound: boolean;
3796
+ soundName: string;
3797
+ volume: number;
3798
+ icon?: string | undefined;
3799
+ };
3535
3800
  on: {
3536
3801
  taskComplete: boolean;
3537
3802
  taskError: boolean;
@@ -3544,6 +3809,13 @@ declare const daemonConfigSchema: z.ZodObject<{
3544
3809
  accountId?: string | undefined;
3545
3810
  } | undefined;
3546
3811
  }, {
3812
+ local?: {
3813
+ banner?: boolean | undefined;
3814
+ sound?: boolean | undefined;
3815
+ soundName?: string | undefined;
3816
+ volume?: number | undefined;
3817
+ icon?: string | undefined;
3818
+ } | undefined;
3547
3819
  on?: {
3548
3820
  taskComplete?: boolean | undefined;
3549
3821
  taskError?: boolean | undefined;
@@ -3685,16 +3957,21 @@ declare const daemonConfigSchema: z.ZodObject<{
3685
3957
  system: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
3686
3958
  /** Language for assigned system voices, e.g. "en", "fr-FR". */
3687
3959
  locale: z.ZodDefault<z.ZodString>;
3960
+ /** What agents call the person they talk with, e.g. a first name.
3961
+ * Unset: "the user". */
3962
+ listener: z.ZodOptional<z.ZodString>;
3688
3963
  }, "strip", z.ZodTypeAny, {
3689
3964
  provider: "system" | "elevenlabs";
3690
3965
  fallback: "system" | "none";
3691
3966
  locale: string;
3692
3967
  system?: string | Record<string, string> | undefined;
3968
+ listener?: string | undefined;
3693
3969
  }, {
3694
3970
  system?: string | Record<string, string> | undefined;
3695
3971
  provider?: "system" | "elevenlabs" | undefined;
3696
3972
  fallback?: "system" | "none" | undefined;
3697
3973
  locale?: string | undefined;
3974
+ listener?: string | undefined;
3698
3975
  }>>;
3699
3976
  business: z.ZodOptional<z.ZodObject<{
3700
3977
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -4041,8 +4318,7 @@ declare const daemonConfigSchema: z.ZodObject<{
4041
4318
  type: "gitlab";
4042
4319
  projects: string[];
4043
4320
  }>]>;
4044
- primaryToolLabel: z.ZodOptional<z.ZodString>; /** Non-secret metadata — username, email, host URL, portal id, JID, etc.
4045
- * Visible in the dashboard and to skills. */
4321
+ primaryToolLabel: z.ZodOptional<z.ZodString>;
4046
4322
  labels: z.ZodDefault<z.ZodArray<z.ZodObject<{
4047
4323
  name: z.ZodString;
4048
4324
  color: z.ZodDefault<z.ZodString>;
@@ -4170,7 +4446,7 @@ declare const daemonConfigSchema: z.ZodObject<{
4170
4446
  port: z.ZodDefault<z.ZodNumber>;
4171
4447
  bind: z.ZodDefault<z.ZodString>;
4172
4448
  token: z.ZodOptional<z.ZodString>;
4173
- daemonUrl: z.ZodDefault<z.ZodString>; /** Overrides the global voice.provider for this agent. */
4449
+ daemonUrl: z.ZodDefault<z.ZodString>;
4174
4450
  daemons: z.ZodDefault<z.ZodArray<z.ZodObject<{
4175
4451
  name: z.ZodString;
4176
4452
  url: z.ZodString;
@@ -4721,7 +4997,7 @@ declare const daemonConfigSchema: z.ZodObject<{
4721
4997
  autoRunThreshold: number;
4722
4998
  suggestThreshold: number;
4723
4999
  };
4724
- editor: "disabled" | "readonly" | "edit";
5000
+ editor: "edit" | "disabled" | "readonly";
4725
5001
  }, {
4726
5002
  dir?: string | undefined;
4727
5003
  enabled?: boolean | undefined;
@@ -4735,7 +5011,7 @@ declare const daemonConfigSchema: z.ZodObject<{
4735
5011
  autoRunThreshold?: number | undefined;
4736
5012
  suggestThreshold?: number | undefined;
4737
5013
  } | undefined;
4738
- editor?: "disabled" | "readonly" | "edit" | undefined;
5014
+ editor?: "edit" | "disabled" | "readonly" | undefined;
4739
5015
  }>>;
4740
5016
  /** Procedures — user-perspective SOPs mined from recurring activity.
4741
5017
  * The extraction cadence itself lives in `crons.procedure-extract`
@@ -4982,7 +5258,7 @@ declare const daemonConfigSchema: z.ZodObject<{
4982
5258
  billing: "api" | "subscription";
4983
5259
  toolUseRequired: string[];
4984
5260
  persistentProcess: boolean;
4985
- queueMode: "collect" | "followup" | "drop";
5261
+ queueMode: "drop" | "collect" | "followup";
4986
5262
  heartbeat: {
4987
5263
  enabled: boolean;
4988
5264
  prompt: string;
@@ -5021,6 +5297,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5021
5297
  }> | undefined;
5022
5298
  contextStrategy?: "layered" | "planner" | undefined;
5023
5299
  gitlabAutoReply?: boolean | undefined;
5300
+ admin?: boolean | undefined;
5024
5301
  voice?: {
5025
5302
  system?: string | Record<string, string> | undefined;
5026
5303
  provider?: "system" | "elevenlabs" | undefined;
@@ -5060,6 +5337,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5060
5337
  fallback: "system" | "none";
5061
5338
  locale: string;
5062
5339
  system?: string | Record<string, string> | undefined;
5340
+ listener?: string | undefined;
5063
5341
  };
5064
5342
  node: {
5065
5343
  id: string;
@@ -5089,12 +5367,12 @@ declare const daemonConfigSchema: z.ZodObject<{
5089
5367
  channels: {
5090
5368
  gitlab: {
5091
5369
  enabled: boolean;
5370
+ host: string;
5092
5371
  routes: {
5093
5372
  agent: string;
5094
5373
  project: string;
5095
5374
  }[];
5096
5375
  webhookPort: number;
5097
- host: string;
5098
5376
  autoReplyLegacy: boolean;
5099
5377
  agentMappings: {
5100
5378
  agentId: string;
@@ -5143,8 +5421,8 @@ declare const daemonConfigSchema: z.ZodObject<{
5143
5421
  allowFrom?: string[] | undefined;
5144
5422
  }>;
5145
5423
  policy: {
5146
- dm: "block" | "pair";
5147
5424
  group: "all" | "mention-required";
5425
+ dm: "block" | "pair";
5148
5426
  allowFrom?: string[] | undefined;
5149
5427
  };
5150
5428
  };
@@ -5215,7 +5493,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5215
5493
  timeout: number;
5216
5494
  schedule: string;
5217
5495
  timezone: string;
5218
- onError: ("notify" | "log" | "disable")[];
5496
+ onError: ("notify" | "disable" | "log")[];
5219
5497
  model?: string | undefined;
5220
5498
  command?: string | undefined;
5221
5499
  notify?: {
@@ -5224,6 +5502,14 @@ declare const daemonConfigSchema: z.ZodObject<{
5224
5502
  accountId?: string | undefined;
5225
5503
  } | undefined;
5226
5504
  maxOutputTokens?: number | undefined;
5505
+ autonomy?: "report" | "propose" | "act" | undefined;
5506
+ fireToken?: string | undefined;
5507
+ createdBy?: string | undefined;
5508
+ approval?: {
5509
+ action: "delete" | "create";
5510
+ requestedBy: string;
5511
+ requestedAt: string;
5512
+ } | undefined;
5227
5513
  }>;
5228
5514
  services: Record<string, {
5229
5515
  agent: string;
@@ -5243,6 +5529,13 @@ declare const daemonConfigSchema: z.ZodObject<{
5243
5529
  allowedContacts?: string[] | undefined;
5244
5530
  }>;
5245
5531
  notifications: {
5532
+ local: {
5533
+ banner: boolean;
5534
+ sound: boolean;
5535
+ soundName: string;
5536
+ volume: number;
5537
+ icon?: string | undefined;
5538
+ };
5246
5539
  on: {
5247
5540
  taskComplete: boolean;
5248
5541
  taskError: boolean;
@@ -5384,7 +5677,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5384
5677
  autoRunThreshold: number;
5385
5678
  suggestThreshold: number;
5386
5679
  };
5387
- editor: "disabled" | "readonly" | "edit";
5680
+ editor: "edit" | "disabled" | "readonly";
5388
5681
  };
5389
5682
  procedures: {
5390
5683
  dir: string;
@@ -5535,7 +5828,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5535
5828
  toolUseRequired?: string[] | undefined;
5536
5829
  gitlabAutoReply?: boolean | undefined;
5537
5830
  persistentProcess?: boolean | undefined;
5538
- queueMode?: "collect" | "followup" | "drop" | undefined;
5831
+ queueMode?: "drop" | "collect" | "followup" | undefined;
5539
5832
  heartbeat?: {
5540
5833
  enabled?: boolean | undefined;
5541
5834
  prompt?: string | undefined;
@@ -5543,6 +5836,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5543
5836
  intervalMinutes?: number | undefined;
5544
5837
  } | undefined;
5545
5838
  access?: "private" | "public" | undefined;
5839
+ admin?: boolean | undefined;
5546
5840
  integrations?: {
5547
5841
  label: string;
5548
5842
  kind: string;
@@ -5598,6 +5892,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5598
5892
  provider?: "system" | "elevenlabs" | undefined;
5599
5893
  fallback?: "system" | "none" | undefined;
5600
5894
  locale?: string | undefined;
5895
+ listener?: string | undefined;
5601
5896
  } | undefined;
5602
5897
  graph?: {
5603
5898
  enabled?: boolean | undefined;
@@ -5622,13 +5917,13 @@ declare const daemonConfigSchema: z.ZodObject<{
5622
5917
  gitlab?: {
5623
5918
  enabled?: boolean | undefined;
5624
5919
  token?: string | undefined;
5920
+ host?: string | undefined;
5625
5921
  routes?: {
5626
5922
  agent: string;
5627
5923
  project: string;
5628
5924
  }[] | undefined;
5629
5925
  webhookPort?: number | undefined;
5630
5926
  webhookSecret?: string | undefined;
5631
- host?: string | undefined;
5632
5927
  autoReplyLegacy?: boolean | undefined;
5633
5928
  agentMappings?: {
5634
5929
  agentId: string;
@@ -5675,9 +5970,9 @@ declare const daemonConfigSchema: z.ZodObject<{
5675
5970
  pollInbound?: boolean | undefined;
5676
5971
  }> | undefined;
5677
5972
  policy?: {
5973
+ group?: "all" | "mention-required" | undefined;
5678
5974
  allowFrom?: string[] | undefined;
5679
5975
  dm?: "block" | "pair" | undefined;
5680
- group?: "all" | "mention-required" | undefined;
5681
5976
  } | undefined;
5682
5977
  } | undefined;
5683
5978
  github?: {
@@ -5755,7 +6050,15 @@ declare const daemonConfigSchema: z.ZodObject<{
5755
6050
  accountId?: string | undefined;
5756
6051
  } | undefined;
5757
6052
  maxOutputTokens?: number | undefined;
5758
- onError?: "notify" | "log" | "disable" | ("notify" | "log" | "disable")[] | undefined;
6053
+ autonomy?: "report" | "propose" | "act" | undefined;
6054
+ onError?: "notify" | "disable" | "log" | ("notify" | "disable" | "log")[] | undefined;
6055
+ fireToken?: string | undefined;
6056
+ createdBy?: string | undefined;
6057
+ approval?: {
6058
+ action: "delete" | "create";
6059
+ requestedBy: string;
6060
+ requestedAt: string;
6061
+ } | undefined;
5759
6062
  }> | undefined;
5760
6063
  services?: Record<string, {
5761
6064
  agent: string;
@@ -5775,6 +6078,13 @@ declare const daemonConfigSchema: z.ZodObject<{
5775
6078
  allowedContacts?: string[] | undefined;
5776
6079
  }> | undefined;
5777
6080
  notifications?: {
6081
+ local?: {
6082
+ banner?: boolean | undefined;
6083
+ sound?: boolean | undefined;
6084
+ soundName?: string | undefined;
6085
+ volume?: number | undefined;
6086
+ icon?: string | undefined;
6087
+ } | undefined;
5778
6088
  on?: {
5779
6089
  taskComplete?: boolean | undefined;
5780
6090
  taskError?: boolean | undefined;
@@ -5984,7 +6294,7 @@ declare const daemonConfigSchema: z.ZodObject<{
5984
6294
  autoRunThreshold?: number | undefined;
5985
6295
  suggestThreshold?: number | undefined;
5986
6296
  } | undefined;
5987
- editor?: "disabled" | "readonly" | "edit" | undefined;
6297
+ editor?: "edit" | "disabled" | "readonly" | undefined;
5988
6298
  } | undefined;
5989
6299
  procedures?: {
5990
6300
  dir?: string | undefined;
@@ -6360,6 +6670,11 @@ declare class AgentXDaemon {
6360
6670
  /** Workflow health for the monitor. Cached for a minute: the dashboard
6361
6671
  * polls every 15s and dormancy does not change on that timescale. */
6362
6672
  private workflowHealth;
6673
+ private routinesCache?;
6674
+ /** Schedules and cron/hook-triggered workflows merged into one bounded
6675
+ * list (GET /routines). Cached briefly: the mesh overview polls every
6676
+ * few seconds and each build opens the newest run files per job. */
6677
+ private routines;
6363
6678
  private db;
6364
6679
  private loadedPlugins;
6365
6680
  private readonly agentMemory;
@@ -6875,6 +7190,18 @@ interface SeededMessage {
6875
7190
  accountId?: string;
6876
7191
  }
6877
7192
 
7193
+ declare const autonomyLevelSchema: z.ZodEnum<["report", "propose", "act"]>;
7194
+ type AutonomyLevel = z.infer<typeof autonomyLevelSchema>;
7195
+
7196
+ interface AutonomyBlock {
7197
+ ts: number;
7198
+ tool: string;
7199
+ /** Command or file path the call targeted, truncated. */
7200
+ target: string | null;
7201
+ ruleId: string;
7202
+ reason: string;
7203
+ }
7204
+
6878
7205
  interface AgentPeer {
6879
7206
  id: string;
6880
7207
  name: string;
@@ -6924,6 +7251,15 @@ interface AgentTask {
6924
7251
  * parser can append rows under the same id. Optional — when unset,
6925
7252
  * step capture is a no-op. */
6926
7253
  taskId?: string;
7254
+ /** The id the dashboard knows this run by (RunningTask.id — live stream,
7255
+ * cancel, follow-up, persisted TaskRecord). Set by registry.execute once
7256
+ * the run holds a slot; distinct from `taskId`, which is the trace id.
7257
+ * Callers that dispatch without an HTTP stream (cron) read it back to
7258
+ * link the run to the Task page. */
7259
+ runningTaskId?: string;
7260
+ /** Called with `runningTaskId` as soon as the run starts. Never fires for
7261
+ * a message that was queued or dropped instead of run. */
7262
+ onStart?: (runningTaskId: string) => void;
6927
7263
  /** Improvement plan #8 — when true, the dispatcher discards any
6928
7264
  * cached session for this (agent, channel, chatId) before
6929
7265
  * executing: the claudeSessionId is cleared (no --resume) and
@@ -6943,6 +7279,11 @@ interface AgentTask {
6943
7279
  * Seeds an empty AgentX session the same way a channel adapter's
6944
7280
  * seedHistory does, so a new or rotated session starts with it. */
6945
7281
  seedHistory?: SeededMessage[];
7282
+ /** Routine autonomy level (cron job / workflow agent step). `report` and
7283
+ * `propose` are enforced for THIS task only via a per-spawn guard hook
7284
+ * (see guard/autonomy-enforce.ts); unset or `act` = the agent's normal
7285
+ * permissions. Tiers that cannot enforce it refuse the task. */
7286
+ autonomy?: AutonomyLevel;
6946
7287
  context?: {
6947
7288
  channel?: string;
6948
7289
  sender?: string;
@@ -7034,6 +7375,11 @@ interface AgentResponse {
7034
7375
  * the task instead of a spawned provider (attach mode). Claude Code
7035
7376
  * session id of the terminal that wrote the reply. */
7036
7377
  viaAttachedSession?: string;
7378
+ /** Set on tasks that ran under a restricted autonomy level. */
7379
+ autonomy?: AutonomyLevel;
7380
+ /** Tool calls the autonomy guard blocked during this task — what the
7381
+ * routine would have done with more power. */
7382
+ autonomyBlocks?: AutonomyBlock[];
7037
7383
  }
7038
7384
  /** Callback for streaming text deltas */
7039
7385
  type StreamCallback = (delta: string, fullText: string) => void;
@@ -8548,6 +8894,20 @@ interface TaskRecord {
8548
8894
  /** Terminal-style transcript captured from stream-json events. */
8549
8895
  transcript: string;
8550
8896
  }
8897
+ /** Outcome of AgentRegistry.continueFinishedTask. `taskId` is the new run's
8898
+ * dashboard id; absent when the message was queued behind a busy slot. */
8899
+ type ContinueFinishedTaskResult = {
8900
+ ok: true;
8901
+ agentId: string;
8902
+ channel: string;
8903
+ chatId: string;
8904
+ taskId?: string;
8905
+ queued: boolean;
8906
+ } | {
8907
+ ok: false;
8908
+ status: 404 | 409 | 500;
8909
+ error: string;
8910
+ };
8551
8911
  declare class AgentRegistry {
8552
8912
  private agents;
8553
8913
  private config;
@@ -8809,6 +9169,23 @@ declare class AgentRegistry {
8809
9169
  edited: boolean;
8810
9170
  pending: number;
8811
9171
  } | null;
9172
+ /**
9173
+ * Operator follow-up on a task that has already finished: dispatch the
9174
+ * message as a new turn on the same (channel, chatId), so the session
9175
+ * resumes with the finished run's context.
9176
+ *
9177
+ * Scheduled runs only. A cron chat has no person on the other end, so the
9178
+ * Task page is the only place its reply is read. Resuming a Telegram or
9179
+ * GitLab conversation from here would run a turn whose reply never reaches
9180
+ * the person in that chat, which is worse than refusing.
9181
+ *
9182
+ * Resolves once the new run starts (with its task id, for the Task page)
9183
+ * or, if the agent is busy and the message was queued, once execute
9184
+ * returns without one.
9185
+ */
9186
+ continueFinishedTask(agentId: string, taskId: string, message: string, sender: string, opts?: {
9187
+ model?: (chatId: string) => string | undefined;
9188
+ }): Promise<ContinueFinishedTaskResult>;
8812
9189
  /**
8813
9190
  * Subscribe to live output for a running task. Returns the buffer that has
8814
9191
  * accumulated so far plus an unsubscribe handle. If the task is unknown,
@@ -8846,7 +9223,7 @@ declare class AgentRegistry {
8846
9223
  byChannel: Record<string, {
8847
9224
  tasks: number;
8848
9225
  cost: number;
8849
- }>; /** Runtime handover store — shared with MessageRouter via file on disk. */
9226
+ }>;
8850
9227
  sessionStats: Record<string, {
8851
9228
  sessions: number;
8852
9229
  avgTasksPerSession: number;
@@ -10396,6 +10773,8 @@ interface CronJobState {
10396
10773
  * via the prompt tail; reliably honored and keeps cache-hit intact
10397
10774
  * (hint text is per-job, not per-run). */
10398
10775
  maxOutputTokens?: number;
10776
+ /** Routine autonomy level; unset = act (full agent permissions). */
10777
+ autonomy?: AutonomyLevel;
10399
10778
  onError: Array<"log" | "notify" | "disable">;
10400
10779
  lastRun?: Date;
10401
10780
  nextRun?: Date;
@@ -10418,12 +10797,37 @@ interface CronRunResult {
10418
10797
  /** Was this a retry attempt? */
10419
10798
  isRetry?: boolean;
10420
10799
  retryAttempt?: number;
10800
+ /** Started on demand via POST /routines/:id/fire, not by the schedule. */
10801
+ fired?: boolean;
10802
+ /** Dashboard task id of the agent run (RunningTask.id / TaskRecord.id),
10803
+ * so the run opens on the Task page. Absent for command jobs, which
10804
+ * never reach an agent. */
10805
+ taskId?: string;
10806
+ /** Per-execution trace id (task_traces row, /api/mesh/run). */
10807
+ traceId?: string;
10808
+ /** Native provider session the run resumed or started, when reported. */
10809
+ sessionId?: string;
10810
+ /** Autonomy level the run was held to (absent = act). */
10811
+ autonomy?: AutonomyLevel;
10812
+ /** Tool calls the autonomy guard blocked — what the routine would have
10813
+ * done with more power. */
10814
+ autonomyBlocks?: AutonomyBlock[];
10421
10815
  }
10422
10816
 
10817
+ type FireNowResult = {
10818
+ ok: true;
10819
+ runId: string;
10820
+ startedAt: string;
10821
+ } | {
10822
+ ok: false;
10823
+ reason: "unknown" | "disabled" | "not-running";
10824
+ };
10423
10825
  /** Notification callback — injected by daemon to send alerts via channels */
10424
10826
  type CronNotifyCallback = (jobId: string, agent: string, error: string, consecutiveErrors: number) => Promise<void>;
10425
10827
  declare class CronScheduler {
10426
10828
  private jobs;
10829
+ /** Kept apart from `jobs`, which is served as-is by GET /crons. */
10830
+ private fireTokens;
10427
10831
  private timers;
10428
10832
  private registry;
10429
10833
  private hooks?;
@@ -10433,6 +10837,18 @@ declare class CronScheduler {
10433
10837
  private notifyCallback?;
10434
10838
  private log;
10435
10839
  constructor(config: DaemonConfig, registry: AgentRegistry, hooks?: HookRegistry, log?: (...args: unknown[]) => void);
10840
+ /** Whether a job with this id exists. */
10841
+ hasJob(jobId: string): boolean;
10842
+ /** The job's configured fire token (env-expanded), if any. */
10843
+ getFireToken(jobId: string): string | undefined;
10844
+ /**
10845
+ * Start one run of `jobId` now, outside its schedule, with `payload` as
10846
+ * untrusted event context. Returns as soon as the run is started; the
10847
+ * run itself goes through the same path as a scheduled one (hooks,
10848
+ * ledger, run record, failure counters, notify, auto-disable) but never
10849
+ * schedules retries or touches the next scheduled fire.
10850
+ */
10851
+ fireNow(jobId: string, payload?: unknown): FireNowResult;
10436
10852
  /**
10437
10853
  * Set a notification callback for failed crons.
10438
10854
  * Called when onError is "notify" or after multiple consecutive failures.