@optima-chat/optima-agent 0.8.12 → 0.8.14
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/.claude/settings.local.json +12 -1
- package/dist/src/agent.d.ts +1 -34
- package/dist/src/agent.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -113,7 +113,18 @@
|
|
|
113
113
|
"Bash(gh auth status:*)",
|
|
114
114
|
"Bash(optima-agent:*)",
|
|
115
115
|
"Bash(python3:*)",
|
|
116
|
-
"Bash(python3 -c \" import sys content = sys.stdin.read\\(\\) # Find flushMessageQueueSync idx = content.find\\(''flushMessageQueueSync''\\) # Get context around it lines = content.split\\(''\\\\n''\\) for i, line in enumerate\\(lines\\): if ''flushMessageQueueSync'' in line and ''private'' in line: for j in range\\(i, min\\(i+20, len\\(lines\\)\\)\\): print\\(f''{j+1}: {lines[j]}''\\) break \")"
|
|
116
|
+
"Bash(python3 -c \" import sys content = sys.stdin.read\\(\\) # Find flushMessageQueueSync idx = content.find\\(''flushMessageQueueSync''\\) # Get context around it lines = content.split\\(''\\\\n''\\) for i, line in enumerate\\(lines\\): if ''flushMessageQueueSync'' in line and ''private'' in line: for j in range\\(i, min\\(i+20, len\\(lines\\)\\)\\): print\\(f''{j+1}: {lines[j]}''\\) break \")",
|
|
117
|
+
"Bash(optima:*)",
|
|
118
|
+
"WebFetch(domain:www.npmjs.com)",
|
|
119
|
+
"WebFetch(domain:registry.npmjs.org)",
|
|
120
|
+
"WebFetch(domain:zod.dev)",
|
|
121
|
+
"Bash(npm ls:*)",
|
|
122
|
+
"Bash(NODE_DEBUG=child_process npx tsx:*)",
|
|
123
|
+
"Bash(DEBUG_CLAUDE_AGENT_SDK=1 npx tsx:*)",
|
|
124
|
+
"Bash(CLAUDECODE= npx tsx:*)",
|
|
125
|
+
"Bash(env:*)",
|
|
126
|
+
"Bash(gh release:*)",
|
|
127
|
+
"Bash(npm info:*)"
|
|
117
128
|
],
|
|
118
129
|
"deny": [],
|
|
119
130
|
"ask": []
|
package/dist/src/agent.d.ts
CHANGED
|
@@ -11,40 +11,7 @@ export declare class OptimaAgent {
|
|
|
11
11
|
* @param prompt 用户输入
|
|
12
12
|
* @param chatOptions 选项,包括 streamFormat: 'delta' | 'content'
|
|
13
13
|
*/
|
|
14
|
-
chat(prompt: string, chatOptions?: ChatOptions): AsyncGenerator<import("@anthropic-ai/claude-agent-sdk").SDKUserMessage | import("@anthropic-ai/claude-agent-sdk").SDKAssistantMessage | {
|
|
15
|
-
type: "result";
|
|
16
|
-
subtype: "success";
|
|
17
|
-
duration_ms: number;
|
|
18
|
-
duration_api_ms: number;
|
|
19
|
-
is_error: boolean;
|
|
20
|
-
num_turns: number;
|
|
21
|
-
result: string;
|
|
22
|
-
total_cost_usd: number;
|
|
23
|
-
usage: import("@anthropic-ai/claude-agent-sdk").NonNullableUsage;
|
|
24
|
-
modelUsage: {
|
|
25
|
-
[modelName: string]: import("@anthropic-ai/claude-agent-sdk").ModelUsage;
|
|
26
|
-
};
|
|
27
|
-
permission_denials: import("@anthropic-ai/claude-agent-sdk").SDKPermissionDenial[];
|
|
28
|
-
structured_output?: unknown;
|
|
29
|
-
uuid: import("crypto").UUID;
|
|
30
|
-
session_id: string;
|
|
31
|
-
} | {
|
|
32
|
-
type: "result";
|
|
33
|
-
subtype: "error_during_execution" | "error_max_turns" | "error_max_budget_usd" | "error_max_structured_output_retries";
|
|
34
|
-
duration_ms: number;
|
|
35
|
-
duration_api_ms: number;
|
|
36
|
-
is_error: boolean;
|
|
37
|
-
num_turns: number;
|
|
38
|
-
total_cost_usd: number;
|
|
39
|
-
usage: import("@anthropic-ai/claude-agent-sdk").NonNullableUsage;
|
|
40
|
-
modelUsage: {
|
|
41
|
-
[modelName: string]: import("@anthropic-ai/claude-agent-sdk").ModelUsage;
|
|
42
|
-
};
|
|
43
|
-
permission_denials: import("@anthropic-ai/claude-agent-sdk").SDKPermissionDenial[];
|
|
44
|
-
errors: string[];
|
|
45
|
-
uuid: import("crypto").UUID;
|
|
46
|
-
session_id: string;
|
|
47
|
-
} | import("@anthropic-ai/claude-agent-sdk").SDKSystemMessage | import("@anthropic-ai/claude-agent-sdk").SDKPartialAssistantMessage | import("@anthropic-ai/claude-agent-sdk").SDKCompactBoundaryMessage | import("@anthropic-ai/claude-agent-sdk").SDKStatusMessage | import("@anthropic-ai/claude-agent-sdk").SDKHookResponseMessage | import("@anthropic-ai/claude-agent-sdk").SDKToolProgressMessage | import("@anthropic-ai/claude-agent-sdk").SDKAuthStatusMessage | {
|
|
14
|
+
chat(prompt: string, chatOptions?: ChatOptions): AsyncGenerator<import("@anthropic-ai/claude-agent-sdk").SDKUserMessage | import("@anthropic-ai/claude-agent-sdk").SDKAssistantMessage | import("@anthropic-ai/claude-agent-sdk").SDKResultSuccess | import("@anthropic-ai/claude-agent-sdk").SDKResultError | import("@anthropic-ai/claude-agent-sdk").SDKSystemMessage | import("@anthropic-ai/claude-agent-sdk").SDKPartialAssistantMessage | import("@anthropic-ai/claude-agent-sdk").SDKCompactBoundaryMessage | import("@anthropic-ai/claude-agent-sdk").SDKStatusMessage | import("@anthropic-ai/claude-agent-sdk").SDKLocalCommandOutputMessage | import("@anthropic-ai/claude-agent-sdk").SDKHookStartedMessage | import("@anthropic-ai/claude-agent-sdk").SDKHookProgressMessage | import("@anthropic-ai/claude-agent-sdk").SDKHookResponseMessage | import("@anthropic-ai/claude-agent-sdk").SDKToolProgressMessage | import("@anthropic-ai/claude-agent-sdk").SDKAuthStatusMessage | import("@anthropic-ai/claude-agent-sdk").SDKTaskNotificationMessage | import("@anthropic-ai/claude-agent-sdk").SDKTaskStartedMessage | import("@anthropic-ai/claude-agent-sdk").SDKTaskProgressMessage | import("@anthropic-ai/claude-agent-sdk").SDKFilesPersistedEvent | import("@anthropic-ai/claude-agent-sdk").SDKToolUseSummaryMessage | import("@anthropic-ai/claude-agent-sdk").SDKRateLimitEvent | import("@anthropic-ai/claude-agent-sdk").SDKElicitationCompleteMessage | import("@anthropic-ai/claude-agent-sdk").SDKPromptSuggestionMessage | {
|
|
48
15
|
type: "text_delta";
|
|
49
16
|
delta: {
|
|
50
17
|
text: string;
|
package/dist/src/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAa5D,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;gBAEX,OAAO,GAAE,YAAiB;IAiCtC;;;;OAIG;IACI,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAa5D,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;gBAEX,OAAO,GAAE,YAAiB;IAiCtC;;;;OAIG;IACI,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW;cAsFH,YAAY;eAAS;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE;;IAHvF;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAgB1B;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,YAAY,IAAI,MAAM,GAAG,SAAS;IAIlC;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAuB1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optima-chat/optima-agent",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.14",
|
|
4
4
|
"description": "基于 Claude Agent SDK 的电商运营 AI 助手",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"prepublishOnly": "npm run build"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@anthropic-ai/claude-agent-sdk": "^0.
|
|
44
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.63",
|
|
45
45
|
"@optima-chat/ads-cli": "latest",
|
|
46
46
|
"@optima-chat/bi-cli": "latest",
|
|
47
47
|
"@optima-chat/comfy-cli": "latest",
|
|
48
48
|
"@optima-chat/commerce-cli": "latest",
|
|
49
|
-
"@optima-chat/scout-cli": "
|
|
49
|
+
"@optima-chat/scout-cli": "latest",
|
|
50
50
|
"open": "^10.1.0",
|
|
51
51
|
"ws": "^8.18.3",
|
|
52
|
-
"zod": "^3.
|
|
52
|
+
"zod": "^4.3.6"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^22.10.1",
|