@robota-sdk/agent-cli 3.0.0-beta.82 → 3.0.0-beta.83

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 (135) hide show
  1. package/CHANGELOG.md +2478 -0
  2. package/README.md +70 -18
  3. package/dist/node/bin.js +33 -2
  4. package/dist/node/cli-core-CfQhvbx3.js +2850 -0
  5. package/dist/node/headless.js +2 -2
  6. package/dist/node/index.d.ts +106 -13
  7. package/dist/node/index.d.ts.map +1 -1
  8. package/dist/node/index.js +394 -311
  9. package/dist/node/index.js.map +1 -1
  10. package/dist/node/{node-cmTHiSYe.js → node-B8BhZ3NW.js} +1 -1
  11. package/dist/node/{node-bJ0lEuNF.js → node-C4_FOvnk.js} +2 -2
  12. package/dist/node/{node-bJ0lEuNF.js.map → node-C4_FOvnk.js.map} +1 -1
  13. package/dist/node/{node-hHzxDyjn.js → node-CC5tfdMu.js} +17 -17
  14. package/dist/node/node-CC5tfdMu.js.map +1 -0
  15. package/dist/node/{node-Bs1jlR4B.js → node-CsbnL0Yf.js} +4 -4
  16. package/dist/node/{node-2-nrieFn.js → node-DENLEmMT.js} +2 -2
  17. package/dist/node/{node-2-nrieFn.js.map → node-DENLEmMT.js.map} +1 -1
  18. package/dist/node/node-DtKU0MUr.js +14 -0
  19. package/dist/node/node-DtKU0MUr.js.map +1 -0
  20. package/dist/node/node-j7KM8r3b.js +14 -0
  21. package/dist/web/assets/PretendardVariable.subset.0-BHUkWNFR.woff2 +0 -0
  22. package/dist/web/assets/PretendardVariable.subset.1-C-__qv6_.woff2 +0 -0
  23. package/dist/web/assets/PretendardVariable.subset.10-DzSWztS8.woff2 +0 -0
  24. package/dist/web/assets/PretendardVariable.subset.11-CqVmlKJn.woff2 +0 -0
  25. package/dist/web/assets/PretendardVariable.subset.12-BHuZSgT0.woff2 +0 -0
  26. package/dist/web/assets/PretendardVariable.subset.13-C42mj_j2.woff2 +0 -0
  27. package/dist/web/assets/PretendardVariable.subset.14-Bl512uUX.woff2 +0 -0
  28. package/dist/web/assets/PretendardVariable.subset.15-D04iXIE3.woff2 +0 -0
  29. package/dist/web/assets/PretendardVariable.subset.16-BQUnS2GX.woff2 +0 -0
  30. package/dist/web/assets/PretendardVariable.subset.17-BfZSA-Xc.woff2 +0 -0
  31. package/dist/web/assets/PretendardVariable.subset.18-CwAxMC3C.woff2 +0 -0
  32. package/dist/web/assets/PretendardVariable.subset.19-CJu4Zcdo.woff2 +0 -0
  33. package/dist/web/assets/PretendardVariable.subset.2-dCZkyKLw.woff2 +0 -0
  34. package/dist/web/assets/PretendardVariable.subset.20-Ig1-z3n5.woff2 +0 -0
  35. package/dist/web/assets/PretendardVariable.subset.21-yKPEdLXC.woff2 +0 -0
  36. package/dist/web/assets/PretendardVariable.subset.22-CSqxKoOs.woff2 +0 -0
  37. package/dist/web/assets/PretendardVariable.subset.23-DK80wi0t.woff2 +0 -0
  38. package/dist/web/assets/PretendardVariable.subset.24-CmkE8Q8D.woff2 +0 -0
  39. package/dist/web/assets/PretendardVariable.subset.25-CsoWBIZB.woff2 +0 -0
  40. package/dist/web/assets/PretendardVariable.subset.26-Sozl8dw8.woff2 +0 -0
  41. package/dist/web/assets/PretendardVariable.subset.27-CT6nuW9L.woff2 +0 -0
  42. package/dist/web/assets/PretendardVariable.subset.28-CpO0Y96p.woff2 +0 -0
  43. package/dist/web/assets/PretendardVariable.subset.29-D6hjrUWm.woff2 +0 -0
  44. package/dist/web/assets/PretendardVariable.subset.3-Dqw33sf4.woff2 +0 -0
  45. package/dist/web/assets/PretendardVariable.subset.30-CWDM1c0J.woff2 +0 -0
  46. package/dist/web/assets/PretendardVariable.subset.31-CdmyZ5mm.woff2 +0 -0
  47. package/dist/web/assets/PretendardVariable.subset.32-CGnFWD2i.woff2 +0 -0
  48. package/dist/web/assets/PretendardVariable.subset.33--0OT__YQ.woff2 +0 -0
  49. package/dist/web/assets/PretendardVariable.subset.34-CaCS33Md.woff2 +0 -0
  50. package/dist/web/assets/PretendardVariable.subset.35-DWFYRGLp.woff2 +0 -0
  51. package/dist/web/assets/PretendardVariable.subset.36-Dn5IBRQB.woff2 +0 -0
  52. package/dist/web/assets/PretendardVariable.subset.37-BD6FyOtY.woff2 +0 -0
  53. package/dist/web/assets/PretendardVariable.subset.38-D4hu443z.woff2 +0 -0
  54. package/dist/web/assets/PretendardVariable.subset.39-B_7wfth9.woff2 +0 -0
  55. package/dist/web/assets/PretendardVariable.subset.4-Bvh2YGoc.woff2 +0 -0
  56. package/dist/web/assets/PretendardVariable.subset.40-BDaOfdUe.woff2 +0 -0
  57. package/dist/web/assets/PretendardVariable.subset.41-BUACvzZC.woff2 +0 -0
  58. package/dist/web/assets/PretendardVariable.subset.42-Dp-5mnyL.woff2 +0 -0
  59. package/dist/web/assets/PretendardVariable.subset.43-DHdpry7N.woff2 +0 -0
  60. package/dist/web/assets/PretendardVariable.subset.44-qHopVhdd.woff2 +0 -0
  61. package/dist/web/assets/PretendardVariable.subset.45-BniyRFfm.woff2 +0 -0
  62. package/dist/web/assets/PretendardVariable.subset.46-BMRq7xC-.woff2 +0 -0
  63. package/dist/web/assets/PretendardVariable.subset.47-B-cWO2pw.woff2 +0 -0
  64. package/dist/web/assets/PretendardVariable.subset.48-Ct-fWrPO.woff2 +0 -0
  65. package/dist/web/assets/PretendardVariable.subset.49-BblQVys9.woff2 +0 -0
  66. package/dist/web/assets/PretendardVariable.subset.5-K_MNGNCe.woff2 +0 -0
  67. package/dist/web/assets/PretendardVariable.subset.50-C8IyFH7L.woff2 +0 -0
  68. package/dist/web/assets/PretendardVariable.subset.51-Bxd0gTAs.woff2 +0 -0
  69. package/dist/web/assets/PretendardVariable.subset.52-CNgqKOOJ.woff2 +0 -0
  70. package/dist/web/assets/PretendardVariable.subset.53-BSRnyb-u.woff2 +0 -0
  71. package/dist/web/assets/PretendardVariable.subset.54-Dt2-cQkx.woff2 +0 -0
  72. package/dist/web/assets/PretendardVariable.subset.55-jFgflYjX.woff2 +0 -0
  73. package/dist/web/assets/PretendardVariable.subset.56-BwZdvJZQ.woff2 +0 -0
  74. package/dist/web/assets/PretendardVariable.subset.57-BwFDg-Fs.woff2 +0 -0
  75. package/dist/web/assets/PretendardVariable.subset.58-DlucQts_.woff2 +0 -0
  76. package/dist/web/assets/PretendardVariable.subset.59-CMkWjhdo.woff2 +0 -0
  77. package/dist/web/assets/PretendardVariable.subset.6-Bxhohlcm.woff2 +0 -0
  78. package/dist/web/assets/PretendardVariable.subset.60-CeHezjjf.woff2 +0 -0
  79. package/dist/web/assets/PretendardVariable.subset.61-PUuTnod4.woff2 +0 -0
  80. package/dist/web/assets/PretendardVariable.subset.62-DGSAWCfb.woff2 +0 -0
  81. package/dist/web/assets/PretendardVariable.subset.63-B35xsm4O.woff2 +0 -0
  82. package/dist/web/assets/PretendardVariable.subset.64-CTbrgYF9.woff2 +0 -0
  83. package/dist/web/assets/PretendardVariable.subset.65-B66rjuyf.woff2 +0 -0
  84. package/dist/web/assets/PretendardVariable.subset.66-C3HqaDeY.woff2 +0 -0
  85. package/dist/web/assets/PretendardVariable.subset.67-BmuXdlDy.woff2 +0 -0
  86. package/dist/web/assets/PretendardVariable.subset.68-DS9B48d0.woff2 +0 -0
  87. package/dist/web/assets/PretendardVariable.subset.69-YT16ymcp.woff2 +0 -0
  88. package/dist/web/assets/PretendardVariable.subset.7-E2HaA55t.woff2 +0 -0
  89. package/dist/web/assets/PretendardVariable.subset.70-BUXiAGMT.woff2 +0 -0
  90. package/dist/web/assets/PretendardVariable.subset.71-DuPZj8us.woff2 +0 -0
  91. package/dist/web/assets/PretendardVariable.subset.72-pYYGrEQR.woff2 +0 -0
  92. package/dist/web/assets/PretendardVariable.subset.73-DMrK970F.woff2 +0 -0
  93. package/dist/web/assets/PretendardVariable.subset.74-D4tQnymK.woff2 +0 -0
  94. package/dist/web/assets/PretendardVariable.subset.75-CxKdrRNf.woff2 +0 -0
  95. package/dist/web/assets/PretendardVariable.subset.76-DhPm2b_q.woff2 +0 -0
  96. package/dist/web/assets/PretendardVariable.subset.77-DwaxqOC8.woff2 +0 -0
  97. package/dist/web/assets/PretendardVariable.subset.78-DhqRbBzT.woff2 +0 -0
  98. package/dist/web/assets/PretendardVariable.subset.79-XpoyPP38.woff2 +0 -0
  99. package/dist/web/assets/PretendardVariable.subset.8-CRbJhhyA.woff2 +0 -0
  100. package/dist/web/assets/PretendardVariable.subset.80-DsV9Qp_h.woff2 +0 -0
  101. package/dist/web/assets/PretendardVariable.subset.81-BZzF9Hb3.woff2 +0 -0
  102. package/dist/web/assets/PretendardVariable.subset.82-BgAHe30u.woff2 +0 -0
  103. package/dist/web/assets/PretendardVariable.subset.83-DF-zBLLe.woff2 +0 -0
  104. package/dist/web/assets/PretendardVariable.subset.84-Brb8EsYQ.woff2 +0 -0
  105. package/dist/web/assets/PretendardVariable.subset.85-Byo_x2hf.woff2 +0 -0
  106. package/dist/web/assets/PretendardVariable.subset.86-XG7lTN_6.woff2 +0 -0
  107. package/dist/web/assets/PretendardVariable.subset.87-Lzui2vbK.woff2 +0 -0
  108. package/dist/web/assets/PretendardVariable.subset.88-CqX6JSgh.woff2 +0 -0
  109. package/dist/web/assets/PretendardVariable.subset.89-DOzqWPpX.woff2 +0 -0
  110. package/dist/web/assets/PretendardVariable.subset.9-Btb3bmS6.woff2 +0 -0
  111. package/dist/web/assets/PretendardVariable.subset.90-BF7RiZjm.woff2 +0 -0
  112. package/dist/web/assets/PretendardVariable.subset.91-Csm0YNoH.woff2 +0 -0
  113. package/dist/web/assets/index-DbAewVPM.js +244 -0
  114. package/dist/web/assets/index-DzQQd7ql.css +1 -0
  115. package/dist/web/index.html +6 -4
  116. package/package.json +39 -44
  117. package/dist/node/bounded-output-DpjpS98g-yPybHprY.cjs +0 -1
  118. package/dist/node/cli-core-DWG6gqoq.js +0 -2798
  119. package/dist/node/command-executor-DV-H2oD6-BAvcn7Tf.cjs +0 -1
  120. package/dist/node/http-executor-cWzI2svn-Nn7UFLl8.cjs +0 -1
  121. package/dist/node/index.cjs +0 -2796
  122. package/dist/node/index.d.cts +0 -3445
  123. package/dist/node/index.d.cts.map +0 -1
  124. package/dist/node/node-CFTax5Wl.cjs +0 -1
  125. package/dist/node/node-CQqDd5KI.js +0 -14
  126. package/dist/node/node-CQqDd5KI.js.map +0 -1
  127. package/dist/node/node-D8uo8Kzf.cjs +0 -13
  128. package/dist/node/node-DE_LpiDk.cjs +0 -66
  129. package/dist/node/node-Du_7g6qW.js +0 -14
  130. package/dist/node/node-OBnZskvR.cjs +0 -1
  131. package/dist/node/node-hHzxDyjn.js.map +0 -1
  132. package/dist/node/rolldown-runtime-DK3Fl9T5-BIInC43l.cjs +0 -1
  133. package/dist/node/verdict-decoder-Dk_w2NG9-DNTeVdQ8.cjs +0 -1
  134. package/dist/web/assets/index-8_Slbxe7.css +0 -1
  135. package/dist/web/assets/index-Cgu5C1kn.js +0 -77
