@ziggy-ai/client-sdk 1.3.0 → 1.6.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/CHANGELOG.md CHANGED
@@ -1,18 +1,38 @@
1
- # @ziggy-ai/client-sdk changelog
2
-
3
- ## 1.3.0
4
-
5
- Includes the unpublished 1.2.7 changes.
6
-
7
- ### Added
8
- - `client.app.getCallback()` / `setCallbackUrl(url | null)`: read and set the app's callback URL (HTTPS, public destinations only).
9
- - `verifyCallbackSignature(headers, rawBody, { secret, toleranceMs? })`: checks `X-Ziggy-Timestamp` / `X-Ziggy-Signature` (HMAC-SHA256 over `timestamp.rawBody`, 5-minute window, constant-time compare) with Web Crypto.
10
- - `CallbackHandler.handleRequest(request, { secret, allowUnsigned? })`: verify and dispatch a fetch-style `Request`; 401 before any handler runs. Fails closed (500) when `secret` is empty unless `allowUnsigned: true`.
11
- - `client.app.setProfile()`, `approveProfile()`, `addDomainConcept()`: owner-written App Profile and product terms.
12
- - Types: `AppCallbackResponse` (with `signing`), `OwnerProfileFields`, `SetProfileResponse`, `AddDomainConceptRequest`, `AddDomainConceptResponse`, `VerifyCallbackOptions`, `CallbackVerification`.
13
-
14
- ### Changed
15
- - README callback example now verifies signatures (`handleRequest`); `handle(body)` alone does not.
16
-
17
- ### Not yet in the SDK
18
- - Editing an owner-written term (`PATCH /v1/apps/domain-research/concepts/:id`); planned for 1.3.1.
1
+ # @ziggy-ai/client-sdk changelog
2
+
3
+ ## 1.6.0
4
+
5
+ ### Added
6
+ - `getVisitorToken` in the client config, and `createVisitorToken({ appId, ziggyUrl })` to make it. For an app whose own server calls Ziggy (a self-host proxy): the browser gets a token from Ziggy, the SDK sends it as `X-Ziggy-Visitor-Token`, and your proxy passes it on. With it the assistant can be shown a person's own earlier exchanges; without it your app works as before. Nothing is fetched or stored unless you set it. Update your proxy to forward the header (docs/guides/easy-integrate.md). A proxy on another origin must also allow the header in its CORS answer.
7
+
8
+ ## 1.5.0
9
+
10
+ Includes the unpublished 1.4.0 changes: `client.app.getAvailability()` and the `plan` field on `VerifyResponse`.
11
+
12
+ ### Changed, and it can break a server script
13
+ - `client.app.getBrand()` now returns `PublicBrandResponse`: `identity.name`, `identity.avatar` and `theme.primaryColor`. The server answers `GET /v1/apps/brand` this way for every version of the SDK since 2026-11-24, because a host's own proxy forwards its visitors' reads with the app's key. The type now says what the server sends.
14
+ - If you read the profile, change it and write it back with `setBrand`, read it with `getFullBrand()`. `setBrand` replaces the identity, the voice and the theme with what it is given, so writing back the short answer would remove the rest. The server refuses that write: the short answer carries `partial: true`, and a `setBrand` whose object has it fails with 409 `brand_partial_write` and saves nothing.
15
+
16
+ ### Added
17
+ - `client.app.getFullBrand()`: the whole brand profile (`GET /v1/apps/brand/full`), for your server. A request that comes through a browser proxy is refused.
18
+ - Type: `PublicBrandResponse` (with `partial: true`).
19
+
20
+ ### Note
21
+ - `client.app.getDesignSystem()` through the managed browser proxy now answers with the tokens only: `components` is empty and `id` and `appId` are left out.
22
+
23
+ ## 1.3.0
24
+
25
+ Includes the unpublished 1.2.7 changes.
26
+
27
+ ### Added
28
+ - `client.app.getCallback()` / `setCallbackUrl(url | null)`: read and set the app's callback URL (HTTPS, public destinations only).
29
+ - `verifyCallbackSignature(headers, rawBody, { secret, toleranceMs? })`: checks `X-Ziggy-Timestamp` / `X-Ziggy-Signature` (HMAC-SHA256 over `timestamp.rawBody`, 5-minute window, constant-time compare) with Web Crypto.
30
+ - `CallbackHandler.handleRequest(request, { secret, allowUnsigned? })`: verify and dispatch a fetch-style `Request`; 401 before any handler runs. Fails closed (500) when `secret` is empty unless `allowUnsigned: true`.
31
+ - `client.app.setProfile()`, `approveProfile()`, `addDomainConcept()`: owner-written App Profile and product terms.
32
+ - Types: `AppCallbackResponse` (with `signing`), `OwnerProfileFields`, `SetProfileResponse`, `AddDomainConceptRequest`, `AddDomainConceptResponse`, `VerifyCallbackOptions`, `CallbackVerification`.
33
+
34
+ ### Changed
35
+ - README callback example now verifies signatures (`handleRequest`); `handle(body)` alone does not.
36
+
37
+ ### Not yet in the SDK
38
+ - Editing an owner-written term (`PATCH /v1/apps/domain-research/concepts/:id`); planned for 1.3.1.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Ziggy
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ziggy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.