clay-server 2.47.0-beta.1 → 2.47.0-beta.3

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 (37) hide show
  1. package/lib/codex-defaults.js +12 -2
  2. package/lib/daemon.js +38 -8
  3. package/lib/kiro-defaults.js +22 -0
  4. package/lib/project-connection.js +3 -1
  5. package/lib/project-notifications.js +3 -1
  6. package/lib/project-sessions.js +28 -9
  7. package/lib/project.js +42 -10
  8. package/lib/public/app.js +8 -0
  9. package/lib/public/css/mobile-nav.css +53 -9
  10. package/lib/public/css/sidebar.css +24 -1
  11. package/lib/public/css/tui-attention.css +4 -63
  12. package/lib/public/index.html +4 -0
  13. package/lib/public/kiro-avatar.svg +14 -0
  14. package/lib/public/modules/app-messages.js +14 -12
  15. package/lib/public/modules/app-notifications.js +12 -4
  16. package/lib/public/modules/app-panels.js +10 -4
  17. package/lib/public/modules/app-rate-limit.js +41 -13
  18. package/lib/public/modules/app-rendering.js +14 -0
  19. package/lib/public/modules/input.js +4 -3
  20. package/lib/public/modules/mate-sidebar.js +3 -3
  21. package/lib/public/modules/session-tui-view.js +4 -40
  22. package/lib/public/modules/sidebar-mates.js +1 -1
  23. package/lib/public/modules/sidebar-mobile.js +56 -23
  24. package/lib/public/modules/sidebar-sessions.js +126 -63
  25. package/lib/public/modules/tools.js +1 -1
  26. package/lib/public/modules/tui-grab.js +12 -3
  27. package/lib/sdk-bridge.js +90 -21
  28. package/lib/sdk-message-processor.js +4 -4
  29. package/lib/server.js +4 -0
  30. package/lib/users-preferences.js +3 -1
  31. package/lib/yoke/adapters/claude.js +25 -0
  32. package/lib/yoke/adapters/codex.js +34 -21
  33. package/lib/yoke/adapters/kiro.js +1170 -0
  34. package/lib/yoke/index.js +70 -6
  35. package/lib/yoke/kiro-acp-server.js +328 -0
  36. package/lib/yoke/vendor-registry.js +55 -0
  37. package/package.json +4 -3
@@ -597,6 +597,27 @@ function flattenEvent(notification, state) {
597
597
  return events;
598
598
  }
599
599
 
600
+ function createEventState(model) {
601
+ return {
602
+ blockCounter: 0,
603
+ threadId: null,
604
+ turnStarted: false,
605
+ lastUsage: null,
606
+ lastInputTokens: null,
607
+ done: false,
608
+ aborted: false,
609
+ loopStarted: false,
610
+ model: model || "gpt-5.6-terra",
611
+ textBlocks: {},
612
+ textLengths: {},
613
+ thinkingBlocks: {},
614
+ thinkingLengths: {},
615
+ toolBlocks: {},
616
+ commandInputs: {},
617
+ planTexts: {},
618
+ };
619
+ }
620
+
600
621
  // --- QueryHandle ---
601
622
 
602
623
  function createCodexQueryHandle(appServer, queryOpts) {
@@ -611,25 +632,7 @@ function createCodexQueryHandle(appServer, queryOpts) {
611
632
  return state.aborted || (abortController && abortController.signal && abortController.signal.aborted);
612
633
  }
613
634
 
614
- var state = {
615
- blockCounter: 0,
616
- threadId: null,
617
- turnStarted: false,
618
- lastUsage: null,
619
- lastInputTokens: null, // from thread/tokenUsage/updated
620
- done: false,
621
- aborted: false,
622
- loopStarted: false,
623
- model: queryOpts.model || "gpt-5.6-terra",
624
- // Track incremental text deltas
625
- textBlocks: {}, // itemId -> true (text_start sent)
626
- textLengths: {}, // itemId -> last sent length
627
- thinkingBlocks: {}, // itemId -> blockId
628
- thinkingLengths: {}, // itemId -> last sent length
629
- toolBlocks: {}, // itemId -> blockId (for tool_start dedup)
630
- commandInputs: {}, // itemId -> command captured from approval/start events
631
- planTexts: {}, // itemId -> streamed plan text
632
- };
635
+ var state = createEventState(queryOpts.model);
633
636
 
634
637
  // Internal event buffer for async iterator
635
638
  var eventBuffer = [];
@@ -867,7 +870,7 @@ function createCodexQueryHandle(appServer, queryOpts) {
867
870
  var threadParams = {
868
871
  model: queryOpts.model || "gpt-5.6-terra",
869
872
  sandbox: queryOpts.sandboxMode || "workspace-write",
870
- approvalPolicy: queryOpts.approvalPolicy || "on-failure",
873
+ approvalPolicy: queryOpts.approvalPolicy || "on-request",
871
874
  cwd: queryOpts.cwd,
872
875
  skipGitRepoCheck: true,
873
876
  };
@@ -1139,6 +1142,11 @@ function createCodexAdapter(opts) {
1139
1142
  slashCommands: skillNames || [],
1140
1143
  fastModeState: null,
1141
1144
  capabilities: {
1145
+ effort: true,
1146
+ fork: true,
1147
+ rollback: true,
1148
+ sessionListing: false,
1149
+ sessionRename: false,
1142
1150
  thinking: true,
1143
1151
  betas: false,
1144
1152
  rewind: false,
@@ -1463,7 +1471,7 @@ function createCodexAdapter(opts) {
1463
1471
  if (queryOpts.toolPolicy === "allow-all") {
1464
1472
  handleOpts.approvalPolicy = "never";
1465
1473
  } else {
1466
- handleOpts.approvalPolicy = codexOpts.approvalPolicy || "on-failure";
1474
+ handleOpts.approvalPolicy = codexOpts.approvalPolicy || "on-request";
1467
1475
  }
1468
1476
 
1469
1477
  // Sandbox mode
@@ -1590,4 +1598,9 @@ function createCodexAdapter(opts) {
1590
1598
 
1591
1599
  module.exports = {
1592
1600
  createCodexAdapter: createCodexAdapter,
1601
+ contractTestKit: {
1602
+ createEventState: createEventState,
1603
+ createQueryHandle: createCodexQueryHandle,
1604
+ normalizeEvent: flattenEvent,
1605
+ },
1593
1606
  };