nodal-agents 0.7.95 → 0.8.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 (204) hide show
  1. package/cli.js +366 -122
  2. package/migrations/0068_credentials_microsoft_oauth.sql +7 -0
  3. package/migrations/0069_skill_update_tracking.sql +10 -0
  4. package/migrations/0070_dead_schema_cleanup_and_schedule_index.sql +16 -0
  5. package/migrations/0071_agent_reasoning_effort.sql +8 -0
  6. package/migrations/0072_connectors_entity_slug_unique.sql +17 -0
  7. package/migrations/meta/_journal.json +35 -0
  8. package/package.json +1 -1
  9. package/runner.js +108176 -53704
  10. package/web/.next/BUILD_ID +1 -1
  11. package/web/.next/app-path-routes-manifest.json +3 -3
  12. package/web/.next/build-manifest.json +2 -2
  13. package/web/.next/prerender-manifest.json +3 -3
  14. package/web/.next/required-server-files.json +0 -1
  15. package/web/.next/server/app/(dashboard)/agents/[id]/channels/page.js +2 -2
  16. package/web/.next/server/app/(dashboard)/agents/[id]/channels/page.js.nft.json +1 -1
  17. package/web/.next/server/app/(dashboard)/agents/[id]/channels/page_client-reference-manifest.js +1 -1
  18. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js +5 -5
  19. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js.nft.json +1 -1
  20. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page_client-reference-manifest.js +1 -1
  21. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js +2 -2
  22. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js.nft.json +1 -1
  23. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page_client-reference-manifest.js +1 -1
  24. package/web/.next/server/app/(dashboard)/agents/page.js +2 -2
  25. package/web/.next/server/app/(dashboard)/agents/page.js.nft.json +1 -1
  26. package/web/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -1
  27. package/web/.next/server/app/(dashboard)/approvals/page.js +2 -2
  28. package/web/.next/server/app/(dashboard)/approvals/page.js.nft.json +1 -1
  29. package/web/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
  30. package/web/.next/server/app/(dashboard)/automations/page.js +2 -2
  31. package/web/.next/server/app/(dashboard)/automations/page.js.nft.json +1 -1
  32. package/web/.next/server/app/(dashboard)/automations/page_client-reference-manifest.js +1 -1
  33. package/web/.next/server/app/(dashboard)/chat/page.js +2 -2
  34. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  35. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  36. package/web/.next/server/app/(dashboard)/connectors/page.js +2 -2
  37. package/web/.next/server/app/(dashboard)/connectors/page.js.nft.json +1 -1
  38. package/web/.next/server/app/(dashboard)/connectors/page_client-reference-manifest.js +1 -1
  39. package/web/.next/server/app/(dashboard)/credentials/page.js +2 -2
  40. package/web/.next/server/app/(dashboard)/credentials/page.js.nft.json +1 -1
  41. package/web/.next/server/app/(dashboard)/credentials/page_client-reference-manifest.js +1 -1
  42. package/web/.next/server/app/(dashboard)/jobs/[id]/page.js +2 -2
  43. package/web/.next/server/app/(dashboard)/jobs/[id]/page.js.nft.json +1 -1
  44. package/web/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -1
  45. package/web/.next/server/app/(dashboard)/jobs/page.js +2 -2
  46. package/web/.next/server/app/(dashboard)/jobs/page.js.nft.json +1 -1
  47. package/web/.next/server/app/(dashboard)/jobs/page_client-reference-manifest.js +1 -1
  48. package/web/.next/server/app/(dashboard)/learned-skills/page.js +2 -2
  49. package/web/.next/server/app/(dashboard)/learned-skills/page.js.nft.json +1 -1
  50. package/web/.next/server/app/(dashboard)/learned-skills/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/(dashboard)/llm-providers/page.js +2 -2
  52. package/web/.next/server/app/(dashboard)/llm-providers/page.js.nft.json +1 -1
  53. package/web/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
  54. package/web/.next/server/app/(dashboard)/logs/page.js +2 -2
  55. package/web/.next/server/app/(dashboard)/logs/page.js.nft.json +1 -1
  56. package/web/.next/server/app/(dashboard)/logs/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/(dashboard)/mcp/page.js +2 -2
  58. package/web/.next/server/app/(dashboard)/mcp/page.js.nft.json +1 -1
  59. package/web/.next/server/app/(dashboard)/mcp/page_client-reference-manifest.js +1 -1
  60. package/web/.next/server/app/(dashboard)/memories/page.js +2 -2
  61. package/web/.next/server/app/(dashboard)/memories/page.js.nft.json +1 -1
  62. package/web/.next/server/app/(dashboard)/memories/page_client-reference-manifest.js +1 -1
  63. package/web/.next/server/app/(dashboard)/page.js +4 -4
  64. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  65. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  66. package/web/.next/server/app/(dashboard)/settings/page.js +2 -2
  67. package/web/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  68. package/web/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  69. package/web/.next/server/app/(dashboard)/settings/root-context/page.js +2 -2
  70. package/web/.next/server/app/(dashboard)/settings/root-context/page.js.nft.json +1 -1
  71. package/web/.next/server/app/(dashboard)/settings/root-context/page_client-reference-manifest.js +1 -1
  72. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js +2 -2
  73. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js.nft.json +1 -1
  74. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page_client-reference-manifest.js +1 -1
  75. package/web/.next/server/app/(dashboard)/skills/new/page.js +2 -2
  76. package/web/.next/server/app/(dashboard)/skills/new/page.js.nft.json +1 -1
  77. package/web/.next/server/app/(dashboard)/skills/new/page_client-reference-manifest.js +1 -1
  78. package/web/.next/server/app/(dashboard)/skills/page.js +2 -2
  79. package/web/.next/server/app/(dashboard)/skills/page.js.nft.json +1 -1
  80. package/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
  81. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  82. package/web/.next/server/app/_global-error.html +1 -1
  83. package/web/.next/server/app/_global-error.rsc +2 -2
  84. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  85. package/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  86. package/web/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  87. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  88. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +2 -2
  89. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  90. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  91. package/web/.next/server/app/_not-found.html +1 -1
  92. package/web/.next/server/app/_not-found.rsc +3 -3
  93. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  94. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  95. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  96. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  97. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  98. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  99. package/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
  100. package/web/.next/server/app/onboarding/page.js +479 -216
  101. package/web/.next/server/app/onboarding/page.js.nft.json +1 -1
  102. package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  103. package/web/.next/server/app-paths-manifest.json +3 -3
  104. package/web/.next/server/chunks/110.js +1 -0
  105. package/web/.next/server/chunks/3532.js +1562 -0
  106. package/web/.next/server/chunks/4162.js +1 -1
  107. package/web/.next/server/chunks/4574.js +1 -1
  108. package/web/.next/server/chunks/7338.js +1 -0
  109. package/web/.next/server/chunks/7406.js +963 -0
  110. package/web/.next/server/chunks/8124.js +1 -1
  111. package/web/.next/server/chunks/9000.js +1 -1
  112. package/web/.next/server/chunks/{9606.js → 9206.js} +2 -2
  113. package/web/.next/server/chunks/9658.js +1 -0
  114. package/web/.next/server/chunks/9980.js +1 -0
  115. package/web/.next/server/middleware-build-manifest.js +1 -1
  116. package/web/.next/server/pages/404.html +1 -1
  117. package/web/.next/server/pages/500.html +1 -1
  118. package/web/.next/server/server-reference-manifest.js +1 -1
  119. package/web/.next/server/server-reference-manifest.json +1 -1
  120. package/web/.next/server/webpack-runtime.js +1 -1
  121. package/web/.next/static/chunks/1767-276c640d296eec05.js +1 -0
  122. package/web/.next/static/chunks/2281-e05f5bd05bd1e58f.js +1 -0
  123. package/web/.next/static/chunks/2491-d97394bc499315cf.js +1 -0
  124. package/web/.next/static/chunks/3094-091517168c49c9b0.js +1 -0
  125. package/web/.next/static/chunks/3134-a7a89cfcd6a729e6.js +1 -0
  126. package/web/.next/static/chunks/{7424-974350c1c75fafc8.js → 3936-e31a66a853dd784d.js} +3 -3
  127. package/web/.next/static/chunks/4095-37cba46239b55c12.js +1 -0
  128. package/web/.next/static/chunks/4766-ad895195f4619f9a.js +1 -0
  129. package/web/.next/static/chunks/6705-e62a2adfe0621030.js +1 -0
  130. package/web/.next/static/chunks/7012-92ef7196202b9a73.js +1 -0
  131. package/web/.next/static/chunks/8974-496f0631dfe63afe.js +1 -0
  132. package/web/.next/static/chunks/9357-7eb52ef3a9adf63c.js +1 -0
  133. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-5868029a767a4483.js +6 -0
  134. package/web/.next/static/chunks/app/(dashboard)/agents/page-b55d2ba0abddccd2.js +1 -0
  135. package/web/.next/static/chunks/app/(dashboard)/approvals/{page-d907a7c12917ab8a.js → page-bec3d5b529a02bbd.js} +1 -1
  136. package/web/.next/static/chunks/app/(dashboard)/automations/page-6291d14dfa26f462.js +1 -0
  137. package/web/.next/static/chunks/app/(dashboard)/chat/page-c0fe221053167e9e.js +1 -0
  138. package/web/.next/static/chunks/app/(dashboard)/connectors/page-2510a31202190a3c.js +1 -0
  139. package/web/.next/static/chunks/app/(dashboard)/credentials/page-e477f26c7a8dcdad.js +1 -0
  140. package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-0479dfc167c614a3.js +1 -0
  141. package/web/.next/static/chunks/app/(dashboard)/jobs/page-fae90233f74f9942.js +1 -0
  142. package/web/.next/static/chunks/app/(dashboard)/layout-dfb15f7bd103f9aa.js +1 -0
  143. package/web/.next/static/chunks/app/(dashboard)/learned-skills/page-139c72fed1a7b0ee.js +1 -0
  144. package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-b2a71093abd7c23a.js +1 -0
  145. package/web/.next/static/chunks/app/(dashboard)/logs/page-98079bb083a6fee5.js +1 -0
  146. package/web/.next/static/chunks/app/(dashboard)/mcp/page-8cb26c15cf263f34.js +1 -0
  147. package/web/.next/static/chunks/app/(dashboard)/memories/page-457ddaff36650022.js +1 -0
  148. package/web/.next/static/chunks/app/(dashboard)/{page-3bf3a72ec95863d8.js → page-014aef223cd5349b.js} +1 -1
  149. package/web/.next/static/chunks/app/(dashboard)/settings/page-107b8f146354bfb6.js +1 -0
  150. package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-b73c2bb6ef38f4bc.js +1 -0
  151. package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-8efac48952885142.js +1 -0
  152. package/web/.next/static/chunks/app/(dashboard)/skills/new/page-bc281836b9fa28e8.js +1 -0
  153. package/web/.next/static/chunks/app/(dashboard)/skills/page-833966a115ef4c74.js +1 -0
  154. package/web/.next/static/chunks/app/onboarding/page-dbfc20e08aa64485.js +26 -0
  155. package/web/.next/static/css/3f35687813e28932.css +3 -0
  156. package/web/public/connector-icons/outlook-mail.svg +5 -0
  157. package/web/server.js +1 -1
  158. package/web/.next/server/chunks/1466.js +0 -1
  159. package/web/.next/server/chunks/1767.js +0 -1
  160. package/web/.next/server/chunks/3308.js +0 -1
  161. package/web/.next/server/chunks/5300.js +0 -1
  162. package/web/.next/server/chunks/5773.js +0 -3
  163. package/web/.next/server/chunks/6184.js +0 -1
  164. package/web/.next/server/chunks/6539.js +0 -1
  165. package/web/.next/server/chunks/7124.js +0 -1532
  166. package/web/.next/server/chunks/8380.js +0 -1
  167. package/web/.next/server/chunks/8909.js +0 -1
  168. package/web/.next/server/chunks/9137.js +0 -1
  169. package/web/.next/server/chunks/9507.js +0 -730
  170. package/web/.next/server/chunks/9982.js +0 -1
  171. package/web/.next/static/chunks/2406-66d8aa55b97d75c3.js +0 -1
  172. package/web/.next/static/chunks/2491-b14243a2db419dd9.js +0 -1
  173. package/web/.next/static/chunks/3966-679a4c07d6db8ee6.js +0 -1
  174. package/web/.next/static/chunks/4095-f76de40c53ae3d47.js +0 -1
  175. package/web/.next/static/chunks/4766-d80c537321cca448.js +0 -1
  176. package/web/.next/static/chunks/5953-54a29fc1e2d84c0c.js +0 -1
  177. package/web/.next/static/chunks/7829-78f753c50b408cde.js +0 -1
  178. package/web/.next/static/chunks/8161-b09081c59130e8e5.js +0 -1
  179. package/web/.next/static/chunks/8542-ba178b7c68e14cf3.js +0 -1
  180. package/web/.next/static/chunks/8719-8ab59c5faa49c9ab.js +0 -1
  181. package/web/.next/static/chunks/9387-f5283e69fe4d4e83.js +0 -1
  182. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-74934ff99c3b1261.js +0 -6
  183. package/web/.next/static/chunks/app/(dashboard)/agents/page-8ec50d6f48425813.js +0 -1
  184. package/web/.next/static/chunks/app/(dashboard)/automations/page-dd20cb7f04d22cca.js +0 -1
  185. package/web/.next/static/chunks/app/(dashboard)/chat/page-e9ffd3d09a46ad38.js +0 -1
  186. package/web/.next/static/chunks/app/(dashboard)/connectors/page-52828e317e7a63e6.js +0 -1
  187. package/web/.next/static/chunks/app/(dashboard)/credentials/page-f84a3f991cf69228.js +0 -1
  188. package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-a0866da7952de417.js +0 -1
  189. package/web/.next/static/chunks/app/(dashboard)/jobs/page-aade90b389efb824.js +0 -1
  190. package/web/.next/static/chunks/app/(dashboard)/layout-10486dd8640fb6a0.js +0 -1
  191. package/web/.next/static/chunks/app/(dashboard)/learned-skills/page-e22d1e586ac8579c.js +0 -1
  192. package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-46858f7d737ee49b.js +0 -1
  193. package/web/.next/static/chunks/app/(dashboard)/logs/page-17dd2080f6196b01.js +0 -1
  194. package/web/.next/static/chunks/app/(dashboard)/mcp/page-81e83a08c7b65719.js +0 -1
  195. package/web/.next/static/chunks/app/(dashboard)/memories/page-0336ba541b5ab006.js +0 -1
  196. package/web/.next/static/chunks/app/(dashboard)/settings/page-0ee25e256bc3097f.js +0 -1
  197. package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-76653439bca06d8c.js +0 -1
  198. package/web/.next/static/chunks/app/(dashboard)/skills/[id]/edit/page-de1bf934a2c5e8b2.js +0 -1
  199. package/web/.next/static/chunks/app/(dashboard)/skills/new/page-a9640274b845190a.js +0 -1
  200. package/web/.next/static/chunks/app/(dashboard)/skills/page-928b6f005ba4dafb.js +0 -1
  201. package/web/.next/static/chunks/app/onboarding/page-d7c5a220f9244b45.js +0 -26
  202. package/web/.next/static/css/0f40c037c3aa9ff2.css +0 -3
  203. /package/web/.next/static/{TWzSfBwiIIU81SgNxXcIw → -ZFQ5_gc3weAZTV_iNuDl}/_buildManifest.js +0 -0
  204. /package/web/.next/static/{TWzSfBwiIIU81SgNxXcIw → -ZFQ5_gc3weAZTV_iNuDl}/_ssgManifest.js +0 -0
