@bike4mind/cli 4.6.0 → 4.9.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 (41) hide show
  1. package/README.md +119 -0
  2. package/bin/bike4mind-cli.mjs +342 -239
  3. package/dist/{AgentHistoryStore--J3sgO_-.mjs → AgentHistoryStore-jktM0SmD.mjs} +140 -73
  4. package/dist/{ApiClient-CdO4Gamg.mjs → ApiClient-CczpydlW.mjs} +3 -3
  5. package/dist/{BubblewrapRuntime-3jAbC60G.mjs → BubblewrapRuntime-aGfDSJPY.mjs} +2 -2
  6. package/dist/ConfigStore-BAJ4hIHa.mjs +2 -0
  7. package/dist/{ConfigStore-Dusy6glb.mjs → ConfigStore-CO6kREaL.mjs} +101 -27
  8. package/dist/{Logger-C1Wj6xla.mjs → Logger-CHKCF5hd.mjs} +5095 -495
  9. package/dist/{RemoteSkillSource-qTvRkaNA.mjs → RemoteSkillSource-D_F99yBR.mjs} +5 -0
  10. package/dist/{SandboxOrchestrator-CQwYq_uy.mjs → SandboxOrchestrator-ULWvuUct.mjs} +1 -1
  11. package/dist/{SandboxRuntimeAdapter-BsT2iLky.mjs → SandboxRuntimeAdapter-DpDSET-A.mjs} +2 -2
  12. package/dist/{SandboxRuntimeAdapter-Zg_0th7V.mjs → SandboxRuntimeAdapter-FpZRkE6D.mjs} +1 -1
  13. package/dist/{SeatbeltRuntime-C2DEkrjy.mjs → SeatbeltRuntime-C0GJ3nnY.mjs} +2 -2
  14. package/dist/{WorkItemsClient-CxNZaOmc.mjs → WorkItemsClient-aCxMV_Wm.mjs} +1 -1
  15. package/dist/{buildToolSearch-DOb7mx6F.mjs → buildToolSearch-CbLeZ5wP.mjs} +2 -2
  16. package/dist/commands/acpCommand.mjs +6 -6
  17. package/dist/commands/apiCommand.mjs +1 -1
  18. package/dist/commands/doctorCommand.mjs +2 -2
  19. package/dist/commands/envCommand.mjs +1 -1
  20. package/dist/commands/headlessCommand.mjs +7 -7
  21. package/dist/commands/hostCommand.mjs +2 -2
  22. package/dist/commands/mcpCommand.mjs +3 -3
  23. package/dist/commands/mirrorCommand.mjs +2 -2
  24. package/dist/commands/modelsCommand.mjs +5 -5
  25. package/dist/commands/pluginCommand.mjs +1 -1
  26. package/dist/commands/skillsCommand.mjs +4 -4
  27. package/dist/commands/updateCommand.mjs +2 -2
  28. package/dist/{dist-CbViwiS9.mjs → dist-BOxr8LQA.mjs} +185 -12
  29. package/dist/{dist-Citbv0y0.mjs → dist-K7a9yOUb.mjs} +3 -3
  30. package/dist/{fit-CVWDiavv.mjs → fit-BHDTSpfd.mjs} +4 -4
  31. package/dist/{grepSearch-BgoOOwGe-B388GxRD.mjs → grepSearch-CLtEqT4j-BnKPtNWr.mjs} +2 -2
  32. package/dist/index.mjs +2780 -251
  33. package/dist/{modelServers-BaegigV-.mjs → modelServers-CVufZd1f.mjs} +2 -2
  34. package/dist/{package-C9pfAdGF.mjs → package-TACInPbw.mjs} +1 -1
  35. package/dist/{serve-8wyGb8of.mjs → serve-OywSzShu.mjs} +733 -62
  36. package/dist/{store-BbvSi3KK.mjs → store-CmOg7JIt.mjs} +4 -0
  37. package/dist/store-OGMXhD4A.mjs +2 -0
  38. package/dist/{updateChecker-BAKb8KWP.mjs → updateChecker-5v_8LhXy.mjs} +1 -1
  39. package/package.json +14 -14
  40. package/dist/ConfigStore-CausUCzY.mjs +0 -2
  41. package/dist/store-BYeE0shc.mjs +0 -2