package/README.md CHANGED
@@ -89,6 +89,10 @@ robota "prompt" # REPL with initial prompt
89
89
  robota -p "List all files" # Print mode (one-shot, exit after response)
90
90
  ```
91
91
 
92
+ Loaded as a library (`startCli`), the package is ESM-only: use `import` or `import()`. It has no
93
+ `require()` entry, because the Ink TUI it bundles loads `yoga-layout`, which starts with a top-level
94
+ `await` that `require()` cannot run.
95
+
92
96
  ### Environment Variables
93
97
 
94
98
  | Variable | Description | Provider |
@@ -114,7 +118,7 @@ pnpm build
114
118
  ```
115
119
 
116
120
  `pnpm build` runs each package's own build in dependency order. The CLI build runs `tsdown` and then
117
- copies the web monitor (`agent-cli-web/dist`) into `dist/web`. To see the published tarball, run
121
+ copies the GUI web app (`agent-gui-web/dist`) into `dist/web`. To see the published tarball, run
118
122
  `pnpm --filter @robota-sdk/agent-cli pack`.
119
123
 
120
124
  Standalone Bun binaries are written to `dist-bun` (`pnpm --filter @robota-sdk/agent-cli build:bun`) and
@@ -735,6 +739,66 @@ reports that it saved the setting and that this run keeps what pinned it, rather
735
739
  do nothing. `NO_COLOR`, `FORCE_COLOR=0`, a non-TTY stdout and screen-reader mode still win over
