Skill站外收录 @skilllib/skill-2014279378148995073
lindy-upgrade-migration
提供 Lindy SDK 版本升级与代码迁移的全流程指导,涵盖版本检查、破坏性变更识别、依赖更新、代码适配、自动化测试及回滚机制,确保平滑过渡到新版本并维持功能稳定性。
效率工具 AI 技能
Skills.MD
# Lindy Upgrade & Migration
## Overview
Guide for safely upgrading Lindy SDK versions and migrating configurations.
## Prerequisites
- Current SDK version identified
- Changelog reviewed for target version
- Backup of current configuration
- Test environment available
## Instructions
### Step 1: Check Current Version
```bash
# Check installed version
npm list @lindy-ai/sdk
# Check latest available
npm view @lindy-ai/sdk version
# View changelog
npm view @lindy-ai/sdk changelog
```
### Step 2: Review Breaking Changes
```typescript
// Common breaking changes by version
// v1.x -> v2.x
// - Client initialization changed
// Before: new Lindy(apiKey)
// After: new Lindy({ apiKey })
// - Agent.run() signature changed
// Before: agent.run(input)
// After: lindy.agents.run(agentId, { input })
// - Events renamed
// Before: 'complete'
// After: 'completed'
```
### Step 3: Update Dependencies
```bash
# Update to latest
npm install @lindy-ai/sdk@latest
# Or specific version
npm install @lindy-ai/sdk@2.0.0
# Check for peer dependency warnings
npm ls @lindy-ai/sdk
```
### Step 4: Update Code
```typescript
// Migration script for v1 -> v2
// Old code (v1)
import Lindy from '@lindy-ai/sdk';
const client = new Lindy(process.env.LINDY_API_KEY);
const result = await client.runAgent('agt_123', 'Hello');
// New code (v2)
import { Lindy } from '@lindy-ai/sdk';
const client = new Lindy({ apiKey: process.env.LINDY_API_KEY });
const result = await client.agents.run('agt_123', { input: 'Hello' });
```
### Step 5: Run Migration Tests
```typescript
// tests/migration.test.ts
import { Lindy } from '@lindy-ai/sdk';
describe('SDK Migration', () => {
const lindy = new Lindy({ apiKey: process.env.LINDY_API_KEY });
test('client initialization works', async () => {
const user = await lindy.users.me();
expect(user.email).toBeDefined();
});
test('agent operations work', async () => {
const agents = await lindy.agents.list();
expect(Array.isArray(agents)).toBe(true);
});
test('run operations work', async () => {
const result = await lindy.agents.run('agt_test', {
input: 'Test migration',
});
expect(result.output).toBeDefined();
});
});
```
## Migration Checklist
```markdown
[ ] Backup current configuration
[ ] Review changelog for breaking changes
[ ] Update package.json
[ ] Run npm install
[ ] Update import statements
[ ] Update client initialization
[ ] Update method calls
[ ] Run test suite
[ ] Test in staging environment
[ ] Deploy to production
[ ] Monitor for issues
```
## Output
- Updated SDK to target version
- Migrated code patterns
- Passing test suite
- Documented changes
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Import error | Named exports changed | Check new import syntax |
| Type error | Interface changed | Update TypeScript types |
| Runtime error | Method signature changed | Check new API |
## Examples
### Automated Migration Script
```bash
#!/bin/bash
# migrate-lindy.sh
echo "Starting Lindy SDK migration..."
# Backup
cp package.json package.json.backup
cp -r src src.backup
# Update
npm install @lindy-ai/sdk@latest
# Run tests
npm test
if [ $? -eq 0 ]; then
echo "Migration successful!"
rm -rf src.backup package.json.backup
else
echo "Migration failed. Rolling back..."
mv package.json.backup package.json
rm -rf src && mv src.backup src
npm install
exit 1
fi
```
## Resources
- [Lindy Changelog](https://docs.lindy.ai/changelog)
- [Migration Guide](https://docs.lindy.ai/migration)
- [SDK Reference](https://docs.lindy.ai/sdk)
## Next Steps
Proceed to Pro tier skills for advanced features.
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「lindy-upgrade-migration」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次