@astralform/js 2.0.0 → 3.0.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/index.d.cts CHANGED
@@ -138,7 +138,7 @@ interface AstralformUserTokenConfig extends AstralformBaseConfig {
138
138
  */
139
139
  accessToken: string;
140
140
  /**
141
- * Active agent context. Sent as the `X-Project-ID` header (legacy wire name). The backend
141
+ * Active agent context. Sent as the `X-Agent-ID` header. The backend
142
142
  * verifies the token's developer has access to this agent on every
143
143
  * request; switching agents is a local `updateAgentId()` call.
144
144
  *
@@ -151,7 +151,7 @@ interface AstralformUserTokenConfig extends AstralformBaseConfig {
151
151
  /**
152
152
  * Optional end-user override — lets a developer acting under a user
153
153
  * token impersonate a downstream end-user identity for testing
154
- * purposes. When set, sent alongside `X-Project-ID` as `X-End-User-ID`
154
+ * purposes. When set, sent alongside `X-Agent-ID` as `X-End-User-ID`
155
155
  * so memory, rate limits, and conversations scope to the specified
156
156
  * end-user rather than the developer themselves.
157
157
  *
package/dist/index.d.ts CHANGED
@@ -138,7 +138,7 @@ interface AstralformUserTokenConfig extends AstralformBaseConfig {
138
138
  */
139
139
  accessToken: string;
140
140
  /**
141
- * Active agent context. Sent as the `X-Project-ID` header (legacy wire name). The backend
141
+ * Active agent context. Sent as the `X-Agent-ID` header. The backend
142
142
  * verifies the token's developer has access to this agent on every
143
143
  * request; switching agents is a local `updateAgentId()` call.
144
144
  *
@@ -151,7 +151,7 @@ interface AstralformUserTokenConfig extends AstralformBaseConfig {
151
151
  /**
152
152
  * Optional end-user override — lets a developer acting under a user
153
153
  * token impersonate a downstream end-user identity for testing
154
- * purposes. When set, sent alongside `X-Project-ID` as `X-End-User-ID`
154
+ * purposes. When set, sent alongside `X-Agent-ID` as `X-End-User-ID`
155
155
  * so memory, rate limits, and conversations scope to the specified
156
156
  * end-user rather than the developer themselves.
157
157
  *
package/dist/index.js CHANGED
@@ -379,7 +379,7 @@ var AstralformClient = class {
379
379
  Authorization: `Bearer ${this.auth.accessToken}`
380
380
  };
381
381
  if (this.auth.agentId) {
382
- headers["X-Project-ID"] = this.auth.agentId;
382
+ headers["X-Agent-ID"] = this.auth.agentId;
383
383
  }
384
384
  if (this.auth.endUserId) {
385
385
  headers["X-End-User-ID"] = this.auth.endUserId;
@@ -434,10 +434,9 @@ var AstralformClient = class {
434
434
  async getHealth() {
435
435
  return this.get("/v1/health");
436
436
  }
437
- // Agent readiness check. The path is a legacy wire name (shared with the
438
- // iOS SDK) — it scopes to the client's active agent via X-Project-ID.
437
+ // Agent readiness check, scoped to the client's active agent via X-Agent-ID.
439
438
  async getAgentStatus() {
440
- const raw = await this.get("/v1/project/status");
439
+ const raw = await this.get("/v1/agent/status");
441
440
  const ui = raw.ui_components ?? {};
442
441
  return {
443
442
  isReady: raw.is_ready,
@@ -607,7 +606,7 @@ var AstralformClient = class {
607
606
  // --- Account-scoped discovery (user-token mode) ---
608
607
  //
609
608
  // Lets a signed-in user pick which team/agent they want to act on.
610
- // Backend gates these on OIDC user context (no X-Project-ID required) —
609
+ // Backend gates these on OIDC user context (no X-Agent-ID required) —
611
610
  // sending them in API-key mode yields 401.
612
611
  async listTeams() {
613
612
  const raw = await this.get("/v1/teams");