@gt-fe/eap-cli 0.2.10 → 0.2.11

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.
Files changed (47) hide show
  1. package/dist/static/playground/index.html +131 -131
  2. package/dist/static/playground/playground.css +209 -209
  3. package/dist/static/playground/playground.js +151 -151
  4. package/dist/static/playground-app/index.html +11 -11
  5. package/dist/templates/agent-api-orchestration/.env +16 -16
  6. package/dist/templates/agent-api-orchestration/agent.manifest.json +19 -19
  7. package/dist/templates/agent-api-orchestration/eap.config.json +1 -1
  8. package/dist/templates/agent-api-orchestration/eap.lock.yaml +5 -5
  9. package/dist/templates/agent-api-orchestration/gitignore +3 -3
  10. package/dist/templates/agent-api-orchestration/package.json +1 -1
  11. package/dist/templates/agent-api-orchestration/scripts/api-test.mjs +443 -443
  12. package/dist/templates/agent-api-orchestration/scripts/build-runtime.mjs +26 -26
  13. package/dist/templates/agent-api-orchestration/scripts/validate.mjs +12 -12
  14. package/dist/templates/agent-api-orchestration/src/embedded-agent.ts +91 -91
  15. package/dist/templates/agent-api-orchestration/src/http/app.ts +58 -58
  16. package/dist/templates/agent-api-orchestration/src/http/config.ts +34 -34
  17. package/dist/templates/agent-api-orchestration/src/http/errors.ts +63 -63
  18. package/dist/templates/agent-api-orchestration/src/http/index.ts +4 -4
  19. package/dist/templates/agent-api-orchestration/src/http/middleware/cors.ts +17 -17
  20. package/dist/templates/agent-api-orchestration/src/http/routes/agent.ts +33 -33
  21. package/dist/templates/agent-api-orchestration/src/http/routes/health.ts +15 -15
  22. package/dist/templates/agent-api-orchestration/src/http/routes/invocations.ts +29 -29
  23. package/dist/templates/agent-api-orchestration/src/http/routes/sessions.ts +70 -70
  24. package/dist/templates/agent-api-orchestration/src/http/services/agent-service.ts +60 -60
  25. package/dist/templates/agent-api-orchestration/src/http/services/resource-service.ts +95 -95
  26. package/dist/templates/agent-api-orchestration/src/http/shared/request.ts +82 -82
  27. package/dist/templates/agent-api-orchestration/src/http/shared/sse.ts +32 -32
  28. package/dist/templates/agent-api-orchestration/src/http/types.ts +39 -39
  29. package/dist/templates/agent-api-orchestration/src/index.ts +91 -91
  30. package/dist/templates/agent-api-orchestration/src/platform-user.ts +36 -36
  31. package/dist/templates/agent-api-orchestration/src/project-config.ts +45 -45
  32. package/dist/templates/agent-api-orchestration/tsconfig.json +15 -15
  33. package/dist/templates/dag-workflow/eap.config.json +1 -1
  34. package/dist/templates/dag-workflow/eap.lock.yaml +5 -5
  35. package/dist/templates/dag-workflow/package.json +10 -10
  36. package/dist/templates/plan-and-execute/eap.config.json +1 -1
  37. package/dist/templates/plan-and-execute/graph.json +0 -1
  38. package/dist/templates/plan-and-execute/package.json +10 -10
  39. package/dist/templates/plan-and-execute/tools/echo-tool/src/index.js +17 -17
  40. package/dist/templates/plan-and-execute/tools/echo-tool/toolset.manifest.json +55 -55
  41. package/dist/templates/simple-flow/eap.config.json +1 -1
  42. package/dist/templates/simple-flow/eap.lock.yaml +5 -5
  43. package/dist/templates/single-agent-with-tools/eap.config.json +1 -1
  44. package/dist/templates/single-agent-with-tools/package.json +10 -10
  45. package/dist/templates/single-agent-with-tools/tools/echo-tool/src/index.js +17 -17
  46. package/dist/templates/single-agent-with-tools/tools/echo-tool/toolset.manifest.json +55 -55
  47. package/package.json +3 -3
