@agent-native/core 0.52.0 → 0.53.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 (212) hide show
  1. package/README.md +41 -95
  2. package/blueprints/action/crud.md +98 -0
  3. package/blueprints/channel/discord.md +74 -0
  4. package/blueprints/provider/stripe.md +87 -0
  5. package/blueprints/sandbox/docker.md +78 -0
  6. package/dist/action.d.ts +24 -0
  7. package/dist/action.d.ts.map +1 -1
  8. package/dist/action.js +4 -0
  9. package/dist/action.js.map +1 -1
  10. package/dist/agent/observational-memory/compactor.d.ts +43 -0
  11. package/dist/agent/observational-memory/compactor.d.ts.map +1 -0
  12. package/dist/agent/observational-memory/compactor.js +50 -0
  13. package/dist/agent/observational-memory/compactor.js.map +1 -0
  14. package/dist/agent/observational-memory/config.d.ts +37 -0
  15. package/dist/agent/observational-memory/config.d.ts.map +1 -0
  16. package/dist/agent/observational-memory/config.js +48 -0
  17. package/dist/agent/observational-memory/config.js.map +1 -0
  18. package/dist/agent/observational-memory/index.d.ts +26 -0
  19. package/dist/agent/observational-memory/index.d.ts.map +1 -0
  20. package/dist/agent/observational-memory/index.js +25 -0
  21. package/dist/agent/observational-memory/index.js.map +1 -0
  22. package/dist/agent/observational-memory/internal-run.d.ts +37 -0
  23. package/dist/agent/observational-memory/internal-run.d.ts.map +1 -0
  24. package/dist/agent/observational-memory/internal-run.js +59 -0
  25. package/dist/agent/observational-memory/internal-run.js.map +1 -0
  26. package/dist/agent/observational-memory/message-text.d.ts +13 -0
  27. package/dist/agent/observational-memory/message-text.d.ts.map +1 -0
  28. package/dist/agent/observational-memory/message-text.js +46 -0
  29. package/dist/agent/observational-memory/message-text.js.map +1 -0
  30. package/dist/agent/observational-memory/migrations.d.ts +13 -0
  31. package/dist/agent/observational-memory/migrations.d.ts.map +1 -0
  32. package/dist/agent/observational-memory/migrations.js +43 -0
  33. package/dist/agent/observational-memory/migrations.js.map +1 -0
  34. package/dist/agent/observational-memory/observer.d.ts +37 -0
  35. package/dist/agent/observational-memory/observer.d.ts.map +1 -0
  36. package/dist/agent/observational-memory/observer.js +82 -0
  37. package/dist/agent/observational-memory/observer.js.map +1 -0
  38. package/dist/agent/observational-memory/plugin.d.ts +16 -0
  39. package/dist/agent/observational-memory/plugin.d.ts.map +1 -0
  40. package/dist/agent/observational-memory/plugin.js +26 -0
  41. package/dist/agent/observational-memory/plugin.js.map +1 -0
  42. package/dist/agent/observational-memory/prompts.d.ts +27 -0
  43. package/dist/agent/observational-memory/prompts.d.ts.map +1 -0
  44. package/dist/agent/observational-memory/prompts.js +42 -0
  45. package/dist/agent/observational-memory/prompts.js.map +1 -0
  46. package/dist/agent/observational-memory/read.d.ts +47 -0
  47. package/dist/agent/observational-memory/read.d.ts.map +1 -0
  48. package/dist/agent/observational-memory/read.js +99 -0
  49. package/dist/agent/observational-memory/read.js.map +1 -0
  50. package/dist/agent/observational-memory/reflector.d.ts +31 -0
  51. package/dist/agent/observational-memory/reflector.d.ts.map +1 -0
  52. package/dist/agent/observational-memory/reflector.js +76 -0
  53. package/dist/agent/observational-memory/reflector.js.map +1 -0
  54. package/dist/agent/observational-memory/schema.d.ts +267 -0
  55. package/dist/agent/observational-memory/schema.d.ts.map +1 -0
  56. package/dist/agent/observational-memory/schema.js +48 -0
  57. package/dist/agent/observational-memory/schema.js.map +1 -0
  58. package/dist/agent/observational-memory/store.d.ts +52 -0
  59. package/dist/agent/observational-memory/store.d.ts.map +1 -0
  60. package/dist/agent/observational-memory/store.js +197 -0
  61. package/dist/agent/observational-memory/store.js.map +1 -0
  62. package/dist/agent/observational-memory/types.d.ts +61 -0
  63. package/dist/agent/observational-memory/types.d.ts.map +1 -0
  64. package/dist/agent/observational-memory/types.js +9 -0
  65. package/dist/agent/observational-memory/types.js.map +1 -0
  66. package/dist/agent/production-agent.d.ts +15 -0
  67. package/dist/agent/production-agent.d.ts.map +1 -1
  68. package/dist/agent/production-agent.js +240 -1
  69. package/dist/agent/production-agent.js.map +1 -1
  70. package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
  71. package/dist/agent/run-loop-with-resume.js +49 -0
  72. package/dist/agent/run-loop-with-resume.js.map +1 -1
  73. package/dist/agent/run-store.d.ts +17 -0
  74. package/dist/agent/run-store.d.ts.map +1 -1
  75. package/dist/agent/run-store.js +55 -0
  76. package/dist/agent/run-store.js.map +1 -1
  77. package/dist/agent/runtime-context.d.ts +30 -0
  78. package/dist/agent/runtime-context.d.ts.map +1 -1
  79. package/dist/agent/runtime-context.js +54 -1
  80. package/dist/agent/runtime-context.js.map +1 -1
  81. package/dist/agent/tool-call-journal.d.ts +101 -0
  82. package/dist/agent/tool-call-journal.d.ts.map +1 -0
  83. package/dist/agent/tool-call-journal.js +214 -0
  84. package/dist/agent/tool-call-journal.js.map +1 -0
  85. package/dist/agent/types.d.ts +24 -0
  86. package/dist/agent/types.d.ts.map +1 -1
  87. package/dist/agent/types.js.map +1 -1
  88. package/dist/cli/add.d.ts +109 -0
  89. package/dist/cli/add.d.ts.map +1 -0
  90. package/dist/cli/add.js +352 -0
  91. package/dist/cli/add.js.map +1 -0
  92. package/dist/cli/connect.d.ts +2 -2
  93. package/dist/cli/connect.d.ts.map +1 -1
  94. package/dist/cli/connect.js +92 -24
  95. package/dist/cli/connect.js.map +1 -1
  96. package/dist/cli/eval.d.ts +17 -0
  97. package/dist/cli/eval.d.ts.map +1 -0
  98. package/dist/cli/eval.js +121 -0
  99. package/dist/cli/eval.js.map +1 -0
  100. package/dist/cli/index.js +44 -3
  101. package/dist/cli/index.js.map +1 -1
  102. package/dist/cli/mcp.d.ts.map +1 -1
  103. package/dist/cli/mcp.js +11 -5
  104. package/dist/cli/mcp.js.map +1 -1
  105. package/dist/cli/plan-local.d.ts +66 -5
  106. package/dist/cli/plan-local.d.ts.map +1 -1
  107. package/dist/cli/plan-local.js +495 -19
  108. package/dist/cli/plan-local.js.map +1 -1
  109. package/dist/cli/skills.d.ts +2 -2
  110. package/dist/cli/skills.d.ts.map +1 -1
  111. package/dist/cli/skills.js +70 -59
  112. package/dist/cli/skills.js.map +1 -1
  113. package/dist/client/AssistantChat.d.ts.map +1 -1
  114. package/dist/client/AssistantChat.js +118 -92
  115. package/dist/client/AssistantChat.js.map +1 -1
  116. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  117. package/dist/client/agent-chat-adapter.js +16 -0
  118. package/dist/client/agent-chat-adapter.js.map +1 -1
  119. package/dist/client/chat/tool-call-display.d.ts +20 -1
  120. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  121. package/dist/client/chat/tool-call-display.js +32 -7
  122. package/dist/client/chat/tool-call-display.js.map +1 -1
  123. package/dist/client/sse-event-processor.d.ts +13 -0
  124. package/dist/client/sse-event-processor.d.ts.map +1 -1
  125. package/dist/client/sse-event-processor.js +21 -0
  126. package/dist/client/sse-event-processor.js.map +1 -1
  127. package/dist/db/client.d.ts +4 -2
  128. package/dist/db/client.d.ts.map +1 -1
  129. package/dist/db/client.js +6 -4
  130. package/dist/db/client.js.map +1 -1
  131. package/dist/deploy/route-discovery.d.ts.map +1 -1
  132. package/dist/deploy/route-discovery.js +1 -0
  133. package/dist/deploy/route-discovery.js.map +1 -1
  134. package/dist/eval/agent-runner.d.ts +63 -0
  135. package/dist/eval/agent-runner.d.ts.map +1 -0
  136. package/dist/eval/agent-runner.js +142 -0
  137. package/dist/eval/agent-runner.js.map +1 -0
  138. package/dist/eval/define-eval.d.ts +29 -0
  139. package/dist/eval/define-eval.d.ts.map +1 -0
  140. package/dist/eval/define-eval.js +43 -0
  141. package/dist/eval/define-eval.js.map +1 -0
  142. package/dist/eval/index.d.ts +18 -0
  143. package/dist/eval/index.d.ts.map +1 -0
  144. package/dist/eval/index.js +17 -0
  145. package/dist/eval/index.js.map +1 -0
  146. package/dist/eval/report.d.ts +8 -0
  147. package/dist/eval/report.d.ts.map +1 -0
  148. package/dist/eval/report.js +44 -0
  149. package/dist/eval/report.js.map +1 -0
  150. package/dist/eval/runner.d.ts +67 -0
  151. package/dist/eval/runner.d.ts.map +1 -0
  152. package/dist/eval/runner.js +256 -0
  153. package/dist/eval/runner.js.map +1 -0
  154. package/dist/eval/scorer.d.ts +83 -0
  155. package/dist/eval/scorer.d.ts.map +1 -0
  156. package/dist/eval/scorer.js +195 -0
  157. package/dist/eval/scorer.js.map +1 -0
  158. package/dist/eval/types.d.ts +162 -0
  159. package/dist/eval/types.d.ts.map +1 -0
  160. package/dist/eval/types.js +20 -0
  161. package/dist/eval/types.js.map +1 -0
  162. package/dist/observability/traces.d.ts.map +1 -1
  163. package/dist/observability/traces.js +100 -1
  164. package/dist/observability/traces.js.map +1 -1
  165. package/dist/observability/tracing.d.ts +73 -0
  166. package/dist/observability/tracing.d.ts.map +1 -0
  167. package/dist/observability/tracing.js +126 -0
  168. package/dist/observability/tracing.js.map +1 -0
  169. package/dist/onboarding/default-steps.d.ts.map +1 -1
  170. package/dist/onboarding/default-steps.js +4 -1
  171. package/dist/onboarding/default-steps.js.map +1 -1
  172. package/dist/provider-api/actions/query-staged-dataset.d.ts +1 -1
  173. package/dist/scripts/agent-engines/list-agent-engines.d.ts.map +1 -1
  174. package/dist/scripts/agent-engines/list-agent-engines.js +10 -3
  175. package/dist/scripts/agent-engines/list-agent-engines.js.map +1 -1
  176. package/dist/server/action-discovery.d.ts.map +1 -1
  177. package/dist/server/action-discovery.js +4 -0
  178. package/dist/server/action-discovery.js.map +1 -1
  179. package/dist/server/agent-chat-plugin.d.ts +9 -0
  180. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  181. package/dist/server/agent-chat-plugin.js +118 -110
  182. package/dist/server/agent-chat-plugin.js.map +1 -1
  183. package/dist/server/agent-teams.d.ts +62 -0
  184. package/dist/server/agent-teams.d.ts.map +1 -1
  185. package/dist/server/agent-teams.js +99 -2
  186. package/dist/server/agent-teams.js.map +1 -1
  187. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  188. package/dist/server/core-routes-plugin.js +7 -4
  189. package/dist/server/core-routes-plugin.js.map +1 -1
  190. package/dist/server/credential-provider.d.ts.map +1 -1
  191. package/dist/server/credential-provider.js +2 -0
  192. package/dist/server/credential-provider.js.map +1 -1
  193. package/dist/server/framework-request-handler.d.ts.map +1 -1
  194. package/dist/server/framework-request-handler.js +33 -1
  195. package/dist/server/framework-request-handler.js.map +1 -1
  196. package/dist/server/index.d.ts +1 -0
  197. package/dist/server/index.d.ts.map +1 -1
  198. package/dist/server/index.js +1 -0
  199. package/dist/server/index.js.map +1 -1
  200. package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +10 -0
  201. package/dist/templates/workspace-core/.agents/skills/harness-agents/SKILL.md +20 -0
  202. package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +20 -0
  203. package/docs/content/agent-teams.md +32 -0
  204. package/docs/content/blueprint-installer.md +73 -0
  205. package/docs/content/evals.md +141 -0
  206. package/docs/content/pr-visual-recap.md +7 -4
  207. package/docs/content/sandbox-adapters.md +134 -0
  208. package/docs/content/template-plan.md +20 -8
  209. package/package.json +5 -1
  210. package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +10 -0
  211. package/src/templates/workspace-core/.agents/skills/harness-agents/SKILL.md +20 -0
  212. package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +20 -0