736
740
  every theme: no colour and no animation, exactly as before.
737
741
 
742
+ ## Workspace Trust
743
+
744
+ Robota loads a project's own configuration only from a workspace you have trusted. That covers the
745
+ project's settings, hooks, plugins, skills, agent definitions, provider overrides and MCP servers.
746
+ In a workspace you have not trusted:
747
+
748
+ - the interactive TUI starts **Restricted**: your own user settings, built-in tools and permission
749
+ rules work, and nothing the repository contributes is loaded;
750
+ - headless startup refuses with `Workspace trust is required before headless startup (state: …)`.
751
+ That covers print mode (`-p`), `--goal`, `--serve`, `robota mcp serve`, `robota daemon start`,
752
+ `robota session start` and a session that `robota session view` starts.
753
+
754
+ There are two exceptions. `--safe-mode` always starts Restricted, so `-p`, `--goal`, `--serve` and
755
+ `robota mcp serve` run with it without trust.
756
+ A directory that is not in a Git repository cannot be trusted at all, and every mode runs Restricted
757
+ there.
758
+
759
+ ```bash
760
+ robota trust status # Is this workspace trusted? Lists what trust would load when it is not
761
+ robota trust --yes # Trust the Git workspace you are in
762
+ robota trust revoke --yes # Take the grant back
763
+ ```
764
+
765
+ Run these from inside the workspace. A grant covers that Git worktree:
766
+
767
+ - any directory inside it resolves to the same workspace, and a symlinked path resolves to the real
768
+ one;
769
+ - a nested repository or submodule is a workspace of its own, and so is each linked worktree.
770
+
771
+ Grants are stored in `~/.robota/workspace-trust.json` and survive restarts. Without a TTY, `grant` and
772
+ `revoke` require `--yes`.
773
+
774
+ A grant is tied to the repository, not only to its path:
775
+
776
+ - It **holds** through git commands that rewrite `.git/config` (`push -u`, renaming or deleting a
777
+ branch, `remote add`, `git config`) on a filesystem that records a creation time (APFS, ext4,
778
+ NTFS, …). On one that does not, such a command can drop it; run `robota trust --yes` again. A
779
+ volume that macOS renumbers never drops it.
780
+ - It is **not inherited**: a repository deleted and recreated, or a different clone put at the same
781
+ path, is untrusted until you trust it. Moving or renaming the repository also needs a new grant.
782
+ - MCP server approvals are tied to the grant only where they are stored, which means in a host that
783
+ embeds Robota with a persistent approval store. There, revoking, re-trusting, or a grant that
784
+ changes as above asks for them again. The `robota` executable keeps them in memory and asks on each
785
+ run.
786
+
787
+ **After upgrading**, if a workspace you had trusted shows as untrusted, run `robota trust --yes` in
788
+ it once. Grants are now keyed differently, so a grant made by an earlier version no longer matches.
789
+
790
+ **In this monorepo**, use the source CLI, since a globally installed `robota` may be older than the
791
+ source you are working on:
792
+
793
+ ```bash
794
+ pnpm cli:trust # Trust this repository
795
+ pnpm cli:dev # Run the CLI from source
796
+ pnpm cli:dev:trust # Trust it if it is not yet, then run the CLI (arguments go to the run)
797
+ ```
798
+
799
+ To trust another repository with the source CLI, run the launcher from inside that repository:
800
+ `/path/to/robota/scripts/dev/robota trust --yes`.
801
+
738
802
  ## Permission System
