@agent-team-foundation/first-tree-hub 0.12.9 → 0.13.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.
@@ -598,7 +598,7 @@ const serverConfigSchema = defineConfig({
598
598
  rateLimit: optional({
599
599
  max: field(z.number().default(100), { env: "FIRST_TREE_HUB_RATE_LIMIT_MAX" }),
600
600
  loginMax: field(z.number().default(5), { env: "FIRST_TREE_HUB_RATE_LIMIT_LOGIN_MAX" }),
601
- webhookMax: field(z.number().default(60), { env: "FIRST_TREE_HUB_RATE_LIMIT_WEBHOOK_MAX" }),
601
+ webhookMax: field(z.number().default(600), { env: "FIRST_TREE_HUB_RATE_LIMIT_WEBHOOK_MAX" }),
602
602
  contextTreeSnapshotMax: field(z.number().default(6), { env: "FIRST_TREE_HUB_RATE_LIMIT_CONTEXT_TREE_SNAPSHOT_MAX" }),
603
603
  agentMessageMax: field(z.number().default(30), { env: "FIRST_TREE_HUB_RATE_LIMIT_AGENT_MESSAGE_MAX" })
604
604
  }),
@@ -690,19 +690,19 @@ function resolveServerUrl(flagValue) {
690
690
  const url = Reflect.get(server, "url");
691
691
  if (typeof url === "string" && url.length > 0) return url;
692
692
  }
693
- throw new Error("Server URL not configured.\n Provide via: --server <url>, FIRST_TREE_HUB_SERVER_URL env var, or\n first-tree-hub config set -c server.url <url>");
693
+ throw new Error("Server URL not configured.\n Provide via: --server <url>, FIRST_TREE_HUB_SERVER_URL env var, or\n first-tree-hub client config set server.url <url>");
694
694
  }
695
695
  /**
696
696
  * Resolve the current member access JWT from persisted credentials.
697
697
  *
698
698
  * Unified-user-token milestone: the CLI has a single credential store and a
699
- * single onboarding path (`first-tree-hub client connect`). The legacy
699
+ * single onboarding path (`first-tree-hub connect <token>`). The legacy
700
700
  * `FIRST_TREE_HUB_TOKEN` env var is no longer read — callers get a clear
701
- * error pointing at `client connect` instead.
701
+ * error pointing at `connect <token>` instead.
702
702
  */
703
703
  function resolveAccessToken() {
704
704
  const creds = loadCredentials();
705
- if (!creds) throw new Error("No credentials found. Run `first-tree-hub client connect <server-url>` to sign in.");
705
+ if (!creds) throw new Error("No credentials found. Run `first-tree-hub connect <token>` to sign in.");
706
706
  return creds.accessToken;
707
707
  }
708
708
  /**
@@ -783,7 +783,7 @@ const DEFAULT_MIN_VALIDITY_MS = 3e4;
783
783
  async function ensureFreshAccessToken(opts) {
784
784
  const minValidityMs = opts?.minValidityMs ?? DEFAULT_MIN_VALIDITY_MS;
785
785
  const creds = loadCredentials();
786
- if (!creds) throw new Error("No credentials found. Run `first-tree-hub client connect <server-url>` to sign in.");
786
+ if (!creds) throw new Error("No credentials found. Run `first-tree-hub connect <token>` to sign in.");
787
787
  if (!isTokenStale(creds.accessToken, minValidityMs)) return creds.accessToken;
788
788
  if (inflightRefresh) return inflightRefresh;
789
789
  inflightRefresh = (async () => {
@@ -830,7 +830,7 @@ function isTokenStale(token, minValidityMs) {
830
830
  * calls the file is empty, and a concurrent `loadCredentials()` (e.g. a
831
831
  * background daemon refreshing while the user runs a foreground CLI command)
832
832
  * reads "" → `JSON.parse` throws → we fall back to "no credentials" and
833
- * surface a misleading "run `client connect` again" error. write-to-temp +
833
+ * surface a misleading "run `connect <token>` again" error. write-to-temp +
834
834
  * rename gives readers an all-or-nothing view: they see the old file or the
835
835
  * new file, never a half-written one. Server-side the sliding-window design
836
836
  * already accepts last-writer-wins semantics for the refresh token itself