@causyne/agent 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/package.json +1 -1
  2. package/src/agentLoop.js +2348 -2531
  3. package/src/agentLoop.ts +2865 -0
  4. package/src/checkpoints.d.ts +4 -0
  5. package/src/cliMode.js +10 -3
  6. package/src/commands.js +109 -6
  7. package/src/config.js +22 -0
  8. package/src/contextManager.d.ts +10 -0
  9. package/src/continuum/adapters/antigravity.js +193 -0
  10. package/src/continuum/adapters/antigravity.ts +204 -0
  11. package/src/continuum/adapters/base.js +48 -0
  12. package/src/continuum/adapters/base.ts +57 -0
  13. package/src/continuum/adapters/causyne.js +66 -0
  14. package/src/continuum/adapters/causyne.ts +72 -0
  15. package/src/continuum/adapters/claudeCode.js +171 -0
  16. package/src/continuum/adapters/claudeCode.ts +179 -0
  17. package/src/continuum/adapters/codex.js +181 -0
  18. package/src/continuum/adapters/codex.ts +193 -0
  19. package/src/continuum/adapters/opencode.js +134 -0
  20. package/src/continuum/adapters/opencode.ts +153 -0
  21. package/src/continuum/compactor.js +54 -0
  22. package/src/continuum/compactor.ts +83 -0
  23. package/src/continuum/index.js +8 -0
  24. package/src/continuum/index.ts +9 -0
  25. package/src/continuum/ingest.js +63 -0
  26. package/src/continuum/ingest.ts +89 -0
  27. package/src/continuum/sanitizer.js +55 -0
  28. package/src/continuum/sanitizer.ts +59 -0
  29. package/src/continuum/scanner.js +86 -0
  30. package/src/continuum/scanner.ts +106 -0
  31. package/src/continuum/types.js +3 -0
  32. package/src/continuum/types.ts +51 -0
  33. package/src/continuum/ui/continuumPicker.js +111 -0
  34. package/src/continuum/ui/continuumPicker.ts +145 -0
  35. package/src/cortex/autoCondenser.d.ts +2 -0
  36. package/src/cortex/vectorDb.d.ts +1 -0
  37. package/src/designPalettes.d.ts +2 -0
  38. package/src/devMode.d.ts +1 -0
  39. package/src/dynamicCatalogue.js +5 -3
  40. package/src/dynamicCatalogue.ts +7 -4
  41. package/src/embodimentSession.d.ts +2 -0
  42. package/src/entrypoint.js +12 -0
  43. package/src/memory.d.ts +1 -0
  44. package/src/memoryManager.d.ts +1 -0
  45. package/src/modelIds.d.ts +2 -0
  46. package/src/outputStore.d.ts +4 -0
  47. package/src/providers/acp.js +320 -299
  48. package/src/providers/acp.ts +360 -0
  49. package/src/providers/antigravity.js +387 -278
  50. package/src/providers/antigravity.ts +450 -0
  51. package/src/providers/base.d.ts +68 -0
  52. package/src/providers/factory.d.ts +1 -0
  53. package/src/provisioning/capabilityProvisioner.d.ts +2 -0
  54. package/src/sandbox.d.ts +1 -0
  55. package/src/skillsManager.d.ts +3 -0
  56. package/src/slopDetector.d.ts +3 -0
  57. package/src/taskBuffer.d.ts +1 -0
  58. package/src/tokenTracker.d.ts +1 -0
  59. package/src/toolPacks.d.ts +8 -0
  60. package/src/tools/registry.d.ts +4 -0
  61. package/src/tui/chatRenderer.js +62 -8
  62. package/src/tui/clipboardSync.js +36 -0
  63. package/src/tui/clipboardSync.ts +36 -0
  64. package/src/tui/dialogs.js +15 -2
  65. package/src/tui/home.js +2 -1
  66. package/src/tui/modelPicker.js +221 -0
  67. package/src/tui/modelPicker.ts +290 -0
  68. package/src/tui/prompt.js +17 -6
  69. package/src/tui/selectList.js +20 -0
