@poe-platform/safe-js 0.1.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 (326) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +206 -0
  3. package/dist/agent-defs/agents/claude-code.d.ts +2 -0
  4. package/dist/agent-defs/agents/claude-desktop.d.ts +2 -0
  5. package/dist/agent-defs/agents/codex.d.ts +2 -0
  6. package/dist/agent-defs/agents/cursor.d.ts +2 -0
  7. package/dist/agent-defs/agents/gemini-cli.d.ts +2 -0
  8. package/dist/agent-defs/agents/goose.d.ts +2 -0
  9. package/dist/agent-defs/agents/index.d.ts +10 -0
  10. package/dist/agent-defs/agents/kimi.d.ts +2 -0
  11. package/dist/agent-defs/agents/opencode.d.ts +2 -0
  12. package/dist/agent-defs/agents/pi.d.ts +2 -0
  13. package/dist/agent-defs/agents/poe-agent.d.ts +2 -0
  14. package/dist/agent-defs/capabilities.d.ts +14 -0
  15. package/dist/agent-defs/index.d.ts +6 -0
  16. package/dist/agent-defs/registry.d.ts +3 -0
  17. package/dist/agent-defs/specifier.d.ts +7 -0
  18. package/dist/agent-defs/types.d.ts +35 -0
  19. package/dist/agent-harness-tools/binary-exists.d.ts +10 -0
  20. package/dist/agent-harness-tools/execution-env.d.ts +108 -0
  21. package/dist/agent-harness-tools/hooks.d.ts +30 -0
  22. package/dist/agent-harness-tools/index.d.ts +18 -0
  23. package/dist/agent-harness-tools/log-stream.d.ts +28 -0
  24. package/dist/agent-harness-tools/participant.d.ts +10 -0
  25. package/dist/agent-harness-tools/paths.d.ts +14 -0
  26. package/dist/agent-harness-tools/plan-readiness.d.ts +7 -0
  27. package/dist/agent-harness-tools/plans.d.ts +35 -0
  28. package/dist/agent-harness-tools/poe-command-execution.d.ts +37 -0
  29. package/dist/agent-harness-tools/run-logs.d.ts +17 -0
  30. package/dist/agent-harness-tools/run-poe-command.d.ts +33 -0
  31. package/dist/agent-harness-tools/runner.d.ts +33 -0
  32. package/dist/agent-harness-tools/select-agent.d.ts +18 -0
  33. package/dist/agent-harness-tools/sequence.d.ts +7 -0
  34. package/dist/agent-harness-tools/skill-config.d.ts +1 -0
  35. package/dist/agent-harness-tools/stage.d.ts +22 -0
  36. package/dist/agent-harness-tools/workspace-transfer.d.ts +3 -0
  37. package/dist/agent-spawn/acp/middleware.d.ts +38 -0
  38. package/dist/agent-spawn/acp/types.d.ts +180 -0
  39. package/dist/agent-spawn/adapters/claude.d.ts +3 -0
  40. package/dist/agent-spawn/adapters/codex.d.ts +2 -0
  41. package/dist/agent-spawn/adapters/cursor.d.ts +2 -0
  42. package/dist/agent-spawn/adapters/index.d.ts +12 -0
  43. package/dist/agent-spawn/adapters/kimi.d.ts +2 -0
  44. package/dist/agent-spawn/adapters/native.d.ts +5 -0
  45. package/dist/agent-spawn/adapters/opencode.d.ts +2 -0
  46. package/dist/agent-spawn/adapters/pi.d.ts +2 -0
  47. package/dist/agent-spawn/environment.d.ts +2 -0
  48. package/dist/agent-spawn/parallel.d.ts +30 -0
  49. package/dist/agent-spawn/retry.d.ts +26 -0
  50. package/dist/agent-spawn/types.d.ts +272 -0
  51. package/dist/auth-store/create-secret-store.d.ts +2 -0
  52. package/dist/auth-store/encrypted-file-store.d.ts +47 -0
  53. package/dist/auth-store/index.d.ts +7 -0
  54. package/dist/auth-store/keychain-store.d.ts +25 -0
  55. package/dist/auth-store/provider-store.d.ts +14 -0
  56. package/dist/auth-store/types.d.ts +22 -0
  57. package/dist/config-mutations/execution/run-mutations.d.ts +7 -0
  58. package/dist/config-mutations/fs-utils.d.ts +18 -0
  59. package/dist/config-mutations/index.d.ts +8 -0
  60. package/dist/config-mutations/mutations/config-mutation.d.ts +47 -0
  61. package/dist/config-mutations/mutations/file-mutation.d.ts +62 -0
  62. package/dist/config-mutations/mutations/template-mutation.d.ts +40 -0
  63. package/dist/config-mutations/template/render.d.ts +6 -0
  64. package/dist/config-mutations/types.d.ts +168 -0
  65. package/dist/poe-code-config/compile/schema-compiler.d.ts +11 -0
  66. package/dist/poe-code-config/config.d.ts +2 -0
  67. package/dist/poe-code-config/configured-services.d.ts +29 -0
  68. package/dist/poe-code-config/index.d.ts +16 -0
  69. package/dist/poe-code-config/inspect.d.ts +13 -0
  70. package/dist/poe-code-config/memory.d.ts +14 -0
  71. package/dist/poe-code-config/merge-callbacks.d.ts +38 -0
  72. package/dist/poe-code-config/merge.d.ts +2 -0
  73. package/dist/poe-code-config/plan-scope.d.ts +8 -0
  74. package/dist/poe-code-config/provider-config.d.ts +16 -0
  75. package/dist/poe-code-config/resolve.d.ts +2 -0
  76. package/dist/poe-code-config/runtime.d.ts +114 -0
  77. package/dist/poe-code-config/schema.d.ts +14 -0
  78. package/dist/poe-code-config/state/fs.d.ts +24 -0
  79. package/dist/poe-code-config/state/index.d.ts +12 -0
  80. package/dist/poe-code-config/state/jobs.d.ts +34 -0
  81. package/dist/poe-code-config/state/templates.d.ts +18 -0
  82. package/dist/poe-code-config/store.d.ts +12 -0
  83. package/dist/poe-code-config/types.d.ts +88 -0
  84. package/dist/process-runner/docker/build-context.d.ts +5 -0
  85. package/dist/process-runner/docker/context.d.ts +3 -0
  86. package/dist/process-runner/docker/docker-execution-env.d.ts +28 -0
  87. package/dist/process-runner/docker/docker-runner.d.ts +2 -0
  88. package/dist/process-runner/docker/engine.d.ts +3 -0
  89. package/dist/process-runner/host/host-execution-env.d.ts +2 -0
  90. package/dist/process-runner/host/host-runner.d.ts +3 -0
  91. package/dist/process-runner/index.d.ts +10 -0
  92. package/dist/process-runner/testing/index.d.ts +2 -0
  93. package/dist/process-runner/testing/mock-runner.d.ts +3 -0
  94. package/dist/process-runner/types.d.ts +191 -0
  95. package/dist/process-runner/workspace-transfer.d.ts +61 -0
  96. package/dist/providers/auth/api-key.d.ts +5 -0
  97. package/dist/providers/auth/types.d.ts +14 -0
  98. package/dist/providers/compatibility.d.ts +4 -0
  99. package/dist/providers/index.d.ts +8 -0
  100. package/dist/providers/providers/anthropic.d.ts +1 -0
  101. package/dist/providers/providers/cloudflare.d.ts +1 -0
  102. package/dist/providers/providers/generated.d.ts +5 -0
  103. package/dist/providers/providers/openai.d.ts +1 -0
  104. package/dist/providers/providers/poe.d.ts +2 -0
  105. package/dist/providers/registry.d.ts +44 -0
  106. package/dist/providers/types.d.ts +54 -0
  107. package/dist/safe-fs/bridge/filesystem.d.ts +88 -0
  108. package/dist/safe-fs/bridge/index.d.ts +6 -0
  109. package/dist/safe-fs/bridge/types.d.ts +75 -0
  110. package/dist/safe-fs/config.d.ts +15 -0
  111. package/dist/safe-fs/config.node.d.ts +2 -0
  112. package/dist/safe-fs/contracts/errors.d.ts +50 -0
  113. package/dist/safe-fs/contracts/filesystem.d.ts +96 -0
  114. package/dist/safe-fs/contracts/index.d.ts +4 -0
  115. package/dist/safe-fs/contracts/io.d.ts +8 -0
  116. package/dist/safe-fs/contracts/path.d.ts +8 -0
  117. package/dist/safe-fs/contracts/portable-path.d.ts +13 -0
  118. package/dist/safe-fs/contracts/virtual-path.d.ts +7 -0
  119. package/dist/safe-fs/core.d.ts +12 -0
  120. package/dist/safe-fs/fs/memory/index.d.ts +58 -0
  121. package/dist/safe-fs/fs/mount/comparison.d.ts +19 -0
  122. package/dist/safe-fs/fs/mount/index.d.ts +44 -0
  123. package/dist/safe-fs/fs/overlay/index.d.ts +73 -0
  124. package/dist/safe-fs/fs/readonly/index.d.ts +31 -0
  125. package/dist/safe-fs/fs/real/index.d.ts +76 -0
  126. package/dist/safe-fs/fs/s3/filesystem.d.ts +93 -0
  127. package/dist/safe-fs/fs/s3/http/index.d.ts +2 -0
  128. package/dist/safe-fs/fs/s3/http/transport.d.ts +3 -0
  129. package/dist/safe-fs/fs/s3/http/types.d.ts +30 -0
  130. package/dist/safe-fs/fs/s3/index.d.ts +6 -0
  131. package/dist/safe-fs/fs/s3/mock.d.ts +48 -0
  132. package/dist/safe-fs/fs/s3/transport.d.ts +103 -0
  133. package/dist/safe-fs/fs/webdav/index.d.ts +2 -0
  134. package/dist/safe-fs/fs/webdav/webdav.d.ts +101 -0
  135. package/dist/safe-fs/index.d.ts +14 -0
  136. package/dist/safe-fs/node/filesystem.d.ts +11 -0
  137. package/dist/safe-fs/node/index.d.ts +2 -0
  138. package/dist/safe-fs/node-host.d.ts +1 -0
  139. package/dist/safe-fs/node-unavailable.d.ts +1 -0
  140. package/dist/safe-fs/platform/browser.d.ts +12 -0
  141. package/dist/safe-fs/platform/node.d.ts +13 -0
  142. package/dist/safe-js/browser/chunks/chunk-QGN6DKT5.js +4335 -0
  143. package/dist/safe-js/browser/chunks/chunk-QGN6DKT5.js.map +7 -0
  144. package/dist/safe-js/browser/safe-fs-core.js +67 -0
  145. package/dist/safe-js/browser/safe-fs-core.js.map +7 -0
  146. package/dist/safe-js/browser/safe-fs.js +67 -0
  147. package/dist/safe-js/browser/safe-fs.js.map +7 -0
  148. package/dist/safe-js/chunks/chunk-2QRYPKQQ.js +4315 -0
  149. package/dist/safe-js/chunks/chunk-2QRYPKQQ.js.map +7 -0
  150. package/dist/safe-js/chunks/chunk-4YIDX44G.js +40 -0
  151. package/dist/safe-js/chunks/chunk-4YIDX44G.js.map +7 -0
  152. package/dist/safe-js/chunks/chunk-7M2SJPSZ.js +2613 -0
  153. package/dist/safe-js/chunks/chunk-7M2SJPSZ.js.map +7 -0
  154. package/dist/safe-js/chunks/chunk-DC5B3GYM.js +8248 -0
  155. package/dist/safe-js/chunks/chunk-DC5B3GYM.js.map +7 -0
  156. package/dist/safe-js/chunks/chunk-Z3D76J4U.js +30732 -0
  157. package/dist/safe-js/chunks/chunk-Z3D76J4U.js.map +7 -0
  158. package/dist/safe-js/cli.d.ts +36 -0
  159. package/dist/safe-js/cli.js +724 -0
  160. package/dist/safe-js/cli.js.map +7 -0
  161. package/dist/safe-js/core.d.ts +6 -0
  162. package/dist/safe-js/core.js +14 -0
  163. package/dist/safe-js/core.js.map +7 -0
  164. package/dist/safe-js/dump.d.ts +2 -0
  165. package/dist/safe-js/error/format.d.ts +15 -0
  166. package/dist/safe-js/error/shape.d.ts +28 -0
  167. package/dist/safe-js/index.d.ts +56 -0
  168. package/dist/safe-js/index.js +454 -0
  169. package/dist/safe-js/index.js.map +7 -0
  170. package/dist/safe-js/interp/arguments.d.ts +10 -0
  171. package/dist/safe-js/interp/async.d.ts +56 -0
  172. package/dist/safe-js/interp/budget.d.ts +95 -0
  173. package/dist/safe-js/interp/exceptions.d.ts +45 -0
  174. package/dist/safe-js/interp/generator.d.ts +16 -0
  175. package/dist/safe-js/interp/globals/console-json.d.ts +14 -0
  176. package/dist/safe-js/interp/host-bridge.d.ts +29 -0
  177. package/dist/safe-js/interp/host-call.d.ts +130 -0
  178. package/dist/safe-js/interp/interpreter.d.ts +63 -0
  179. package/dist/safe-js/interp/promise-replay.d.ts +70 -0
  180. package/dist/safe-js/interp/regex/compile-guard.d.ts +33 -0
  181. package/dist/safe-js/interp/regex/parse.d.ts +62 -0
  182. package/dist/safe-js/interp/scope.d.ts +43 -0
  183. package/dist/safe-js/interp/values.d.ts +136 -0
  184. package/dist/safe-js/lint/index.d.ts +38 -0
  185. package/dist/safe-js/lint/rules/AS-export-import-meta.d.ts +21 -0
  186. package/dist/safe-js/lint/rules/module-registry.d.ts +33 -0
  187. package/dist/safe-js/lint.d.ts +1 -0
  188. package/dist/safe-js/loader/extract-block.d.ts +10 -0
  189. package/dist/safe-js/loader/find-exported.d.ts +2 -0
  190. package/dist/safe-js/loader/frontmatter.d.ts +5 -0
  191. package/dist/safe-js/migrate.d.ts +33 -0
  192. package/dist/safe-js/migration-file.d.ts +55 -0
  193. package/dist/safe-js/modules/agent.d.ts +132 -0
  194. package/dist/safe-js/modules/env.d.ts +14 -0
  195. package/dist/safe-js/modules/fail.d.ts +6 -0
  196. package/dist/safe-js/modules/fs-config.d.ts +12 -0
  197. package/dist/safe-js/modules/fs.d.ts +82 -0
  198. package/dist/safe-js/modules/harness.d.ts +19 -0
  199. package/dist/safe-js/modules/log.d.ts +16 -0
  200. package/dist/safe-js/modules/mcp-transport.d.ts +26 -0
  201. package/dist/safe-js/modules/mcp.d.ts +63 -0
  202. package/dist/safe-js/modules/metric.d.ts +4 -0
  203. package/dist/safe-js/modules/registry.d.ts +16 -0
  204. package/dist/safe-js/modules/time.d.ts +12 -0
  205. package/dist/safe-js/observability/otel.d.ts +21 -0
  206. package/dist/safe-js/output-stream.d.ts +12 -0
  207. package/dist/safe-js/parse/parse-export.d.ts +36 -0
  208. package/dist/safe-js/parse/parser.d.ts +356 -0
  209. package/dist/safe-js/parse/tokenizer.d.ts +26 -0
  210. package/dist/safe-js/parse.d.ts +4 -0
  211. package/dist/safe-js/random.d.ts +9 -0
  212. package/dist/safe-js/restore.d.ts +26 -0
  213. package/dist/safe-js/run.d.ts +74 -0
  214. package/dist/safe-js/runner/run-harness.d.ts +32 -0
  215. package/dist/safe-js/safe-fs-core.js +130 -0
  216. package/dist/safe-js/safe-fs-core.js.map +7 -0
  217. package/dist/safe-js/safe-fs-node.js +94 -0
  218. package/dist/safe-js/safe-fs-node.js.map +7 -0
  219. package/dist/safe-js/safe-fs.js +94 -0
  220. package/dist/safe-js/safe-fs.js.map +7 -0
  221. package/dist/safe-js/snapshot/arguments.d.ts +17 -0
  222. package/dist/safe-js/snapshot/backend.d.ts +19 -0
  223. package/dist/safe-js/snapshot/dump-format.d.ts +7 -0
  224. package/dist/safe-js/snapshot/dump.d.ts +23 -0
  225. package/dist/safe-js/snapshot/float32array.d.ts +12 -0
  226. package/dist/safe-js/snapshot/migration.d.ts +35 -0
  227. package/dist/safe-js/snapshot/policy.d.ts +49 -0
  228. package/dist/safe-js/snapshot/replay-data.d.ts +71 -0
  229. package/dist/safe-js/snapshot/validation.d.ts +15 -0
  230. package/dist/task-list/backends/gh-issues-client.d.ts +19 -0
  231. package/dist/task-list/backends/gh-issues-sync.d.ts +46 -0
  232. package/dist/task-list/backends/gh-issues.d.ts +21 -0
  233. package/dist/task-list/index.d.ts +9 -0
  234. package/dist/task-list/move.d.ts +2 -0
  235. package/dist/task-list/open.d.ts +5 -0
  236. package/dist/task-list/state-machine.d.ts +16 -0
  237. package/dist/task-list/state.d.ts +29 -0
  238. package/dist/task-list/types.d.ts +206 -0
  239. package/dist/tiny-mcp-client/index.d.ts +662 -0
  240. package/dist/tiny-stdio-mcp-server/content/audio.d.ts +15 -0
  241. package/dist/tiny-stdio-mcp-server/content/convert.d.ts +16 -0
  242. package/dist/tiny-stdio-mcp-server/content/file-type.d.ts +11 -0
  243. package/dist/tiny-stdio-mcp-server/content/file.d.ts +28 -0
  244. package/dist/tiny-stdio-mcp-server/content/image.d.ts +15 -0
  245. package/dist/tiny-stdio-mcp-server/content/index.d.ts +7 -0
  246. package/dist/tiny-stdio-mcp-server/content/mime.d.ts +7 -0
  247. package/dist/tiny-stdio-mcp-server/content/remote.d.ts +5 -0
  248. package/dist/tiny-stdio-mcp-server/index.d.ts +9 -0
  249. package/dist/tiny-stdio-mcp-server/schema.d.ts +20 -0
  250. package/dist/tiny-stdio-mcp-server/server.d.ts +35 -0
  251. package/dist/tiny-stdio-mcp-server/types.d.ts +247 -0
  252. package/dist/toolcraft-design/acp/components.d.ts +19 -0
  253. package/dist/toolcraft-design/acp/index.d.ts +4 -0
  254. package/dist/toolcraft-design/acp/writer.d.ts +13 -0
  255. package/dist/toolcraft-design/components/browser.d.ts +15 -0
  256. package/dist/toolcraft-design/components/catalog.d.ts +26 -0
  257. package/dist/toolcraft-design/components/color.d.ts +31 -0
  258. package/dist/toolcraft-design/components/command-errors.d.ts +18 -0
  259. package/dist/toolcraft-design/components/detail-card.d.ts +22 -0
  260. package/dist/toolcraft-design/components/file-changes.d.ts +16 -0
  261. package/dist/toolcraft-design/components/help-formatter-plain.d.ts +5 -0
  262. package/dist/toolcraft-design/components/help-formatter.d.ts +50 -0
  263. package/dist/toolcraft-design/components/inspector-card.d.ts +21 -0
  264. package/dist/toolcraft-design/components/logger.d.ts +11 -0
  265. package/dist/toolcraft-design/components/resource-browser.d.ts +21 -0
  266. package/dist/toolcraft-design/components/symbols.d.ts +12 -0
  267. package/dist/toolcraft-design/components/table.d.ts +16 -0
  268. package/dist/toolcraft-design/components/template.d.ts +19 -0
  269. package/dist/toolcraft-design/components/text.d.ts +16 -0
  270. package/dist/toolcraft-design/dashboard/buffer.d.ts +25 -0
  271. package/dist/toolcraft-design/dashboard/components/footer.d.ts +8 -0
  272. package/dist/toolcraft-design/dashboard/dashboard.d.ts +20 -0
  273. package/dist/toolcraft-design/dashboard/index.d.ts +8 -0
  274. package/dist/toolcraft-design/dashboard/should-use-dashboard.d.ts +10 -0
  275. package/dist/toolcraft-design/dashboard/snapshot.d.ts +10 -0
  276. package/dist/toolcraft-design/dashboard/terminal.d.ts +37 -0
  277. package/dist/toolcraft-design/dashboard/types.d.ts +38 -0
  278. package/dist/toolcraft-design/explorer/events.d.ts +77 -0
  279. package/dist/toolcraft-design/explorer/index.d.ts +8 -0
  280. package/dist/toolcraft-design/explorer/keymap.d.ts +31 -0
  281. package/dist/toolcraft-design/explorer/runtime.d.ts +2 -0
  282. package/dist/toolcraft-design/explorer/state.d.ts +224 -0
  283. package/dist/toolcraft-design/index.d.ts +62 -0
  284. package/dist/toolcraft-design/internal/output-format.d.ts +6 -0
  285. package/dist/toolcraft-design/internal/strip-ansi.d.ts +1 -0
  286. package/dist/toolcraft-design/internal/theme-detect.d.ts +12 -0
  287. package/dist/toolcraft-design/internal/theme-state.d.ts +12 -0
  288. package/dist/toolcraft-design/prompts/index.d.ts +91 -0
  289. package/dist/toolcraft-design/prompts/interactive/cancel-symbol.d.ts +2 -0
  290. package/dist/toolcraft-design/prompts/interactive/select.d.ts +18 -0
  291. package/dist/toolcraft-design/prompts/primitives/cancel.d.ts +2 -0
  292. package/dist/toolcraft-design/prompts/primitives/intro.d.ts +1 -0
  293. package/dist/toolcraft-design/prompts/primitives/log.d.ts +18 -0
  294. package/dist/toolcraft-design/prompts/primitives/note.d.ts +1 -0
  295. package/dist/toolcraft-design/prompts/primitives/outro.d.ts +1 -0
  296. package/dist/toolcraft-design/prompts/primitives/spinner.d.ts +6 -0
  297. package/dist/toolcraft-design/prompts/theme.d.ts +11 -0
  298. package/dist/toolcraft-design/screen/screen.d.ts +40 -0
  299. package/dist/toolcraft-design/screen/style.d.ts +16 -0
  300. package/dist/toolcraft-design/static/index.d.ts +4 -0
  301. package/dist/toolcraft-design/static/menu.d.ts +11 -0
  302. package/dist/toolcraft-design/static/spinner.d.ts +14 -0
  303. package/dist/toolcraft-design/terminal/driver.d.ts +34 -0
  304. package/dist/toolcraft-design/terminal/input.d.ts +25 -0
  305. package/dist/toolcraft-design/terminal-markdown/ast.d.ts +98 -0
  306. package/dist/toolcraft-design/terminal-markdown/html-renderer.d.ts +7 -0
  307. package/dist/toolcraft-design/terminal-markdown/index.d.ts +12 -0
  308. package/dist/toolcraft-design/terminal-markdown/parser.d.ts +5 -0
  309. package/dist/toolcraft-design/terminal-markdown/plaintext-renderer.d.ts +11 -0
  310. package/dist/toolcraft-design/terminal-markdown/renderer.d.ts +7 -0
  311. package/dist/toolcraft-design/tokens/brand.d.ts +5 -0
  312. package/dist/toolcraft-design/tokens/colors.d.ts +37 -0
  313. package/dist/toolcraft-design/tokens/index.d.ts +6 -0
  314. package/dist/toolcraft-design/tokens/spacing.d.ts +6 -0
  315. package/dist/toolcraft-design/tokens/typography.d.ts +7 -0
  316. package/dist/toolcraft-design/tokens/widths.d.ts +5 -0
  317. package/dist/toolcraft-schema/index.d.ts +184 -0
  318. package/dist/toolcraft-schema/json-schema/index.d.ts +5 -0
  319. package/dist/toolcraft-schema/json-schema/types.d.ts +33 -0
  320. package/dist/toolcraft-schema/json-schema-document.d.ts +14 -0
  321. package/dist/toolcraft-schema/json.d.ts +10 -0
  322. package/dist/toolcraft-schema/oneof.d.ts +15 -0
  323. package/dist/toolcraft-schema/record.d.ts +5 -0
  324. package/dist/toolcraft-schema/union.d.ts +8 -0
  325. package/dist/toolcraft-schema/validate.d.ts +17 -0
  326. package/package.json +89 -0
