@coze-arch/cli 0.0.19-alpha.ad1979 → 0.0.20-alpha.2070c7

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 (48) hide show
  1. package/lib/__templates__/expo/.coze +1 -0
  2. package/lib/__templates__/expo/.cozeproj/scripts/validate.sh +8 -0
  3. package/lib/__templates__/expo/package.json +2 -1
  4. package/lib/__templates__/nextjs/.coze +1 -0
  5. package/lib/__templates__/nextjs/package.json +3 -1
  6. package/lib/__templates__/nextjs/scripts/validate.sh +10 -0
  7. package/lib/__templates__/nuxt-vue/.coze +1 -0
  8. package/lib/__templates__/nuxt-vue/app/pages/index.vue +6 -0
  9. package/lib/__templates__/nuxt-vue/eslint.config.mjs +25 -0
  10. package/lib/__templates__/nuxt-vue/nuxt.config.ts +2 -2
  11. package/lib/__templates__/nuxt-vue/package.json +9 -2
  12. package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +790 -10
  13. package/lib/__templates__/nuxt-vue/scripts/validate.sh +10 -0
  14. package/lib/__templates__/pi-agent/AGENTS.md +7 -2
  15. package/lib/__templates__/pi-agent/README.md +2 -0
  16. package/lib/__templates__/pi-agent/docs/project-overview.md +9 -15
  17. package/lib/__templates__/pi-agent/docs/user/getting-started.md +3 -4
  18. package/lib/__templates__/pi-agent/pi-resources/skills/coze-asr/SKILL.md +4 -10
  19. package/lib/__templates__/pi-agent/pi-resources/skills/coze-image-gen/SKILL.md +6 -18
  20. package/lib/__templates__/pi-agent/pi-resources/skills/coze-tts/SKILL.md +9 -37
  21. package/lib/__templates__/pi-agent/pi-resources/skills/coze-video-gen/SKILL.md +17 -30
  22. package/lib/__templates__/pi-agent/src/config.ts +60 -19
  23. package/lib/__templates__/pi-agent/src/core.ts +1 -0
  24. package/lib/__templates__/pi-agent/src/dashboard/index.ts +39 -4
  25. package/lib/__templates__/pi-agent/src/dashboard/server.ts +0 -12
  26. package/lib/__templates__/pi-agent/src/dashboard/web/src/components/app-layout.tsx +1 -15
  27. package/lib/__templates__/pi-agent/src/dashboard/web/src/main.tsx +0 -6
  28. package/lib/__templates__/pi-agent/src/dashboard/web/src/pages/chat-page.tsx +0 -11
  29. package/lib/__templates__/pi-agent/src/dashboard/web/src/pages/overview-page.tsx +268 -72
  30. package/lib/__templates__/pi-agent/src/dashboard/web/src/styles.css +0 -91
  31. package/lib/__templates__/pi-agent/tests/config.test.ts +63 -1
  32. package/lib/__templates__/taro/.coze +1 -0
  33. package/lib/__templates__/taro/.cozeproj/scripts/validate.sh +8 -0
  34. package/lib/__templates__/taro/package.json +1 -1
  35. package/lib/__templates__/vite/.coze +1 -0
  36. package/lib/__templates__/vite/package.json +3 -1
  37. package/lib/__templates__/vite/scripts/validate.sh +10 -0
  38. package/lib/cli.js +17 -6
  39. package/package.json +1 -1
  40. package/lib/__templates__/pi-agent/pi-resources/skills/coze-asr/scripts/asr.mjs +0 -9
  41. package/lib/__templates__/pi-agent/pi-resources/skills/coze-image-gen/scripts/gen.mjs +0 -9
  42. package/lib/__templates__/pi-agent/pi-resources/skills/coze-tts/scripts/tts.mjs +0 -9
  43. package/lib/__templates__/pi-agent/pi-resources/skills/coze-video-gen/scripts/gen.mjs +0 -9
  44. package/lib/__templates__/pi-agent/src/dashboard/api/docs.ts +0 -204
  45. package/lib/__templates__/pi-agent/src/dashboard/web/src/pages/channels-page.tsx +0 -188
  46. package/lib/__templates__/pi-agent/src/dashboard/web/src/pages/docs-page.tsx +0 -65
  47. package/lib/__templates__/pi-agent/src/dashboard/web/src/pages/models-page.tsx +0 -122
  48. package/lib/__templates__/pi-agent/tests/dashboard-docs-api.test.ts +0 -125
@@ -5,6 +5,7 @@ requires = ["nodejs-24"]
5
5
  [dev]
6
6
  build = ["bash", ".cozeproj/scripts/dev_build.sh"]
7
7
  run = ["bash", ".cozeproj/scripts/dev_run.sh"]
8
+ validate = ["bash", ".cozeproj/scripts/validate.sh"]
8
9
 
9
10
  [deploy]
10
11
  build = ["bash", ".cozeproj/scripts/prod_build.sh"]
@@ -0,0 +1,8 @@
1
+ #!/bin/bash
2
+ set -Eeuo pipefail
3
+
4
+ cd "${COZE_WORKSPACE_PATH:-$(pwd)}"
5
+
6
+ echo "🔍 Running validate..."
7
+ pnpm validate
8
+ echo "✅ Validate passed!"
@@ -9,7 +9,8 @@
9
9
  "preinstall": "npx only-allow pnpm",
10
10
  "lint:client": "npm run lint --prefix ./client",
11
11
  "lint:server": "npm run lint --prefix ./server",
12
- "lint:all": "npm run lint --prefix ./client; npm run lint --prefix ./server"
12
+ "lint:all": "npm run lint --prefix ./client; npm run lint --prefix ./server",
13
+ "validate": "pnpm run --parallel '/^(lint:client|lint:server)$/'"
13
14
  },
