@astrasyncai/verification-gateway 2.4.2 → 2.4.3

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
@@ -470,6 +470,17 @@ Why the split: the gateway derives multiple endpoints from `apiBaseUrl` (verify-
470
470
 
471
471
  As of **v2.4.2**, the registration SDK tolerates a trailing `/api` on `baseUrl` — it strips the suffix and emits a one-time console warning so you can fix the source. Pass `silent: true` in `AstraSyncConfig` to suppress the warning (e.g. in tests).
472
472
 
473
+ ### Staging vs production
474
+
475
+ Both environments share the same URL shape (origin + `/api` for the verify gateway; bare origin for the registration SDK). Promotion is a single hostname swap:
476
+
477
+ | Environment | Verify gateway (`apiBaseUrl`) | Registration SDK (`baseUrl`) |
478
+ | ----------- | ---------------------------------- | ------------------------------ |
479
+ | Staging | `https://staging.astrasync.ai/api` | `https://staging.astrasync.ai` |
480
+ | Production | `https://astrasync.ai/api` | `https://astrasync.ai` |
481
+
482
+ Path shape, request bodies, response schemas, error envelopes — all identical. Swap `staging.astrasync.ai` ↔ `astrasync.ai`, nothing else.
483
+
473
484
  ## Header semantics — `X-Astra-Gateway-Mode`
474
485
 
475
486
  The SDK sets `X-Astra-Gateway-Mode` on every response that's been through the gateway middleware. The value describes the GATE state — not whether the request succeeded end-to-end.
@@ -483,6 +494,12 @@ Pre-v2.4.2 used the value `pass-through` — renamed in v2.4.2 to disambiguate "
483
494
 
484
495
  ## Changelog
485
496
 
497
+ ### v2.4.3 — Round-11 partner integration testing
498
+
499
+ - **`PollRegistrationResult.astraId`** — the polling response now surfaces the canonical `ASTRA-*` id once the registration request is approved. Pre-fix partners only got the owner-private UUID from the register flow and had no programmatic path to the canonical id (had to go to the dashboard). Backend changes that drive this: the `GET /api/agents/request-registration/{requestId}` handler looks up `kyaAgent.astrasyncIdLevel1` on approval and includes it in the response body.
500
+ - No SDK code changes — pure type widening. Existing 2.4.2 callers see the same `state` / `agent` / `reason` shape plus the new optional `astraId` field. TypeScript surfaces the new field at every `sdk.pollRegistration(...)` call site.
501
+ - Pairs with backend round-11 F2: the public verify-access surface now refuses UUID-form `agentId` with a `400 INVALID_AGENT_ID`. After F3 partners can discover the canonical `astraId` post-approval; F2 is what they pass to verify-access from there.
502
+
486
503
  ### v2.4.2 — Round-10 partner re-test alignment
487
504
 
488
505
  - **baseUrl normalization** (`AstraSyncConfig`): trailing `/api` is stripped + warned. Removes a class of NOT_FOUND bugs when partners pass the verify-gateway-style URL to the registration client.
@@ -166,9 +166,21 @@ type RegisterResult = {
166
166
  /**
167
167
  * Response shape from `pollRegistration(requestId)` and the internal poll
168
168
  * loop. State `pending` means still awaiting owner; the others are terminal.
169
+ *
170
+ * Round-11 (F3): on `state: 'approved'`, the response also carries the
171
+ * canonical `astraId` — the partner-facing public agent identity that all
172
+ * verify-access / verify/{id} surfaces accept. The `agent` (UUID) field
173
+ * stays owner-private and is kept for backward compat.
169
174
  */
170
175
  interface PollRegistrationResult {
171
176
  state: 'pending' | 'approved' | 'denied' | 'expired';
177
+ /**
178
+ * Canonical `ASTRA-…` id. Populated when `state === 'approved'`; `null`
179
+ * (or absent) otherwise. This is the identifier to pass to public
180
+ * verification surfaces — UUIDs from the register response are owner-
181
+ * private request handles and are rejected by verify-access in v2.4.3+.
182
+ */
183
+ astraId?: string | null;
172
184
  agent?: AgentRecord;
173
185
  reason?: string;
174
186
  }
@@ -166,9 +166,21 @@ type RegisterResult = {
166
166
  /**
167
167
  * Response shape from `pollRegistration(requestId)` and the internal poll
168
168
  * loop. State `pending` means still awaiting owner; the others are terminal.
169
+ *
170
+ * Round-11 (F3): on `state: 'approved'`, the response also carries the
171
+ * canonical `astraId` — the partner-facing public agent identity that all
172
+ * verify-access / verify/{id} surfaces accept. The `agent` (UUID) field
173
+ * stays owner-private and is kept for backward compat.
169
174
  */
170
175
  interface PollRegistrationResult {
171
176
  state: 'pending' | 'approved' | 'denied' | 'expired';
177
+ /**
178
+ * Canonical `ASTRA-…` id. Populated when `state === 'approved'`; `null`
179
+ * (or absent) otherwise. This is the identifier to pass to public
180
+ * verification surfaces — UUIDs from the register response are owner-
181
+ * private request handles and are rejected by verify-access in v2.4.3+.
182
+ */
183
+ astraId?: string | null;
172
184
  agent?: AgentRecord;
173
185
  reason?: string;
174
186
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrasyncai/verification-gateway",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "AstraSync KYA Platform SDK — counterparty verification gateway (verify incoming requests) + agent registration (register AI agents with the KYA backend).",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",