@agent-native/core 0.52.0 → 0.54.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 (267) 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 +64 -1
  7. package/dist/action.d.ts.map +1 -1
  8. package/dist/action.js +73 -2
  9. package/dist/action.js.map +1 -1
  10. package/dist/agent/index.d.ts +1 -0
  11. package/dist/agent/index.d.ts.map +1 -1
  12. package/dist/agent/index.js +1 -0
  13. package/dist/agent/index.js.map +1 -1
  14. package/dist/agent/observational-memory/compactor.d.ts +43 -0
  15. package/dist/agent/observational-memory/compactor.d.ts.map +1 -0
  16. package/dist/agent/observational-memory/compactor.js +50 -0
  17. package/dist/agent/observational-memory/compactor.js.map +1 -0
  18. package/dist/agent/observational-memory/config.d.ts +37 -0
  19. package/dist/agent/observational-memory/config.d.ts.map +1 -0
  20. package/dist/agent/observational-memory/config.js +48 -0
  21. package/dist/agent/observational-memory/config.js.map +1 -0
  22. package/dist/agent/observational-memory/index.d.ts +26 -0
  23. package/dist/agent/observational-memory/index.d.ts.map +1 -0
  24. package/dist/agent/observational-memory/index.js +25 -0
  25. package/dist/agent/observational-memory/index.js.map +1 -0
  26. package/dist/agent/observational-memory/internal-run.d.ts +37 -0
  27. package/dist/agent/observational-memory/internal-run.d.ts.map +1 -0
  28. package/dist/agent/observational-memory/internal-run.js +59 -0
  29. package/dist/agent/observational-memory/internal-run.js.map +1 -0
  30. package/dist/agent/observational-memory/message-text.d.ts +13 -0
  31. package/dist/agent/observational-memory/message-text.d.ts.map +1 -0
  32. package/dist/agent/observational-memory/message-text.js +46 -0
  33. package/dist/agent/observational-memory/message-text.js.map +1 -0
  34. package/dist/agent/observational-memory/migrations.d.ts +13 -0
  35. package/dist/agent/observational-memory/migrations.d.ts.map +1 -0
  36. package/dist/agent/observational-memory/migrations.js +43 -0
  37. package/dist/agent/observational-memory/migrations.js.map +1 -0
  38. package/dist/agent/observational-memory/observer.d.ts +37 -0
  39. package/dist/agent/observational-memory/observer.d.ts.map +1 -0
  40. package/dist/agent/observational-memory/observer.js +82 -0
  41. package/dist/agent/observational-memory/observer.js.map +1 -0
  42. package/dist/agent/observational-memory/plugin.d.ts +16 -0
  43. package/dist/agent/observational-memory/plugin.d.ts.map +1 -0
  44. package/dist/agent/observational-memory/plugin.js +26 -0
  45. package/dist/agent/observational-memory/plugin.js.map +1 -0
  46. package/dist/agent/observational-memory/prompts.d.ts +27 -0
  47. package/dist/agent/observational-memory/prompts.d.ts.map +1 -0
  48. package/dist/agent/observational-memory/prompts.js +42 -0
  49. package/dist/agent/observational-memory/prompts.js.map +1 -0
  50. package/dist/agent/observational-memory/read.d.ts +45 -0
  51. package/dist/agent/observational-memory/read.d.ts.map +1 -0
  52. package/dist/agent/observational-memory/read.js +97 -0
  53. package/dist/agent/observational-memory/read.js.map +1 -0
  54. package/dist/agent/observational-memory/reflector.d.ts +31 -0
  55. package/dist/agent/observational-memory/reflector.d.ts.map +1 -0
  56. package/dist/agent/observational-memory/reflector.js +76 -0
  57. package/dist/agent/observational-memory/reflector.js.map +1 -0
  58. package/dist/agent/observational-memory/schema.d.ts +267 -0
  59. package/dist/agent/observational-memory/schema.d.ts.map +1 -0
  60. package/dist/agent/observational-memory/schema.js +48 -0
  61. package/dist/agent/observational-memory/schema.js.map +1 -0
  62. package/dist/agent/observational-memory/store.d.ts +52 -0
  63. package/dist/agent/observational-memory/store.d.ts.map +1 -0
  64. package/dist/agent/observational-memory/store.js +197 -0
  65. package/dist/agent/observational-memory/store.js.map +1 -0
  66. package/dist/agent/observational-memory/types.d.ts +61 -0
  67. package/dist/agent/observational-memory/types.d.ts.map +1 -0
  68. package/dist/agent/observational-memory/types.js +9 -0
  69. package/dist/agent/observational-memory/types.js.map +1 -0
  70. package/dist/agent/processors.d.ts +146 -0
  71. package/dist/agent/processors.d.ts.map +1 -0
  72. package/dist/agent/processors.js +122 -0
  73. package/dist/agent/processors.js.map +1 -0
  74. package/dist/agent/production-agent.d.ts +25 -0
  75. package/dist/agent/production-agent.d.ts.map +1 -1
  76. package/dist/agent/production-agent.js +341 -1
  77. package/dist/agent/production-agent.js.map +1 -1
  78. package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
  79. package/dist/agent/run-loop-with-resume.js +48 -0
  80. package/dist/agent/run-loop-with-resume.js.map +1 -1
  81. package/dist/agent/run-store.d.ts +17 -0
  82. package/dist/agent/run-store.d.ts.map +1 -1
  83. package/dist/agent/run-store.js +55 -0
  84. package/dist/agent/run-store.js.map +1 -1
  85. package/dist/agent/runtime-context.d.ts +30 -0
  86. package/dist/agent/runtime-context.d.ts.map +1 -1
  87. package/dist/agent/runtime-context.js +54 -1
  88. package/dist/agent/runtime-context.js.map +1 -1
  89. package/dist/agent/tool-call-journal.d.ts +99 -0
  90. package/dist/agent/tool-call-journal.d.ts.map +1 -0
  91. package/dist/agent/tool-call-journal.js +212 -0
  92. package/dist/agent/tool-call-journal.js.map +1 -0
  93. package/dist/agent/types.d.ts +35 -0
  94. package/dist/agent/types.d.ts.map +1 -1
  95. package/dist/agent/types.js.map +1 -1
  96. package/dist/cli/add.d.ts +109 -0
  97. package/dist/cli/add.d.ts.map +1 -0
  98. package/dist/cli/add.js +352 -0
  99. package/dist/cli/add.js.map +1 -0
  100. package/dist/cli/connect.d.ts +2 -2
  101. package/dist/cli/connect.d.ts.map +1 -1
  102. package/dist/cli/connect.js +92 -24
  103. package/dist/cli/connect.js.map +1 -1
  104. package/dist/cli/eval.d.ts +17 -0
  105. package/dist/cli/eval.d.ts.map +1 -0
  106. package/dist/cli/eval.js +121 -0
  107. package/dist/cli/eval.js.map +1 -0
  108. package/dist/cli/index.js +44 -3
  109. package/dist/cli/index.js.map +1 -1
  110. package/dist/cli/mcp.d.ts.map +1 -1
  111. package/dist/cli/mcp.js +11 -5
  112. package/dist/cli/mcp.js.map +1 -1
  113. package/dist/cli/plan-local.d.ts +66 -5
  114. package/dist/cli/plan-local.d.ts.map +1 -1
  115. package/dist/cli/plan-local.js +622 -21
  116. package/dist/cli/plan-local.js.map +1 -1
  117. package/dist/cli/skills.d.ts +2 -2
  118. package/dist/cli/skills.d.ts.map +1 -1
  119. package/dist/cli/skills.js +108 -62
  120. package/dist/cli/skills.js.map +1 -1
  121. package/dist/client/AssistantChat.d.ts.map +1 -1
  122. package/dist/client/AssistantChat.js +118 -92
  123. package/dist/client/AssistantChat.js.map +1 -1
  124. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  125. package/dist/client/agent-chat-adapter.js +16 -0
  126. package/dist/client/agent-chat-adapter.js.map +1 -1
  127. package/dist/client/chat/tool-call-display.d.ts +20 -1
  128. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  129. package/dist/client/chat/tool-call-display.js +32 -7
  130. package/dist/client/chat/tool-call-display.js.map +1 -1
  131. package/dist/client/sse-event-processor.d.ts +13 -0
  132. package/dist/client/sse-event-processor.d.ts.map +1 -1
  133. package/dist/client/sse-event-processor.js +21 -0
  134. package/dist/client/sse-event-processor.js.map +1 -1
  135. package/dist/coding-tools/run-code.d.ts.map +1 -1
  136. package/dist/coding-tools/run-code.js +18 -2
  137. package/dist/coding-tools/run-code.js.map +1 -1
  138. package/dist/db/client.d.ts +4 -2
  139. package/dist/db/client.d.ts.map +1 -1
  140. package/dist/db/client.js +6 -4
  141. package/dist/db/client.js.map +1 -1
  142. package/dist/deploy/route-discovery.d.ts.map +1 -1
  143. package/dist/deploy/route-discovery.js +1 -0
  144. package/dist/deploy/route-discovery.js.map +1 -1
  145. package/dist/eval/agent-runner.d.ts +63 -0
  146. package/dist/eval/agent-runner.d.ts.map +1 -0
  147. package/dist/eval/agent-runner.js +142 -0
  148. package/dist/eval/agent-runner.js.map +1 -0
  149. package/dist/eval/define-eval.d.ts +29 -0
  150. package/dist/eval/define-eval.d.ts.map +1 -0
  151. package/dist/eval/define-eval.js +43 -0
  152. package/dist/eval/define-eval.js.map +1 -0
  153. package/dist/eval/index.d.ts +18 -0
  154. package/dist/eval/index.d.ts.map +1 -0
  155. package/dist/eval/index.js +17 -0
  156. package/dist/eval/index.js.map +1 -0
  157. package/dist/eval/report.d.ts +8 -0
  158. package/dist/eval/report.d.ts.map +1 -0
  159. package/dist/eval/report.js +44 -0
  160. package/dist/eval/report.js.map +1 -0
  161. package/dist/eval/runner.d.ts +67 -0
  162. package/dist/eval/runner.d.ts.map +1 -0
  163. package/dist/eval/runner.js +256 -0
  164. package/dist/eval/runner.js.map +1 -0
  165. package/dist/eval/scorer.d.ts +83 -0
  166. package/dist/eval/scorer.d.ts.map +1 -0
  167. package/dist/eval/scorer.js +195 -0
  168. package/dist/eval/scorer.js.map +1 -0
  169. package/dist/eval/types.d.ts +162 -0
  170. package/dist/eval/types.d.ts.map +1 -0
  171. package/dist/eval/types.js +20 -0
  172. package/dist/eval/types.js.map +1 -0
  173. package/dist/extensions/fetch-tool.d.ts.map +1 -1
  174. package/dist/extensions/fetch-tool.js +80 -15
  175. package/dist/extensions/fetch-tool.js.map +1 -1
  176. package/dist/extensions/web-content.d.ts +61 -0
  177. package/dist/extensions/web-content.d.ts.map +1 -0
  178. package/dist/extensions/web-content.js +468 -0
  179. package/dist/extensions/web-content.js.map +1 -0
  180. package/dist/extensions/web-search-tool.js +3 -3
  181. package/dist/extensions/web-search-tool.js.map +1 -1
  182. package/dist/mcp/build-server.d.ts.map +1 -1
  183. package/dist/mcp/build-server.js +4 -1
  184. package/dist/mcp/build-server.js.map +1 -1
  185. package/dist/observability/traces.d.ts.map +1 -1
  186. package/dist/observability/traces.js +100 -1
  187. package/dist/observability/traces.js.map +1 -1
  188. package/dist/observability/tracing.d.ts +73 -0
  189. package/dist/observability/tracing.d.ts.map +1 -0
  190. package/dist/observability/tracing.js +126 -0
  191. package/dist/observability/tracing.js.map +1 -0
  192. package/dist/onboarding/default-steps.d.ts.map +1 -1
  193. package/dist/onboarding/default-steps.js +4 -1
  194. package/dist/onboarding/default-steps.js.map +1 -1
  195. package/dist/provider-api/actions/query-staged-dataset.d.ts +1 -1
  196. package/dist/provider-api/corpus-jobs.d.ts +80 -0
  197. package/dist/provider-api/corpus-jobs.d.ts.map +1 -1
  198. package/dist/provider-api/corpus-jobs.js +219 -22
  199. package/dist/provider-api/corpus-jobs.js.map +1 -1
  200. package/dist/provider-api/index.d.ts +24 -32
  201. package/dist/provider-api/index.d.ts.map +1 -1
  202. package/dist/provider-api/index.js +28 -1
  203. package/dist/provider-api/index.js.map +1 -1
  204. package/dist/scripts/agent-engines/list-agent-engines.d.ts.map +1 -1
  205. package/dist/scripts/agent-engines/list-agent-engines.js +10 -3
  206. package/dist/scripts/agent-engines/list-agent-engines.js.map +1 -1
  207. package/dist/server/action-discovery.d.ts.map +1 -1
  208. package/dist/server/action-discovery.js +4 -0
  209. package/dist/server/action-discovery.js.map +1 -1
  210. package/dist/server/agent-chat-plugin.d.ts +9 -0
  211. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  212. package/dist/server/agent-chat-plugin.js +119 -111
  213. package/dist/server/agent-chat-plugin.js.map +1 -1
  214. package/dist/server/agent-teams.d.ts +62 -0
  215. package/dist/server/agent-teams.d.ts.map +1 -1
  216. package/dist/server/agent-teams.js +99 -2
  217. package/dist/server/agent-teams.js.map +1 -1
  218. package/dist/server/better-auth-instance.d.ts +7 -0
  219. package/dist/server/better-auth-instance.d.ts.map +1 -1
  220. package/dist/server/better-auth-instance.js +90 -0
  221. package/dist/server/better-auth-instance.js.map +1 -1
  222. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  223. package/dist/server/core-routes-plugin.js +7 -4
  224. package/dist/server/core-routes-plugin.js.map +1 -1
  225. package/dist/server/credential-provider.d.ts.map +1 -1
  226. package/dist/server/credential-provider.js +2 -0
  227. package/dist/server/credential-provider.js.map +1 -1
  228. package/dist/server/deep-link.d.ts +7 -0
  229. package/dist/server/deep-link.d.ts.map +1 -1
  230. package/dist/server/deep-link.js +13 -2
  231. package/dist/server/deep-link.js.map +1 -1
  232. package/dist/server/framework-request-handler.d.ts.map +1 -1
  233. package/dist/server/framework-request-handler.js +33 -1
  234. package/dist/server/framework-request-handler.js.map +1 -1
  235. package/dist/server/index.d.ts +2 -1
  236. package/dist/server/index.d.ts.map +1 -1
  237. package/dist/server/index.js +2 -1
  238. package/dist/server/index.js.map +1 -1
  239. package/dist/templates/default/.agents/skills/actions/SKILL.md +52 -1
  240. package/dist/templates/default/.agents/skills/security/SKILL.md +22 -0
  241. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +52 -1
  242. package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +16 -4
  243. package/dist/templates/workspace-core/.agents/skills/harness-agents/SKILL.md +20 -0
  244. package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +31 -0
  245. package/dist/templates/workspace-core/.agents/skills/security/SKILL.md +22 -0
  246. package/docs/content/actions.md +50 -0
  247. package/docs/content/agent-teams.md +32 -0
  248. package/docs/content/blueprint-installer.md +73 -0
  249. package/docs/content/durable-resume.md +49 -0
  250. package/docs/content/evals.md +141 -0
  251. package/docs/content/external-agents.md +2 -2
  252. package/docs/content/human-approval.md +101 -0
  253. package/docs/content/observability.md +21 -0
  254. package/docs/content/observational-memory.md +63 -0
  255. package/docs/content/plan-plugin.md +5 -0
  256. package/docs/content/pr-visual-recap.md +9 -5
  257. package/docs/content/processors.md +99 -0
  258. package/docs/content/sandbox-adapters.md +134 -0
  259. package/docs/content/template-plan.md +97 -21
  260. package/package.json +10 -1
  261. package/src/templates/default/.agents/skills/actions/SKILL.md +52 -1
  262. package/src/templates/default/.agents/skills/security/SKILL.md +22 -0
  263. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +52 -1
  264. package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +16 -4
  265. package/src/templates/workspace-core/.agents/skills/harness-agents/SKILL.md +20 -0
  266. package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +31 -0
  267. package/src/templates/workspace-core/.agents/skills/security/SKILL.md +22 -0