package/src/tui/prompt.js CHANGED
@@ -28,6 +28,7 @@ import { pickExample, fitHints } from './banner.js';
28
28
  import { panelRows } from './overlay.js';
29
29
  import { commandPalette, skillPicker, ApprovalLayer, DecisionLayer, ConfirmLayer, HomeLayer, TextLayer } from './dialogs.js';
30
30
  import { describeTool } from './toolDisplay.js';
31
+ import { readClipboardSync } from './clipboardSync.js';
31
32
 
32
33
  const CTRL_C_WINDOW_MS = 2000;
33
34
 
@@ -638,12 +639,6 @@ export class ChatPrompt {
638
639
  if (this.surface.captureMouse() && this.notice.startsWith('top of this view')) this.notice = '';
639
640
  }
640
641
 
641
- if (key.name === 'paste') {
642
- this.editor.insert(key.text);
643
- this.refreshCompletion();
644
- return;
645
- }
646
-
647
642
  if (key.ctrl && key.name === 'c') {
648
643
  // A modal owns the screen, so ctrl+c must dismiss THAT before it touches
649
644
  // the turn behind it. closeLayer() answers false, which is what makes
@@ -662,6 +657,8 @@ export class ChatPrompt {
662
657
 
663
658
  // A dialog owns the keyboard while it is up — the editor must not also see
664
659
  // the keystroke, or typing a filter would edit the message behind it.
660
+ // This MUST route before any default key handling (like paste) so modal
661
+ // dialogs (e.g. InputLayer for API keys) receive bracketed paste events.
665
662
  if (this.layer) {
666
663
  const action = this.layer.key(key);
667
664
  if (action === 'close') { this.closeLayer(); return; }
@@ -676,6 +673,12 @@ export class ChatPrompt {
676
673
  else if (action !== 'passthrough') return;
677
674
  }
678
675
 
676
+ if (key.name === 'paste') {
677
+ this.editor.insert(key.text);
678
+ this.refreshCompletion();
679
+ return;
680
+ }
681
+
679
682
  if (this.completion && this.handleCompletionKey(key)) return;
680
683
  if (this.handleScrollKey(key)) return;
681
684
 
@@ -712,6 +715,14 @@ export class ChatPrompt {
712
715
  case 'p': return this.openPalette();
713
716
  case 'l': return this.clearScreen();
714
717
  case 'o': return this.expand();
718
+ case 'v': {
719
+ const text = readClipboardSync();
720
+ if (text) {
721
+ this.editor.insert(text);
722
+ this.refreshCompletion();
723
+ }
724
+ return;
725
+ }
715
726
  default: break;
716
727
  }
717
728
  }
@@ -16,6 +16,7 @@
16
16
 
17
17
  import { paint, bold, dim, GLYPHS } from './theme.js';
18
18
  import { truncate, visibleWidth, safeDisplay } from './text.js';
19
+ import { readClipboardSync } from './clipboardSync.js';
19
20
 
20
21
  /**
21
22
  * Score `query` against `text` as a fuzzy subsequence.
@@ -223,6 +224,14 @@ export class SelectList {
223
224
  return 'handled';
224
225
  }
225
226
  return 'cancel';
227
+ case 'paste': {
228
+ const clean = String(key.text || '').replace(/[\r\n]+/g, ' ').trim();
229
+ if (clean) {
230
+ this.query += clean;
231
+ this.refilter();
232
+ }
233
+ return 'handled';
234
+ }
226
235
  default: break;
227
236
  }
228
237
 
@@ -231,6 +240,17 @@ export class SelectList {
231
240
  if (key.name === 'p') { this.move(-1, rows); return 'handled'; }
232
241
  if (key.name === 'n') { this.move(1, rows); return 'handled'; }
233
242
  if (key.name === 'u') { this.query = ''; this.refilter(); return 'handled'; }
243
+ if (key.name === 'v') {
244
+ const text = readClipboardSync();
245
+ if (text) {
246
+ const clean = String(text).replace(/[\r\n]+/g, ' ').trim();
247
+ if (clean) {
248
+ this.query += clean;
249
+ this.refilter();
250
+ }
251
+ }
252
+ return 'handled';
253
+ }
234
254
  return null;
235
255
  }
236
256