typeclaw 0.49.0 → 0.50.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 (442) 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/compaction.d.ts +8 -0
  4. package/dist/types/agent/git-nudge.d.ts +6 -0
  5. package/dist/types/agent/guard-types.d.ts +25 -0
  6. package/dist/types/agent/guards.d.ts +7 -0
  7. package/dist/types/agent/idle-compaction.d.ts +7 -0
  8. package/dist/types/agent/index.d.ts +163 -0
  9. package/dist/types/agent/live-subagents.d.ts +113 -0
  10. package/dist/types/agent/llm-replay-sanitizer.d.ts +11 -0
  11. package/dist/types/agent/loop-guard.d.ts +67 -0
  12. package/dist/types/agent/model-fallback.d.ts +29 -0
  13. package/dist/types/agent/model-overrides.d.ts +8 -0
  14. package/dist/types/agent/multimodal/index.d.ts +2 -0
  15. package/dist/types/agent/multimodal/look-at.d.ts +60 -0
  16. package/dist/types/agent/multimodal/looker.d.ts +61 -0
  17. package/dist/types/agent/multimodal/read-redirect.d.ts +6 -0
  18. package/dist/types/agent/network/response-body.d.ts +1 -0
  19. package/dist/types/agent/network/safe-http.d.ts +46 -0
  20. package/dist/types/agent/plugin-tools.d.ts +129 -0
  21. package/dist/types/agent/proactive-next-step-nudge.d.ts +2 -0
  22. package/dist/types/agent/prompt-cache-key.d.ts +3 -0
  23. package/dist/types/agent/provider-error.d.ts +23 -0
  24. package/dist/types/agent/reload-tool.d.ts +10 -0
  25. package/dist/types/agent/restart/index.d.ts +31 -0
  26. package/dist/types/agent/restart-handoff/index.d.ts +32 -0
  27. package/dist/types/agent/restart-handoff/paths.d.ts +1 -0
  28. package/dist/types/agent/retry-same-ref.d.ts +41 -0
  29. package/dist/types/agent/reviewer-activity.d.ts +3 -0
  30. package/dist/types/agent/reviewer-bash-policy.d.ts +8 -0
  31. package/dist/types/agent/self.d.ts +1 -0
  32. package/dist/types/agent/session-meta.d.ts +28 -0
  33. package/dist/types/agent/session-origin.d.ts +65 -0
  34. package/dist/types/agent/subagent-cache-keepalive.d.ts +38 -0
  35. package/dist/types/agent/subagent-completion-reminder.d.ts +29 -0
  36. package/dist/types/agent/subagent-drain.d.ts +25 -0
  37. package/dist/types/agent/subagent-session.d.ts +3 -0
  38. package/dist/types/agent/subagents.d.ts +153 -0
  39. package/dist/types/agent/system-prompt.d.ts +7 -0
  40. package/dist/types/agent/throttle-circuit.d.ts +25 -0
  41. package/dist/types/agent/todo/continuation-policy.d.ts +54 -0
  42. package/dist/types/agent/todo/continuation-state.d.ts +11 -0
  43. package/dist/types/agent/todo/continuation-wiring.d.ts +32 -0
  44. package/dist/types/agent/todo/continuation.d.ts +21 -0
  45. package/dist/types/agent/todo/scope.d.ts +6 -0
  46. package/dist/types/agent/todo/store.d.ts +16 -0
  47. package/dist/types/agent/tool-error-remediation.d.ts +1 -0
  48. package/dist/types/agent/tool-file-safety.d.ts +78 -0
  49. package/dist/types/agent/tool-not-found-nudge.d.ts +9 -0
  50. package/dist/types/agent/tool-result-budget.d.ts +15 -0
  51. package/dist/types/agent/tools/channel-disengage.d.ts +18 -0
  52. package/dist/types/agent/tools/channel-edit.d.ts +19 -0
  53. package/dist/types/agent/tools/channel-fetch-attachment.d.ts +36 -0
  54. package/dist/types/agent/tools/channel-handoff.d.ts +13 -0
  55. package/dist/types/agent/tools/channel-history-render.d.ts +3 -0
  56. package/dist/types/agent/tools/channel-history.d.ts +25 -0
  57. package/dist/types/agent/tools/channel-log.d.ts +5 -0
  58. package/dist/types/agent/tools/channel-react.d.ts +23 -0
  59. package/dist/types/agent/tools/channel-read.d.ts +27 -0
  60. package/dist/types/agent/tools/channel-reply.d.ts +47 -0
  61. package/dist/types/agent/tools/channel-send.d.ts +42 -0
  62. package/dist/types/agent/tools/channel-session-search.d.ts +10 -0
  63. package/dist/types/agent/tools/curl-impersonate.d.ts +37 -0
  64. package/dist/types/agent/tools/ddg.d.ts +18 -0
  65. package/dist/types/agent/tools/grant-role.d.ts +25 -0
  66. package/dist/types/agent/tools/keyed-semaphore.d.ts +10 -0
  67. package/dist/types/agent/tools/post-github-review.d.ts +38 -0
  68. package/dist/types/agent/tools/restart.d.ts +25 -0
  69. package/dist/types/agent/tools/runtime-notice.d.ts +3 -0
  70. package/dist/types/agent/tools/search-retry.d.ts +16 -0
  71. package/dist/types/agent/tools/skip-response.d.ts +17 -0
  72. package/dist/types/agent/tools/spawn-subagent.d.ts +77 -0
  73. package/dist/types/agent/tools/stream-snapshot.d.ts +23 -0
  74. package/dist/types/agent/tools/subagent-access.d.ts +20 -0
  75. package/dist/types/agent/tools/subagent-cancel.d.ts +23 -0
  76. package/dist/types/agent/tools/subagent-output.d.ts +50 -0
  77. package/dist/types/agent/tools/todo/index.d.ts +14 -0
  78. package/dist/types/agent/tools/webfetch/adaptive-html.d.ts +29 -0
  79. package/dist/types/agent/tools/webfetch/fetch.d.ts +26 -0
  80. package/dist/types/agent/tools/webfetch/html-lexical.d.ts +27 -0
  81. package/dist/types/agent/tools/webfetch/index.d.ts +1 -0
  82. package/dist/types/agent/tools/webfetch/inline-style-visibility.d.ts +3 -0
  83. package/dist/types/agent/tools/webfetch/strategies/grep.d.ts +11 -0
  84. package/dist/types/agent/tools/webfetch/strategies/jq.d.ts +4 -0
  85. package/dist/types/agent/tools/webfetch/strategies/raw.d.ts +1 -0
  86. package/dist/types/agent/tools/webfetch/strategies/readability.d.ts +16 -0
  87. package/dist/types/agent/tools/webfetch/strategies/selector.d.ts +4 -0
  88. package/dist/types/agent/tools/webfetch/strategies/snapshot.d.ts +1 -0
  89. package/dist/types/agent/tools/webfetch/tool.d.ts +15 -0
  90. package/dist/types/agent/tools/webfetch/types.d.ts +32 -0
  91. package/dist/types/agent/tools/websearch.d.ts +17 -0
  92. package/dist/types/agent/tools/wikipedia.d.ts +7 -0
  93. package/dist/types/agent/tools-without-local-file-operands.d.ts +1 -0
  94. package/dist/types/agent/turn-runner.d.ts +36 -0
  95. package/dist/types/agent-messenger/config-dir.d.ts +19 -0
  96. package/dist/types/browser/dockerfile.d.ts +2 -0
  97. package/dist/types/browser/registry.d.ts +49 -0
  98. package/dist/types/bundled-plugins/bun-hygiene/policy.d.ts +18 -0
  99. package/dist/types/bundled-plugins/github-cli-auth/git-askpass.d.ts +5 -0
  100. package/dist/types/bundled-plugins/guard/keys.d.ts +6 -0
  101. package/dist/types/bundled-plugins/guard/policies/managed-config.d.ts +7 -0
  102. package/dist/types/bundled-plugins/guard/policies/memory-topics-delete.d.ts +11 -0
  103. package/dist/types/bundled-plugins/guard/policies/memory-topics-write.d.ts +7 -0
  104. package/dist/types/bundled-plugins/guard/policies/non-workspace-write.d.ts +9 -0
  105. package/dist/types/bundled-plugins/guard/policies/skill-authoring.d.ts +20 -0
  106. package/dist/types/bundled-plugins/guard/policies/uncommitted-changes.d.ts +12 -0
  107. package/dist/types/bundled-plugins/guard/policy.d.ts +11 -0
  108. package/dist/types/bundled-plugins/memory/secret-detector.d.ts +11 -0
  109. package/dist/types/bundled-plugins/memory/slug.d.ts +4 -0
  110. package/dist/types/bundled-plugins/security/permissions.d.ts +20 -0
  111. package/dist/types/bundled-plugins/security/policies/private-surface-read.d.ts +34 -0
  112. package/dist/types/bundled-plugins/security/policies/ssrf.d.ts +18 -0
  113. package/dist/types/bundled-plugins/security/policy.d.ts +4 -0
  114. package/dist/types/channels/adapter-namespace.d.ts +2 -0
  115. package/dist/types/channels/adapters/mention-hints.d.ts +12 -0
  116. package/dist/types/channels/adapters/webex-id-ref.d.ts +5 -0
  117. package/dist/types/channels/background-handoff.d.ts +56 -0
  118. package/dist/types/channels/background-obligations.d.ts +135 -0
  119. package/dist/types/channels/catch-up.d.ts +26 -0
  120. package/dist/types/channels/commands.d.ts +2 -0
  121. package/dist/types/channels/completion-claim.d.ts +20 -0
  122. package/dist/types/channels/continuation-willingness.d.ts +1 -0
  123. package/dist/types/channels/continuity-types.d.ts +75 -0
  124. package/dist/types/channels/describe-error.d.ts +1 -0
  125. package/dist/types/channels/engagement.d.ts +34 -0
  126. package/dist/types/channels/github-false-receipt.d.ts +20 -0
  127. package/dist/types/channels/github-repo.d.ts +2 -0
  128. package/dist/types/channels/github-rereview-guard.d.ts +24 -0
  129. package/dist/types/channels/github-review-check.d.ts +135 -0
  130. package/dist/types/channels/github-review-claim.d.ts +3 -0
  131. package/dist/types/channels/github-review-turn-ledger.d.ts +71 -0
  132. package/dist/types/channels/github-review-verdict-coordinator.d.ts +117 -0
  133. package/dist/types/channels/github-token-bridge.d.ts +20 -0
  134. package/dist/types/channels/github-verdict-activity.d.ts +12 -0
  135. package/dist/types/channels/inbound-journal.d.ts +272 -0
  136. package/dist/types/channels/last-alive.d.ts +3 -0
  137. package/dist/types/channels/membership-cache.d.ts +27 -0
  138. package/dist/types/channels/membership.d.ts +21 -0
  139. package/dist/types/channels/outbound-flood-filter.d.ts +7 -0
  140. package/dist/types/channels/participants.d.ts +4 -0
  141. package/dist/types/channels/persistence.d.ts +32 -0
  142. package/dist/types/channels/recovery-notice.d.ts +26 -0
  143. package/dist/types/channels/recovery-outbox.d.ts +58 -0
  144. package/dist/types/channels/router.d.ts +798 -0
  145. package/dist/types/channels/schema.d.ts +501 -0
  146. package/dist/types/channels/session-handoff.d.ts +58 -0
  147. package/dist/types/channels/session-search.d.ts +29 -0
  148. package/dist/types/channels/types.d.ts +414 -0
  149. package/dist/types/channels/waiting-reactions.d.ts +25 -0
  150. package/dist/types/cli/builtins.d.ts +2 -0
  151. package/dist/types/cli/command-meta.d.ts +9 -0
  152. package/dist/types/coding-agent/broker-body.d.ts +7 -0
  153. package/dist/types/coding-agent/broker.d.ts +22 -0
  154. package/dist/types/coding-agent/claude.d.ts +22 -0
  155. package/dist/types/coding-agent/codex.d.ts +19 -0
  156. package/dist/types/coding-agent/index.d.ts +71 -0
  157. package/dist/types/coding-agent/omo-state.d.ts +2 -0
  158. package/dist/types/coding-agent/omo-stream.d.ts +22 -0
  159. package/dist/types/coding-agent/omo.d.ts +133 -0
  160. package/dist/types/coding-agent/runner.d.ts +35 -0
  161. package/dist/types/coding-agent/tool.d.ts +27 -0
  162. package/dist/types/coding-agent/worktree.d.ts +22 -0
  163. package/dist/types/commands/index.d.ts +45 -0
  164. package/dist/types/config/config.d.ts +814 -0
  165. package/dist/types/config/index.d.ts +3 -0
  166. package/dist/types/config/model-overrides.d.ts +3 -0
  167. package/dist/types/config/providers.d.ts +1456 -0
  168. package/dist/types/config/reloadable.d.ts +9 -0
  169. package/dist/types/container/agent-operation-lock.d.ts +31 -0
  170. package/dist/types/container/build-cache.d.ts +39 -0
  171. package/dist/types/container/compose-project.d.ts +1 -0
  172. package/dist/types/container/controller.d.ts +25 -0
  173. package/dist/types/container/docker-app.d.ts +23 -0
  174. package/dist/types/container/exit-reason.d.ts +10 -0
  175. package/dist/types/container/index.d.ts +14 -0
  176. package/dist/types/container/log-archive.d.ts +68 -0
  177. package/dist/types/container/log-colors.d.ts +3 -0
  178. package/dist/types/container/log-timestamps.d.ts +9 -0
  179. package/dist/types/container/logs.d.ts +37 -0
  180. package/dist/types/container/memory-limit.d.ts +13 -0
  181. package/dist/types/container/memory-oversubscription.d.ts +20 -0
  182. package/dist/types/container/oom-events.d.ts +18 -0
  183. package/dist/types/container/port.d.ts +18 -0
  184. package/dist/types/container/require-running.d.ts +16 -0
  185. package/dist/types/container/restart.d.ts +32 -0
  186. package/dist/types/container/shared.d.ts +93 -0
  187. package/dist/types/container/shell.d.ts +35 -0
  188. package/dist/types/container/start.d.ts +144 -0
  189. package/dist/types/container/stats.d.ts +31 -0
  190. package/dist/types/container/status.d.ts +25 -0
  191. package/dist/types/container/stop.d.ts +24 -0
  192. package/dist/types/container/tool-oom-priority.d.ts +4 -0
  193. package/dist/types/container/verify-running.d.ts +49 -0
  194. package/dist/types/cron/consumer.d.ts +42 -0
  195. package/dist/types/cron/count-state.d.ts +24 -0
  196. package/dist/types/cron/index.d.ts +21 -0
  197. package/dist/types/cron/list.d.ts +33 -0
  198. package/dist/types/cron/reloadable.d.ts +11 -0
  199. package/dist/types/cron/scheduler.d.ts +51 -0
  200. package/dist/types/cron/schema.d.ts +108 -0
  201. package/dist/types/dependencies/bin-resolver.d.ts +28 -0
  202. package/dist/types/dependencies/bins.d.ts +22 -0
  203. package/dist/types/dependencies/index.d.ts +2 -0
  204. package/dist/types/git/bound-gc-config.d.ts +4 -0
  205. package/dist/types/git/hookless.d.ts +1 -0
  206. package/dist/types/git/reconcile-ignored.d.ts +13 -0
  207. package/dist/types/git/resolve-agent-git.d.ts +8 -0
  208. package/dist/types/git/resolve-identity.d.ts +10 -0
  209. package/dist/types/git/run.d.ts +24 -0
  210. package/dist/types/git/system-commit.d.ts +2 -0
  211. package/dist/types/hostd/client.d.ts +13 -0
  212. package/dist/types/hostd/models.d.ts +1 -0
  213. package/dist/types/hostd/paths.d.ts +17 -0
  214. package/dist/types/hostd/protocol.d.ts +93 -0
  215. package/dist/types/hostd/spawn.d.ts +17 -0
  216. package/dist/types/hostd/version.d.ts +18 -0
  217. package/dist/types/init/auto-upgrade.d.ts +41 -0
  218. package/dist/types/init/cli-version.d.ts +7 -0
  219. package/dist/types/init/dockerfile.d.ts +34 -0
  220. package/dist/types/init/ensure-deps.d.ts +17 -0
  221. package/dist/types/init/env-file.d.ts +3 -0
  222. package/dist/types/init/gitignore.d.ts +5 -0
  223. package/dist/types/init/local-source-stamp.d.ts +3 -0
  224. package/dist/types/init/packagejson.d.ts +7 -0
  225. package/dist/types/init/paths.d.ts +3 -0
  226. package/dist/types/init/reconcile-plugin-deps.d.ts +13 -0
  227. package/dist/types/init/run-bun-install.d.ts +16 -0
  228. package/dist/types/init/windows-dev-link.d.ts +8 -0
  229. package/dist/types/mcp/catalog.d.ts +7 -0
  230. package/dist/types/mcp/client.d.ts +58 -0
  231. package/dist/types/mcp/manager.d.ts +56 -0
  232. package/dist/types/mcp/tools.d.ts +23 -0
  233. package/dist/types/models/embedding-model.d.ts +20 -0
  234. package/dist/types/models/transformers-version.d.ts +1 -0
  235. package/dist/types/network/internal-destinations.d.ts +29 -0
  236. package/dist/types/operations/classify-tool-outcome.d.ts +35 -0
  237. package/dist/types/operations/incidents.d.ts +47 -0
  238. package/dist/types/operations/index.d.ts +3 -0
  239. package/dist/types/operations/remediations.d.ts +25 -0
  240. package/dist/types/path-safety/real-intended-path.d.ts +9 -0
  241. package/dist/types/permissions/builtins.d.ts +25 -0
  242. package/dist/types/permissions/grant.d.ts +19 -0
  243. package/dist/types/permissions/index.d.ts +6 -0
  244. package/dist/types/permissions/match-rule.d.ts +28 -0
  245. package/dist/types/permissions/permissions.d.ts +42 -0
  246. package/dist/types/permissions/resolve.d.ts +25 -0
  247. package/dist/types/permissions/schema.d.ts +14 -0
  248. package/dist/types/plugin/context.d.ts +20 -0
  249. package/dist/types/plugin/core-tool-names.d.ts +4 -0
  250. package/dist/types/plugin/define.d.ts +46 -0
  251. package/dist/types/plugin/hooks.d.ts +52 -0
  252. package/dist/types/plugin/index.d.ts +11 -0
  253. package/dist/types/plugin/load-skill.d.ts +14 -0
  254. package/dist/types/plugin/loader.d.ts +25 -0
  255. package/dist/types/plugin/manager.d.ts +42 -0
  256. package/dist/types/plugin/registry.d.ts +73 -0
  257. package/dist/types/plugin/skills.d.ts +11 -0
  258. package/dist/types/plugin/types.d.ts +336 -0
  259. package/dist/types/plugin/zod-introspect.d.ts +11 -0
  260. package/dist/types/reload/client.d.ts +11 -0
  261. package/dist/types/reload/docker-exec-client.d.ts +11 -0
  262. package/dist/types/reload/format.d.ts +2 -0
  263. package/dist/types/reload/index.d.ts +6 -0
  264. package/dist/types/reload/recover.d.ts +22 -0
  265. package/dist/types/reload/registry.d.ts +10 -0
  266. package/dist/types/reload/types.d.ts +25 -0
  267. package/dist/types/role-claim/client.d.ts +20 -0
  268. package/dist/types/role-claim/code.d.ts +4 -0
  269. package/dist/types/role-claim/controller.d.ts +59 -0
  270. package/dist/types/role-claim/index.d.ts +6 -0
  271. package/dist/types/role-claim/match-rule.d.ts +9 -0
  272. package/dist/types/role-claim/pending.d.ts +35 -0
  273. package/dist/types/role-claim/reload-after-claim.d.ts +16 -0
  274. package/dist/types/run/llm-fetch-observer.d.ts +50 -0
  275. package/dist/types/sandbox/availability.d.ts +21 -0
  276. package/dist/types/sandbox/build.d.ts +7 -0
  277. package/dist/types/sandbox/canonical-secrets.d.ts +8 -0
  278. package/dist/types/sandbox/coding-agent.d.ts +20 -0
  279. package/dist/types/sandbox/dependency-bins.d.ts +19 -0
  280. package/dist/types/sandbox/dev-source.d.ts +4 -0
  281. package/dist/types/sandbox/env-exposure.d.ts +1 -0
  282. package/dist/types/sandbox/errors.d.ts +20 -0
  283. package/dist/types/sandbox/hidden-paths.d.ts +11 -0
  284. package/dist/types/sandbox/index.d.ts +14 -0
  285. package/dist/types/sandbox/package-install.d.ts +1 -0
  286. package/dist/types/sandbox/policy.d.ts +71 -0
  287. package/dist/types/sandbox/privileged-runtime.d.ts +13 -0
  288. package/dist/types/sandbox/quote.d.ts +2 -0
  289. package/dist/types/sandbox/runtime-private.d.ts +1 -0
  290. package/dist/types/sandbox/session-tmp.d.ts +6 -0
  291. package/dist/types/sandbox/symlinks.d.ts +6 -0
  292. package/dist/types/sandbox/writable-zones.d.ts +15 -0
  293. package/dist/types/secrets/coding-agent-auth.d.ts +25 -0
  294. package/dist/types/secrets/defaults.d.ts +21 -0
  295. package/dist/types/secrets/export-github-cli-store.d.ts +22 -0
  296. package/dist/types/secrets/hydrate.d.ts +7 -0
  297. package/dist/types/secrets/index.d.ts +7 -0
  298. package/dist/types/secrets/provision-github-cli-store.d.ts +45 -0
  299. package/dist/types/secrets/refresh-provider-oauth.d.ts +22 -0
  300. package/dist/types/secrets/resolve.d.ts +14 -0
  301. package/dist/types/secrets/schema.d.ts +840 -0
  302. package/dist/types/secrets/storage.d.ts +56 -0
  303. package/dist/types/shared/host-locale.d.ts +1 -0
  304. package/dist/types/shared/index.d.ts +5 -0
  305. package/dist/types/shared/local-time.d.ts +4 -0
  306. package/dist/types/shared/platform.d.ts +2 -0
  307. package/dist/types/shared/protocol.d.ts +424 -0
  308. package/dist/types/shared/style-text.d.ts +3 -0
  309. package/dist/types/shared/wsl.d.ts +17 -0
  310. package/dist/types/stream/broker.d.ts +2 -0
  311. package/dist/types/stream/index.d.ts +2 -0
  312. package/dist/types/stream/types.d.ts +71 -0
  313. package/package.json +9 -2
  314. package/scripts/build-plugin-types.ts +105 -0
  315. package/scripts/check-plugin-sdk.ts +111 -0
  316. package/scripts/require-parallel.ts +5 -32
  317. package/src/agent/guard-types.ts +3 -0
  318. package/src/agent/guards.ts +4 -0
  319. package/src/agent/idle-compaction.ts +174 -0
  320. package/src/agent/index.ts +74 -16
  321. package/src/agent/live-subagents.ts +19 -0
  322. package/src/agent/multimodal/look-at.ts +22 -9
  323. package/src/agent/plugin-tools.ts +13 -1
  324. package/src/agent/reviewer-bash-policy.ts +41 -1
  325. package/src/agent/session-origin.ts +26 -10
  326. package/src/agent/subagent-cache-keepalive.ts +198 -0
  327. package/src/agent/subagent-session.ts +6 -0
  328. package/src/agent/subagents.ts +46 -8
  329. package/src/agent/system-prompt.ts +1 -1
  330. package/src/agent/tool-file-safety.ts +6 -1
  331. package/src/agent/tools/channel-edit.ts +20 -10
  332. package/src/agent/tools/channel-fetch-attachment.ts +12 -5
  333. package/src/agent/tools/channel-handoff.ts +72 -0
  334. package/src/agent/tools/channel-read.ts +57 -10
  335. package/src/agent/tools/channel-reply.ts +33 -26
  336. package/src/agent/tools/channel-send.ts +21 -13
  337. package/src/agent/tools/channel-session-search.ts +35 -0
  338. package/src/agent/tools/curl-impersonate.ts +11 -4
  339. package/src/agent/tools/ddg.ts +13 -5
  340. package/src/agent/tools/spawn-subagent.ts +27 -11
  341. package/src/agent/tools/stream-snapshot.ts +15 -2
  342. package/src/agent/tools/subagent-access.ts +11 -4
  343. package/src/browser/bsk-shim.mjs +74 -0
  344. package/src/browser/dockerfile.ts +84 -0
  345. package/src/browser/egress.ts +104 -0
  346. package/src/browser/managed-browser.ts +205 -0
  347. package/src/browser/registry.ts +110 -0
  348. package/src/browser/relay.ts +231 -0
  349. package/src/browser/sandbox-entry.ts +167 -0
  350. package/src/bundled-plugins/agent-browser/index.ts +2 -0
  351. package/src/bundled-plugins/browser-agent/browser-agent.ts +89 -0
  352. package/src/bundled-plugins/browser-agent/index.ts +12 -0
  353. package/src/bundled-plugins/doc-render/index.ts +0 -10
  354. package/src/bundled-plugins/doc-render/render.ts +83 -111
  355. package/src/bundled-plugins/doc-render/skills/typeclaw-render-pdf/SKILL.md +152 -257
  356. package/src/bundled-plugins/github-cli-auth/gh-command.ts +4 -0
  357. package/src/bundled-plugins/github-cli-auth/git-auth-diagnostic.ts +95 -0
  358. package/src/bundled-plugins/github-cli-auth/index.ts +75 -59
  359. package/src/bundled-plugins/managed-browser/index.ts +74 -0
  360. package/src/bundled-plugins/managed-browser/skills/browser-use/browser-use/SKILL.md +27 -0
  361. package/src/bundled-plugins/managed-browser/skills/browserskill/browserskill/SKILL.md +28 -0
  362. package/src/bundled-plugins/managed-browser/skills/omowright/omowright/SKILL.md +40 -0
  363. package/src/bundled-plugins/operator/operator.ts +1 -1
  364. package/src/bundled-plugins/qa/index.ts +11 -0
  365. package/src/bundled-plugins/qa/qa.ts +160 -0
  366. package/src/bundled-plugins/qa/skills/qa-cli.ts +50 -0
  367. package/src/bundled-plugins/qa/skills/qa-general.ts +30 -0
  368. package/src/bundled-plugins/qa/skills/qa-http.ts +39 -0
  369. package/src/bundled-plugins/qa/skills/qa-pr.ts +51 -0
  370. package/src/bundled-plugins/qa/skills/qa-web.ts +49 -0
  371. package/src/bundled-plugins/security/index.ts +53 -34
  372. package/src/bundled-plugins/security/policies/outbound-secret-scan.ts +1 -0
  373. package/src/channels/adapter-namespace.ts +13 -0
  374. package/src/channels/adapters/discord-bot.ts +97 -5
  375. package/src/channels/adapters/github/index.ts +16 -0
  376. package/src/channels/adapters/github/last-alive.ts +4 -16
  377. package/src/channels/adapters/slack-attachment-download.ts +14 -3
  378. package/src/channels/adapters/slack-bot-author-resolver.ts +4 -3
  379. package/src/channels/adapters/slack-bot-channel-resolver.ts +9 -6
  380. package/src/channels/adapters/slack-bot-classify.ts +1 -0
  381. package/src/channels/adapters/slack-bot-slash-commands.ts +3 -1
  382. package/src/channels/adapters/slack-bot.ts +299 -67
  383. package/src/channels/adapters/slack-classify.ts +1 -0
  384. package/src/channels/catch-up.ts +137 -0
  385. package/src/channels/continuation-willingness.ts +2 -2
  386. package/src/channels/continuity-types.ts +1 -0
  387. package/src/channels/engagement.ts +17 -1
  388. package/src/channels/github-false-receipt.ts +3 -3
  389. package/src/channels/github-rereview-guard.ts +9 -5
  390. package/src/channels/github-token-bridge.ts +24 -0
  391. package/src/channels/last-alive.ts +34 -0
  392. package/src/channels/manager.ts +8 -1
  393. package/src/channels/router.ts +427 -136
  394. package/src/channels/session-handoff.fixture.ts +144 -0
  395. package/src/channels/session-handoff.ts +175 -0
  396. package/src/channels/session-search.ts +71 -0
  397. package/src/channels/types.ts +12 -2
  398. package/src/cli/channel.ts +2 -3
  399. package/src/cli/init.ts +2 -3
  400. package/src/cli/model.ts +132 -3
  401. package/src/coding-agent/index.ts +7 -1
  402. package/src/coding-agent/omo-stream.ts +40 -0
  403. package/src/coding-agent/runner.ts +30 -8
  404. package/src/config/config.ts +111 -22
  405. package/src/config/model-overrides.ts +59 -0
  406. package/src/config/models-mutation.ts +185 -2
  407. package/src/config/providers-mutation.ts +12 -4
  408. package/src/config/providers.ts +59 -0
  409. package/src/container/start.ts +95 -4
  410. package/src/doctor/checks.ts +8 -6
  411. package/src/hostd/daemon.ts +13 -1
  412. package/src/init/auto-upgrade.ts +7 -1
  413. package/src/init/dockerfile.ts +57 -12
  414. package/src/init/index.ts +4 -3
  415. package/src/init/local-source-stamp.ts +68 -0
  416. package/src/init/models-dev.ts +4 -0
  417. package/src/init/validate-api-key.ts +3 -0
  418. package/src/permissions/builtins.ts +7 -0
  419. package/src/permissions/permissions.ts +18 -9
  420. package/src/permissions/resolve.ts +7 -1
  421. package/src/plugin/context.ts +2 -0
  422. package/src/plugin/hooks.ts +137 -0
  423. package/src/plugin/index.ts +6 -0
  424. package/src/plugin/manager.ts +4 -0
  425. package/src/plugin/types.ts +60 -0
  426. package/src/run/bundled-plugins.ts +6 -0
  427. package/src/run/index.ts +24 -14
  428. package/src/run/llm-fetch-observer.ts +12 -15
  429. package/src/sandbox/canonical-secrets.ts +4 -0
  430. package/src/sandbox/dev-source.ts +26 -0
  431. package/src/sandbox/hidden-paths.ts +16 -2
  432. package/src/secrets/storage.ts +13 -0
  433. package/src/skills/typeclaw-channel-github/SKILL.md +8 -8
  434. package/src/skills/typeclaw-config/SKILL.md +39 -5
  435. package/src/skills/typeclaw-config/references/dockerfile.md +2 -2
  436. package/src/skills/typeclaw-github-contributing/SKILL.md +1 -1
  437. package/src/skills/typeclaw-monorepo/SKILL.md +1 -1
  438. package/src/skills/typeclaw-permissions/SKILL.md +7 -7
  439. package/src/skills/typeclaw-troubleshooting/SKILL.md +12 -1
  440. package/typeclaw.schema.json +436 -5
  441. package/src/bundled-plugins/doc-render/templates/lib.typ +0 -339
  442. package/src/bundled-plugins/github-cli-auth/gh-store.ts +0 -733
