@crewx/sdk 0.9.0-rc.8 → 0.9.0-rc.80

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 (168) hide show
  1. package/README.md +1 -1
  2. package/dist/activity-log/builder.d.ts +55 -6
  3. package/dist/config/canonicalize-agent-options.d.ts +17 -0
  4. package/dist/config/global-settings.d.ts +33 -0
  5. package/dist/config/migrate-grok-mode.d.ts +6 -0
  6. package/dist/config/model-compat.d.ts +31 -0
  7. package/dist/config/models.generated.d.ts +33 -0
  8. package/dist/config/models.remote.d.ts +1 -0
  9. package/dist/config/overdrive.d.ts +7 -0
  10. package/dist/config/pricing.d.ts +8 -5
  11. package/dist/config/pricing.generated.d.ts +4 -0
  12. package/dist/config/pricing.types.d.ts +4 -10
  13. package/dist/config/timeout.config.d.ts +3 -0
  14. package/dist/config/wi-boards.d.ts +19 -0
  15. package/dist/context-budget/continuity.d.ts +61 -0
  16. package/dist/context-budget/index.d.ts +140 -0
  17. package/dist/conversation/index.d.ts +1 -1
  18. package/dist/conversation/sqlite-provider.d.ts +5 -1
  19. package/dist/conversation/to-template-messages.d.ts +7 -0
  20. package/dist/conversation/types.d.ts +43 -0
  21. package/dist/desktop/command-runner.d.ts +4 -0
  22. package/dist/desktop/default-adapters.d.ts +4 -0
  23. package/dist/desktop/global-install.d.ts +19 -0
  24. package/dist/desktop/index.d.ts +2 -0
  25. package/dist/desktop/index.js +3 -0
  26. package/dist/desktop/install.d.ts +5 -0
  27. package/dist/desktop/lnk.d.ts +22 -0
  28. package/dist/desktop/manifest.d.ts +21 -0
  29. package/dist/desktop/types.d.ts +67 -0
  30. package/dist/desktop/version.d.ts +1 -0
  31. package/dist/desktop/windows-paths.d.ts +21 -0
  32. package/dist/desktop/wrapper.d.ts +18 -0
  33. package/dist/esm/desktop/index.js +3 -0
  34. package/dist/esm/index.js +345 -96
  35. package/dist/esm/plugins/index.js +187 -93
  36. package/dist/esm/publish/index.js +1 -0
  37. package/dist/esm/repository/index.js +203 -94
  38. package/dist/esm/testing/index.js +1 -1
  39. package/dist/events/types.d.ts +4 -0
  40. package/dist/facade/Crewx.d.ts +38 -2
  41. package/dist/highlight/thread-highlight-prompt.d.ts +2 -0
  42. package/dist/highlight/thread-highlighter.d.ts +326 -0
  43. package/dist/index.browser.d.ts +9 -1
  44. package/dist/index.browser.js +6 -2
  45. package/dist/index.d.ts +57 -8
  46. package/dist/index.js +345 -96
  47. package/dist/internal/windows-spawn.d.ts +10 -0
  48. package/dist/layout/types.d.ts +17 -1
  49. package/dist/local-server/base-url.d.ts +18 -0
  50. package/dist/local-server/index.d.ts +8 -0
  51. package/dist/local-server/opencode.d.ts +8 -0
  52. package/dist/local-server/probe.d.ts +3 -0
  53. package/dist/local-server/runtime.d.ts +26 -0
  54. package/dist/local-server/types.d.ts +43 -0
  55. package/dist/migrations/0008_careful_black_bird.sql +17 -0
  56. package/dist/migrations/0009_hot_dark_phoenix.sql +1 -0
  57. package/dist/migrations/0010_analyze_stats.sql +6 -0
  58. package/dist/migrations/0011_far_black_tarantula.sql +1 -0
  59. package/dist/migrations/0012_blue_turbo.sql +23 -0
  60. package/dist/migrations/0013_hesitant_adam_destine.sql +15 -0
  61. package/dist/migrations/0014_organic_mongu.sql +73 -0
  62. package/dist/migrations/0015_panoramic_gorilla_man.sql +71 -0
  63. package/dist/migrations/0016_fuzzy_hemingway.sql +14 -0
  64. package/dist/migrations/0017_project_stage_sdk_migration.sql +29 -0
  65. package/dist/migrations/0018_bored_jackal.sql +33 -0
  66. package/dist/migrations/0019_backfill_task_thread_ids.sql +74 -0
  67. package/dist/migrations/0020_useful_iron_lad.sql +55 -0
  68. package/dist/migrations/0021_dashing_peter_quill.sql +51 -0
  69. package/dist/migrations/meta/0008_snapshot.json +1327 -0
  70. package/dist/migrations/meta/0009_snapshot.json +1335 -0
  71. package/dist/migrations/meta/0010_snapshot.json +1335 -0
  72. package/dist/migrations/meta/0011_snapshot.json +1342 -0
  73. package/dist/migrations/meta/0012_snapshot.json +1494 -0
  74. package/dist/migrations/meta/0013_snapshot.json +1592 -0
  75. package/dist/migrations/meta/0014_snapshot.json +1975 -0
  76. package/dist/migrations/meta/0015_snapshot.json +2315 -0
  77. package/dist/migrations/meta/0016_snapshot.json +2419 -0
  78. package/dist/migrations/meta/0017_snapshot.json +2419 -0
  79. package/dist/migrations/meta/0018_snapshot.json +2570 -0
  80. package/dist/migrations/meta/0020_snapshot.json +2895 -0
  81. package/dist/migrations/meta/0021_snapshot.json +3031 -0
  82. package/dist/migrations/meta/_journal.json +98 -0
  83. package/dist/paths.d.ts +1 -0
  84. package/dist/plugin/types.d.ts +1 -0
  85. package/dist/plugins/index.js +187 -93
  86. package/dist/plugins/sqlite-tracing.d.ts +22 -0
  87. package/dist/provider/acp/connection.d.ts +4 -0
  88. package/dist/provider/acp/meta.d.ts +11 -0
  89. package/dist/provider/bridge.d.ts +6 -0
  90. package/dist/provider/classify-task-error.d.ts +2 -0
  91. package/dist/provider/cli/adapter.types.d.ts +6 -0
  92. package/dist/provider/cli/adapters/cli-knob.util.d.ts +7 -0
  93. package/dist/provider/cli/adapters/grok.d.ts +2 -0
  94. package/dist/provider/cli/adapters/index.d.ts +1 -0
  95. package/dist/provider/cli/index.d.ts +1 -1
  96. package/dist/provider/cli/meta.d.ts +5 -0
  97. package/dist/provider/errors.d.ts +1 -0
  98. package/dist/provider/idle-watchdog.d.ts +19 -0
  99. package/dist/provider/models.d.ts +17 -12
  100. package/dist/provider/order.d.ts +1 -1
  101. package/dist/provider/parse-usage.d.ts +6 -0
  102. package/dist/provider/provider-selection.d.ts +8 -0
  103. package/dist/provider/redact-technical-message.d.ts +1 -0
  104. package/dist/provider/task-error.types.d.ts +16 -0
  105. package/dist/publish/auth-boundary.d.ts +22 -0
  106. package/dist/publish/auth-json.d.ts +11 -0
  107. package/dist/publish/constants.d.ts +6 -0
  108. package/dist/publish/index.d.ts +30 -0
  109. package/dist/publish/index.js +1 -0
  110. package/dist/publish/manifest.d.ts +17 -0
  111. package/dist/publish/marketplace-api.constants.d.ts +1 -0
  112. package/dist/publish/pack.d.ts +2 -0
  113. package/dist/publish/scan.d.ts +9 -0
  114. package/dist/publish/secrets.d.ts +6 -0
  115. package/dist/publish/upload.d.ts +18 -0
  116. package/dist/repository/agent-suggestion.repository.d.ts +34 -0
  117. package/dist/repository/common-code.repository.d.ts +39 -0
  118. package/dist/repository/db.d.ts +8 -0
  119. package/dist/repository/index.d.ts +28 -4
  120. package/dist/repository/index.js +203 -94
  121. package/dist/repository/notification.repository.d.ts +58 -0
  122. package/dist/repository/project.repository.d.ts +90 -0
  123. package/dist/repository/request-log.repository.d.ts +1 -0
  124. package/dist/repository/task-log-migration.d.ts +74 -0
  125. package/dist/repository/task-log.repository.d.ts +44 -0
  126. package/dist/repository/task.repository.d.ts +119 -0
  127. package/dist/repository/thread-history.repository.d.ts +193 -0
  128. package/dist/repository/thread-title-common-code-migration.d.ts +13 -0
  129. package/dist/repository/thread-title.types.d.ts +29 -0
  130. package/dist/repository/thread.repository.d.ts +21 -2
  131. package/dist/repository/usage-report.repository.d.ts +27 -0
  132. package/dist/schema/agent-suggestions.d.ts +199 -0
  133. package/dist/schema/common-codes.d.ts +216 -0
  134. package/dist/schema/index.d.ts +9 -0
  135. package/dist/schema/notifications.d.ts +303 -0
  136. package/dist/schema/projects.d.ts +610 -0
  137. package/dist/schema/task-log-events.d.ts +119 -0
  138. package/dist/schema/tasks.d.ts +53 -0
  139. package/dist/schema/thread-history.d.ts +734 -0
  140. package/dist/schema/threads.d.ts +2 -0
  141. package/dist/schema/ui-action-receipts.d.ts +303 -0
  142. package/dist/schema/ui-instances.d.ts +267 -0
  143. package/dist/schema/usage-reports.d.ts +252 -0
  144. package/dist/testing/index.js +1 -1
  145. package/dist/types/index.d.ts +1536 -3
  146. package/dist/ui-card/index.d.ts +2 -0
  147. package/dist/ui-card/legacy-card-parser.d.ts +11 -0
  148. package/dist/ui-instance/definition.d.ts +6 -0
  149. package/dist/ui-instance/errors.d.ts +17 -0
  150. package/dist/ui-instance/index.d.ts +6 -0
  151. package/dist/ui-instance/json.d.ts +5 -0
  152. package/dist/ui-instance/runtime.d.ts +13 -0
  153. package/dist/ui-instance/store.d.ts +65 -0
  154. package/dist/ui-instance/types.d.ts +200 -0
  155. package/dist/ui-plugin/index.d.ts +3 -0
  156. package/dist/ui-plugin/manifest.d.ts +3 -0
  157. package/dist/ui-plugin/types.d.ts +76 -0
  158. package/dist/ui-plugin/validator.d.ts +9 -0
  159. package/dist/utils/crewx-home.d.ts +1 -0
  160. package/dist/utils/id.d.ts +1 -1
  161. package/dist/utils/timestamp.d.ts +1 -0
  162. package/dist/wi/create.d.ts +48 -0
  163. package/dist/wi/select.d.ts +20 -0
  164. package/package.json +18 -2
  165. package/templates/agents/default.yaml +240 -116
  166. package/templates/documents/crewx-manual.md +138 -138
  167. package/templates/workflows/wi-default-flow.yaml +65 -0
  168. package/templates/workflows/wi-plan-flow.yaml +140 -0
