@lunnoa/client 2.0.0 → 2.1.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.
package/dist/react.cjs CHANGED
@@ -58,7 +58,7 @@ function isBrowserEnvironment() {
58
58
  function assertApiKeyAllowedInEnvironment(apiKey) {
59
59
  if (isBrowserEnvironment()) {
60
60
  throw new Error(
61
- "Refusing to use a Lunnoa API key (lna_...) in a browser environment. API keys are server-side credentials: anyone opening dev tools could read the key and act as the service account across its whole workspace. Either call the Lunnoa API from your own backend which holds the key (backend-for-frontend pattern), or authenticate the end user with a Lunnoa user JWT and pass it as `accessToken`."
61
+ "Refusing to use a Lunnoa API key (lna_...) in a browser environment. API keys are for the CLI and operator scripts, not for app login. Anyone opening dev tools could read the key and act as the service account across its whole workspace. Sign the end user in with lunnoa.auth.login and pass their JWT as `accessToken`."
62
62
  );
63
63
  }
64
64
  if (!apiKey.startsWith(API_KEY_PREFIX)) {
@@ -140,7 +140,7 @@ var HttpClient = class {
140
140
  }
141
141
  if (!options.apiKey && !options.accessToken && !options.tokenStore) {
142
142
  throw new Error(
143
- "LunnoaClient requires an apiKey (server-side), an accessToken (user JWT), or a tokenStore (Pattern B)."
143
+ "LunnoaClient requires an accessToken or tokenStore (Lunnoa user JWT), or an apiKey for operator scripts."
144
144
  );
145
145
  }
146
146
  if (options.apiKey) {
@@ -2091,7 +2091,7 @@ var WorkflowsResource = class {
2091
2091
  var LunnoaClient = class {
2092
2092
  /** The underlying HTTP layer, exposed for advanced/escape-hatch requests. */
2093
2093
  http;
2094
- /** Login, refresh, SSO discovery, and session helpers (Pattern B). */
2094
+ /** Login, refresh, SSO discovery, and session helpers for Lunnoa users. */
2095
2095
  auth;
2096
2096
  agents;
2097
2097
  tasks;