typeclaw 0.49.0 → 0.51.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 (502) hide show
  1. package/dist/types/agent/attention-escalation.d.ts +18 -0
  2. package/dist/types/agent/auth.d.ts +7 -0
  3. package/dist/types/agent/bash-sandbox-env.d.ts +15 -0
  4. package/dist/types/agent/bash-sandbox-proc.d.ts +8 -0
  5. package/dist/types/agent/bash-sandbox.d.ts +94 -0
  6. package/dist/types/agent/compaction.d.ts +8 -0
  7. package/dist/types/agent/git-nudge.d.ts +6 -0
  8. package/dist/types/agent/guard-types.d.ts +25 -0
  9. package/dist/types/agent/guards.d.ts +7 -0
  10. package/dist/types/agent/idle-compaction.d.ts +8 -0
  11. package/dist/types/agent/index.d.ts +151 -0
  12. package/dist/types/agent/live-subagents.d.ts +113 -0
  13. package/dist/types/agent/llm-replay-sanitizer.d.ts +11 -0
  14. package/dist/types/agent/loop-guard.d.ts +67 -0
  15. package/dist/types/agent/model-fallback.d.ts +29 -0
  16. package/dist/types/agent/model-overrides.d.ts +8 -0
  17. package/dist/types/agent/multimodal/index.d.ts +2 -0
  18. package/dist/types/agent/multimodal/look-at.d.ts +60 -0
  19. package/dist/types/agent/multimodal/looker.d.ts +61 -0
  20. package/dist/types/agent/multimodal/read-redirect.d.ts +6 -0
  21. package/dist/types/agent/network/response-body.d.ts +1 -0
  22. package/dist/types/agent/network/safe-http.d.ts +46 -0
  23. package/dist/types/agent/output-allowance.d.ts +4 -0
  24. package/dist/types/agent/plugin-tools.d.ts +58 -0
  25. package/dist/types/agent/proactive-next-step-nudge.d.ts +2 -0
  26. package/dist/types/agent/prompt-cache-key.d.ts +3 -0
  27. package/dist/types/agent/provider-error.d.ts +23 -0
  28. package/dist/types/agent/reload-tool.d.ts +10 -0
  29. package/dist/types/agent/restart/index.d.ts +31 -0
  30. package/dist/types/agent/restart-handoff/index.d.ts +32 -0
  31. package/dist/types/agent/restart-handoff/paths.d.ts +1 -0
  32. package/dist/types/agent/retry-same-ref.d.ts +41 -0
  33. package/dist/types/agent/reviewer-activity.d.ts +3 -0
  34. package/dist/types/agent/reviewer-bash-policy.d.ts +8 -0
  35. package/dist/types/agent/self.d.ts +1 -0
  36. package/dist/types/agent/session-meta.d.ts +28 -0
  37. package/dist/types/agent/session-origin.d.ts +65 -0
  38. package/dist/types/agent/subagent-cache-keepalive.d.ts +38 -0
  39. package/dist/types/agent/subagent-completion-reminder.d.ts +29 -0
  40. package/dist/types/agent/subagent-drain.d.ts +25 -0
  41. package/dist/types/agent/subagent-session.d.ts +3 -0
  42. package/dist/types/agent/subagents.d.ts +153 -0
  43. package/dist/types/agent/system-prompt-composition.d.ts +17 -0
  44. package/dist/types/agent/system-prompt.d.ts +7 -0
  45. package/dist/types/agent/throttle-circuit.d.ts +25 -0
  46. package/dist/types/agent/todo/continuation-policy.d.ts +54 -0
  47. package/dist/types/agent/todo/continuation-state.d.ts +11 -0
  48. package/dist/types/agent/todo/continuation-wiring.d.ts +32 -0
  49. package/dist/types/agent/todo/continuation.d.ts +21 -0
  50. package/dist/types/agent/todo/scope.d.ts +6 -0
  51. package/dist/types/agent/todo/store.d.ts +16 -0
  52. package/dist/types/agent/tool-error-remediation.d.ts +1 -0
  53. package/dist/types/agent/tool-file-safety.d.ts +78 -0
  54. package/dist/types/agent/tool-not-found-nudge.d.ts +9 -0
  55. package/dist/types/agent/tool-result-budget.d.ts +15 -0
  56. package/dist/types/agent/tools/channel-disengage.d.ts +18 -0
  57. package/dist/types/agent/tools/channel-edit.d.ts +19 -0
  58. package/dist/types/agent/tools/channel-fetch-attachment.d.ts +36 -0
  59. package/dist/types/agent/tools/channel-handoff.d.ts +13 -0
  60. package/dist/types/agent/tools/channel-history-render.d.ts +3 -0
  61. package/dist/types/agent/tools/channel-history.d.ts +25 -0
  62. package/dist/types/agent/tools/channel-log.d.ts +5 -0
  63. package/dist/types/agent/tools/channel-react.d.ts +23 -0
  64. package/dist/types/agent/tools/channel-read.d.ts +27 -0
  65. package/dist/types/agent/tools/channel-reply.d.ts +47 -0
  66. package/dist/types/agent/tools/channel-send.d.ts +42 -0
  67. package/dist/types/agent/tools/channel-session-search.d.ts +10 -0
  68. package/dist/types/agent/tools/curl-impersonate.d.ts +37 -0
  69. package/dist/types/agent/tools/ddg.d.ts +27 -0
  70. package/dist/types/agent/tools/grant-role.d.ts +25 -0
  71. package/dist/types/agent/tools/keyed-semaphore.d.ts +10 -0
  72. package/dist/types/agent/tools/post-github-review.d.ts +38 -0
  73. package/dist/types/agent/tools/restart.d.ts +25 -0
  74. package/dist/types/agent/tools/runtime-notice.d.ts +3 -0
  75. package/dist/types/agent/tools/search-retry.d.ts +16 -0
  76. package/dist/types/agent/tools/skip-response.d.ts +17 -0
  77. package/dist/types/agent/tools/spawn-subagent.d.ts +77 -0
  78. package/dist/types/agent/tools/stream-snapshot.d.ts +23 -0
  79. package/dist/types/agent/tools/subagent-access.d.ts +20 -0
  80. package/dist/types/agent/tools/subagent-cancel.d.ts +23 -0
  81. package/dist/types/agent/tools/subagent-output.d.ts +50 -0
  82. package/dist/types/agent/tools/todo/index.d.ts +14 -0
  83. package/dist/types/agent/tools/webfetch/adaptive-html.d.ts +29 -0
  84. package/dist/types/agent/tools/webfetch/fetch.d.ts +26 -0
  85. package/dist/types/agent/tools/webfetch/html-lexical.d.ts +27 -0
  86. package/dist/types/agent/tools/webfetch/index.d.ts +1 -0
  87. package/dist/types/agent/tools/webfetch/inline-style-visibility.d.ts +3 -0
  88. package/dist/types/agent/tools/webfetch/strategies/grep.d.ts +11 -0
  89. package/dist/types/agent/tools/webfetch/strategies/jq.d.ts +4 -0
  90. package/dist/types/agent/tools/webfetch/strategies/raw.d.ts +1 -0
  91. package/dist/types/agent/tools/webfetch/strategies/readability.d.ts +16 -0
  92. package/dist/types/agent/tools/webfetch/strategies/selector.d.ts +4 -0
  93. package/dist/types/agent/tools/webfetch/strategies/snapshot.d.ts +1 -0
  94. package/dist/types/agent/tools/webfetch/tool.d.ts +15 -0
  95. package/dist/types/agent/tools/webfetch/types.d.ts +32 -0
  96. package/dist/types/agent/tools/websearch.d.ts +17 -0
  97. package/dist/types/agent/tools/wikipedia.d.ts +7 -0
  98. package/dist/types/agent/tools-without-local-file-operands.d.ts +1 -0
  99. package/dist/types/agent/turn-runner.d.ts +36 -0
  100. package/dist/types/agent-messenger/config-dir.d.ts +19 -0
  101. package/dist/types/browser/dockerfile.d.ts +2 -0
  102. package/dist/types/browser/registry.d.ts +49 -0
  103. package/dist/types/bundled-plugins/bun-hygiene/policy.d.ts +18 -0
  104. package/dist/types/bundled-plugins/github-cli-auth/git-askpass.d.ts +5 -0
  105. package/dist/types/bundled-plugins/guard/keys.d.ts +6 -0
  106. package/dist/types/bundled-plugins/guard/policies/managed-config.d.ts +7 -0
  107. package/dist/types/bundled-plugins/guard/policies/memory-topics-delete.d.ts +11 -0
  108. package/dist/types/bundled-plugins/guard/policies/memory-topics-write.d.ts +7 -0
  109. package/dist/types/bundled-plugins/guard/policies/non-workspace-write.d.ts +9 -0
  110. package/dist/types/bundled-plugins/guard/policies/skill-authoring.d.ts +20 -0
  111. package/dist/types/bundled-plugins/guard/policies/uncommitted-changes.d.ts +12 -0
  112. package/dist/types/bundled-plugins/guard/policy.d.ts +11 -0
  113. package/dist/types/bundled-plugins/memory/secret-detector.d.ts +11 -0
  114. package/dist/types/bundled-plugins/memory/slug.d.ts +4 -0
  115. package/dist/types/bundled-plugins/security/permissions.d.ts +20 -0
  116. package/dist/types/bundled-plugins/security/policies/private-surface-read.d.ts +34 -0
  117. package/dist/types/bundled-plugins/security/policies/ssrf.d.ts +18 -0
  118. package/dist/types/bundled-plugins/security/policy.d.ts +4 -0
  119. package/dist/types/channels/adapter-namespace.d.ts +2 -0
  120. package/dist/types/channels/adapters/mention-hints.d.ts +12 -0
  121. package/dist/types/channels/adapters/webex-id-ref.d.ts +5 -0
  122. package/dist/types/channels/background-handoff.d.ts +56 -0
  123. package/dist/types/channels/background-obligations.d.ts +135 -0
  124. package/dist/types/channels/catch-up.d.ts +26 -0
  125. package/dist/types/channels/commands.d.ts +2 -0
  126. package/dist/types/channels/completion-claim.d.ts +20 -0
  127. package/dist/types/channels/continuation-willingness.d.ts +1 -0
  128. package/dist/types/channels/continuity-types.d.ts +75 -0
  129. package/dist/types/channels/describe-error.d.ts +1 -0
  130. package/dist/types/channels/engagement.d.ts +34 -0
  131. package/dist/types/channels/github-false-receipt.d.ts +20 -0
  132. package/dist/types/channels/github-repo.d.ts +2 -0
  133. package/dist/types/channels/github-rereview-guard.d.ts +24 -0
  134. package/dist/types/channels/github-review-check.d.ts +135 -0
  135. package/dist/types/channels/github-review-claim.d.ts +3 -0
  136. package/dist/types/channels/github-review-turn-ledger.d.ts +71 -0
  137. package/dist/types/channels/github-review-verdict-coordinator.d.ts +117 -0
  138. package/dist/types/channels/github-token-bridge.d.ts +20 -0
  139. package/dist/types/channels/github-verdict-activity.d.ts +12 -0
  140. package/dist/types/channels/inbound-journal.d.ts +272 -0
  141. package/dist/types/channels/last-alive.d.ts +3 -0
  142. package/dist/types/channels/membership-cache.d.ts +27 -0
  143. package/dist/types/channels/membership.d.ts +21 -0
  144. package/dist/types/channels/outbound-flood-filter.d.ts +7 -0
  145. package/dist/types/channels/participants.d.ts +4 -0
  146. package/dist/types/channels/persistence.d.ts +32 -0
  147. package/dist/types/channels/recovery-notice.d.ts +26 -0
  148. package/dist/types/channels/recovery-outbox.d.ts +58 -0
  149. package/dist/types/channels/router.d.ts +760 -0
  150. package/dist/types/channels/schema.d.ts +501 -0
  151. package/dist/types/channels/session-handoff.d.ts +58 -0
  152. package/dist/types/channels/session-search.d.ts +29 -0
  153. package/dist/types/channels/types.d.ts +414 -0
  154. package/dist/types/channels/waiting-reactions.d.ts +25 -0
  155. package/dist/types/cli/builtins.d.ts +2 -0
  156. package/dist/types/cli/command-meta.d.ts +9 -0
  157. package/dist/types/coding-agent/broker-body.d.ts +7 -0
  158. package/dist/types/coding-agent/broker.d.ts +22 -0
  159. package/dist/types/coding-agent/claude.d.ts +22 -0
  160. package/dist/types/coding-agent/codex.d.ts +19 -0
  161. package/dist/types/coding-agent/index.d.ts +71 -0
  162. package/dist/types/coding-agent/omo-state.d.ts +2 -0
  163. package/dist/types/coding-agent/omo-stream.d.ts +22 -0
  164. package/dist/types/coding-agent/omo.d.ts +133 -0
  165. package/dist/types/coding-agent/runner.d.ts +35 -0
  166. package/dist/types/coding-agent/tool.d.ts +27 -0
  167. package/dist/types/coding-agent/worktree.d.ts +22 -0
  168. package/dist/types/commands/index.d.ts +45 -0
  169. package/dist/types/config/config.d.ts +827 -0
  170. package/dist/types/config/index.d.ts +3 -0
  171. package/dist/types/config/model-overrides.d.ts +3 -0
  172. package/dist/types/config/providers.d.ts +1458 -0
  173. package/dist/types/config/reloadable.d.ts +9 -0
  174. package/dist/types/container/agent-operation-lock.d.ts +31 -0
  175. package/dist/types/container/build-cache.d.ts +39 -0
  176. package/dist/types/container/compose-project.d.ts +1 -0
  177. package/dist/types/container/controller.d.ts +25 -0
  178. package/dist/types/container/docker-app.d.ts +23 -0
  179. package/dist/types/container/exit-reason.d.ts +10 -0
  180. package/dist/types/container/index.d.ts +14 -0
  181. package/dist/types/container/log-archive.d.ts +68 -0
  182. package/dist/types/container/log-colors.d.ts +3 -0
  183. package/dist/types/container/log-timestamps.d.ts +9 -0
  184. package/dist/types/container/logs.d.ts +37 -0
  185. package/dist/types/container/memory-limit.d.ts +13 -0
  186. package/dist/types/container/memory-oversubscription.d.ts +20 -0
  187. package/dist/types/container/oom-events.d.ts +18 -0
  188. package/dist/types/container/port.d.ts +18 -0
  189. package/dist/types/container/require-running.d.ts +16 -0
  190. package/dist/types/container/restart.d.ts +32 -0
  191. package/dist/types/container/shared.d.ts +93 -0
  192. package/dist/types/container/shell.d.ts +35 -0
  193. package/dist/types/container/start.d.ts +145 -0
  194. package/dist/types/container/stats.d.ts +31 -0
  195. package/dist/types/container/status.d.ts +25 -0
  196. package/dist/types/container/stop.d.ts +24 -0
  197. package/dist/types/container/tool-oom-priority.d.ts +4 -0
  198. package/dist/types/container/verify-running.d.ts +49 -0
  199. package/dist/types/cron/consumer.d.ts +42 -0
  200. package/dist/types/cron/count-state.d.ts +24 -0
  201. package/dist/types/cron/index.d.ts +21 -0
  202. package/dist/types/cron/list.d.ts +33 -0
  203. package/dist/types/cron/reloadable.d.ts +11 -0
  204. package/dist/types/cron/scheduler.d.ts +51 -0
  205. package/dist/types/cron/schema.d.ts +108 -0
  206. package/dist/types/dependencies/bin-resolver.d.ts +28 -0
  207. package/dist/types/dependencies/bins.d.ts +22 -0
  208. package/dist/types/dependencies/index.d.ts +2 -0
  209. package/dist/types/eval/cell.d.ts +26 -0
  210. package/dist/types/eval/config.d.ts +19 -0
  211. package/dist/types/eval/dispatch.d.ts +7 -0
  212. package/dist/types/eval/kernel.d.ts +28 -0
  213. package/dist/types/eval/process.d.ts +23 -0
  214. package/dist/types/eval/protocol.d.ts +34 -0
  215. package/dist/types/eval/sandbox.d.ts +10 -0
  216. package/dist/types/eval/tool.d.ts +17 -0
  217. package/dist/types/eval/wire.d.ts +33 -0
  218. package/dist/types/git/bound-gc-config.d.ts +4 -0
  219. package/dist/types/git/hookless.d.ts +1 -0
  220. package/dist/types/git/reconcile-ignored.d.ts +13 -0
  221. package/dist/types/git/resolve-agent-git.d.ts +8 -0
  222. package/dist/types/git/resolve-identity.d.ts +10 -0
  223. package/dist/types/git/run.d.ts +24 -0
  224. package/dist/types/git/system-commit.d.ts +2 -0
  225. package/dist/types/hostd/client.d.ts +13 -0
  226. package/dist/types/hostd/models.d.ts +1 -0
  227. package/dist/types/hostd/paths.d.ts +17 -0
  228. package/dist/types/hostd/protocol.d.ts +93 -0
  229. package/dist/types/hostd/spawn.d.ts +17 -0
  230. package/dist/types/hostd/version.d.ts +18 -0
  231. package/dist/types/init/auto-upgrade.d.ts +41 -0
  232. package/dist/types/init/cli-version.d.ts +7 -0
  233. package/dist/types/init/dockerfile.d.ts +34 -0
  234. package/dist/types/init/ensure-deps.d.ts +17 -0
  235. package/dist/types/init/env-file.d.ts +3 -0
  236. package/dist/types/init/gitignore.d.ts +5 -0
  237. package/dist/types/init/local-source-stamp.d.ts +3 -0
  238. package/dist/types/init/packagejson.d.ts +7 -0
  239. package/dist/types/init/paths.d.ts +3 -0
  240. package/dist/types/init/reconcile-plugin-deps.d.ts +13 -0
  241. package/dist/types/init/run-bun-install.d.ts +16 -0
  242. package/dist/types/init/windows-dev-link.d.ts +8 -0
  243. package/dist/types/mcp/catalog.d.ts +7 -0
  244. package/dist/types/mcp/client.d.ts +58 -0
  245. package/dist/types/mcp/manager.d.ts +56 -0
  246. package/dist/types/mcp/tools.d.ts +23 -0
  247. package/dist/types/models/embedding-model.d.ts +20 -0
  248. package/dist/types/models/transformers-version.d.ts +1 -0
  249. package/dist/types/network/internal-destinations.d.ts +29 -0
  250. package/dist/types/operations/classify-tool-outcome.d.ts +35 -0
  251. package/dist/types/operations/incidents.d.ts +47 -0
  252. package/dist/types/operations/index.d.ts +3 -0
  253. package/dist/types/operations/remediations.d.ts +25 -0
  254. package/dist/types/path-safety/real-intended-path.d.ts +9 -0
  255. package/dist/types/permissions/builtins.d.ts +25 -0
  256. package/dist/types/permissions/grant.d.ts +19 -0
  257. package/dist/types/permissions/index.d.ts +6 -0
  258. package/dist/types/permissions/match-rule.d.ts +28 -0
  259. package/dist/types/permissions/permissions.d.ts +42 -0
  260. package/dist/types/permissions/resolve.d.ts +25 -0
  261. package/dist/types/permissions/schema.d.ts +14 -0
  262. package/dist/types/plugin/context.d.ts +20 -0
  263. package/dist/types/plugin/core-tool-names.d.ts +4 -0
  264. package/dist/types/plugin/define.d.ts +46 -0
  265. package/dist/types/plugin/hooks.d.ts +52 -0
  266. package/dist/types/plugin/index.d.ts +11 -0
  267. package/dist/types/plugin/load-skill.d.ts +14 -0
  268. package/dist/types/plugin/loader.d.ts +25 -0
  269. package/dist/types/plugin/manager.d.ts +42 -0
  270. package/dist/types/plugin/registry.d.ts +73 -0
  271. package/dist/types/plugin/skills.d.ts +11 -0
  272. package/dist/types/plugin/types.d.ts +336 -0
  273. package/dist/types/plugin/zod-introspect.d.ts +11 -0
  274. package/dist/types/reload/client.d.ts +11 -0
  275. package/dist/types/reload/docker-exec-client.d.ts +11 -0
  276. package/dist/types/reload/format.d.ts +2 -0
  277. package/dist/types/reload/index.d.ts +6 -0
  278. package/dist/types/reload/recover.d.ts +22 -0
  279. package/dist/types/reload/registry.d.ts +10 -0
  280. package/dist/types/reload/types.d.ts +25 -0
  281. package/dist/types/role-claim/client.d.ts +20 -0
  282. package/dist/types/role-claim/code.d.ts +4 -0
  283. package/dist/types/role-claim/controller.d.ts +59 -0
  284. package/dist/types/role-claim/index.d.ts +6 -0
  285. package/dist/types/role-claim/match-rule.d.ts +9 -0
  286. package/dist/types/role-claim/pending.d.ts +35 -0
  287. package/dist/types/role-claim/reload-after-claim.d.ts +16 -0
  288. package/dist/types/run/llm-fetch-observer.d.ts +50 -0
  289. package/dist/types/sandbox/availability.d.ts +21 -0
  290. package/dist/types/sandbox/build.d.ts +7 -0
  291. package/dist/types/sandbox/canonical-secrets.d.ts +8 -0
  292. package/dist/types/sandbox/coding-agent.d.ts +20 -0
  293. package/dist/types/sandbox/dependency-bins.d.ts +19 -0
  294. package/dist/types/sandbox/dev-source.d.ts +4 -0
  295. package/dist/types/sandbox/env-exposure.d.ts +3 -0
  296. package/dist/types/sandbox/errors.d.ts +20 -0
  297. package/dist/types/sandbox/hidden-paths.d.ts +11 -0
  298. package/dist/types/sandbox/index.d.ts +14 -0
  299. package/dist/types/sandbox/package-install.d.ts +1 -0
  300. package/dist/types/sandbox/policy.d.ts +71 -0
  301. package/dist/types/sandbox/privileged-runtime.d.ts +13 -0
  302. package/dist/types/sandbox/quote.d.ts +2 -0
  303. package/dist/types/sandbox/runtime-private.d.ts +1 -0
  304. package/dist/types/sandbox/session-tmp.d.ts +6 -0
  305. package/dist/types/sandbox/symlinks.d.ts +6 -0
  306. package/dist/types/sandbox/writable-zones.d.ts +15 -0
  307. package/dist/types/secrets/coding-agent-auth.d.ts +25 -0
  308. package/dist/types/secrets/defaults.d.ts +21 -0
  309. package/dist/types/secrets/export-github-cli-store.d.ts +22 -0
  310. package/dist/types/secrets/hydrate.d.ts +7 -0
  311. package/dist/types/secrets/index.d.ts +7 -0
  312. package/dist/types/secrets/provision-github-cli-store.d.ts +45 -0
  313. package/dist/types/secrets/refresh-provider-oauth.d.ts +22 -0
  314. package/dist/types/secrets/resolve.d.ts +14 -0
  315. package/dist/types/secrets/schema.d.ts +840 -0
  316. package/dist/types/secrets/storage.d.ts +56 -0
  317. package/dist/types/shared/host-locale.d.ts +1 -0
  318. package/dist/types/shared/index.d.ts +5 -0
  319. package/dist/types/shared/local-time.d.ts +4 -0
  320. package/dist/types/shared/platform.d.ts +2 -0
  321. package/dist/types/shared/protocol.d.ts +424 -0
  322. package/dist/types/shared/style-text.d.ts +3 -0
  323. package/dist/types/shared/wsl.d.ts +17 -0
  324. package/dist/types/stream/broker.d.ts +2 -0
  325. package/dist/types/stream/index.d.ts +2 -0
  326. package/dist/types/stream/types.d.ts +71 -0
  327. package/package.json +13 -6
  328. package/scripts/build-plugin-types.ts +105 -0
  329. package/scripts/check-plugin-sdk.ts +111 -0
  330. package/scripts/require-parallel.ts +5 -32
  331. package/src/agent/bash-sandbox-env.ts +104 -0
  332. package/src/agent/bash-sandbox-proc.ts +70 -0
  333. package/src/agent/bash-sandbox.ts +225 -0
  334. package/src/agent/compaction.ts +22 -10
  335. package/src/agent/guard-types.ts +3 -0
  336. package/src/agent/guards.ts +4 -0
  337. package/src/agent/idle-compaction.ts +178 -0
  338. package/src/agent/index.ts +139 -172
  339. package/src/agent/live-subagents.ts +19 -0
  340. package/src/agent/multimodal/look-at.ts +22 -9
  341. package/src/agent/output-allowance.ts +7 -0
  342. package/src/agent/plugin-tools.ts +39 -377
  343. package/src/agent/reviewer-bash-policy.ts +41 -1
  344. package/src/agent/session-origin.ts +28 -11
  345. package/src/agent/subagent-cache-keepalive.ts +198 -0
  346. package/src/agent/subagent-completion-reminder.ts +2 -2
  347. package/src/agent/subagent-session.ts +6 -0
  348. package/src/agent/subagents.ts +46 -8
  349. package/src/agent/system-prompt-composition.ts +141 -0
  350. package/src/agent/system-prompt.ts +5 -5
  351. package/src/agent/todo/scope.ts +1 -1
  352. package/src/agent/tool-file-safety.ts +6 -1
  353. package/src/agent/tools/channel-edit.ts +20 -10
  354. package/src/agent/tools/channel-fetch-attachment.ts +12 -5
  355. package/src/agent/tools/channel-handoff.ts +72 -0
  356. package/src/agent/tools/channel-read.ts +57 -10
  357. package/src/agent/tools/channel-reply.ts +33 -26
  358. package/src/agent/tools/channel-send.ts +21 -13
  359. package/src/agent/tools/channel-session-search.ts +35 -0
  360. package/src/agent/tools/curl-impersonate.ts +11 -4
  361. package/src/agent/tools/ddg.ts +84 -16
  362. package/src/agent/tools/spawn-subagent.ts +27 -11
  363. package/src/agent/tools/stream-snapshot.ts +15 -2
  364. package/src/agent/tools/subagent-access.ts +11 -4
  365. package/src/agent/tools-without-local-file-operands.ts +4 -0
  366. package/src/browser/bsk-shim.mjs +74 -0
  367. package/src/browser/dockerfile.ts +84 -0
  368. package/src/browser/egress.ts +104 -0
  369. package/src/browser/fill-secret.ts +307 -0
  370. package/src/browser/managed-browser.ts +205 -0
  371. package/src/browser/registry.ts +110 -0
  372. package/src/browser/relay.ts +231 -0
  373. package/src/browser/sandbox-entry.ts +167 -0
  374. package/src/bundled-plugins/agent-browser/index.ts +2 -0
  375. package/src/bundled-plugins/browser-agent/browser-agent.ts +89 -0
  376. package/src/bundled-plugins/browser-agent/index.ts +12 -0
  377. package/src/bundled-plugins/doc-render/index.ts +0 -10
  378. package/src/bundled-plugins/doc-render/render.ts +83 -111
  379. package/src/bundled-plugins/doc-render/skills/typeclaw-render-pdf/SKILL.md +152 -257
  380. package/src/bundled-plugins/explorer/explorer.ts +1 -1
  381. package/src/bundled-plugins/github-cli-auth/gh-command.ts +4 -0
  382. package/src/bundled-plugins/github-cli-auth/gh-review-detect.ts +40 -16
  383. package/src/bundled-plugins/github-cli-auth/git-auth-diagnostic.ts +95 -0
  384. package/src/bundled-plugins/github-cli-auth/graphql-auth-nudge.ts +12 -7
  385. package/src/bundled-plugins/github-cli-auth/index.ts +85 -60
  386. package/src/bundled-plugins/managed-browser/index.ts +179 -0
  387. package/src/bundled-plugins/managed-browser/skills/browser-use/browser-use/SKILL.md +27 -0
  388. package/src/bundled-plugins/managed-browser/skills/browserskill/browserskill/SKILL.md +28 -0
  389. package/src/bundled-plugins/managed-browser/skills/omowright/omowright/SKILL.md +40 -0
  390. package/src/bundled-plugins/memory/dreaming.ts +4 -1
  391. package/src/bundled-plugins/memory/load-memory.ts +2 -4
  392. package/src/bundled-plugins/memory/memory-logger.ts +74 -2
  393. package/src/bundled-plugins/memory/transcript-preload.ts +103 -0
  394. package/src/bundled-plugins/memory/vector/hybrid.ts +25 -14
  395. package/src/bundled-plugins/operator/operator.ts +1 -1
  396. package/src/bundled-plugins/qa/index.ts +11 -0
  397. package/src/bundled-plugins/qa/qa.ts +160 -0
  398. package/src/bundled-plugins/qa/skills/qa-cli.ts +50 -0
  399. package/src/bundled-plugins/qa/skills/qa-general.ts +30 -0
  400. package/src/bundled-plugins/qa/skills/qa-http.ts +39 -0
  401. package/src/bundled-plugins/qa/skills/qa-pr.ts +51 -0
  402. package/src/bundled-plugins/qa/skills/qa-web.ts +49 -0
  403. package/src/bundled-plugins/security/index.ts +53 -34
  404. package/src/bundled-plugins/security/policies/outbound-secret-scan.ts +1 -0
  405. package/src/bundled-plugins/security/policies/private-surface-read.ts +166 -201
  406. package/src/channels/adapter-namespace.ts +13 -0
  407. package/src/channels/adapters/discord-bot-reference.ts +5 -4
  408. package/src/channels/adapters/discord-bot.ts +98 -5
  409. package/src/channels/adapters/discord-classify.ts +8 -3
  410. package/src/channels/adapters/discord.ts +29 -0
  411. package/src/channels/adapters/github/index.ts +16 -0
  412. package/src/channels/adapters/github/last-alive.ts +4 -16
  413. package/src/channels/adapters/slack-attachment-download.ts +14 -3
  414. package/src/channels/adapters/slack-bot-author-resolver.ts +4 -3
  415. package/src/channels/adapters/slack-bot-channel-resolver.ts +9 -6
  416. package/src/channels/adapters/slack-bot-classify.ts +1 -0
  417. package/src/channels/adapters/slack-bot-slash-commands.ts +3 -1
  418. package/src/channels/adapters/slack-bot.ts +299 -67
  419. package/src/channels/adapters/slack-classify.ts +1 -0
  420. package/src/channels/catch-up.ts +137 -0
  421. package/src/channels/continuation-willingness.ts +2 -2
  422. package/src/channels/continuity-types.ts +1 -0
  423. package/src/channels/engagement.ts +17 -1
  424. package/src/channels/github-false-receipt.ts +3 -3
  425. package/src/channels/github-rereview-guard.ts +9 -5
  426. package/src/channels/github-review-check.ts +5 -1
  427. package/src/channels/github-review-verdict-coordinator.ts +68 -2
  428. package/src/channels/github-token-bridge.ts +24 -0
  429. package/src/channels/last-alive.ts +34 -0
  430. package/src/channels/manager.ts +8 -1
  431. package/src/channels/router.ts +515 -243
  432. package/src/channels/session-handoff.fixture.ts +144 -0
  433. package/src/channels/session-handoff.ts +175 -0
  434. package/src/channels/session-search.ts +71 -0
  435. package/src/channels/subagent-completion-bridge.ts +3 -2
  436. package/src/channels/types.ts +12 -2
  437. package/src/cli/channel.ts +2 -3
  438. package/src/cli/hostd.ts +3 -0
  439. package/src/cli/init.ts +2 -3
  440. package/src/cli/model.ts +132 -3
  441. package/src/coding-agent/index.ts +7 -1
  442. package/src/coding-agent/omo-stream.ts +40 -0
  443. package/src/coding-agent/runner.ts +30 -8
  444. package/src/config/config.ts +126 -22
  445. package/src/config/model-overrides.ts +59 -0
  446. package/src/config/models-mutation.ts +185 -2
  447. package/src/config/providers-mutation.ts +12 -4
  448. package/src/config/providers.ts +69 -4
  449. package/src/container/start.ts +132 -5
  450. package/src/doctor/checks.ts +33 -22
  451. package/src/doctor/index.ts +48 -12
  452. package/src/doctor/operational-incidents.ts +16 -1
  453. package/src/doctor/plugin-bridge.ts +14 -1
  454. package/src/doctor/stage.ts +14 -0
  455. package/src/doctor/types.ts +6 -0
  456. package/src/eval/cell.ts +93 -0
  457. package/src/eval/config.ts +32 -0
  458. package/src/eval/dispatch.ts +67 -0
  459. package/src/eval/entry.ts +261 -0
  460. package/src/eval/kernel.ts +154 -0
  461. package/src/eval/process.ts +113 -0
  462. package/src/eval/protocol.ts +26 -0
  463. package/src/eval/redeclare.ts +174 -0
  464. package/src/eval/sandbox.ts +114 -0
  465. package/src/eval/tool.ts +98 -0
  466. package/src/eval/wire.ts +93 -0
  467. package/src/hostd/daemon.ts +13 -1
  468. package/src/init/auto-upgrade.ts +7 -1
  469. package/src/init/dockerfile.ts +57 -12
  470. package/src/init/index.ts +4 -3
  471. package/src/init/local-source-stamp.ts +68 -0
  472. package/src/init/models-dev.ts +4 -0
  473. package/src/init/validate-api-key.ts +3 -0
  474. package/src/operations/classify-tool-outcome.ts +1 -1
  475. package/src/permissions/builtins.ts +7 -0
  476. package/src/permissions/permissions.ts +18 -9
  477. package/src/permissions/resolve.ts +7 -1
  478. package/src/plugin/context.ts +2 -0
  479. package/src/plugin/core-tool-names.ts +6 -1
  480. package/src/plugin/hooks.ts +137 -0
  481. package/src/plugin/index.ts +6 -0
  482. package/src/plugin/manager.ts +4 -0
  483. package/src/plugin/types.ts +60 -0
  484. package/src/run/bundled-plugins.ts +6 -0
  485. package/src/run/index.ts +24 -14
  486. package/src/run/llm-fetch-observer.ts +12 -15
  487. package/src/sandbox/canonical-secrets.ts +4 -0
  488. package/src/sandbox/dev-source.ts +26 -0
  489. package/src/sandbox/env-exposure.ts +20 -0
  490. package/src/sandbox/hidden-paths.ts +16 -2
  491. package/src/secrets/storage.ts +13 -0
  492. package/src/server/index.ts +46 -11
  493. package/src/skills/typeclaw-channel-github/SKILL.md +8 -8
  494. package/src/skills/typeclaw-config/SKILL.md +57 -5
  495. package/src/skills/typeclaw-config/references/dockerfile.md +2 -2
  496. package/src/skills/typeclaw-github-contributing/SKILL.md +1 -1
  497. package/src/skills/typeclaw-monorepo/SKILL.md +1 -1
  498. package/src/skills/typeclaw-permissions/SKILL.md +7 -7
  499. package/src/skills/typeclaw-troubleshooting/SKILL.md +12 -1
  500. package/typeclaw.schema.json +488 -5
  501. package/src/bundled-plugins/doc-render/templates/lib.typ +0 -339
  502. package/src/bundled-plugins/github-cli-auth/gh-store.ts +0 -733
