@coze-arch/cli 0.0.18 → 0.0.19-alpha.502ddf
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__/expo/.coze +1 -0
- package/lib/__templates__/expo/.cozeproj/scripts/validate.sh +8 -0
- package/lib/__templates__/expo/package.json +2 -1
- package/lib/__templates__/nextjs/.coze +1 -0
- package/lib/__templates__/nextjs/package.json +3 -1
- package/lib/__templates__/nextjs/scripts/validate.sh +10 -0
- package/lib/__templates__/nuxt-vue/.coze +1 -0
- package/lib/__templates__/nuxt-vue/app/pages/index.vue +6 -0
- package/lib/__templates__/nuxt-vue/eslint.config.mjs +25 -0
- package/lib/__templates__/nuxt-vue/nuxt.config.ts +2 -2
- package/lib/__templates__/nuxt-vue/package.json +9 -2
- package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +790 -10
- package/lib/__templates__/nuxt-vue/scripts/validate.sh +10 -0
- package/lib/__templates__/pi-agent/.coze +10 -0
- package/lib/__templates__/pi-agent/AGENTS.md +149 -0
- package/lib/__templates__/pi-agent/README.md +218 -0
- package/lib/__templates__/pi-agent/_gitignore +3 -0
- package/lib/__templates__/pi-agent/_npmrc +23 -0
- package/lib/__templates__/pi-agent/bin/pi-bot.ts +8 -0
- package/lib/__templates__/pi-agent/docs/project-overview.md +368 -0
- package/lib/__templates__/pi-agent/docs/user/getting-started.md +46 -0
- package/lib/__templates__/pi-agent/package.json +63 -0
- package/lib/__templates__/pi-agent/pi-resources/SYSTEM.md +15 -0
- package/lib/__templates__/pi-agent/pi-resources/extensions/preference-memory/index.ts +355 -0
- package/lib/__templates__/pi-agent/pi-resources/skills/coze-asr/SKILL.md +30 -0
- package/lib/__templates__/pi-agent/pi-resources/skills/coze-image-gen/SKILL.md +29 -0
- package/lib/__templates__/pi-agent/pi-resources/skills/coze-tts/SKILL.md +57 -0
- package/lib/__templates__/pi-agent/pi-resources/skills/coze-video-gen/SKILL.md +40 -0
- package/lib/__templates__/pi-agent/pnpm-lock.yaml +8282 -0
- package/lib/__templates__/pi-agent/scripts/dev.sh +14 -0
- package/lib/__templates__/pi-agent/scripts/prepare.sh +35 -0
- package/lib/__templates__/pi-agent/src/agent.ts +363 -0
- package/lib/__templates__/pi-agent/src/channels/feishu/index.ts +760 -0
- package/lib/__templates__/pi-agent/src/channels/feishu/streaming-card.ts +297 -0
- package/lib/__templates__/pi-agent/src/channels/wechat/index.ts +171 -0
- package/lib/__templates__/pi-agent/src/cli.ts +117 -0
- package/lib/__templates__/pi-agent/src/config.ts +749 -0
- package/lib/__templates__/pi-agent/src/core.ts +219 -0
- package/lib/__templates__/pi-agent/src/dashboard/api/channels.ts +104 -0
- package/lib/__templates__/pi-agent/src/dashboard/api/models.ts +98 -0
- package/lib/__templates__/pi-agent/src/dashboard/api/overview.ts +33 -0
- package/lib/__templates__/pi-agent/src/dashboard/config-store.ts +64 -0
- package/lib/__templates__/pi-agent/src/dashboard/index.ts +74 -0
- package/lib/__templates__/pi-agent/src/dashboard/server.ts +610 -0
- package/lib/__templates__/pi-agent/src/dashboard/types.ts +25 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/index.html +13 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/postcss.config.cjs +7 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/components/app-layout.tsx +172 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/components/page-title.tsx +17 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/components/ui/alert.tsx +22 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/components/ui/badge.tsx +25 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/components/ui/button.tsx +40 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/components/ui/card.tsx +29 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/components/ui/input.tsx +18 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/components/ui/label.tsx +8 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/components/ui/select.tsx +80 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/components/ui/separator.tsx +23 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/hooks/use-fetch.ts +32 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/hooks/use-local-storage-state.ts +23 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/main.tsx +24 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/pages/chat-page.tsx +440 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/pages/overview-page.tsx +330 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/services/chat-ws-service.ts +167 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/styles.css +203 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/src/utils/index.ts +11 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/tsconfig.json +13 -0
- package/lib/__templates__/pi-agent/src/dashboard/web/vite.config.ts +17 -0
- package/lib/__templates__/pi-agent/src/index.ts +123 -0
- package/lib/__templates__/pi-agent/src/pi-resources.ts +125 -0
- package/lib/__templates__/pi-agent/src/session-store.ts +223 -0
- package/lib/__templates__/pi-agent/src/tools/common/format-coze-error.ts +12 -0
- package/lib/__templates__/pi-agent/src/tools/index.ts +2 -0
- package/lib/__templates__/pi-agent/src/tools/web-fetch/index.ts +195 -0
- package/lib/__templates__/pi-agent/src/tools/web-search/index.ts +206 -0
- package/lib/__templates__/pi-agent/template.config.js +45 -0
- package/lib/__templates__/pi-agent/tests/cli.test.ts +136 -0
- package/lib/__templates__/pi-agent/tests/config.test.ts +377 -0
- package/lib/__templates__/pi-agent/tests/dashboard-models-api.test.ts +171 -0
- package/lib/__templates__/pi-agent/tests/feishu-channel.test.ts +149 -0
- package/lib/__templates__/pi-agent/tests/feishu-streaming-card.test.ts +15 -0
- package/lib/__templates__/pi-agent/tests/pi-resources.test.ts +73 -0
- package/lib/__templates__/pi-agent/tests/preference-memory.test.ts +43 -0
- package/lib/__templates__/pi-agent/tests/session-store.test.ts +61 -0
- package/lib/__templates__/pi-agent/tests/smoke/run-smoke.ts +275 -0
- package/lib/__templates__/pi-agent/tests/web-fetch.test.ts +157 -0
- package/lib/__templates__/pi-agent/tests/web-search.test.ts +208 -0
- package/lib/__templates__/pi-agent/tsconfig.json +21 -0
- package/lib/__templates__/pi-agent/types/larksuiteoapi-node-sdk.d.ts +113 -0
- package/lib/__templates__/taro/.coze +1 -0
- package/lib/__templates__/taro/.cozeproj/scripts/validate.sh +8 -0
- package/lib/__templates__/taro/package.json +1 -1
- package/lib/__templates__/templates.json +24 -0
- package/lib/__templates__/vite/.coze +1 -0
- package/lib/__templates__/vite/package.json +3 -1
- package/lib/__templates__/vite/scripts/validate.sh +10 -0
- package/lib/cli.js +13 -2
- package/package.json +1 -1
|
@@ -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": {},
|
|
@@ -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",
|
|
@@ -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:
|
|
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": {
|