@@ -22,6 +22,7 @@ export { captureError, captureServerError, registerErrorCaptureProvider, type Ca
22
22
  export { createSentryPlugin, defaultSentryPlugin } from "./sentry-plugin.js";
23
23
  export { createOrgPlugin, defaultOrgPlugin } from "../org/plugin.js";
24
24
  export { createContextXrayPlugin, defaultContextXrayPlugin, } from "../agent/context-xray/plugin.js";
25
+ export { createObservationalMemoryPlugin, defaultObservationalMemoryPlugin, } from "../agent/observational-memory/plugin.js";
25
26
  export { createGoogleAuthPlugin, type GoogleAuthPluginOptions, } from "./google-auth-plugin.js";
26
27
  export type { GoogleAuthMode } from "./google-auth-mode.js";
27
28
  export { createAgentChatPlugin, defaultAgentChatPlugin, type AgentChatPluginOptions, } from "./agent-chat-plugin.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,YAAY,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,QAAQ,EACR,qBAAqB,EACrB,UAAU,EACV,2BAA2B,EAC3B,6BAA6B,EAC7B,gCAAgC,EAChC,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,aAAa,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,GACnC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACb,eAAe,EACf,+BAA+B,EAC/B,yBAAyB,EACzB,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,KAAK,2BAA2B,EAChC,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,MAAM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,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,gCAAgC,EAChC,0BAA0B,EAC1B,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,mCAAmC,EACnC,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC7B,gCAAgC,EAChC,eAAe,EACf,KAAK,qBAAqB,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,QAAQ,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,IAAI,2BAA2B,GACjD,MAAM,wBAAwB,CAAC;AAUhC,MAAM,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACrE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,cAAc,CAErE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,YAAY,GAClB,MAAM,oBAAoB,CA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ACpB,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,mCAAmC,EACnC,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC7B,gCAAgC,EAChC,eAAe,EACf,KAAK,qBAAqB,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,QAAQ,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,IAAI,2BAA2B,GACjD,MAAM,wBAAwB,CAAC;AAUhC,MAAM,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACrE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,cAAc,CAErE"}
@@ -25,6 +25,7 @@ export { createSentryPlugin, defaultSentryPlugin } from "./sentry-plugin.js";
25
25
  // resolve it during the deploy build worker-entry generation.
26
26
  export { createOrgPlugin, defaultOrgPlugin } from "../org/plugin.js";
27
27
  export { createContextXrayPlugin, defaultContextXrayPlugin, } from "../agent/context-xray/plugin.js";
28
+ export { createObservationalMemoryPlugin, defaultObservationalMemoryPlugin, } from "../agent/observational-memory/plugin.js";
28
29
  export { createGoogleAuthPlugin, } from "./google-auth-plugin.js";
29
30
  export { createAgentChatPlugin, defaultAgentChatPlugin, } from "./agent-chat-plugin.js";