@@ -0,0 +1,12 @@
1
+ export declare const symbols: {
2
+ readonly info: string;
3
+ readonly success: string;
4
+ readonly resolved: string;
5
+ readonly errorResolved: string;
6
+ readonly bar: string;
7
+ readonly cornerTopRight: "╮";
8
+ readonly cornerBottomRight: "╯";
9
+ readonly warning: string;
10
+ readonly active: string;
11
+ readonly inactive: string;
12
+ };
@@ -0,0 +1,16 @@
1
+ import type { ThemePalette } from "../tokens/colors.js";
2
+ export interface TableColumn {
3
+ name: string;
4
+ title: string;
5
+ alignment: "left" | "right";
6
+ maxLen: number;
7
+ }
8
+ export interface RenderTableOptions {
9
+ theme: ThemePalette;
10
+ columns: TableColumn[];
11
+ rows: Record<string, string>[];
12
+ variant?: "table" | "detail";
13
+ maxWidth?: number;
14
+ }
15
+ export declare function loggerTableWidth(): number | undefined;
16
+ export declare function renderTable(options: RenderTableOptions): string;
@@ -0,0 +1,19 @@
1
+ export type TemplateEscape = "html" | "none";
2
+ export interface RenderTemplateOptions {
3
+ escape?: TemplateEscape;
4
+ partials?: Record<string, string>;
5
+ validate?: boolean;
6
+ yield?: string;
7
+ }
8
+ export declare class TemplateParseError extends Error {
9
+ readonly description: string;
10
+ readonly line: number;
11
+ readonly column: number;
12
+ constructor(description: string, position: {
13
+ line: number;
14
+ column: number;
15
+ });
16
+ }
17
+ export declare function renderTemplate(template: string, view: Record<string, unknown>, options?: RenderTemplateOptions): string;
18
+ export declare function getTemplatePartialNames(template: string): string[];
19
+ export declare function resolveTemplatePartials(template: string, partials: Record<string, string>): string;
@@ -0,0 +1,16 @@
1
+ export declare const text: {
2
+ readonly intro: (content: string) => string;
3
+ readonly heading: (content: string) => string;
4
+ readonly section: (content: string) => string;
5
+ readonly sectionHeader: (content: string) => string;
6
+ readonly command: (content: string) => string;
7
+ readonly argument: (content: string) => string;
8
+ readonly option: (content: string) => string;
9
+ readonly example: (content: string) => string;
10
+ readonly usageCommand: (content: string) => string;
11
+ readonly link: (content: string) => string;
12
+ readonly muted: (content: string) => string;
13
+ readonly error: (content: string) => string;
14
+ readonly badge: (content: string) => string;
15
+ readonly selectLabel: (label: string, detail?: string) => string;
16
+ };
@@ -0,0 +1,25 @@
1
+ import type { Cell, CellStyle, Rect } from "./types.js";
2
+ export declare class ScreenBuffer {
3
+ private _width;
4
+ private _height;
5
+ private _cells;
6
+ constructor(width: number, height: number);
7
+ get width(): number;
8
+ get height(): number;
9
+ put(x: number, y: number, text: string, style?: CellStyle): void;
10
+ get(x: number, y: number): Cell;
11
+ clear(style?: CellStyle): void;
12
+ clearRect(rect: Rect, style?: CellStyle): void;
13
+ resize(width: number, height: number): void;
14
+ putInRect(rect: Rect, row: number, text: string, style?: CellStyle): void;
15
+ private index;
16
+ private isInBounds;
17
+ private isInBoundsX;
18
+ private isInBoundsY;
19
+ }
20
+ export declare function diff(prev: ScreenBuffer, next: ScreenBuffer): Array<{
21
+ x: number;
22
+ y: number;
23
+ cell: Cell;
24
+ }>;
25
+ export declare function cellToAnsi(cell: Cell): string;
@@ -0,0 +1,8 @@
1
+ import { ScreenBuffer } from "../buffer.js";
2
+ import type { Rect } from "../types.js";
3
+ export type FooterHint = {
4
+ key: string;
5
+ label: string;
6
+ };
7
+ export declare function renderFooter(buffer: ScreenBuffer, rect: Rect, hints: FooterHint[]): void;
8
+ export declare function defaultHints(): FooterHint[];
@@ -0,0 +1,20 @@
1
+ import type { FooterHint } from "./components/footer.js";
2
+ import type { Command, DashboardStats, OutputItem } from "./types.js";
3
+ export type DashboardOptions = {
4
+ title?: string;
5
+ statsTitle?: string;
6
+ keymap?: Partial<Record<Command, string[]>>;
7
+ rightPaneWidth?: number;
8
+ hints?: FooterHint[];
9
+ stdin?: NodeJS.ReadStream;
10
+ stdout?: NodeJS.WriteStream;
11
+ };
12
+ export type Dashboard = {
13
+ start(): void;
14
+ stop(): void;
15
+ appendOutput(item: OutputItem): void;
16
+ updateStats(stats: Partial<DashboardStats>): void;
17
+ onCommand(handler: (cmd: Command) => void): void;
18
+ destroy(): void;
19
+ };
20
+ export declare function createDashboard(opts?: DashboardOptions): Dashboard;
@@ -0,0 +1,8 @@
1
+ export { createDashboard } from "./dashboard.js";
2
+ export { shouldUseInteractiveDashboard } from "./should-use-dashboard.js";
3
+ export type { Dashboard, DashboardOptions } from "./dashboard.js";
4
+ export { renderDashboardSnapshot } from "./snapshot.js";
5
+ export type { SnapshotOptions } from "./snapshot.js";
6
+ export type { OutputItem, OutputItemKind, DashboardStats, Command, DashboardState } from "./types.js";
7
+ export { defaultHints } from "./components/footer.js";
8
+ export type { FooterHint } from "./components/footer.js";
@@ -0,0 +1,10 @@
1
+ type DashboardIo = {
2
+ stdin: {
3
+ isTTY?: boolean | undefined;
4
+ };
5
+ stdout: {
6
+ isTTY?: boolean | undefined;
7
+ };
8
+ };
9
+ export declare function shouldUseInteractiveDashboard(enabled: boolean | undefined, io?: DashboardIo): boolean;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { DashboardStats, OutputItem } from "./types.js";
2
+ export type SnapshotOptions = {
3
+ width?: number;
4
+ height?: number;
5
+ title?: string;
6
+ statsTitle?: string;
7
+ items?: OutputItem[];
8
+ stats?: DashboardStats;
9
+ };
10
+ export declare function renderDashboardSnapshot(opts?: SnapshotOptions): string;
@@ -0,0 +1,37 @@
1
+ import type { Cell } from "./types.js";
2
+ export type KeypressEvent = {
3
+ name?: string;
4
+ ch?: string;
5
+ ctrl: boolean;
6
+ meta: boolean;
7
+ shift: boolean;
8
+ };
9
+ export type TerminalDriver = {
10
+ enterRawMode(): void;
11
+ exitRawMode(): void;
12
+ enterAltScreen(): void;
13
+ exitAltScreen(): void;
14
+ disableLineWrap(): void;
15
+ enableLineWrap(): void;
16
+ hideCursor(): void;
17
+ showCursor(): void;
18
+ moveTo(x: number, y: number): void;
19
+ write(text: string): void;
20
+ flush(changes: Array<{
21
+ x: number;
22
+ y: number;
23
+ cell: Cell;
24
+ }>): void;
25
+ getSize(): {
26
+ cols: number;
27
+ rows: number;
28
+ };
29
+ onResize(handler: () => void): () => void;
30
+ onKeypress(handler: (key: KeypressEvent) => void): () => void;
31
+ destroy(): void;
32
+ };
33
+ export declare function createTerminalDriver(opts?: {
34
+ stdin?: NodeJS.ReadStream;
35
+ stdout?: NodeJS.WriteStream;
36
+ }): TerminalDriver;
37
+ export declare function parseKeypress(data: Buffer): KeypressEvent | undefined;
@@ -0,0 +1,38 @@
1
+ export type OutputItemKind = "info" | "success" | "error" | "tool" | "status";
2
+ export type OutputItem = {
3
+ kind: OutputItemKind;
4
+ text: string;
5
+ ts: number;
6
+ };
7
+ export type DashboardStats = {
8
+ status: "idle" | "running" | "paused" | "done" | "error";
9
+ iterations: number;
10
+ iterationsLabel?: string;
11
+ tokensIn: number;
12
+ tokensOut: number;
13
+ elapsedMs: number;
14
+ currentAction?: string;
15
+ };
16
+ export type Command = "quit" | "forceQuit" | "edit" | "pause" | "retry" | "view-log";
17
+ export type DashboardState = {
18
+ output: OutputItem[];
19
+ stats: DashboardStats;
20
+ };
21
+ export type CellStyle = {
22
+ fg?: string;
23
+ bg?: string;
24
+ bold?: boolean;
25
+ dim?: boolean;
26
+ inverse?: boolean;
27
+ underline?: boolean;
28
+ };
29
+ export type Cell = {
30
+ ch: string;
31
+ style: CellStyle;
32
+ };
33
+ export type Rect = {
34
+ x: number;
35
+ y: number;
36
+ width: number;
37
+ height: number;
38
+ };
@@ -0,0 +1,77 @@
1
+ import type { KeypressEvent } from "../dashboard/terminal.js";
2
+ import type { Action, DetailItem, Row } from "./state.js";
3
+ export type Effect = {
4
+ type: "renderDetail";
5
+ rowId: string;
6
+ token: number;
7
+ } | {
8
+ type: "exit";
9
+ result: unknown;
10
+ after?: () => Promise<void>;
11
+ } | {
12
+ type: "suspend";
13
+ fn: () => Promise<unknown>;
14
+ resumeWith: (value: unknown) => ExplorerEvent;
15
+ } | {
16
+ type: "persistOrder";
17
+ movedId: string;
18
+ orderedIds: string[];
19
+ };
20
+ export type ExplorerEvent = {
21
+ type: "key";
22
+ key: KeypressEvent;
23
+ } | {
24
+ type: "resize";
25
+ cols: number;
26
+ rows: number;
27
+ } | {
28
+ type: "rowsLoaded";
29
+ rows: Row[];
30
+ } | {
31
+ type: "detailLoading";
32
+ rowId: string;
33
+ token: number;
34
+ } | {
35
+ type: "detailLoaded";
36
+ rowId: string;
37
+ token: number;
38
+ items: DetailItem[];
39
+ } | {
40
+ type: "detailItemRendered";
41
+ rowId: string;
42
+ token: number;
43
+ itemIndex: number;
44
+ content: string;
45
+ } | {
46
+ type: "detailError";
47
+ rowId: string;
48
+ token: number;
49
+ error: Error;
50
+ } | {
51
+ type: "actionResolved";
52
+ actionId: string;
53
+ } | {
54
+ type: "toastExpired";
55
+ } | {
56
+ type: "suspendResumed";
57
+ value: unknown;
58
+ emit: ExplorerEvent;
59
+ } | {
60
+ type: "modalOpened";
61
+ title: string;
62
+ content: string;
63
+ } | {
64
+ type: "modalDismissed";
65
+ result: unknown;
66
+ };
67
+ export type ConfirmModal = {
68
+ kind: "confirm";
69
+ title: string;
70
+ message: string;
71
+ confirmLabel: string;
72
+ cancelLabel: string;
73
+ destructive: boolean;
74
+ action?: Action<unknown>;
75
+ rows?: Row[];
76
+ resolver: (ok: boolean) => void;
77
+ };
@@ -0,0 +1,8 @@
1
+ import type { Detail, DetailCtx, Row } from "./state.js";
2
+ export { runExplorer } from "./runtime.js";
3
+ export { createInitialState, normalizeExplorerConfig } from "./state.js";
4
+ export { resolveBindings } from "./keymap.js";
5
+ export type { Effect, ExplorerEvent } from "./events.js";
6
+ export type { BindingTarget, ExplorerBindingDefaults, ExplorerBuiltinCommand, ResolvedBindings } from "./keymap.js";
7
+ export type { Action, ActionContext, ConfirmPromptOptions, Detail, DetailCtx, DetailItem, Dirty, ExplorerConfig, PaneConfig, ListPaneConfig, DetailPaneConfig, PaneRuntimeState, ExplorerLayoutMode, ExplorerSize, ExplorerState, ReorderContext, Row, Tone } from "./state.js";
8
+ export declare function singleDetail<R>(fn: (row: Row, ctx: DetailCtx) => string | Promise<string>): Detail<R>;
@@ -0,0 +1,31 @@
1
+ import type { ExplorerEvent } from "./events.js";
2
+ import type { ExplorerConfig } from "./state.js";
3
+ export type ExplorerBuiltinCommand = "quit" | "filter" | "help" | "palette" | "cursorUp" | "cursorDown" | "top" | "bottom" | "pageUp" | "pageDown" | "focusNext" | "escape" | "confirm" | "halfPageUp" | "halfPageDown" | "toggleSelect" | "selectAll" | "clearSelection" | "detailScrollDown" | "detailScrollUp" | "extendSelectionUp" | "extendSelectionDown" | "reorderUp" | "reorderDown";
4
+ export type BindingTarget = {
5
+ type: "builtin";
6
+ id: ExplorerBuiltinCommand;
7
+ } | {
8
+ type: "action";
9
+ id: string;
10
+ };
11
+ type Key = Extract<ExplorerEvent, {
12
+ type: "key";
13
+ }>["key"];
14
+ export interface ResolvedBindings {
15
+ bindings: ReadonlyMap<string, BindingTarget>;
16
+ keysByTarget: ReadonlyMap<string, readonly string[]>;
17
+ resolve: (event: Key) => BindingTarget | undefined;
18
+ }
19
+ export type ExplorerBindingDefaults = Partial<Record<ExplorerBuiltinCommand, string[]>>;
20
+ export interface HelpSection {
21
+ title: string;
22
+ entries: Array<{
23
+ key: string;
24
+ label: string;
25
+ }>;
26
+ }
27
+ export declare function resolveBindings<R>(config: ExplorerConfig<R>, defaults?: ExplorerBindingDefaults): ResolvedBindings;
28
+ export declare function assertNoBareLetterBindings<R>(config: ExplorerConfig<R>): void;
29
+ export declare function assertAcceleratorsFree<R>(config: ExplorerConfig<R>): void;
30
+ export declare function keymapToHelp<R>(config: ExplorerConfig<R>): HelpSection[];
31
+ export {};
@@ -0,0 +1,2 @@
1
+ import { type ExplorerConfig } from "./state.js";
2
+ export declare function runExplorer<R = void>(config: ExplorerConfig<R>): Promise<R | null>;
@@ -0,0 +1,224 @@
1
+ import { type ResolvedBindings } from "./keymap.js";
2
+ export type Tone = "success" | "warning" | "error" | "info" | "muted";
3
+ export interface ConfirmPromptOptions {
4
+ title: string;
5
+ message: string;
6
+ confirmLabel?: string;
7
+ cancelLabel?: string;
8
+ destructive?: boolean;
9
+ }
10
+ export interface Row {
11
+ id: string;
12
+ title: string;
13
+ subtitle?: string;
14
+ badge?: {
15
+ text: string;
16
+ tone?: Tone;
17
+ };
18
+ group?: string;
19
+ }
20
+ export interface DetailItem {
21
+ id: string;
22
+ title?: string;
23
+ subtitle?: string;
24
+ badge?: {
25
+ text: string;
26
+ tone?: Tone;
27
+ };
28
+ render: (ctx: DetailCtx) => string | Promise<string>;
29
+ renderedContent?: string;
30
+ }
31
+ export interface Detail<R> {
32
+ items: (row: Row, ctx: DetailCtx) => Promise<DetailItem[]>;
33
+ actions?: Action<R>[];
34
+ }
35
+ export interface DetailCtx {
36
+ width: number;
37
+ height: number;
38
+ signal: AbortSignal;
39
+ row: Row;
40
+ /** Re-run detail.items for the focused row and repaint the preview pane. */
41
+ reloadDetail?: () => void;
42
+ }
43
+ export interface Action<R> {
44
+ id: string;
45
+ label: string | (() => string);
46
+ key?: string | string[];
47
+ accelerator?: string;
48
+ predicate?: (ctx: ActionContext<R>) => boolean;
49
+ visible?: (row: Row) => boolean;
50
+ handler: (ctx: ActionContext<R>) => void | Promise<void>;
51
+ destructive?: boolean;
52
+ primary?: boolean;
53
+ showInFooter?: boolean;
54
+ }
55
+ export interface ActionContext<R> {
56
+ row: Row;
57
+ rows: Row[];
58
+ item?: DetailItem;
59
+ filter: string;
60
+ refresh: () => Promise<void>;
61
+ /** Re-run detail.items for the focused row and repaint the preview pane. */
62
+ reloadDetail: () => void;
63
+ suspendAnd: <T>(fn: () => Promise<T>) => Promise<T>;
64
+ openModal: (content: {
65
+ title: string;
66
+ content: string;
67
+ }) => void;
68
+ toast: (msg: string, tone?: Tone) => void;
69
+ confirm: (prompt: string | ConfirmPromptOptions) => Promise<boolean>;
70
+ promptText: (options: {
71
+ title: string;
72
+ label: string;
73
+ initialValue?: string;
74
+ placeholder?: string;
75
+ }) => Promise<string | null>;
76
+ exit: (after?: () => void | Promise<void>) => void;
77
+ activePane?: PaneRuntimeState;
78
+ inactivePane?: PaneRuntimeState;
79
+ }
80
+ export interface ListPaneConfig {
81
+ id: string;
82
+ kind: "list";
83
+ title: string;
84
+ rows: () => Promise<Row[]>;
85
+ emptyHint?: string;
86
+ multiSelect?: boolean;
87
+ }
88
+ export interface DetailPaneConfig {
89
+ id: string;
90
+ kind: "detail";
91
+ title: string;
92
+ titleForRow?: (row: Row | undefined) => string;
93
+ render: (row: Row | undefined, ctx: DetailCtx) => string | Promise<string>;
94
+ }
95
+ export type PaneConfig = ListPaneConfig | DetailPaneConfig;
96
+ export interface PaneRuntimeState {
97
+ id: string;
98
+ title: string;
99
+ rows: Row[];
100
+ cursor: number;
101
+ selected: Set<string>;
102
+ filter: string;
103
+ }
104
+ export interface ReorderContext {
105
+ movedId: string;
106
+ refresh: () => Promise<void>;
107
+ toast: (msg: string, tone?: Tone) => void;
108
+ }
109
+ export interface ExplorerConfig<R> {
110
+ title: string;
111
+ panes?: PaneConfig[];
112
+ rows?: () => Promise<Row[]>;
113
+ refresh?: () => void | Promise<void>;
114
+ detail?: Detail<R>;
115
+ actions: Action<R>[];
116
+ reorder?: {
117
+ onReorder: (orderedIds: string[], ctx?: ReorderContext) => void | Promise<void>;
118
+ };
119
+ multiSelect?: boolean;
120
+ keybindOverrides?: Record<string, string | string[]>;
121
+ emptyHint?: string;
122
+ initialFilter?: string;
123
+ /** Synchronous first paint rows; still refreshed via `rows()` after start. */
124
+ initialRows?: Row[];
125
+ /** Disable terminal mouse reporting when native text selection is more useful than wheel input. */
126
+ mouse?: boolean;
127
+ }
128
+ export type NormalizedExplorerConfig<R> = ExplorerConfig<R> & {
129
+ rows: () => Promise<Row[]>;
130
+ detail: Detail<R>;
131
+ };
132
+ export declare function normalizeExplorerConfig<R>(config: ExplorerConfig<R>): NormalizedExplorerConfig<R>;
133
+ export declare const REGION_HEADER: number;
134
+ export declare const REGION_LIST: number;
135
+ export declare const REGION_DETAIL: number;
136
+ export declare const REGION_FOOTER: number;
137
+ export declare const REGION_MODAL: number;
138
+ export declare const REGION_TOAST: number;
139
+ export declare const REGION_ALL: number;
140
+ export type Dirty = number;
141
+ export type ExplorerLayoutMode = "wide" | "medium" | "narrow-vertical" | "narrow-list-only" | "too-narrow";
142
+ export interface ExplorerSize {
143
+ cols: number;
144
+ rows: number;
145
+ }
146
+ export interface ExplorerState {
147
+ title: string;
148
+ emptyHint: string;
149
+ rows: Row[];
150
+ rowsLoading: boolean;
151
+ filtered: number[];
152
+ matchPositions: Map<number, number[]>;
153
+ cursor: number;
154
+ filter: string;
155
+ filterFocused: boolean;
156
+ focused: "list" | "detail";
157
+ detail: {
158
+ rowId: string | null;
159
+ items: DetailItem[] | null;
160
+ allItems?: DetailItem[] | null;
161
+ filter?: string;
162
+ cursor: number;
163
+ scroll: number;
164
+ token: number;
165
+ loading: boolean;
166
+ };
167
+ selected: Set<string>;
168
+ multiSelect: boolean;
169
+ modal: null | {
170
+ kind: "help";
171
+ } | {
172
+ kind: "confirm";
173
+ title: string;
174
+ message: string;
175
+ confirmLabel: string;
176
+ cancelLabel: string;
177
+ destructive: boolean;
178
+ resolver: (ok: boolean) => void;
179
+ action?: Action<unknown>;
180
+ rows?: Row[];
181
+ } | {
182
+ kind: "input";
183
+ title: string;
184
+ label: string;
185
+ value: string;
186
+ placeholder?: string;
187
+ resolver: (value: string | null) => void;
188
+ } | {
189
+ kind: "palette";
190
+ query: string;
191
+ cursor: number;
192
+ } | {
193
+ kind: "content";
194
+ title: string;
195
+ content: string;
196
+ scroll: number;
197
+ };
198
+ toast: {
199
+ message: string;
200
+ tone: Tone;
201
+ expiresAt: number;
202
+ } | null;
203
+ dirty: Dirty;
204
+ size: ExplorerSize;
205
+ layout: ExplorerLayoutMode;
206
+ bindings: ResolvedBindings;
207
+ actionState: Map<string, ActionStateEntry>;
208
+ suspended: boolean;
209
+ paneDefinitions: Array<{
210
+ id: string;
211
+ title: string;
212
+ kind: "list" | "detail";
213
+ titleForRow?: (row: Row | undefined) => string;
214
+ }>;
215
+ }
216
+ export interface ActionStateEntry {
217
+ available: boolean;
218
+ label: string;
219
+ running?: boolean;
220
+ action?: Action<unknown>;
221
+ source?: "row" | "detail" | "both";
222
+ }
223
+ export declare function createInitialState<R>(config: ExplorerConfig<R>, size: ExplorerSize): ExplorerState;
224
+ export declare function resolveExplorerLayoutMode(cols: number, rows?: number): ExplorerLayoutMode;
@@ -0,0 +1,62 @@
1
+ export * as tokens from "./tokens/index.js";
2
+ export { brand, dark, light } from "./tokens/colors.js";
3
+ export { brands } from "./tokens/brand.js";
4
+ export type { Brand } from "./tokens/brand.js";
5
+ export type { ThemeName, ThemePalette } from "./tokens/colors.js";
6
+ export { spacing } from "./tokens/spacing.js";
7
+ export { typography } from "./tokens/typography.js";
8
+ export { widths } from "./tokens/widths.js";
9
+ export { text } from "./components/text.js";
10
+ export { color } from "./components/color.js";
11
+ export type { Color } from "./components/color.js";
12
+ export { symbols } from "./components/symbols.js";
13
+ export { createLogger, logger } from "./components/logger.js";
14
+ export type { LoggerOutput } from "./components/logger.js";
15
+ export { helpFormatter, formatColumns, formatCommand, formatUsage, formatOption, formatCommandList, formatOptionList, styleHelpToken, joinHelpTokens, renderHelpTokens } from "./components/help-formatter.js";
16
+ export * as helpFormatterPlain from "./components/help-formatter-plain.js";
17
+ export type { CommandInfo, OptionInfo, FormatColumnsOptions, HelpToken, HelpTokenRole } from "./components/help-formatter.js";
18
+ export { formatCommandNotFound } from "./components/command-errors.js";
19
+ export { formatCommandNotFoundPanel } from "./components/command-errors.js";
20
+ export { loggerTableWidth, renderTable } from "./components/table.js";
21
+ export type { TableColumn, RenderTableOptions } from "./components/table.js";
22
+ export { renderFileChanges } from "./components/file-changes.js";
23
+ export type { FileChange, FileChangeDisplayMode, FileChangeKind, FileChangeOutputFormat, RenderFileChangesOptions } from "./components/file-changes.js";
24
+ export { renderCatalog } from "./components/catalog.js";
25
+ export type { CatalogGroup, CatalogItem, CatalogMetric, CatalogTone, RenderCatalogOptions } from "./components/catalog.js";
26
+ export { renderDetailCard } from "./components/detail-card.js";
27
+ export type { DetailCardRow, DetailCardSection, RenderDetailCardOptions } from "./components/detail-card.js";
28
+ export { renderInspectorCard } from "./components/inspector-card.js";
29
+ export type { InspectorField, InspectorSection, RenderInspectorCardOptions } from "./components/inspector-card.js";
30
+ export { renderResourceBrowser } from "./components/resource-browser.js";
31
+ export type { RenderResourceBrowserOptions, ResourceBrowserGroup, ResourceBrowserItem } from "./components/resource-browser.js";
32
+ export { TemplateParseError, getTemplatePartialNames, renderTemplate, resolveTemplatePartials } from "./components/template.js";
33
+ export type { RenderTemplateOptions, TemplateEscape } from "./components/template.js";
34
+ export { openExternal } from "./components/browser.js";
35
+ export * as acp from "./acp/index.js";
36
+ export * as dashboard from "./dashboard/index.js";
37
+ export { createDashboard, shouldUseInteractiveDashboard } from "./dashboard/index.js";
38
+ export type { Dashboard, DashboardOptions } from "./dashboard/index.js";
39
+ export * as explorer from "./explorer/index.js";
40
+ export { runExplorer, singleDetail, normalizeExplorerConfig } from "./explorer/index.js";
41
+ export type { Row, DetailItem, Detail, DetailCtx, Action, ActionContext, ConfirmPromptOptions, ExplorerConfig, PaneConfig, ListPaneConfig, DetailPaneConfig, PaneRuntimeState, ReorderContext, Tone } from "./explorer/index.js";
42
+ export * as prompts from "./prompts/index.js";
43
+ export { intro, introPlain, outro, note, select, multiselect, text as promptText, confirm, confirmOrCancel, password, spinner, withSpinner, isCancel, cancel, log, PromptCancelledError } from "./prompts/index.js";
44
+ export type { SelectOptions, MultiselectOptions, TextOptions, ConfirmOptions, PasswordOptions, SpinnerOptions, WithSpinnerOptions } from "./prompts/index.js";
45
+ export { promptTheme } from "./prompts/theme.js";
46
+ export * as staticRender from "./static/index.js";
47
+ export { SPINNER_FRAMES, renderSpinnerFrame, renderSpinnerStopped, renderMenu } from "./static/index.js";
48
+ export type { SpinnerFrameOptions, SpinnerStoppedOptions, MenuOption, RenderMenuOptions } from "./static/index.js";
49
+ export { parse, render, renderHtml, renderMarkdown, renderMarkdownHtml, renderPlaintext, renderMarkdownPlaintext } from "./terminal-markdown/index.js";
50
+ export type { CodeToken, CodeTokenKind, HtmlRenderOptions, MdNode, PlaintextRenderOptions, RenderOptions } from "./terminal-markdown/index.js";
51
+ export { getTheme, resolveThemeName, resetThemeCache } from "./internal/theme-detect.js";
52
+ export type { ThemeEnv } from "./internal/theme-detect.js";
53
+ export { configureTheme, getThemeConfig, resetTheme } from "./internal/theme-state.js";
54
+ export { stripAnsi } from "./internal/strip-ansi.js";
55
+ export { resolveOutputFormat, resetOutputFormatCache, withOutputFormat } from "./internal/output-format.js";
56
+ export type { OutputFormat } from "./internal/output-format.js";
57
+ export { createTerminalDriver } from "./terminal/driver.js";
58
+ export type { TerminalDriver, TerminalInputEvent, Size as TerminalSize } from "./terminal/driver.js";
59
+ export { Screen } from "./screen/screen.js";
60
+ export type { Cell as ScreenCell, ScreenSize, ScreenSurface } from "./screen/screen.js";
61
+ export { packStyle, styleToSgrDelta } from "./screen/style.js";
62
+ export type { PackedStyle } from "./screen/style.js";
@@ -0,0 +1,6 @@
1
+ export type OutputFormat = "terminal" | "markdown" | "json";
2
+ export declare function resolveOutputFormat(env?: {
3
+ OUTPUT_FORMAT?: string;
4
+ }): OutputFormat;
5
+ export declare function withOutputFormat<T>(format: OutputFormat, fn: () => T): T;
6
+ export declare function resetOutputFormatCache(): void;
@@ -0,0 +1 @@
1
+ export declare function stripAnsi(value: string): string;
@@ -0,0 +1,12 @@
1
+ import { type ThemeName, type ThemePalette } from "../tokens/colors.js";
2
+ export interface ThemeEnv {
3
+ POE_CODE_THEME?: string;
4
+ POE_THEME?: string;
5
+ POE_BRAND?: string;
6
+ APPLE_INTERFACE_STYLE?: string;
7
+ VSCODE_COLOR_THEME_KIND?: string;
8
+ COLORFGBG?: string;
9
+ }
10
+ export declare function resolveThemeName(env?: ThemeEnv): ThemeName;
11
+ export declare function getTheme(env?: ThemeEnv): ThemePalette;
12
+ export declare function resetThemeCache(): void;