strands-darwin 0.0.37 → 0.0.39

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 (82) hide show
  1. package/README.md +16 -1
  2. package/README.zh-CN.md +11 -1
  3. package/dist/src/agent/permission-rules.js +1 -1
  4. package/dist/src/agent/permission-rules.js.map +1 -1
  5. package/dist/src/agent/permission.d.ts +4 -1
  6. package/dist/src/agent/permission.js +21 -4
  7. package/dist/src/agent/permission.js.map +1 -1
  8. package/dist/src/agent/runtime.d.ts +6 -2
  9. package/dist/src/agent/runtime.js +37 -6
  10. package/dist/src/agent/runtime.js.map +1 -1
  11. package/dist/src/agent/session-lease.d.ts +31 -0
  12. package/dist/src/agent/session-lease.js +42 -0
  13. package/dist/src/agent/session-lease.js.map +1 -0
  14. package/dist/src/agent/session.d.ts +2 -47
  15. package/dist/src/agent/session.js +3 -50
  16. package/dist/src/agent/session.js.map +1 -1
  17. package/dist/src/cli-list-agents.d.ts +1 -0
  18. package/dist/src/cli-list-agents.js +12 -0
  19. package/dist/src/cli-list-agents.js.map +1 -0
  20. package/dist/src/cli-usage.d.ts +1 -1
  21. package/dist/src/cli-usage.js +5 -0
  22. package/dist/src/cli-usage.js.map +1 -1
  23. package/dist/src/cli.js +9 -1
  24. package/dist/src/cli.js.map +1 -1
  25. package/dist/src/collaboration/command.d.ts +5 -0
  26. package/dist/src/collaboration/command.js +72 -0
  27. package/dist/src/collaboration/command.js.map +1 -0
  28. package/dist/src/collaboration/grammar.d.ts +3 -0
  29. package/dist/src/collaboration/grammar.js +8 -0
  30. package/dist/src/collaboration/grammar.js.map +1 -0
  31. package/dist/src/collaboration/local.d.ts +61 -0
  32. package/dist/src/collaboration/local.js +407 -0
  33. package/dist/src/collaboration/local.js.map +1 -0
  34. package/dist/src/collaboration/protocol.d.ts +66 -0
  35. package/dist/src/collaboration/protocol.js +28 -0
  36. package/dist/src/collaboration/protocol.js.map +1 -0
  37. package/dist/src/collaboration/storage.d.ts +36 -0
  38. package/dist/src/collaboration/storage.js +241 -0
  39. package/dist/src/collaboration/storage.js.map +1 -0
  40. package/dist/src/collaboration/tools.d.ts +5 -0
  41. package/dist/src/collaboration/tools.js +11 -0
  42. package/dist/src/collaboration/tools.js.map +1 -0
  43. package/dist/src/commands/custom-commands.d.ts +1 -1
  44. package/dist/src/commands/custom-commands.js +3 -1
  45. package/dist/src/commands/custom-commands.js.map +1 -1
  46. package/dist/src/commands/review-command.d.ts +8 -3
  47. package/dist/src/commands/review-command.js +17 -3
  48. package/dist/src/commands/review-command.js.map +1 -1
  49. package/dist/src/dev-repl.js +8 -1
  50. package/dist/src/dev-repl.js.map +1 -1
  51. package/dist/src/headless-protocol.d.ts +6 -2
  52. package/dist/src/headless-protocol.js +32 -8
  53. package/dist/src/headless-protocol.js.map +1 -1
  54. package/dist/src/headless-runner.js +45 -1
  55. package/dist/src/headless-runner.js.map +1 -1
  56. package/dist/src/headless.d.ts +2 -1
  57. package/dist/src/headless.js +5 -5
  58. package/dist/src/headless.js.map +1 -1
  59. package/dist/src/list-agents.d.ts +21 -0
  60. package/dist/src/list-agents.js +219 -0
  61. package/dist/src/list-agents.js.map +1 -0
  62. package/dist/src/paths.d.ts +5 -0
  63. package/dist/src/paths.js +14 -2
  64. package/dist/src/paths.js.map +1 -1
  65. package/dist/src/trajectory/record.d.ts +8 -3
  66. package/dist/src/trajectory/record.js +3 -0
  67. package/dist/src/trajectory/record.js.map +1 -1
  68. package/dist/src/trajectory/replay.js +13 -0
  69. package/dist/src/trajectory/replay.js.map +1 -1
  70. package/dist/src/trajectory/rewind-history.js +1 -1
  71. package/dist/src/trajectory/rewind-history.js.map +1 -1
  72. package/dist/src/trajectory/writer.d.ts +3 -2
  73. package/dist/src/trajectory/writer.js +4 -0
  74. package/dist/src/trajectory/writer.js.map +1 -1
  75. package/dist/src/tui/App.js +83 -1
  76. package/dist/src/tui/App.js.map +1 -1
  77. package/dist/src/tui/InputBox.d.ts +1 -1
  78. package/dist/src/tui/InputBox.js +1 -1
  79. package/dist/src/tui/help-format.d.ts +2 -2
  80. package/dist/src/tui/help-format.js +4 -3
  81. package/dist/src/tui/help-format.js.map +1 -1
  82. package/package.json +1 -1
