@kmlckj/licos-ai-cli 0.0.9 → 0.0.10
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/lib/__templates__/agent/README.md +1 -8
- package/lib/__templates__/agent/pyproject.toml +1 -1
- package/lib/__templates__/agent/requirements.txt +1 -1
- package/lib/__templates__/expo/server/package.json +35 -35
- package/lib/__templates__/nextjs/package.json +93 -93
- package/lib/__templates__/nuxt-vue/package.json +35 -35
- package/lib/__templates__/taro/server/package.json +40 -40
- package/lib/__templates__/templates.json +25 -0
- package/lib/__templates__/vite/package.json +44 -44
- package/lib/__templates__/workflow/.licos +14 -0
- package/lib/__templates__/workflow/README.md +34 -0
- package/lib/__templates__/workflow/_gitignore +10 -0
- package/lib/__templates__/workflow/pyproject.toml +13 -0
- package/lib/__templates__/workflow/requirements.txt +1 -0
- package/lib/__templates__/workflow/scripts/http_run.sh +29 -0
- package/lib/__templates__/workflow/scripts/local_run.sh +12 -0
- package/lib/__templates__/workflow/scripts/pack.sh +23 -0
- package/lib/__templates__/workflow/scripts/setup.sh +44 -0
- package/lib/__templates__/workflow/src/graphs/__init__.py +1 -0
- package/lib/__templates__/workflow/src/graphs/graph.py +36 -0
- package/lib/__templates__/workflow/src/main.py +7 -0
- package/lib/__templates__/workflow/template.config.js +45 -0
- package/lib/cli.js +1 -1
- package/package.json +1 -1
|
@@ -30,11 +30,4 @@ bash scripts/http_run.sh -p <%= port %>
|
|
|
30
30
|
- `POST /cancel/{run_id}`
|
|
31
31
|
- `POST /node_run/{node_id}`
|
|
32
32
|
- `GET /graph_parameter`
|
|
33
|
-
- `POST /v1/chat/completions`
|
|
34
|
-
|
|
35
|
-
## 工作区约定
|
|
36
|
-
|
|
37
|
-
- `LICOS_WORKSPACE_PATH=/workspace`
|
|
38
|
-
- `LICOS_PROJECT_PATH=/workspace/projects`
|
|
39
|
-
- `.licos/` 平台数据目录只允许位于 `/workspace/.licos`
|
|
40
|
-
- 当前项目源码只放在 `/workspace/projects`
|
|
33
|
+
- `POST /v1/chat/completions`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
licos-agent-runtime>=0.1
|
|
1
|
+
licos-agent-runtime>=0.2.1
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "server",
|
|
3
|
-
"private": true,
|
|
4
|
-
"type": "module",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"build": "node build.js",
|
|
7
|
-
"dev": "bash ../.licosproj/scripts/server_dev_run.sh",
|
|
8
|
-
"preinstall": "npx only-allow pnpm",
|
|
9
|
-
"start": "NODE_ENV=production PORT=${PORT:-5000} node dist/index.js",
|
|
10
|
-
"lint": "tsc --noEmit"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@kmlckj/licos-platform-sdk": "0.6.0",
|
|
14
|
-
"@supabase/supabase-js": "2.95.3",
|
|
15
|
-
"cors": "^2.8.5",
|
|
16
|
-
"dayjs": "^1.11.19",
|
|
17
|
-
"dotenv": "^17.2.3",
|
|
18
|
-
"drizzle-orm": "^0.45.1",
|
|
19
|
-
"drizzle-zod": "^0.8.3",
|
|
20
|
-
"express": "^4.22.1",
|
|
21
|
-
"multer": "^2.0.2",
|
|
22
|
-
"pg": "^8.16.3",
|
|
23
|
-
"zod": "^4.2.1"
|
|
24
|
-
},
|
|
25
|
-
"devDependencies": {
|
|
26
|
-
"@types/cors": "^2.8.19",
|
|
27
|
-
"@types/express": "^5.0.6",
|
|
28
|
-
"@types/multer": "^2.0.0",
|
|
29
|
-
"@types/pg": "^8.16.0",
|
|
30
|
-
"drizzle-kit": "^0.31.8",
|
|
31
|
-
"esbuild": "0.27.2",
|
|
32
|
-
"tsx": "^4.21.0",
|
|
33
|
-
"typescript": "^5.8.3"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "server",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "node build.js",
|
|
7
|
+
"dev": "bash ../.licosproj/scripts/server_dev_run.sh",
|
|
8
|
+
"preinstall": "npx only-allow pnpm",
|
|
9
|
+
"start": "NODE_ENV=production PORT=${PORT:-5000} node dist/index.js",
|
|
10
|
+
"lint": "tsc --noEmit"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@kmlckj/licos-platform-sdk": "0.6.0",
|
|
14
|
+
"@supabase/supabase-js": "2.95.3",
|
|
15
|
+
"cors": "^2.8.5",
|
|
16
|
+
"dayjs": "^1.11.19",
|
|
17
|
+
"dotenv": "^17.2.3",
|
|
18
|
+
"drizzle-orm": "^0.45.1",
|
|
19
|
+
"drizzle-zod": "^0.8.3",
|
|
20
|
+
"express": "^4.22.1",
|
|
21
|
+
"multer": "^2.0.2",
|
|
22
|
+
"pg": "^8.16.3",
|
|
23
|
+
"zod": "^4.2.1"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/cors": "^2.8.19",
|
|
27
|
+
"@types/express": "^5.0.6",
|
|
28
|
+
"@types/multer": "^2.0.0",
|
|
29
|
+
"@types/pg": "^8.16.0",
|
|
30
|
+
"drizzle-kit": "^0.31.8",
|
|
31
|
+
"esbuild": "0.27.2",
|
|
32
|
+
"tsx": "^4.21.0",
|
|
33
|
+
"typescript": "^5.8.3"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "<%= appName %>",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"build": "bash ./scripts/build.sh",
|
|
7
|
-
"dev": "bash ./scripts/dev.sh",
|
|
8
|
-
"preinstall": "npx only-allow pnpm",
|
|
9
|
-
"lint": "eslint",
|
|
10
|
-
"start": "bash ./scripts/start.sh",
|
|
11
|
-
"ts-check": "tsc -p tsconfig.json"
|
|
12
|
-
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"@kmlckj/licos-platform-sdk": "0.6.0",
|
|
15
|
-
"@aws-sdk/client-s3": "^3.958.0",
|
|
16
|
-
"@aws-sdk/lib-storage": "^3.958.0",
|
|
17
|
-
"@hookform/resolvers": "^5.2.2",
|
|
18
|
-
"@radix-ui/react-accordion": "^1.2.12",
|
|
19
|
-
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
20
|
-
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
21
|
-
"@radix-ui/react-avatar": "^1.1.11",
|
|
22
|
-
"@radix-ui/react-checkbox": "^1.3.3",
|
|
23
|
-
"@radix-ui/react-collapsible": "^1.1.12",
|
|
24
|
-
"@radix-ui/react-context-menu": "^2.2.16",
|
|
25
|
-
"@radix-ui/react-dialog": "^1.1.15",
|
|
26
|
-
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
27
|
-
"@radix-ui/react-hover-card": "^1.1.15",
|
|
28
|
-
"@radix-ui/react-label": "^2.1.8",
|
|
29
|
-
"@radix-ui/react-menubar": "^1.1.16",
|
|
30
|
-
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
31
|
-
"@radix-ui/react-popover": "^1.1.15",
|
|
32
|
-
"@radix-ui/react-progress": "^1.1.8",
|
|
33
|
-
"@radix-ui/react-radio-group": "^1.3.8",
|
|
34
|
-
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
35
|
-
"@radix-ui/react-select": "^2.2.6",
|
|
36
|
-
"@radix-ui/react-separator": "^1.1.8",
|
|
37
|
-
"@radix-ui/react-slider": "^1.3.6",
|
|
38
|
-
"@radix-ui/react-slot": "^1.2.4",
|
|
39
|
-
"@radix-ui/react-switch": "^1.2.6",
|
|
40
|
-
"@radix-ui/react-tabs": "^1.1.13",
|
|
41
|
-
"@radix-ui/react-toggle": "^1.1.10",
|
|
42
|
-
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
43
|
-
"@radix-ui/react-tooltip": "^1.2.8",
|
|
44
|
-
"@supabase/supabase-js": "2.95.3",
|
|
45
|
-
"class-variance-authority": "^0.7.1",
|
|
46
|
-
"clsx": "^2.1.1",
|
|
47
|
-
"cmdk": "^1.1.1",
|
|
48
|
-
"date-fns": "^4.1.0",
|
|
49
|
-
"dotenv": "^17.2.3",
|
|
50
|
-
"drizzle-kit": "^0.31.8",
|
|
51
|
-
"drizzle-orm": "^0.45.1",
|
|
52
|
-
"drizzle-zod": "^0.8.3",
|
|
53
|
-
"embla-carousel-react": "^8.6.0",
|
|
54
|
-
"input-otp": "^1.4.2",
|
|
55
|
-
"lucide-react": "^0.468.0",
|
|
56
|
-
"next": "16.1.1",
|
|
57
|
-
"next-themes": "^0.4.6",
|
|
58
|
-
"pg": "^8.16.3",
|
|
59
|
-
"react": "19.2.3",
|
|
60
|
-
"react-day-picker": "^9.13.0",
|
|
61
|
-
"react-dom": "19.2.3",
|
|
62
|
-
"react-hook-form": "^7.70.0",
|
|
63
|
-
"react-resizable-panels": "^4.2.0",
|
|
64
|
-
"recharts": "2.15.4",
|
|
65
|
-
"sonner": "^2.0.7",
|
|
66
|
-
"tailwind-merge": "^2.6.0",
|
|
67
|
-
"tw-animate-css": "^1.4.0",
|
|
68
|
-
"vaul": "^1.1.2",
|
|
69
|
-
"zod": "^4.3.5"
|
|
70
|
-
},
|
|
71
|
-
"devDependencies": {
|
|
72
|
-
"@react-dev-inspector/babel-plugin": "^2.0.1",
|
|
73
|
-
"@react-dev-inspector/middleware": "^2.0.1",
|
|
74
|
-
"@tailwindcss/postcss": "^4",
|
|
75
|
-
"@types/node": "^20",
|
|
76
|
-
"@types/pg": "^8.16.0",
|
|
77
|
-
"@types/react": "^19",
|
|
78
|
-
"@types/react-dom": "^19",
|
|
79
|
-
"eslint": "^9",
|
|
80
|
-
"eslint-config-next": "16.1.1",
|
|
81
|
-
"only-allow": "^1.2.2",
|
|
82
|
-
"react-dev-inspector": "^2.0.1",
|
|
83
|
-
"shadcn": "latest",
|
|
84
|
-
"tailwindcss": "^4",
|
|
85
|
-
"tsup": "^8.3.5",
|
|
86
|
-
"tsx": "^4.19.2",
|
|
87
|
-
"typescript": "^5"
|
|
88
|
-
},
|
|
89
|
-
"packageManager": "pnpm@9.0.0",
|
|
90
|
-
"engines": {
|
|
91
|
-
"pnpm": ">=9.0.0"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= appName %>",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "bash ./scripts/build.sh",
|
|
7
|
+
"dev": "bash ./scripts/dev.sh",
|
|
8
|
+
"preinstall": "npx only-allow pnpm",
|
|
9
|
+
"lint": "eslint",
|
|
10
|
+
"start": "bash ./scripts/start.sh",
|
|
11
|
+
"ts-check": "tsc -p tsconfig.json"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@kmlckj/licos-platform-sdk": "0.6.0",
|
|
15
|
+
"@aws-sdk/client-s3": "^3.958.0",
|
|
16
|
+
"@aws-sdk/lib-storage": "^3.958.0",
|
|
17
|
+
"@hookform/resolvers": "^5.2.2",
|
|
18
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
19
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
20
|
+
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
21
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
22
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
23
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
24
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
25
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
26
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
27
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
28
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
29
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
30
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
31
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
32
|
+
"@radix-ui/react-progress": "^1.1.8",
|
|
33
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
34
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
35
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
36
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
37
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
38
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
39
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
40
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
41
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
42
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
43
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
44
|
+
"@supabase/supabase-js": "2.95.3",
|
|
45
|
+
"class-variance-authority": "^0.7.1",
|
|
46
|
+
"clsx": "^2.1.1",
|
|
47
|
+
"cmdk": "^1.1.1",
|
|
48
|
+
"date-fns": "^4.1.0",
|
|
49
|
+
"dotenv": "^17.2.3",
|
|
50
|
+
"drizzle-kit": "^0.31.8",
|
|
51
|
+
"drizzle-orm": "^0.45.1",
|
|
52
|
+
"drizzle-zod": "^0.8.3",
|
|
53
|
+
"embla-carousel-react": "^8.6.0",
|
|
54
|
+
"input-otp": "^1.4.2",
|
|
55
|
+
"lucide-react": "^0.468.0",
|
|
56
|
+
"next": "16.1.1",
|
|
57
|
+
"next-themes": "^0.4.6",
|
|
58
|
+
"pg": "^8.16.3",
|
|
59
|
+
"react": "19.2.3",
|
|
60
|
+
"react-day-picker": "^9.13.0",
|
|
61
|
+
"react-dom": "19.2.3",
|
|
62
|
+
"react-hook-form": "^7.70.0",
|
|
63
|
+
"react-resizable-panels": "^4.2.0",
|
|
64
|
+
"recharts": "2.15.4",
|
|
65
|
+
"sonner": "^2.0.7",
|
|
66
|
+
"tailwind-merge": "^2.6.0",
|
|
67
|
+
"tw-animate-css": "^1.4.0",
|
|
68
|
+
"vaul": "^1.1.2",
|
|
69
|
+
"zod": "^4.3.5"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@react-dev-inspector/babel-plugin": "^2.0.1",
|
|
73
|
+
"@react-dev-inspector/middleware": "^2.0.1",
|
|
74
|
+
"@tailwindcss/postcss": "^4",
|
|
75
|
+
"@types/node": "^20",
|
|
76
|
+
"@types/pg": "^8.16.0",
|
|
77
|
+
"@types/react": "^19",
|
|
78
|
+
"@types/react-dom": "^19",
|
|
79
|
+
"eslint": "^9",
|
|
80
|
+
"eslint-config-next": "16.1.1",
|
|
81
|
+
"only-allow": "^1.2.2",
|
|
82
|
+
"react-dev-inspector": "^2.0.1",
|
|
83
|
+
"shadcn": "latest",
|
|
84
|
+
"tailwindcss": "^4",
|
|
85
|
+
"tsup": "^8.3.5",
|
|
86
|
+
"tsx": "^4.19.2",
|
|
87
|
+
"typescript": "^5"
|
|
88
|
+
},
|
|
89
|
+
"packageManager": "pnpm@9.0.0",
|
|
90
|
+
"engines": {
|
|
91
|
+
"pnpm": ">=9.0.0"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "<%= appName %>",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "bash ./scripts/build.sh",
|
|
8
|
-
"dev": "bash ./scripts/dev.sh",
|
|
9
|
-
"generate": "nuxt generate",
|
|
10
|
-
"preinstall": "npx only-allow pnpm",
|
|
11
|
-
"preview": "nuxt preview",
|
|
12
|
-
"start": "bash ./scripts/start.sh"
|
|
13
|
-
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"@kmlckj/licos-platform-sdk": "0.6.0",
|
|
16
|
-
"@nuxt/image": "^1.8.1",
|
|
17
|
-
"nuxt": "^4.3.1",
|
|
18
|
-
"tailwind-merge": "^2.6.0",
|
|
19
|
-
"vue": "^3.5.30",
|
|
20
|
-
"vue-router": "^4.6.4"
|
|
21
|
-
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"@nuxtjs/tailwindcss": "^6.14.0",
|
|
24
|
-
"@types/node": "^20",
|
|
25
|
-
"autoprefixer": "^10.4.20",
|
|
26
|
-
"only-allow": "^1.2.2",
|
|
27
|
-
"postcss": "^8.4.49",
|
|
28
|
-
"tailwindcss": "^3.4.17",
|
|
29
|
-
"typescript": "^5"
|
|
30
|
-
},
|
|
31
|
-
"packageManager": "pnpm@9.0.0",
|
|
32
|
-
"engines": {
|
|
33
|
-
"pnpm": ">=9.0.0"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= appName %>",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "bash ./scripts/build.sh",
|
|
8
|
+
"dev": "bash ./scripts/dev.sh",
|
|
9
|
+
"generate": "nuxt generate",
|
|
10
|
+
"preinstall": "npx only-allow pnpm",
|
|
11
|
+
"preview": "nuxt preview",
|
|
12
|
+
"start": "bash ./scripts/start.sh"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@kmlckj/licos-platform-sdk": "0.6.0",
|
|
16
|
+
"@nuxt/image": "^1.8.1",
|
|
17
|
+
"nuxt": "^4.3.1",
|
|
18
|
+
"tailwind-merge": "^2.6.0",
|
|
19
|
+
"vue": "^3.5.30",
|
|
20
|
+
"vue-router": "^4.6.4"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@nuxtjs/tailwindcss": "^6.14.0",
|
|
24
|
+
"@types/node": "^20",
|
|
25
|
+
"autoprefixer": "^10.4.20",
|
|
26
|
+
"only-allow": "^1.2.2",
|
|
27
|
+
"postcss": "^8.4.49",
|
|
28
|
+
"tailwindcss": "^3.4.17",
|
|
29
|
+
"typescript": "^5"
|
|
30
|
+
},
|
|
31
|
+
"packageManager": "pnpm@9.0.0",
|
|
32
|
+
"engines": {
|
|
33
|
+
"pnpm": ">=9.0.0"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "server",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"description": "NestJS server application",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "nest build",
|
|
8
|
-
"dev": "nest start --watch",
|
|
9
|
-
"start": "nest start",
|
|
10
|
-
"start:debug": "nest start --debug --watch",
|
|
11
|
-
"start:prod": "node dist/main"
|
|
12
|
-
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"@kmlckj/licos-platform-sdk": "0.6.0",
|
|
15
|
-
"@aws-sdk/client-s3": "^3.958.0",
|
|
16
|
-
"@aws-sdk/lib-storage": "^3.958.0",
|
|
17
|
-
"@nestjs/common": "^10.4.15",
|
|
18
|
-
"@nestjs/core": "^10.4.15",
|
|
19
|
-
"@nestjs/platform-express": "^10.4.15",
|
|
20
|
-
"@supabase/supabase-js": "2.95.3",
|
|
21
|
-
"better-sqlite3": "^11.9.1",
|
|
22
|
-
"dotenv": "^17.2.3",
|
|
23
|
-
"drizzle-kit": "^0.31.8",
|
|
24
|
-
"drizzle-orm": "^0.45.1",
|
|
25
|
-
"drizzle-zod": "^0.8.3",
|
|
26
|
-
"express": "5.2.1",
|
|
27
|
-
"pg": "^8.16.3",
|
|
28
|
-
"rxjs": "^7.8.1",
|
|
29
|
-
"zod": "^4.3.5"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@nestjs/cli": "^10.4.9",
|
|
33
|
-
"@nestjs/schematics": "^10.2.3",
|
|
34
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
35
|
-
"@types/express": "5.0.6",
|
|
36
|
-
"@types/node": "^22.10.2",
|
|
37
|
-
"drizzle-kit": "^0.31.8",
|
|
38
|
-
"typescript": "^5.7.2"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "NestJS server application",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "nest build",
|
|
8
|
+
"dev": "nest start --watch",
|
|
9
|
+
"start": "nest start",
|
|
10
|
+
"start:debug": "nest start --debug --watch",
|
|
11
|
+
"start:prod": "node dist/main"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@kmlckj/licos-platform-sdk": "0.6.0",
|
|
15
|
+
"@aws-sdk/client-s3": "^3.958.0",
|
|
16
|
+
"@aws-sdk/lib-storage": "^3.958.0",
|
|
17
|
+
"@nestjs/common": "^10.4.15",
|
|
18
|
+
"@nestjs/core": "^10.4.15",
|
|
19
|
+
"@nestjs/platform-express": "^10.4.15",
|
|
20
|
+
"@supabase/supabase-js": "2.95.3",
|
|
21
|
+
"better-sqlite3": "^11.9.1",
|
|
22
|
+
"dotenv": "^17.2.3",
|
|
23
|
+
"drizzle-kit": "^0.31.8",
|
|
24
|
+
"drizzle-orm": "^0.45.1",
|
|
25
|
+
"drizzle-zod": "^0.8.3",
|
|
26
|
+
"express": "5.2.1",
|
|
27
|
+
"pg": "^8.16.3",
|
|
28
|
+
"rxjs": "^7.8.1",
|
|
29
|
+
"zod": "^4.3.5"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@nestjs/cli": "^10.4.9",
|
|
33
|
+
"@nestjs/schematics": "^10.2.3",
|
|
34
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
35
|
+
"@types/express": "5.0.6",
|
|
36
|
+
"@types/node": "^22.10.2",
|
|
37
|
+
"drizzle-kit": "^0.31.8",
|
|
38
|
+
"typescript": "^5.7.2"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -26,6 +26,31 @@
|
|
|
26
26
|
"additionalProperties": false
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
"name": "workflow",
|
|
31
|
+
"description": "Workflow(工作流项目):`licos init ${LICOS_PROJECT_PATH} --template workflow`\n- 适用:Python + LangGraph 工作流项目\n- 使用 licos-agent-runtime 提供 /run、/stream_run、/cancel、/node_run、/graph_parameter 接口\n- /stream_run 输出 workflow_start、node_start、node_end、workflow_end、error、ping 事件",
|
|
32
|
+
"location": "./workflow",
|
|
33
|
+
"paramsSchema": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"appName": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"minLength": 1,
|
|
39
|
+
"pattern": "^[a-z0-9-]+$",
|
|
40
|
+
"description": "Application name (lowercase, alphanumeric and hyphens only)"
|
|
41
|
+
},
|
|
42
|
+
"port": {
|
|
43
|
+
"type": "number",
|
|
44
|
+
"default": 5000,
|
|
45
|
+
"minimum": 1024,
|
|
46
|
+
"maximum": 65535,
|
|
47
|
+
"description": "Development server port"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": [],
|
|
51
|
+
"additionalProperties": false
|
|
52
|
+
}
|
|
53
|
+
},
|
|
29
54
|
{
|
|
30
55
|
"name": "expo",
|
|
31
56
|
"description": "Expo template for React Native applications",
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "<%= appName %>",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Vanilla TypeScript application with Express + Vite (HTML + CSS + TS + Node API)",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"build": "bash ./scripts/build.sh",
|
|
7
|
-
"dev": "bash ./scripts/dev.sh",
|
|
8
|
-
"preinstall": "npx only-allow pnpm",
|
|
9
|
-
"lint": "eslint",
|
|
10
|
-
"start": "bash ./scripts/start.sh",
|
|
11
|
-
"ts-check": "tsc -p tsconfig.json"
|
|
12
|
-
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"@kmlckj/licos-platform-sdk": "0.6.0",
|
|
15
|
-
"@supabase/supabase-js": "2.95.3",
|
|
16
|
-
"dotenv": "^17.2.3",
|
|
17
|
-
"express": "^4.21.2"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@types/express": "^5.0.0",
|
|
21
|
-
"@types/node": "^22.10.5",
|
|
22
|
-
"autoprefixer": "^10.4.20",
|
|
23
|
-
"esbuild": "^0.24.2",
|
|
24
|
-
"eslint": "^9",
|
|
25
|
-
"only-allow": "^1.2.2",
|
|
26
|
-
"postcss": "^8.4.49",
|
|
27
|
-
"tailwindcss": "^3.4.17",
|
|
28
|
-
"tsup": "^8.3.5",
|
|
29
|
-
"tsx": "^4.19.2",
|
|
30
|
-
"typescript": "^5.6.0",
|
|
31
|
-
"typescript-eslint": "^8",
|
|
32
|
-
"vite": "^7.2.4"
|
|
33
|
-
},
|
|
34
|
-
"packageManager": "pnpm@9.0.0",
|
|
35
|
-
"engines": {
|
|
36
|
-
"pnpm": ">=9.0.0"
|
|
37
|
-
},
|
|
38
|
-
"pnpm": {
|
|
39
|
-
"overrides": {
|
|
40
|
-
"esbuild": "^0.27.2",
|
|
41
|
-
"is-generator-function": "1.0.10"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= appName %>",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Vanilla TypeScript application with Express + Vite (HTML + CSS + TS + Node API)",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "bash ./scripts/build.sh",
|
|
7
|
+
"dev": "bash ./scripts/dev.sh",
|
|
8
|
+
"preinstall": "npx only-allow pnpm",
|
|
9
|
+
"lint": "eslint",
|
|
10
|
+
"start": "bash ./scripts/start.sh",
|
|
11
|
+
"ts-check": "tsc -p tsconfig.json"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@kmlckj/licos-platform-sdk": "0.6.0",
|
|
15
|
+
"@supabase/supabase-js": "2.95.3",
|
|
16
|
+
"dotenv": "^17.2.3",
|
|
17
|
+
"express": "^4.21.2"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/express": "^5.0.0",
|
|
21
|
+
"@types/node": "^22.10.5",
|
|
22
|
+
"autoprefixer": "^10.4.20",
|
|
23
|
+
"esbuild": "^0.24.2",
|
|
24
|
+
"eslint": "^9",
|
|
25
|
+
"only-allow": "^1.2.2",
|
|
26
|
+
"postcss": "^8.4.49",
|
|
27
|
+
"tailwindcss": "^3.4.17",
|
|
28
|
+
"tsup": "^8.3.5",
|
|
29
|
+
"tsx": "^4.19.2",
|
|
30
|
+
"typescript": "^5.6.0",
|
|
31
|
+
"typescript-eslint": "^8",
|
|
32
|
+
"vite": "^7.2.4"
|
|
33
|
+
},
|
|
34
|
+
"packageManager": "pnpm@9.0.0",
|
|
35
|
+
"engines": {
|
|
36
|
+
"pnpm": ">=9.0.0"
|
|
37
|
+
},
|
|
38
|
+
"pnpm": {
|
|
39
|
+
"overrides": {
|
|
40
|
+
"esbuild": "^0.27.2",
|
|
41
|
+
"is-generator-function": "1.0.10"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
entrypoint = "src/main.py"
|
|
3
|
+
requires = ["python-3.12"]
|
|
4
|
+
template = "workflow"
|
|
5
|
+
|
|
6
|
+
[dev]
|
|
7
|
+
build = ["bash", "scripts/setup.sh"]
|
|
8
|
+
run = ["bash", "scripts/http_run.sh", "-p", "<%= port %>"]
|
|
9
|
+
deps = ["git"]
|
|
10
|
+
|
|
11
|
+
[deploy]
|
|
12
|
+
build = ["bash", "scripts/setup.sh"]
|
|
13
|
+
run = ["bash", "scripts/http_run.sh", "-p", "<%= port %>"]
|
|
14
|
+
deps = ["git"]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# <%= appName %>
|
|
2
|
+
|
|
3
|
+
LICOS 工作流项目模板,基于 Python、LangGraph 和 `licos-agent-runtime`。
|
|
4
|
+
|
|
5
|
+
## 目录
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
.
|
|
9
|
+
├── .licos
|
|
10
|
+
├── pyproject.toml
|
|
11
|
+
├── scripts/
|
|
12
|
+
└── src/
|
|
13
|
+
├── main.py
|
|
14
|
+
└── graphs/
|
|
15
|
+
└── graph.py
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## 本地运行
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
bash scripts/setup.sh
|
|
22
|
+
bash scripts/http_run.sh -p <%= port %>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## HTTP 接口
|
|
26
|
+
|
|
27
|
+
- `GET /health`
|
|
28
|
+
- `POST /run`
|
|
29
|
+
- `POST /stream_run`
|
|
30
|
+
- `POST /cancel/{run_id}`
|
|
31
|
+
- `POST /node_run/{node_id}`
|
|
32
|
+
- `GET /graph_parameter`
|
|
33
|
+
|
|
34
|
+
`POST /stream_run` 使用工作流流式协议,事件类型包括 `workflow_start`、`workflow_end`、`node_start`、`node_end`、`error`、`ping`。
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "<%= appName %>"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "LICOS LangGraph workflow project"
|
|
5
|
+
requires-python = ">=3.12"
|
|
6
|
+
dependencies = [
|
|
7
|
+
"licos-agent-runtime>=0.2.1",
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
[tool.uv]
|
|
11
|
+
[[tool.uv.index]]
|
|
12
|
+
url = "https://mirrors.aliyun.com/pypi/simple/"
|
|
13
|
+
default = true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
licos-agent-runtime>=0.2.1
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -eo pipefail
|
|
3
|
+
|
|
4
|
+
PROJECT_DIR="${LICOS_PROJECT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
|
5
|
+
PORT="${PORT:-<%= port %>}"
|
|
6
|
+
HOST="${HOST:-0.0.0.0}"
|
|
7
|
+
|
|
8
|
+
while [ "$#" -gt 0 ]; do
|
|
9
|
+
case "$1" in
|
|
10
|
+
-p|--port)
|
|
11
|
+
PORT="$2"
|
|
12
|
+
shift 2
|
|
13
|
+
;;
|
|
14
|
+
--host)
|
|
15
|
+
HOST="$2"
|
|
16
|
+
shift 2
|
|
17
|
+
;;
|
|
18
|
+
*)
|
|
19
|
+
shift
|
|
20
|
+
;;
|
|
21
|
+
esac
|
|
22
|
+
done
|
|
23
|
+
|
|
24
|
+
cd "$PROJECT_DIR"
|
|
25
|
+
|
|
26
|
+
export LICOS_PROJECT_PATH="$PROJECT_DIR"
|
|
27
|
+
export AGENT_PROJECT_TYPE="${AGENT_PROJECT_TYPE:-WORKFLOW}"
|
|
28
|
+
|
|
29
|
+
exec python -m licos_agent_runtime --mode http --host "$HOST" --port "$PORT"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -eo pipefail
|
|
3
|
+
|
|
4
|
+
PROJECT_DIR="${LICOS_PROJECT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
|
5
|
+
INPUT="${1:-{\"topic\":\"LICOS 工作流\"}}"
|
|
6
|
+
|
|
7
|
+
cd "$PROJECT_DIR"
|
|
8
|
+
|
|
9
|
+
export LICOS_PROJECT_PATH="$PROJECT_DIR"
|
|
10
|
+
export AGENT_PROJECT_TYPE="${AGENT_PROJECT_TYPE:-WORKFLOW}"
|
|
11
|
+
|
|
12
|
+
python -m licos_agent_runtime --mode flow --input "$INPUT"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -eo pipefail
|
|
3
|
+
|
|
4
|
+
PROJECT_DIR="${LICOS_PROJECT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
|
5
|
+
PACKAGE_NAME="${PACKAGE_NAME:-<%= appName %>.zip}"
|
|
6
|
+
|
|
7
|
+
cd "$PROJECT_DIR"
|
|
8
|
+
|
|
9
|
+
rm -f "$PACKAGE_NAME"
|
|
10
|
+
zip -r "$PACKAGE_NAME" . \
|
|
11
|
+
-x ".venv/*" \
|
|
12
|
+
-x "venv/*" \
|
|
13
|
+
-x "__pycache__/*" \
|
|
14
|
+
-x "*.pyc" \
|
|
15
|
+
-x ".git/*" \
|
|
16
|
+
-x ".pytest_cache/*" \
|
|
17
|
+
-x ".mypy_cache/*" \
|
|
18
|
+
-x ".ruff_cache/*" \
|
|
19
|
+
-x "dist/*" \
|
|
20
|
+
-x "build/*" \
|
|
21
|
+
-x "*.egg-info/*"
|
|
22
|
+
|
|
23
|
+
echo "$PROJECT_DIR/$PACKAGE_NAME"
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -eo pipefail
|
|
3
|
+
|
|
4
|
+
PROJECT_DIR="${LICOS_PROJECT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
|
5
|
+
cd "$PROJECT_DIR"
|
|
6
|
+
|
|
7
|
+
ensure_pip_config() {
|
|
8
|
+
mkdir -p "${HOME:-/root}/.pip"
|
|
9
|
+
cat > "${HOME:-/root}/.pip/pip.conf" <<'EOF'
|
|
10
|
+
[global]
|
|
11
|
+
index-url = https://mirrors.aliyun.com/pypi/simple/
|
|
12
|
+
extra-index-url = https://pypi.org/simple/
|
|
13
|
+
trusted-host = mirrors.aliyun.com
|
|
14
|
+
EOF
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
ensure_pip_config
|
|
18
|
+
|
|
19
|
+
PIP_ARGS=(--no-cache-dir)
|
|
20
|
+
if python -m pip install --help 2>/dev/null | grep -q -- "--break-system-packages"; then
|
|
21
|
+
PIP_ARGS+=(--break-system-packages)
|
|
22
|
+
fi
|
|
23
|
+
if [ -n "${PIP_TARGET:-}" ]; then
|
|
24
|
+
PIP_ARGS+=(--target "$PIP_TARGET")
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
if command -v uv >/dev/null 2>&1 && [ -f "pyproject.toml" ]; then
|
|
28
|
+
if [ -n "${PIP_TARGET:-}" ]; then
|
|
29
|
+
echo "[setup] Deploy mode (uv): installing to PIP_TARGET=$PIP_TARGET"
|
|
30
|
+
uv export --frozen --no-hashes --no-dev | uv pip install --no-cache --target "$PIP_TARGET" -r -
|
|
31
|
+
else
|
|
32
|
+
echo "[setup] Dev mode (uv): syncing .venv"
|
|
33
|
+
if [ -f "uv.lock" ]; then
|
|
34
|
+
uv sync --frozen || uv sync
|
|
35
|
+
else
|
|
36
|
+
uv sync
|
|
37
|
+
fi
|
|
38
|
+
fi
|
|
39
|
+
elif [ -f "requirements.txt" ]; then
|
|
40
|
+
echo "[setup] Fallback mode (pip): installing from requirements.txt"
|
|
41
|
+
python -m pip install "${PIP_ARGS[@]}" -r requirements.txt
|
|
42
|
+
else
|
|
43
|
+
echo "[setup] no pyproject.toml or requirements.txt found, skipping install"
|
|
44
|
+
fi
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Workflow graph package."""
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any, TypedDict
|
|
4
|
+
|
|
5
|
+
from langgraph.graph import END, START, StateGraph
|
|
6
|
+
from pydantic import BaseModel, Field
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class WorkflowInput(BaseModel):
|
|
10
|
+
topic: str = Field(default="", description="工作流输入主题")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class WorkflowOutput(BaseModel):
|
|
14
|
+
answer: str = Field(description="工作流输出结果")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class WorkflowState(TypedDict, total=False):
|
|
18
|
+
topic: str
|
|
19
|
+
answer: str
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def generate_answer(state: WorkflowState) -> WorkflowState:
|
|
23
|
+
topic = str(state.get("topic") or "").strip() or "LICOS 工作流"
|
|
24
|
+
return {"answer": f"已执行工作流,输入主题:{topic}"}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def create_graph(_ctx: Any = None) -> Any:
|
|
28
|
+
builder = StateGraph(
|
|
29
|
+
WorkflowState,
|
|
30
|
+
input_schema=WorkflowInput,
|
|
31
|
+
output_schema=WorkflowOutput,
|
|
32
|
+
)
|
|
33
|
+
builder.add_node("generate_answer", generate_answer, metadata={"title": "生成结果"})
|
|
34
|
+
builder.add_edge(START, "generate_answer")
|
|
35
|
+
builder.add_edge("generate_answer", END)
|
|
36
|
+
return builder.compile()
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const description = `Workflow(工作流项目):\`licos init \${LICOS_PROJECT_PATH} --template workflow\`
|
|
2
|
+
- 适用:Python + LangGraph 工作流项目
|
|
3
|
+
- 使用 licos-agent-runtime 提供 /run、/stream_run、/cancel、/node_run、/graph_parameter 接口
|
|
4
|
+
- /stream_run 输出 workflow_start、node_start、node_end、workflow_end、error、ping 事件`;
|
|
5
|
+
|
|
6
|
+
const config = {
|
|
7
|
+
description,
|
|
8
|
+
paramsSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
appName: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
minLength: 1,
|
|
14
|
+
pattern: '^[a-z0-9-]+$',
|
|
15
|
+
description: 'Application name (lowercase, alphanumeric and hyphens only)',
|
|
16
|
+
},
|
|
17
|
+
port: {
|
|
18
|
+
type: 'number',
|
|
19
|
+
default: 5000,
|
|
20
|
+
minimum: 1024,
|
|
21
|
+
maximum: 65535,
|
|
22
|
+
description: 'Development server port',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
required: [],
|
|
26
|
+
additionalProperties: false,
|
|
27
|
+
},
|
|
28
|
+
defaultParams: {
|
|
29
|
+
appName: 'workflow-project',
|
|
30
|
+
port: 5000,
|
|
31
|
+
},
|
|
32
|
+
onBeforeRender: async context => {
|
|
33
|
+
console.log(`Creating LICOS Workflow project: ${context.appName}`);
|
|
34
|
+
return context;
|
|
35
|
+
},
|
|
36
|
+
onAfterRender: async (_context, outputPath) => {
|
|
37
|
+
console.log(`\nWorkflow project created at: ${outputPath}`);
|
|
38
|
+
console.log('\nConfiguration:');
|
|
39
|
+
console.log(' - Runtime: licos-agent-runtime');
|
|
40
|
+
console.log(' - Framework: LangGraph');
|
|
41
|
+
console.log(` - Port: ${_context.port}`);
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default config;
|
package/lib/cli.js
CHANGED
|
@@ -2107,7 +2107,7 @@ const EventBuilder = {
|
|
|
2107
2107
|
};
|
|
2108
2108
|
|
|
2109
2109
|
var name = "@kmlckj/licos-ai-cli";
|
|
2110
|
-
var version = "0.0.
|
|
2110
|
+
var version = "0.0.10";
|
|
2111
2111
|
var description = "LICOS AI coding workspace CLI - project template engine and dev tools";
|
|
2112
2112
|
var license = "MIT";
|
|
2113
2113
|
var author = "kmlckj";
|