max-agent-ui 0.0.21 → 0.0.23
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 +25 -26
- package/fesm2022/max-agent-ui.mjs +147 -23
- package/fesm2022/max-agent-ui.mjs.map +1 -1
- package/index.d.ts +50 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,28 +66,27 @@ projected into the chat header:
|
|
|
66
66
|
</max-assistant>
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
For authenticated host applications, provide shared configuration once. The
|
|
70
|
-
current token and API version are sent as
|
|
71
|
-
|
|
69
|
+
For authenticated host applications, provide shared configuration once. The
|
|
70
|
+
current token and API version are sent as the standard `x-auth-token` and
|
|
71
|
+
`x-version` headers. Display identity is sent separately in the request body,
|
|
72
|
+
and the agent retrieves current permissions directly from the calling product
|
|
73
|
+
API:
|
|
72
74
|
|
|
73
75
|
```ts
|
|
74
76
|
providers: [
|
|
75
77
|
{
|
|
76
78
|
provide: MAX_ASSISTANT_CONFIG,
|
|
77
|
-
useFactory: (session: SessionService
|
|
79
|
+
useFactory: (session: SessionService) => ({
|
|
78
80
|
app: 'cortex',
|
|
79
|
-
user: () => ({
|
|
80
|
-
|
|
81
|
+
user: () => ({
|
|
82
|
+
name: session.name(),
|
|
83
|
+
username: session.username(),
|
|
84
|
+
email: session.email(),
|
|
85
|
+
token: session.authToken(),
|
|
81
86
|
version: session.apiVersion()
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
permissions: session.agentPermissions(),
|
|
86
|
-
route: router.url,
|
|
87
|
-
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
88
|
-
})
|
|
89
|
-
}),
|
|
90
|
-
deps: [SessionService, Router]
|
|
87
|
+
})
|
|
88
|
+
}),
|
|
89
|
+
deps: [SessionService]
|
|
91
90
|
}
|
|
92
91
|
]
|
|
93
92
|
```
|
|
@@ -114,22 +113,22 @@ assistant.sendStructuredAction(
|
|
|
114
113
|
The agent still validates the capability and permissions in Supabase, performs
|
|
115
114
|
live preflight reads, and returns the normal Approve/Reject proposal.
|
|
116
115
|
|
|
117
|
-
For
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
```ts
|
|
122
|
-
requestHeaders: () => ({
|
|
123
|
-
'x-
|
|
124
|
-
})
|
|
125
|
-
```
|
|
116
|
+
For Cortex and Nemesys, provide `user.token` and `user.version`; the library
|
|
117
|
+
uses the same standard API headers for both products. Use `requestHeaders` only
|
|
118
|
+
for additional custom headers:
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
requestHeaders: () => ({
|
|
122
|
+
'x-correlation-id': session.correlationId()
|
|
123
|
+
})
|
|
124
|
+
```
|
|
126
125
|
|
|
127
126
|
Host apps should provide Angular `HttpClient` for real API calls and include their PrimeNG theme and PrimeIcons styles.
|
|
128
127
|
|
|
129
128
|
For local integration, install the generated tarball and peer UI dependencies in the consuming app:
|
|
130
129
|
|
|
131
130
|
```bash
|
|
132
|
-
npm install C:/Users/Dev100/Documents/Maxtime/Projects/maxtime-ui-library/dist/max-agent-ui/max-agent-ui-0.0.
|
|
131
|
+
npm install C:/Users/Dev100/Documents/Maxtime/Projects/maxtime-ui-library/dist/max-agent-ui/max-agent-ui-0.0.33.tgz primeng primeicons @angular/cdk
|
|
133
132
|
```
|
|
134
133
|
|
|
135
134
|
### Publishing the Library
|
|
@@ -146,7 +145,7 @@ Publish the generated tarball after logging in to npm:
|
|
|
146
145
|
|
|
147
146
|
```bash
|
|
148
147
|
npm login
|
|
149
|
-
npm publish max-agent-ui-0.0.
|
|
148
|
+
npm publish max-agent-ui-0.0.33.tgz
|
|
150
149
|
```
|
|
151
150
|
|
|
152
151
|
## Running unit tests
|