package/README.md CHANGED
@@ -69,6 +69,27 @@ b4m
69
69
 
70
70
  When you are signed out, the CLI starts on a local model from Ollama or a model server saved in Desktop. With no local model available, it offers Bike4Mind sign-in.
71
71
 
72
+ ### Optional fullscreen mode
73
+
74
+ Run `b4m --fullscreen` to use the terminal's alternate screen. This opt-in mode
75
+ redraws the live display after resizing and restores the original shell screen
76
+ when it exits. It requires interactive stdin and stdout; piped and headless runs
77
+ keep their normal output behavior. The default normal-screen mode is unchanged,
78
+ including its known resize artifacts in some reflowing terminals.
79
+
80
+ Alternate screen has no native scrollback. Press Ctrl+O to browse completed
81
+ messages, Left/Right to change messages, and Up/Down or PageUp/PageDown to scroll
82
+ wrapped text. Press Ctrl+O again to return to the input. Completed agent steps
83
+ are available as plain JSON text below the message body. Session persistence is
84
+ unchanged. As with other terminal applications, a forced kill cannot run cleanup.
85
+ Command help and diagnostics are retained separately in the fullscreen history
86
+ browser (most recent 64K characters); they do not become conversation messages.
87
+ Retained diagnostics are printed after the original screen is restored on exit,
88
+ so initialization failures and restart hints remain available in shell history.
89
+ While a permission prompt is active, PageUp/PageDown scrolls its complete pending
90
+ arguments and preview. Paging never approves or denies; use the displayed
91
+ decision keys explicitly.
92
+
72
93
  ### Chat without signing in
73
94
 
74
95
  Start Ollama and pull a model, then open the CLI:
@@ -988,6 +1009,104 @@ to trust it. Pending repo MCP servers stay off with the usual warning. Context t
988
1009
  host needs should reach the session through `--append-system-prompt` and
989
1010
  `--mcp-config`.
990
1011
 