30
31
  export { configureAgentNativeEmbeddedEnvironment, createAgentNativeEmbeddedAuthOptions, createAgentNativeEmbeddedPlugin, mountAgentNativeEmbedded, normalizeAgentNativeEmbeddedSession, } from "./embedded.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,GAGd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,QAAQ,EACR,qBAAqB,EACrB,UAAU,EACV,2BAA2B,EAC3B,6BAA6B,EAC7B,gCAAgC,EAChC,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GAEjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAyB,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,GAEpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,GAQxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAA0B,MAAM,UAAU,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACb,eAAe,EACf,+BAA+B,EAC/B,yBAAyB,EACzB,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,GAIf,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,0BA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BAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC7B,gCAAgC,EAChC,eAAe,GAEhB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,gBAAgB,GAGjB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,GAIV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAGtB,MAAM,wBAAwB,CAAC;AAWhC,MAAM,UAAU,iBAAiB,CAAC,GAAmB;IACnD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["export {\n createServer,\n upsertEnvFile,\n type CreateServerOptions,\n type EnvKeyConfig,\n} from \"./create-server.js\";\n\nexport {\n readBody,\n readBodyWithSizeLimit,\n streamFile,\n DEFAULT_CHAT_MAX_BODY_BYTES,\n DEFAULT_UPLOAD_MAX_FILE_BYTES,\n MAX_CHAT_ATTACHMENTS_PER_MESSAGE,\n isAllowedUploadMimeType,\n} from \"./h3-helpers.js\";\nexport {\n buildDeepLink,\n toAbsoluteOpenUrl,\n toDesktopOpenUrl,\n OPEN_ROUTE_SUBPATH,\n DESKTOP_OPEN_URL,\n type DeepLinkInput,\n} from \"./deep-link.js\";\nexport { createOpenRouteHandler, type OpenRouteOptions } from \"./open-route.js\";\nexport {\n createEmbedStartRouteHandler,\n buildEmbedStartPath,\n type EmbedStartRouteOptions,\n} from \"./embed-route.js\";\nexport {\n createEmbedSessionTicket,\n consumeEmbedSessionTicket,\n normalizeEmbedTargetPath,\n requestHasEmbedAuthMarker,\n resolveEmbedSessionFromRequest,\n setEmbedSessionCookie,\n signEmbedSessionToken,\n verifyEmbedSessionToken,\n type ConsumedEmbedSessionTicket,\n type ConsumeEmbedSessionTicketOptions,\n type EmbedSessionTicket,\n type EmbedSessionTicketInput,\n type EmbedSessionTokenClaims,\n type ResolvedEmbedSession,\n type VerifyEmbedSessionTokenResult,\n} from \"./embed-session.js\";\nexport { createSSEHandler, type SSEHandlerOptions } from \"./sse.js\";\nexport {\n mountAuthMiddleware,\n autoMountAuth,\n getSession,\n COOKIE_NAME,\n addSession,\n removeSession,\n getSessionEmail,\n getFrameworkSessionCookieValues,\n setFrameworkSessionCookie,\n clearFrameworkSessionCookies,\n runAuthGuard,\n setDesktopExchange,\n setDesktopExchangeError,\n safeReturnPath,\n type DesktopExchangeErrorPayload,\n type AuthSession,\n type AuthOptions,\n} from \"./auth.js\";\nexport {\n handleIdentitySso,\n getIdentityHubUrl,\n isIdentitySsoEnabled,\n isIdentitySsoBypassPath,\n identitySsoLoginButtonHtml,\n IDENTITY_SSO_PROVIDER_ID,\n IDENTITY_SSO_SCOPE,\n} from \"./identity-sso.js\";\nexport { requireEnvKey, type MissingKeyResponse } from \"./missing-key.js\";\nexport { verifyCaptcha, type CaptchaVerifyResult } from \"./captcha.js\";\nexport {\n createProductionAgentHandler,\n type ActionEntry,\n type ScriptEntry,\n type ProductionAgentOptions,\n type ActionTool,\n type ScriptTool,\n type AgentMessage,\n type AgentChatRequest,\n type AgentChatEvent,\n type AgentChatAttachment,\n type AgentChatReference,\n type MentionProvider,\n type MentionProviderItem,\n type AgentLoopFinalResponseGuard,\n type AgentLoopFinalResponseGuardContext,\n type AgentLoopFinalResponseGuardResult,\n type AgentLoopToolCallSummary,\n type AgentLoopToolResultSummary,\n} from \"../agent/index.js\";\nexport {\n actionsToEngineTools,\n getOwnerActiveApiKey,\n runAgentLoop,\n} from \"../agent/production-agent.js\";\nexport {\n getStoredModelForEngine,\n resolveEngine,\n} from \"../agent/engine/index.js\";\nexport {\n completeText,\n type CompleteTextMessage,\n type CompleteTextOptions,\n type CompleteTextResult,\n type CompleteTextUsage,\n} from \"./complete-text.js\";\nexport { createDevScriptRegistry } from \"../scripts/dev/index.js\";\n\nexport {\n createPollHandler,\n recordChange,\n getVersion,\n getChangesSince,\n getPollEmitter,\n canSeeChangeForUser,\n POLL_CHANGE_EVENT,\n} from \"./poll.js\";\nexport { createPollEventsHandler } from \"./poll-events.js\";\nexport { createAuthPlugin, defaultAuthPlugin } from \"./auth-plugin.js\";\nexport {\n initServerSentry,\n isServerSentryEnabled,\n setSentryUserForRequest,\n captureRouteError,\n type RouteErrorContext,\n} from \"./sentry.js\";\nexport {\n captureError,\n captureServerError,\n registerErrorCaptureProvider,\n type CaptureErrorContext,\n type CaptureErrorProvider,\n} from \"./capture-error.js\";\nexport { createSentryPlugin, defaultSentryPlugin } from \"./sentry-plugin.js\";\n// Re-export the org plugin so the auto-discovery's DEFAULT_PLUGIN_REGISTRY\n// (which references \"defaultOrgPlugin\" from @agent-native/core/server) can\n// resolve it during the deploy build worker-entry generation.\nexport { createOrgPlugin, defaultOrgPlugin } from \"../org/plugin.js\";\nexport {\n createContextXrayPlugin,\n defaultContextXrayPlugin,\n} from \"../agent/context-xray/plugin.js\";\nexport {\n createGoogleAuthPlugin,\n type GoogleAuthPluginOptions,\n} from \"./google-auth-plugin.js\";\nexport type { GoogleAuthMode } from \"./google-auth-mode.js\";\nexport {\n createAgentChatPlugin,\n defaultAgentChatPlugin,\n type AgentChatPluginOptions,\n} from \"./agent-chat-plugin.js\";\nexport {\n configureAgentNativeEmbeddedEnvironment,\n createAgentNativeEmbeddedAuthOptions,\n createAgentNativeEmbeddedPlugin,\n mountAgentNativeEmbedded,\n normalizeAgentNativeEmbeddedSession,\n type AgentNativeEmbeddedAuthOptions,\n type AgentNativeEmbeddedGetSession,\n type AgentNativeEmbeddedHostSession,\n type AgentNativeEmbeddedPluginOptions,\n} from \"./embedded.js\";\nexport {\n createThread,\n getThread,\n listThreads,\n updateThreadData,\n deleteThread,\n setThreadArchived,\n setThreadPinned,\n setThreadScope,\n type ChatThread,\n type ChatThreadScope,\n type ChatThreadSummary,\n type ListThreadsOptions,\n} from \"../chat-threads/store.js\";\nexport {\n createResourcesPlugin,\n defaultResourcesPlugin,\n} from \"./resources-plugin.js\";\nexport {\n createCoreRoutesPlugin,\n defaultCoreRoutesPlugin,\n FRAMEWORK_ROUTE_PREFIX,\n type CoreRoutesPluginOptions,\n} from \"./core-routes-plugin.js\";\nexport {\n AGENT_NATIVE_OG_IMAGE_CACHE_CONTROL,\n AGENT_NATIVE_OG_IMAGE_HEIGHT,\n AGENT_NATIVE_OG_IMAGE_NETLIFY_CACHE_CONTROL,\n AGENT_NATIVE_OG_IMAGE_WIDTH,\n agentNativeOgImageResponseHeaders,\n createAgentNativeOgImageHandler,\n renderAgentNativeOgImagePng,\n renderAgentNativeOgImageSvg,\n type AgentNativeOgImageInput,\n} from \"./social-og-image.js\";\nexport {\n createBrowserSessionActionEntries,\n type CreateBrowserSessionActionEntriesOptions,\n} from \"../browser-sessions/actions.js\";\nexport {\n DEFAULT_BROWSER_SESSION_REQUEST_POLL_MS,\n DEFAULT_BROWSER_SESSION_REQUEST_TIMEOUT_MS,\n DEFAULT_BROWSER_SESSION_TTL_MS,\n callBrowserSession,\n claimBrowserSessionRequest,\n completeBrowserSessionRequest,\n createBrowserSessionRequest,\n disconnectBrowserSession,\n getBrowserSession,\n getBrowserSessionRequest,\n listBrowserSessions,\n registerBrowserSession,\n waitForBrowserSessionRequest,\n} from \"../browser-sessions/store.js\";\nexport {\n mountBrowserSessionRoutes,\n type MountBrowserSessionRoutesOptions,\n} from \"../browser-sessions/routes.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n createTerminalPlugin,\n defaultTerminalPlugin,\n type TerminalPluginOptions,\n} from \"../terminal/terminal-plugin.js\";\nexport {\n createCollabPlugin,\n type CollabPluginOptions,\n} from \"./collab-plugin.js\";\n\nexport {\n spawnTask,\n getTask,\n getTaskByThread,\n listTasks,\n sendToTask,\n markTaskErrored,\n type AgentTask,\n type SpawnTaskOptions,\n} from \"./agent-teams.js\";\nexport { isOAuthConnected, getOAuthAccounts } from \"./oauth-helpers.js\";\nexport { wrapWithAnalytics } from \"./analytics.js\";\nexport {\n getH3App,\n awaitBootstrap,\n markDefaultPluginProvided,\n type H3AppShim,\n} from \"./framework-request-handler.js\";\nexport {\n autoDiscoverActions,\n autoDiscoverScripts,\n loadActionsFromStaticRegistry,\n mergeCoreSharingActions,\n registerPackageActions,\n} from \"./action-discovery.js\";\nexport {\n mountActionRoutes,\n type MountActionRoutesOptions,\n} from \"./action-routes.js\";\nexport {\n runWithRequestContext,\n hasRequestContext,\n getRequestContext,\n getRequestUserEmail,\n getRequestUserName,\n getRequestOrgId,\n getRequestTimezone,\n getRequestRunContext,\n getCredentialContext,\n isIntegrationCallerRequest,\n type RequestContext,\n type RequestRunContext,\n} from \"./request-context.js\";\nexport { formatDateInTimezone, todayInTimezone } from \"./date-utils.js\";\n\nexport {\n createOnboardingPlugin,\n defaultOnboardingPlugin,\n} from \"../onboarding/plugin.js\";\n\nexport {\n registerFileUploadProvider,\n unregisterFileUploadProvider,\n listFileUploadProviders,\n getActiveFileUploadProvider,\n uploadFile,\n builderFileUploadProvider,\n type FileUploadInput,\n type FileUploadProvider,\n type FileUploadResult,\n} from \"../file-upload/index.js\";\n\nexport {\n createIntegrationsPlugin,\n defaultIntegrationsPlugin,\n enqueueRemoteCommand,\n slackAdapter,\n telegramAdapter,\n whatsappAdapter,\n emailAdapter,\n type PlatformAdapter,\n type IncomingMessage,\n type OutgoingMessage,\n type IntegrationStatus,\n type IntegrationsPluginOptions,\n} from \"../integrations/index.js\";\n\nexport {\n isElectron,\n isMobile,\n getOrigin,\n getAppBasePath,\n getAppUrl,\n resolveOAuthRedirectUri,\n isAllowedOAuthRedirectUri,\n encodeOAuthState,\n decodeOAuthState,\n resolveOAuthOwner,\n createOAuthSession,\n oauthCallbackResponse,\n oauthErrorPage,\n oauthDesktopExchangePage,\n type OAuthStatePayload,\n type OAuthOwnerResult,\n type OAuthSessionResult,\n} from \"./google-oauth.js\";\n\nexport {\n FeatureNotConfiguredError,\n hasBuilderPrivateKey,\n isBuilderEnvManaged,\n getBuilderProxyOrigin,\n getBuilderImageGenerationBaseUrl,\n getBuilderWebSearchBaseUrl,\n getBuilderAuthHeader,\n resolveBuilderPrivateKey,\n resolveBuilderAuthHeader,\n resolveHasBuilderPrivateKey,\n resolveHasCompleteBuilderConnection,\n resolveBuilderCredentials,\n resolveBuilderCredential,\n writeBuilderCredentials,\n deleteBuilderCredentials,\n resolveSecret,\n} from \"./credential-provider.js\";\nexport {\n getBuilderBranchProjectId,\n isBuilderBranchingEnabled,\n resolveBuilderBranchProjectId,\n resolveIsBuilderBranchingEnabled,\n runBuilderAgent,\n type RunBuilderAgentResult,\n} from \"./builder-browser.js\";\n\nexport {\n sendEmail,\n isEmailConfigured,\n getEmailProvider,\n type EmailProvider,\n type SendEmailArgs,\n} from \"./email.js\";\nexport {\n renderEmail,\n emailStrong,\n emailLink,\n type RenderEmailArgs,\n type RenderedEmail,\n type EmailCta,\n} from \"./email-template.js\";\nexport { getAppProductionUrl, getFirstPartyProdUrl } from \"./app-url.js\";\nexport {\n getConfiguredAppBasePath,\n normalizeAppBasePath,\n withConfiguredAppBasePath,\n} from \"./app-base-path.js\";\nexport {\n signShortLivedToken,\n verifyShortLivedToken,\n type ShortLivedTokenClaims,\n type VerifyResult as ShortLivedTokenVerifyResult,\n} from \"./short-lived-token.js\";\n\n// SSR handler is NOT re-exported here — it uses a virtual module\n// (virtual:react-router/server-build) that only exists at Vite dev/build time.\n// Including it in this barrel would break the esbuild CF Pages bundler.\n// Templates import directly: import { ssrHandler } from \"@agent-native/core/server/ssr-handler\"\n\n// Nitro plugin helper — re-exported so templates don't need nitro as a direct dependency.\n// defineNitroPlugin is an identity function; this typed wrapper lets templates use it\n// without resolving `nitro/runtime` (which requires Nitro's virtual modules at runtime).\nexport type NitroPluginDef = (nitroApp: any) => void | Promise<void>;\nexport function defineNitroPlugin(def: NitroPluginDef): NitroPluginDef {\n return def;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,GAGd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,QAAQ,EACR,qBAAqB,EACrB,UAAU,EACV,2BAA2B,EAC3B,6BAA6B,EAC7B,gCAAgC,EAChC,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GAEjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAyB,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,GAEpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,GAQxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAA0B,MAAM,UAAU,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACb,eAAe,EACf,+BAA+B,EAC/B,yBAAyB,EACzB,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,GAIf,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iB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,EACnB,qBAAqB,EACrB,gCAAgC,EAChC,0BAA0B,EAC1B,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,mCAAmC,EACnC,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC7B,gCAAgC,EAChC,eAAe,GAEhB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,gBAAgB,GAGjB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,GAIV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAGtB,MAAM,wBAAwB,CAAC;AAWhC,MAAM,UAAU,iBAAiB,CAAC,GAAmB;IACnD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["export {\n createServer,\n upsertEnvFile,\n type CreateServerOptions,\n type EnvKeyConfig,\n} from \"./create-server.js\";\n\nexport {\n readBody,\n readBodyWithSizeLimit,\n streamFile,\n DEFAULT_CHAT_MAX_BODY_BYTES,\n DEFAULT_UPLOAD_MAX_FILE_BYTES,\n MAX_CHAT_ATTACHMENTS_PER_MESSAGE,\n isAllowedUploadMimeType,\n} from \"./h3-helpers.js\";\nexport {\n buildDeepLink,\n toAbsoluteOpenUrl,\n toDesktopOpenUrl,\n OPEN_ROUTE_SUBPATH,\n DESKTOP_OPEN_URL,\n type DeepLinkInput,\n} from \"./deep-link.js\";\nexport { createOpenRouteHandler, type OpenRouteOptions } from \"./open-route.js\";\nexport {\n createEmbedStartRouteHandler,\n buildEmbedStartPath,\n type EmbedStartRouteOptions,\n} from \"./embed-route.js\";\nexport {\n createEmbedSessionTicket,\n consumeEmbedSessionTicket,\n normalizeEmbedTargetPath,\n requestHasEmbedAuthMarker,\n resolveEmbedSessionFromRequest,\n setEmbedSessionCookie,\n signEmbedSessionToken,\n verifyEmbedSessionToken,\n type ConsumedEmbedSessionTicket,\n type ConsumeEmbedSessionTicketOptions,\n type EmbedSessionTicket,\n type EmbedSessionTicketInput,\n type EmbedSessionTokenClaims,\n type ResolvedEmbedSession,\n type VerifyEmbedSessionTokenResult,\n} from \"./embed-session.js\";\nexport { createSSEHandler, type SSEHandlerOptions } from \"./sse.js\";\nexport {\n mountAuthMiddleware,\n autoMountAuth,\n getSession,\n COOKIE_NAME,\n addSession,\n removeSession,\n getSessionEmail,\n getFrameworkSessionCookieValues,\n setFrameworkSessionCookie,\n clearFrameworkSessionCookies,\n runAuthGuard,\n setDesktopExchange,\n setDesktopExchangeError,\n safeReturnPath,\n type DesktopExchangeErrorPayload,\n type AuthSession,\n type AuthOptions,\n} from \"./auth.js\";\nexport {\n handleIdentitySso,\n getIdentityHubUrl,\n isIdentitySsoEnabled,\n isIdentitySsoBypassPath,\n identitySsoLoginButtonHtml,\n IDENTITY_SSO_PROVIDER_ID,\n IDENTITY_SSO_SCOPE,\n} from \"./identity-sso.js\";\nexport { requireEnvKey, type MissingKeyResponse } from \"./missing-key.js\";\nexport { verifyCaptcha, type CaptchaVerifyResult } from \"./captcha.js\";\nexport {\n createProductionAgentHandler,\n type ActionEntry,\n type ScriptEntry,\n type ProductionAgentOptions,\n type ActionTool,\n type ScriptTool,\n type AgentMessage,\n type AgentChatRequest,\n type AgentChatEvent,\n type AgentChatAttachment,\n type AgentChatReference,\n type MentionProvider,\n type MentionProviderItem,\n type AgentLoopFinalResponseGuard,\n type AgentLoopFinalResponseGuardContext,\n type AgentLoopFinalResponseGuardResult,\n type AgentLoopToolCallSummary,\n type AgentLoopToolResultSummary,\n} from \"../agent/index.js\";\nexport {\n actionsToEngineTools,\n getOwnerActiveApiKey,\n runAgentLoop,\n} from \"../agent/production-agent.js\";\nexport {\n getStoredModelForEngine,\n resolveEngine,\n} from \"../agent/engine/index.js\";\nexport {\n completeText,\n type CompleteTextMessage,\n type CompleteTextOptions,\n type CompleteTextResult,\n type CompleteTextUsage,\n} from \"./complete-text.js\";\nexport { createDevScriptRegistry } from \"../scripts/dev/index.js\";\n\nexport {\n createPollHandler,\n recordChange,\n getVersion,\n getChangesSince,\n getPollEmitter,\n canSeeChangeForUser,\n POLL_CHANGE_EVENT,\n} from \"./poll.js\";\nexport { createPollEventsHandler } from \"./poll-events.js\";\nexport { createAuthPlugin, defaultAuthPlugin } from \"./auth-plugin.js\";\nexport {\n initServerSentry,\n isServerSentryEnabled,\n setSentryUserForRequest,\n captureRouteError,\n type RouteErrorContext,\n} from \"./sentry.js\";\nexport {\n captureError,\n captureServerError,\n registerErrorCaptureProvider,\n type CaptureErrorContext,\n type CaptureErrorProvider,\n} from \"./capture-error.js\";\nexport { createSentryPlugin, defaultSentryPlugin } from \"./sentry-plugin.js\";\n// Re-export the org plugin so the auto-discovery's DEFAULT_PLUGIN_REGISTRY\n// (which references \"defaultOrgPlugin\" from @agent-native/core/server) can\n// resolve it during the deploy build worker-entry generation.\nexport { createOrgPlugin, defaultOrgPlugin } from \"../org/plugin.js\";\nexport {\n createContextXrayPlugin,\n defaultContextXrayPlugin,\n} from \"../agent/context-xray/plugin.js\";\nexport {\n createObservationalMemoryPlugin,\n defaultObservationalMemoryPlugin,\n} from \"../agent/observational-memory/plugin.js\";\nexport {\n createGoogleAuthPlugin,\n type GoogleAuthPluginOptions,\n} from \"./google-auth-plugin.js\";\nexport type { GoogleAuthMode } from \"./google-auth-mode.js\";\nexport {\n createAgentChatPlugin,\n defaultAgentChatPlugin,\n type AgentChatPluginOptions,\n} from \"./agent-chat-plugin.js\";\nexport {\n configureAgentNativeEmbeddedEnvironment,\n createAgentNativeEmbeddedAuthOptions,\n createAgentNativeEmbeddedPlugin,\n mountAgentNativeEmbedded,\n normalizeAgentNativeEmbeddedSession,\n type AgentNativeEmbeddedAuthOptions,\n type AgentNativeEmbeddedGetSession,\n type AgentNativeEmbeddedHostSession,\n type AgentNativeEmbeddedPluginOptions,\n} from \"./embedded.js\";\nexport {\n createThread,\n getThread,\n listThreads,\n updateThreadData,\n deleteThread,\n setThreadArchived,\n setThreadPinned,\n setThreadScope,\n type ChatThread,\n type ChatThreadScope,\n type ChatThreadSummary,\n type ListThreadsOptions,\n} from \"../chat-threads/store.js\";\nexport {\n createResourcesPlugin,\n defaultResourcesPlugin,\n} from \"./resources-plugin.js\";\nexport {\n createCoreRoutesPlugin,\n defaultCoreRoutesPlugin,\n FRAMEWORK_ROUTE_PREFIX,\n type CoreRoutesPluginOptions,\n} from \"./core-routes-plugin.js\";\nexport {\n AGENT_NATIVE_OG_IMAGE_CACHE_CONTROL,\n AGENT_NATIVE_OG_IMAGE_HEIGHT,\n AGENT_NATIVE_OG_IMAGE_NETLIFY_CACHE_CONTROL,\n AGENT_NATIVE_OG_IMAGE_WIDTH,\n agentNativeOgImageResponseHeaders,\n createAgentNativeOgImageHandler,\n renderAgentNativeOgImagePng,\n renderAgentNativeOgImageSvg,\n type AgentNativeOgImageInput,\n} from \"./social-og-image.js\";\nexport {\n createBrowserSessionActionEntries,\n type CreateBrowserSessionActionEntriesOptions,\n} from \"../browser-sessions/actions.js\";\nexport {\n DEFAULT_BROWSER_SESSION_REQUEST_POLL_MS,\n DEFAULT_BROWSER_SESSION_REQUEST_TIMEOUT_MS,\n DEFAULT_BROWSER_SESSION_TTL_MS,\n callBrowserSession,\n claimBrowserSessionRequest,\n completeBrowserSessionRequest,\n createBrowserSessionRequest,\n disconnectBrowserSession,\n getBrowserSession,\n getBrowserSessionRequest,\n listBrowserSessions,\n registerBrowserSession,\n waitForBrowserSessionRequest,\n} from \"../browser-sessions/store.js\";\nexport {\n mountBrowserSessionRoutes,\n type MountBrowserSessionRoutesOptions,\n} from \"../browser-sessions/routes.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n createTerminalPlugin,\n defaultTerminalPlugin,\n type TerminalPluginOptions,\n} from \"../terminal/terminal-plugin.js\";\nexport {\n createCollabPlugin,\n type CollabPluginOptions,\n} from \"./collab-plugin.js\";\n\nexport {\n spawnTask,\n getTask,\n getTaskByThread,\n listTasks,\n sendToTask,\n markTaskErrored,\n type AgentTask,\n type SpawnTaskOptions,\n} from \"./agent-teams.js\";\nexport { isOAuthConnected, getOAuthAccounts } from \"./oauth-helpers.js\";\nexport { wrapWithAnalytics } from \"./analytics.js\";\nexport {\n getH3App,\n awaitBootstrap,\n markDefaultPluginProvided,\n type H3AppShim,\n} from \"./framework-request-handler.js\";\nexport {\n autoDiscoverActions,\n autoDiscoverScripts,\n loadActionsFromStaticRegistry,\n mergeCoreSharingActions,\n registerPackageActions,\n} from \"./action-discovery.js\";\nexport {\n mountActionRoutes,\n type MountActionRoutesOptions,\n} from \"./action-routes.js\";\nexport {\n runWithRequestContext,\n hasRequestContext,\n getRequestContext,\n getRequestUserEmail,\n getRequestUserName,\n getRequestOrgId,\n getRequestTimezone,\n getRequestRunContext,\n getCredentialContext,\n isIntegrationCallerRequest,\n type RequestContext,\n type RequestRunContext,\n} from \"./request-context.js\";\nexport { formatDateInTimezone, todayInTimezone } from \"./date-utils.js\";\n\nexport {\n createOnboardingPlugin,\n defaultOnboardingPlugin,\n} from \"../onboarding/plugin.js\";\n\nexport {\n registerFileUploadProvider,\n unregisterFileUploadProvider,\n listFileUploadProviders,\n getActiveFileUploadProvider,\n uploadFile,\n builderFileUploadProvider,\n type FileUploadInput,\n type FileUploadProvider,\n type FileUploadResult,\n} from \"../file-upload/index.js\";\n\nexport {\n createIntegrationsPlugin,\n defaultIntegrationsPlugin,\n enqueueRemoteCommand,\n slackAdapter,\n telegramAdapter,\n whatsappAdapter,\n emailAdapter,\n type PlatformAdapter,\n type IncomingMessage,\n type OutgoingMessage,\n type IntegrationStatus,\n type IntegrationsPluginOptions,\n} from \"../integrations/index.js\";\n\nexport {\n isElectron,\n isMobile,\n getOrigin,\n getAppBasePath,\n getAppUrl,\n resolveOAuthRedirectUri,\n isAllowedOAuthRedirectUri,\n encodeOAuthState,\n decodeOAuthState,\n resolveOAuthOwner,\n createOAuthSession,\n oauthCallbackResponse,\n oauthErrorPage,\n oauthDesktopExchangePage,\n type OAuthStatePayload,\n type OAuthOwnerResult,\n type OAuthSessionResult,\n} from \"./google-oauth.js\";\n\nexport {\n FeatureNotConfiguredError,\n hasBuilderPrivateKey,\n isBuilderEnvManaged,\n getBuilderProxyOrigin,\n getBuilderImageGenerationBaseUrl,\n getBuilderWebSearchBaseUrl,\n getBuilderAuthHeader,\n resolveBuilderPrivateKey,\n resolveBuilderAuthHeader,\n resolveHasBuilderPrivateKey,\n resolveHasCompleteBuilderConnection,\n resolveBuilderCredentials,\n resolveBuilderCredential,\n writeBuilderCredentials,\n deleteBuilderCredentials,\n resolveSecret,\n} from \"./credential-provider.js\";\nexport {\n getBuilderBranchProjectId,\n isBuilderBranchingEnabled,\n resolveBuilderBranchProjectId,\n resolveIsBuilderBranchingEnabled,\n runBuilderAgent,\n type RunBuilderAgentResult,\n} from \"./builder-browser.js\";\n\nexport {\n sendEmail,\n isEmailConfigured,\n getEmailProvider,\n type EmailProvider,\n type SendEmailArgs,\n} from \"./email.js\";\nexport {\n renderEmail,\n emailStrong,\n emailLink,\n type RenderEmailArgs,\n type RenderedEmail,\n type EmailCta,\n} from \"./email-template.js\";\nexport { getAppProductionUrl, getFirstPartyProdUrl } from \"./app-url.js\";\nexport {\n getConfiguredAppBasePath,\n normalizeAppBasePath,\n withConfiguredAppBasePath,\n} from \"./app-base-path.js\";\nexport {\n signShortLivedToken,\n verifyShortLivedToken,\n type ShortLivedTokenClaims,\n type VerifyResult as ShortLivedTokenVerifyResult,\n} from \"./short-lived-token.js\";\n\n// SSR handler is NOT re-exported here — it uses a virtual module\n// (virtual:react-router/server-build) that only exists at Vite dev/build time.\n// Including it in this barrel would break the esbuild CF Pages bundler.\n// Templates import directly: import { ssrHandler } from \"@agent-native/core/server/ssr-handler\"\n\n// Nitro plugin helper — re-exported so templates don't need nitro as a direct dependency.\n// defineNitroPlugin is an identity function; this typed wrapper lets templates use it\n// without resolving `nitro/runtime` (which requires Nitro's virtual modules at runtime).\nexport type NitroPluginDef = (nitroApp: any) => void | Promise<void>;\nexport function defineNitroPlugin(def: NitroPluginDef): NitroPluginDef {\n return def;\n}\n"]}