@@ -1,242 +1,164 @@
1
1
  ---
2
2
  name: typeclaw-render-pdf
3
- description: "The ONLY supported way to render Markdown into a polished, professional PDF (and optionally attach it to a channel). Load this whenever you need to deliver a document as a PDF rather than raw markdown — reports, summaries, briefs, meeting notes, docs, render report, export document, anything a human would want to download, print, or forward, including a researcher's report file shipped as a Slack/Discord attachment. Triggers: 'make a PDF', 'export to PDF', 'markdown to PDF', 'PDF report', 'render report', 'export document', 'the report', 'attach the report', 'send me a PDF', 'as a PDF', 'turn this into a document', 'make it look good', 'beautiful PDF', 'nicer PDF', a researcher/subagent result you want to ship as a file, 'PDF로', 'PDF로 만들어', 'PDF로 변환', 'PDF 첨부', '리포트', '보고서', '예쁘게'. Provided by the bundled `doc-render` plugin: a small Typst toolchain is installed on first use via `bun add` (no PDF library is baked into the image), a bundled themed report library does the styling, and a bundled render script does the compile. The library ships four polished themes (editorial / modern / report / minimal) so the output looks deliberately designed, not like a default-template export. Handles CJK/Korean/Japanese/Chinese: CJK fonts are opt-in, so if the output has tofu (□□□) boxes it tells you to enable `docker.file.cjkFonts` and restart, then regenerates — it never auto-downloads a font. Also load before saying you cannot produce PDFs — you can. NEVER build a PDF with jsPDF, pdfkit, a canvas text dump, a headless-browser raw-text print, or Python ReportLab — those produce unrendered markdown and broken CJK; this skill is the only correct path. Covers the one-time install, picking a theme, the render command, and how to attach the PDF to Slack/Discord/Telegram/KakaoTalk. For operating on EXISTING PDFs (merge, split, extract text, fill forms), this is not the skill — use pypdf/qpdf instead; doc-render produces documents, it does not read them."
3
+ description: "The ONLY supported way to produce a polished, professionally designed PDF (and optionally attach it to a channel). Load this whenever you need to deliver a document as a PDF rather than raw markdown — reports, summaries, briefs, one-pagers, dashboards, meeting notes, docs, render report, export document, anything a human would want to download, print, or forward, including a researcher's report file shipped as a Slack/Discord attachment. Triggers: 'make a PDF', 'export to PDF', 'markdown to PDF', 'PDF report', 'render report', 'export document', 'the report', 'attach the report', 'send me a PDF', 'as a PDF', 'turn this into a document', 'make it look good', 'beautiful PDF', 'nicer PDF', a researcher/subagent result you want to ship as a file, 'PDF로', 'PDF로 만들어', 'PDF로 변환', 'PDF 첨부', '리포트', '보고서', '예쁘게'. Provided by the bundled `doc-render` plugin: you design the document yourself as self-contained HTML/CSS (cover, headline numbers, charts, tables — whatever fits), and a bundled script prints it to PDF with the Chrome already in the image via `playwright-core` (installed once per session with `bun add`; no browser download). Handles CJK/Korean/Japanese/Chinese: CJK fonts are opt-in, so if the output has tofu (□□□) boxes it tells you to enable `docker.file.cjkFonts` and restart, then regenerates — it never auto-downloads a font. Also load before saying you cannot produce PDFs — you can. NEVER build a PDF with jsPDF, pdfkit, a canvas text dump, or Python ReportLab — this skill is the only correct path. Covers the one-time install, writing the HTML, the render command, and how to attach the PDF to Slack/Discord/Telegram/KakaoTalk. For operating on EXISTING PDFs (merge, split, extract text, fill forms), this is not the skill — use pypdf/qpdf instead; doc-render produces documents, it does not read them."
4
4
  ---