package/cli.js CHANGED
@@ -11040,7 +11040,7 @@ var init_types2 = __esm({
11040
11040
 
11041
11041
  // ../../packages/shared/src/enums.ts
11042
11042
  import { z as z2 } from "zod";
11043
- var JOB_CHANNELS, JobChannelSchema, JOB_STATUSES, JobStatusSchema, TASK_STATUSES, TaskStatusSchema, TASK_PRIORITIES, TaskPrioritySchema, AGENT_ROLES, AgentRoleSchema, ORCHESTRATOR_MODES, OrchestratorModeSchema, CONNECTOR_AUTH_TYPES, ConnectorAuthTypeSchema, APPROVAL_STATUSES, ApprovalStatusSchema, APPROVAL_RULE_ACTIONS, ApprovalRuleActionSchema, MEMORY_CATEGORIES, MemoryCategorySchema, MEMORY_SOURCES, MemorySourceSchema, MEMORY_LAYERS, MemoryLayerSchema, SCHEDULE_TYPES, ScheduleTypeSchema, SCHEDULE_LAST_STATUSES, ScheduleLastStatusSchema, ENTITY_MEMBER_ROLES, EntityMemberRoleSchema, ENTITY_INDUSTRIES, EntityIndustrySchema, OPERATION_RISK_LEVELS, OperationRiskLevelSchema, PLUGIN_TYPES, PluginTypeSchema, PLUGIN_HOOKS, PluginHookSchema, MCP_TRANSPORTS, McpTransportSchema;
11043
+ var JOB_CHANNELS, JobChannelSchema, JOB_STATUSES, JobStatusSchema, TASK_STATUSES, TaskStatusSchema, TASK_PRIORITIES, TaskPrioritySchema, AGENT_ROLES, AgentRoleSchema, ORCHESTRATOR_MODES, OrchestratorModeSchema, CONNECTOR_AUTH_TYPES, ConnectorAuthTypeSchema, APPROVAL_STATUSES, ApprovalStatusSchema, APPROVAL_RULE_ACTIONS, ApprovalRuleActionSchema, MEMORY_CATEGORIES, MemoryCategorySchema, MEMORY_SOURCES, MemorySourceSchema, MEMORY_LAYERS, MemoryLayerSchema, SCHEDULE_TYPES, ScheduleTypeSchema, SCHEDULE_LAST_STATUSES, ScheduleLastStatusSchema, ENTITY_MEMBER_ROLES, EntityMemberRoleSchema, ENTITY_INDUSTRIES, EntityIndustrySchema, OPERATION_RISK_LEVELS, OperationRiskLevelSchema, MCP_TRANSPORTS, McpTransportSchema;
11044
11044
  var init_enums = __esm({
11045
11045
  "../../packages/shared/src/enums.ts"() {
11046
11046
  "use strict";
@@ -11104,16 +11104,6 @@ var init_enums = __esm({
11104
11104
  EntityIndustrySchema = z2.enum(ENTITY_INDUSTRIES);
11105
11105
  OPERATION_RISK_LEVELS = ["read", "write", "destructive"];
11106
11106
  OperationRiskLevelSchema = z2.enum(OPERATION_RISK_LEVELS);
11107
- PLUGIN_TYPES = ["webhook", "transform", "schedule"];
11108
- PluginTypeSchema = z2.enum(PLUGIN_TYPES);
11109
- PLUGIN_HOOKS = [
11110
- "pre_task",
11111
- "post_task",
11112
- "pre_tool",
11113
- "post_tool",
11114
- "on_memory_save"
11115
- ];
11116
- PluginHookSchema = z2.enum(PLUGIN_HOOKS);
11117
11107
  MCP_TRANSPORTS = ["http", "stdio"];
11118
11108
  McpTransportSchema = z2.enum(MCP_TRANSPORTS);
11119
11109
  }
@@ -11240,7 +11230,6 @@ var init_agent = __esm({
11240
11230
  telegram_bot_token: z6.string().nullable(),
11241
11231
  telegram_bot_username: z6.string().nullable(),
11242
11232
  telegram_offset: z6.number().int().nonnegative().nullable(),
11243
- requires_approval: z6.array(z6.string()),
11244
11233
  capabilities: z6.array(z6.string()),
11245
11234
  task_context_template: z6.string().nullable(),
11246
11235
  avatar_url: z6.string().nullable(),
@@ -11264,7 +11253,6 @@ var init_agent = __esm({
11264
11253
  orchestrator_mode: OrchestratorModeSchema.nullable().optional(),
11265
11254
  telegram_bot_token: z6.string().nullable().optional(),
11266
11255
  telegram_bot_username: z6.string().nullable().optional(),
11267
- requires_approval: z6.array(z6.string()).default([]),
11268
11256
  task_context_template: z6.string().nullable().optional(),
11269
11257
  avatar_url: z6.string().nullable().optional(),
11270
11258
  max_tokens_per_job: z6.number().int().min(0).max(5e5).default(0)
@@ -11440,7 +11428,12 @@ var CREDENTIAL_TYPES, CredentialSchema, GoogleOauthPayloadSchema;
11440
11428
  var init_credential = __esm({
11441
11429
  "../../packages/shared/src/entities/credential.ts"() {
11442
11430
  "use strict";
11443
- CREDENTIAL_TYPES = ["google-oauth", "notion-oauth", "airtable-oauth"];
11431
+ CREDENTIAL_TYPES = [
11432
+ "google-oauth",
11433
+ "notion-oauth",
11434
+ "airtable-oauth",
11435
+ "microsoft-oauth"
11436
+ ];
11444
11437
  CredentialSchema = z9.object({
11445
11438
  id: z9.string().guid(),
11446
11439
  owner_user_id: z9.string().guid(),
@@ -11727,7 +11720,6 @@ var init_skill = __esm({
11727
11720
  entity_id: z15.string().guid(),
11728
11721
  agent_id: z15.string().guid(),
11729
11722
  skill_id: z15.string().guid(),
11730
- approval_overrides: z15.record(z15.string(), z15.boolean()),
11731
11723
  use_custom_instructions: z15.boolean(),
11732
11724
  // NULL = all operations enabled; [] = none enabled
11733
11725
  enabled_operations: z15.array(z15.string()).nullable(),
@@ -11737,7 +11729,6 @@ var init_skill = __esm({
11737
11729
  id: true,
11738
11730
  created_at: true
11739
11731
  }).extend({
11740
- approval_overrides: z15.record(z15.string(), z15.boolean()).default({}),
11741
11732
  use_custom_instructions: z15.boolean().default(false),
11742
11733
  enabled_operations: z15.array(z15.string()).nullable().optional()
11743
11734
  });
@@ -12034,6 +12025,38 @@ var init_providers = __esm({
12034
12025
  supportsRefresh: true,
12035
12026
  authExtraParams: { response_type: "code" },
12036
12027
  credentialType: "airtable-oauth"
12028
+ },
12029
+ "outlook-mail": {
12030
+ slug: "outlook-mail",
12031
+ label: "Outlook Mail",
12032
+ authUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
12033
+ tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token",
12034
+ scopes: [
12035
+ "offline_access",
12036
+ "openid",
12037
+ "email",
12038
+ "profile",
12039
+ "https://graph.microsoft.com/Mail.ReadWrite",
12040
+ "https://graph.microsoft.com/Mail.Send",
12041
+ "https://graph.microsoft.com/MailboxSettings.Read"
12042
+ ],
12043
+ pkce: "pkce-s256",
12044
+ tokenAuth: "body",
12045
+ tokenBodyType: "form",
12046
+ // Graph's /v1.0/me requires the User.Read delegated permission, which our
12047
+ // scopes don't request — that would 403 on every connection. The OIDC
12048
+ // userinfo endpoint is covered by the openid/profile/email scopes we
12049
+ // already ask for. `email` is null on some personal Microsoft accounts —
12050
+ // nameField is set to `preferred_username` (always present, looks like an
12051
+ // email) so the generic `accountName = email ?? name` resolver in
12052
+ // callback/route.ts falls back to it automatically. No route.ts changes needed.
12053
+ accountInfo: {
12054
+ url: "https://graph.microsoft.com/oidc/userinfo",
12055
+ nameField: "preferred_username",
12056
+ emailField: "email"
12057
+ },
12058
+ supportsRefresh: true,
12059
+ credentialType: "microsoft-oauth"
12037
12060
  }
12038
12061
  };
12039
12062
  }
@@ -12113,7 +12136,13 @@ var init_model_catalog = __esm({
12113
12136
  // in the request (the deepseek.ts provider sets this automatically when
12114
12137
  // reasoning:true). Also requires reasoning_content to be echoed back on
12115
12138
  // assistant messages with tool_calls (the deepseek fetch shim handles this).
12116
- capabilities: { tools: true, forcedToolChoice: true, reasoning: true },
12139
+ capabilities: {
12140
+ tools: true,
12141
+ forcedToolChoice: true,
12142
+ reasoning: true,
12143
+ // DeepSeek's native API has no intensity knob — thinking is on or off.
12144
+ reasoningControl: { kind: "onoff" }
12145
+ },
12117
12146
  contextWindow: 128e3,
12118
12147
  pricing: { inputPerMillionUsd: 0.55, outputPerMillionUsd: 2.19 }
12119
12148
  }
@@ -12138,7 +12167,17 @@ var init_model_catalog = __esm({
12138
12167
  modelId: "MiniMax-M3",
12139
12168
  label: "MiniMax M3",
12140
12169
  // Newest flagship — a reasoning model (adaptive `thinking`), 1M context.
12141
- capabilities: { tools: true, forcedToolChoice: false, reasoning: true },
12170
+ capabilities: {
12171
+ tools: true,
12172
+ forcedToolChoice: false,
12173
+ reasoning: true,
12174
+ // minimax.ts injects thinking.budget_tokens (today fixed at 8000 =
12175
+ // this scale's 'medium'); ladder mirrors Hermes' Anthropic budgets.
12176
+ reasoningControl: {
12177
+ kind: "budget",
12178
+ budgets: { low: 4e3, medium: 8e3, high: 16e3, max: 32e3 }
12179
+ }
12180
+ },
12142
12181
  contextWindow: 1048576
12143
12182
  },
12144
12183
  {
@@ -12172,47 +12211,112 @@ var init_model_catalog = __esm({
12172
12211
  {
12173
12212
  modelId: "kimi-k2.6",
12174
12213
  label: "Kimi K2.6",
12175
- capabilities: { tools: true, forcedToolChoice: false, reasoning: true },
12214
+ // K2-line: mandatory thinking mode (`thinking:{type:'enabled'}`), no
12215
+ // intensity knob, cannot be disabled.
12216
+ capabilities: {
12217
+ tools: true,
12218
+ forcedToolChoice: false,
12219
+ reasoning: true,
12220
+ reasoningControl: { kind: "onoff", mandatory: true }
12221
+ },
12176
12222
  contextWindow: 262144
12177
12223
  },
12178
12224
  {
12179
12225
  modelId: "kimi-k2.7-code",
12180
12226
  label: "Kimi K2.7 Code",
12181
- capabilities: { tools: true, forcedToolChoice: false, reasoning: true },
12227
+ capabilities: {
12228
+ tools: true,
12229
+ forcedToolChoice: false,
12230
+ reasoning: true,
12231
+ reasoningControl: { kind: "onoff", mandatory: true }
12232
+ },
12182
12233
  contextWindow: 262144
12234
+ },
12235
+ {
12236
+ modelId: "kimi-k3",
12237
+ label: "Kimi K3",
12238
+ // Released 2026-07-16. Verified against platform.kimi.ai/docs/pricing/
12239
+ // chat-k3: 1M context, multimodal, always reasons server-side with a
12240
+ // top-level `reasoning_effort` control (currently `max` only) — NOT the
12241
+ // K2-line `thinking` field, so moonshot.ts deliberately does not inject
12242
+ // `thinking` for it (K2-line gate). reasoning:true is still required so
12243
+ // the runtime round-trips reasoning content.
12244
+ capabilities: {
12245
+ tools: true,
12246
+ forcedToolChoice: false,
12247
+ reasoning: true,
12248
+ // K3 always reasons server-side; its only accepted level today is 'max'.
12249
+ reasoningControl: { kind: "effort", levels: ["max"], mandatory: true }
12250
+ },
12251
+ contextWindow: 1048576
12183
12252
  }
12184
12253
  ],
12254
+ // Anthropic — every current Claude supports extended thinking. Auto (no
12255
+ // agent setting) keeps today's behavior: NO thinking injected. Models ≥4.6
12256
+ // take the adaptive `output_config.effort`; Haiku 4.5 (<4.6) takes a
12257
+ // `thinking.budget_tokens` ladder (mirrors Hermes' anthropic_adapter table).
12185
12258
  anthropic: [
12186
12259
  {
12187
12260
  modelId: "claude-opus-4-8",
12188
12261
  label: "Claude Opus 4.8",
12189
- capabilities: { tools: true, forcedToolChoice: true },
12262
+ capabilities: {
12263
+ tools: true,
12264
+ forcedToolChoice: true,
12265
+ reasoning: true,
12266
+ reasoningControl: { kind: "adaptive-effort", levels: ["low", "medium", "high", "max"] }
12267
+ },
12190
12268
  contextWindow: 2e5
12191
12269
  },
12192
12270
  {
12193
12271
  modelId: "claude-sonnet-4-6",
12194
12272
  label: "Claude Sonnet 4.6",
12195
- capabilities: { tools: true, forcedToolChoice: true },
12273
+ capabilities: {
12274
+ tools: true,
12275
+ forcedToolChoice: true,
12276
+ reasoning: true,
12277
+ reasoningControl: { kind: "adaptive-effort", levels: ["low", "medium", "high", "max"] }
12278
+ },
12196
12279
  contextWindow: 2e5
12197
12280
  },
12198
12281
  {
12199
12282
  modelId: "claude-haiku-4-5-20251001",
12200
12283
  label: "Claude Haiku 4.5",
12201
- capabilities: { tools: true, forcedToolChoice: true },
12284
+ capabilities: {
12285
+ tools: true,
12286
+ forcedToolChoice: true,
12287
+ reasoning: true,
12288
+ reasoningControl: {
12289
+ kind: "budget",
12290
+ budgets: { low: 4e3, medium: 8e3, high: 16e3, max: 32e3 }
12291
+ }
12292
+ },
12202
12293
  contextWindow: 2e5
12203
12294
  }
12204
12295
  ],
12296
+ // OpenAI — GPT-5 line takes `reasoning_effort`. Auto = today's behavior
12297
+ // (nothing sent, provider default). 'off' is not offered: the line always
12298
+ // reasons (minimal ≠ none), hence mandatory.
12205
12299
  openai: [
12206
12300
  {
12207
12301
  modelId: "gpt-5",
12208
12302
  label: "GPT-5",
12209
- capabilities: { tools: true, forcedToolChoice: true },
12303
+ capabilities: {
12304
+ tools: true,
12305
+ forcedToolChoice: true,
12306
+ reasoning: true,
12307
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high"], mandatory: true }
12308
+ },
12210
12309
  contextWindow: 4e5
12211
12310
  },
12212
12311
  {
12213
12312
  modelId: "gpt-5-mini",
12214
12313
  label: "GPT-5 mini",
12215
- capabilities: { tools: true, forcedToolChoice: true },
12314
+ capabilities: {
12315
+ tools: true,
12316
+ forcedToolChoice: true,
12317
+ reasoning: true,
12318
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high"], mandatory: true }
12319
+ },
12216
12320
  contextWindow: 4e5
12217
12321
  }
12218
12322
  ],
@@ -12229,17 +12333,30 @@ var init_model_catalog = __esm({
12229
12333
  // fetch shim injects generationConfig.thinkingConfig for these two entries
12230
12334
  // (reasoning:true gates it) so the API returns the chain-of-thought the
12231
12335
  // execute.ts round-trip needs across tool-call turns.
12336
+ // Reasoning control: Gemini 3.x takes `thinkingConfig.thinking_level`
12337
+ // (low/medium/high per ai.google.dev — MEDIUM available on 3.1 Pro and
12338
+ // 3 Flash+); thinking cannot be fully disabled on this line → mandatory.
12232
12339
  google: [
12233
12340
  {
12234
12341
  modelId: "gemini-3.5-flash",
12235
12342
  label: "Gemini 3.5 Flash",
12236
- capabilities: { tools: true, forcedToolChoice: false, reasoning: true },
12343
+ capabilities: {
12344
+ tools: true,
12345
+ forcedToolChoice: false,
12346
+ reasoning: true,
12347
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high"], mandatory: true }
12348
+ },
12237
12349
  contextWindow: 1048576
12238
12350
  },
12239
12351
  {
12240
12352
  modelId: "gemini-3.1-pro-preview",
12241
12353
  label: "Gemini 3.1 Pro (preview)",
12242
- capabilities: { tools: true, forcedToolChoice: false, reasoning: true },
12354
+ capabilities: {
12355
+ tools: true,
12356
+ forcedToolChoice: false,
12357
+ reasoning: true,
12358
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high"], mandatory: true }
12359
+ },
12243
12360
  contextWindow: 1048576
12244
12361
  }
12245
12362
  ],
@@ -12265,41 +12382,68 @@ var init_model_catalog = __esm({
12265
12382
  // MiniMax M3 does not (some of its OpenRouter endpoints reject the forced
12266
12383
  // value), so it runs on 'auto' + the runtime floor.
12267
12384
  openrouter: [
12268
- // Anthropic
12385
+ // Anthropic — reasoningControl WITHOUT the `reasoning` flag, on purpose:
12386
+ // the flag would flip openrouter.ts's always-on default injection; here
12387
+ // thinking is engaged only when the agent explicitly sets an effort.
12388
+ // OpenRouter's unified `reasoning.effort` reaches Claude (max → xhigh).
12269
12389
  {
12270
12390
  modelId: "anthropic/claude-haiku-4.5",
12271
12391
  label: "Claude Haiku 4.5",
12272
- capabilities: { tools: true, forcedToolChoice: true },
12392
+ capabilities: {
12393
+ tools: true,
12394
+ forcedToolChoice: true,
12395
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12396
+ },
12273
12397
  contextWindow: 2e5
12274
12398
  },
12275
12399
  {
12276
12400
  modelId: "anthropic/claude-opus-4.7",
12277
12401
  label: "Claude Opus 4.7",
12278
- capabilities: { tools: true, forcedToolChoice: true },
12402
+ capabilities: {
12403
+ tools: true,
12404
+ forcedToolChoice: true,
12405
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12406
+ },
12279
12407
  contextWindow: 1e6
12280
12408
  },
12281
12409
  {
12282
12410
  modelId: "anthropic/claude-opus-4.7-fast",
12283
12411
  label: "Claude Opus 4.7 (fast)",
12284
- capabilities: { tools: true, forcedToolChoice: true },
12412
+ capabilities: {
12413
+ tools: true,
12414
+ forcedToolChoice: true,
12415
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12416
+ },
12285
12417
  contextWindow: 1e6
12286
12418
  },
12287
12419
  {
12288
12420
  modelId: "anthropic/claude-opus-4.8",
12289
12421
  label: "Claude Opus 4.8",
12290
- capabilities: { tools: true, forcedToolChoice: true },
12422
+ capabilities: {
12423
+ tools: true,
12424
+ forcedToolChoice: true,
12425
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12426
+ },
12291
12427
  contextWindow: 1e6
12292
12428
  },
12293
12429
  {
12294
12430
  modelId: "anthropic/claude-opus-4.8-fast",
12295
12431
  label: "Claude Opus 4.8 (fast)",
12296
- capabilities: { tools: true, forcedToolChoice: true },
12432
+ capabilities: {
12433
+ tools: true,
12434
+ forcedToolChoice: true,
12435
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12436
+ },
12297
12437
  contextWindow: 1e6
12298
12438
  },
12299
12439
  {
12300
12440
  modelId: "anthropic/claude-sonnet-4.6",
12301
12441
  label: "Claude Sonnet 4.6",
12302
- capabilities: { tools: true, forcedToolChoice: true },
12442
+ capabilities: {
12443
+ tools: true,
12444
+ forcedToolChoice: true,
12445
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12446
+ },
12303
12447
  contextWindow: 1e6
12304
12448
  },
12305
12449
  // DeepSeek
@@ -12316,14 +12460,28 @@ var init_model_catalog = __esm({
12316
12460
  // Flagging reasoning makes the OpenRouter provider enable reasoning + round-trip
12317
12461
  // its reasoning_details across tool calls — without it the model misbehaves
12318
12462
  // (gathers then emits no answer). Matches how Hermes drives DeepSeek.
12319
- capabilities: { tools: true, forcedToolChoice: true, reasoning: true },
12463
+ capabilities: {
12464
+ tools: true,
12465
+ forcedToolChoice: true,
12466
+ reasoning: true,
12467
+ // OpenRouter unified `reasoning.effort` (max → xhigh); OpenRouter maps
12468
+ // a requested effort to the nearest level the upstream really supports.
12469
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12470
+ },
12320
12471
  contextWindow: 1048576,
12321
12472
  providerOrder: ["deepseek"]
12322
12473
  },
12323
12474
  {
12324
12475
  modelId: "deepseek/deepseek-v4-pro",
12325
12476
  label: "DeepSeek V4 Pro",
12326
- capabilities: { tools: true, forcedToolChoice: true, reasoning: true },
12477
+ capabilities: {
12478
+ tools: true,
12479
+ forcedToolChoice: true,
12480
+ reasoning: true,
12481
+ // OpenRouter unified `reasoning.effort` (max → xhigh); OpenRouter maps
12482
+ // a requested effort to the nearest level the upstream really supports.
12483
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12484
+ },
12327
12485
  contextWindow: 1048576,
12328
12486
  providerOrder: ["deepseek"]
12329
12487
  },
@@ -12338,19 +12496,40 @@ var init_model_catalog = __esm({
12338
12496
  {
12339
12497
  modelId: "google/gemini-3.1-flash-lite-preview",
12340
12498
  label: "Gemini 3.1 Flash Lite (preview)",
12341
- capabilities: { tools: true, forcedToolChoice: true, reasoning: true },
12499
+ capabilities: {
12500
+ tools: true,
12501
+ forcedToolChoice: true,
12502
+ reasoning: true,
12503
+ // OpenRouter unified `reasoning.effort` (max → xhigh); OpenRouter maps
12504
+ // a requested effort to the nearest level the upstream really supports.
12505
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12506
+ },
12342
12507
  contextWindow: 1048576
12343
12508
  },
12344
12509
  {
12345
12510
  modelId: "google/gemini-3.1-pro-preview",
12346
12511
  label: "Gemini 3.1 Pro (preview)",
12347
- capabilities: { tools: true, forcedToolChoice: true, reasoning: true },
12512
+ capabilities: {
12513
+ tools: true,
12514
+ forcedToolChoice: true,
12515
+ reasoning: true,
12516
+ // OpenRouter unified `reasoning.effort` (max → xhigh); OpenRouter maps
12517
+ // a requested effort to the nearest level the upstream really supports.
12518
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12519
+ },
12348
12520
  contextWindow: 1048576
12349
12521
  },
12350
12522
  {
12351
12523
  modelId: "google/gemini-3.5-flash",
12352
12524
  label: "Gemini 3.5 Flash",
12353
- capabilities: { tools: true, forcedToolChoice: true, reasoning: true },
12525
+ capabilities: {
12526
+ tools: true,
12527
+ forcedToolChoice: true,
12528
+ reasoning: true,
12529
+ // OpenRouter unified `reasoning.effort` (max → xhigh); OpenRouter maps
12530
+ // a requested effort to the nearest level the upstream really supports.
12531
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12532
+ },
12354
12533
  contextWindow: 1048576
12355
12534
  },
12356
12535
  {
@@ -12367,7 +12546,12 @@ var init_model_catalog = __esm({
12367
12546
  // tool_choice ('required') → we send 'auto' (forcedToolChoice:false).
12368
12547
  // reasoning:true makes the provider return reasoning_details so the runner
12369
12548
  // can round-trip them across tool-call turns.
12370
- capabilities: { tools: true, forcedToolChoice: false, reasoning: true },
12549
+ capabilities: {
12550
+ tools: true,
12551
+ forcedToolChoice: false,
12552
+ reasoning: true,
12553
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12554
+ },
12371
12555
  contextWindow: 1048576
12372
12556
  },
12373
12557
  // Z.ai (GLM)
@@ -12378,7 +12562,18 @@ var init_model_catalog = __esm({
12378
12562
  // use. reasoning:true → provider returns reasoning_details for round-trip.
12379
12563
  // forcedToolChoice:false: send 'auto' (don't risk a rejected 'required' on
12380
12564
  // a reasoning model; workers are 'auto' after turn 1 anyway).
12381
- capabilities: { tools: true, forcedToolChoice: false, reasoning: true },
12565
+ capabilities: {
12566
+ tools: true,
12567
+ forcedToolChoice: false,
12568
+ reasoning: true,
12569
+ // GLM 5.2 always reasons; upstream accepts high/xhigh — OpenRouter
12570
+ // normalizes lower requests up to its floor.
12571
+ reasoningControl: {
12572
+ kind: "effort",
12573
+ levels: ["low", "medium", "high", "max"],
12574
+ mandatory: true
12575
+ }
12576
+ },
12382
12577
  contextWindow: 1048576
12383
12578
  },
12384
12579
  // Moonshot (Kimi)
@@ -12392,7 +12587,16 @@ var init_model_catalog = __esm({
12392
12587
  // this file's other OpenRouter entries carry one (OpenRouter self-reports
12393
12588
  // real cost via providerMetadata.openrouter.usage.cost — see
12394
12589
  // estimateModelCostUsd's doc comment).
12395
- capabilities: { tools: true, forcedToolChoice: false, reasoning: true },
12590
+ capabilities: {
12591
+ tools: true,
12592
+ forcedToolChoice: false,
12593
+ reasoning: true,
12594
+ reasoningControl: {
12595
+ kind: "effort",
12596
+ levels: ["low", "medium", "high", "max"],
12597
+ mandatory: true
12598
+ }
12599
+ },
12396
12600
  contextWindow: 262144
12397
12601
  },
12398
12602
  {
@@ -12402,8 +12606,86 @@ var init_model_catalog = __esm({
12402
12606
  // turns (like DeepSeek) → reasoning:true is required so the provider
12403
12607
  // round-trips reasoning_details. forcedToolChoice:false for the same reason
12404
12608
  // as the other reasoning models.
12405
- capabilities: { tools: true, forcedToolChoice: false, reasoning: true },
12609
+ capabilities: {
12610
+ tools: true,
12611
+ forcedToolChoice: false,
12612
+ reasoning: true,
12613
+ reasoningControl: {
12614
+ kind: "effort",
12615
+ levels: ["low", "medium", "high", "max"],
12616
+ mandatory: true
12617
+ }
12618
+ },
12406
12619
  contextWindow: 262144
12620
+ },
12621
+ // xAI — grok-4.5 verified via OpenRouter /api/v1/models (2026-07-20):
12622
+ // 500K context, text+image, tools + tool_choice + reasoning params.
12623
+ // Reasoning control cross-checked against Hermes (model_metadata.py,
12624
+ // verified live by them 2026-07-08): accepts effort low/medium/high,
12625
+ // REJECTS 'none' → mandatory (no Off), no xhigh → no 'max' level.
12626
+ {
12627
+ modelId: "x-ai/grok-4.5",
12628
+ label: "Grok 4.5",
12629
+ capabilities: {
12630
+ tools: true,
12631
+ forcedToolChoice: true,
12632
+ reasoning: true,
12633
+ reasoningControl: {
12634
+ kind: "effort",
12635
+ levels: ["low", "medium", "high"],
12636
+ mandatory: true
12637
+ }
12638
+ },
12639
+ contextWindow: 5e5
12640
+ },
12641
+ // Qwen — both verified via OpenRouter /api/v1/models (2026-07-20): 1M
12642
+ // context, tools + tool_choice + reasoning params (no native
12643
+ // reasoning_effort — OpenRouter's unified param drives the hybrid
12644
+ // thinking mode). Same pattern as the Claude routes above:
12645
+ // reasoningControl WITHOUT the always-on `reasoning` flag — Auto keeps
12646
+ // the provider's default behavior, thinking engages only on explicit
12647
+ // effort. Hermes catalogs both as plain OpenRouter models (no adapter).
12648
+ // qwen3.7-max is TEXT-ONLY (no image input); qwen3.7-plus is multimodal.
12649
+ {
12650
+ modelId: "qwen/qwen3.7-max",
12651
+ label: "Qwen 3.7 Max",
12652
+ capabilities: {
12653
+ tools: true,
12654
+ forcedToolChoice: true,
12655
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12656
+ },
12657
+ contextWindow: 1048576
12658
+ },
12659
+ {
12660
+ modelId: "qwen/qwen3.7-plus",
12661
+ label: "Qwen 3.7 Plus",
12662
+ capabilities: {
12663
+ tools: true,
12664
+ forcedToolChoice: true,
12665
+ reasoningControl: { kind: "effort", levels: ["low", "medium", "high", "max"] }
12666
+ },
12667
+ contextWindow: 1048576
12668
+ },
12669
+ {
12670
+ modelId: "moonshotai/kimi-k3",
12671
+ label: "Kimi K3",
12672
+ // Released 2026-07-16, verified via OpenRouter /api/v1/models: 1,048,576
12673
+ // context, text+image input, supports tools/tool_choice/reasoning params.
12674
+ // Above the K2.7 native-tool_calls cutoff — detectAgenticFamily
12675
+ // (openrouter.ts) only matches `moonshotai/kimi-k2*`, so K3 correctly
12676
+ // falls through to native tool_calls with no textual-markup middleware
12677
+ // (the kimi-* tool-schema sanitizer still applies).
12678
+ capabilities: {
12679
+ tools: true,
12680
+ forcedToolChoice: false,
12681
+ reasoning: true,
12682
+ reasoningControl: {
12683
+ kind: "effort",
12684
+ levels: ["low", "medium", "high", "max"],
12685
+ mandatory: true
12686
+ }
12687
+ },
12688
+ contextWindow: 1048576
12407
12689
  }
12408
12690
  ]
12409
12691
  };
@@ -12422,6 +12704,11 @@ var init_model_catalog = __esm({
12422
12704
  "minimax/minimax-m3",
12423
12705
  "moonshotai/kimi-k2.6",
12424
12706
  "moonshotai/kimi-k2.7-code",
12707
+ "moonshotai/kimi-k3",
12708
+ // Verified via OpenRouter /api/v1/models input_modalities (2026-07-20).
12709
+ // qwen/qwen3.7-max is deliberately absent — text-only per the same source.
12710
+ "x-ai/grok-4.5",
12711
+ "qwen/qwen3.7-plus",
12425
12712
  // Native-provider forms
12426
12713
  "claude-opus-4-8",
12427
12714
  "claude-sonnet-4-6",
@@ -12433,7 +12720,8 @@ var init_model_catalog = __esm({
12433
12720
  "mistral-large-latest",
12434
12721
  "MiniMax-M3",
12435
12722
  "kimi-k2.6",
12436
- "kimi-k2.7-code"
12723
+ "kimi-k2.7-code",
12724
+ "kimi-k3"
12437
12725
  ]);
12438
12726
  for (const entries of Object.values(MODEL_CATALOG)) {
12439
12727
  for (const e of entries) e.capabilities.vision = VISION_MODEL_IDS.has(e.modelId);
@@ -12723,6 +13011,10 @@ var init_agents = __esm({
12723
13011
  slug: text("slug").notNull(),
12724
13012
  personality: text("personality").notNull(),
12725
13013
  model: text("model").default("claude-sonnet-4-6-20260217"),
13014
+ // Reasoning effort for the PRIMARY model ('off'|'low'|'medium'|'high'|'max').
13015
+ // NULL = Auto (provider default — pre-feature behavior). Validated at the
13016
+ // app layer against the model's reasoningControl (model-catalog.ts).
13017
+ reasoningEffort: text("reasoning_effort"),
12726
13018
  llmKeyId: uuid("llm_key_id").references(() => entityLlmKeys.id, { onDelete: "set null" }),
12727
13019
  // Ordered LLM-key fallback chain (Guard 2). When the primary key
12728
13020
  // (llmKeyId) exhausts retries / times out / hits quota mid-job, the runner
@@ -12744,7 +13036,6 @@ var init_agents = __esm({
12744
13036
  // Last chat_id seen in an inbound DM — populated by the runner poller.
12745
13037
  // Used to inject the delivery target into dashboard-originated jobs.
12746
13038
  lastSeenChatIdTelegram: text("last_seen_chat_id_telegram"),
12747
- requiresApproval: text("requires_approval").array().default(sql`'{}'::text[]`),
12748
13039
  capabilities: text("capabilities").array().default(sql`'{}'::text[]`),
12749
13040
  taskContextTemplate: text("task_context_template"),
12750
13041
  avatarUrl: text("avatar_url"),
@@ -13045,6 +13336,11 @@ var init_jobs = __esm({
13045
13336
  // outnumber the still-open ones, so a partial index keyed on the open set
13046
13337
  // stays small regardless of table growth.
13047
13338
  index("idx_agent_jobs_completed_at_null").on(table.completedAt).where(sql`${table.completedAt} IS NULL`),
13339
+ // Migration 0070: run-schedules.ts filters by schedule_id every tick — the
13340
+ // no-overlap guard (schedule_id + status) and the daily budget rollup
13341
+ // (schedule_id + created_at range SUM) had no usable index and seq-scanned
13342
+ // the whole table. The (schedule_id, created_at) prefix serves both.
13343
+ index("idx_agent_jobs_schedule_created").on(table.scheduleId, table.createdAt),
13048
13344
  check(
13049
13345
  "agent_jobs_status_check",
13050
13346
  sql`${table.status} IN ('pending','processing','completed','failed','awaiting_approval','awaiting_delegation','cancelled')`
@@ -13151,7 +13447,7 @@ var init_credentials = __esm({
13151
13447
  index("idx_credentials_type").on(table.type),
13152
13448
  check(
13153
13449
  "credentials_type_check",
13154
- sql`${table.type} IN ('google-oauth','notion-oauth','airtable-oauth')`
13450
+ sql`${table.type} IN ('google-oauth','notion-oauth','airtable-oauth','microsoft-oauth')`
13155
13451
  )
13156
13452
  ]
13157
13453
  );
@@ -13195,10 +13491,19 @@ var init_connectors = __esm({
13195
13491
  check(
13196
13492
  "connectors_auth_type_check",
13197
13493
  sql`${table.authType} IN ('api_key','oauth2','bearer','basic','none')`
13198
- )
13494
+ ),
13199
13495
  // Multi-instance brique (migration 0016): the (entity_id, slug) UNIQUE
13200
13496
  // constraint was dropped to allow multiple instances of the same connector
13201
13497
  // type per entity (e.g. several Gmail accounts).
13498
+ //
13499
+ // P0-S1 (2026-07-22 incident): create_connector inserted blindly with no
13500
+ // existence check and no DB constraint, so a stuttering agent call
13501
+ // created 8 identical duplicate "Tavily" rows (same entity, same slug,
13502
+ // same name). This index keys on (entity_id, slug, name) — it blocks an
13503
+ // exact-duplicate stutter while fully preserving legitimate multi-instance
13504
+ // (a second connector with the same slug but a DIFFERENT name still
13505
+ // succeeds). It does NOT re-introduce what 0016 dropped.
13506
+ uniqueIndex("connectors_entity_slug_name_unique").on(table.entityId, table.slug, table.name)
13202
13507
  ]
13203
13508
  );
13204
13509
  }
@@ -13478,7 +13783,21 @@ var init_skills = __esm({
13478
13783
  // user as a warning, since the runtime does NOT execute skill scripts.
13479
13784
  isCommunity: boolean("is_community").notNull().default(false),
13480
13785
  source: text("source"),
13786
+ // `sha256` is the ORIGIN hash of each script at install/update time — the
13787
+ // baseline for the three-way update check (computeScriptsState). Optional:
13788
+ // rows installed before the three-way check have no hashes and fall back
13789
+ // to the historical local-vs-upstream compare until their next apply.
13481
13790
  installedScripts: jsonb("installed_scripts").$type(),
13791
+ // ─── Community skill update tracking (migration 0069) ───────────────────
13792
+ // updateAvailable: set by checkSkillUpdate (skills/check-updates.ts) when
13793
+ // the upstream source diverges from what's installed (content and/or
13794
+ // scripts). Surfaced in the dashboard so the owner can review + apply.
13795
+ // updateDetail: what the last check found — null before the first check.
13796
+ // lastUpdateCheckAt: throttle timestamp for the cron phase
13797
+ // (run-skill-update-check.ts) — NULL means never checked.
13798
+ updateAvailable: boolean("update_available").notNull().default(false),
13799
+ updateDetail: jsonb("update_detail").$type(),
13800
+ lastUpdateCheckAt: timestamp("last_update_check_at", { withTimezone: true }),
13482
13801
  // ─── Learning-loop columns (Phase A) ─────────────────────────────────────
13483
13802
  // createdBy: provenance — 'user' (default) | 'system' | 'agent'
13484
13803
  // state: lifecycle — 'active' (default) | 'stale' | 'archived'
@@ -13552,7 +13871,6 @@ var init_skills = __esm({
13552
13871
  entityId: uuid("entity_id").notNull().references(() => entities.id, { onDelete: "cascade" }),
13553
13872
  agentId: uuid("agent_id").notNull().references(() => agents.id, { onDelete: "cascade" }),
13554
13873
  skillId: uuid("skill_id").notNull().references(() => agentSkills.id, { onDelete: "cascade" }),
13555
- approvalOverrides: jsonb("approval_overrides").default(sql`'{}'::jsonb`),
13556
13874
  useCustomInstructions: boolean("use_custom_instructions").notNull().default(false),
13557
13875
  enabledOperations: text("enabled_operations").array(),
13558
13876
  // Per-skill × per-agent authorization to EXECUTE the skill's bundled scripts
@@ -13673,74 +13991,6 @@ var init_mcp = __esm({
13673
13991
  }
13674
13992
  });
13675
13993
 
13676
- // ../../packages/db/src/schema/misc.ts
13677
- var configuratorSessions, agentPlugins, rateLimits;
13678
- var init_misc = __esm({
13679
- "../../packages/db/src/schema/misc.ts"() {
13680
- "use strict";
13681
- init_pg_core();
13682
- init_drizzle_orm();
13683
- init_entities();
13684
- init_agents();
13685
- configuratorSessions = pgTable(
13686
- "configurator_sessions",
13687
- {
13688
- id: uuid("id").primaryKey().defaultRandom(),
13689
- entityId: uuid("entity_id").notNull().references(() => entities.id, { onDelete: "cascade" }),
13690
- agentId: uuid("agent_id").references(() => agents.id, { onDelete: "cascade" }),
13691
- messages: jsonb("messages").notNull().default(sql`'[]'::jsonb`),
13692
- status: text("status").notNull().default("active"),
13693
- turnCount: integer("turn_count").notNull().default(0),
13694
- createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
13695
- updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
13696
- },
13697
- (table) => [
13698
- index("idx_configurator_sessions_entity").on(table.entityId),
13699
- index("idx_configurator_sessions_agent").on(table.agentId)
13700
- ]
13701
- );
13702
- agentPlugins = pgTable(
13703
- "agent_plugins",
13704
- {
13705
- id: uuid("id").primaryKey().defaultRandom(),
13706
- entityId: uuid("entity_id").references(() => entities.id, { onDelete: "cascade" }),
13707
- name: text("name").notNull(),
13708
- slug: text("slug").notNull(),
13709
- description: text("description"),
13710
- pluginType: text("plugin_type").notNull(),
13711
- config: jsonb("config").default(sql`'{}'::jsonb`),
13712
- active: boolean("active").default(true),
13713
- hook: text("hook").notNull(),
13714
- webhookUrl: text("webhook_url"),
13715
- createdAt: timestamp("created_at", { withTimezone: true }).defaultNow(),
13716
- updatedAt: timestamp("updated_at", { withTimezone: true }).defaultNow()
13717
- },
13718
- (table) => [
13719
- check(
13720
- "agent_plugins_plugin_type_check",
13721
- sql`${table.pluginType} IN ('webhook','transform','schedule')`
13722
- ),
13723
- check(
13724
- "agent_plugins_hook_check",
13725
- sql`${table.hook} IN ('pre_task','post_task','pre_tool','post_tool','on_memory_save')`
13726
- ),
13727
- // R5 (audit #2 follow-up): the pglite test DDL (packages/db/src/tests/
13728
- // helpers.ts) already assumed a per-entity unique slug here — same class
13729
- // of phantom-constraint bug as DB-2/F-18 (test mock ahead of the real
13730
- // schema/migration). entityId is nullable (no `.notNull()` above), so
13731
- // NULLS NOT DISTINCT closes the same NULL-entity gap as DB-1's
13732
- // approval_rules constraint.
13733
- unique("agent_plugins_entity_slug_unique").on(table.entityId, table.slug).nullsNotDistinct()
13734
- ]
13735
- );
13736
- rateLimits = pgTable("rate_limits", {
13737
- key: text("key").primaryKey(),
13738
- count: integer("count").default(1),
13739
- windowStart: timestamp("window_start", { withTimezone: true }).defaultNow()
13740
- });
13741
- }
13742
- });
13743
-
13744
13994
  // ../../packages/db/src/schema/auth.ts
13745
13995
  var sessions, accounts, verifications;
13746
13996
  var init_auth = __esm({
@@ -14095,8 +14345,6 @@ __export(schema_exports, {
14095
14345
  MEMORY_SOURCES: () => MEMORY_SOURCES,
14096
14346
  OPERATION_RISK_LEVELS: () => OPERATION_RISK_LEVELS,
14097
14347
  ORCHESTRATOR_MODES: () => ORCHESTRATOR_MODES,
14098
- PLUGIN_HOOKS: () => PLUGIN_HOOKS,
14099
- PLUGIN_TYPES: () => PLUGIN_TYPES,
14100
14348
  SCHEDULE_LAST_STATUSES: () => SCHEDULE_LAST_STATUSES,
14101
14349
  SCHEDULE_TYPES: () => SCHEDULE_TYPES,
14102
14350
  TASK_PRIORITIES: () => TASK_PRIORITIES,
@@ -14108,7 +14356,6 @@ __export(schema_exports, {
14108
14356
  agentJobs: () => agentJobs,
14109
14357
  agentMcpServers: () => agentMcpServers,
14110
14358
  agentMemory: () => agentMemory,
14111
- agentPlugins: () => agentPlugins,
14112
14359
  agentSchedules: () => agentSchedules,
14113
14360
  agentSkillAssignments: () => agentSkillAssignments,
14114
14361
  agentSkills: () => agentSkills,
@@ -14121,7 +14368,6 @@ __export(schema_exports, {
14121
14368
  channelAllowedConversations: () => channelAllowedConversations,
14122
14369
  channelBindings: () => channelBindings,
14123
14370
  chatMessages: () => chatMessages,
14124
- configuratorSessions: () => configuratorSessions,
14125
14371
  connectors: () => connectors,
14126
14372
  conversations: () => conversations,
14127
14373
  credentials: () => credentials,
@@ -14131,7 +14377,6 @@ __export(schema_exports, {
14131
14377
  entitySettings: () => entitySettings,
14132
14378
  mcpConnections: () => mcpConnections,
14133
14379
  mcpServers: () => mcpServers,
14134
- rateLimits: () => rateLimits,
14135
14380
  sessions: () => sessions,
14136
14381
  skillConnectors: () => skillConnectors,
14137
14382
  skillVersions: () => skillVersions,
@@ -14161,7 +14406,6 @@ var init_schema2 = __esm({
14161
14406
  init_schedules();
14162
14407
  init_llm_keys();
14163
14408
  init_mcp();
14164
- init_misc();
14165
14409
  init_auth();
14166
14410
  init_agent_connector_assignments();
14167
14411
  init_agent_workspaces();