@@ -1,15 +1,15 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "NodeNext",
5
- "moduleResolution": "NodeNext",
6
- "strict": true,
7
- "esModuleInterop": true,
8
- "skipLibCheck": true,
9
- "forceConsistentCasingInFileNames": true,
10
- "allowJs": false,
11
- "noEmit": true,
12
- "types": ["node"]
13
- },
14
- "include": ["src/**/*.ts"]
15
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "strict": true,
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "forceConsistentCasingInFileNames": true,
10
+ "allowJs": false,
11
+ "noEmit": true,
12
+ "types": ["node"]
13
+ },
14
+ "include": ["src/**/*.ts"]
15
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.10",
2
+ "version": "0.2.11",
3
3
  "localToolDirectories": [
4
4
  "./tools"
5
5
  ],
@@ -1,5 +1,5 @@
1
- lockfileVersion: 2
2
- resources:
3
- tools: []
4
- skills: []
5
- subagents: []
1
+ lockfileVersion: 2
2
+ resources:
3
+ tools: []
4
+ skills: []
5
+ subagents: []
@@ -1,10 +1,10 @@
1
- {
2
- "name": "dag-workflow-agent",
3
- "description": "Fan-out and fan-in DAG workflow Agent template",
4
- "version": "1.0.0",
5
- "private": true,
6
- "scripts": {
7
- "validate": "eap validate --strict",
8
- "package": "eap package"
9
- }
10
- }
1
+ {
2
+ "name": "dag-workflow-agent",
3
+ "description": "Fan-out and fan-in DAG workflow Agent template",
4
+ "version": "1.0.0",
5
+ "private": true,
6
+ "scripts": {
7
+ "validate": "eap validate --strict",
8
+ "package": "eap package"
9
+ }
10
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.10",
2
+ "version": "0.2.11",
3
3
  "localToolDirectories": [
4
4
  "./tools"
5
5
  ],
@@ -13,7 +13,6 @@
13
13
  "id": "executor",
14
14
  "type": "llm",
15
15
  "config": {
16
- "model": "DeepSeek-V4-Pro",
17
16
  "systemPrompt": "按上一份计划逐步执行。每一步只做一件事:调用 echo-tool,把该步原文放入 text。只通过平台提供的工具调用执行,不要在回复里写未调用的 XML、命令块或伪 execute_command。全部完成后直接用中文回复,不要再调用工具。"
18
17
  }
19
18
  },