5
5
 
6
6
  # typeclaw-render-pdf
7
7
 
8
- You can produce professional PDFs from Markdown. The bundled `doc-render` plugin
9
- ships two things: a **themed report library** (`lib.typ`) that does all the
10
- styling, and a **render script** that does the compile. The only thing installed
11
- on demand is the [Typst](https://typst.app) compiler — a single npm package the
12
- agent `bun add`s into writable session scratch the **first time** you need a PDF,
13
- then reuses for that session. No Pandoc, no LaTeX, no headless browser, no PDF toolchain baked
14
- into the image.
15
-
16
- The flow is: **(1)** install the compiler once (`bun add`), **(2)** have your
17
- Markdown ready, **(3)** copy the theme library next to it and write a tiny
18
- 4-line wrapper that picks a **theme**, **(4)** run the render script. If a channel
19
- asked for the PDF, attach the result with `channel_send`.
20
-
21
- You do **not** write Typst markup or hand-style anything. The library's
22
- `report` template styles every Markdown element — headings, lists, tables, code,
23
- quotes, links, figures — and adds a cover, running header, and page footer. The
24
- [`cmarker`](https://typst.app/universe/package/cmarker/) package converts your
25
- CommonMark to Typst; the theme makes it look designed. **Your only real choice is
26
- which theme fits the document.**
27
-
28
- > **This is the only supported way to make a PDF from Markdown in TypeClaw.**
29
- > Do **not** reach for `jsPDF`, `pdfkit`, a `<canvas>` text dump, a
30
- > headless-browser "print raw text" path, or Python `ReportLab`. Those skip
31
- > Markdown rendering (you get literal `##` and `**` in the output) and ship no
32
- > CJK font, so Korean/Japanese/Chinese come out as mojibake. The Typst path below
33
- > renders the Markdown properly. If you catch yourself about to `bun add` a PDF
34
- > library other than the Typst compiler named here, stop.
8
+ You produce PDFs by **designing the document in HTML** and printing it. The
9
+ bundled `doc-render` plugin ships a **render script** that prints your HTML
10
+ with the Chrome already in the image. There is no template and no injected
11
+ stylesheet: you write all the CSS, so each document is designed for its own
12
+ content.
13
+
14
+ The output should look like a designer made it — a cover, headline numbers,
15
+ charts, side-by-side panels — **not** like Markdown run through a converter.
16
+ That is the whole point of this path: you are the designer.
17
+
18
+ The flow: **(1)** install `playwright-core` once per session, **(2)** write the
19
+ document as `.html`, **(3)** run the render script, **(4)** attach the PDF if a
20
+ channel asked for it.
21
+
22
+ > Do **not** reach for `jsPDF`, `pdfkit`, a `<canvas>` text dump, or Python
23
+ > `ReportLab`. They produce unstyled text and broken CJK. If you catch yourself
24
+ > about to `bun add` a PDF library other than `playwright-core`, stop.
35
25
 
36
26
  ## When to use this
37
27
 
38
- - A research report, brief, or summary the user wants as a downloadable file.
39
- - A subagent (e.g. the `researcher`) handed you a `research-<slug>.md` to ship as a PDF.
28
+ - A report, brief, one-pager, or dashboard the user wants as a downloadable file.
29
+ - A subagent (e.g. the `researcher`) handed you a `research-<slug>.md` to ship
30
+ as a PDF — read it, then **design** it as HTML (don't paste it into `<pre>`).
40
31
  - Any channel message asking for "a PDF" / "the report attached" / "예쁘게 PDF로".
41
- - Anyone complaining a previous PDF looked "plain" — switch theme and/or follow
42
- the design tips below; do not hand-roll a new styling system.
43
32
 
44
33
  When plain markdown in chat is fine, **don't** make a PDF. This is for when a
45
34
  _file_ is the deliverable.
46
35
 
47
- ## Step 0 — install the Typst compiler (once per session)
48
-
49
- The PDF compiler is not baked into the image — install it on first use. It is a
50
- single version-pinned npm package (npm pulls only this platform's prebuilt
51
- binary — Linux x64/arm64, glibc or musl). Install it in the session's writable
52
- `/tmp` runtime; the agent-root dependency tree is protected read-only:
36
+ ## Step 0 — install the renderer (once per session)
53
37
 
54
38
  ```sh
55
39
  mkdir -p /tmp/typeclaw-doc-render-runtime && cd /tmp/typeclaw-doc-render-runtime
56
- bun add @myriaddreamin/typst-ts-node-compiler@0.7.0
57
- ```
58
-
59
- The `@0.7.0` pin embeds Typst 0.14.2 and keeps the toolchain reproducible. If you
60
- forget this step, the render script in Step 3 stops with the exact `bun add` line
61
- to run, so you can also just try the render and follow its guidance.
62
-
63
- > **Where it goes:** `/tmp/typeclaw-doc-render-runtime`, backed by TypeClaw's
64
- > per-session scratch directory. It is writable to model-driven bash and reused
65
- > across calls in the same session, but not promised across container restarts.
66
- > Do **not** modify `/agent/node_modules` or create a dependency tree under
67
- > `workspace/`.
68
-
69
- ## Step 1 — have the markdown ready
70
-
71
- Use an existing markdown file (yours or a subagent's), or `write` your content to
72
- a markdown file. Standard CommonMark plus tables and footnotes all work. Put the
73
- `.md`, the copied `lib.typ`, and the `.typ` wrapper (Step 2) in the **same
74
- directory** so the wrapper's relative `read("...")` and `#import "lib.typ"` both
75
- resolve. Any agent-writable directory works (`workspace/`, `public/`, `mounts/`,
76
- or wherever the source `.md` already lives, e.g. a researcher's report under
77
- `public/`). There is no required directory; keep the three files together and run
78
- the render from there.
79
-
80
- ## Step 2 — pick a theme and write the wrapper
81
-
82
- First, **copy the bundled theme library** next to your markdown (Typst's
83
- workspace sandbox only resolves imports under the render's working directory, so
84
- the library must sit beside the wrapper — an absolute import from outside won't
85
- resolve):
86
-
87
- ```sh
88
- cd /agent/workspace # or wherever your .md lives (public/, mounts/, …)
89
- cp /agent/node_modules/typeclaw/src/bundled-plugins/doc-render/templates/lib.typ .
40
+ bun add playwright-core@1.64.1
90
41
  ```
91
42
 
92
- Then `write` a tiny `.typ` wrapper next to the markdown. This is the **entire**
93
- wrapper — you do not style anything yourself; the theme does it:
94
-
95
- ```typst
96
- #import "lib.typ": report, callout, kpi, kpi-row, pullquote
97
- #show: report.with(
98
- theme: "editorial", // editorial | modern | report | minimal
99
- title: "Edge-AI Quarterly Brief",
100
- subtitle: "Q2 2026 · Internal Distribution",
101
- date: "2026-06-17",
102
- author: "Research",
103
- )
104
- #import "@preview/cmarker:0.1.8"
105
- #cmarker.render(
106
- read("report.md"),
107
- h1-level: 1,
108
- blockquote: quote.with(block: true),
109
- // makes the helpers available to <!--raw-typst …--> snippets in the markdown
110
- scope: (callout: callout, kpi: kpi, kpi-row: kpi-row, pullquote: pullquote),
111
- )
43
+ `playwright-core` downloads **no** browser; it drives the Chrome that already
44
+ ships in the image (`/usr/local/lib/typeclaw-agent-browser/chrome`). The
45
+ directory is TypeClaw's writable per-session scratch, reused across calls in the
46
+ same session but not promised across restarts. Do **not** modify
47
+ `/agent/node_modules` or create a dependency tree under `workspace/`. If you
48
+ forget this step, the render exits 3 and prints the exact `bun add` line.
49
+
50
+ ## Step 1 — write the HTML
51
+
52
+ Write one self-contained `.html` file (CSS in a `<style>` block) in any
53
+ agent-writable directory (`workspace/`, `public/`, or next to the source
54
+ `.md`). Put local images beside it and reference them relatively. Charts are
55
+ inline `<svg>` or plain CSS (bars as sized `<div>`s); no JS chart libraries.
56
+
57
+ ### Print essentials
58
+
59
+ Browsers print badly by default. Always include these:
60
+
61
+ ```css
62
+ @page {
63
+ size: A4;
64
+ margin: 18mm 16mm;
65
+ @bottom-right {
66
+ content: counter(page) ' / ' counter(pages);
67
+ font: 8pt sans-serif;
68
+ color: #888;
69
+ }
70
+ }
71
+ html {
72
+ -webkit-print-color-adjust: exact;
73
+ print-color-adjust: exact;
74
+ } /* keep backgrounds */
75
+ h1,
76
+ h2,
77
+ h3 {
78
+ break-after: avoid;
79
+ }
80
+ figure,
81
+ tr,
82
+ .card {
83
+ break-inside: avoid;
84
+ }
85
+ thead {
86
+ display: table-header-group;
87
+ } /* repeat table headers across pages */
112
88
  ```
113
89
 
114
- ### Choosing the theme
115
-
116
- Pick the one that fits the document's purpose. All four are built on the fonts
117
- that ship in the container, so they render identically everywhere.
118
-
119
- - **`editorial`** — magazine look: a dedicated cover page, smallcaps tracked
120
- headings, booktabs tables, wine accent. The elegant default for prose: reports,
121
- briefs, memos, articles.
122
- - **`modern`** — startup look: a bold bleed-bar masthead, accent-bar headings,
123
- airy ragged-right, indigo accent, accent-header tables. Product/launch briefs,
124
- updates, anything that should feel current.
125
- - **`report`** — data / consulting look: a cover page with a full accent band,
126
- accent-ruled section heads, strong navy zebra tables, plus `kpi()` and
127
- `pullquote()` helpers. Boardroom-ready analyses and data reports.
128
- - **`minimal`** — Apple-clean: a spacious title block, large light headings, no
129
- running header, generous margins, ultra-light tables. Short notes, letters,
130
- one-pagers.
131
-
132
- When unsure, use `editorial`. If a user said the last PDF looked plain, try
133
- `modern` or `report` (the most visibly "designed") and apply the tips below.
134
-
135
- ### Optional knobs
136
-
137
- - `accent: rgb("#0f766e")` — override the theme's accent color (links, rules,
138
- headings, cover, table headers). Omit or pass `accent: auto` for the theme
139
- default.
140
- - `cover: "page" | "masthead" | "title" | none` — override the cover treatment
141
- (`page` = dedicated cover page, `masthead` = bold top block, `title` = compact
142
- title block), or `none` to drop it (e.g. a short memo). Omit for the theme
143
- default.
144
- - Omit `title` entirely and no cover is drawn — useful when the markdown already
145
- opens with its own H1.
146
-
147
- ## Step 3 — render
148
-
149
- The render script is **bundled with the plugin** — you do not write it. It lives
150
- at `/agent/node_modules/typeclaw/src/bundled-plugins/doc-render/render.ts`.
151
-
152
- You should already be `cd`'d into the directory holding your `.typ`, `.md`, and
153
- the copied `lib.typ` (from Step 2). The wrapper's `read("report.md")` and
154
- `#import "lib.typ"` both resolve relative to the render's working directory, so
155
- you must run it from there:
90
+ - A full-bleed cover: give it its own named page (`@page cover { margin: 0 }`,
91
+ `.cover { page: cover; height: 297mm; break-after: page }`).
92
+ - Size with `mm`/`pt`, not `vh`; an A4 page is 210 × 297 mm.
93
+ - **Fonts:** nothing is bundled and remote fonts are not allowed. Use a stack
94
+ that degrades well, and include the CJK fallback:
95
+ `font-family: Inter, "Helvetica Neue", Helvetica, Arial, "Liberation Sans", "DejaVu Sans", "Noto Sans CJK KR", "Noto Sans CJK JP", "Noto Sans CJK SC", sans-serif;`
96
+ Get hierarchy from size, weight, spacing, and color, not from a fancy face.
97
+
98
+ ### Design like a designer
99
+
100
+ - **Lead with the conclusion.** The cover and first-page headline state the
101
+ finding ("Edge inference became the default"), not the topic ("Q2 Report").
102
+ - **Numbers up front.** Put the 3–4 headline figures in a row of cards.
103
+ - **Compare side by side** with CSS grid instead of stacking everything.
104
+ - **Tables over repeated bullets**, with status as small colored pills and
105
+ figures right-aligned (`font-variant-numeric: tabular-nums`).
106
+ - **One accent color** chosen for the subject (navy for finance, teal for
107
+ health, indigo for tech), plus neutrals. Callouts are rare.
108
+ - **Keep prose short.** Short paragraphs under clear sections; no walls of text.
109
+ - **Vary the design per document.** Don't reuse one layout for everything.
110
+ - **Everything local.** No CDN fonts, scripts, stylesheets, or remote images.
111
+
112
+ ### Charts
113
+
114
+ A chart should make one point; let its title say it ("Churn halved after the
115
+ March price change"), not just name the data. If there's no point to make, a
116
+ table or a sentence may serve better.
117
+
118
+ Good defaults, not rules — break them when the content calls for it:
119
+
120
+ - Pick the form from the question: trends → lines; comparisons → sorted
121
+ horizontal bars; part-of-whole → a stacked bar (pies only for 2–3 parts);
122
+ progress → a bar against a target.
123
+ - Position and length read more precisely than angle, area, or color.
124
+ - Bars usually start at zero, because readers compare their length.
125
+ - Label lines and bars directly instead of using a legend; keep gridlines
126
+ faint and ticks round; put units where the reader looks.
127
+ - Gray by default, the accent for what the title is about; the chart should
128
+ still read in grayscale.
129
+ - Annotate the moment that explains the shape; note the source and date.
130
+ - Too many series? Small multiples with a shared scale often read better.
131
+ - Derive coordinates from the data (a small script that emits the `<svg>`
132
+ works well); shapes placed by eye drift from the numbers.
133
+
134
+ ## Step 2 — render
156
135
 
157
136
  ```sh
158
- cd /agent/workspace # or wherever your .typ + .md + lib.typ live
159
- bun run /agent/node_modules/typeclaw/src/bundled-plugins/doc-render/render.ts report.typ report.pdf
137
+ cd /agent/workspace # wherever your .html lives
138
+ bun run /agent/node_modules/typeclaw/src/bundled-plugins/doc-render/render.ts brief.html brief.pdf
160
139
  ```
161
140
 
162
- On success it prints `wrote report.pdf (<N> bytes)` and `report.pdf` exists in
163
- that directory.
164
-
165
- If it stops with **`@myriaddreamin/typst-ts-node-compiler is not installed`**
166
- (exit 3), run the Step 0 `bun add` and re-run. If it stops with a **`NotDir` /
167
- ENOTDIR** error, that is the sandbox `/proc` degraded mode, not your markup and
168
- not a font — retry once; if it persists, report it as a sandbox/environment
169
- issue and do **not** switch to another PDF library (it won't help). Any other
170
- error is a real Typst compile error (usually raw HTML or an unsupported markdown
171
- extension) and names the offending line — simplify that part and re-run.
172
-
173
- ## Make it genuinely beautiful (design tips)
174
-
175
- A theme gets you 90% of the way. The rest is content discipline — the same things
176
- that separate a designed document from a markdown dump:
177
-
178
- - **Front-load structure.** A short lead paragraph under the title, then clear
179
- `##` sections. Don't open with a wall of text.
180
- - **Tables over repeated bullet stanzas.** If you're repeating the same fields
181
- per item (name, value, status…), a table reads far better than N bullet lists.
182
- The theme styles tables with clean rules and a header row.
183
- - **Caption your images** so they read as figures, not floating screenshots:
184
-
185
- ```markdown
186
- <!--raw-typst
187
- #figure(image("chart.png", width: 80%), caption: [Revenue trend, Q1–Q2 2026.])
188
- -->
189
- ```
190
-
191
- Images default to a sensible max width; keep them to one strong figure per idea
192
- rather than many raw dumps at random sizes.
193
-
194
- - **Use callouts for what matters** — a risk, a key result, a caveat — instead of
195
- bolding a whole paragraph. `callout` is exported by the library (pass it via
196
- `scope:` as shown above), then used inside the markdown:
197
-
198
- ```markdown
199
- <!--raw-typst
200
- #callout(kind: "warning", title: "Risk")[A single supplier covers 40% of NPUs.]
201
- #callout(kind: "success")[Revenue grew 31% YoY, ahead of plan.]
202
- -->
203
- ```
204
-
205
- Kinds: `note`, `tip`, `success`, `warning`, `danger`. Keep them rare — two or
206
- three in a document read as deliberate; a wall of colored boxes reads as noise.
207
-
208
- - **Lead with the numbers (data reports).** For a metrics-heavy document, open a
209
- section with a row of KPI cards instead of burying figures in prose. `kpi` and
210
- `kpi-row` are exported by the library (pass them via `scope:` as shown above):
211
-
212
- ```markdown
213
- <!--raw-typst
214
- #kpi-row(
215
- kpi("$5.5M", "Revenue", sub: "+31% YoY"),
216
- kpi("124%", "Net retention", sub: "+6pt"),
217
- kpi("63.4%", "Gross margin", sub: "+240bp"),
218
- )
219
- -->
220
- ```
221
-
222
- Use `pullquote("…", by: "…")` for a centered featured quote between sections.
141
+ On success it prints `wrote brief.pdf (<N> bytes)`. Exit **3** means
142
+ `playwright-core` is missing (run Step 0). A **`NotDir` / ENOTDIR** error is the
143
+ sandbox `/proc` degraded mode, not your markup — retry once; if it persists,
144
+ report it as an environment issue and do **not** switch to another PDF library.
145
+ `no Chrome at …` means the image has no browser at the default path; set
146
+ `AGENT_BROWSER_EXECUTABLE_PATH` to a Chrome/Chromium binary.
223
147
 
224
- - **Let whitespace breathe, but don't pad.** Trust the theme's rhythm; don't add
225
- manual `#v(...)` spacers around everything.
148
+ Check the result before sending: if layout matters, screenshot a page with a
149
+ browser engine (`agent-browser` is always installed) or re-read the HTML for overflowing tables or orphaned headings
150
+ and fix them with `break-inside: avoid` / `break-before: page`.
226
151
 
227
152
  ## Handling CJK content
228
153
 
229
- CJK fonts are **opt-in** (the `docker.file.cjkFonts` toggle). The themes already
230
- list `Noto Serif CJK` / `Noto Sans Mono CJK` as fallbacks, so Korean/Japanese/
231
- Chinese resolve automatically **when those fonts are present**. When the toggle
232
- is off, Typst still renders — it just substitutes `.notdef` tofu (□) boxes for
233
- every CJK glyph. **Do not** download, vendor, or `curl` a font to work around
234
- this, and **do not** silently deliver a tofu PDF.
154
+ CJK fonts are **opt-in** (the `docker.file.cjkFonts` toggle). With `Noto Sans CJK`
155
+ in your font stack (see Print essentials), Korean/Japanese/Chinese render
156
+ automatically **when those fonts are present**. When the toggle is off, CJK
157
+ glyphs come out as tofu (□) boxes. **Do not** download, vendor, or `curl` a font
158
+ to work around this, and **do not** silently deliver a tofu PDF.
235
159
 
236
- You don't need a pre-render gate: render first, then verify. If the source
237
- markdown contains CJK and the resulting PDF shows tofu boxes (or you know CJK
238
- fonts aren't enabled on this container), tell the user honestly and offer the
239
- fix:
160
+ If the document contains CJK and the PDF shows tofu (or you know CJK fonts
161
+ aren't enabled), tell the user and offer the fix:
240
162
 
241
163
  > This report has Korean/Japanese/Chinese text but the container has no CJK font
242
164
  > — they're opt-in, so the PDF comes out as tofu boxes. Want me to set
@@ -244,27 +166,21 @@ fix:
244
166
  > I edit it you'll run `typeclaw restart` from the host project directory, and
245
167
  > then I'll regenerate the PDF.
246
168
 
247
- Only after the user agrees: edit `typeclaw.json` to set `docker.file.cjkFonts:
248
- true` (use the `typeclaw-config` skill), ask them to `typeclaw restart`, and
249
- regenerate the PDF after the restarted container comes back. If the markdown has
250
- no CJK, this section doesn't apply.
169
+ Only after the user agrees: edit `typeclaw.json` (use the `typeclaw-config`
170
+ skill), ask them to `typeclaw restart`, and regenerate afterwards.
251
171
 
252
- ## Rendering an _existing_ web page or HTML to PDF
172
+ ## Archiving an existing web page
253
173
 
254
- This skill renders **markdown you author**. To capture an **existing web page or
255
- a live URL** as a PDF — something Typst cannot do — use the already-installed
256
- `agent-browser` (Chrome): `agent-browser --allow-file-access open
257
- file:///agent/workspace/page.html` (or a URL), then `agent-browser pdf
258
- /agent/workspace/out.pdf`. Its output is fixed US-Letter with default margins, so
259
- it's the right tool for _archiving web content_, not for authoring styled
260
- reports. For authored documents, stay on the Typst path above.
174
+ To capture a **live URL** as a PDF rather than author a document, drive a
175
+ browser engine; with the always-installed `agent-browser` that is
176
+ `agent-browser open <url>`, then `agent-browser pdf out.pdf`.
261
177
 
262
- ## Step 4 — deliver
178
+ ## Step 3 — deliver
263
179
 
264
180
  - **Channel asked for the PDF** — attach it:
265
181
 
266
182
  ```
267
- channel_send(text: "Here's the report.", attachments: [{ path: "/agent/workspace/report.pdf", filename: "Edge-AI-Brief.pdf" }])
183
+ channel_send(text: "Here's the report.", attachments: [{ path: "/agent/workspace/brief.pdf", filename: "Edge-AI-Brief.pdf" }])
268
184
  ```
269
185
 
270
186
  Use a human-friendly `filename` and an absolute path. Slack, Discord, Telegram,
@@ -273,48 +189,27 @@ reports. For authored documents, stay on the Typst path above.
273
189
 
274
190
  - **Replying in a thread** — use `channel_reply` with the same `attachments` shape.
275
191
 
276
- - **No channel** (TUI session) — just report the path: `report.pdf`.
192
+ - **No channel** (TUI session) — just report the path.
277
193
 
278
194
  ## If you got the markdown from a subagent
279
195
 
280
196
  The `researcher` subagent writes its report to `research-<slug>.md` and returns a
281
- `<report>` block naming the file. Copy `lib.typ` into that file's directory, point
282
- the wrapper's `read(...)` at the report, render there, and attach. You do the PDF
197
+ `<report>` block naming the file. Read it, design the HTML from its content
198
+ (cover, KPIs, charts from its numbers), render, and attach. You do the PDF
283
199
  step — the researcher's `bash` is read-only and it only emits markdown by design.
284
200
 
285
- ## Customizing this skill
286
-
287
- This is a bundled default. Want a fifth theme, a cover page with a logo, or a
288
- house style? Two options: (a) copy `lib.typ` into the document directory and edit
289
- your local copy before rendering (one-off), or (b) for a durable change, copy this
290
- file to `.agents/skills/<your-name>/SKILL.md` (use a **different** `name`; bundled
291
- skills win name collisions) and point it at your own theme library.
292
-
293
- ## Known limitations
294
-
295
- `cmarker` covers CommonMark well, but a few markdown features don't render as you
296
- might expect:
201
+ ## Customizing
297
202
 
298
- - **Task-list checkboxes** (`- [ ]` / `- [x]`) render as literal `[ ]` text, not
299
- checkboxes. Use a plain bullet list or a status column in a table instead.
300
- - **Bold/italic directly adjacent to CJK + parenthetical Latin** (e.g.
301
- `**로컬 우선(local-first)**`) may not be recognized as emphasis — CommonMark's
302
- flanking rules treat that boundary as non-emphasis. Put a space inside, or bold a
303
- pure run of text.
304
- - **Raw HTML** in the markdown is mostly ignored. Express structure in markdown
305
- (tables, lists) rather than HTML.
203
+ For a durable house style (brand colors, logo, layout), copy this file to
204
+ `.agents/skills/<your-name>/SKILL.md` (use a **different** `name`; bundled
205
+ skills win name collisions) and describe the style there.
306
206
 
307
207
  ## Don'ts
308
208
 
309
- - **Don't** hand-write a styling wrapper. Use `#show: report.with(theme: …)` from
310
- the bundled library; only reach for raw Typst (via `<!--raw-typst … -->`) for
311
- the occasional figure or callout.
312
- - **Don't** import `lib.typ` by absolute path — copy it next to the markdown
313
- first (Typst's workspace sandbox won't resolve an import from outside the
314
- render's working directory).
315
- - **Don't** build a `package.json` / `node_modules` / a render script under
316
- `workspace/` or modify the protected agent-root dependencies. The compiler
317
- installs in `/tmp/typeclaw-doc-render-runtime`; the render script and theme library are bundled with the plugin (under
318
- `/agent/node_modules/typeclaw/src/bundled-plugins/doc-render/`).
209
+ - **Don't** convert markdown mechanically into `<p>`/`<ul>` and call it done —
210
+ design the layout; that is what makes the document look designed.
211
+ - **Don't** link remote assets or add `<script>` that fetches anything.
212
+ - **Don't** build a `package.json` / `node_modules` under `workspace/` or modify
213
+ the protected agent-root dependencies. `playwright-core` installs in
214
+ `/tmp/typeclaw-doc-render-runtime`.
319
215
  - **Don't** attach a PDF to a GitHub channel — that adapter rejects attachments.
320
- Link or inline instead.
@@ -100,7 +100,7 @@ export function createExplorerSubagent(): Subagent<ExplorerPayload> {
100
100
  payloadSchema: explorerPayloadSchema,
101
101
  visibility: 'public',
102
102
  rosterDescription:
103
- 'read-only local recon — code, sessions, memory, git, config; returns the paths and excerpts you need without you grepping the tree yourself; fire liberally',
103
+ 'read-only local recon — code, sessions, memory, git, config, mounted data; finds where the evidence lives and returns paths and excerpts. It locates, it does not judge: read the decisive records yourself before concluding',
104
104
  inFlightKey: (payload) => payload?.requestId ?? `anon-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
105
105
  toolResultBudget: {
106
106
  maxTotalBytes: 256_000,
@@ -270,6 +270,10 @@ function isAuthStatusTokenDisplayFlag(arg: string): boolean {
270
270
  return arg.slice(1).split('=', 1)[0]?.includes('t') === true
271
271
  }
272
272
 
273
+ export function hasGhInvocation(command: string): boolean {
274
+ return findGhInvocations(tokenize(command)).length > 0
275
+ }
276
+
273
277
  export function canInjectPatIntoPassThroughGh(command: string): boolean {
274
278
  if (containsReviewGraphqlMutation(command)) return false
275
279
  if (hasUnsafeGhStageBackslash(command)) return false
@@ -24,6 +24,7 @@ export type DetectedReview = {
24
24
  prNumber: number
25
25
  verdict: ReviewVerdict
26
26
  source: 'api' | 'pr-review'
27
+ reviewedHeadSha?: string
27
28
  }
28
29
 
29
30
  export type GhReviewDetectInput = {
@@ -246,25 +247,18 @@ function detectApiReview(args: readonly string[], fileContents: string | null):
246
247
  const prNumber = Number(m[3])
247
248
  if (!Number.isSafeInteger(prNumber)) return null
248
249
 
249
- const verdict = verdictFromInlineFields(args) ?? verdictFromFile(fileContents)
250
+ const verdict = verdictFromInlineFields(args) ?? normalizeVerdict(stringFieldFromFile(fileContents, 'event') ?? '')
250
251
  if (verdict === null) return null
251
- return { workspace, prNumber, verdict, source: 'api' }
252
+ const reviewedHeadSha = commitIdFromInlineFields(args) ?? stringFieldFromFile(fileContents, 'commit_id')
253
+ return { workspace, prNumber, verdict, source: 'api', ...(reviewedHeadSha !== null ? { reviewedHeadSha } : {}) }
252
254
  }
253
255
 
254
256
  // Inline `-f event=APPROVE` / `--field event=REQUEST_CHANGES` (and `-F` raw).
255
257
  // gh accepts both `flag value` and `flag=value` shapes; cover both.
256
258
  function verdictFromInlineFields(args: readonly string[]): ReviewVerdict | null {
257
- for (let i = 0; i < args.length; i++) {
258
- const a = args[i]
259
- if (a === undefined) continue
260
- if (a === '-f' || a === '-F' || a === '--field' || a === '--raw-field') {
261
- const v = parseEventAssignment(args[i + 1])
262
- if (v !== null) return v
263
- }
264
- if (a.startsWith('-f=') || a.startsWith('-F=') || a.startsWith('--field=') || a.startsWith('--raw-field=')) {
265
- const v = parseEventAssignment(a.slice(a.indexOf('=') + 1))
266
- if (v !== null) return v
267
- }
259
+ for (const assignment of inlineFieldAssignments(args)) {
260
+ const verdict = parseEventAssignment(assignment)
261
+ if (verdict !== null) return verdict
268
262
  }
269
263
  return null
270
264
  }
@@ -277,13 +271,43 @@ function parseEventAssignment(token: string | undefined): ReviewVerdict | null {
277
271
  return normalizeVerdict(token.slice(eq + 1))
278
272
  }
279
273
 
280
- function verdictFromFile(contents: string | null): ReviewVerdict | null {
274
+ function commitIdFromInlineFields(args: readonly string[]): string | null {
275
+ for (const assignment of inlineFieldAssignments(args)) {
276
+ const separator = assignment.indexOf('=')
277
+ if (separator !== -1 && assignment.slice(0, separator).trim().toLowerCase() === 'commit_id') {
278
+ return assignment.slice(separator + 1)
279
+ }
280
+ }
281
+ return null
282
+ }
283
+
284
+ function inlineFieldAssignments(args: readonly string[]): string[] {
285
+ const assignments: string[] = []
286
+ for (let i = 0; i < args.length; i++) {
287
+ const arg = args[i]
288
+ if (arg === undefined) continue
289
+ if (arg === '-f' || arg === '-F' || arg === '--field' || arg === '--raw-field') {
290
+ const assignment = args[++i]
291
+ if (assignment !== undefined) assignments.push(assignment)
292
+ } else if (
293
+ arg.startsWith('-f=') ||
294
+ arg.startsWith('-F=') ||
295
+ arg.startsWith('--field=') ||
296
+ arg.startsWith('--raw-field=')
297
+ ) {
298
+ assignments.push(arg.slice(arg.indexOf('=') + 1))
299
+ }
300
+ }
301
+ return assignments
302
+ }
303
+
304
+ function stringFieldFromFile(contents: string | null, field: string): string | null {
281
305
  if (contents === null || contents === '') return null
282
306
  try {
283
307
  const parsed = JSON.parse(contents) as unknown
284
308
  if (typeof parsed !== 'object' || parsed === null) return null
285
- const event = (parsed as Record<string, unknown>).event
286
- return typeof event === 'string' ? normalizeVerdict(event) : null
309
+ const value = (parsed as Record<string, unknown>)[field]
310
+ return typeof value === 'string' ? value : null
287
311
  } catch {
288
312
  return null
289
313
  }