@@ -0,0 +1,51 @@
1
+ CREATE TABLE IF NOT EXISTS `thread_highlight_runs` (
2
+ `id` text PRIMARY KEY NOT NULL,
3
+ `thread_id` text NOT NULL,
4
+ `request_id` text NOT NULL,
5
+ `status` text NOT NULL,
6
+ `detector_version` text NOT NULL,
7
+ `requested_at` text NOT NULL,
8
+ `started_at` text,
9
+ `completed_at` text,
10
+ `error_code` text,
11
+ `previous_auto_count` integer,
12
+ `new_auto_count` integer,
13
+ FOREIGN KEY (`thread_id`) REFERENCES `threads`(`id`) ON UPDATE no action ON DELETE cascade,
14
+ CONSTRAINT "thread_highlight_runs_status_ck" CHECK("thread_highlight_runs"."status" IN ('queued', 'running', 'completed', 'failed')),
15
+ CONSTRAINT "thread_highlight_runs_counts_ck" CHECK(("thread_highlight_runs"."previous_auto_count" IS NULL OR "thread_highlight_runs"."previous_auto_count" >= 0) AND ("thread_highlight_runs"."new_auto_count" IS NULL OR "thread_highlight_runs"."new_auto_count" >= 0))
16
+ );
17
+ --> statement-breakpoint
18
+ CREATE UNIQUE INDEX IF NOT EXISTS `thread_highlight_runs_thread_request_uq` ON `thread_highlight_runs` (`thread_id`,`request_id`);--> statement-breakpoint
19
+ CREATE UNIQUE INDEX IF NOT EXISTS `thread_highlight_runs_in_progress_thread_uq` ON `thread_highlight_runs` (`thread_id`) WHERE "thread_highlight_runs"."status" IN ('queued', 'running');--> statement-breakpoint
20
+ CREATE INDEX IF NOT EXISTS `idx_thread_highlight_runs_thread_status_requested` ON `thread_highlight_runs` (`thread_id`,`status`,`requested_at`);--> statement-breakpoint
21
+ PRAGMA foreign_keys=OFF;--> statement-breakpoint
22
+ CREATE TABLE IF NOT EXISTS `__new_thread_events` (
23
+ `id` text PRIMARY KEY NOT NULL,
24
+ `thread_id` text NOT NULL,
25
+ `seq` integer NOT NULL,
26
+ `type` text NOT NULL,
27
+ `actor_type` text NOT NULL,
28
+ `payload_json` text NOT NULL,
29
+ `created_at` text NOT NULL,
30
+ `actor_id` text,
31
+ `task_id` text,
32
+ `highlight_id` text,
33
+ FOREIGN KEY (`thread_id`) REFERENCES `threads`(`id`) ON UPDATE no action ON DELETE cascade,
34
+ CONSTRAINT "thread_events_type_ck" CHECK("__new_thread_events"."type" IN ('thread.snapshot.imported', 'thread.title.changed', 'thread.priority.changed', 'thread.state.changed', 'thread.highlight.created', 'thread.highlight.updated', 'thread.highlight.deleted', 'thread.highlights.regenerated')),
35
+ CONSTRAINT "thread_events_actor_type_ck" CHECK("__new_thread_events"."actor_type" IN ('user', 'agent', 'system')),
36
+ CONSTRAINT "thread_events_payload_json_ck" CHECK(json_valid("__new_thread_events"."payload_json") AND json_type("__new_thread_events"."payload_json") = 'object')
37
+ );
38
+ --> statement-breakpoint
39
+ INSERT INTO `__new_thread_events`("id", "thread_id", "seq", "type", "actor_type", "payload_json", "created_at", "actor_id", "task_id", "highlight_id") SELECT "id", "thread_id", "seq", "type", "actor_type", "payload_json", "created_at", "actor_id", "task_id", "highlight_id" FROM `thread_events`;--> statement-breakpoint
40
+ DROP TABLE `thread_events`;--> statement-breakpoint
41
+ ALTER TABLE `__new_thread_events` RENAME TO `thread_events`;--> statement-breakpoint
42
+ PRAGMA foreign_keys=ON;--> statement-breakpoint
43
+ CREATE INDEX IF NOT EXISTS `idx_thread_events_thread_seq` ON `thread_events` (`thread_id`,`seq`);--> statement-breakpoint
44
+ CREATE INDEX IF NOT EXISTS `idx_thread_events_thread_created` ON `thread_events` (`thread_id`,`created_at`);--> statement-breakpoint
45
+ CREATE UNIQUE INDEX IF NOT EXISTS `thread_events_thread_seq_uq` ON `thread_events` (`thread_id`,`seq`);
46
+ --> statement-breakpoint
47
+ CREATE TRIGGER IF NOT EXISTS thread_events_no_update
48
+ BEFORE UPDATE ON thread_events
49
+ BEGIN
50
+ SELECT RAISE(ABORT, 'thread_events is append-only');
51
+ END;