mta-mcp 2.5.0 → 2.7.0
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/agents/flutter.agent.md +6 -7
- package/agents/i18n.agent.md +1 -0
- package/agents/logicflow.agent.md +1 -0
- package/agents/vue3.agent.md +1 -0
- package/dist/index.js +1118 -806
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/standards/frameworks/flutter-ui-system.md +1 -2
- package/standards/workflows/large-project-split.md +1 -1
- package/templates/README.md +144 -0
- package/templates/common/types/_CONFIG.md +12 -0
- package/templates/common/types/api.ts +39 -0
- package/templates/common/types/common.ts +70 -0
- package/templates/copilot-instructions-mcp-optimized.md +158 -0
- package/templates/vue/api-layer/_CONFIG.md +145 -0
- package/templates/vue/api-layer/index.ts +58 -0
- package/templates/vue/api-layer/mock/index.ts +122 -0
- package/templates/vue/api-layer/modules/_template.ts +109 -0
- package/templates/vue/api-layer/modules/index.ts +16 -0
- package/templates/vue/api-layer/request.ts +279 -0
- package/templates/vue/api-layer/types.ts +80 -0
- package/agents/vue3.agent.md.bak +0 -132
package/agents/vue3.agent.md.bak
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 'Vue 3 + TypeScript 通用开发代理'
|
|
3
|
-
tools: ['edit', 'runNotebooks', 'search', 'new', 'runCommands', 'runTasks', 'usages', 'vscodeAPI', 'problems', 'changes', 'testFailure', 'githubRepo', 'extensions', 'todos', 'runSubagent']
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Vue 3 + TypeScript 通用代理
|
|
7
|
-
|
|
8
|
-
**规范来源**: `prompts/vue/vue3-typescript.md`
|
|
9
|
-
|
|
10
|
-
## ⚠️ 强制工作流
|
|
11
|
-
|
|
12
|
-
**编写任何 Vue 3 代码前,必须先调用 MCP 工具加载规范:**
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
get_relevant_standards({ fileType: "vue" })
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
如果使用特定库,额外调用:
|
|
19
|
-
- Element Plus: `get_relevant_standards({ imports: ["element-plus"] })`
|
|
20
|
-
- Pinia: `get_relevant_standards({ imports: ["pinia"] })`
|
|
21
|
-
- Vue Router: `get_relevant_standards({ imports: ["vue-router"] })`
|
|
22
|
-
|
|
23
|
-
## 核心原则
|
|
24
|
-
|
|
25
|
-
1. **Composition API 优先** - `<script setup lang="ts">`
|
|
26
|
-
2. **类型安全** - 禁用 `any`
|
|
27
|
-
3. **响应式最佳实践** - 合理使用 ref/reactive
|
|
28
|
-
4. **组件解耦** - Props/Emits 类型明确
|
|
29
|
-
|
|
30
|
-
## 标准组件结构
|
|
31
|
-
|
|
32
|
-
```vue
|
|
33
|
-
<script setup lang="ts">
|
|
34
|
-
import { ref, computed, onMounted } from 'vue'
|
|
35
|
-
|
|
36
|
-
// Props 定义
|
|
37
|
-
interface Props {
|
|
38
|
-
modelValue: string
|
|
39
|
-
disabled?: boolean
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
43
|
-
disabled: false
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
// Emits 定义
|
|
47
|
-
interface Emits {
|
|
48
|
-
(e: 'update:modelValue', value: string): void
|
|
49
|
-
(e: 'change', value: string): void
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const emit = defineEmits<Emits>()
|
|
53
|
-
|
|
54
|
-
// 状态
|
|
55
|
-
const localValue = ref('')
|
|
56
|
-
|
|
57
|
-
// 计算属性
|
|
58
|
-
const displayValue = computed(() =>
|
|
59
|
-
localValue.value.toUpperCase()
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
// 方法
|
|
63
|
-
const handleChange = () => {
|
|
64
|
-
emit('update:modelValue', localValue.value)
|
|
65
|
-
emit('change', localValue.value)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// 生命周期
|
|
69
|
-
onMounted(() => {
|
|
70
|
-
localValue.value = props.modelValue
|
|
71
|
-
})
|
|
72
|
-
</script>
|
|
73
|
-
|
|
74
|
-
<template>
|
|
75
|
-
<div class="component">
|
|
76
|
-
<input
|
|
77
|
-
v-model="localValue"
|
|
78
|
-
:disabled="disabled"
|
|
79
|
-
@change="handleChange"
|
|
80
|
-
/>
|
|
81
|
-
</div>
|
|
82
|
-
</template>
|
|
83
|
-
|
|
84
|
-
<style scoped>
|
|
85
|
-
.component {
|
|
86
|
-
/* scoped 样式 */
|
|
87
|
-
}
|
|
88
|
-
</style>
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## 禁止模式
|
|
92
|
-
|
|
93
|
-
- ❌ `any` 类型
|
|
94
|
-
- ❌ Options API
|
|
95
|
-
- ❌ 不定义 Props/Emits 类型
|
|
96
|
-
- ❌ 直接修改 Props
|
|
97
|
-
- ❌ `<script>` 中使用 `this`
|
|
98
|
-
|
|
99
|
-
## 常用模式
|
|
100
|
-
|
|
101
|
-
### 表单处理
|
|
102
|
-
```typescript
|
|
103
|
-
const form = reactive({
|
|
104
|
-
name: '',
|
|
105
|
-
email: ''
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
const validate = () => {
|
|
109
|
-
if (!form.name.trim()) return false
|
|
110
|
-
return true
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### 异步数据
|
|
115
|
-
```typescript
|
|
116
|
-
const loading = ref(false)
|
|
117
|
-
const data = ref<DataType[]>([])
|
|
118
|
-
|
|
119
|
-
const fetchData = async () => {
|
|
120
|
-
try {
|
|
121
|
-
loading.value = true
|
|
122
|
-
const response = await api.getData()
|
|
123
|
-
data.value = response.data
|
|
124
|
-
} catch (err) {
|
|
125
|
-
console.error(err)
|
|
126
|
-
} finally {
|
|
127
|
-
loading.value = false
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
**完整规范**: `prompts/vue/vue3-typescript.md`
|