@@ -1,13 +1,14 @@
1
1
  import { BUILTIN_COMMAND_DESCRIPTIONS, BUILTIN_COMMAND_NAMES, } from '../commands/custom-commands.js';
2
+ import { COLLABORATION_GRAMMAR } from '../collaboration/grammar.js';
2
3
  import { ESCAPE_REWIND_CHORD_MS } from './rewind-search.js';
3
4
  /** Hard report bounds: help is transcript history, never an unbounded catalogue dump. */
4
- export const MAX_HELP_COMMANDS = 25;
5
+ export const MAX_HELP_COMMANDS = 27;
5
6
  /**
6
7
  * Fixed rows `formatHelpReport()` always emits: the title, the command-section header,
7
8
  * the "prompt and completion" block and the "editing and session" block, plus the
8
9
  * one-line overflow notice a filled command cap would add.
9
10
  */
10
- export const HELP_FIXED_LINES = 25;
11
+ export const HELP_FIXED_LINES = 25 + COLLABORATION_GRAMMAR.length;
11
12
  /**
12
13
  * The line cap must cover the worst case — a command inventory that fills
13
14
  * `MAX_HELP_COMMANDS` *and* every fixed row — so `slice()` can never silently drop a
@@ -32,7 +33,7 @@ export function formatHelpReport() {
32
33
  if (commandNames.length < BUILTIN_COMMAND_NAMES.length) {
33
34
  lines.push(` … ${BUILTIN_COMMAND_NAMES.length - commandNames.length} more commands not shown`);
34
35
  }
35
- lines.push('prompt and completion:', ' / opens commands and skills · Up/Down select · Tab/Enter completes the selected row', ' @ completes a workspace path · acceptance inserts path text only, never file content', ' !<command> runs your shell command locally (not as a model tool call)', ' Enter sends · Ctrl+J or trailing \\ + Enter inserts a newline · multiline paste never submits', ' Ctrl+O attaches one clipboard image to the next prompt; Ctrl+O again removes it', ' Ctrl+R searches this project’s prompt history · type to filter · Ctrl+R/Up/Down navigate · Tab/Enter accepts', ' Up/Down precedence: completion · Up queued-message take-back · prompt recall · cursor movement', ' Esc closes completion, cancels history search to its exact draft/cursor, or ends prompt recall', ` Esc Esc (within ${ESCAPE_REWIND_CHORD_MS} ms) on an empty idle composer opens the /rewind chooser; one Esc there does nothing`, 'editing and session:', ' Home/End or Ctrl+A/E moves to the visible row edge', ' Ctrl+K/U deletes to the row end/start · Ctrl+W deletes the previous word', ' Alt/Ctrl+Left/Right or Alt+B/F moves by word · Alt+Backspace/Alt+D deletes the word before/after', ' Ctrl+_ (or Ctrl+-) undoes the last Ctrl+K/U, Ctrl+W or Alt word deletion in the draft', ' Ctrl+Y yanks the last cut at the cursor, repeatably in this draft only (65,536 code points max; not the clipboard)', ' Ctrl+S stashes/restores one draft + cursor/image (65,536 code points max); empty composer to restore, never overwrites or sends', ' /rewind branches conversation only; it never rolls back workspace files or side effects', ' /copy puts the last completed answer on the clipboard via OSC 52 (plus wl-copy/xclip/pbcopy when a display is present)', ' Ctrl+B toggles compact/expanded tool details', ' Ctrl+C cancels busy work; press again within 2s to exit (while idle, it exits)', ' Ctrl+D or /exit or /quit exits');
36
+ lines.push('prompt and completion:', ...COLLABORATION_GRAMMAR.map(grammar => ` collaboration: ${grammar}`), ' / opens commands and skills · Up/Down select · Tab/Enter completes the selected row', ' @ completes a workspace path · acceptance inserts path text only, never file content', ' !<command> runs your shell command locally (not as a model tool call)', ' Enter sends · Ctrl+J or trailing \\ + Enter inserts a newline · multiline paste never submits', ' Ctrl+O attaches one clipboard image to the next prompt; Ctrl+O again removes it', ' Ctrl+R searches this project’s prompt history · type to filter · Ctrl+R/Up/Down navigate · Tab/Enter accepts', ' Up/Down precedence: completion · Up queued-message take-back · prompt recall · cursor movement', ' Esc closes completion, cancels history search to its exact draft/cursor, or ends prompt recall', ` Esc Esc (within ${ESCAPE_REWIND_CHORD_MS} ms) on an empty idle composer opens the /rewind chooser; one Esc there does nothing`, 'editing and session:', ' Home/End or Ctrl+A/E moves to the visible row edge', ' Ctrl+K/U deletes to the row end/start · Ctrl+W deletes the previous word', ' Alt/Ctrl+Left/Right or Alt+B/F moves by word · Alt+Backspace/Alt+D deletes the word before/after', ' Ctrl+_ (or Ctrl+-) undoes the last Ctrl+K/U, Ctrl+W or Alt word deletion in the draft', ' Ctrl+Y yanks the last cut at the cursor, repeatably in this draft only (65,536 code points max; not the clipboard)', ' Ctrl+S stashes/restores one draft + cursor/image (65,536 code points max); empty composer to restore, never overwrites or sends', ' /rewind branches conversation only; it never rolls back workspace files or side effects', ' /copy puts the last completed answer on the clipboard via OSC 52 (plus wl-copy/xclip/pbcopy when a display is present)', ' Ctrl+B toggles compact/expanded tool details', ' Ctrl+C cancels busy work; press again within 2s to exit (while idle, it exits)', ' Ctrl+D or /exit or /quit exits');
36
37
  return lines.slice(0, MAX_HELP_LINES).map(boundedLine).join('\n');
37
38
  }
38
39
  //# sourceMappingURL=help-format.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"help-format.js","sourceRoot":"","sources":["../../../src/tui/help-format.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,qBAAqB,GACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,yFAAyF;AACzF,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AACpC;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AACnE,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAE7C,SAAS,WAAW,CAAC,KAAa;IAChC,MAAM,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;IAC1B,IAAI,MAAM,CAAC,MAAM,IAAI,yBAAyB;QAAE,OAAO,KAAK,CAAC;IAC7D,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,yBAAyB,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC;AACvE,CAAC;AAED,2FA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AAqB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,oBAAoB,OAAO,EAAE,CAAC,EACtE,uFAAuF,EACvF,wFAAwF,EACxF,yEAAyE,EACzE,iGAAiG,EACjG,mFAAmF,EACnF,gHAAgH,EAChH,kGAAkG,EAClG,kGAAkG,EAClG,qBAAqB,sBAAsB,sFAAsF,EACjI,sBAAsB,EACtB,sDAAsD,EACtD,4EAA4E,EAC5E,oGAAoG,EACpG,yFAAyF,EACzF,sHAAsH,EACtH,mIAAmI,EACnI,2FAA2F,EAC3F,0HAA0H,EAC1H,gDAAgD,EAChD,kFAAkF,EAClF,kCAAkC,CACnC,CAAC;IAEF,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strands-darwin",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "TUI coding agent built on the Strands TypeScript SDK",
5
5
  "type": "module",
6
6
  "engines": {