@@ -416,3 +416,13 @@ before telling the user they are unauthenticated.
416
416
  - **a2a-protocol** — the `ask-agent` meta-tool and JSON-RPC peer calls
417
417
  - **adding-a-feature** — the four-area checklist (add a `link` builder when a
418
418
  feature produces a navigable resource)
419
+
420
+ ## Blueprint installer
421
+
422
+ To add a whole new integration the agent-native way, `agent-native add <kind>
423
+ <name|url>` prints a curated Markdown blueprint to stdout — pipe it into the
424
+ external coding agent you connected (`agent-native add provider stripe |
425
+ claude`) and it applies the changes against the live repo. A URL emits a
426
+ generic research-and-integrate blueprint instead. Seeded kinds:
427
+ `provider` / `channel` / `sandbox` / `action`. Add your own by dropping a
428
+ `.md` in `packages/core/blueprints/<kind>/`. See the Blueprint Installer doc.
@@ -80,6 +80,26 @@ existing run routes as `goalId=agent-harness`.
80
80
  Preserve `defineAction` auth, request context, timeouts, truncation, and
81
81
  read-only metadata.
82
82
 
83
+ ## Code Execution Sandbox
84
+
85
+ - The `run-code` tool executes through a pluggable `SandboxAdapter`
86
+ (`packages/core/src/coding-tools/sandbox/`). The default
87
+ `LocalChildProcessAdapter` spawns a locked-down local Node child process;
88
+ swap it via `AGENT_NATIVE_SANDBOX` or `registerSandboxAdapter()` for a
89
+ Docker/remote/durable backend (the lever to exceed the hosted ~40s code-exec
90
+ ceiling). An adapter only runs the already-prepared, non-secret module source
91
+ — it never sees app secrets. See the Sandbox Adapters doc; `agent-native add
92
+ sandbox docker` emits a full Docker-adapter recipe.
93
+
94
+ ## Sub-Agent Delegation Depth
95
+
96
+ - Sub-agent spawning is capped server-side (default depth `2`) so delegation
97
+ chains can't fan out indefinitely. Override at deploy time with
98
+ `AGENT_NATIVE_MAX_SUBAGENT_DEPTH` (`0` disables sub-agents; clamped to `16`).
99
+ Enforcement is ambient via `evaluateSubagentDepth` in
100
+ `packages/core/src/server/agent-teams.ts` — independent of any tool-level
101
+ guard. See the Agent Teams doc for the depth model.
102
+
83
103
  ## Don't