@@ -0,0 +1,63 @@
1
+ ---
2
+ title: "Observational Memory"
3
+ description: "Background three-tier compaction (recent raw → observations → reflections) that keeps long agent threads cheap and prompt-cache-stable without touching short conversations."
4
+ ---
5
+
6
+ # Observational Memory
7
+
8
+ A long-running agent thread accumulates a huge transcript: every message, every tool call, every result. Replaying that whole history into the model on each turn is expensive and eventually blows the context window. **Observational Memory (OM)** compacts the older part of a long thread into a dated, layered summary so the model still knows what happened — just at a fraction of the token cost — while the most recent turns stay verbatim.
9
+
10
+ OM is entirely automatic and owner-scoped. **Short threads are unaffected**: until a thread crosses the first compaction threshold, OM is a no-op and the context is byte-for-byte what it would be without it.
11
+
12
+ ## The three tiers {#tiers}
13
+
14
+ OM represents a long thread as three layers, from most-distilled to most-recent:
15
+
16
+ | Tier | What it is |
17
+ | ----------------------- | ------------------------------------------------------------------------------------------------- |
18
+ | **Reflections** | Highest-level, condensed from the observation log once it grows large. The long-arc summary. |
19
+ | **Observations** | Dense, dated entries that fold a stretch of raw messages into a compact record of what happened. |
20
+ | **Recent raw messages** | The last N turns, kept **verbatim** — never folded — so the agent always sees the latest context. |
21
+
22
+ On each turn, the read side assembles these into a single self-labeled `[Observational Memory]` block that replaces the raw older prefix, keeps the recent-raw window intact, and tells the model to treat the compacted record as authoritative (don't redo completed work, trust the recorded decisions, names, dates, and status).
23
+
24
+ ## How compaction runs {#compaction}
25
+
26
+ Two passes run as a **fire-and-forget, best-effort** step _after_ a clean turn, so they never add latency to the user-visible response and any failure is swallowed:
27
+
28
+ 1. **Observer** — once a thread's _unobserved_ messages exceed the observation token threshold, folds them into a single dense observation entry.
29
+ 2. **Reflector** — once the persisted observation log itself exceeds the reflection token threshold, condenses the observations into a higher-level reflection.
30
+
31
+ Both passes no-op below their thresholds, so calling the compactor after every turn is cheap. Because OM replaces the volatile raw prefix with stable compacted text, it also keeps the prompt **cache-stable** across turns of a long thread.
32
+
33
+ OM data lives in the app's own SQL database, scoped to the owner (and org when present) — the same scoping model as the rest of the framework. It is never shared across users.
34
+
35
+ ## Configuration {#config}
36
+
37
+ Defaults are conservative. An operator can dial compaction at deploy time with `AGENT_NATIVE_OM_*` environment variables (no redeploy of the app code needed); an invalid or missing value always falls back to the named default.
38
+
39
+ | Env var | Default | What it controls |
40
+ | --------------------------------------------- | ------- | -------------------------------------------------------------------------------------- |
41
+ | `AGENT_NATIVE_OM_OBSERVATION_TOKEN_THRESHOLD` | `30000` | Unobserved-message tokens that trigger the Observer to fold them into one observation. |
42
+ | `AGENT_NATIVE_OM_REFLECTION_TOKEN_THRESHOLD` | `40000` | Observation-log tokens that trigger the Reflector to condense into a reflection. |
43
+ | `AGENT_NATIVE_OM_RECENT_RAW_MESSAGE_COUNT` | `12` | How many of the most-recent messages stay verbatim (never folded into an observation). |
44
+
45
+ The Observer and Reflector output caps (4000 / 2000 tokens) keep a single compaction pass from itself blowing the budget; they are tunable in code via `resolveObservationalMemoryConfig({ ... })` but not env-exposed.
46
+
47
+ > [!TIP]
48
+ > Lower the thresholds to compact sooner (cheaper long threads, slightly more summarization); raise them to keep more raw history in context before compacting. Set `AGENT_NATIVE_OM_RECENT_RAW_MESSAGE_COUNT` higher if your workflows need a longer verbatim tail.
49
+
50
+ ## When it kicks in {#when}
51
+
52
+ OM only changes behavior for threads long enough to have produced at least one observation or reflection. Concretely:
53
+
54
+ - A brand-new or short thread: no OM entries yet → the context is the plain transcript, unchanged.
55
+ - A long thread that has crossed the observation threshold: the older prefix is replaced by the compacted `[Observational Memory]` block, the recent-raw tail stays verbatim, and token usage drops substantially.
56
+
57
+ The injection is best-effort and boundary-safe — if a safe trim point can't be found (e.g. a pending tool-use/result pair sits at the window edge), OM injects the memory block _additively_ without trimming rather than risk dropping a pending tool result.
58
+
59
+ ## Related
60
+
61
+ - [**Context X-Ray**](/docs/using-your-agent) — inspect what's actually in the live context window.
62
+ - [**Observability**](/docs/observability) — token and cost metrics per run, where OM's savings show up.
63
+ - [**Custom Agents & Teams**](/docs/agent-teams) — long sub-agent runs benefit from the same compaction.
@@ -40,6 +40,11 @@ the Plan MCP connector. They write `plans/<slug>/plan.mdx` plus optional
40
40
  npx @agent-native/core@latest plan local preview --dir plans/<slug> --kind plan --open
41
41
  ```
42
42
 
43
+ For folders in the current repo, the direct local route includes `?path=...` so
44
+ the local Plan app can keep browser edits saving to the repo folder. The Plan
45
+ app uses `apps.plan.roots[0].path` in `agent-native.json` as the default place
46
+ to save promoted local plans, falling back to `plans/`.
47
+
43
48
  This keeps plan content out of the Agent-Native Plan database. Hosted sharing,
44
49
  comments, screenshots, and plan history are unavailable until you explicitly
45
50
  publish later.
@@ -216,13 +216,17 @@ 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
225
- browser comments until you explicitly publish.
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. Repo-backed folders can
227
+ open as `/local-plans/pr-123-visual-recap?path=plans%2Fpr-123-visual-recap`.
228
+ This mode disables the hosted sticky PR comment, inline screenshot upload,
229
+ usage attachment, and browser comments until you explicitly publish.
226
230
 
227
231
  ## It's informational, not a gate
228
232
 
@@ -0,0 +1,99 @@
1
+ ---
2
+ title: "In-Loop Processors"
3
+ description: "Loop-internal observer/guardrail hooks that watch the model's streamed output and tool calls mid-run and can abort it — the seam for real-time guardrails and proof-of-done gates."
4
+ ---
5
+
6
+ # In-Loop Processors
7
+
8
+ A `Processor` is a loop-internal **observer/guardrail** for the agent run. It watches the model's streamed output and the tool calls it requests _as the run progresses_, keeps its own scratch state, and can **abort** the run before a "done" is claimed. This is the structural prerequisite for real-time guardrails (block disallowed output mid-stream) and a proof-of-done / coverage gate (inspect what the model is about to do and halt it).
9
+
10
+ > [!WARNING]
11
+ > A processor is **configuration**, not a tool, not an action, and not an authoring DSL. Processors only observe, mutate their own stream-scoped state, and `abort()`. They never define app behavior, replace actions, or appear to the model. App operations belong in [actions](/docs/actions).
12
+
13
+ ## The hooks {#hooks}
14
+
15
+ A processor implements any subset of three optional lifecycle hooks (the shape is borrowed from Mastra's output processors):
16
+
17
+ | Hook | Fires… | Use it to… |
18
+ | --------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------- |
19
+ | `processOutputStream` | per streamed chunk (text / thinking deltas) while the model generates | react to output before the full turn lands |
20
+ | `processOutputStep` | once per model response, around tool execution | inspect the tool calls the model is about to run; gate them |
21
+ | `processOutputResult` | once at run end, with the final assistant text | record a verdict / proof-of-done over the completed answer |
22
+
23
+ Each processor gets its own mutable, run-scoped `state` object that persists across every one of its hook invocations within a single run and is **isolated** from other processors' state.
24
+
25
+ ```ts
26
+ import type { Processor } from "@agent-native/core";
27
+
28
+ const noSecretsInOutput: Processor = {
29
+ name: "no-secrets",
30
+ processOutputStream({ part, abort }) {
31
+ if (part.type === "text" && /sk-live_/.test(part.text)) {
32
+ abort("Model attempted to emit a live secret token.", {
33
+ kind: "secret-leak",
34
+ });
35
+ }
36
+ },
37
+ };
38
+
39
+ const coverageGate: Processor = {
40
+ name: "proof-of-done",
41
+ processOutputStep({ toolCalls, state }) {
42
+ // Track what the model has actually done this run...
43
+ for (const call of toolCalls) {
44
+ (state.ran ??= new Set<string>()).add(call.name);
45
+ }
46
+ },
47
+ processOutputResult({ text, state }) {
48
+ // ...and record a verdict over the final answer.
49
+ const ran = state.ran as Set<string> | undefined;
50
+ state.verdict = ran?.has("run-tests") ? "verified" : "unverified";
51
+ },
52
+ };
53
+ ```
54
+
55
+ ## Aborting with `TripWire` {#tripwire}
56
+
57
+ A hook halts the run by calling `abort(reason, meta?)`, which throws a **`TripWire`**. The loop catches it, emits a single **`tripwire` event**, stops cleanly, and surfaces the reason as the final assistant message.
58
+
59
+ ```ts
60
+ import { TripWire } from "@agent-native/core";
61
+ ```
62
+
63
+ The `tripwire` event carries:
64
+
65
+ | Field | Type | Notes |
66
+ | ----------- | -------- | -------------------------------------------------------------- |
67
+ | `reason` | `string` | The human-readable reason passed to `abort`. |
68
+ | `processor` | `string` | Name of the processor that aborted, when it declared a `name`. |
69
+
70
+ `TripWire` also carries optional structured `meta` and the originating `processor` name for programmatic consumers that `instanceof`-check it. Because a halt is graceful, `processOutputResult` still fires on the (halted) final text so a proof-of-done processor can record its verdict even when the run was aborted.
71
+
72
+ ## Wiring processors {#wiring}
73
+
74
+ Processors are configured in code via the `processors` array on `runAgentLoop`:
75
+
76
+ ```ts
77
+ await runAgentLoop({
78
+ engine,
79
+ model,
80
+ systemPrompt,
81
+ tools,
82
+ messages,
83
+ actions,
84
+ send,
85
+ signal,
86
+ processors: [noSecretsInOutput, coverageGate],
87
+ });
88
+ ```
89
+
90
+ **Zero-overhead when unused.** The loop builds the processor chain only when at least one processor is supplied; when `processors` is omitted or empty, none of the seam code runs and the loop is byte-for-byte unchanged. Hooks run in registration order and may be sync or async.
91
+
92
+ > [!NOTE]
93
+ > The loop-level seam is the deliverable today and is callable directly by sub-agents, A2A, MCP, and tests. Threading `processors` through the HTTP chat handler (so a per-request resolver can configure them without calling `runAgentLoop` directly) is convenience plumbing that is not yet wired — configure processors at the `runAgentLoop` call site for now.
94
+
95
+ ## Related
96
+
97
+ - [**Durable Resume**](/docs/durable-resume) — how the loop survives interruptions without re-running completed side effects.
98
+ - [**Custom Agents & Teams**](/docs/agent-teams) — sub-agents run the same loop and can carry their own processors.
99
+ - [**Observability**](/docs/observability) — record processor verdicts alongside run traces.
@@ -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
@@ -97,6 +97,22 @@ connector, so use the Agent-Native CLI path when you want the one-command setup.
97
97
  > Plan skills _and_ the connector in one install and auto-updates as the skills
98
98
  > improve — see [Plan plugin & marketplace](/docs/plan-plugin).
99
99
 
100
+ ### Open Plans inside VS Code {#vscode-extension}
101
+
102
+ If you live in VS Code, the Agent Native VS Code extension can open the same
103
+ Plan review surface in a side panel instead of sending you to a separate browser
104
+ tab. Plans tools still return the normal web link, and the MCP metadata also
105
+ includes a VS Code handoff URL:
106
+
107
+ ```text
108
+ vscode://builderio.agent-native/open?url=<encoded-plan-url>
109
+ ```
110
+
111
+ The extension handles that URI, opens the decoded Plan URL in a VS Code webview,
112
+ and includes a command to run the existing Agent Native MCP connect flow for VS
113
+ Code / GitHub Copilot. This is especially useful from Claude Code or another
114
+ coding-agent workflow where the plan should stay next to the files being edited.
115
+
100
116
  ## Use it from your coding agent
101
117
 
102
118
  After installation, ask your agent for the command that fits the work:
@@ -110,9 +126,9 @@ After installation, ask your agent for the command that fits the work:
110
126
  before/after blocks instead of a wall of raw diff.
111
127
 
112
128
  The agent should inspect the codebase first, then create the visual plan when a
113
- wrong direction would be costly. The returned Plans link opens the review UI so
114
- you can annotate, correct, choose options, and ask for updates before code
115
- changes begin.
129
+ wrong direction would be costly. The returned Plans link opens the review UI in
130
+ the browser or VS Code, so you can annotate, correct, choose options, and ask for
131
+ updates before code changes begin.
116
132
 
117
133
  When a Codex, Claude Code, Markdown, or pasted plan already exists, use
118
134
  `/visual-plan`; the agent preserves that source plan and builds the richer review
@@ -180,34 +196,72 @@ or set the convention for your agent environment:
180
196
  export AGENT_NATIVE_PLANS_MODE=local-files
181
197
  ```
182
198
 
183
- In this mode the agent writes a local MDX folder under `plans/<slug>/` and must
184
- not call the hosted Plan MCP tools. The durable files are:
199
+ In this mode the agent writes a local MDX folder and must not call the hosted
200
+ Plan MCP tools. Use a repo folder such as `plans/<slug>/` when you want the plan
201
+ checked in with the code. Use a temp or ignored folder, such as
202
+ `/tmp/agent-native-plans/<slug>/` or `.agent-native/plans/<slug>/`, when the
203
+ plan should stay out of git. The folder contains:
185
204
 
186
205
  - `plan.mdx`
187
206
  - optional `canvas.mdx`
188
207
  - optional `prototype.mdx`
189
208
  - optional `.plan-state.json`
190
209
 
191
- After writing the folder, the agent validates and previews it locally:
210
+ After writing the folder, the agent starts a tiny localhost bridge and opens the
211
+ hosted Plan UI against that local-only source:
192
212
 
193
213
  ```bash
194
- npx @agent-native/core@latest plan local preview --dir plans/<slug> --kind plan --open
214
+ npx @agent-native/core@latest plan local serve --dir plans/<slug> --kind plan --open
195
215
  ```
196
216
 
197
- If you run the Plan app locally with the same `PLAN_LOCAL_DIR`, you can open the
198
- read-only app route:
217
+ The bridge URL looks like
218
+ `https://plan.agent-native.com/local-plans/<slug>?bridge=http://127.0.0.1:...`.
219
+ The page is the normal Plan viewer, but the browser fetches `plan.mdx`,
220
+ `canvas.mdx`, `prototype.mdx`, `.plan-state.json`, and local image assets from
221
+ the localhost bridge. Plan content is not written to the hosted database and is
222
+ not sent through hosted Plan actions. Keep the bridge process running while you
223
+ review; the URL is local to your machine and is not a shareable team link.
224
+
225
+ If you run the Plan app locally with the same `PLAN_LOCAL_DIR`, you can also
226
+ open the editable app route:
199
227
 
200
228
  ```text
201
229
  http://localhost:<port>/local-plans/<slug>
202
230
  ```
203
231
 
232
+ For repo-backed folders, the direct local route can carry the repo-relative
233
+ folder path so browser edits keep writing to that folder:
234
+
235
+ ```text
236
+ http://localhost:<port>/local-plans/<slug>?path=plans%2F<slug>
237
+ ```
238
+
239
+ The Plan app uses `apps.plan.roots[0].path` in `agent-native.json` as the
240
+ default repo location for promoted local plans, falling back to `plans/`:
241
+
242
+ ```json
243
+ {
244
+ "version": 1,
245
+ "apps": {
246
+ "plan": {
247
+ "mode": "local-files",
248
+ "roots": [{ "name": "Plans", "path": "plans", "kind": "plans" }]
249
+ }
250
+ }
251
+ }
252
+ ```
253
+
254
+ Direct local Plan routes include a menu action to save a temporary local folder
255
+ into that repo location. After promotion, the page reopens with `?path=...` and
256
+ continues autosaving MDX edits to the repo folder.
257
+
204
258
  Local-files mode prevents plan or recap content from going to the Agent-Native
205
259
  Plan database. It also disables hosted sharing, browser comments, plan history,
206
260
  and publish/export receipts until you explicitly opt into publishing. To move a
207
261
  local plan into the hosted database, call `publish-visual-plan` with the local
208
262
  MDX folder path; this uploads the plan, assigns it a hosted ID, enables sharing
209
- and commenting, and returns the hosted URL. It does
210
- not automatically make your coding agent's LLM local; choose a local or approved
263
+ and commenting, and returns the hosted URL. Local-files mode does not
264
+ automatically make your coding agent's LLM local; choose a local or approved
211
265
  model if that privacy boundary matters too.
212
266
 
213
267
  ## Desktop local file sync {#desktop-local-sync}
@@ -232,6 +286,27 @@ This path does not require cloning the Plan app or running a CLI. It is for
232
286
  file-first review/editing around a hosted plan, not for keeping plan content out
233
287
  of the hosted database.
234
288
 
289
+ ## Deleting hosted plan data {#delete-data}
290
+
291
+ Signed-in owners can delete their hosted plans and recaps from the Plans list or
292
+ the plan action menu.
293
+
294
+ - **Soft delete** moves the plan to the **Deleted** tab, makes normal plan
295
+ views/direct links stop working, and removes public access by making the row
296
+ private. The SQL rows are retained so the owner can restore the plan later.
297
+ - **Restore** is available from the **Deleted** tab for soft-deleted plans.
298
+ - **Permanent delete** removes the hosted plan row and plan-scoped comments,
299
+ sections, activity events, version snapshots, share grants, abuse reports, and
300
+ SQL asset records. The UI requires typing `DELETE <plan-id>` before the final
301
+ button enables.
302
+
303
+ Permanent delete removes the Plan app's database records and SQL-backed asset
304
+ bytes/references. If a deployment uses an external upload provider, provider
305
+ object retention follows that provider's lifecycle because the shared upload
306
+ abstraction does not currently expose object deletion. Local-files privacy mode
307
+ keeps the source in your local MDX folder instead; deleting hosted data does not
308
+ touch local files.
309
+
235
310
  ## Useful prompts
236
311
 
237
312
  - "Use `/visual-plan` before changing the auth flow."
@@ -275,16 +350,16 @@ The local template is useful when you are developing Plans itself, testing local
275
350
 
276
351
  Schema lives in `templates/plan/server/db/schema.ts`. Core tables:
277
352
 
278
- | Table | What it holds |
279
- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
280
- | `plans` | Each plan or recap — `title`, `brief`, `kind` (plan/recap), `status`, `source`, `html`/`markdown`/`content`, `hosted_plan_id/url`, usage stats, `source_url` |
281
- | `plan_sections` | Ordered sections within a plan — `type`, `title`, `body`, `html`, `sort_order`, `created_by` |
282
- | `plan_comments` | Threaded comments — `kind`, `status`, `anchor`, `message`, `resolution_target`, `mentions_json`, `resolved_by` |
283
- | `plan_events` | Audit log of agent/human events on a plan |
284
- | `plan_versions` | Point-in-time snapshots for version history |
285
- | `plan_shares` | Per-principal share grants (viewer / editor / admin) |
286
- | `plan_guest_mints` | Rate-limit records for guest session issuance |
287
- | `plan_assets` | Inline image assets stored as base64 (fallback when no upload provider) |
353
+ | Table | What it holds |
354
+ | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
355
+ | `plans` | Each plan or recap — `title`, `brief`, `kind` (plan/recap), `status`, `source`, `html`/`markdown`/`content`, `hosted_plan_id/url`, usage stats, `source_url`, `deleted_at`/`deleted_by` |
356
+ | `plan_sections` | Ordered sections within a plan — `type`, `title`, `body`, `html`, `sort_order`, `created_by` |
357
+ | `plan_comments` | Threaded comments — `kind`, `status`, `anchor`, `message`, `resolution_target`, `mentions_json`, `resolved_by` |
358
+ | `plan_events` | Audit log of agent/human events on a plan |
359
+ | `plan_versions` | Point-in-time snapshots for version history |
360
+ | `plan_shares` | Per-principal share grants (viewer / editor / admin) |
361
+ | `plan_guest_mints` | Rate-limit records for guest session issuance |
362
+ | `plan_assets` | Inline image assets stored as base64 (fallback when no upload provider) |
288
363
 
289
364
  ### Key actions
290
365
 
@@ -292,6 +367,7 @@ Actions in `templates/plan/actions/`:
292
367
 
293
368
  - **Creation** — `create-visual-plan`, `create-visual-recap`, `create-ui-plan`, `create-prototype-plan`, `create-plan-design`, `create-visual-questions`
294
369
  - **Reading & editing** — `get-visual-plan`, `update-visual-plan`, `list-visual-plans`, `import-visual-plan-source`, `patch-visual-plan-source`, `read-visual-plan-source`, `export-visual-plan`
370
+ - **Lifecycle** — `delete-visual-plan` for owner-only soft delete, restore, and typed-confirmation permanent delete
295
371
  - **Publishing & sharing** — `publish-visual-plan`
296
372
  - **Versions** — `list-plan-versions`, `get-plan-version`, `restore-plan-version`
297
373
  - **Comments & feedback** — `get-plan-feedback`, `reply-to-plan-comment`, `resolve-plan-comment`, `consume-plan-feedback`, `delete-plan-comment`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.52.0",
3
+ "version": "0.54.0",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -74,6 +74,7 @@
74
74
  "./agent/context-xray/actions/context-evict": "./dist/agent/context-xray/actions/context-evict.js",
75
75
  "./agent/context-xray/actions/context-restore": "./dist/agent/context-xray/actions/context-restore.js",
76
76
  "./agent/context-xray/actions/context-report": "./dist/agent/context-xray/actions/context-report.js",
77
+ "./agent/observational-memory": "./dist/agent/observational-memory/index.js",
77
78
  "./resources": "./dist/resources/index.js",
78
79
  "./resources/store": "./dist/resources/store.js",
79
80
  "./resources/metadata": "./dist/resources/metadata.js",
@@ -135,6 +136,7 @@
135
136
  "./styles/agent-native.css": "./dist/styles/agent-native.css",
136
137
  "./agent/engine": "./dist/agent/engine/index.js",
137
138
  "./agent/harness": "./dist/agent/harness/index.js",
139
+ "./eval": "./dist/eval/index.js",
138
140
  "./tsconfig.base.json": "./tsconfig.base.json"
139
141
  },
