@crewx/sdk 0.9.0-rc.17 → 0.9.0-rc.170

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 (343) hide show
  1. package/README.md +1 -1
  2. package/dist/account/auth-client.d.ts +61 -0
  3. package/dist/account/auth-json-v2.d.ts +1 -0
  4. package/dist/account/auth-json.d.ts +30 -0
  5. package/dist/account/config.d.ts +37 -0
  6. package/dist/account/env-bootstrap.d.ts +11 -0
  7. package/dist/account/errors.d.ts +24 -0
  8. package/dist/account/index.d.ts +12 -0
  9. package/dist/account/index.js +2 -0
  10. package/dist/account/session-manager.d.ts +47 -0
  11. package/dist/activity-log/builder.d.ts +59 -6
  12. package/dist/agent/agent-list-view.d.ts +19 -0
  13. package/dist/agent-interceptor/chain.d.ts +25 -0
  14. package/dist/agent-interceptor/index.d.ts +6 -0
  15. package/dist/agent-interceptor/model-runner.d.ts +19 -0
  16. package/dist/agent-interceptor/program-runner.d.ts +13 -0
  17. package/dist/agent-interceptor/protocol.d.ts +68 -0
  18. package/dist/agent-interceptor/run-stop.d.ts +3 -0
  19. package/dist/agent-interceptor/schema.d.ts +267 -0
  20. package/dist/agent-interceptor/types.d.ts +88 -0
  21. package/dist/app/app.d.ts +167 -0
  22. package/dist/app/backend-env.d.ts +3 -0
  23. package/dist/app/content-media-types.d.ts +2 -0
  24. package/dist/app/context.d.ts +2 -0
  25. package/dist/app/entry.d.ts +9 -0
  26. package/dist/app/frame.d.ts +55 -0
  27. package/dist/app/index.d.ts +18 -0
  28. package/dist/app/index.js +12 -0
  29. package/dist/app/job-bridge.child.d.ts +1 -0
  30. package/dist/app/job-bridge.d.ts +67 -0
  31. package/dist/app/job-bridge.drain.child.d.ts +1 -0
  32. package/dist/app/job-bridge.example.d.ts +11 -0
  33. package/dist/app/job-contract.d.ts +40 -0
  34. package/dist/app/job-wire.d.ts +149 -0
  35. package/dist/app/protocol.d.ts +9 -0
  36. package/dist/app/runtime.d.ts +23 -0
  37. package/dist/app/schedule-contract.d.ts +59 -0
  38. package/dist/app/tool-mode.d.ts +3 -0
  39. package/dist/app-artifact-policy/check.d.ts +2 -0
  40. package/dist/app-artifact-policy/contract.d.ts +54 -0
  41. package/dist/app-artifact-policy/helper.d.ts +15 -0
  42. package/dist/app-artifact-policy/index.d.ts +3 -0
  43. package/dist/app-artifact-policy/index.js +18 -0
  44. package/dist/app-artifact-policy/paths.d.ts +24 -0
  45. package/dist/app-artifact-policy/scan.d.ts +47 -0
  46. package/dist/boxing/box.types.d.ts +4 -0
  47. package/dist/config/canonicalize-agent-options.d.ts +18 -0
  48. package/dist/config/default-agent-models.d.ts +11 -0
  49. package/dist/config/global-settings.d.ts +33 -0
  50. package/dist/config/migrate-grok-mode.d.ts +6 -0
  51. package/dist/config/model-compat.d.ts +31 -0
  52. package/dist/config/models.generated.d.ts +37 -0
  53. package/dist/config/models.remote.d.ts +1 -0
  54. package/dist/config/overdrive.d.ts +7 -0
  55. package/dist/config/pricing.d.ts +6 -3
  56. package/dist/config/pricing.generated.d.ts +4 -0
  57. package/dist/config/pricing.types.d.ts +4 -0
  58. package/dist/config/timeout.config.d.ts +4 -0
  59. package/dist/config/wi-boards.d.ts +19 -0
  60. package/dist/context-budget/continuity.d.ts +63 -0
  61. package/dist/context-budget/index.d.ts +142 -0
  62. package/dist/conversation/index.d.ts +1 -1
  63. package/dist/conversation/sqlite-provider.d.ts +6 -3
  64. package/dist/conversation/to-template-messages.d.ts +9 -0
  65. package/dist/conversation/types.d.ts +58 -1
  66. package/dist/desktop/command-runner.d.ts +4 -0
  67. package/dist/desktop/default-adapters.d.ts +4 -0
  68. package/dist/desktop/global-install.d.ts +19 -0
  69. package/dist/desktop/index.d.ts +3 -0
  70. package/dist/desktop/index.js +3 -0
  71. package/dist/desktop/install.d.ts +5 -0
  72. package/dist/desktop/lnk.d.ts +22 -0
  73. package/dist/desktop/manifest.d.ts +21 -0
  74. package/dist/desktop/types.d.ts +67 -0
  75. package/dist/desktop/version.d.ts +1 -0
  76. package/dist/desktop/windows-paths.d.ts +21 -0
  77. package/dist/desktop/wrapper.d.ts +18 -0
  78. package/dist/esm/account/index.js +2 -0
  79. package/dist/esm/app/index.js +12 -0
  80. package/dist/esm/app-artifact-policy/index.js +18 -0
  81. package/dist/esm/desktop/index.js +3 -0
  82. package/dist/esm/index.js +1175 -224
  83. package/dist/esm/node/index.js +2 -0
  84. package/dist/esm/plugins/index.js +527 -214
  85. package/dist/esm/process/index.js +1 -0
  86. package/dist/esm/publish/index.js +2 -0
  87. package/dist/esm/repository/index.js +648 -211
  88. package/dist/esm/skills/index.js +2 -0
  89. package/dist/esm/testing/index.js +1 -1
  90. package/dist/events/types.d.ts +28 -0
  91. package/dist/facade/Crewx.d.ts +70 -5
  92. package/dist/facade/task-ticket.d.ts +14 -0
  93. package/dist/highlight/thread-highlight-prompt.d.ts +2 -0
  94. package/dist/highlight/thread-highlighter.d.ts +326 -0
  95. package/dist/index.browser.d.ts +25 -1
  96. package/dist/index.browser.js +6 -2
  97. package/dist/index.d.ts +157 -17
  98. package/dist/index.js +1175 -224
  99. package/dist/internal/console-decoder.d.ts +38 -0
  100. package/dist/internal/windows-spawn.d.ts +10 -0
  101. package/dist/layout/types.d.ts +18 -1
  102. package/dist/lifecycle/process-lease.d.ts +80 -0
  103. package/dist/lifecycle/process-owner.d.ts +20 -0
  104. package/dist/lifecycle/task-heartbeat.d.ts +41 -0
  105. package/dist/lifecycle/task-stop.d.ts +82 -0
  106. package/dist/lifecycle/update-admission.d.ts +45 -0
  107. package/dist/local-server/base-url.d.ts +18 -0
  108. package/dist/local-server/index.d.ts +8 -0
  109. package/dist/local-server/opencode.d.ts +8 -0
  110. package/dist/local-server/probe.d.ts +3 -0
  111. package/dist/local-server/runtime.d.ts +26 -0
  112. package/dist/local-server/types.d.ts +43 -0
  113. package/dist/mcp-app/agent-access.d.ts +26 -0
  114. package/dist/mcp-app/app-handoff.d.ts +109 -0
  115. package/dist/mcp-app/app-icon-read.d.ts +7 -0
  116. package/dist/mcp-app/app-job-bridge.d.ts +30 -0
  117. package/dist/mcp-app/app-job-bridge.example.d.ts +36 -0
  118. package/dist/mcp-app/app-job.d.ts +168 -0
  119. package/dist/mcp-app/app-schedule.d.ts +85 -0
  120. package/dist/mcp-app/apps-context.d.ts +32 -0
  121. package/dist/mcp-app/bundle-provenance.d.ts +3 -0
  122. package/dist/mcp-app/candidate-registration.d.ts +4 -0
  123. package/dist/mcp-app/card-handler.d.ts +7 -0
  124. package/dist/mcp-app/catalog.d.ts +7 -0
  125. package/dist/mcp-app/content-channel.d.ts +86 -0
  126. package/dist/mcp-app/content-declarations.d.ts +31 -0
  127. package/dist/mcp-app/dev-checks.d.ts +31 -0
  128. package/dist/mcp-app/diagnostic-reason.d.ts +3 -0
  129. package/dist/mcp-app/discovery.d.ts +164 -0
  130. package/dist/mcp-app/errors.d.ts +7 -0
  131. package/dist/mcp-app/index.d.ts +45 -0
  132. package/dist/mcp-app/installed-app-ref.d.ts +25 -0
  133. package/dist/mcp-app/model-context.d.ts +29 -0
  134. package/dist/mcp-app/node-app-discovery-fs.d.ts +23 -0
  135. package/dist/mcp-app/product-bundle-assets.d.ts +27 -0
  136. package/dist/mcp-app/product-bundle-loader.d.ts +53 -0
  137. package/dist/mcp-app/projection.d.ts +14 -0
  138. package/dist/mcp-app/prompt-cards.d.ts +28 -0
  139. package/dist/mcp-app/registry.d.ts +28 -0
  140. package/dist/mcp-app/skill-backend.d.ts +141 -0
  141. package/dist/mcp-app/state-set.d.ts +9 -0
  142. package/dist/mcp-app/types.d.ts +488 -0
  143. package/dist/mcp-app/workspace-app-assets.d.ts +42 -0
  144. package/dist/mcp-app/workspace-app-scan-cache.d.ts +27 -0
  145. package/dist/mcp-app/workspace-snapshot.d.ts +75 -0
  146. package/dist/migrations/0011_far_black_tarantula.sql +1 -0
  147. package/dist/migrations/0012_blue_turbo.sql +23 -0
  148. package/dist/migrations/0013_hesitant_adam_destine.sql +15 -0
  149. package/dist/migrations/0014_organic_mongu.sql +73 -0
  150. package/dist/migrations/0015_panoramic_gorilla_man.sql +71 -0
  151. package/dist/migrations/0016_fuzzy_hemingway.sql +14 -0
  152. package/dist/migrations/0017_project_stage_sdk_migration.sql +29 -0
  153. package/dist/migrations/0018_bored_jackal.sql +33 -0
  154. package/dist/migrations/0019_backfill_task_thread_ids.sql +74 -0
  155. package/dist/migrations/0020_useful_iron_lad.sql +55 -0
  156. package/dist/migrations/0021_dashing_peter_quill.sql +51 -0
  157. package/dist/migrations/0022_wandering_bucky.sql +1 -0
  158. package/dist/migrations/0023_red_payback.sql +1 -0
  159. package/dist/migrations/0024_storage_metadata.sql +262 -0
  160. package/dist/migrations/0025_task_heartbeat.sql +8 -0
  161. package/dist/migrations/0025_thread_app_instance_ledger.sql +2 -0
  162. package/dist/migrations/0026_mcp_action_source.sql +47 -0
  163. package/dist/migrations/0027_task_stop_scope_cleanup.sql +5 -0
  164. package/dist/migrations/0027_ui_instance_active_unique.sql +2 -0
  165. package/dist/migrations/0029_nice_rhino.sql +1 -0
  166. package/dist/migrations/0031_petite_arclight.sql +6 -0
  167. package/dist/migrations/0032_ui_instance_opened_by.sql +1 -0
  168. package/dist/migrations/0033_thread_creator_boundary_guard.sql +38 -0
  169. package/dist/migrations/0034_keen_fallen_one.sql +36 -0
  170. package/dist/migrations/0035_request_log_daily.sql +11 -0
  171. package/dist/migrations/0036_ui_definition_archive.sql +8 -0
  172. package/dist/migrations/0037_ui_instance_agent_open_request.sql +1 -0
  173. package/dist/migrations/0038_task_rating.sql +3 -0
  174. package/dist/migrations/0039_aspiring_purifiers.sql +9 -0
  175. package/dist/migrations/0040_task_provider_inputs.sql +53 -0
  176. package/dist/migrations/0041_tranquil_vivisector.sql +54 -0
  177. package/dist/migrations/meta/0011_snapshot.json +1342 -0
  178. package/dist/migrations/meta/0012_snapshot.json +1494 -0
  179. package/dist/migrations/meta/0013_snapshot.json +1592 -0
  180. package/dist/migrations/meta/0014_snapshot.json +1975 -0
  181. package/dist/migrations/meta/0015_snapshot.json +2315 -0
  182. package/dist/migrations/meta/0016_snapshot.json +2419 -0
  183. package/dist/migrations/meta/0017_snapshot.json +2419 -0
  184. package/dist/migrations/meta/0018_snapshot.json +2570 -0
  185. package/dist/migrations/meta/0020_snapshot.json +2895 -0
  186. package/dist/migrations/meta/0021_snapshot.json +3031 -0
  187. package/dist/migrations/meta/0022_snapshot.json +3039 -0
  188. package/dist/migrations/meta/0023_snapshot.json +3047 -0
  189. package/dist/migrations/meta/0029_snapshot.json +3206 -0
  190. package/dist/migrations/meta/0031_snapshot.json +3251 -0
  191. package/dist/migrations/meta/0034_snapshot.json +3473 -0
  192. package/dist/migrations/meta/0035_snapshot.json +3547 -0
  193. package/dist/migrations/meta/0036_snapshot.json +3591 -0
  194. package/dist/migrations/meta/0037_snapshot.json +3598 -0
  195. package/dist/migrations/meta/0038_snapshot.json +3626 -0
  196. package/dist/migrations/meta/0039_snapshot.json +3684 -0
  197. package/dist/migrations/meta/0040_snapshot.json +3759 -0
  198. package/dist/migrations/meta/0041_snapshot.json +4156 -0
  199. package/dist/migrations/meta/_journal.json +217 -0
  200. package/dist/node/index.d.ts +1 -0
  201. package/dist/node/index.js +2 -0
  202. package/dist/paths.d.ts +1 -0
  203. package/dist/plugin/types.d.ts +1 -0
  204. package/dist/plugins/index.d.ts +1 -1
  205. package/dist/plugins/index.js +527 -214
  206. package/dist/plugins/sqlite-tracing.d.ts +46 -0
  207. package/dist/process/index.d.ts +2 -0
  208. package/dist/process/index.js +1 -0
  209. package/dist/process/process-control.d.ts +60 -0
  210. package/dist/prompt/tag-names.d.ts +22 -0
  211. package/dist/provider/acp/connection.d.ts +6 -0
  212. package/dist/provider/acp/meta.d.ts +11 -0
  213. package/dist/provider/bridge.d.ts +12 -2
  214. package/dist/provider/classify-task-error.d.ts +2 -0
  215. package/dist/provider/claude-agent-env.d.ts +1 -0
  216. package/dist/provider/cli/adapter.types.d.ts +23 -2
  217. package/dist/provider/cli/adapters/agent-call.util.d.ts +1 -1
  218. package/dist/provider/cli/adapters/cli-knob.util.d.ts +7 -0
  219. package/dist/provider/cli/adapters/codex-item.d.ts +1 -0
  220. package/dist/provider/cli/adapters/event-timestamp.util.d.ts +1 -0
  221. package/dist/provider/cli/adapters/grok.d.ts +2 -0
  222. package/dist/provider/cli/adapters/index.d.ts +5 -0
  223. package/dist/provider/cli/index.d.ts +3 -2
  224. package/dist/provider/cli/meta.d.ts +5 -0
  225. package/dist/provider/cli/protocol-envelope.d.ts +3 -0
  226. package/dist/provider/errors.d.ts +5 -1
  227. package/dist/provider/idle-watchdog.d.ts +19 -0
  228. package/dist/provider/models.d.ts +17 -12
  229. package/dist/provider/order.d.ts +1 -1
  230. package/dist/provider/parse-usage.d.ts +6 -0
  231. package/dist/provider/provider-selection.d.ts +8 -0
  232. package/dist/provider/redact-technical-message.d.ts +1 -0
  233. package/dist/provider/task-error.types.d.ts +17 -0
  234. package/dist/provider-account/accounts.d.ts +15 -0
  235. package/dist/provider-account/index.d.ts +5 -0
  236. package/dist/provider-account/registry.d.ts +30 -0
  237. package/dist/provider-account/types.d.ts +40 -0
  238. package/dist/publish/constants.d.ts +6 -0
  239. package/dist/publish/errors.d.ts +7 -0
  240. package/dist/publish/index.d.ts +55 -0
  241. package/dist/publish/index.js +2 -0
  242. package/dist/publish/manifest.d.ts +47 -0
  243. package/dist/publish/marketplace-api.constants.d.ts +1 -0
  244. package/dist/publish/pack.d.ts +6 -0
  245. package/dist/publish/scan.d.ts +10 -0
  246. package/dist/publish/secrets.d.ts +6 -0
  247. package/dist/publish/upload.d.ts +19 -0
  248. package/dist/remote/execution-profile.d.ts +9 -0
  249. package/dist/remote/index.d.ts +1 -0
  250. package/dist/remote/types.d.ts +28 -0
  251. package/dist/repository/agent-send-history.repository.d.ts +23 -0
  252. package/dist/repository/agent-suggestion.repository.d.ts +34 -0
  253. package/dist/repository/base-sqlite-repository.d.ts +1 -0
  254. package/dist/repository/common-code.repository.d.ts +45 -0
  255. package/dist/repository/db.d.ts +12 -1
  256. package/dist/repository/index.d.ts +53 -6
  257. package/dist/repository/index.js +648 -211
  258. package/dist/repository/logs-db.d.ts +12 -0
  259. package/dist/repository/notification.repository.d.ts +58 -0
  260. package/dist/repository/project.repository.d.ts +90 -0
  261. package/dist/repository/public-task-answer.d.ts +24 -0
  262. package/dist/repository/request-log-mover.d.ts +70 -0
  263. package/dist/repository/request-log.repository.d.ts +7 -3
  264. package/dist/repository/sidebar-tab.repository.d.ts +86 -0
  265. package/dist/repository/storage-metadata.repository.d.ts +64 -0
  266. package/dist/repository/task-log-migration.d.ts +74 -0
  267. package/dist/repository/task-log.repository.d.ts +44 -0
  268. package/dist/repository/task-status.d.ts +21 -0
  269. package/dist/repository/task.repository.d.ts +307 -8
  270. package/dist/repository/thread-history.repository.d.ts +193 -0
  271. package/dist/repository/thread-origin-verdict.d.ts +27 -0
  272. package/dist/repository/thread-title.types.d.ts +29 -0
  273. package/dist/repository/thread.repository.d.ts +134 -5
  274. package/dist/repository/usage-backfill.d.ts +62 -0
  275. package/dist/repository/usage-from-logs.d.ts +21 -0
  276. package/dist/repository/workspace.repository.d.ts +3 -0
  277. package/dist/schema/agent-send-history.d.ts +85 -0
  278. package/dist/schema/agent-suggestions.d.ts +199 -0
  279. package/dist/schema/common-codes.d.ts +216 -0
  280. package/dist/schema/index.d.ts +16 -0
  281. package/dist/schema/notifications.d.ts +303 -0
  282. package/dist/schema/projects.d.ts +610 -0
  283. package/dist/schema/request-log-daily.d.ts +151 -0
  284. package/dist/schema/sidebar-tabs.d.ts +466 -0
  285. package/dist/schema/storage-metadata.d.ts +181 -0
  286. package/dist/schema/task-log-events.d.ts +119 -0
  287. package/dist/schema/task-provider-inputs.d.ts +100 -0
  288. package/dist/schema/tasks.d.ts +1058 -1
  289. package/dist/schema/thread-creator-unverified.d.ts +45 -0
  290. package/dist/schema/thread-history.d.ts +734 -0
  291. package/dist/schema/threads.d.ts +59 -0
  292. package/dist/schema/ui-action-receipts.d.ts +358 -0
  293. package/dist/schema/ui-definition-archive.d.ts +63 -0
  294. package/dist/schema/ui-instance-repins.d.ts +222 -0
  295. package/dist/schema/ui-instances.d.ts +324 -0
  296. package/dist/schema/workspaces.d.ts +17 -0
  297. package/dist/skills/index.d.ts +15 -0
  298. package/dist/skills/index.js +2 -0
  299. package/dist/skills/types.d.ts +18 -0
  300. package/dist/task-log/anchor-child-tasks.d.ts +7 -0
  301. package/dist/task-log/delegation-trailer.d.ts +34 -0
  302. package/dist/template/engine.d.ts +2 -2
  303. package/dist/template/helpers/exec.browser.d.ts +4 -3
  304. package/dist/template/helpers/exec.d.ts +4 -3
  305. package/dist/template/helpers/format-conversation.d.ts +1 -0
  306. package/dist/template/types.d.ts +20 -0
  307. package/dist/testing/index.js +1 -1
  308. package/dist/types/index.d.ts +1611 -3
  309. package/dist/types/task-log.types.d.ts +6 -1
  310. package/dist/ui-card/index.d.ts +2 -0
  311. package/dist/ui-card/legacy-card-parser.d.ts +11 -0
  312. package/dist/ui-instance/definition.d.ts +6 -0
  313. package/dist/ui-instance/errors.d.ts +18 -0
  314. package/dist/ui-instance/index.d.ts +11 -0
  315. package/dist/ui-instance/json.d.ts +19 -0
  316. package/dist/ui-instance/lineage.d.ts +24 -0
  317. package/dist/ui-instance/runtime.d.ts +19 -0
  318. package/dist/ui-instance/store.d.ts +213 -0
  319. package/dist/ui-instance/types.d.ts +343 -0
  320. package/dist/ui-plugin/app-icon.d.ts +50 -0
  321. package/dist/ui-plugin/app-manifest.d.ts +64 -0
  322. package/dist/ui-plugin/csp.d.ts +28 -0
  323. package/dist/ui-plugin/index.d.ts +8 -0
  324. package/dist/ui-plugin/limits.d.ts +27 -0
  325. package/dist/ui-plugin/manifest.d.ts +3 -0
  326. package/dist/ui-plugin/types.d.ts +207 -0
  327. package/dist/ui-plugin/validator.d.ts +18 -0
  328. package/dist/utils/crewx-executable.d.ts +76 -0
  329. package/dist/utils/crewx-home.d.ts +1 -0
  330. package/dist/utils/env-defaults.d.ts +3 -0
  331. package/dist/utils/id.d.ts +1 -1
  332. package/dist/utils/local-identity.d.ts +2 -0
  333. package/dist/utils/runner-env.d.ts +3 -0
  334. package/dist/utils/timestamp.d.ts +1 -0
  335. package/dist/utils/workspace.d.ts +1 -0
  336. package/dist/wi/create.d.ts +48 -0
  337. package/dist/wi/select.d.ts +20 -0
  338. package/package.json +63 -3
  339. package/templates/agents/default.yaml +303 -128
  340. package/templates/documents/crewx-manual.md +138 -138
  341. package/templates/documents/crewx-quick-guide.md +8 -7
  342. package/templates/workflows/wi-default-flow.yaml +65 -0
  343. package/templates/workflows/wi-plan-flow.yaml +140 -0