84
104
 
85
105
  - Don't add Claude Code, Codex, Cursor, Mastra, or Pi as an `AgentEngine`.
@@ -75,6 +75,26 @@ const criteria: EvalCriteria = {
75
75
  };
76
76
  ```
77
77
 
78
+ #### Evals (CI gate)
79
+
80
+ The three layers above score *real production runs* after the fact. For an active, deterministic gate, use the first-class `*.eval.ts` primitive from `@agent-native/core/eval` (source: `packages/core/src/eval/*`). It runs the actual agent loop against fixed inputs and exits non-zero below threshold, so it gates CI/deploys.
81
+
82
+ ```ts
83
+ // evals/faq.eval.ts
84
+ import { defineEval, contains, llmJudge } from "@agent-native/core/eval";
85
+
86
+ export default defineEval({
87
+ name: "answers the FAQ",
88
+ input: { prompt: "What is your return policy?" },
89
+ threshold: 0.7,
90
+ scorers: [contains("30 days"), llmJudge({ criteria: "accuracy" })],
91
+ });
92
+ ```
93
+
94
+ - Built-in scorers: `exactMatch` / `contains` / `usesTool` (pure JS) and `llmJudge` (provider-agnostic judge).
95
+ - Custom scorers: `createScorer` with the 4-step `preprocess → analyze → generateScore → generateReason` pipeline (only `generateScore` is required).
96
+ - Run as a gate: `agent-native eval [pattern] [--json] [--threshold N]` — discovers `**/*.eval.ts` and `evals/*.ts`, runs the agent, and exits non-zero if any eval is below its threshold. An app with no eval files exits `0`. Complements (does not replace) the post-hoc scoring in `evals.ts`. See the Evals doc.
97
+
78
98
  ### 4. Experiments
79
99
 
80
100
  A/B testing with sticky user-level assignment:
@@ -141,6 +141,38 @@ You are a meticulous code reviewer. Be terse and concrete — cite file:line whe
141
141
 
142
142
  Store at `agents/code-review.md` in the workspace. It appears in the `@mention` dropdown and is available to the main agent as a delegation target. See [Workspace — Custom Agents](/docs/workspace#custom-agents) for the full format including `tools`, `delegate-default`, and model overrides.
143
143
 
144
+ ## Delegation depth guard {#depth-guard}
145
+
146
+ Sub-agents can spawn sub-agents, which is a runaway/cost risk: an unbounded chain of delegations could fan out indefinitely. The framework enforces a **hard cap on delegation depth**, server-side, independent of any tool-level guard.
147
+
148
+ The top-level chat is depth `0`. A sub-agent it spawns is depth `1`; that sub-agent may spawn once more (depth `2`); a spawn that would create a depth-`3` sub-agent is **refused**. The default cap is **2**.
149
+
150
+ ```txt
151
+ depth 0 top-level chat (may spawn)
152
+ depth 1 sub-agent (may spawn)
153
+ depth 2 sub-agent's sub-agent (at the cap — may NOT spawn)
154
+ depth 3 refused
155
+ ```
156
+
157
+ Enforcement is ambient: each sub-agent runs inside an `AsyncLocalStorage` that records its own depth, so any `spawnTask` reached transitively from that run reads its parent's depth and refuses once the cap is hit — even if the `agent-teams` tool was handed to a sub-agent that should not have had it. The decision is exposed as a pure, unit-testable `evaluateSubagentDepth(parentDepth)`. A refused spawn returns a clear error: _"Delegation depth limit reached (max N); cannot spawn another sub-agent."_
158
+
159
+ ### Configuring the cap {#depth-guard-config}
160
+
161
+ Override the default at deploy time with `AGENT_NATIVE_MAX_SUBAGENT_DEPTH`:
162
+
163
+ | Value | Effect |
164
+ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
165
+ | _(unset)_ | Default cap of `2`. |
166
+ | `0` | **No sub-agents may be spawned** — the top-level agent does all work. |
167
+ | `1`…`16` | That many levels of delegation. |
168
+ | invalid / `>16` | A non-integer / negative / NaN value falls back to `2`; anything above `16` is clamped to `16` so a typo can never disable the guard. |
169
+
170
+ ```bash
171
+ AGENT_NATIVE_MAX_SUBAGENT_DEPTH=1 # sub-agents allowed, but they can't sub-delegate
172
+ ```
173
+
174
+ When a sub-agent is at or below the cap, the framework injects a line into its runtime context telling it how deep it sits and whether it may delegate further, so the model spends its budget appropriately.
175
+
144
176
  ## What's next
145
177
 
146
178
  - [**Workspace — Custom Agents**](/docs/workspace#custom-agents) — the profile format
@@ -0,0 +1,73 @@
1
+ ---
2
+ title: "Blueprint Installer"
3
+ description: "agent-native add prints a curated Markdown integration recipe to stdout — pipe it into your coding agent, which applies the changes against your live repo."
4
+ ---
5
+
6
+ # Blueprint Installer
7
+
8
+ `agent-native add` is **not** a dumb scaffolder that writes files for you. It emits a curated Markdown _integration blueprint_ to stdout. You pipe that blueprint into your own coding agent (Claude Code, Codex, …), which applies the changes against the live repo with full context.
9
+
10
+ This fits the agent-applies-changes, filesystem-first house style: the framework supplies the recipe (the canonical files to touch, the rules to honor, the verification step), and the coding agent does the editing.
11
+
12
+ ```bash
13
+ agent-native add provider stripe | claude
14
+ agent-native add channel discord | codex
15
+ ```
16
+
17
+ ## Usage {#usage}
18
+
19
+ ```bash
20
+ agent-native add <kind> <name> # print a curated blueprint
21
+ agent-native add <kind> <https://docs…> # research-and-integrate from a URL
22
+ agent-native add --list # list available kinds and blueprints
23
+ ```
24
+
25
+ - A bare **name** resolves a curated blueprint from `blueprints/<kind>/<name>.md`.
26
+ - A **URL** instead of a name emits a generic _research-and-integrate_ blueprint for that kind, with the URL embedded as the research starting point (a URL is a research seed, not a known recipe).
27
+ - The blueprint goes to **stdout**; diagnostics go to stderr, so `… | claude` only ever receives the blueprint.
28
+
29
+ ## Seeded blueprints {#seeded}
30
+
31
+ `agent-native add --list` shows what ships in the box:
32
+
33
+ | Kind | Name | What it sets up |
34
+ | ---------- | --------- | ---------------------------------------------------------------------------------- |
35
+ | `provider` | `stripe` | Wire a provider into the `provider-api` substrate (catalog / docs / request trio). |
36
+ | `channel` | `discord` | Implement a `PlatformAdapter` inbound webhook channel and register it. |
37
+ | `sandbox` | `docker` | Implement the `SandboxAdapter` seam to run `run-code` in a Docker container. |
38
+ | `action` | `crud` | Add a single multi-surface `defineAction` with a Zod schema (one `update` over N). |
39
+
40
+ Each blueprint is self-contained: the coding agent reading it gets the files to touch, the framework rules to honor (actions are the single source of truth, never hardcode secrets, scope ownable data, add a changeset for `packages/*` source), and a concrete **Verify** section.
41
+
42
+ ## URL → research blueprint {#url}
43
+
44
+ When you pass a URL the kind doesn't have a curated recipe for (or want a fresh integration), `add` emits a generic "research-and-integrate" blueprint with the URL as the seed:
45
+
46
+ ```bash
47
+ agent-native add provider https://docs.example.com/api | claude
48
+ ```
49
+
50
+ The generated blueprint tells the coding agent to fetch the URL (and the pages it links to) for the real endpoints, auth model, payload shapes, and signature/verification requirements — _not_ to guess from training data — then implement and verify. It also carries kind-specific guidance (e.g. a `provider` URL is steered toward the `provider-api` substrate; a `channel` URL toward a `PlatformAdapter`).
51
+
52
+ ## Adding your own blueprint {#authoring}
53
+
54
+ Drop a Markdown file into `packages/core/blueprints/<kind>/<name>.md`. The kind is the subdirectory; the name is the filename without `.md`. It is picked up automatically — `--list`, name resolution, and the catalog all read the directory at runtime. No code change is needed to register it.
55
+
56
+ Blueprint `.md` files ship in the published package via the `blueprints` entry in `package.json` `files`, so they resolve at `node_modules/@agent-native/core/blueprints/**` for end users.
57
+
58
+ Write each blueprint as an instruction set for a coding agent with no other context. A good blueprint has:
59
+
60
+ 1. **A one-line goal** and a "you are a coding agent in an agent-native app, apply these as real source changes" framing.
61
+ 2. **Read first** — the exact files that _are_ the contract.
62
+ 3. **Files to touch** — concrete paths and what each change does.
63
+ 4. **Framework rules to honor** — actions-first, no hardcoded secrets, scope ownable data, add a changeset for publishable-package source.
64
+ 5. **Verify** — typecheck, a focused `*.spec.ts`, and an end-to-end check.
65
+
66
+ > [!TIP]
67
+ > A new curated blueprint under an existing kind needs no code — but if you create a brand-new kind directory, that kind shows up in `--list` automatically too.
68
+
69
+ ## What's next
70
+
71
+ - [**Sandbox Adapters**](/docs/sandbox-adapters) — the seam the `add sandbox docker` blueprint targets
72
+ - [**Actions**](/docs/actions) — the single source of truth every blueprint builds on
73
+ - [**External Agents**](/docs/external-agents) — connecting the coding agent you pipe blueprints into
@@ -0,0 +1,141 @@
1
+ ---
2
+ title: "Evals (CI Gate)"
3
+ description: "Write *.eval.ts test cases that run the real agent against fixed inputs, score the output with composable scorers, and gate CI/deploys on a threshold."
4
+ ---
5
+
6
+ # Evals (CI Gate)
7
+
8
+ Evals are a first-class testing primitive: you declare a prompt plus the behavior you expect, the runner **actually runs the agent loop** against that input, scores the output with composable scorers, and exits non-zero if any case scores below its threshold. That non-zero exit makes `agent-native eval` a drop-in CI deploy gate.
9
+
10
+ This is complementary to the post-hoc scoring in [Observability](/docs/observability):
11
+
12
+ - **Observability evals** (`observability/evals.ts`) — _"how did this real run do?"_ Passive, sampled, lives next to traces.
13
+ - **`*.eval.ts` (this primitive)** — _"does the agent do the right thing on this fixed input?"_ Active, deterministic, a CI gate run via the CLI.
14
+
15
+ The runner resolves a provider-agnostic engine/model from the existing registry — no model is hardcoded — so the same suite runs against whatever engine the app is configured for.
16
+
17
+ ## Writing an eval {#writing}
18
+
19
+ Drop a `*.eval.ts` file anywhere in the app (or an `evals/*.ts` file). Each file `export default defineEval(...)` (or exports an array of them):
20
+
21
+ ```ts
22
+ // evals/greeting.eval.ts
23
+ import { defineEval, contains, llmJudge } from "@agent-native/core/eval";
24
+
25
+ export default defineEval({
26
+ name: "greets the user by name",
27
+ input: { prompt: "Say hi to Ada." },
28
+ threshold: 0.7, // per-scorer pass bar; default 0.5
29
+ scorers: [
30
+ contains("Ada"),
31
+ llmJudge({ criteria: "friendliness", rubric: "1.0 = warm greeting" }),
32
+ ],
33
+ });
34
+ ```
35
+
36
+ An eval passes only when **every** scorer meets the threshold. Key `defineEval` fields:
37
+
38
+ | Field | Type | Notes |
39
+ | ----------- | --------------------- | ------------------------------------------------------------- |
40
+ | `name` | string | Required. Shown in the report. |
41
+ | `input` | `{ prompt, history }` | Required `prompt`; optional prior `{ role, text }` turns. |
42
+ | `scorers` | `Scorer[]` | Required, at least one. |
43
+ | `threshold` | number `0..1` | Per-scorer pass bar. Default `0.5`; overridable from the CLI. |
44
+ | `run` | function | Optional override for custom setup (seed data, multi-turn). |
45
+
46
+ The agent run handed to scorers is small and transport-agnostic:
47
+
48
+ ```ts
49
+ interface AgentRunOutput {
50
+ text: string; // concatenated assistant text
51
+ toolCalls: readonly string[]; // tool/action names, in call order
52
+ ok: boolean; // completed without a terminal error
53
+ error?: string;
54
+ runId: string;
55
+ durationMs: number;
56
+ }
57
+ ```
58
+
59
+ ## Built-in scorers {#built-in}
60
+
61
+ Imported from `@agent-native/core/eval`:
62
+
63
+ | Scorer | Score | Model? |
64
+ | ------------------------ | ----------------------------------------------------------------- | ------ |
65
+ | `exactMatch(expected)` | `1.0` if text equals `expected` (trimmed, case-insensitive) | No |
66
+ | `contains(needles)` | Fraction of required substrings present (so partial hits surface) | No |
67
+ | `usesTool(toolName)` | `1.0` if the agent invoked that tool/action at least once | No |
68
+ | `llmJudge({ criteria })` | LLM-as-judge scored against a natural-language rubric, → `0..1` | Yes |
69
+
70
+ `exactMatch` and `contains` take an optional `{ caseSensitive }`. `llmJudge` takes `{ criteria, rubric?, name?, scoreRange? }` — its output is normalized to `[0, 1]`, and the judge model is whatever the runner resolved (never a hardcoded provider).
71
+
72
+ ## Custom scorers: the 4-step pipeline {#custom}
73
+
74
+ `createScorer` builds a scorer from a Mastra-style 4-step pipeline. Only `generateScore` is required:
75
+
76
+ ```txt
77
+ preprocess(run) → x transform the run/output (optional)
78
+ analyze(x, ctx) → analysis plain JS OR an LLM judge (optional)
79
+ generateScore(a) → 0..1 REQUIRED, normalized
80
+ generateReason(...) → string human-readable why (optional)
81
+ ```
82
+
83
+ `preprocess` and `analyze` default to identity (the scorer sees the raw `AgentRunOutput`). The `analyze` step receives a `ctx` with a provider-agnostic `judge()` helper for LLM-backed scoring:
84
+
85
+ ```ts
86
+ import { createScorer, clamp01 } from "@agent-native/core/eval";
87
+
88
+ // A scorer that rewards short, tool-using answers.
89
+ const concise = createScorer({
90
+ name: "concise_with_tool",
91
+ analyze(run) {
92
+ return {
93
+ words: run.text.trim().split(/\s+/).length,
94
+ usedTool: run.toolCalls.length > 0,
95
+ };
96
+ },
97
+ generateScore({ words, usedTool }) {
98
+ if (!usedTool) return 0;
99
+ return clamp01(1 - Math.max(0, words - 40) / 200);
100
+ },
101
+ generateReason({ analysis }) {
102
+ return `${analysis.words} words, tool used: ${analysis.usedTool}`;
103
+ },
104
+ });
105
+ ```
106
+
107
+ ## Running the gate {#cli}
108
+
109
+ ```bash
110
+ agent-native eval # run every *.eval.ts; non-zero exit on failure
111
+ agent-native eval billing # only files whose path contains "billing"
112
+ agent-native eval --json # machine-readable report (for CI)
113
+ agent-native eval --threshold 0.8 # override every eval's pass threshold (0..1)
114
+ ```
115
+
116
+ The command discovers `**/*.eval.ts` and `evals/*.ts` under the current app, runs the agent for each input, scores it, prints a readable table (or JSON), and **exits non-zero if any eval scores below its threshold**.
117
+
118
+ Exit codes:
119
+
120
+ | Code | Meaning |
121
+ | ---- | --------------------------------------------------------------- |
122
+ | `0` | All evals passed — _or_ no eval files were found (CI-friendly). |
123
+ | `1` | At least one eval scored below threshold, or the suite errored. |
124
+ | `2` | Bad arguments (e.g. `--threshold` outside `[0, 1]`). |
125
+
126
+ ### As a CI deploy gate {#ci}
127
+
128
+ Add it to the pipeline that runs before a deploy:
129
+
130
+ ```yaml
131
+ # .github/workflows/deploy.yml (excerpt)
132
+ - run: npx agent-native eval --json
133
+ ```
134
+
135
+ A regression that drops any scorer below threshold fails the step and blocks the deploy. An app with no eval files exits `0`, so adopting evals is opt-in per app.
136
+
137
+ ## What's next
138
+
139
+ - [**Observability**](/docs/observability) — post-hoc scoring of real production runs (the complementary layer)
140
+ - [**Actions**](/docs/actions) — the tools/actions that show up in `toolCalls`
141
+ - [**Agent Teams**](/docs/agent-teams) — sub-agents an eval might exercise
@@ -216,12 +216,15 @@ the prompt instructs the agent to write `plans/pr-123-visual-recap/plan.mdx`
216
216
  plus optional visual files and then run:
217
217
 
218
218
  ```bash
219
- npx @agent-native/core@latest plan local preview --dir plans/pr-123-visual-recap --kind recap --open
219
+ npx @agent-native/core@latest plan local serve --dir plans/pr-123-visual-recap --kind recap --open
220
220
  ```
221
221
 
222
- The returned `file://` preview, or `/local-plans/pr-123-visual-recap` in a local
223
- Plan app using the same `PLAN_LOCAL_DIR`, is the review link. This mode disables
224
- the hosted sticky PR comment, inline screenshot upload, usage attachment, and
222
+ The returned URL opens the hosted Plan UI while the browser reads the recap MDX
223
+ from a localhost bridge. Recap content is not written to the hosted Plan
224
+ database, and the URL only works on the machine running the bridge. If you run
225
+ the Plan app locally with the same `PLAN_LOCAL_DIR`, the
226
+ `/local-plans/pr-123-visual-recap` route is also valid. This mode disables the
227
+ hosted sticky PR comment, inline screenshot upload, usage attachment, and
225
228
  browser comments until you explicitly publish.
226
229
 
227
230
  ## It's informational, not a gate
@@ -0,0 +1,134 @@
1
+ ---
2
+ title: "Sandbox Adapters"
3
+ description: "Swap the backend that runs the agent's run-code tool — local child process by default, a remote/durable runner when you need to exceed the hosted code-exec ceiling."
4
+ ---
5
+
6
+ # Sandbox Adapters
7
+
8
+ The `run-code` tool runs agent-supplied JavaScript in an isolated environment. **Sandbox adapters** factor the _execution_ concern out of that tool so the backend can be swapped — a local child process by default, or a Docker / remote / durable runner — without touching the agent loop, `run-code.ts`, the localhost bridge, the env scrub, or the output formatting.
9
+
10
+ ## Why a seam {#why}
11
+
12
+ The default backend spawns a locked-down local Node child process. That's bounded by the hosting process: on the hosted platform it shares the agent loop's soft execution ceiling (~40s before timeout/continuation thrash). A remote or durable adapter is the lever to exceed that ceiling — it runs large data jobs to completion independently of the request lifecycle.
13
+
14
+ Keeping the contract narrow means a remote adapter inherits the same security posture. The parent process keeps ownership of everything secret-bearing: it builds the sandbox module, runs the localhost bridge (which holds the request context and applies host allowlists + SSRF guards), scrubs the env, and formats output. An adapter only receives an already-prepared, **non-secret** module source plus resource limits — it is responsible solely for _running_ it and capturing stdout/stderr/exit status.
15
+
16
+ ## The interface {#interface}
17
+
18
+ The seam lives in core at `packages/core/src/coding-tools/sandbox/` — `adapter.ts` (the contract), `index.ts` (selection: `getSandboxAdapter()` / `registerSandboxAdapter()`), and `local-child-process-adapter.ts` (the default). It is wired in-package by `run-code.ts`; a host plugs in a different backend through the `index.ts` registration helper (or, for a Docker backend, via the [blueprint](/docs/blueprint-installer) that edits these files directly).
19
+
20
+ Every backend implements `SandboxAdapter`:
21
+
22
+ ```ts
23
+ interface SandboxAdapter {
24
+ /** Stable id, surfaced for diagnostics and adapter selection. */
25
+ readonly id: string;
26
+ /** Execute one prepared sandbox module and capture its output. */
27
+ run(request: SandboxRunRequest): Promise<SandboxRunResult>;
28
+ }
29
+ ```
30
+
31
+ The request and result are intentionally small and opaque:
32
+
33
+ ```ts
34
+ interface SandboxRunRequest {
35
+ /**
36
+ * The complete ESM module source to execute. Already wraps the user's code
37
+ * and embeds the loopback bridge URL/token; the adapter does NOT parse or
38
+ * rewrite it.
39
+ */
40
+ moduleSource: string;
41
+ /**
42
+ * Scrubbed environment — only safe POSIX vars (PATH/HOME/TMPDIR/…), never app
43
+ * secrets. Adapters must not augment this with the parent's own environment.
44
+ */
45
+ env: Record<string, string>;
46
+ /** Hard wall-clock timeout in milliseconds. The adapter must enforce it. */
47
+ timeoutMs: number;
48
+ /**
49
+ * Loopback port of the parent's bridge server (reachable over 127.0.0.1). A
50
+ * remote adapter that can't reach the parent's loopback must tunnel or proxy
51
+ * this to support bridge-backed globals (`appAction`, `providerFetch`, …).
52
+ */
53
+ bridgePort: number;
54
+ }
55
+
56
+ interface SandboxRunResult {
57
+ stdout: string;
58
+ stderr: string;
59
+ /** `0` on clean exit, non-zero on failure, `null` when killed by a signal. */
60
+ exitCode: number | null;
61
+ /** True when the run was killed for exceeding `timeoutMs`. */
62
+ timedOut: boolean;
63
+ }
64
+ ```
65
+
66
+ ## The default: `LocalChildProcessAdapter` {#default}
67
+
68
+ Out of the box, `getSandboxAdapter()` returns `LocalChildProcessAdapter` (`id: "local-child-process"`). It preserves the historical `run-code` behavior byte-for-byte:
69
+
70
+ - The prepared module source is written to a fresh temp dir.
71
+ - The child runs with the scrubbed env (no secrets), with `TMPDIR`/`TEMP`/`TMP` pointed inside the sandbox dir.
72
+ - When the Node permission model is available (`--permission`, or `--experimental-permission` on Node 20), the child is denied filesystem access outside its temp dir, plus child processes, workers, and native addons. Outbound network is _not_ blocked by the permission model — but the env scrub means such requests carry no credentials, and all authenticated calls go through the parent's loopback bridge.
73
+ - A timeout sends `SIGTERM`, then `SIGKILL` after a 2s grace period.
74
+ - Temp files are cleaned up best-effort after the run.
75
+
76
+ > [!WARNING]
77
+ > The default adapter uses `node:child_process`, which does not exist on edge/worker runtimes (Cloudflare Workers, Netlify Edge Functions). Run `run-code` in a standard Node.js environment, or register a remote adapter.
78
+
79
+ ## Selecting an adapter {#selection}
80
+
81
+ Resolution order — an explicitly registered adapter wins; otherwise the env var selects a built-in; otherwise the local default is used:
82
+
83
+ ```txt
84
+ registerSandboxAdapter(adapter) → AGENT_NATIVE_SANDBOX → local default
85
+ ```
86
+
87
+ ### `AGENT_NATIVE_SANDBOX` env var {#env}
88
+
89
+ Selects a built-in adapter by id. Currently only `local` (the default) is wired; unknown values fall back to local rather than failing the run.
90
+
91
+ ```bash
92
+ AGENT_NATIVE_SANDBOX=local # the default — explicit
93
+ ```
94
+
95
+ ### `registerSandboxAdapter()` {#register}
96
+
97
+ A host process overrides the backend for all subsequent `run-code` invocations through the seam's `index.ts` — for example, to run every call in a remote container:
98
+
99
+ ```ts
100
+ import {
101
+ registerSandboxAdapter,
102
+ type SandboxAdapter,
103
+ } from "./coding-tools/sandbox/index.js";
104
+
105
+ class RemoteSandboxAdapter implements SandboxAdapter {
106
+ readonly id = "remote";
107
+ async run(request) {
108
+ // Ship request.moduleSource to the durable runner, enforce request.timeoutMs,
109
+ // proxy bridge calls back to request.bridgePort, and return stdout/stderr/exitCode.
110
+ }
111
+ }
112
+
113
+ registerSandboxAdapter(new RemoteSandboxAdapter());
114
+ // Pass `null` to clear the override and fall back to env-var / default resolution.
115
+ ```
116
+
117
+ ## The seam for a durable runner {#durable}
118
+
119
+ This interface is deliberately the seam for a future remote/durable sandbox. A remote or durable adapter (Docker, a Vercel-Sandbox-style runner, or a queued background worker) would:
120
+
121
+ 1. Implement `SandboxAdapter.run` against an out-of-process runtime.
122
+ 2. Tunnel the loopback bridge (or proxy bridge calls back to the parent).
123
+ 3. Let large data jobs run to completion independently of the request lifecycle — exceeding the hosted ~40s code-exec ceiling that bounds the local child-process adapter.
124
+
125
+ Register it under a new `AGENT_NATIVE_SANDBOX` value (e.g. `remote`) and/or via `registerSandboxAdapter()`. The agent loop and `run-code.ts` never change.
126
+
127
+ > [!TIP]
128
+ > The `agent-native add sandbox docker` blueprint emits a full, self-contained recipe for implementing a Docker adapter against this seam. See [Blueprint Installer](/docs/blueprint-installer).
129
+
130
+ ## What's next
131
+
132
+ - [**Blueprint Installer**](/docs/blueprint-installer) — `agent-native add sandbox docker` prints a Docker-adapter recipe
133
+ - [**Agent Teams**](/docs/agent-teams) — delegating heavy work to sub-agents
134
+ - [**Security**](/docs/security) — the env scrub and bridge allowlist posture