@@ -0,0 +1,56 @@
1
+ import type { AuthOperationOptions, Credential, CredentialInfo, CredentialStore } from '@earendil-works/pi-ai';
2
+ import { type Channels, type GithubCliSecrets, type McpCredential, type McpSlice, type ProviderCredential, type Providers } from "./schema.js";
3
+ export declare const ASYNC_LOCK_OPTIONS: {
4
+ readonly retries: {
5
+ readonly retries: 10;
6
+ readonly factor: 2;
7
+ readonly minTimeout: 100;
8
+ readonly maxTimeout: 10000;
9
+ readonly randomize: true;
10
+ };
11
+ readonly stale: 30000;
12
+ readonly realpath: false;
13
+ };
14
+ type AsyncLockOptions = Omit<typeof ASYNC_LOCK_OPTIONS, 'stale'> & {
15
+ stale: number;
16
+ };
17
+ export declare class SecretsBackend implements CredentialStore {
18
+ private readonly secretsPath;
19
+ private readonly lockOptions;
20
+ constructor(secretsPath: string, lockOptions?: AsyncLockOptions);
21
+ read(providerId: string, options?: AuthOperationOptions): Promise<Credential | undefined>;
22
+ list(options?: AuthOperationOptions): Promise<readonly CredentialInfo[]>;
23
+ modify(providerId: string, fn: (current: Credential | undefined) => Promise<Credential | undefined>, options?: AuthOperationOptions): Promise<Credential | undefined>;
24
+ delete(providerId: string, options?: AuthOperationOptions): Promise<void>;
25
+ private withProviderLock;
26
+ readChannelsSync(): Channels;
27
+ tryReadChannelsSync(): Channels | null;
28
+ tryReadProviderApiKeySync(providerId: string, env?: NodeJS.ProcessEnv): string | null;
29
+ tryReadProvidersSync(): Providers;
30
+ tryReadMcpSync(): McpSlice;
31
+ tryReadGithubCliSync(): GithubCliSecrets | undefined;
32
+ writeGithubCliSync(githubCli: GithubCliSecrets): void;
33
+ removeGithubCliSync(): void;
34
+ readMcpCredentialSync(serverName: string): McpCredential | undefined;
35
+ writeMcpCredentialSync(serverName: string, credential: McpCredential): void;
36
+ updateMcpAsync<T>(fn: (current: McpSlice) => Promise<{
37
+ result: T;
38
+ next?: McpSlice;
39
+ }>): Promise<T>;
40
+ removeMcpCredentialSync(serverName: string): boolean;
41
+ writeProviderCredentialSync(providerId: string, credential: ProviderCredential): void;
42
+ removeProviderCredentialSync(providerId: string): boolean;
43
+ removeChannelSync(kind: string): boolean;
44
+ writeChannelsSync(next: Channels): void;
45
+ updateChannelsAsync<T>(fn: (current: Record<string, unknown>) => Promise<{
46
+ result: T;
47
+ next?: Record<string, unknown>;
48
+ }>): Promise<T>;
49
+ private ensureParentDir;
50
+ private ensureFileExists;
51
+ private acquireSyncLockWithRetry;
52
+ private readEnvelope;
53
+ private writeEnvelopeAtomic;
54
+ }
55
+ export declare function createSecretsStoreForAgent(secretsPath: string): SecretsBackend;
56
+ export {};
@@ -0,0 +1 @@
1
+ export declare function hostLocaleIsCjk(): boolean;
@@ -0,0 +1,5 @@
1
+ export { type ClaimCompletedPayload, type ClaimErrorPayload, type ClaimRoleChoice, type ClaimStartedPayload, type ClientMessage, type CronListEntryPayload, type CronListRequestId, type CronListResultPayload, type CronListSourcePayload, type DoctorCheckPayload, type DoctorFixPayload, type DoctorRequestId, type InspectClientMessage, type InspectFramePayload, type InspectServerMessage, type LiveSessionOriginPayload, type LiveSessionPayload, type PromptDelivery, type QueueStateItem, type ReloadResultPayload, type ServerMessage, type TunnelLogsClientMessage, type TunnelLogsServerMessage, type TunnelRequestId, type TunnelSnapshot, } from "./protocol.js";
2
+ export { formatLocalDate, formatLocalDateTime, formatLocalWeekday, resolveLocalTimezoneName } from "./local-time.js";
3
+ export { detectWsl, isWindowsDriveMount, type WslInfo, type WslVersion } from "./wsl.js";
4
+ export { isMacOS, isWindows } from "./platform.js";
5
+ export { styled, type StyleFormat } from "./style-text.js";
@@ -0,0 +1,4 @@
1
+ export declare function formatLocalDate(date?: Date): string;
2
+ export declare function formatLocalDateTime(date?: Date): string;
3
+ export declare function resolveLocalTimezoneName(): string;
4
+ export declare function formatLocalWeekday(date?: Date): string;
@@ -0,0 +1,2 @@
1
+ export declare function isWindows(platform?: NodeJS.Platform): boolean;
2
+ export declare function isMacOS(platform?: NodeJS.Platform): boolean;
@@ -0,0 +1,424 @@
1
+ export type ReloadResultPayload = {
2
+ scope: string;
3
+ ok: true;
4
+ summary: string;
5
+ details?: unknown;
6
+ } | {
7
+ scope: string;
8
+ ok: false;
9
+ reason: string;
10
+ };
11
+ export type ReloadCausePayload = {
12
+ kind: 'credential-rotation';
13
+ adapter: string;
14
+ };
15
+ export type PromptDelivery = 'queue' | 'steer' | 'interrupt';
16
+ export type DoctorRequestId = string;
17
+ export type DoctorCheckPayload = {
18
+ id: string;
19
+ pluginName: string;
20
+ checkName: string;
21
+ description: string;
22
+ category: string;
23
+ status: 'ok' | 'warning' | 'error';
24
+ message: string;
25
+ details?: string[];
26
+ fix?: {
27
+ description: string;
28
+ hasApply: boolean;
29
+ };
30
+ };
31
+ export type DoctorFixPayload = {
32
+ ok: true;
33
+ checkId: string;
34
+ summary: string;
35
+ changedPaths: string[];
36
+ } | {
37
+ ok: false;
38
+ checkId: string;
39
+ error: string;
40
+ };
41
+ export type ClaimRoleChoice = 'owner' | 'member' | 'trusted' | (string & {});
42
+ export type TunnelRequestId = string;
43
+ export type TunnelSnapshot = {
44
+ name: string;
45
+ provider: 'external' | 'cloudflare-quick' | 'cloudflare-named';
46
+ for: {
47
+ kind: 'channel';
48
+ name: string;
49
+ } | {
50
+ kind: 'manual';
51
+ };
52
+ url: string | null;
53
+ status: 'stopped' | 'starting' | 'healthy' | 'unhealthy' | 'permanently-failed';
54
+ lastUrlAt: number | null;
55
+ detail: string;
56
+ };
57
+ export type TunnelLogsClientMessage = {
58
+ type: 'subscribe';
59
+ name: string;
60
+ follow: boolean;
61
+ };
62
+ export type TunnelLogsServerMessage = {
63
+ type: 'snapshot';
64
+ lines: string[];
65
+ } | {
66
+ type: 'line';
67
+ line: string;
68
+ } | {
69
+ type: 'error';
70
+ message: string;
71
+ } | {
72
+ type: 'end';
73
+ };
74
+ export type InspectClientMessage = {
75
+ type: 'subscribe';
76
+ sessionId: string;
77
+ sinceMs?: number;
78
+ } | {
79
+ type: 'ping';
80
+ id: number;
81
+ } | {
82
+ type: 'list_live';
83
+ };
84
+ export type LiveSessionOriginPayload = {
85
+ kind: 'tui';
86
+ } | {
87
+ kind: 'cron';
88
+ jobId: string;
89
+ jobKind: 'prompt' | 'exec' | 'subagent' | 'handler';
90
+ } | {
91
+ kind: 'channel';
92
+ adapter: string;
93
+ workspace: string;
94
+ workspaceName?: string;
95
+ chat: string;
96
+ chatName?: string;
97
+ thread: string | null;
98
+ } | {
99
+ kind: 'subagent';
100
+ subagent: string;
101
+ parentSessionId: string;
102
+ } | {
103
+ kind: 'system';
104
+ component: string;
105
+ };
106
+ export type LiveSessionPayload = {
107
+ sessionId: string;
108
+ origin: LiveSessionOriginPayload;
109
+ registeredAtMs: number;
110
+ };
111
+ export type InspectFramePayload = {
112
+ kind: 'text_delta';
113
+ sessionId: string;
114
+ delta: string;
115
+ } | {
116
+ kind: 'thinking_delta';
117
+ sessionId: string;
118
+ delta: string;
119
+ } | {
120
+ kind: 'thinking_end';
121
+ sessionId: string;
122
+ text: string;
123
+ redacted?: boolean;
124
+ } | {
125
+ kind: 'tool_start';
126
+ sessionId: string;
127
+ toolCallId: string;
128
+ name: string;
129
+ args: unknown;
130
+ } | {
131
+ kind: 'tool_end';
132
+ sessionId: string;
133
+ toolCallId: string;
134
+ name: string;
135
+ result: unknown;
136
+ isError: boolean;
137
+ durationMs: number;
138
+ } | {
139
+ kind: 'message_end';
140
+ sessionId: string;
141
+ role: string;
142
+ content: unknown;
143
+ provider?: string;
144
+ model?: string;
145
+ stopReason?: string;
146
+ errorMessage?: string;
147
+ usage?: {
148
+ input: number;
149
+ output: number;
150
+ cacheRead: number;
151
+ cacheWrite: number;
152
+ totalTokens: number;
153
+ cost: number;
154
+ };
155
+ } | {
156
+ kind: 'broadcast';
157
+ payload: unknown;
158
+ meta?: Record<string, string>;
159
+ } | {
160
+ kind: 'cron-fire';
161
+ jobId: string;
162
+ payload: unknown;
163
+ } | {
164
+ kind: 'channel_inbound';
165
+ sessionId?: string;
166
+ adapter: string;
167
+ workspace: string;
168
+ chat: string;
169
+ thread: string | null;
170
+ authorId: string;
171
+ authorName: string;
172
+ authorIsBot: boolean;
173
+ isDm: boolean;
174
+ isBotMention: boolean;
175
+ text: string;
176
+ externalMessageId: string;
177
+ ts: number;
178
+ decision: 'engage' | 'observe' | 'denied' | 'claim';
179
+ };
180
+ export type InspectServerMessage = {
181
+ type: 'subscribed';
182
+ sessionId: string;
183
+ sessionLive: boolean;
184
+ supportsPing?: true;
185
+ } | {
186
+ type: 'frame';
187
+ ts: number;
188
+ payload: InspectFramePayload;
189
+ } | {
190
+ type: 'error';
191
+ message: string;
192
+ } | {
193
+ type: 'pong';
194
+ id: number;
195
+ } | {
196
+ type: 'live_sessions';
197
+ sessions: LiveSessionPayload[];
198
+ };
199
+ export type ClientMessage = {
200
+ type: 'prompt';
201
+ text: string;
202
+ delivery?: PromptDelivery;
203
+ } | {
204
+ type: 'reload';
205
+ scope?: string;
206
+ cause?: ReloadCausePayload;
207
+ } | {
208
+ type: 'restart';
209
+ } | {
210
+ type: 'abort';
211
+ } | {
212
+ type: 'queue_cancel';
213
+ messageId: string;
214
+ } | {
215
+ type: 'doctor';
216
+ requestId: DoctorRequestId;
217
+ } | {
218
+ type: 'doctor_fix';
219
+ requestId: DoctorRequestId;
220
+ checkId: string;
221
+ } | {
222
+ type: 'cron_list';
223
+ requestId: CronListRequestId;
224
+ } | {
225
+ type: 'tunnel_list_request';
226
+ requestId: TunnelRequestId;
227
+ } | {
228
+ type: 'tunnel_status_request';
229
+ requestId: TunnelRequestId;
230
+ name: string;
231
+ } | {
232
+ type: 'claim_start';
233
+ code: string;
234
+ role: ClaimRoleChoice;
235
+ channel?: string;
236
+ ttlMs: number;
237
+ } | {
238
+ type: 'claim_cancel';
239
+ } | {
240
+ type: 'exec_command';
241
+ callId: string;
242
+ name: string;
243
+ args: unknown;
244
+ isolated?: boolean;
245
+ parentOriginJson?: string;
246
+ } | {
247
+ type: 'command_stdin';
248
+ callId: string;
249
+ chunk: string;
250
+ } | {
251
+ type: 'command_stdin_end';
252
+ callId: string;
253
+ } | {
254
+ type: 'command_abort';
255
+ callId: string;
256
+ reason: string;
257
+ };
258
+ export type CronListRequestId = string;
259
+ export type CronListSourcePayload = {
260
+ kind: 'user';
261
+ } | {
262
+ kind: 'plugin';
263
+ pluginName: string;
264
+ localId: string;
265
+ };
266
+ export type CronListEntryPayload = {
267
+ id: string;
268
+ source: CronListSourcePayload;
269
+ kind: 'prompt' | 'exec' | 'handler';
270
+ schedule?: string;
271
+ at?: string;
272
+ until?: string;
273
+ count?: number;
274
+ timezone?: string;
275
+ enabled: boolean;
276
+ scheduledByRole?: string;
277
+ nextFireMs: number | null;
278
+ scheduleError?: string;
279
+ prompt?: string;
280
+ subagent?: string;
281
+ command?: readonly string[];
282
+ };
283
+ export type CronListResultPayload = {
284
+ ok: true;
285
+ jobs: CronListEntryPayload[];
286
+ nowMs: number;
287
+ } | {
288
+ ok: false;
289
+ reason: string;
290
+ };
291
+ export type QueueStateItem = {
292
+ id: string;
293
+ text: string;
294
+ ts: number;
295
+ };
296
+ export type ClaimStartedPayload = {
297
+ code: string;
298
+ role: string;
299
+ channel?: string;
300
+ expiresAt: number;
301
+ };
302
+ export type ClaimCompletedPayload = {
303
+ code: string;
304
+ role: string;
305
+ matchRule: string;
306
+ adapter: string;
307
+ authorId: string;
308
+ };
309
+ export type ClaimErrorPayload = {
310
+ code: string;
311
+ reason: string;
312
+ };
313
+ export type ServerMessage = {
314
+ type: 'connected';
315
+ sessionId: string;
316
+ serverVersion?: string;
317
+ } | {
318
+ type: 'text_delta';
319
+ delta: string;
320
+ ts?: number;
321
+ } | {
322
+ type: 'tool_start';
323
+ toolCallId: string;
324
+ name: string;
325
+ args: unknown;
326
+ ts?: number;
327
+ } | {
328
+ type: 'tool_end';
329
+ toolCallId: string;
330
+ name: string;
331
+ error: boolean;
332
+ result: unknown;
333
+ durationMs: number;
334
+ ts?: number;
335
+ } | {
336
+ type: 'done';
337
+ ts?: number;
338
+ usage?: {
339
+ input: number;
340
+ output: number;
341
+ totalTokens: number;
342
+ cost: number;
343
+ };
344
+ } | {
345
+ type: 'error';
346
+ message: string;
347
+ ts?: number;
348
+ } | {
349
+ type: 'reload_result';
350
+ results: ReloadResultPayload[];
351
+ } | {
352
+ type: 'restart_result';
353
+ status: 'accepted' | 'failed';
354
+ message?: string;
355
+ error?: string;
356
+ } | {
357
+ type: 'notification';
358
+ payload: unknown;
359
+ replyTo?: string;
360
+ meta?: Record<string, string>;
361
+ } | {
362
+ type: 'queue_state';
363
+ pending: QueueStateItem[];
364
+ } | {
365
+ type: 'prompt_started';
366
+ messageId: string;
367
+ text: string;
368
+ ts?: number;
369
+ } | {
370
+ type: 'doctor_result';
371
+ requestId: DoctorRequestId;
372
+ checks: DoctorCheckPayload[];
373
+ } | {
374
+ type: 'doctor_fix_result';
375
+ requestId: DoctorRequestId;
376
+ result: DoctorFixPayload;
377
+ } | {
378
+ type: 'cron_list_result';
379
+ requestId: CronListRequestId;
380
+ result: CronListResultPayload;
381
+ } | ({
382
+ type: 'tunnel_list_response';
383
+ requestId: TunnelRequestId;
384
+ } & ({
385
+ ok: true;
386
+ tunnels: TunnelSnapshot[];
387
+ } | {
388
+ ok: false;
389
+ error: string;
390
+ })) | ({
391
+ type: 'tunnel_status_response';
392
+ requestId: TunnelRequestId;
393
+ } & ({
394
+ ok: true;
395
+ tunnel: TunnelSnapshot;
396
+ } | {
397
+ ok: false;
398
+ error: string;
399
+ })) | {
400
+ type: 'claim_started';
401
+ payload: ClaimStartedPayload;
402
+ } | {
403
+ type: 'claim_completed';
404
+ payload: ClaimCompletedPayload;
405
+ } | {
406
+ type: 'claim_error';
407
+ payload: ClaimErrorPayload;
408
+ } | {
409
+ type: 'command_stdout';
410
+ callId: string;
411
+ chunk: string;
412
+ } | {
413
+ type: 'command_stderr';
414
+ callId: string;
415
+ chunk: string;
416
+ } | {
417
+ type: 'command_exit';
418
+ callId: string;
419
+ code: number;
420
+ } | {
421
+ type: 'command_error';
422
+ callId: string;
423
+ message: string;
424
+ };
@@ -0,0 +1,3 @@
1
+ import { styleText } from 'node:util';
2
+ export type StyleFormat = Parameters<typeof styleText>[0];
3
+ export declare function styled(format: StyleFormat, text: string): string;
@@ -0,0 +1,17 @@
1
+ export type WslVersion = 1 | 2;
2
+ export type WslInfo = {
3
+ isWsl: boolean;
4
+ version: WslVersion | null;
5
+ };
6
+ export type WslProbes = {
7
+ platform: NodeJS.Platform;
8
+ kernelRelease: () => string;
9
+ readFile: (path: string) => string | null;
10
+ fileExists: (path: string) => boolean;
11
+ env: NodeJS.ProcessEnv;
12
+ };
13
+ export declare function detectWslWith(probes: WslProbes): WslInfo;
14
+ export declare function detectWsl(): WslInfo;
15
+ export declare function readAutomountRootWith(probes: Pick<WslProbes, 'readFile'>): string;
16
+ export declare function isWindowsDriveMountWith(path: string, probes: Pick<WslProbes, 'readFile'>): boolean;
17
+ export declare function isWindowsDriveMount(path: string): boolean;
@@ -0,0 +1,2 @@
1
+ import type { CreateStreamOptions, Stream } from "./types.js";
2
+ export declare function createStream(opts?: CreateStreamOptions): Stream;
@@ -0,0 +1,2 @@
1
+ export { createStream } from "./broker.js";
2
+ export { type CreateStreamOptions, type PublishAndAwaitOptions, type ScanFilter, type Stream, type StreamMessage, type StreamMessageId, type StreamMessageInput, type StreamTarget, type SubscribeFilter, type SubscribeListener, type TargetFilter, StreamTimeoutError, type Unsubscribe, } from "./types.js";
@@ -0,0 +1,71 @@
1
+ export type StreamMessageId = string;
2
+ export type StreamTarget = {
3
+ kind: 'broadcast';
4
+ } | {
5
+ kind: 'session';
6
+ sessionId: string;
7
+ } | {
8
+ kind: 'new-session';
9
+ subagent: string;
10
+ parentSessionId?: string;
11
+ spawnedByRole?: string;
12
+ spawnedByOriginJson?: string;
13
+ } | {
14
+ kind: 'cron';
15
+ jobId: string;
16
+ };
17
+ export type StreamMessage = {
18
+ id: StreamMessageId;
19
+ ts: number;
20
+ target: StreamTarget;
21
+ payload: unknown;
22
+ replyTo?: StreamMessageId;
23
+ meta?: Record<string, string>;
24
+ };
25
+ export type StreamMessageInput = {
26
+ target: StreamTarget;
27
+ payload: unknown;
28
+ replyTo?: StreamMessageId;
29
+ meta?: Record<string, string>;
30
+ };
31
+ export type SubscribeFilter = {
32
+ target?: TargetFilter;
33
+ replyTo?: StreamMessageId;
34
+ };
35
+ export type ScanFilter = SubscribeFilter & {
36
+ sinceTs?: number;
37
+ limit?: number;
38
+ };
39
+ export type TargetFilter = {
40
+ kind: 'broadcast';
41
+ } | {
42
+ kind: 'session';
43
+ sessionId?: string;
44
+ } | {
45
+ kind: 'new-session';
46
+ subagent?: string;
47
+ } | {
48
+ kind: 'cron';
49
+ jobId?: string;
50
+ };
51
+ export type Unsubscribe = () => void;
52
+ export type SubscribeListener = (msg: StreamMessage) => unknown;
53
+ export type PublishAndAwaitOptions = {
54
+ timeoutMs?: number;
55
+ };
56
+ export type Stream = {
57
+ publish(message: StreamMessageInput): StreamMessageId;
58
+ publishAndAwait(message: StreamMessageInput, opts?: PublishAndAwaitOptions): Promise<StreamMessage>;
59
+ reply(toStreamMessageId: StreamMessageId, payload: unknown): StreamMessageId;
60
+ subscribe(filter: SubscribeFilter, onMessage: SubscribeListener): Unsubscribe;
61
+ scan(filter?: ScanFilter): StreamMessage[];
62
+ };
63
+ export type CreateStreamOptions = {
64
+ historySize?: number;
65
+ now?: () => number;
66
+ };
67
+ export declare class StreamTimeoutError extends Error {
68
+ readonly requestId: StreamMessageId;
69
+ readonly timeoutMs: number;
70
+ constructor(requestId: StreamMessageId, timeoutMs: number);
71
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typeclaw",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "homepage": "https://github.com/typeclaw/typeclaw#readme",
5
5
  "bugs": {
6
6
  "url": "https://github.com/typeclaw/typeclaw/issues"
@@ -15,6 +15,7 @@
15
15
  },
16
16
  "files": [
17
17
  "src",
18
+ "dist/types",
18
19
  "scripts",
19
20
  "tsconfig.json",
20
21
  "typeclaw.schema.json",
@@ -25,13 +26,19 @@
25
26
  ],
26
27
  "type": "module",
27
28
  "exports": {
28
- "./plugin": "./src/plugin/index.ts"
29
+ "./plugin": {
30
+ "types": "./dist/types/plugin/index.d.ts",
31
+ "default": "./src/plugin/index.ts"
32
+ }
29
33
  },
30
34
  "publishConfig": {
31
35
  "access": "public"
32
36
  },
33
37
  "scripts": {
34
38
  "typecheck": "tsc --noEmit",
39
+ "build:types": "bun run scripts/build-plugin-types.ts",
40
+ "check:plugin-sdk": "bun run scripts/check-plugin-sdk.ts",
41
+ "prepack": "bun run build:types",
35
42
  "lint": "oxlint",
36
43
  "format": "oxfmt --write .",
37
44
  "format:check": "oxfmt --check .",