@@ -1,10 +1,10 @@
1
- {
2
- "name": "plan-and-execute-agent",
3
- "description": "Agent template that plans, executes, and summarizes each request",
4
- "version": "1.0.0",
5
- "private": true,
6
- "scripts": {
7
- "validate": "eap validate --strict",
8
- "package": "eap package"
9
- }
10
- }
1
+ {
2
+ "name": "plan-and-execute-agent",
3
+ "description": "Agent template that plans, executes, and summarizes each request",
4
+ "version": "1.0.0",
5
+ "private": true,
6
+ "scripts": {
7
+ "validate": "eap validate --strict",
8
+ "package": "eap package"
9
+ }
10
+ }
@@ -1,17 +1,17 @@
1
- 'use strict';
2
-
3
- let input = '';
4
-
5
- process.stdin.setEncoding('utf8');
6
- process.stdin.on('data', (chunk) => {
7
- input += chunk;
8
- });
9
- process.stdin.on('end', () => {
10
- try {
11
- const request = input.trim() ? JSON.parse(input) : {};
12
- process.stdout.write(`${JSON.stringify({ text: String(request?.text ?? '') })}\n`);
13
- } catch (error) {
14
- process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
15
- process.exitCode = 1;
16
- }
17
- });
1
+ 'use strict';
2
+
3
+ let input = '';
4
+
5
+ process.stdin.setEncoding('utf8');
6
+ process.stdin.on('data', (chunk) => {
7
+ input += chunk;
8
+ });
9
+ process.stdin.on('end', () => {
10
+ try {
11
+ const request = input.trim() ? JSON.parse(input) : {};
12
+ process.stdout.write(`${JSON.stringify({ text: String(request?.text ?? '') })}\n`);
13
+ } catch (error) {
14
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
15
+ process.exitCode = 1;
16
+ }
17
+ });
@@ -1,55 +1,55 @@
1
- {
2
- "code": "echo-tool",
3
- "name": "回声工具",
4
- "version": "1.0.0",
5
- "type": "code",
6
- "description": "把传入的文本原样返回(回显)。用于连通性验证,或把一段文本再交回给调用方。",
7
- "toolRuntime": "local",
8
- "category": "general",
9
- "tags": [
10
- "template",
11
- "local",
12
- "echo"
13
- ],
14
- "riskLevel": "low",
15
- "package": {
16
- "format": "zip",
17
- "sandbox": true
18
- },
19
- "tools": [
20
- {
21
- "name": "echo-tool",
22
- "description": "把传入的文本原样返回(回显)。",
23
- "handler": "src/index.js",
24
- "runtime": "node",
25
- "timeout": 5,
26
- "input": {
27
- "type": "object",
28
- "properties": {
29
- "text": {
30
- "type": "string",
31
- "description": "Text to return."
32
- }
33
- },
34
- "required": [
35
- "text"
36
- ]
37
- },
38
- "output": {
39
- "type": "object",
40
- "properties": {
41
- "text": {
42
- "type": "string"
43
- }
44
- },
45
- "required": [
46
- "text"
47
- ]
48
- },
49
- "dataScope": "user-bound"
50
- }
51
- ],
52
- "metadata": {
53
- "owner": "agent-template"
54
- }
55
- }
1
+ {
2
+ "code": "echo-tool",
3
+ "name": "回声工具",
4
+ "version": "1.0.0",
5
+ "type": "code",
6
+ "description": "把传入的文本原样返回(回显)。用于连通性验证,或把一段文本再交回给调用方。",
7
+ "toolRuntime": "local",
8
+ "category": "general",
9
+ "tags": [
10
+ "template",
11
+ "local",
12
+ "echo"
13
+ ],
14
+ "riskLevel": "low",
15
+ "package": {
16
+ "format": "zip",
17
+ "sandbox": true
18
+ },
19
+ "tools": [
20
+ {
21
+ "name": "echo-tool",
22
+ "description": "把传入的文本原样返回(回显)。",
23
+ "handler": "src/index.js",
24
+ "runtime": "node",
25
+ "timeout": 5,
26
+ "input": {
27
+ "type": "object",
28
+ "properties": {
29
+ "text": {
30
+ "type": "string",
31
+ "description": "Text to return."
32
+ }
33
+ },
34
+ "required": [
35
+ "text"
36
+ ]
37
+ },
38
+ "output": {
39
+ "type": "object",
40
+ "properties": {
41
+ "text": {
42
+ "type": "string"
43
+ }
44
+ },
45
+ "required": [
46
+ "text"
47
+ ]
48
+ },
49
+ "dataScope": "user-bound"
50
+ }
51
+ ],
52
+ "metadata": {
53
+ "owner": "agent-template"
54
+ }
55
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.10",
2
+ "version": "0.2.11",
3
3
  "localToolDirectories": [
4
4
  "./tools"
5
5
  ],
@@ -1,5 +1,5 @@
1
- lockfileVersion: 2
2
- resources:
3
- tools: []
4
- skills: []
5
- subagents: []
1
+ lockfileVersion: 2
2
+ resources:
3
+ tools: []
4
+ skills: []
5
+ subagents: []
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.10",
2
+ "version": "0.2.11",
3
3
  "localToolDirectories": [
4
4
  "./tools"
5
5
  ],
@@ -1,10 +1,10 @@
1
- {
2
- "name": "single-agent-with-tools-agent",
3
- "description": "Single Agent template ready for locked Tool dependencies",
4
- "version": "1.0.0",
5
- "private": true,
6
- "scripts": {
7
- "validate": "eap validate --strict",
8
- "package": "eap package"
9
- }
10
- }
1
+ {
2
+ "name": "single-agent-with-tools-agent",
3
+ "description": "Single Agent template ready for locked Tool dependencies",
4
+ "version": "1.0.0",
5
+ "private": true,
6
+ "scripts": {
7
+ "validate": "eap validate --strict",
8
+ "package": "eap package"
9
+ }
10
+ }
@@ -1,17 +1,17 @@
1
- 'use strict';
2
-
3
- let input = '';
4
-
5
- process.stdin.setEncoding('utf8');
6
- process.stdin.on('data', (chunk) => {
7
- input += chunk;
8
- });
9
- process.stdin.on('end', () => {
10
- try {
11
- const request = input.trim() ? JSON.parse(input) : {};
12
- process.stdout.write(`${JSON.stringify({ text: String(request?.text ?? '') })}\n`);
13
- } catch (error) {
14
- process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
15
- process.exitCode = 1;
16
- }
17
- });
1
+ 'use strict';
2
+
3
+ let input = '';
4
+
5
+ process.stdin.setEncoding('utf8');
6
+ process.stdin.on('data', (chunk) => {
7
+ input += chunk;
8
+ });
9
+ process.stdin.on('end', () => {
10
+ try {
11
+ const request = input.trim() ? JSON.parse(input) : {};
12
+ process.stdout.write(`${JSON.stringify({ text: String(request?.text ?? '') })}\n`);
13
+ } catch (error) {
14
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
15
+ process.exitCode = 1;
16
+ }
17
+ });
@@ -1,55 +1,55 @@
1
- {
2
- "code": "echo-tool",
3
- "name": "回声工具",
4
- "version": "1.0.0",
5
- "type": "code",
6
- "description": "把传入的文本原样返回(回显)。用于连通性验证,或把一段文本再交回给调用方。",
7
- "toolRuntime": "local",
8
- "category": "general",
9
- "tags": [
10
- "template",
11
- "local",
12
- "echo"
13
- ],
14
- "riskLevel": "low",
15
- "package": {
16
- "format": "zip",
17
- "sandbox": true
18
- },
19
- "tools": [
20
- {
21
- "name": "echo-tool",
22
- "description": "把传入的文本原样返回(回显)。",
23
- "handler": "src/index.js",
24
- "runtime": "node",
25
- "timeout": 5,
26
- "input": {
27
- "type": "object",
28
- "properties": {
29
- "text": {
30
- "type": "string",
31
- "description": "Text to return."
32
- }
33
- },
34
- "required": [
35
- "text"
36
- ]
37
- },
38
- "output": {
39
- "type": "object",
40
- "properties": {
41
- "text": {
42
- "type": "string"
43
- }
44
- },
45
- "required": [
46
- "text"
47
- ]
48
- },
49
- "dataScope": "user-bound"
50
- }
51
- ],
52
- "metadata": {
53
- "owner": "agent-template"
54
- }
55
- }
1
+ {
2
+ "code": "echo-tool",
3
+ "name": "回声工具",
4
+ "version": "1.0.0",
5
+ "type": "code",
6
+ "description": "把传入的文本原样返回(回显)。用于连通性验证,或把一段文本再交回给调用方。",
7
+ "toolRuntime": "local",
8
+ "category": "general",
9
+ "tags": [
10
+ "template",
11
+ "local",
12
+ "echo"
13
+ ],
14
+ "riskLevel": "low",
15
+ "package": {
16
+ "format": "zip",
17
+ "sandbox": true
18
+ },
19
+ "tools": [
20
+ {
21
+ "name": "echo-tool",
22
+ "description": "把传入的文本原样返回(回显)。",
23
+ "handler": "src/index.js",
24
+ "runtime": "node",
25
+ "timeout": 5,
26
+ "input": {
27
+ "type": "object",
28
+ "properties": {
29
+ "text": {
30
+ "type": "string",
31
+ "description": "Text to return."
32
+ }
33
+ },
34
+ "required": [
35
+ "text"
36
+ ]
37
+ },
38
+ "output": {
39
+ "type": "object",
40
+ "properties": {
41
+ "text": {
42
+ "type": "string"
43
+ }
44
+ },
45
+ "required": [
46
+ "text"
47
+ ]
48
+ },
49
+ "dataScope": "user-bound"
50
+ }
51
+ ],
52
+ "metadata": {
53
+ "owner": "agent-template"
54
+ }
55
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gt-fe/eap-cli",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "EAP CLI 工具 — Agent 项目创建、开发、测试、发布",
5
5
  "type": "module",
6
6
  "bin": {
@@ -23,7 +23,7 @@
23
23
  "react": "^18.3.1",
24
24
  "react-markdown": "^9.0.1",
25
25
  "remark-gfm": "^4.0.0",
26
- "@gt-fe/eap-sdk": "0.2.10"
26
+ "@gt-fe/eap-sdk": "0.2.11"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "^20.0.0",
@@ -49,6 +49,6 @@
49
49
  "test": "vitest run",
50
50
  "type-check": "tsc --noEmit && pnpm run type-check:playground",
51
51
  "type-check:playground": "tsc --noEmit --project playground-ui/tsconfig.json",
52
- "clean": "rm -rf dist"
52
+ "clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\""
53
53
  }
54
54
  }