@@ -0,0 +1,30 @@
1
+ import { type AppJobChannel, type AppJobView, type AppJobWireHandle } from '../app/job-wire.js';
2
+ import type { AppJobOperation, AppJobStopReason, AppJobTrigger } from '../app/job-contract.js';
3
+ import { AppJobCoordinator, type AppJobHandle, type AppJobLaunchRequest, type AppJobOwner, type AppJobSnapshot, type ResolvedAppJob } from './app-job.js';
4
+ export interface AppJobControlSession {
5
+ readonly coordinator: AppJobCoordinator;
6
+ readonly owner: AppJobOwner;
7
+ readonly definitionHash: string;
8
+ readonly job: ResolvedAppJob | undefined;
9
+ readonly actionId: string;
10
+ readonly operations: readonly AppJobOperation[];
11
+ readonly trigger: AppJobTrigger;
12
+ }
13
+ export type AppJobControlAnswer = {
14
+ readonly kind: 'reply';
15
+ readonly line: string;
16
+ } | {
17
+ readonly kind: 'close';
18
+ readonly code: 'APP_JOB_BRIDGE_INVALID';
19
+ };
20
+ export declare function answerAppJobControlLine(session: AppJobControlSession, line: string): AppJobControlAnswer;
21
+ export interface AppJobRunBinding {
22
+ readonly coordinator: AppJobCoordinator;
23
+ readonly handle: AppJobHandle;
24
+ }
25
+ export type AppJobRunAnswer = 'accepted' | 'ignored' | 'invalid';
26
+ export declare function answerAppJobRunLine(binding: AppJobRunBinding, line: string): AppJobRunAnswer;
27
+ export declare function encodeAppJobStopPush(handle: AppJobWireHandle, reason: AppJobStopReason): string;
28
+ export declare function toAppJobView(snapshot: AppJobSnapshot): AppJobView;
29
+ export declare function buildAppJobRunChannel(request: Pick<AppJobLaunchRequest, 'handle'>, fd: number): AppJobChannel;
30
+ export declare function buildAppJobControlChannel(operations: readonly AppJobOperation[], fd: number): AppJobChannel;
@@ -0,0 +1,36 @@
1
+ import type { UiDefinitionInput } from '../ui-instance/types.js';
2
+ import { type AppJobControlSession } from './app-job-bridge.js';
3
+ import { AppJobCoordinator, type AppJobOwner } from './app-job.js';
4
+ export declare const CODE_MAP_HOST_FD = 3;
5
+ export interface HostPipeEnd {
6
+ write(line: string): void;
7
+ onData(listener: (chunk: string) => void): void;
8
+ onEnd(listener: () => void): void;
9
+ close(): void;
10
+ }
11
+ export interface HostChild {
12
+ readonly pipe: HostPipeEnd;
13
+ kill(): Promise<void>;
14
+ }
15
+ export type HostSpawn = (options: {
16
+ readonly env: Readonly<Record<string, string>>;
17
+ readonly fd: number;
18
+ }) => HostChild;
19
+ export interface CodeMapHostOptions {
20
+ readonly owner: AppJobOwner;
21
+ readonly definitionHash: string;
22
+ readonly definition: UiDefinitionInput;
23
+ readonly spawnRun: HostSpawn;
24
+ readonly now: () => number;
25
+ readonly stopGraceMs?: number;
26
+ readonly newRunId?: () => string;
27
+ }
28
+ export interface CodeMapHost {
29
+ readonly coordinator: AppJobCoordinator;
30
+ sessionFor(call: {
31
+ readonly actionId: string;
32
+ readonly actorKind: 'user' | 'agent' | 'schedule';
33
+ }): AppJobControlSession;
34
+ serveControlChild(session: AppJobControlSession, pipe: HostPipeEnd): void;
35
+ }
36
+ export declare function createCodeMapHost(options: CodeMapHostOptions): CodeMapHost;
@@ -0,0 +1,168 @@
1
+ import { type AppJobOutcome, type AppJobRefusalCode, type AppJobState, type AppJobStopReason, type AppJobTrigger } from '../app/job-contract.js';
2
+ export type { AppJobRefusalCode, AppJobStopReason } from '../app/job-contract.js';
3
+ import type { UiDefinitionInput } from '../ui-instance/types.js';
4
+ import type { AppScheduleOwnerSource } from './app-schedule.js';
5
+ export interface AppJobOwner {
6
+ readonly workspaceId: string;
7
+ readonly appId: string;
8
+ readonly source: AppScheduleOwnerSource;
9
+ }
10
+ export interface ResolvedAppJob {
11
+ readonly actionId: string;
12
+ readonly deadlineMs: number;
13
+ }
14
+ export declare function resolveDeclaredJob(definition: Pick<UiDefinitionInput, 'actions'>): ResolvedAppJob | undefined;
15
+ export declare function appJobOwnerKey(owner: AppJobOwner): string;
16
+ export interface AppJobError {
17
+ readonly code: string;
18
+ readonly recoverable: boolean;
19
+ }
20
+ export interface AppJobHandle {
21
+ readonly runId: string;
22
+ readonly generation: number;
23
+ readonly ownerKey: string;
24
+ }
25
+ export interface AppJobLaunchRequest {
26
+ readonly handle: AppJobHandle;
27
+ readonly owner: AppJobOwner;
28
+ readonly actionId: string;
29
+ readonly definitionHash: string;
30
+ readonly deadlineMs: number;
31
+ readonly trigger: AppJobTrigger;
32
+ readonly resumeFromRunId: string | null;
33
+ }
34
+ export interface AppJobExecutionPort {
35
+ launch(request: AppJobLaunchRequest): Promise<string>;
36
+ requestStop(ref: string): Promise<void>;
37
+ terminate(ref: string): Promise<void>;
38
+ }
39
+ export type AppJobReport = {
40
+ readonly kind: 'heartbeat';
41
+ } | {
42
+ readonly kind: 'progress';
43
+ readonly phase: string;
44
+ readonly completed?: number;
45
+ readonly total?: number;
46
+ readonly resumable?: boolean;
47
+ } | {
48
+ readonly kind: 'completed';
49
+ } | {
50
+ readonly kind: 'failed';
51
+ readonly code: string;
52
+ readonly recoverable: boolean;
53
+ } | {
54
+ readonly kind: 'exited';
55
+ };
56
+ export type AppJobReportResult = 'accepted' | 'ignored' | 'invalid';
57
+ export interface AppJobStartRequest {
58
+ readonly owner: AppJobOwner;
59
+ readonly definitionHash: string;
60
+ readonly job: ResolvedAppJob | undefined;
61
+ readonly trigger: AppJobTrigger;
62
+ readonly authorizedActionId: string;
63
+ }
64
+ export type AppJobStartRefusalCode = Extract<AppJobRefusalCode, ('APP_JOB_NOT_DECLARED' | 'APP_JOB_NOT_AUTHORIZED' | 'APP_JOB_SELF_START' | 'APP_JOB_OWNER_INVALID' | 'APP_JOB_DEFINITION_INVALID' | 'APP_JOB_DEFINITION_CHANGED' | 'APP_JOB_DEADLINE_INVALID' | 'APP_JOB_SHUTTING_DOWN')>;
65
+ export type AppJobStartResult = {
66
+ readonly kind: 'started';
67
+ readonly snapshot: AppJobSnapshot;
68
+ } | {
69
+ readonly kind: 'attached';
70
+ readonly snapshot: AppJobSnapshot;
71
+ } | {
72
+ readonly kind: 'refused';
73
+ readonly code: AppJobStartRefusalCode;
74
+ };
75
+ export type AppJobCancelRefusalCode = 'APP_JOB_OWNER_MISMATCH' | 'APP_JOB_STALE_HANDLE' | 'APP_JOB_NOT_ACTIVE';
76
+ export type AppJobCancelResult = {
77
+ readonly kind: 'stopping';
78
+ readonly snapshot: AppJobSnapshot;
79
+ } | {
80
+ readonly kind: 'refused';
81
+ readonly code: AppJobCancelRefusalCode;
82
+ };
83
+ export interface AppJobSnapshot {
84
+ readonly handle: AppJobHandle;
85
+ readonly state: AppJobState;
86
+ readonly stopReason: AppJobStopReason | null;
87
+ readonly trigger: AppJobTrigger;
88
+ readonly definitionHash: string;
89
+ readonly resumedFromRunId: string | null;
90
+ readonly outcome: AppJobOutcome | null;
91
+ readonly phase: string | null;
92
+ readonly completed: number | null;
93
+ readonly total: number | null;
94
+ readonly resumable: boolean;
95
+ readonly lastHeartbeatAt: string | null;
96
+ readonly startedAt: string;
97
+ readonly finishedAt: string | null;
98
+ readonly error: AppJobError | null;
99
+ }
100
+ export interface AppJobRecord {
101
+ readonly runId: string;
102
+ readonly owner: AppJobOwner;
103
+ readonly generation: number;
104
+ readonly actionId: string;
105
+ readonly definitionHash: string;
106
+ readonly deadlineMs: number;
107
+ readonly trigger: AppJobTrigger;
108
+ readonly resumedFromRunId: string | null;
109
+ readonly state: AppJobState;
110
+ readonly outcome: AppJobOutcome | null;
111
+ readonly phase: string | null;
112
+ readonly completed: number | null;
113
+ readonly total: number | null;
114
+ readonly resumable: boolean;
115
+ readonly startedAt: number;
116
+ readonly lastHeartbeatAt: number | null;
117
+ readonly finishedAt: number | null;
118
+ readonly error: AppJobError | null;
119
+ }
120
+ export interface AppJobEvent {
121
+ readonly kind: 'started' | 'attached' | 'stop_requested' | 'finished';
122
+ readonly runId: string;
123
+ readonly generation: number;
124
+ readonly owner: AppJobOwner;
125
+ readonly trigger: AppJobTrigger;
126
+ readonly stopReason: AppJobStopReason | null;
127
+ readonly outcome: AppJobOutcome | null;
128
+ readonly errorCode: string | null;
129
+ readonly at: string;
130
+ }
131
+ export interface AppJobCoordinatorOptions {
132
+ readonly port: AppJobExecutionPort;
133
+ readonly now: () => number;
134
+ readonly records?: readonly AppJobRecord[];
135
+ readonly onEvent?: (event: AppJobEvent) => void;
136
+ readonly newRunId?: () => string;
137
+ readonly stopGraceMs?: number;
138
+ }
139
+ export declare class AppJobCoordinator {
140
+ private readonly port;
141
+ private readonly now;
142
+ private readonly newRunId;
143
+ private readonly onEvent;
144
+ private readonly stopGraceMs;
145
+ private readonly runs;
146
+ private readonly latestByOwner;
147
+ private readonly drainWaiters;
148
+ private shuttingDown;
149
+ constructor(options: AppJobCoordinatorOptions);
150
+ start(request: AppJobStartRequest): AppJobStartResult;
151
+ cancel(handle: AppJobHandle): AppJobCancelResult;
152
+ report(handle: AppJobHandle, report: AppJobReport): AppJobReportResult;
153
+ status(owner: AppJobOwner): AppJobSnapshot | null;
154
+ tick(): void;
155
+ shutdown(): Promise<void>;
156
+ records(): readonly AppJobRecord[];
157
+ private launch;
158
+ private beginStop;
159
+ private requestStop;
160
+ private terminate;
161
+ private finish;
162
+ private restore;
163
+ private settle;
164
+ private emit;
165
+ private unfinishedCount;
166
+ private drain;
167
+ private snapshot;
168
+ }
@@ -0,0 +1,85 @@
1
+ import { type SkillBackendExecutionRequest, type SkillBackendPayloadV1 } from './skill-backend.js';
2
+ import { type AppScheduleIntervalMinutes, type AppSchedulePeriodicReason, type AppScheduleRunVerdict, type AppScheduleSnapshot } from '../app/schedule-contract.js';
3
+ import type { UiDefinitionInput } from '../ui-instance/types.js';
4
+ import type { WorkspaceAppSource } from './discovery.js';
5
+ export { decideScheduleDirective } from '../app/schedule-contract.js';
6
+ export type { AppScheduleActorKind, ScheduleDirectiveDecision } from '../app/schedule-contract.js';
7
+ export type AppScheduleOwnerSource = WorkspaceAppSource | 'bundled';
8
+ export interface AppScheduleOwner {
9
+ readonly appId: string;
10
+ readonly actionId: string;
11
+ readonly source: AppScheduleOwnerSource;
12
+ }
13
+ export interface AppScheduleBinding extends AppScheduleOwner {
14
+ readonly enabled: boolean;
15
+ }
16
+ export interface ResolvedAppSchedule {
17
+ readonly actionId: string;
18
+ readonly everyMinutes: AppScheduleIntervalMinutes;
19
+ readonly timeoutMs: number;
20
+ }
21
+ export interface AppScheduleTemplate {
22
+ readonly cron: string;
23
+ readonly timeout_ms: number;
24
+ readonly name: string | null;
25
+ }
26
+ export interface AppScheduleRowView extends AppScheduleTemplate {
27
+ readonly id: string;
28
+ readonly app: AppScheduleBinding;
29
+ readonly last_started_at?: string;
30
+ readonly last_run?: string;
31
+ readonly last_outcome?: string;
32
+ readonly last_error_code?: string;
33
+ readonly next_run?: string | null;
34
+ }
35
+ export type AppScheduleAvailability = {
36
+ readonly periodic: 'available';
37
+ } | {
38
+ readonly periodic: 'unavailable';
39
+ readonly reason: AppSchedulePeriodicReason;
40
+ };
41
+ export type ScheduleLifecycleEntry = {
42
+ readonly kind: 'absent';
43
+ } | {
44
+ readonly kind: 'invalid';
45
+ } | {
46
+ readonly kind: 'verified';
47
+ readonly source: AppScheduleOwnerSource;
48
+ readonly declaration: ResolvedAppSchedule | undefined;
49
+ readonly name: string | null;
50
+ };
51
+ export type AppScheduledRunPayload = SkillBackendPayloadV1 & {
52
+ readonly schedule: AppScheduleSnapshot;
53
+ };
54
+ export interface AppScheduledRunPlan {
55
+ readonly actorKind: 'schedule';
56
+ readonly instanceId: string;
57
+ readonly threadId: null;
58
+ readonly actionId: string;
59
+ readonly payload: AppScheduledRunPayload;
60
+ }
61
+ export type ScheduledAppLaunchRequest = AppScheduledRunPlan & Pick<SkillBackendExecutionRequest, 'appId' | 'definitionId' | 'definitionVersion' | 'definitionHash' | 'command' | 'entry' | 'relativePath'>;
62
+ export type ScheduleLifecyclePlan = {
63
+ readonly kind: 'run';
64
+ readonly run: AppScheduledRunPlan;
65
+ } | {
66
+ readonly kind: 'refresh';
67
+ readonly owner: AppScheduleOwner;
68
+ readonly template: AppScheduleTemplate;
69
+ } | {
70
+ readonly kind: 'skip';
71
+ readonly code: 'APP_INVALID' | 'APP_SCHEDULE_OFF';
72
+ } | {
73
+ readonly kind: 'disable';
74
+ readonly code: 'APP_SCHEDULE_UNDECLARED' | 'APP_SCHEDULE_SOURCE_CHANGED';
75
+ } | {
76
+ readonly kind: 'remove';
77
+ readonly code: 'APP_MISSING';
78
+ };
79
+ export declare function cronExpressionForInterval(everyMinutes: AppScheduleIntervalMinutes): string;
80
+ export declare function appScheduleCommandLabel(owner: Pick<AppScheduleOwner, 'appId' | 'actionId'>): string;
81
+ export declare function resolveDeclaredSchedule(definition: Pick<UiDefinitionInput, 'actions'>): ResolvedAppSchedule | undefined;
82
+ export declare function scheduleTemplateFor(declaration: ResolvedAppSchedule, name: string | null): AppScheduleTemplate;
83
+ export declare function toScheduleSnapshot(row: Pick<AppScheduleRowView, 'app' | 'last_started_at' | 'last_run' | 'last_outcome' | 'last_error_code' | 'next_run'> | undefined, declared: Pick<ResolvedAppSchedule, 'everyMinutes'>, availability: AppScheduleAvailability): AppScheduleSnapshot;
84
+ export declare function toScheduledRunVerdict(response: unknown): AppScheduleRunVerdict;
85
+ export declare function planScheduledFire(row: AppScheduleRowView, entry: ScheduleLifecycleEntry, availability: AppScheduleAvailability): ScheduleLifecyclePlan;
@@ -0,0 +1,32 @@
1
+ import type { McpAppLayoutSnapshot, McpAppStateDescriptor } from './types.js';
2
+ import type { McpAppModelContext } from './model-context.js';
3
+ export interface McpAppsContext {
4
+ readonly rendered: string;
5
+ readonly guidanceRendered?: string;
6
+ readonly available?: ReadonlyArray<{
7
+ readonly id: string;
8
+ readonly name: string;
9
+ readonly description: string;
10
+ readonly agent: 'direct' | 'approval' | 'none';
11
+ readonly usage?: 'card' | 'window';
12
+ }>;
13
+ readonly availableRendered?: string;
14
+ }
15
+ export interface McpAppsContextOptions {
16
+ readonly cli?: string;
17
+ readonly available?: McpAppsContext['available'];
18
+ readonly appLayoutSnapshot?: McpAppLayoutSnapshot;
19
+ }
20
+ export declare const MCP_APPS_AVAILABLE_MAX_BYTES: number;
21
+ export declare function buildMcpAppsContext(descriptors: readonly McpAppStateDescriptor[] | undefined, modelContext?: McpAppModelContext, optionsOrAvailable?: McpAppsContextOptions | McpAppsContext['available']): McpAppsContext | undefined;
22
+ export declare function attachAvailableApps(context: McpAppsContext | undefined, available: McpAppsContext['available'], cli?: string): McpAppsContext | undefined;
23
+ export interface RunningInstructionApps {
24
+ readonly guidanceRendered?: string;
25
+ readonly rendered?: string;
26
+ readonly omittedCount: number;
27
+ }
28
+ export declare function buildRunningInstructionApps(descriptors: readonly McpAppStateDescriptor[] | undefined, options?: {
29
+ readonly cli?: string;
30
+ readonly modelContext?: McpAppModelContext;
31
+ readonly appLayoutSnapshot?: McpAppLayoutSnapshot;
32
+ }): RunningInstructionApps;
@@ -0,0 +1,3 @@
1
+ export declare function markVerifiedProductAppBundleProvenance<T extends object>(value: T, executableRelativePath?: string): T;
2
+ export declare function isVerifiedProductAppBundleProvenance(value: unknown): value is object;
3
+ export declare function getVerifiedProductAppBundleExecutable(value: unknown): string | undefined;
@@ -0,0 +1,4 @@
1
+ import type { WorkspaceAppCandidate } from './discovery.js';
2
+ import type { McpAppLocalRegistration } from './types.js';
3
+ export declare function buildWorkspaceCandidateRegistration(candidate: WorkspaceAppCandidate): McpAppLocalRegistration;
4
+ export declare function validateWorkspaceCandidateRegistration(candidate: WorkspaceAppCandidate): void;
@@ -0,0 +1,7 @@
1
+ export declare const MCP_APP_CARD_HANDLERS: readonly ["card.secret-env"];
2
+ export type McpAppCardHandler = (typeof MCP_APP_CARD_HANDLERS)[number];
3
+ export declare function isMcpAppCardHandler(handler: unknown): handler is McpAppCardHandler;
4
+ export declare function isMcpAppCardAction(usage: string | undefined, backend: {
5
+ readonly type: string;
6
+ readonly handler?: unknown;
7
+ } | undefined): boolean;
@@ -0,0 +1,7 @@
1
+ import type { CrewxAppCatalogOptions, CrewxAppCatalogResult, CrewxAppDefinitionHashInput } from './types.js';
2
+ export declare function hashCrewxAppDefinition(input: CrewxAppDefinitionHashInput): string;
3
+ export declare const hashAppDefinition: typeof hashCrewxAppDefinition;
4
+ export declare function discoverWorkspaceAppCatalog(workspaceRoot: string, options?: CrewxAppCatalogOptions): Promise<CrewxAppCatalogResult>;
5
+ export declare const listWorkspaceApps: typeof discoverWorkspaceAppCatalog;
6
+ export declare const createWorkspaceAppCatalog: typeof discoverWorkspaceAppCatalog;
7
+ export type { CrewxAppDefinitionHashInput, CrewxAppCatalogOptions, CrewxAppCatalogResult, } from './types.js';
@@ -0,0 +1,86 @@
1
+ import { UI_CONTENT_MAX_BYTES, UI_CONTENT_MAX_LINES, UI_CONTENT_MEDIA_TYPES, countContentLines, sha256Content } from '../app/protocol.js';
2
+ import { isUiContentMediaType, isValidUiAppInstanceId } from './content-declarations.js';
3
+ import type { UiContentMediaType } from './content-declarations.js';
4
+ export { UI_CONTENT_MAX_BYTES, UI_CONTENT_MAX_LINES, UI_CONTENT_MEDIA_TYPES, countContentLines, isUiContentMediaType, isValidUiAppInstanceId, sha256Content, };
5
+ export type { UiContentMediaType };
6
+ export declare const UI_CONTENT_TICKET_TTL_MS = 120000;
7
+ export declare const UI_CONTENT_OUTPUT_TTL_MS = 120000;
8
+ export declare const UI_CONTENT_MAX_MEMORY_BYTES: number;
9
+ export declare const UI_CONTENT_ERROR_CODES: readonly ["CONTENT_SOURCE_UNSUPPORTED", "CONTENT_REQUIRED", "CONTENT_EXPIRED", "CONTENT_BINDING_MISMATCH", "CONTENT_DIGEST_MISMATCH", "CONTENT_TOO_LARGE", "CONTENT_ENCODING_INVALID", "CONTENT_BUSY", "IDENTITY_UNAVAILABLE", "EXEC_OUTPUT_INVALID"];
10
+ export type UiContentErrorCode = (typeof UI_CONTENT_ERROR_CODES)[number];
11
+ export interface UiContentInputDeclaration {
12
+ readonly mediaType: UiContentMediaType;
13
+ readonly required?: boolean;
14
+ }
15
+ export interface UiContentOutputDeclaration {
16
+ readonly mediaType: UiContentMediaType;
17
+ readonly range?: boolean;
18
+ }
19
+ export interface UiActionContentDeclaration {
20
+ readonly in?: UiContentInputDeclaration;
21
+ readonly out?: UiContentOutputDeclaration;
22
+ }
23
+ export interface UiContentRangeRequest {
24
+ readonly startLine: number;
25
+ readonly lineCount: number;
26
+ }
27
+ export interface UiContentRange extends UiContentRangeRequest {
28
+ readonly totalLines: number;
29
+ }
30
+ export interface ContentFrame {
31
+ readonly bytes: Uint8Array;
32
+ readonly sha256: string;
33
+ readonly lines: number;
34
+ readonly mediaType: UiContentMediaType;
35
+ readonly range?: UiContentRange;
36
+ readonly complete?: boolean;
37
+ }
38
+ export interface UiContentBinding {
39
+ readonly workspaceId: string;
40
+ readonly threadId: string;
41
+ readonly instanceId: string;
42
+ readonly actionId: string;
43
+ readonly requestId: string;
44
+ }
45
+ export interface UiContentInputTicket {
46
+ readonly ticket: string;
47
+ readonly binding: UiContentBinding;
48
+ readonly sha256: string;
49
+ readonly bytes: number;
50
+ readonly lines: number;
51
+ readonly mediaType: UiContentMediaType;
52
+ readonly expiresAt: number;
53
+ }
54
+ export interface UiContentChannelPort {
55
+ putInput(ticket: UiContentInputTicket, frame: ContentFrame): void;
56
+ lookupInput(ticket: string, now: number): UiContentInputTicket | null;
57
+ consumeInput(ticket: string, now: number): ContentFrame | null;
58
+ reserveOutput(binding: UiContentBinding, now: number): boolean;
59
+ releaseOutput(binding: UiContentBinding): void;
60
+ putOutput(binding: UiContentBinding, frame: ContentFrame, now: number): void;
61
+ readOutput(binding: UiContentBinding, now: number): ContentFrame | null;
62
+ }
63
+ export declare class UiContentChannelError extends Error {
64
+ readonly code: UiContentErrorCode;
65
+ readonly name = "UiContentChannelError";
66
+ constructor(code: UiContentErrorCode);
67
+ }
68
+ export declare function decodeContentUtf8(bytes: Uint8Array): string;
69
+ export declare function validateContentBytes(value: unknown, mediaType: unknown): {
70
+ readonly bytes: Uint8Array;
71
+ readonly sha256: string;
72
+ readonly lines: number;
73
+ };
74
+ export interface ValidateContentFrameOptions {
75
+ readonly direction: 'in' | 'out';
76
+ readonly mediaType: UiContentMediaType;
77
+ readonly expectedSha256?: string;
78
+ readonly expectedBytes?: number;
79
+ readonly expectedLines?: number;
80
+ readonly requestedRange?: UiContentRangeRequest;
81
+ }
82
+ export declare function validateContentFrame(value: unknown, options: ValidateContentFrameOptions): ContentFrame;
83
+ export declare function isUiContentDeclaration(value: unknown): value is UiActionContentDeclaration;
84
+ export declare function isUiContentRangeRequest(value: unknown): value is UiContentRangeRequest;
85
+ export declare function contentBindingMatches(left: UiContentBinding, right: UiContentBinding): boolean;
86
+ export declare function isValidUiThreadIdentity(value: unknown): value is string;
@@ -0,0 +1,31 @@
1
+ import { UI_CONTENT_MEDIA_TYPES } from '../app/content-media-types.js';
2
+ import type { UiContentMediaType } from '../app/content-media-types.js';
3
+ import type { UiDefinition, UiDefinitionRef } from '../ui-instance/types.js';
4
+ export { UI_CONTENT_MEDIA_TYPES };
5
+ export type { UiContentMediaType };
6
+ export interface McpAppContentActionDeclaration {
7
+ readonly actionId: string;
8
+ readonly in?: {
9
+ readonly mediaType: UiContentMediaType;
10
+ readonly required: boolean;
11
+ };
12
+ readonly out?: {
13
+ readonly mediaType: UiContentMediaType;
14
+ readonly range: boolean;
15
+ };
16
+ }
17
+ export interface McpAppContentActions {
18
+ readonly schemaVersion: 1;
19
+ readonly instanceId: string;
20
+ readonly definition: {
21
+ readonly id: string;
22
+ readonly version: number;
23
+ readonly hash: string;
24
+ };
25
+ readonly actions: readonly McpAppContentActionDeclaration[];
26
+ }
27
+ export declare function isUiContentMediaType(value: unknown): value is UiContentMediaType;
28
+ export declare function isValidUiAppInstanceId(value: unknown): value is string;
29
+ export declare function buildMcpAppContentActions(instanceId: string, definition: UiDefinition): McpAppContentActions | undefined;
30
+ export declare function isMcpAppContentActions(value: unknown): value is McpAppContentActions;
31
+ export declare function contentActionsMatch(value: unknown, instanceId: string, definitionRef: UiDefinitionRef): boolean;
@@ -0,0 +1,31 @@
1
+ import type { AppIconDiagnostic } from '../ui-plugin/app-icon.js';
2
+ export type AppDevCheckItem = {
3
+ readonly rule: 'manifest' | 'external_resource' | 'output_unsafe_string' | 'output_invalid' | 'output_size' | 'call_duration';
4
+ readonly severity: 'error' | 'warning' | 'ok';
5
+ readonly code: string;
6
+ readonly where: string;
7
+ readonly detail?: Record<string, string | number>;
8
+ };
9
+ export type ExternalResourceKind = 'script' | 'style' | 'image' | 'font' | 'media' | 'frame' | 'object' | 'form' | 'navigation' | 'css' | 'script_network';
10
+ export interface ExternalResourceFinding {
11
+ readonly line: number;
12
+ readonly column: number;
13
+ readonly url: string;
14
+ readonly directive: string;
15
+ readonly kind: ExternalResourceKind;
16
+ }
17
+ export interface InspectSkillBackendOutputOptions {
18
+ readonly actionId: string;
19
+ readonly dataPaths?: readonly string[];
20
+ readonly resultProjectionAllow?: readonly string[];
21
+ readonly durationMs?: number;
22
+ readonly timedOut?: boolean;
23
+ readonly contentFramed?: boolean;
24
+ }
25
+ export interface ScanExternalResourcesOptions {
26
+ readonly csp: string;
27
+ }
28
+ export declare function inspectSkillBackendOutput(stdoutText: string, options: InspectSkillBackendOutputOptions): AppDevCheckItem[];
29
+ export declare function scanExternalResources(html: string, options: ScanExternalResourcesOptions): ExternalResourceFinding[];
30
+ export declare function externalResourceCheckItems(entryRelativePath: string, findings: readonly ExternalResourceFinding[]): AppDevCheckItem[];
31
+ export declare function appIconCheckItems(diagnostics: readonly AppIconDiagnostic[]): AppDevCheckItem[];
@@ -0,0 +1,3 @@
1
+ import type { AppManifestFileName, AppManifestReason } from '../ui-plugin/app-manifest.js';
2
+ export declare function projectAppManifestReason(value: unknown): AppManifestReason | undefined;
3
+ export declare function projectAppManifestFiles(value: unknown): readonly AppManifestFileName[] | undefined;