@lobehub/cli 0.0.56 → 0.0.57

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.
package/README.md CHANGED
@@ -85,3 +85,35 @@ which lh
85
85
  lh --help
86
86
  lh agent <TAB>
87
87
  ```
88
+
89
+ ## Tests
90
+
91
+ The default `test` and `test:coverage` scripts run offline unit tests only. Live
92
+ E2E uses a separate config and never replaces or removes your selected CLI home.
93
+ It always runs this checkout's `dist/index.js`, not a globally installed `lh` or
94
+ a caller-supplied `LH_CLI_PATH`.
95
+
96
+ From `apps/cli`, prepare a dedicated test account (never your everyday account):
97
+
98
+ ```bash
99
+ bun run build
100
+ export LOBEHUB_CLI_HOME=.lobehub-e2e
101
+ export LOBEHUB_SERVER=https://your-test-server.example
102
+ node dist/index.js login --server "$LOBEHUB_SERVER"
103
+ node dist/index.js whoami
104
+
105
+ # Explicitly authorize real writes for this test account/server.
106
+ export LOBEHUB_E2E_ALLOW_WRITES=1
107
+ bun run test:e2e e2e/model.e2e.test.ts --testTimeout=60000 --hookTimeout=60000
108
+ ```
109
+
110
+ Without a selected home, server, write opt-in, built CLI, or valid authentication,
111
+ the live setup fails before fixture creation. A directory name does not itself
112
+ isolate server data: sign in with a dedicated test identity. Model tests own a
113
+ temporary provider, including the remote-model clearing case. Other suites may
114
+ create data or consume model credits, so do not run them on a personal account.
115
+ Collection alone (`bunx vitest list --config vitest.e2e.config.mts`) needs no login.
116
+ Signal and VFS tests additionally require their documented Agent ID variables.
117
+ Search fixtures wait up to 60 seconds for asynchronous indexing; a timeout fails
118
+ the suite rather than accepting empty results. The command above supplies a live
119
+ network budget explicitly; this does not change unit-test timeouts or enable retries.