@economic/agents 2.11.1 → 2.11.2
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/dist/index.d.mts +5 -2
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Agent as Agent$1, AgentOptions, Connection, ConnectionContext, SubAgentClass } from "agents";
|
|
2
|
-
import { Action as Action$1, ActionConfig, ActionContext as ActionContext$1, ChatResponseResult, PrepareStepContext, Session, Think, ToolCallContext, ToolCallDecision, TurnConfig, TurnContext, skills } from "@cloudflare/think";
|
|
2
|
+
import { Action as Action$1, ActionApprovalPolicy, ActionConfig, ActionContext as ActionContext$1, ActionIdempotencyKey, ActionPermissionSpec, ChatResponseResult, PrepareStepContext, Session, Think, ToolCallContext, ToolCallDecision, TurnConfig, TurnContext, skills } from "@cloudflare/think";
|
|
3
3
|
import { FlexibleSchema, JSONValue, LanguageModel, ModelMessage, Tool as Tool$1, ToolExecutionOptions, UIMessage } from "ai";
|
|
4
4
|
import { Observability } from "agents/observability";
|
|
5
5
|
import { createCompactFunction } from "agents/experimental/memory/utils";
|
|
@@ -415,9 +415,12 @@ type ActionContext<Context extends Record<string, unknown> = Record<string, unkn
|
|
|
415
415
|
experimental_context: Context; /** The action's resolved domain key, or its tool-call fallback when none was declared. */
|
|
416
416
|
idempotencyKey: string;
|
|
417
417
|
};
|
|
418
|
-
type Action<Context extends Record<string, unknown> = Record<string, unknown>, Input = any, Output = any> = Omit<
|
|
418
|
+
type Action<Context extends Record<string, unknown> = Record<string, unknown>, Input = any, Output = any> = Omit<ActionConfig<FlexibleSchema<Input>, Output>, "approval" | "execute" | "idempotencyKey" | "inputSchema" | "permissions"> & {
|
|
419
419
|
description: string;
|
|
420
420
|
inputSchema: FlexibleSchema<Input>;
|
|
421
|
+
approval?: ActionApprovalPolicy<Input>;
|
|
422
|
+
idempotencyKey?: ActionIdempotencyKey<Input>;
|
|
423
|
+
permissions?: ActionPermissionSpec<Input>;
|
|
421
424
|
authorize?: (ctx?: Context) => boolean;
|
|
422
425
|
onUnauthorized?: UnauthorizedToolPolicy<Context>;
|
|
423
426
|
execute(input: Input, ctx: ActionContext<Context>): Promise<Output> | Output;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@economic/agents",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.2",
|
|
4
4
|
"description": "A starter for creating a TypeScript package.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@ai-sdk/anthropic": "^3.0.77",
|
|
26
26
|
"@ai-sdk/google": "^3.0.73",
|
|
27
|
-
"@cloudflare/ai-chat": "^0.
|
|
28
|
-
"@cloudflare/think": "^0.
|
|
27
|
+
"@cloudflare/ai-chat": "^0.11.0",
|
|
28
|
+
"@cloudflare/think": "^0.17.0",
|
|
29
29
|
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
30
|
-
"agents": "^0.
|
|
30
|
+
"agents": "^0.22.0",
|
|
31
31
|
"ai": "^6.0.197",
|
|
32
32
|
"jose": "^6.2.3",
|
|
33
33
|
"nanoid": "^5.1.11"
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"vitest": "^4.1.4"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@cloudflare/think": "^0.
|
|
47
|
+
"@cloudflare/think": "^0.17.0",
|
|
48
48
|
"@cloudflare/vite-plugin": "^1.43.0 <1.43.2",
|
|
49
49
|
"@cloudflare/worker-bundler": "^0.2.1",
|
|
50
|
-
"agents": "^0.
|
|
50
|
+
"agents": "^0.22.0",
|
|
51
51
|
"vite": ">=8.0.0"
|
|
52
52
|
}
|
|
53
53
|
}
|