@assembly-js/app-foundation 0.6.2 → 0.6.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/CHANGELOG.md +3 -0
- package/CLAUDE.md +1 -1
- package/bin/client-safe-sdk-methods.mjs +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,9 @@ A patch release never changes what an app's build requires; a minor release may
|
|
|
19
19
|
not by hand; see `changes/README.md`. CI fails a PR that changes a check script without a
|
|
20
20
|
`bump: minor` change file.
|
|
21
21
|
|
|
22
|
+
## 0.6.3
|
|
23
|
+
- [fix] The client-call scan no longer reports `retrieveCompany` on the viewer client as breaking: the platform now lets a client read its own active company (`GET /v1/companies/{id}`), and refuses any other company. Nothing in the app changes.
|
|
24
|
+
|
|
22
25
|
## 0.6.2
|
|
23
26
|
- [guidance] The build agent now returns a failed AI call as `{ ok: false, message }` with the proxy's error instead of throwing, and saves a chat's question and answer together only once the answer has arrived.
|
|
24
27
|
|
package/CLAUDE.md
CHANGED
|
@@ -1196,7 +1196,7 @@ if (id?.internalUserId) {
|
|
|
1196
1196
|
}
|
|
1197
1197
|
```
|
|
1198
1198
|
|
|
1199
|
-
Client-side, the same fields come from `useAssembly()` (seeded from the server, no token). If you also need the full record:
|
|
1199
|
+
Client-side, the same fields come from `useAssembly()` (seeded from the server, no token). If you also need the full record (a client may read only its own record and its active company, `id.companyId`; any other company id is refused):
|
|
1200
1200
|
|
|
1201
1201
|
```ts
|
|
1202
1202
|
const assembly = await getAssembly();
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
// give it a method here when the SDK gains one.
|
|
10
10
|
export const CLIENT_SAFE_ROUTES = Object.freeze([
|
|
11
11
|
{ method: 'GET', path: '/v1/clients/{id}', sdkMethod: 'retrieveClient' }, // the client's own record only
|
|
12
|
+
{ method: 'GET', path: '/v1/companies/{id}', sdkMethod: 'retrieveCompany' }, // the viewer's own company only
|
|
12
13
|
{ method: 'GET', path: '/v1/me', sdkMethod: 'retrieveMe' },
|
|
13
14
|
{ method: 'GET', path: '/v1/notifications', sdkMethod: 'listNotifications' },
|
|
14
15
|
{ method: 'POST', path: '/v1/notifications/{id}/read', sdkMethod: 'markNotificationRead' },
|
|
@@ -17,8 +18,8 @@ export const CLIENT_SAFE_ROUTES = Object.freeze([
|
|
|
17
18
|
{ method: 'POST', path: '/v1/ai/openai/*proxyPath', sdkMethod: null }, // the AI proxy; reached through `fetch`
|
|
18
19
|
].map(Object.freeze));
|
|
19
20
|
|
|
20
|
-
// retrieveClient
|
|
21
|
-
// fact a static scan cannot see. The notification routes are open to clients, and the
|
|
21
|
+
// retrieveClient and retrieveCompany are allowlisted by name: whether the id is the viewer's
|
|
22
|
+
// own is a runtime fact a static scan cannot see. The notification routes are open to clients, and the
|
|
22
23
|
// platform pins a client caller to their own notifications. Creating, retrieving and
|
|
23
24
|
// deleting a notification stay off the list: those routes are not open to clients.
|
|
24
25
|
export const CLIENT_SAFE_SDK_METHODS = Object.freeze(
|