739
803
 
740
804
  Every tool call passes through a three-step permission gate:
@@ -1088,24 +1152,12 @@ The two user layers are always host-owned. The four project layers participate o
1088
1152
  supplies trusted project access; Restricted composition does not probe them. Project writes require a
1089
1153
  separately approved settings writer for the same authority.
1090
1154
 
1091
- ### Workspace trust
1092
-
1093
- Robota admits project-controlled settings and executable contributions only after a host-owned grant
1094
- for the canonical Git workspace identity. In a new or revoked workspace, interactive startup remains
1095
- usable with project settings, hooks, plugins, skills, and provider overrides disabled. Headless startup
1096
- fails closed until trust is granted:
1097
-
1098
- ```bash
1099
- robota trust status
1100
- robota trust --yes
1101
- robota trust revoke --yes
1102
- ```
1155
+ ### Provider endpoints and trust
1103
1156
 
1104
- The grant survives process restart and is invalidated by repository replacement, revocation, or a
1105
- trust-store error. Symlink aliases resolve to the canonical workspace; a different repository at the
1106
- same textual path does not inherit the grant. `robota doctor` reports trust and endpoint provenance
1107
- without printing credentials. If a lower-trust settings layer changes a provider endpoint without
1108
- providing its own key, Robota removes the inherited key and reports `provider endpoint quarantined`.
1157
+ Project settings apply only in a trusted workspace (see [Workspace Trust](#workspace-trust)).
1158
+ `robota doctor` reports trust and endpoint provenance without printing credentials. If a lower-trust
1159
+ settings layer changes a provider endpoint without providing its own key, Robota removes the inherited
1160
+ key and reports `provider endpoint quarantined`.
1109
1161
 
1110
1162
  ```json
1111
1163
  {