@heroui/agent 0.2.0-beta.5 → 0.2.0-beta.6
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 +7 -0
- package/README.md +7 -2
- package/dist/{chunk-UUHEF6LC.js → chunk-MUAFQBVY.js} +3 -2
- package/dist/{chunk-XBYPU7PM.js → chunk-QOCNMON2.js} +1 -0
- package/dist/contracts.d.ts +4 -3
- package/dist/contracts.js +8 -2
- package/dist/css/index.css +1 -1
- package/dist/{embed-runtime-36S6KLDB.js → embed-runtime-CR7PQH3Q.js} +12 -3
- package/dist/{identity-CuhZgpvp.d.ts → identity-Z6i6pL0F.d.ts} +2 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +2 -2
- package/dist/next.js +2 -2
- package/dist/server.d.ts +1 -1
- package/dist/server.js +7 -2
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
shouldRestoreActiveAgentPermissionMode,
|
|
34
34
|
storeAgentPermissionMode,
|
|
35
35
|
takeAgentShellHandoff
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-QOCNMON2.js";
|
|
37
37
|
import {
|
|
38
38
|
ActionButton,
|
|
39
39
|
CodeBlock,
|
|
@@ -1777,7 +1777,7 @@ var agentModelIdSchema = z2.preprocess(
|
|
|
1777
1777
|
|
|
1778
1778
|
// src/contracts/version.ts
|
|
1779
1779
|
var HEROUI_AGENT_PROTOCOL_VERSION = 5;
|
|
1780
|
-
var HEROUI_AGENT_SDK_VERSION = "0.2.0-beta.
|
|
1780
|
+
var HEROUI_AGENT_SDK_VERSION = "0.2.0-beta.6";
|
|
1781
1781
|
var HEROUI_AGENT_TASK_ID = "heroui-agents-runtime";
|
|
1782
1782
|
|
|
1783
1783
|
// src/contracts/identity.ts
|
|
@@ -1875,6 +1875,11 @@ var trustedAgentClientDataSchema = z3.object({
|
|
|
1875
1875
|
* fixed agent allowlist and signs the value before the runtime sees it.
|
|
1876
1876
|
*/
|
|
1877
1877
|
modelId: agentModelIdSchema.optional(),
|
|
1878
|
+
/**
|
|
1879
|
+
* When web search is enabled, allow recent news results via `includeNews`.
|
|
1880
|
+
* Optional and disabled when omitted so older signed payloads remain valid.
|
|
1881
|
+
*/
|
|
1882
|
+
newsSearch: z3.boolean().optional(),
|
|
1878
1883
|
pageContext: pageContextSchema.default({}),
|
|
1879
1884
|
/**
|
|
1880
1885
|
* Set by the API when the session was authorized by a dashboard preview
|
|
@@ -1891,7 +1896,7 @@ var trustedAgentClientDataSchema = z3.object({
|
|
|
1891
1896
|
/**
|
|
1892
1897
|
* Host-enabled public web search. When true the runtime registers the
|
|
1893
1898
|
* `searchWeb` tool (if the search backend is configured) so the agent can
|
|
1894
|
-
* look up public information and
|
|
1899
|
+
* look up public information, images, and optionally news. Optional (not defaulted) so schema
|
|
1895
1900
|
* parsing never injects a field into an already-signed payload.
|
|
1896
1901
|
*/
|
|
1897
1902
|
webSearch: z3.boolean().optional()
|
|
@@ -2279,6 +2284,7 @@ async function preloadAgentSession(options, tokenManager, conversationId, client
|
|
|
2279
2284
|
body: JSON.stringify({
|
|
2280
2285
|
clientTools,
|
|
2281
2286
|
imageSearch: options.imageSearch,
|
|
2287
|
+
newsSearch: options.newsSearch,
|
|
2282
2288
|
preload: true,
|
|
2283
2289
|
protocolVersion: HEROUI_AGENT_PROTOCOL_VERSION,
|
|
2284
2290
|
sdkVersion: HEROUI_AGENT_SDK_VERSION,
|
|
@@ -6481,6 +6487,7 @@ function ChatRuntime({
|
|
|
6481
6487
|
clientTools: messageClientToolManifest,
|
|
6482
6488
|
...message.modelId ? { modelId: message.modelId } : {},
|
|
6483
6489
|
imageSearch: options.imageSearch,
|
|
6490
|
+
newsSearch: options.newsSearch,
|
|
6484
6491
|
pageContext,
|
|
6485
6492
|
webSearch: options.webSearch
|
|
6486
6493
|
};
|
|
@@ -6836,6 +6843,7 @@ function ChatRuntime({
|
|
|
6836
6843
|
clientTools: retryClientToolManifest,
|
|
6837
6844
|
...composerModelId ? { modelId: composerModelId } : {},
|
|
6838
6845
|
imageSearch: options.imageSearch,
|
|
6846
|
+
newsSearch: options.newsSearch,
|
|
6839
6847
|
pageContext,
|
|
6840
6848
|
webSearch: options.webSearch
|
|
6841
6849
|
}
|
|
@@ -7370,6 +7378,7 @@ function useAgentTransport({
|
|
|
7370
7378
|
clientTools: getClientToolManifest(),
|
|
7371
7379
|
...requestedModelId ? { modelId: requestedModelId } : {},
|
|
7372
7380
|
imageSearch: options.imageSearch,
|
|
7381
|
+
newsSearch: options.newsSearch,
|
|
7373
7382
|
pageContext,
|
|
7374
7383
|
protocolVersion: HEROUI_AGENT_PROTOCOL_VERSION,
|
|
7375
7384
|
sdkVersion: HEROUI_AGENT_SDK_VERSION,
|
|
@@ -78,6 +78,7 @@ declare const trustedAgentClientDataSchema: z.ZodObject<{
|
|
|
78
78
|
"anthropic/claude-sonnet-5": "anthropic/claude-sonnet-5";
|
|
79
79
|
"anthropic/claude-opus-4.8": "anthropic/claude-opus-4.8";
|
|
80
80
|
}>>>;
|
|
81
|
+
newsSearch: z.ZodOptional<z.ZodBoolean>;
|
|
81
82
|
pageContext: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
82
83
|
preview: z.ZodOptional<z.ZodBoolean>;
|
|
83
84
|
protocolVersion: z.ZodLiteral<5>;
|
|
@@ -109,6 +110,7 @@ declare const signedTrustedAgentClientDataSchema: z.ZodObject<{
|
|
|
109
110
|
"anthropic/claude-sonnet-5": "anthropic/claude-sonnet-5";
|
|
110
111
|
"anthropic/claude-opus-4.8": "anthropic/claude-opus-4.8";
|
|
111
112
|
}>>>;
|
|
113
|
+
newsSearch: z.ZodOptional<z.ZodBoolean>;
|
|
112
114
|
pageContext: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
113
115
|
preview: z.ZodOptional<z.ZodBoolean>;
|
|
114
116
|
protocolVersion: z.ZodLiteral<5>;
|
package/dist/index.d.ts
CHANGED
|
@@ -345,6 +345,12 @@ type AgentCapabilities = {
|
|
|
345
345
|
* @default true
|
|
346
346
|
*/
|
|
347
347
|
imageSearch?: boolean;
|
|
348
|
+
/**
|
|
349
|
+
* Allow the hosted agent to include recent news results in web searches.
|
|
350
|
+
* Only applies when {@link webSearch} is enabled and is off by default.
|
|
351
|
+
* @default false
|
|
352
|
+
*/
|
|
353
|
+
newsSearch?: boolean;
|
|
348
354
|
/**
|
|
349
355
|
* Allow the hosted agent to search the public web for current information
|
|
350
356
|
* and images. Results are untrusted external content; keep this off when the
|
|
@@ -594,7 +600,7 @@ declare function useAgent(agentId?: string): AgentController;
|
|
|
594
600
|
* ```tsx
|
|
595
601
|
* <body>
|
|
596
602
|
* {children}
|
|
597
|
-
* <HeroUIAgent getAuthToken={getAuthToken} agentId=
|
|
603
|
+
* <HeroUIAgent getAuthToken={getAuthToken} agentId={process.env.NEXT_PUBLIC_HEROUI_AGENT_ID!} />
|
|
598
604
|
* </body>
|
|
599
605
|
* ```
|
|
600
606
|
*
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HeroUIAgent,
|
|
3
3
|
useAgent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MUAFQBVY.js";
|
|
5
5
|
import {
|
|
6
6
|
AGENT_DESIGN_THEMES,
|
|
7
7
|
AGENT_MODEL_IDS,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getAgentModelTier,
|
|
13
13
|
isAgentModelId,
|
|
14
14
|
resolveAgentModelId
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QOCNMON2.js";
|
|
16
16
|
export {
|
|
17
17
|
AGENT_DESIGN_THEMES,
|
|
18
18
|
AGENT_MODEL_IDS,
|
package/dist/next.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HeroUIAgent,
|
|
3
3
|
useAgent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MUAFQBVY.js";
|
|
5
5
|
import {
|
|
6
6
|
AGENT_MODEL_IDS,
|
|
7
7
|
AGENT_MODEL_OPTIONS,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
createToolHelper,
|
|
10
10
|
getAgentModelTier,
|
|
11
11
|
isAgentModelId
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QOCNMON2.js";
|
|
13
13
|
export {
|
|
14
14
|
AGENT_MODEL_IDS,
|
|
15
15
|
AGENT_MODEL_OPTIONS,
|
package/dist/server.d.ts
CHANGED
package/dist/server.js
CHANGED
|
@@ -66,7 +66,7 @@ var agentModelIdSchema = z2.preprocess(
|
|
|
66
66
|
|
|
67
67
|
// src/contracts/version.ts
|
|
68
68
|
var HEROUI_AGENT_PROTOCOL_VERSION = 5;
|
|
69
|
-
var HEROUI_AGENT_SDK_VERSION = "0.2.0-beta.
|
|
69
|
+
var HEROUI_AGENT_SDK_VERSION = "0.2.0-beta.6";
|
|
70
70
|
|
|
71
71
|
// src/contracts/identity.ts
|
|
72
72
|
var agentThemeSchema = z3.enum(["light", "dark", "system"]);
|
|
@@ -163,6 +163,11 @@ var trustedAgentClientDataSchema = z3.object({
|
|
|
163
163
|
* fixed agent allowlist and signs the value before the runtime sees it.
|
|
164
164
|
*/
|
|
165
165
|
modelId: agentModelIdSchema.optional(),
|
|
166
|
+
/**
|
|
167
|
+
* When web search is enabled, allow recent news results via `includeNews`.
|
|
168
|
+
* Optional and disabled when omitted so older signed payloads remain valid.
|
|
169
|
+
*/
|
|
170
|
+
newsSearch: z3.boolean().optional(),
|
|
166
171
|
pageContext: pageContextSchema.default({}),
|
|
167
172
|
/**
|
|
168
173
|
* Set by the API when the session was authorized by a dashboard preview
|
|
@@ -179,7 +184,7 @@ var trustedAgentClientDataSchema = z3.object({
|
|
|
179
184
|
/**
|
|
180
185
|
* Host-enabled public web search. When true the runtime registers the
|
|
181
186
|
* `searchWeb` tool (if the search backend is configured) so the agent can
|
|
182
|
-
* look up public information and
|
|
187
|
+
* look up public information, images, and optionally news. Optional (not defaulted) so schema
|
|
183
188
|
* parsing never injects a field into an already-signed payload.
|
|
184
189
|
*/
|
|
185
190
|
webSearch: z3.boolean().optional()
|
package/package.json
CHANGED