140
142
  "sideEffects": [
@@ -142,6 +144,7 @@
142
144
  ],
143
145
  "files": [
144
146
  "bin",
147
+ "blueprints",
145
148
  "dist",
146
149
  "docs",
147
150
  "tsconfig.base.json",
@@ -162,6 +165,7 @@
162
165
  "@libsql/client": "^0.15.0",
163
166
  "@modelcontextprotocol/ext-apps": "1.7.2",
164
167
  "@modelcontextprotocol/sdk": "^1.29.0",
168
+ "@mozilla/readability": "0.6.0",
165
169
  "@neondatabase/serverless": "^1.1.0",
166
170
  "@radix-ui/react-dialog": "1.1.15",
167
171
  "@radix-ui/react-dropdown-menu": "^2.1.16",
@@ -209,6 +213,7 @@
209
213
  "jiti": "^2.6.1",
210
214
  "jose": "^6.2.2",
211
215
  "kiwi-schema": "^0.5.0",
216
+ "linkedom": "0.18.12",
212
217
  "lowlight": "^3.3.0",
213
218
  "minimatch": "^10.0.0",
214
219
  "nanoid": "^5.1.9",
@@ -221,10 +226,12 @@
221
226
  "recharts": "^3.8.1",
222
227
  "remark-gfm": "^4.0.1",
223
228
  "roughjs": "4.6.6",
229
+ "safe-regex2": "5.1.1",
224
230
  "shiki": "^4.0.2",
225
231
  "sonner": "^2.0.7",
226
232
  "tailwind-merge": "^3.5.0",
227
233
  "tiptap-markdown": "^0.9.0",
234
+ "turndown": "7.2.4",
228
235
  "tw-animate-css": "1.4.0",
229
236
  "y-protocols": "^1.0.7",
230
237
  "yjs": "^13.6.31",
@@ -264,6 +271,7 @@
264
271
  "ws": ">=8"
265
272
  },
266
273
  "optionalDependencies": {
274
+ "@opentelemetry/api": "^1.9.1",
267
275
  "playwright": "^1.60.0"
268
276
  },
269
277
  "peerDependenciesMeta": {
@@ -376,6 +384,7 @@
376
384
  "@types/pako": "^2.0.4",
377
385
  "@types/react": "^19.2.14",
378
386
  "@types/react-dom": "^19.2.3",
387
+ "@types/turndown": "5.0.6",
379
388
  "@types/ws": "^8.18.1",
380
389
  "@vitejs/plugin-react-swc": "^4.0.0",
381
390
  "@vitest/coverage-v8": "4.1.5",