1012
+ ## Local CLI session messaging
1013
+
1014
+ On macOS and Linux, independently launched interactive CLI sessions can discover
1015
+ and message each other without Desktop running. Messaging is off at startup;
1016
+ repository settings, agent tools, and saved histories cannot enable it.
1017
+
1018
+ In two terminals working in the same repository (separate Git worktrees work):
1019
+
1020
+ 1. Run `/peers on api-worker` in the first terminal and `/peers on client-worker`
1021
+ in the second. Each command prints that process's session ID.
1022
+ 2. Run `/peers list` to see reachable sessions and their advertised readiness.
1023
+ 3. Run `/peers send <session-id> The response field is now displayName.`
1024
+ 4. In the recipient, inspect `/peers inbox`, then run `/peers release <message-id>`
1025
+ to approve that message. It runs only when the recipient is safely idle.
1026
+ 5. The sender can run `/peers status <session-id> <message-id>` for the exact
1027
+ correlated result. The recipient can send an explicit reply with
1028
+ `/peers reply <received-message-id> Confirmed; the client uses displayName.`
1029
+
1030
+ Incoming messages are held by default. `/peers accept` explicitly allows pending
1031
+ and future incoming messages to start idle model turns and incur usage.
1032
+ `/peers hold` pauses pending delivery; `/peers refuse` rejects incoming work.
1033
+ `/peers cancel <session-id> <message-id>` withdraws an undelivered message, and
1034
+ `/peers delete <message-id>` removes stored message content when safe.
1035
+ `/peers off` unregisters the session and closes its local endpoint.
1036
+ If a receiver has gone away, deleting an unresolved outgoing receipt archives it
1037
+ locally and retains a bounded tombstone. It does not cancel or retry remote work.
1038
+ Already running work may still finish after `/peers off`; its correlated outcome
1039
+ is saved for this conversation's history without starting more work.
1040
+
1041
+ While enabled, the agent has `peer_list`, `peer_send`, and `peer_status` tools, but cannot enable
1042
+ messaging or change inbound policy. Every agent send requires a separate human
1043
+ review, including in auto-accept mode. Peer-origin turns can only send back to
1044
+ their sender and preserve the reply hop limit. A message is peer input, never
1045
+ human permission, and cannot answer approval prompts or bypass denied actions.
1046
+ Approval identifies the recipient process and conversation before sending. If
1047
+ that recipient restarts while approval is pending, request a new approval.
1048
+ The recipient-specific review is the single normal send prompt, and it runs
1049
+ for every payload even in auto-accept mode. Plan mode and explicit tool denials
1050
+ still apply before that review. Human `/peers send` and `/peers reply`
1051
+ commands are independent of the agent's reply chain and send allowance.
1052
+
1053
+ Discovery is limited to the same local user, account/API environment, canonical
1054
+ repository, and additional granted directories. Local-only profiles use the
1055
+ user-owned CLI profile identity. Other projects/accounts and different folder
1056
+ grants cannot communicate in this release; explicit cross-scope pairing is not
1057
+ implemented. Session/model/account/folder changes disable messaging and require
1058
+ another `/peers on`. Automatic delivery is paused outside normal permission mode,
1059
+ while drafting input, while another turn holds the session, and during dialogs.
1060
+
1061
+ Only explicit text crosses the connection. Messages do not expand `@file` or
1062
+ image references, execute slash commands, or attach full conversation histories.
1063
+ Receiving agents can use their own tools subject to their existing permissions.
1064
+ Human input entered during peer work waits for a separate human turn. Its text
1065
+ and expanded file references are not steered into the peer's turn or its result.
1066
+ Custom commands, generated handoffs, compaction, and rewind are unavailable until
1067
+ peer work finishes. Replacing the conversation retires peer enrollment and prevents late
1068
+ peer output from entering the replacement conversation.
1069
+ Transport credentials stay outside model context in owner-only registry files
1070
+ under `~/.bike4mind/peers`. These controls do not isolate malicious programs
1071
+ already running as the same OS user.
1072
+ The CLI secures its own config and peer directories to 0700 when enabling peers;
1073
+ it does not change arbitrary parent-directory permissions. Unsafe ancestors or
1074
+ uncertain stale enrollment claims produce an actionable error instead of being
1075
+ silently trusted. A terminal transport failure disables peer tools and prints a
1076
+ notice; re-enroll only after resolving the reported problem.
1077
+
1078
+ Messages are limited to 8 KiB UTF-8, with 20 pending messages per recipient,
1079
+ two agent sends per turn, a five-hop reply-chain limit, and per-sender rate
1080
+ limits. Pending messages expire after 15 minutes. Receipt content is bounded
1081
+ and retained for up to seven days; unresolved outgoing receipts in the current
1082
+ process retain visible status metadata until reconciled. Correlated result
1083
+ previews are bounded separately.
1084
+ Queued/held, delivered, completed, stopped, cancelled, failed, expired, rejected,
1085
+ and unknown are separate states. Completed means the turn finished, not that its
1086
+ claims were independently verified. An ambiguous disconnect is unknown; do not
1087
+ blindly resend it.
1088
+ Sender-side deadlines cannot prove remote work expired. Unconfirmed outgoing
1089
+ work remains unknown and visible until its remote status is reconciled, including
1090
+ when the recipient started running before the deadline. If that receiver is no
1091
+ longer discoverable, the user can archive the local receipt without claiming the
1092
+ execution stopped.
1093
+ If a model turn finishes but its conversation history cannot be saved, the receipt
1094
+ reports a storage failure with the completed result. This does not mean the work
1095
+ never ran; do not automatically retry it.
1096
+
1097
+ Each launch has a new process identity, separate from its saved conversation.
1098
+ Use distinct saved conversations for concurrent processes. Peer enrollment is
1099
+ serialized per account, project, and saved conversation. This is not a general
1100
+ lock on history files used by sessions that have not enabled peer messaging.
1101
+ Old process addresses are not redirected to resumed histories. Restarted work
1102
+ does not replay pending peer messages automatically. `/peers inbox` can show
1103
+ retired receipts for the same saved conversation; unfinished historical work is
1104
+ marked unknown and must be reconciled manually. When context needs compaction,
1105
+ peer work stops before starting a model turn; compact manually and enable peers
1106
+ again. Native Windows, headless/ACP
1107
+ enrollment, cross-machine delivery, mid-turn injection, shared task boards, and
1108
+ autonomous coordination are outside this first release.
1109
+
991
1110
  ## License
992
1111
 
993
1112
  Private - Bike4Mind