@elizaos/cli 1.3.0 → 1.3.2
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/README.md +1 -1
- package/dist/{chunk-2CUIHNPL.js → chunk-5GUS4CFO.js} +7 -2
- package/dist/{chunk-2ALAPQLV.js → chunk-E6XYTE3A.js} +296 -311
- package/dist/chunk-GXWWPFBO.js +39 -0
- package/dist/{chunk-I77ZRNYO.js → chunk-T2QDIXGU.js} +2 -2
- package/dist/commands/agent/actions/index.d.ts +5 -0
- package/dist/commands/agent/actions/index.js +2 -2
- package/dist/commands/agent/index.d.ts +2 -2
- package/dist/commands/agent/index.js +2 -2
- package/dist/commands/create/actions/index.js +3 -3
- package/dist/commands/create/index.js +4 -4
- package/dist/commands/shared/index.d.ts +11 -28
- package/dist/commands/shared/index.js +7 -3
- package/dist/index.js +541 -450
- package/dist/{registry-N626N4VG.js → registry-433S5F3Y.js} +2 -2
- package/dist/templates/plugin-quick-starter/.gitignore +66 -0
- package/dist/templates/plugin-quick-starter/.npmignore +5 -0
- package/dist/templates/plugin-quick-starter/package.json +11 -3
- package/dist/templates/plugin-quick-starter/src/__tests__/plugin.test.ts +499 -146
- package/dist/templates/plugin-quick-starter/src/__tests__/test-utils.ts +316 -115
- package/dist/templates/plugin-quick-starter/src/plugin.ts +7 -13
- package/dist/templates/plugin-starter/.gitignore +66 -0
- package/dist/templates/plugin-starter/.npmignore +5 -0
- package/dist/templates/plugin-starter/README.md +1 -1
- package/dist/templates/plugin-starter/package.json +11 -3
- package/dist/templates/plugin-starter/src/__tests__/integration.test.ts +13 -13
- package/dist/templates/plugin-starter/src/__tests__/plugin.test.ts +556 -129
- package/dist/templates/plugin-starter/src/__tests__/test-utils.ts +347 -115
- package/dist/templates/plugin-starter/src/plugin.ts +18 -22
- package/dist/templates/project-starter/.gitignore +57 -0
- package/dist/templates/project-starter/.npmignore +11 -0
- package/dist/templates/project-starter/README.md +1 -1
- package/dist/templates/project-starter/package.json +4 -4
- package/dist/templates/project-starter/src/__tests__/env.test.ts +3 -1
- package/dist/templates/project-starter/src/__tests__/file-structure.test.ts +3 -2
- package/dist/templates/project-starter/src/__tests__/integration.test.ts +1 -1
- package/dist/templates/project-starter/tsup.config.ts +2 -1
- package/dist/templates/project-tee-starter/.dockerignore +64 -14
- package/dist/templates/project-tee-starter/.gitignore +57 -0
- package/dist/templates/project-tee-starter/.npmignore +6 -0
- package/dist/templates/project-tee-starter/Dockerfile +9 -5
- package/dist/templates/project-tee-starter/GUIDE.md +103 -42
- package/dist/templates/project-tee-starter/README.md +39 -19
- package/dist/templates/project-tee-starter/__tests__/build-order.test.ts +62 -0
- package/dist/templates/project-tee-starter/__tests__/character.test.ts +19 -17
- package/dist/templates/project-tee-starter/__tests__/config.test.ts +10 -3
- package/dist/templates/project-tee-starter/__tests__/env.test.ts +2 -1
- package/dist/templates/project-tee-starter/__tests__/file-structure.test.ts +14 -3
- package/dist/templates/project-tee-starter/__tests__/frontend.test.ts +459 -0
- package/dist/templates/project-tee-starter/__tests__/plugin.test.ts +4 -2
- package/dist/templates/project-tee-starter/__tests__/routes.test.ts +15 -6
- package/dist/templates/project-tee-starter/__tests__/tee-validation.test.ts +295 -0
- package/dist/templates/project-tee-starter/__tests__/vite-config-utils.ts +39 -0
- package/dist/templates/project-tee-starter/docker-compose.yaml +5 -2
- package/dist/templates/{plugin-starter/dist → project-tee-starter}/index.html +3 -3
- package/dist/templates/project-tee-starter/package.json +34 -14
- package/dist/templates/project-tee-starter/postcss.config.js +3 -0
- package/dist/templates/project-tee-starter/scripts/install-test-deps.js +52 -0
- package/dist/templates/project-tee-starter/scripts/test-all.sh +82 -0
- package/dist/templates/project-tee-starter/src/frontend/index.css +106 -0
- package/dist/templates/project-tee-starter/src/frontend/index.html +20 -0
- package/dist/templates/project-tee-starter/src/frontend/index.tsx +370 -0
- package/dist/templates/project-tee-starter/src/frontend/panels.tsx +17 -0
- package/dist/templates/project-tee-starter/src/frontend/utils.ts +6 -0
- package/dist/templates/project-tee-starter/src/index.ts +6 -6
- package/dist/templates/project-tee-starter/src/plugin.ts +209 -59
- package/dist/templates/project-tee-starter/tailwind.config.js +62 -0
- package/dist/templates/project-tee-starter/tsconfig.build.json +2 -2
- package/dist/templates/project-tee-starter/tsconfig.json +8 -5
- package/dist/templates/project-tee-starter/tsup.config.ts +3 -2
- package/dist/templates/project-tee-starter/vite.config.ts +39 -0
- package/dist/url-utils-CKc_Ebt_.d.ts +35 -0
- package/dist/{utils-H66532NB.js → utils-DBLSDYBF.js} +2 -2
- package/package.json +12 -7
- package/templates/plugin-quick-starter/.gitignore +66 -0
- package/templates/plugin-quick-starter/.npmignore +5 -0
- package/templates/plugin-quick-starter/package.json +11 -3
- package/templates/plugin-quick-starter/src/__tests__/plugin.test.ts +499 -146
- package/templates/plugin-quick-starter/src/__tests__/test-utils.ts +316 -115
- package/templates/plugin-quick-starter/src/plugin.ts +7 -13
- package/templates/plugin-starter/.gitignore +66 -0
- package/templates/plugin-starter/.npmignore +5 -0
- package/templates/plugin-starter/README.md +1 -1
- package/templates/plugin-starter/package.json +11 -3
- package/templates/plugin-starter/src/__tests__/integration.test.ts +13 -13
- package/templates/plugin-starter/src/__tests__/plugin.test.ts +556 -129
- package/templates/plugin-starter/src/__tests__/test-utils.ts +347 -115
- package/templates/plugin-starter/src/plugin.ts +18 -22
- package/templates/project-starter/.gitignore +57 -0
- package/templates/project-starter/.npmignore +11 -0
- package/templates/project-starter/README.md +1 -1
- package/templates/project-starter/package.json +4 -4
- package/templates/project-starter/src/__tests__/env.test.ts +3 -1
- package/templates/project-starter/src/__tests__/file-structure.test.ts +3 -2
- package/templates/project-starter/src/__tests__/integration.test.ts +1 -1
- package/templates/project-starter/tsup.config.ts +2 -1
- package/templates/project-tee-starter/.dockerignore +64 -14
- package/templates/project-tee-starter/.gitignore +57 -0
- package/templates/project-tee-starter/.npmignore +6 -0
- package/templates/project-tee-starter/Dockerfile +9 -5
- package/templates/project-tee-starter/GUIDE.md +103 -42
- package/templates/project-tee-starter/README.md +39 -19
- package/templates/project-tee-starter/__tests__/build-order.test.ts +62 -0
- package/templates/project-tee-starter/__tests__/character.test.ts +19 -17
- package/templates/project-tee-starter/__tests__/config.test.ts +10 -3
- package/templates/project-tee-starter/__tests__/env.test.ts +2 -1
- package/templates/project-tee-starter/__tests__/file-structure.test.ts +14 -3
- package/templates/project-tee-starter/__tests__/frontend.test.ts +459 -0
- package/templates/project-tee-starter/__tests__/plugin.test.ts +4 -2
- package/templates/project-tee-starter/__tests__/routes.test.ts +15 -6
- package/templates/project-tee-starter/__tests__/tee-validation.test.ts +295 -0
- package/templates/project-tee-starter/__tests__/vite-config-utils.ts +39 -0
- package/templates/project-tee-starter/docker-compose.yaml +5 -2
- package/templates/{plugin-starter/dist → project-tee-starter}/index.html +3 -3
- package/templates/project-tee-starter/package.json +34 -14
- package/templates/project-tee-starter/postcss.config.js +3 -0
- package/templates/project-tee-starter/scripts/install-test-deps.js +52 -0
- package/templates/project-tee-starter/scripts/test-all.sh +82 -0
- package/templates/project-tee-starter/src/frontend/index.css +106 -0
- package/templates/project-tee-starter/src/frontend/index.html +20 -0
- package/templates/project-tee-starter/src/frontend/index.tsx +370 -0
- package/templates/project-tee-starter/src/frontend/panels.tsx +17 -0
- package/templates/project-tee-starter/src/frontend/utils.ts +6 -0
- package/templates/project-tee-starter/src/index.ts +6 -6
- package/templates/project-tee-starter/src/plugin.ts +209 -59
- package/templates/project-tee-starter/tailwind.config.js +62 -0
- package/templates/project-tee-starter/tsconfig.build.json +2 -2
- package/templates/project-tee-starter/tsconfig.json +8 -5
- package/templates/project-tee-starter/tsup.config.ts +3 -2
- package/templates/project-tee-starter/vite.config.ts +39 -0
- package/dist/chunk-4O6EZU37.js +0 -14
- package/dist/migration-guides/advanced-migration-guide.md +0 -459
- package/dist/migration-guides/completion-requirements.md +0 -379
- package/dist/migration-guides/integrated-migration-loop.md +0 -392
- package/dist/migration-guides/migration-guide.md +0 -712
- package/dist/migration-guides/prompt-and-generation-guide.md +0 -702
- package/dist/migration-guides/state-and-providers-guide.md +0 -544
- package/dist/migration-guides/testing-guide.md +0 -1021
- package/dist/templates/plugin-starter/dist/assets/index-CgkejLs_.css +0 -1
- package/dist/templates/plugin-starter/dist/assets/index-D1cHX53P.js +0 -49
- package/dist/templates/plugin-starter/dist/index.js +0 -387
- package/dist/templates/plugin-starter/dist/index.js.map +0 -1
- package/templates/plugin-starter/dist/.vite/manifest.json +0 -11
- package/templates/plugin-starter/dist/assets/index-CgkejLs_.css +0 -1
- package/templates/plugin-starter/dist/assets/index-D1cHX53P.js +0 -49
- package/templates/plugin-starter/dist/index.d.ts +0 -14
- package/templates/plugin-starter/dist/index.js +0 -387
- package/templates/plugin-starter/dist/index.js.map +0 -1
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
# ElizaOS Plugin Migration - INTEGRATED EXECUTION PROTOCOL
|
|
2
|
-
|
|
3
|
-
## ⚠️ CRITICAL INSTRUCTIONS FOR CLAUDE CODE
|
|
4
|
-
|
|
5
|
-
**THIS IS A GATED PROCESS. YOU CANNOT SKIP STEPS.**
|
|
6
|
-
|
|
7
|
-
### YOUR REFERENCE GUIDES ARE IN:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
instruction-for-migration/
|
|
11
|
-
├── migration-guide.md # Basic migration steps
|
|
12
|
-
├── state-and-providers-guide.md # State & provider details
|
|
13
|
-
├── prompt-and-generation-guide.md # Template & generation migration
|
|
14
|
-
├── advanced-migration-guide.md # Services, settings, evaluators
|
|
15
|
-
├── testing-guide.md # Complete testing guide
|
|
16
|
-
└── completion-requirements.md # Final setup requirements
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
**YOU MUST REFERENCE THESE GUIDES AT EACH STEP**
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## EXECUTION PROTOCOL - GATE SYSTEM
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
GATE 0: Branch → GATE 1: Analysis → GATE 2: Setup → GATE 3: Build
|
|
27
|
-
→ GATE 4: TypeScript → GATE 5: Migration → GATE 6: Tests (95%+)
|
|
28
|
-
→ GATE 7: Final → GATE 8: Verification
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## GATE 0: CREATE 1.x BRANCH ✓
|
|
34
|
-
|
|
35
|
-
### Execute:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
git checkout -b 1.x
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Gate Check:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
git branch --show-current
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
**✓ MUST OUTPUT: `1.x`**
|
|
48
|
-
|
|
49
|
-
❌ **STOP** if not on 1.x branch
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## GATE 1: COMPLETE ANALYSIS ✓
|
|
54
|
-
|
|
55
|
-
### Reference:
|
|
56
|
-
|
|
57
|
-
- Check all sections from `migration-guide.md` Step 6-7
|
|
58
|
-
- Check `advanced-migration-guide.md` for services/evaluators
|
|
59
|
-
|
|
60
|
-
### Execute Analysis:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
# Identify plugin
|
|
64
|
-
cat package.json | grep -E '"name"|"version"'
|
|
65
|
-
|
|
66
|
-
# List all source files
|
|
67
|
-
find src -name "*.ts" -type f | sort
|
|
68
|
-
|
|
69
|
-
# Check for deprecated files
|
|
70
|
-
ls -la | grep -E "biome|vitest|\.lock"
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### REQUIRED OUTPUT - COMPLETE THIS:
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
=== PLUGIN MIGRATION ANALYSIS ===
|
|
77
|
-
Plugin: [name from package.json]
|
|
78
|
-
Version: [current version]
|
|
79
|
-
|
|
80
|
-
1. FILES TO DELETE (check migration-guide.md Step 2):
|
|
81
|
-
□ biome.json: [EXISTS/NOT FOUND]
|
|
82
|
-
□ vitest.config.ts: [EXISTS/NOT FOUND]
|
|
83
|
-
□ *.lock files: [list any found]
|
|
84
|
-
|
|
85
|
-
2. PACKAGE NAME (check migration-guide.md Step 3.1.5):
|
|
86
|
-
□ Current: [exact name]
|
|
87
|
-
□ Needs fix: [YES if @elizaos-plugins/ / NO]
|
|
88
|
-
|
|
89
|
-
3. ACTIONS (check migration-guide.md Step 6):
|
|
90
|
-
□ src/actions/[name].ts
|
|
91
|
-
- Purpose: [what it does]
|
|
92
|
-
- Uses composeContext: [YES/NO]
|
|
93
|
-
- Uses generateObject: [YES/NO]
|
|
94
|
-
- Uses ModelClass: [YES/NO]
|
|
95
|
-
- Has JSON templates: [YES/NO]
|
|
96
|
-
- Uses updateRecentMessageState: [YES/NO]
|
|
97
|
-
|
|
98
|
-
4. PROVIDERS (check migration-guide.md Step 7):
|
|
99
|
-
□ src/providers/[name].ts
|
|
100
|
-
- Has 'name' property: [YES/NO]
|
|
101
|
-
- Returns ProviderResult: [YES/NO]
|
|
102
|
-
- State parameter optional: [YES/NO]
|
|
103
|
-
|
|
104
|
-
5. EVALUATORS (check advanced-migration-guide.md):
|
|
105
|
-
□ [list any evaluators and issues]
|
|
106
|
-
|
|
107
|
-
6. SERVICES (check advanced-migration-guide.md):
|
|
108
|
-
□ [list any services with singleton pattern]
|
|
109
|
-
|
|
110
|
-
7. SETTINGS USAGE (check advanced-migration-guide.md):
|
|
111
|
-
□ Files importing 'settings': [list files]
|
|
112
|
-
|
|
113
|
-
8. EXISTING TESTS:
|
|
114
|
-
□ Test files: [list or "NONE"]
|
|
115
|
-
□ Framework: [vitest/bun/none]
|
|
116
|
-
=== END ANALYSIS ===
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
❌ **STOP** - Analysis must be 100% complete
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## GATE 2: INITIAL SETUP ✓
|
|
124
|
-
|
|
125
|
-
### Reference: Follow `migration-guide.md` Steps 1-5 EXACTLY
|
|
126
|
-
|
|
127
|
-
### 2.1 Clean Files (migration-guide.md Step 2)
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
rm -f biome.json vitest.config.ts
|
|
131
|
-
rm -f *.lock *.yml.lock
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### 2.2 Update package.json (migration-guide.md Step 3)
|
|
135
|
-
|
|
136
|
-
- **CRITICAL**: Check Step 3.1.5 for name fix
|
|
137
|
-
- Copy ALL sections from Step 3
|
|
138
|
-
- Don't forget `agentConfig` (Step 3.6)
|
|
139
|
-
|
|
140
|
-
### 2.3 TypeScript Config (migration-guide.md Step 4)
|
|
141
|
-
|
|
142
|
-
- Create tsconfig.json (Step 4.2)
|
|
143
|
-
- Create tsconfig.build.json (Step 4.3)
|
|
144
|
-
- Create tsup.config.ts (Step 4.1)
|
|
145
|
-
|
|
146
|
-
### 2.4 Build Test (migration-guide.md Step 5)
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
rm -rf dist node_modules .turbo
|
|
150
|
-
bun install
|
|
151
|
-
bun run build
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### Gate Check:
|
|
155
|
-
|
|
156
|
-
- [ ] Build completes
|
|
157
|
-
- [ ] dist/ folder exists
|
|
158
|
-
|
|
159
|
-
❌ **STOP** if build fails
|
|
160
|
-
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
## GATE 3: BUILD MUST PASS ✓
|
|
164
|
-
|
|
165
|
-
### Loop Until Build Passes:
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
while ! bun run build; do
|
|
169
|
-
echo "Build failed. Check errors above."
|
|
170
|
-
# Fix errors using migration-guide.md
|
|
171
|
-
# Common issues are in Step 6.1 (imports)
|
|
172
|
-
done
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## GATE 4: TYPESCRIPT MUST PASS ✓
|
|
178
|
-
|
|
179
|
-
### Reference: Check `advanced-migration-guide.md` for type issues
|
|
180
|
-
|
|
181
|
-
### Loop Until No Errors:
|
|
182
|
-
|
|
183
|
-
```bash
|
|
184
|
-
while ! bunx tsc --noEmit; do
|
|
185
|
-
echo "TypeScript errors found."
|
|
186
|
-
# Fix using appropriate guide:
|
|
187
|
-
# - State types: state-and-providers-guide.md
|
|
188
|
-
# - Action types: migration-guide.md Step 6
|
|
189
|
-
# - Provider types: migration-guide.md Step 7
|
|
190
|
-
done
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
❌ **STOP** - Do not proceed with TypeScript errors
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## GATE 5: CODE MIGRATION ✓
|
|
198
|
-
|
|
199
|
-
### For EACH File Identified in Analysis:
|
|
200
|
-
|
|
201
|
-
#### ACTIONS (Use migration-guide.md Step 6):
|
|
202
|
-
|
|
203
|
-
1. Update imports (Step 6.1)
|
|
204
|
-
2. Fix state handling (Step 6.2)
|
|
205
|
-
3. Replace composeContext (Step 6.3)
|
|
206
|
-
4. Convert templates to XML (Step 6.4)
|
|
207
|
-
5. Replace generateObject (Step 6.5)
|
|
208
|
-
6. Update handler pattern (Step 6.7)
|
|
209
|
-
|
|
210
|
-
**After EACH action file:**
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
|
-
bun run build # MUST PASS
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
#### PROVIDERS (Use migration-guide.md Step 7):
|
|
217
|
-
|
|
218
|
-
1. Add 'name' property (Step 7.3)
|
|
219
|
-
2. Update return type (Step 7.3)
|
|
220
|
-
3. Make state non-optional (Step 7.3)
|
|
221
|
-
|
|
222
|
-
**After EACH provider file:**
|
|
223
|
-
|
|
224
|
-
```bash
|
|
225
|
-
bun run build # MUST PASS
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
#### ADVANCED FEATURES:
|
|
229
|
-
|
|
230
|
-
- **Settings**: Use advanced-migration-guide.md Section "Settings Management"
|
|
231
|
-
- **Services**: Use advanced-migration-guide.md Section "Services & Clients Migration"
|
|
232
|
-
- **Evaluators**: Use advanced-migration-guide.md Section "Evaluators Migration"
|
|
233
|
-
|
|
234
|
-
#### SPECIAL CASES:
|
|
235
|
-
|
|
236
|
-
- **State Issues**: Check state-and-providers-guide.md
|
|
237
|
-
- **Prompt/Generation Issues**: Check prompt-and-generation-guide.md
|
|
238
|
-
|
|
239
|
-
---
|
|
240
|
-
|
|
241
|
-
## GATE 6: TESTS MUST REACH 95%+ ✓
|
|
242
|
-
|
|
243
|
-
### Reference: Use testing-guide.md COMPLETELY
|
|
244
|
-
|
|
245
|
-
### 6.1 Create Test Structure (testing-guide.md Section 1)
|
|
246
|
-
|
|
247
|
-
```bash
|
|
248
|
-
mkdir -p src/__tests__
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
### 6.2 Create test-utils.ts (testing-guide.md Section 2)
|
|
252
|
-
|
|
253
|
-
- Copy the ENTIRE test-utils.ts from the guide
|
|
254
|
-
- Don't skip any mock functions
|
|
255
|
-
|
|
256
|
-
### 6.3 Write Tests Following Examples:
|
|
257
|
-
|
|
258
|
-
- Actions: testing-guide.md Section 3
|
|
259
|
-
- Providers: testing-guide.md Section 4
|
|
260
|
-
- Evaluators: testing-guide.md Section 5
|
|
261
|
-
- Services: testing-guide.md Section 6
|
|
262
|
-
|
|
263
|
-
### 6.4 Coverage Loop:
|
|
264
|
-
|
|
265
|
-
```bash
|
|
266
|
-
# MUST LOOP UNTIL COVERAGE >= 95%
|
|
267
|
-
while true; do
|
|
268
|
-
bun test --coverage
|
|
269
|
-
# Check coverage percentage
|
|
270
|
-
# If < 95%, add more tests using testing-guide.md examples
|
|
271
|
-
# Common missing coverage:
|
|
272
|
-
# - Error cases (Section 8)
|
|
273
|
-
# - Edge cases (Section 9.4)
|
|
274
|
-
# - All branches (Section 9.7)
|
|
275
|
-
done
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
### Common Test Issues (testing-guide.md Section 10):
|
|
279
|
-
|
|
280
|
-
- Tests fail together: Add proper cleanup
|
|
281
|
-
- Mocks not called: Set before calling action
|
|
282
|
-
- Timeouts: Mock ALL async dependencies
|
|
283
|
-
|
|
284
|
-
❌ **STOP** - Must have 95%+ coverage
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
## GATE 7: FINAL SETUP ✓
|
|
289
|
-
|
|
290
|
-
### Reference: Follow completion-requirements.md EXACTLY
|
|
291
|
-
|
|
292
|
-
### 7.1 Create Required Files:
|
|
293
|
-
|
|
294
|
-
- .gitignore (Section 1)
|
|
295
|
-
- .npmignore (Section 2)
|
|
296
|
-
- LICENSE (Section 3) - COPY EXACTLY
|
|
297
|
-
- .prettierrc (Section 7) - COPY EXACTLY
|
|
298
|
-
|
|
299
|
-
### 7.2 GitHub Workflow (Section 6):
|
|
300
|
-
|
|
301
|
-
**CRITICAL**: Copy `.github/workflows/npm-deploy.yml` EXACTLY from the guide
|
|
302
|
-
|
|
303
|
-
### 7.3 Verify package.json (Section 4):
|
|
304
|
-
|
|
305
|
-
- Check ALL fields listed
|
|
306
|
-
- Ensure agentConfig is complete
|
|
307
|
-
|
|
308
|
-
### 7.4 Format Code:
|
|
309
|
-
|
|
310
|
-
```bash
|
|
311
|
-
bun run format
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
### 7.5 Update README:
|
|
315
|
-
|
|
316
|
-
- Replace all `pnpm`/`npm` with `bun`
|
|
317
|
-
|
|
318
|
-
---
|
|
319
|
-
|
|
320
|
-
## GATE 8: FINAL VERIFICATION ✓
|
|
321
|
-
|
|
322
|
-
### Clean Build Test:
|
|
323
|
-
|
|
324
|
-
```bash
|
|
325
|
-
rm -rf dist node_modules .turbo
|
|
326
|
-
bun install
|
|
327
|
-
bun run build
|
|
328
|
-
bunx tsc --noEmit
|
|
329
|
-
bun test --coverage
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
### All Must Pass:
|
|
333
|
-
|
|
334
|
-
- [ ] Build: 0 errors
|
|
335
|
-
- [ ] TypeScript: 0 errors
|
|
336
|
-
- [ ] Tests: All pass
|
|
337
|
-
- [ ] Coverage: ≥95%
|
|
338
|
-
|
|
339
|
-
---
|
|
340
|
-
|
|
341
|
-
## 🚨 WHEN STUCK - GUIDE REFERENCE
|
|
342
|
-
|
|
343
|
-
### Build/Setup Issues:
|
|
344
|
-
|
|
345
|
-
→ Check `migration-guide.md` Steps 1-5
|
|
346
|
-
|
|
347
|
-
### Action Migration Issues:
|
|
348
|
-
|
|
349
|
-
→ Check `migration-guide.md` Step 6
|
|
350
|
-
→ For state: `state-and-providers-guide.md`
|
|
351
|
-
→ For templates: `prompt-and-generation-guide.md`
|
|
352
|
-
|
|
353
|
-
### Provider Issues:
|
|
354
|
-
|
|
355
|
-
→ Check `migration-guide.md` Step 7
|
|
356
|
-
→ For details: `state-and-providers-guide.md` "Providers in v1"
|
|
357
|
-
|
|
358
|
-
### Service/Settings Issues:
|
|
359
|
-
|
|
360
|
-
→ Check `advanced-migration-guide.md`
|
|
361
|
-
|
|
362
|
-
### Test Issues:
|
|
363
|
-
|
|
364
|
-
→ Check `testing-guide.md` Section 10
|
|
365
|
-
→ For examples: Sections 3-7
|
|
366
|
-
|
|
367
|
-
### Final Setup:
|
|
368
|
-
|
|
369
|
-
→ Check `completion-requirements.md`
|
|
370
|
-
|
|
371
|
-
---
|
|
372
|
-
|
|
373
|
-
## ❌ DO NOT PROCEED IF:
|
|
374
|
-
|
|
375
|
-
1. **Build has errors** - Fix using guides
|
|
376
|
-
2. **TypeScript has errors** - Fix using guides
|
|
377
|
-
3. **Tests fail** - Fix using testing-guide.md
|
|
378
|
-
4. **Coverage < 95%** - Add tests using examples
|
|
379
|
-
5. **Any gate check fails** - Go back and complete
|
|
380
|
-
|
|
381
|
-
## ✅ MIGRATION COMPLETE WHEN:
|
|
382
|
-
|
|
383
|
-
```bash
|
|
384
|
-
git branch --show-current # Shows: 1.x
|
|
385
|
-
bun run build # 0 errors
|
|
386
|
-
bunx tsc --noEmit # 0 errors
|
|
387
|
-
bun test --coverage # All pass, ≥95%
|
|
388
|
-
ls -la dist/ # Has index.js & index.d.ts
|
|
389
|
-
cat .github/workflows/npm-deploy.yml # Exists
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
**ALL MUST SUCCEED**
|