14
15
  "dependencies": {},
15
16
  "devDependencies": {},
@@ -4,6 +4,7 @@ requires = ["nodejs-24"]
4
4
  [dev]
5
5
  build = ["bash", "./scripts/prepare.sh"]
6
6
  run = ["bash", "./scripts/dev.sh"]
7
+ validate = ["bash", "./scripts/validate.sh"]
7
8
  deps = ["git"] # -> apt install git
8
9
 
9
10
  [deploy]
@@ -7,8 +7,10 @@
7
7
  "dev": "bash ./scripts/dev.sh",
8
8
  "preinstall": "npx only-allow pnpm",
9
9
  "lint": "eslint",
10
+ "lint:build": "eslint . --quiet",
10
11
  "start": "bash ./scripts/start.sh",
11
- "ts-check": "tsc -p tsconfig.json"
12
+ "ts-check": "tsc -p tsconfig.json",
13
+ "validate": "pnpm run --parallel '/^(ts-check|lint:build)$/'"
12
14
  },
13
15
  "dependencies": {
14
16
  "@aws-sdk/client-s3": "^3.958.0",
@@ -0,0 +1,10 @@
1
+ #!/bin/bash
2
+ set -Eeuo pipefail
3
+
4
+ COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
5
+
6
+ cd "${COZE_WORKSPACE_PATH}"
7
+
8
+ echo "🔍 Running validate..."
9
+ pnpm validate
10
+ echo "✅ Validate passed!"
@@ -4,6 +4,7 @@ requires = ["nodejs-24"]
4
4
  [dev]
5
5
  build = ["bash", "./scripts/prepare.sh"]
6
6
  run = ["bash", "./scripts/dev.sh"]
7
+ validate = ["bash", "./scripts/validate.sh"]
7
8
  deps = ["git"] # -> apt install git
8
9
 
9
10
  [deploy]
@@ -1,3 +1,9 @@
1
+ <script setup lang="ts">
2
+ // 显式声明多词组件名,否则 index.vue 会命中 vue/multi-word-component-names,导致 lint 报错。
3
+ defineOptions({
4
+ name: 'LandingPage',
5
+ });
6
+ </script>
1
7
  <template>
2
8
  <div class="flex min-h-screen items-center justify-center">
3
9
  <main class="flex w-full max-w-3xl flex-col items-center justify-center px-16 py-32">
@@ -0,0 +1,25 @@
1
+ import eslint from '@eslint/js';
2
+ import tseslint from 'typescript-eslint';
3
+ import pluginVue from 'eslint-plugin-vue';
4
+ import { defineConfig, globalIgnores } from 'eslint/config';
5
+
6
+ export default defineConfig([
7
+ eslint.configs.recommended,
8
+ ...tseslint.configs.recommended,
9
+ ...pluginVue.configs['flat/recommended'],
10
+ {
11
+ files: ['**/*.vue'],
12
+ languageOptions: {
13
+ parserOptions: {
14
+ parser: tseslint.parser,
15
+ },
16
+ },
17
+ },
18
+ globalIgnores([
19
+ '.nuxt/**',
20
+ '.output/**',
21
+ 'dist/**',
22
+ 'node_modules/**',
23
+ 'scripts/**',
24
+ ]),
25
+ ]);
@@ -9,7 +9,8 @@ export default defineNuxtConfig({
9
9
  compatibilityDate: '2025-07-15',
10
10
  // Disable devtools in CI/test environments (prevents hanging in headless mode)
11
11
  devtools: {
12
- enabled: process.env.CI !== 'true' && process.env.COZE_PROJECT_ENV !== 'PROD',
12
+ enabled:
13
+ process.env.CI !== 'true' && process.env.COZE_PROJECT_ENV !== 'PROD',
13
14
  },
14
15
  telemetry: false,
15
16
 
@@ -79,7 +80,6 @@ export default defineNuxtConfig({
79
80
  // Vite configuration (similar to Next.js allowedDevOrigins)
80
81
  vite: {
81
82
  server: {
82
- host: '0.0.0.0',
83
83
  cors: {
84
84
  origin: ['*.dev.coze.site'],
85
85
  credentials: true,
@@ -8,8 +8,12 @@
8
8
  "dev": "bash ./scripts/dev.sh",
9
9
  "generate": "nuxt generate",
10
10
  "preinstall": "npx only-allow pnpm",
11
+ "lint": "eslint .",
12
+ "lint:build": "eslint . --quiet",
11
13
  "preview": "nuxt preview",
12
- "start": "bash ./scripts/start.sh"
14
+ "start": "bash ./scripts/start.sh",
15
+ "ts-check": "nuxi typecheck",
16
+ "validate": "pnpm run --parallel '/^(ts-check|lint:build)$/'"
13
17
  },
14
18
  "dependencies": {
15
19
  "@nuxt/image": "^1.8.1",
@@ -23,10 +27,13 @@
23
27
  "@types/node": "^20",
24
28
  "autoprefixer": "^10.4.20",
25
29
  "coze-coding-dev-sdk": "^0.7.16",
30
+ "eslint": "^9",
31
+ "eslint-plugin-vue": "^10",
26
32
  "only-allow": "^1.2.2",
27
33
  "postcss": "^8.4.49",
28
34
  "tailwindcss": "^3.4.17",
29
- "typescript": "^5"
35
+ "typescript": "^5",
36
+ "typescript-eslint": "^8"
30
37
  },
31
38
  "packageManager": "pnpm@9.0.0",
32
39
  "engines": {