@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
@@ -1 +1 @@
1
- function f(){let e=[];return {events:e,async log(t,r){e.push({event:t,payload:r});}}}function y(){let e={debug:[],info:[],warn:[],error:[]};return {entries:e,debug(t,r){e.debug.push({msg:t,meta:r});},info(t,r){e.info.push({msg:t,meta:r});},warn(t,r){e.warn.push({msg:t,meta:r});},error(t,r){e.error.push({msg:t,meta:r});}}}function S(){let e=200,t,r,n={},o={status(i){return e=i,o},set(i,d){return n[i]=d,o},send(i){return r=i,o},json(i){return t=i,o},end(){return o},getStatusCode:()=>e,getJsonBody:()=>t,getSentBody:()=>r,getHeaders:()=>({...n})};return o}function M(){let e=[];return {routes:e,registerRoute(r,n,o){e.push({path:r,handler:n,opts:o});},async simulate(r,n,o=Buffer.alloc(0),i={},d={},p={}){let g=e.find(m=>m.path===n);if(!g)return {status:404,body:{error:"Not found"},headers:{}};let l={method:r,url:n,headers:i,body:o,params:d,query:p},c=S();return await g.handler(l,c),{status:c.getStatusCode(),body:c.getJsonBody()??c.getSentBody(),headers:c.getHeaders()}}}}function k(e){let t=new Map,r=n=>n.startsWith(`${e}::`)?n:`${e}::${n}`;return {async get(n){let o=t.get(r(n));return o?o.value:void 0},async set(n,o){t.set(r(n),{value:o});},async delete(n){return t.delete(r(n))},async list(n){let o=n?r(n):`${e}::`,i=[];for(let d of t.keys())d.startsWith(o)&&i.push(d.slice(e.length+2));return i}}}function x(e){return k(e)}function R(){let e=new Map;return {blobs:e,async put(t,r,n){return e.set(t,{data:r,contentType:n}),t},async get(t){let r=e.get(t);return r?r.data:void 0},async delete(t){return e.delete(t)}}}function w(e){let t=e.instanceId??"mock-instance",r=f(),n=y(),o=M(),i=x(t),d=R(),p=[],g=[],l=[],c={run:async()=>({output:""}),...e.agentRunner},m=new AbortController,C=async u=>(p.push(u),{accepted:true}),v=async u=>(g.push(u),{accepted:true}),h=async(u,A)=>{l.push({messageId:u,patch:A});},E=async u=>({userId:u,displayName:u}),b=async()=>{},O=async()=>({messageId:"mock-proactive",sentAt:Date.now()});return {instanceId:t,installationId:e.installationId,config:e.config,capabilities:new Set(e.capabilities??[]),log:n,agentRunner:c,db:i,storage:d,audit:r,abortSignal:e.abortSignal??m.signal,httpRouter:o,router:o,inbound:C,emitEvent:v,updateMessage:h,resolveUser:E,respondSync:b,proactive:O,inboundCalls:p,emittedEvents:g,sentMessages:l}}function T(){}var P={claude:{models:[{id:"claude-fable-5",name:"Claude Fable 5"},{id:"claude-sonnet-5",name:"Claude Sonnet 5"},{id:"claude-opus-4-8[1m]",name:"Claude Opus 4.8 (Extended)"},{id:"claude-opus-4-8",name:"Claude Opus 4.8"},{id:"claude-opus-4-7[1m]",name:"Claude Opus 4.7 (Extended)"},{id:"claude-opus-4-7",name:"Claude Opus 4.7"},{id:"claude-opus-4-6[1m]",name:"Claude Opus 4.6 (Extended)"},{id:"claude-opus-4-6",name:"Claude Opus 4.6"},{id:"claude-sonnet-4-6[1m]",name:"Claude Sonnet 4.6 (Extended)"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6"},{id:"claude-haiku-4-5",name:"Claude Haiku 4.5"}],modes:[{id:"default",name:"Default"},{id:"acceptEdits",name:"Accept Edits"},{id:"plan",name:"Plan"},{id:"auto",name:"Auto"},{id:"dontAsk",name:"Don't Ask"},{id:"bypassPermissions",name:"Bypass Permissions"}],effort:[],modelOverrides:{}},codex:{models:[{id:"gpt-5.5",name:"GPT-5.5"},{id:"gpt-5.4",name:"GPT-5.4"},{id:"gpt-5.4-mini",name:"GPT-5.4 Mini"},{id:"gpt-5.3-codex",name:"GPT-5.3 Codex"},{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark"}],modes:[{id:"agent",name:"Agent"},{id:"read-only",name:"Read Only"},{id:"plan",name:"Plan"},{id:"agent-full-access",name:"Agent Full Access"},{id:"yolo",name:"YOLO"}],effort:["minimal","low","medium","high"],modelOverrides:{"gpt-5.5":{effort:["minimal","low","medium","high","xhigh"],defaultEffort:"high"}}},copilot:{models:[{id:"auto",name:"Auto"},{id:"claude-sonnet-5",name:"Claude Sonnet 5"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6"},{id:"gpt-5.5",name:"GPT-5.5"},{id:"gpt-5.4",name:"GPT-5.4"},{id:"gemini-3.1-pro",name:"Gemini 3.1 Pro"}],modes:[{id:"interactive",name:"Interactive"},{id:"plan",name:"Plan"},{id:"autopilot",name:"Autopilot"}],effort:["none","low","medium","high","xhigh","max"],modelOverrides:{}},antigravity:{models:[{id:"Gemini 3.5 Flash (Medium)",name:"Gemini 3.5 Flash (Medium)"},{id:"Gemini 3.5 Flash (High)",name:"Gemini 3.5 Flash (High)"},{id:"Gemini 3.5 Flash (Low)",name:"Gemini 3.5 Flash (Low)"},{id:"Gemini 3.1 Pro (Low)",name:"Gemini 3.1 Pro (Low)"},{id:"Gemini 3.1 Pro (High)",name:"Gemini 3.1 Pro (High)"},{id:"Claude Sonnet 4.6 (Thinking)",name:"Claude Sonnet 4.6 (Thinking)"},{id:"Claude Opus 4.6 (Thinking)",name:"Claude Opus 4.6 (Thinking)"},{id:"GPT-OSS 120B (Medium)",name:"GPT-OSS 120B (Medium)"}],modes:[],effort:[],modelOverrides:{}}};Object.fromEntries(Object.entries(P).map(([e,t])=>[e,t.models]));function B(){}export{f as createMockAudit,w as createMockContext,y as createMockLogger,M as createMockRouter,R as createMockStorage,x as createMockStore,B as resetModelsOverride,T as resetPricingOverride};
1
+ function f(){let e=[];return {events:e,async log(t,o){e.push({event:t,payload:o});}}}function h(){let e={debug:[],info:[],warn:[],error:[]};return {entries:e,debug(t,o){e.debug.push({msg:t,meta:o});},info(t,o){e.info.push({msg:t,meta:o});},warn(t,o){e.warn.push({msg:t,meta:o});},error(t,o){e.error.push({msg:t,meta:o});}}}function A(){let e=200,t,o,n={},r={status(i){return e=i,r},set(i,a){return n[i]=a,r},send(i){return o=i,r},json(i){return t=i,r},end(){return r},getStatusCode:()=>e,getJsonBody:()=>t,getSentBody:()=>o,getHeaders:()=>({...n})};return r}function y(){let e=[];return {routes:e,registerRoute(o,n,r){e.push({path:o,handler:n,opts:r});},async simulate(o,n,r=Buffer.alloc(0),i={},a={},p={}){let c=e.find(m=>m.path===n);if(!c)return {status:404,body:{error:"Not found"},headers:{}};let g={method:o,url:n,headers:i,body:r,params:a,query:p},l=A();return await c.handler(g,l),{status:l.getStatusCode(),body:l.getJsonBody()??l.getSentBody(),headers:l.getHeaders()}}}}function P(e){let t=new Map,o=n=>n.startsWith(`${e}::`)?n:`${e}::${n}`;return {async get(n){let r=t.get(o(n));return r?r.value:void 0},async set(n,r){t.set(o(n),{value:r});},async delete(n){return t.delete(o(n))},async list(n){let r=n?o(n):`${e}::`,i=[];for(let a of t.keys())a.startsWith(r)&&i.push(a.slice(e.length+2));return i}}}function x(e){return P(e)}function M(){let e=new Map;return {blobs:e,async put(t,o,n){return e.set(t,{data:o,contentType:n}),t},async get(t){let o=e.get(t);return o?o.data:void 0},async delete(t){return e.delete(t)}}}function C(e){let t=e.instanceId??"mock-instance",o=f(),n=h(),r=y(),i=x(t),a=M(),p=[],c=[],g=[],l={run:async()=>({output:""}),...e.agentRunner},m=new AbortController,v=async u=>(p.push(u),{accepted:true}),w=async u=>(c.push(u),{accepted:true}),E=async(u,R)=>{g.push({messageId:u,patch:R});},I=async u=>({userId:u,displayName:u}),O=async()=>{},b=async()=>({messageId:"mock-proactive",sentAt:Date.now()});return {instanceId:t,installationId:e.installationId,config:e.config,capabilities:new Set(e.capabilities??[]),log:n,agentRunner:l,db:i,storage:a,audit:o,abortSignal:e.abortSignal??m.signal,httpRouter:r,router:r,inbound:v,emitEvent:w,updateMessage:E,resolveUser:I,respondSync:O,proactive:b,inboundCalls:p,emittedEvents:c,sentMessages:g}}function L(){}var k={claude:{models:[{id:"claude-fable-5",name:"Claude Fable 5",contextWindowTokens:1e6,tier:"flagship",recommended:true},{id:"claude-opus-5",name:"Claude Opus 5",contextWindowTokens:1e6,tier:"flagship",recommended:true},{id:"claude-sonnet-5",name:"Claude Sonnet 5",contextWindowTokens:1e6,tier:"balanced",recommended:true},{id:"claude-opus-4-8[1m]",name:"Claude Opus 4.8",contextWindowTokens:1e6,tier:"flagship"},{id:"claude-opus-4-7[1m]",name:"Claude Opus 4.7",contextWindowTokens:1e6,tier:"flagship"},{id:"claude-opus-4-6[1m]",name:"Claude Opus 4.6",contextWindowTokens:1e6,tier:"flagship"},{id:"claude-sonnet-4-6[1m]",name:"Claude Sonnet 4.6",contextWindowTokens:1e6,tier:"balanced"},{id:"claude-haiku-4-5",name:"Claude Haiku 4.5",contextWindowTokens:2e5,tier:"speed"}],modes:[{id:"default",name:"Default",description:"Uses Claude's default permission handling with normal approval prompts."},{id:"acceptEdits",name:"Accept Edits",description:"Allows file edits without approval; other permission checks remain in place."},{id:"plan",name:"Plan",description:"Keeps Claude in plan mode so it can inspect and propose changes without applying them."},{id:"dontAsk",name:"Don't Ask",description:"Does not ask for permissions; only pre-approved tool actions can proceed."},{id:"bypassPermissions",name:"Bypass Permissions",description:"Bypasses Claude permission checks so tools can run without approval prompts."}],effort:["low","medium","high"],modelOverrides:{"claude-fable-5":{effort:["low","medium","high","xhigh","max"],defaultEffort:"high"},"claude-opus-5":{effort:["low","medium","high","xhigh","max"],defaultEffort:"high"},"claude-sonnet-5":{effort:["low","medium","high","xhigh","max"],defaultEffort:"high"},"claude-opus-4-8[1m]":{effort:["low","medium","high","xhigh","max"],defaultEffort:"high"},"claude-opus-4-7[1m]":{effort:["low","medium","high","xhigh","max"],defaultEffort:"high"},"claude-opus-4-6[1m]":{effort:["low","medium","high","max"],defaultEffort:"high"},"claude-sonnet-4-6[1m]":{effort:["low","medium","high","max"],defaultEffort:"high"},"claude-haiku-4-5":{effort:[]}},providerOptions:[]},codex:{models:[{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",contextWindowTokens:105e4,tier:"flagship",recommended:true},{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",contextWindowTokens:105e4,tier:"balanced",recommended:true},{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",contextWindowTokens:105e4,tier:"speed",recommended:true},{id:"gpt-5.5",name:"GPT-5.5",contextWindowTokens:105e4,tier:"flagship"},{id:"gpt-5.4",name:"GPT-5.4",contextWindowTokens:105e4,tier:"flagship"},{id:"gpt-5.4-mini",name:"GPT-5.4 Mini",contextWindowTokens:4e5,tier:"speed"},{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",contextWindowTokens:4e5,tier:"flagship"},{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark",contextWindowTokens:128e3,tier:"speed"}],modes:[{id:"agent",name:"Agent",description:"Uses the workspace-write sandbox; can read and modify workspace files without full machine access."},{id:"read-only",name:"Read Only",description:"Uses the read-only sandbox; can inspect files but cannot write to the workspace."},{id:"plan",name:"Plan",description:"Uses the read-only sandbox for planning and inspection; cannot write to the workspace."},{id:"agent-full-access",name:"Agent Full Access",description:"Bypasses approvals and the sandbox; can access and modify files beyond the workspace."},{id:"yolo",name:"YOLO",description:"Bypasses approvals and the sandbox for unrestricted execution and full filesystem access."}],effort:["minimal","low","medium","high"],modelOverrides:{"gpt-5.6-sol":{effort:["none","low","medium","high","xhigh","max"],defaultEffort:"xhigh"},"gpt-5.6-terra":{effort:["none","low","medium","high","xhigh","max"],defaultEffort:"high"},"gpt-5.6-luna":{effort:["none","low","medium","high","xhigh","max"],defaultEffort:"high"},"gpt-5.5":{effort:["minimal","low","medium","high","xhigh"],defaultEffort:"high"}},providerOptions:[]},opencode:{models:[],modes:[{id:"plan",name:"Plan",description:"Uses the plan agent without --auto; planning follows standard approval behavior."},{id:"plan-auto",name:"Plan \xB7 Auto",description:"Uses the plan agent with --auto; planning uses automatic approvals."},{id:"build",name:"Build",description:"Uses the build agent without --auto; work follows standard approval behavior."},{id:"build-auto",name:"Build \xB7 Auto",description:"Uses the build agent with --auto; work uses automatic approvals."}],effort:[],modelOverrides:{},providerOptions:[]},copilot:{models:[{id:"auto",name:"Auto"},{id:"claude-sonnet-5",name:"Claude Sonnet 5",contextWindowTokens:1e6,tier:"balanced"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",contextWindowTokens:1e6,tier:"balanced"},{id:"gpt-5.5",name:"GPT-5.5",contextWindowTokens:105e4,tier:"flagship"},{id:"gpt-5.4",name:"GPT-5.4",contextWindowTokens:105e4,tier:"flagship"},{id:"gemini-3.1-pro",name:"Gemini 3.1 Pro",contextWindowTokens:1048576,tier:"flagship"}],modes:[{id:"interactive",name:"Interactive",description:"Passes --mode interactive; tool access follows Copilot's interactive mode behavior."},{id:"plan",name:"Plan",description:"Passes --mode plan; planning and permission behavior follow Copilot's plan mode."},{id:"autopilot",name:"Autopilot",description:"Passes --mode autopilot; execution behavior follows Copilot's autonomous mode."}],effort:["none","low","medium","high","xhigh","max"],modelOverrides:{},providerOptions:[]},antigravity:{models:[{id:"gemini-3.7-flash",name:"Gemini 3.7 Flash",contextWindowTokens:1048576,tier:"balanced"},{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",contextWindowTokens:1048576,tier:"balanced"},{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",contextWindowTokens:1048576,tier:"balanced"},{id:"gemini-3.1-pro",name:"Gemini 3.1 Pro",contextWindowTokens:1048576,tier:"flagship"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",contextWindowTokens:1e6,tier:"balanced"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",contextWindowTokens:1e6,tier:"flagship"},{id:"gpt-oss-120b",name:"GPT-OSS 120B",contextWindowTokens:128e3,tier:"balanced"}],modes:[{id:"default",name:"Default",description:"Uses Antigravity's default permission handling. No extra permission flags are passed."},{id:"plan",name:"Plan",description:"Passes --mode plan. This turns on /plan; it is not a Claude-style permission mode."},{id:"acceptEdits",name:"Accept Edits",description:"Passes --mode accept-edits."},{id:"bypassPermissions",name:"Bypass Permissions",description:"Passes --dangerously-skip-permissions so tools can run without approval prompts."}],effort:["low","medium","high"],modelOverrides:{"gemini-3.7-flash":{effort:["low","medium","high"],defaultEffort:"medium"},"gemini-3.6-flash":{effort:["low","medium","high"],defaultEffort:"medium"},"gemini-3.5-flash":{effort:["low","medium","high"],defaultEffort:"medium"},"gemini-3.1-pro":{effort:["low","high"],defaultEffort:"high"},"claude-sonnet-4-6":{effort:[]},"claude-opus-4-6-thinking":{effort:[]},"gpt-oss-120b":{effort:["medium"],defaultEffort:"medium"}},providerOptions:[]},grok:{models:[{id:"grok-4.6",name:"Grok 4.6",contextWindowTokens:5e5,tier:"flagship",recommended:true},{id:"grok-4.5",name:"Grok 4.5",contextWindowTokens:5e5,tier:"flagship"}],modes:[{id:"default",name:"Default",description:"Uses Grok's default permission handling."},{id:"acceptEdits",name:"Accept Edits",description:"Allows file edits without changing the selected sandbox profile."},{id:"auto",name:"Auto",description:"Uses Grok automatic permission handling."},{id:"dontAsk",name:"Don't Ask",description:"Does not ask for permission before tool execution."},{id:"bypassPermissions",name:"Bypass Permissions",description:"Bypasses Grok permission checks for tool execution."},{id:"plan",name:"Plan",description:"Keeps Grok in planning mode without applying changes."}],effort:["low","medium","high"],modelOverrides:{"grok-4.6":{effort:["low","medium","high","xhigh"],defaultEffort:"high"},"grok-4.5":{effort:["low","medium","high"],defaultEffort:"high"}},providerOptions:[{key:"alwaysApprove",type:"boolean"},{key:"sandbox",type:"enum",values:["workspace","read-only","off"]}]}};Object.fromEntries(Object.entries(k).map(([e,t])=>[e,t.models]));var _=[{baseModelId:"claude-opus-4-8",catalogModelId:"claude-opus-4-8[1m]"},{baseModelId:"claude-opus-4-7",catalogModelId:"claude-opus-4-7[1m]"},{baseModelId:"claude-opus-4-6",catalogModelId:"claude-opus-4-6[1m]"},{baseModelId:"claude-sonnet-4-6",catalogModelId:"claude-sonnet-4-6[1m]"}];new Map(_.map(({baseModelId:e,catalogModelId:t})=>[e,t]));var G=[{legacyId:"Gemini 3.7 Flash (High)",model:"gemini-3.7-flash",effort:"high"},{legacyId:"Gemini 3.7 Flash (Medium)",model:"gemini-3.7-flash",effort:"medium"},{legacyId:"Gemini 3.7 Flash (Low)",model:"gemini-3.7-flash",effort:"low"},{legacyId:"Gemini 3.6 Flash (High)",model:"gemini-3.6-flash",effort:"high"},{legacyId:"Gemini 3.6 Flash (Medium)",model:"gemini-3.6-flash",effort:"medium"},{legacyId:"Gemini 3.6 Flash (Low)",model:"gemini-3.6-flash",effort:"low"},{legacyId:"Gemini 3.5 Flash (Medium)",model:"gemini-3.5-flash",effort:"medium"},{legacyId:"Gemini 3.5 Flash (High)",model:"gemini-3.5-flash",effort:"high"},{legacyId:"Gemini 3.5 Flash (Low)",model:"gemini-3.5-flash",effort:"low"},{legacyId:"Gemini 3.1 Pro (Low)",model:"gemini-3.1-pro",effort:"low"},{legacyId:"Gemini 3.1 Pro (High)",model:"gemini-3.1-pro",effort:"high"},{legacyId:"Claude Sonnet 4.6 (Thinking)",model:"claude-sonnet-4-6"},{legacyId:"Claude Opus 4.6 (Thinking)",model:"claude-opus-4-6-thinking"},{legacyId:"GPT-OSS 120B (Medium)",model:"gpt-oss-120b",effort:"medium"},{legacyId:"gemini-3.7-flash-high",model:"gemini-3.7-flash",effort:"high"},{legacyId:"gemini-3.7-flash-medium",model:"gemini-3.7-flash",effort:"medium"},{legacyId:"gemini-3.7-flash-low",model:"gemini-3.7-flash",effort:"low"},{legacyId:"gemini-3.6-flash-high",model:"gemini-3.6-flash",effort:"high"},{legacyId:"gemini-3.6-flash-medium",model:"gemini-3.6-flash",effort:"medium"},{legacyId:"gemini-3.6-flash-low",model:"gemini-3.6-flash",effort:"low"},{legacyId:"gemini-3.5-flash-high",model:"gemini-3.5-flash",effort:"high"},{legacyId:"gemini-3.5-flash-medium",model:"gemini-3.5-flash",effort:"medium"},{legacyId:"gemini-3.5-flash-low",model:"gemini-3.5-flash",effort:"low"},{legacyId:"gemini-3.1-pro-high",model:"gemini-3.1-pro",effort:"high"},{legacyId:"gemini-3.1-pro-low",model:"gemini-3.1-pro",effort:"low"},{legacyId:"gpt-oss-120b-medium",model:"gpt-oss-120b",effort:"medium"}];new Map(G.map(({legacyId:e,model:t,effort:o})=>[e,o===void 0?{model:t}:{model:t,effort:o}]));function W(){}export{f as createMockAudit,C as createMockContext,h as createMockLogger,y as createMockRouter,M as createMockStorage,x as createMockStore,W as resetModelsOverride,L as resetPricingOverride};
@@ -16,6 +16,7 @@ export interface TaskStartEvent extends BaseEvent {
16
16
  threadId?: string;
17
17
  platform?: Platform;
18
18
  workspaceId?: string;
19
+ projectId?: string;
19
20
  workspaceName?: string;
20
21
  parentTaskId?: string | null;
21
22
  rootTraceId?: string;
@@ -29,6 +30,7 @@ export interface TaskEndEvent extends BaseEvent {
29
30
  error?: {
30
31
  code: string;
31
32
  message: string;
33
+ providerCode?: string;
32
34
  };
33
35
  exitCode?: number;
34
36
  inputTokens?: number;
@@ -37,6 +39,8 @@ export interface TaskEndEvent extends BaseEvent {
37
39
  costUsd?: number;
38
40
  model?: string;
39
41
  metadata?: Record<string, unknown>;
42
+ workspaceId?: string;
43
+ workspaceName?: string;
40
44
  }
41
45
  export interface TaskOutputEvent extends BaseEvent {
42
46
  agentRef: string;
@@ -4,10 +4,12 @@ import type { IFsAdapter } from '../platform/IFsAdapter';
4
4
  import type { ChannelAdapterRegistration } from '../adapter/types';
5
5
  import type { CrewxProjectConfig, AgentConfig, CrewxOptions, QueryOptions, QueryResult, ExecuteOptions, ExecuteResult } from '../types';
6
6
  import type { TemplateContext } from '../template/types';
7
- import type { CustomLayoutDefinition } from '../layout/types';
8
- import type { TemplateMessage } from '../conversation/types';
7
+ import type { CustomLayoutDefinition, LayoutCapabilities } from '../layout/types';
8
+ import type { ConversationThreadState, SemanticContinuityContext, TemplateMessage } from '../conversation/types';
9
9
  import type { HandlerOptions, CrewxHandler } from '../server/handler';
10
10
  import type { RemoteProviderConfig } from '../remote/types.js';
11
+ import type { UiRuntimeFacade, UiRuntimeOptions } from '../ui-instance/types.js';
12
+ import type { CrewxEventName, CrewxEventPayload } from '../events/types';
11
13
  export interface ToolDefinition {
12
14
  name: string;
13
15
  description: string;
@@ -19,6 +21,7 @@ export type LayoutSpec = string | {
19
21
  props?: Record<string, any>;
20
22
  } | {
21
23
  template: string;
24
+ capabilities?: LayoutCapabilities;
22
25
  };
23
26
  export interface SkillEntry {
24
27
  metadata: {
@@ -28,6 +31,7 @@ export interface SkillEntry {
28
31
  };
29
32
  filePath: string;
30
33
  }
34
+ export declare function loadAgentSkills(projectRoot?: string): SkillEntry[];
31
35
  export interface RenderAgentPromptOptions {
32
36
  layout?: LayoutSpec;
33
37
  session?: {
@@ -39,6 +43,8 @@ export interface RenderAgentPromptOptions {
39
43
  vars?: Record<string, unknown>;
40
44
  skills?: SkillEntry[];
41
45
  messages?: TemplateMessage[];
46
+ semanticContinuity?: SemanticContinuityContext;
47
+ threadState?: ConversationThreadState;
42
48
  threadId?: string;
43
49
  }
44
50
  export declare class Crewx extends TypedEventEmitter {
@@ -55,9 +61,12 @@ export declare class Crewx extends TypedEventEmitter {
55
61
  private readonly _tools;
56
62
  private readonly _activeAdapters;
57
63
  private readonly _pendingThreads;
64
+ private readonly _activeTasks;
58
65
  private readonly _remoteFactory?;
59
66
  private readonly _remoteTargets;
60
67
  private readonly _additionalArgsProvider?;
68
+ private _globalSettings?;
69
+ private readonly _callerIdentityOverrides;
61
70
  private constructor();
62
71
  private resolveFileRemoteTarget;
63
72
  private static loadBuiltInConfig;
@@ -69,6 +78,7 @@ export declare class Crewx extends TypedEventEmitter {
69
78
  get plugins(): readonly CrewxPlugin[];
70
79
  get tools(): ReadonlyMap<string, ToolDefinition>;
71
80
  get workspaceId(): string;
81
+ createUiRuntime(options: UiRuntimeOptions): UiRuntimeFacade;
72
82
  get workspaceName(): string;
73
83
  getAgent(agentRef: string): AgentConfig | undefined;
74
84
  getRemoteProviderConfig(providerId: string): RemoteProviderConfig | undefined;
@@ -81,6 +91,8 @@ export declare class Crewx extends TypedEventEmitter {
81
91
  stopAllAdapters(opts?: {
82
92
  timeoutMs?: number;
83
93
  }): Promise<void>;
94
+ private abortAll;
95
+ private _drainActiveTasks;
84
96
  close(): Promise<void>;
85
97
  filterAgents(filters: {
86
98
  role?: string;
@@ -95,12 +107,36 @@ export declare class Crewx extends TypedEventEmitter {
95
107
  private _resolveLayoutSpec;
96
108
  private _extractLayoutId;
97
109
  private _extractLayoutProps;
110
+ private _resolveLayoutContinuityCapability;
98
111
  private _getConversationProvider;
112
+ private _filterActivityLogByTaskIds;
99
113
  private _fetchHistoryMessages;
114
+ private _resolveFreshProvider;
115
+ private _resolveLocalServerRuntime;
116
+ private _readInputBudgetPercent;
117
+ private _resolveBudgetModel;
118
+ private _resolveContextMode;
119
+ private _hasUsableResumeSessionId;
120
+ private _buildInstructionOnlyResumeManifest;
121
+ private _buildInstructionOnlyContinuity;
122
+ private _prepareInstructionOnlyResumeWithBudget;
123
+ private _activityLogEntryCounts;
124
+ private _buildUnresolvedContextBudgetManifest;
125
+ private _buildResolvedContextBudgetManifest;
126
+ private _renderFreshPromptVariant;
127
+ private _prepareFreshPromptWithBudget;
128
+ private _recountFreshProviderInitialInput;
129
+ private _validateFreshProviderInitialInputBudget;
100
130
  private _resolveTimeout;
131
+ private _resolveIdleTimeout;
101
132
  private _lookupCliAdapter;
133
+ private _resolveEffectiveCost;
102
134
  private _resolveEffectiveCwd;
103
135
  private _buildFileRemoteOptions;
136
+ private _registerCallerIdentityOverride;
137
+ private _clearCallerIdentityOverride;
138
+ private _rewriteCallerFacingPayload;
139
+ protected emit<K extends CrewxEventName>(event: K, payload: CrewxEventPayload<K>): void;
104
140
  private emitToolEvents;
105
141
  private emitTaskLogEntries;
106
142
  private tryParseJson;
@@ -0,0 +1,2 @@
1
+ export declare const THREAD_HIGHLIGHT_PROMPT_INSTRUCTIONS: string;
2
+ export declare const THREAD_HIGHLIGHT_CONSOLIDATION_PROMPT_INSTRUCTIONS: string;
@@ -0,0 +1,326 @@
1
+ import { z } from 'zod';
2
+ import type { ThreadHighlight } from '../schema/thread-history.js';
3
+ import type { ProviderRuntime } from '../provider/bridge.js';
4
+ import type { CreateThreadHighlightInput, ThreadHighlightRegenerationCandidate } from '../repository/thread-history.repository.js';
5
+ export { THREAD_HIGHLIGHT_CONSOLIDATION_PROMPT_INSTRUCTIONS, THREAD_HIGHLIGHT_PROMPT_INSTRUCTIONS, } from './thread-highlight-prompt.js';
6
+ export declare const THREAD_HIGHLIGHTER_AGENT_ID: "thread_highlighter";
7
+ export declare const THREAD_HIGHLIGHTER_PROVIDER_ORDER: readonly ["cli/claude", "cli/opencode", "cli/copilot", "cli/codex"];
8
+ export type ThreadHighlightProviderId = (typeof THREAD_HIGHLIGHTER_PROVIDER_ORDER)[number];
9
+ export declare const MAX_THREAD_HIGHLIGHT_TURN_TEXT_LENGTH = 4000;
10
+ export declare const MAX_THREAD_HIGHLIGHT_PROMPT_LENGTH = 32000;
11
+ export declare const MAX_THREAD_HIGHLIGHTS_PER_RUN = 3;
12
+ export declare const MAX_THREAD_HIGHLIGHTS_PER_THREAD = 10;
13
+ export declare const MAX_THREAD_HIGHLIGHT_INPUT_TURNS = 100;
14
+ export declare const MAX_THREAD_HIGHLIGHT_REGENERATION_CANDIDATES = 40;
15
+ export declare const MAX_THREAD_HIGHLIGHT_ALREADY_RECORDED_COUNT = 20;
16
+ export declare const MAX_THREAD_HIGHLIGHT_ALREADY_RECORDED_TEXT_LENGTH = 160;
17
+ export declare const MAX_THREAD_HIGHLIGHT_ALREADY_RECORDED_TOTAL_LENGTH = 4000;
18
+ export declare const ThreadHighlightItemSchema: z.ZodObject<{
19
+ kind: z.ZodEnum<["decision", "judgment", "issue", "result", "pivot"]>;
20
+ text: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
21
+ anchorTaskId: z.ZodString;
22
+ coversFromTaskId: z.ZodString;
23
+ coversToTaskId: z.ZodString;
24
+ }, "strict", z.ZodTypeAny, {
25
+ text: string;
26
+ kind: "result" | "decision" | "judgment" | "issue" | "pivot";
27
+ coversFromTaskId: string;
28
+ coversToTaskId: string;
29
+ anchorTaskId: string;
30
+ }, {
31
+ text: string;
32
+ kind: "result" | "decision" | "judgment" | "issue" | "pivot";
33
+ coversFromTaskId: string;
34
+ coversToTaskId: string;
35
+ anchorTaskId: string;
36
+ }>;
37
+ export declare const ThreadHighlightResponseSchema: z.ZodObject<{
38
+ highlights: z.ZodArray<z.ZodObject<{
39
+ kind: z.ZodEnum<["decision", "judgment", "issue", "result", "pivot"]>;
40
+ text: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
41
+ anchorTaskId: z.ZodString;
42
+ coversFromTaskId: z.ZodString;
43
+ coversToTaskId: z.ZodString;
44
+ }, "strict", z.ZodTypeAny, {
45
+ text: string;
46
+ kind: "result" | "decision" | "judgment" | "issue" | "pivot";
47
+ coversFromTaskId: string;
48
+ coversToTaskId: string;
49
+ anchorTaskId: string;
50
+ }, {
51
+ text: string;
52
+ kind: "result" | "decision" | "judgment" | "issue" | "pivot";
53
+ coversFromTaskId: string;
54
+ coversToTaskId: string;
55
+ anchorTaskId: string;
56
+ }>, "many">;
57
+ }, "strict", z.ZodTypeAny, {
58
+ highlights: {
59
+ text: string;
60
+ kind: "result" | "decision" | "judgment" | "issue" | "pivot";
61
+ coversFromTaskId: string;
62
+ coversToTaskId: string;
63
+ anchorTaskId: string;
64
+ }[];
65
+ }, {
66
+ highlights: {
67
+ text: string;
68
+ kind: "result" | "decision" | "judgment" | "issue" | "pivot";
69
+ coversFromTaskId: string;
70
+ coversToTaskId: string;
71
+ anchorTaskId: string;
72
+ }[];
73
+ }>;
74
+ export declare const ThreadHighlightConsolidationItemSchema: z.ZodObject<{
75
+ id: z.ZodOptional<z.ZodString>;
76
+ source: z.ZodOptional<z.ZodEnum<["auto", "manual"]>>;
77
+ status: z.ZodOptional<z.ZodEnum<["active", "dismissed"]>>;
78
+ kind: z.ZodEnum<["decision", "judgment", "issue", "result", "pivot"]>;
79
+ text: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
80
+ anchorTaskId: z.ZodString;
81
+ coversFromTaskId: z.ZodString;
82
+ coversToTaskId: z.ZodString;
83
+ }, "strict", z.ZodTypeAny, {
84
+ text: string;
85
+ kind: "result" | "decision" | "judgment" | "issue" | "pivot";
86
+ coversFromTaskId: string;
87
+ coversToTaskId: string;
88
+ anchorTaskId: string;
89
+ id?: string | undefined;
90
+ status?: "active" | "dismissed" | undefined;
91
+ source?: "auto" | "manual" | undefined;
92
+ }, {
93
+ text: string;
94
+ kind: "result" | "decision" | "judgment" | "issue" | "pivot";
95
+ coversFromTaskId: string;
96
+ coversToTaskId: string;
97
+ anchorTaskId: string;
98
+ id?: string | undefined;
99
+ status?: "active" | "dismissed" | undefined;
100
+ source?: "auto" | "manual" | undefined;
101
+ }>;
102
+ export declare const ThreadHighlightConsolidationResponseSchema: z.ZodObject<{
103
+ highlights: z.ZodArray<z.ZodObject<{
104
+ id: z.ZodOptional<z.ZodString>;
105
+ source: z.ZodOptional<z.ZodEnum<["auto", "manual"]>>;
106
+ status: z.ZodOptional<z.ZodEnum<["active", "dismissed"]>>;
107
+ kind: z.ZodEnum<["decision", "judgment", "issue", "result", "pivot"]>;
108
+ text: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
109
+ anchorTaskId: z.ZodString;
110
+ coversFromTaskId: z.ZodString;
111
+ coversToTaskId: z.ZodString;
112
+ }, "strict", z.ZodTypeAny, {
113
+ text: string;
114
+ kind: "result" | "decision" | "judgment" | "issue" | "pivot";
115
+ coversFromTaskId: string;
116
+ coversToTaskId: string;
117
+ anchorTaskId: string;
118
+ id?: string | undefined;
119
+ status?: "active" | "dismissed" | undefined;
120
+ source?: "auto" | "manual" | undefined;
121
+ }, {
122
+ text: string;
123
+ kind: "result" | "decision" | "judgment" | "issue" | "pivot";
124
+ coversFromTaskId: string;
125
+ coversToTaskId: string;
126
+ anchorTaskId: string;
127
+ id?: string | undefined;
128
+ status?: "active" | "dismissed" | undefined;
129
+ source?: "auto" | "manual" | undefined;
130
+ }>, "many">;
131
+ }, "strict", z.ZodTypeAny, {
132
+ highlights: {
133
+ text: string;
134
+ kind: "result" | "decision" | "judgment" | "issue" | "pivot";
135
+ coversFromTaskId: string;
136
+ coversToTaskId: string;
137
+ anchorTaskId: string;
138
+ id?: string | undefined;
139
+ status?: "active" | "dismissed" | undefined;
140
+ source?: "auto" | "manual" | undefined;
141
+ }[];
142
+ }, {
143
+ highlights: {
144
+ text: string;
145
+ kind: "result" | "decision" | "judgment" | "issue" | "pivot";
146
+ coversFromTaskId: string;
147
+ coversToTaskId: string;
148
+ anchorTaskId: string;
149
+ id?: string | undefined;
150
+ status?: "active" | "dismissed" | undefined;
151
+ source?: "auto" | "manual" | undefined;
152
+ }[];
153
+ }>;
154
+ export type ThreadHighlightItem = z.infer<typeof ThreadHighlightItemSchema>;
155
+ export type ThreadHighlightResponse = z.infer<typeof ThreadHighlightResponseSchema>;
156
+ export type ThreadHighlightConsolidationResponse = z.infer<typeof ThreadHighlightConsolidationResponseSchema>;
157
+ export interface ThreadHighlightTaskTurn {
158
+ taskId?: string;
159
+ task_id?: string;
160
+ id?: string;
161
+ prompt: string;
162
+ result?: string | null;
163
+ response?: string | null;
164
+ status?: string | null;
165
+ startedAt?: string | null;
166
+ started_at?: string | null;
167
+ completedAt?: string | null;
168
+ completed_at?: string | null;
169
+ }
170
+ export interface ThreadHighlightAlreadyRecorded {
171
+ kind: ThreadHighlight['kind'];
172
+ text: string;
173
+ }
174
+ export interface ThreadHighlightGenerationInput {
175
+ threadId: string;
176
+ agentId?: string;
177
+ workspaceId?: string;
178
+ turns: readonly ThreadHighlightTaskTurn[];
179
+ alreadyRecorded?: readonly ThreadHighlightAlreadyRecorded[];
180
+ already_recorded?: readonly ThreadHighlightAlreadyRecorded[];
181
+ coversFromTaskId?: string;
182
+ coversToTaskId?: string;
183
+ covers_from_task_id?: string;
184
+ covers_to_task_id?: string;
185
+ detectorVersion?: string;
186
+ detector_version?: string;
187
+ }
188
+ export interface ThreadHighlightConsolidationItem {
189
+ id?: string | null;
190
+ source?: string | null;
191
+ status?: string | null;
192
+ kind: ThreadHighlight['kind'];
193
+ text: string | null;
194
+ anchorTaskId?: string | null;
195
+ coversFromTaskId?: string | null;
196
+ coversToTaskId?: string | null;
197
+ sourceTaskId?: string | null;
198
+ covers_from_task_id?: string | null;
199
+ covers_to_task_id?: string | null;
200
+ source_task_id?: string | null;
201
+ contentFingerprint?: string | null;
202
+ content_fingerprint?: string | null;
203
+ }
204
+ export interface ThreadHighlightConsolidationInput {
205
+ threadId?: string;
206
+ agentId?: string;
207
+ workspaceId?: string;
208
+ detectorVersion?: string;
209
+ detector_version?: string;
210
+ currentHighlights?: readonly ThreadHighlightConsolidationItem[];
211
+ currentAutoHighlights?: readonly ThreadHighlightConsolidationItem[];
212
+ current?: readonly ThreadHighlightConsolidationItem[];
213
+ existingHighlights?: readonly ThreadHighlightConsolidationItem[];
214
+ existingAutoHighlights?: readonly ThreadHighlightConsolidationItem[];
215
+ existing?: readonly ThreadHighlightConsolidationItem[];
216
+ newCandidates?: readonly ThreadHighlightConsolidationItem[];
217
+ candidates?: readonly ThreadHighlightConsolidationItem[];
218
+ newHighlights?: readonly ThreadHighlightConsolidationItem[];
219
+ manualHighlights?: readonly ThreadHighlightConsolidationItem[];
220
+ manual?: readonly ThreadHighlightConsolidationItem[];
221
+ }
222
+ export interface ThreadHighlightWriter {
223
+ resolveWorkspaceId?(threadId: string): string | null | Promise<string | null>;
224
+ createHighlight(input: CreateThreadHighlightInput): ThreadHighlight | Promise<ThreadHighlight>;
225
+ }
226
+ export interface ThreadHighlightGeneratorOptions {
227
+ repository: ThreadHighlightWriter;
228
+ workspaceId?: string;
229
+ providerFactory?: (provider: ThreadHighlightProviderId) => ProviderRuntime;
230
+ providers?: Partial<Record<ThreadHighlightProviderId, ProviderRuntime>>;
231
+ }
232
+ export interface ThreadHighlightBatchDetectorOptions {
233
+ providerFactory?: (provider: ThreadHighlightProviderId) => ProviderRuntime;
234
+ providers?: Partial<Record<ThreadHighlightProviderId, ProviderRuntime>>;
235
+ }
236
+ export interface ThreadHighlightConsolidationOptions {
237
+ providerFactory?: (provider: ThreadHighlightProviderId) => ProviderRuntime;
238
+ providers?: Partial<Record<ThreadHighlightProviderId, ProviderRuntime>>;
239
+ }
240
+ export type ThreadHighlightProviderAttemptOutcome = 'provider_error' | 'invalid_output';
241
+ export interface ThreadHighlightProviderAttempt {
242
+ provider: ThreadHighlightProviderId;
243
+ outcome: ThreadHighlightProviderAttemptOutcome;
244
+ batchIndex?: number;
245
+ }
246
+ export type ThreadHighlightFailureCode = 'INVALID_INPUT' | 'PROVIDER_EXHAUSTED' | 'INVALID_OUTPUT' | 'REPOSITORY_FAILED' | 'THREAD_HIGHLIGHT_REGENERATION_NO_ELIGIBLE_TURNS' | 'THREAD_HIGHLIGHT_REGENERATION_DETECTION_FAILED';
247
+ export interface ThreadHighlightGenerationFailure {
248
+ code: ThreadHighlightFailureCode;
249
+ message: string;
250
+ retryable: boolean;
251
+ attempts: readonly ThreadHighlightProviderAttempt[];
252
+ }
253
+ export interface ThreadHighlightGenerationSuccess {
254
+ ok: true;
255
+ provider: ThreadHighlightProviderId;
256
+ highlights: ThreadHighlight[];
257
+ attempts: readonly ThreadHighlightProviderAttempt[];
258
+ }
259
+ export interface ThreadHighlightGenerationFailureResult {
260
+ ok: false;
261
+ failure: ThreadHighlightGenerationFailure;
262
+ }
263
+ export type ThreadHighlightGenerationResult = ThreadHighlightGenerationSuccess | ThreadHighlightGenerationFailureResult;
264
+ export interface ThreadHighlightRegenerationInput extends Omit<ThreadHighlightGenerationInput, 'turns'> {
265
+ turns: readonly ThreadHighlightTaskTurn[];
266
+ }
267
+ export interface ThreadHighlightBatchDetectionSuccess {
268
+ ok: true;
269
+ provider: ThreadHighlightProviderId;
270
+ candidates: readonly ThreadHighlightRegenerationCandidate[];
271
+ batchCount: number;
272
+ attempts: readonly ThreadHighlightProviderAttempt[];
273
+ }
274
+ export type ThreadHighlightBatchDetectionResult = ThreadHighlightBatchDetectionSuccess | ThreadHighlightGenerationFailureResult;
275
+ export interface ThreadHighlightConsolidationHighlight extends ThreadHighlightRegenerationCandidate {
276
+ id?: string;
277
+ source: 'auto';
278
+ status: 'active';
279
+ }
280
+ export interface ThreadHighlightConsolidationSuccess {
281
+ ok: true;
282
+ provider: ThreadHighlightProviderId | null;
283
+ highlights: readonly ThreadHighlightConsolidationHighlight[];
284
+ candidates: readonly ThreadHighlightRegenerationCandidate[];
285
+ dismissedHighlightIds: readonly string[];
286
+ attempts: readonly ThreadHighlightProviderAttempt[];
287
+ }
288
+ export type ThreadHighlightConsolidationResult = ThreadHighlightConsolidationSuccess | ThreadHighlightGenerationFailureResult;
289
+ export declare class ThreadHighlightGenerationError extends Error {
290
+ readonly failure: ThreadHighlightGenerationFailure;
291
+ readonly name = "ThreadHighlightGenerationError";
292
+ constructor(failure: ThreadHighlightGenerationFailure);
293
+ }
294
+ export declare class ThreadHighlightOutputValidationError extends Error {
295
+ readonly issuePaths: readonly string[];
296
+ readonly name = "ThreadHighlightOutputValidationError";
297
+ constructor(issuePaths: readonly string[]);
298
+ }
299
+ export declare class ThreadHighlightInputValidationError extends Error {
300
+ readonly field: string;
301
+ readonly name = "ThreadHighlightInputValidationError";
302
+ constructor(field: string);
303
+ }
304
+ export declare function redactThreadHighlightSecrets(value: string): string;
305
+ export declare function buildThreadHighlightPrompt(input: ThreadHighlightGenerationInput): string;
306
+ export declare function buildThreadHighlightConsolidationPrompt(input: ThreadHighlightConsolidationInput): string;
307
+ export declare function parseThreadHighlightResponse(raw: unknown): ThreadHighlightResponse;
308
+ export declare function parseThreadHighlightConsolidationResponse(raw: unknown): ThreadHighlightConsolidationResponse;
309
+ export declare class ThreadHighlightGenerator {
310
+ private readonly repository;
311
+ private readonly workspaceId?;
312
+ private readonly providerFactory;
313
+ private readonly providers;
314
+ constructor(options: ThreadHighlightGeneratorOptions);
315
+ private detectBatch;
316
+ detectBatches(input: ThreadHighlightRegenerationInput): Promise<ThreadHighlightBatchDetectionResult>;
317
+ consolidate(input: ThreadHighlightConsolidationInput): Promise<ThreadHighlightConsolidationResult>;
318
+ consolidateHighlights(input: ThreadHighlightConsolidationInput): Promise<ThreadHighlightConsolidationResult>;
319
+ generate(input: ThreadHighlightGenerationInput): Promise<ThreadHighlightGenerationResult>;
320
+ generateOrThrow(input: ThreadHighlightGenerationInput): Promise<ThreadHighlightGenerationSuccess>;
321
+ }
322
+ export declare function generateThreadHighlights(input: ThreadHighlightGenerationInput, options: ThreadHighlightGeneratorOptions): Promise<ThreadHighlightGenerationResult>;
323
+ export declare function consolidateThreadHighlights(input: ThreadHighlightConsolidationInput, options?: ThreadHighlightConsolidationOptions): Promise<ThreadHighlightConsolidationResult>;
324
+ export declare function detectThreadHighlightBatches(input: ThreadHighlightRegenerationInput, options: ThreadHighlightBatchDetectorOptions): Promise<ThreadHighlightBatchDetectionResult>;
325
+ export declare const generateThreadHighlightBatches: typeof detectThreadHighlightBatches;
326
+ export declare const ThreadHighlighter: typeof ThreadHighlightGenerator;
@@ -2,8 +2,16 @@ export { Crewx } from './facade/Crewx.browser.js';
2
2
  export type { ToolDefinition, BrowserQueryOptions, BrowserFromConfigOptions } from './facade/Crewx.browser.js';
3
3
  export { registerProviderFactory, createProvider, ProviderError } from './provider/bridge.browser.js';
4
4
  export type { ProviderRuntime, ProviderFactory, ProviderQueryOptions } from './provider/bridge.browser.js';
5
+ export { classifyTaskError } from './provider/classify-task-error.js';
6
+ export { redactTechnicalMessage } from './provider/redact-technical-message.js';
7
+ export type { TaskErrorCode, TaskErrorMeta, TaskErrorProjection } from './provider/task-error.types.js';
5
8
  export { parseYamlContent, ConfigLoadError } from './config/loader.browser.js';
9
+ export { normalizeClaudeMode } from './config/canonicalize-agent-options.js';
6
10
  export { BrowserFsAdapter } from './platform/BrowserFsAdapter.js';
7
11
  export type { IFsAdapter } from './platform/IFsAdapter.js';
8
12
  export { PROVIDER_ORDER, providerRank, compareProviders, normalizeProviderId } from './provider/order.js';
9
- export type { AgentConfig, CrewxProjectConfig, CrewxOptions, QueryOptions, QueryResult, ExecuteOptions, ExecuteResult, } from './types/index.js';
13
+ export { ANTIGRAVITY_MODEL_COMPATIBILITY, CLAUDE_MODEL_COMPATIBILITY_PAIRS, CLAUDE_OPUS_4_8_BASE_MODEL_ID, CLAUDE_OPUS_4_8_LEGACY_MODEL_ID, resolveAntigravityModel, resolveCatalogModelId, resolveProviderCatalogModel, } from './config/model-compat.js';
14
+ export type { AntigravityResolvedModel } from './config/model-compat.js';
15
+ export { BUILTIN_THREAD_STATES, THREAD_PRIORITIES, customStateLabel, hasThreadTitleKey, isThreadPriority, isThreadState, matchesThreadTitleFilter, mergeThreadTitleMeta, parseThreadPriorityFilter, parseThreadStateFilter, readThreadTitleMeta, threadTitleSearchHaystack, } from './repository/thread-title.types.js';
16
+ export type { BuiltinThreadState, LegacyThreadState, StableThreadState, ThreadPriority, ThreadState, ThreadTitleFilter, ThreadTitleMeta, ThreadTitlePatch, } from './repository/thread-title.types.js';
17
+ export type { AgentConfig, CrewxProjectConfig, CrewxOptions, QueryOptions, QueryResult, ExecuteOptions, ExecuteResult, ContextMode, } from './types/index.js';