mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-22 16:35:20 +08:00
feat(pipeline-migration): relax legacy config migration and pin latest runner plugins
- Coerce/default/drop invalid or unknown legacy fields with warnings instead of blocking - Never block on LocalAgent model; prune dangling KB/tool/MCP references - Mark custom (non-builtin) 4.10 runners as unsupported_runner instead of failing - Pin runner plugins to current marketplace versions (0.2.x); fall back to latest when a pin is withdrawn - Raise plugin install/upgrade timeout to 600s for slow dependency installs - Assistant configure_pipeline writes the 4.11 runner shape Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -147,7 +147,15 @@ export default function PipelineMigration({
|
||||
['migrated', 'already_current'].includes(item.state),
|
||||
);
|
||||
const rows = preview?.items ?? [];
|
||||
// Custom 4.10 runners cannot be migrated automatically; they are listed
|
||||
// for attention but never submitted.
|
||||
const count = rows.filter(
|
||||
(item) =>
|
||||
!['already_current', 'not_legacy', 'unsupported_runner'].includes(
|
||||
item.state,
|
||||
),
|
||||
).length;
|
||||
const attention = rows.filter(
|
||||
(item) => !['already_current', 'not_legacy'].includes(item.state),
|
||||
).length;
|
||||
|
||||
@@ -189,7 +197,10 @@ export default function PipelineMigration({
|
||||
)
|
||||
return;
|
||||
let items = rows.filter(
|
||||
(item) => !['already_current', 'not_legacy'].includes(item.state),
|
||||
(item) =>
|
||||
!['already_current', 'not_legacy', 'unsupported_runner'].includes(
|
||||
item.state,
|
||||
),
|
||||
);
|
||||
setInstallations([]);
|
||||
setDataOnly(!installPlugins);
|
||||
@@ -340,12 +351,12 @@ export default function PipelineMigration({
|
||||
|
||||
return (
|
||||
<>
|
||||
{(count > 0 || results.length > 0) && (
|
||||
{(attention > 0 || results.length > 0) && (
|
||||
<Alert className="mb-4 shrink-0 border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-200">
|
||||
<AlertTriangle aria-hidden="true" />
|
||||
<AlertTitle>{t('pipelineMigration.title')}</AlertTitle>
|
||||
<AlertDescription className="flex items-center justify-between gap-3 text-amber-800 dark:text-amber-200">
|
||||
<span>{t('pipelineMigration.detected', { count })}</span>
|
||||
<span>{t('pipelineMigration.detected', { count: attention })}</span>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
@@ -404,7 +415,7 @@ export default function PipelineMigration({
|
||||
</div>
|
||||
) : (
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{t('pipelineMigration.detected', { count })}
|
||||
{t('pipelineMigration.detected', { count: attention })}
|
||||
</p>
|
||||
)}
|
||||
<MigrationInstallProgress installations={installations} />
|
||||
@@ -417,7 +428,7 @@ export default function PipelineMigration({
|
||||
})}
|
||||
</p>
|
||||
)}
|
||||
{(count > 0 || results.length > 0) && (
|
||||
{(attention > 0 || results.length > 0) && (
|
||||
<Collapsible>
|
||||
<CollapsibleTrigger asChild>
|
||||
<Button
|
||||
@@ -470,6 +481,11 @@ export default function PipelineMigration({
|
||||
{item.target_plugin.name}
|
||||
</p>
|
||||
)}
|
||||
{item.state === 'unsupported_runner' && (
|
||||
<p className="text-xs text-destructive break-words">
|
||||
{t('pipelineMigration.notices.customRunner')}
|
||||
</p>
|
||||
)}
|
||||
{item.warnings.some(
|
||||
(issue) =>
|
||||
issue.code === 'local.box_state_reset',
|
||||
|
||||
@@ -31,6 +31,21 @@ const issueKeys: Record<string, string> = {
|
||||
runner_schema_incompatible: 'schemaChanged',
|
||||
plugin_version_incompatible: 'pluginVersion',
|
||||
'runtime.pending_interaction': 'pendingInteraction',
|
||||
'legacy.custom_runner_unsupported': 'customRunner',
|
||||
'migration.unknown_field_dropped': 'fieldDropped',
|
||||
'migration.unknown_section_archived': 'fieldDropped',
|
||||
'migration.value_coerced': 'valueRepaired',
|
||||
'migration.invalid_value_defaulted': 'valueRepaired',
|
||||
'migration.missing_default_filled': 'valueRepaired',
|
||||
'migration.alias_conflict_resolved': 'aliasRepaired',
|
||||
'local.prompt_normalized': 'valueRepaired',
|
||||
'local.reasoning_dropped': 'valueRepaired',
|
||||
'local.box_template_defaulted': 'valueRepaired',
|
||||
'langflow.tweaks_invalid_defaulted': 'valueRepaired',
|
||||
'migration.mixed_runner_selection': 'mixedRunner',
|
||||
'migration.runner_config_replaced': 'runnerConfigReplaced',
|
||||
'extensions.runner_added': 'runnerAdded',
|
||||
invalid_extension_preferences: 'extensionPrefs',
|
||||
};
|
||||
|
||||
/** Only locally reviewed codes may select localized copy. */
|
||||
|
||||
@@ -4,6 +4,7 @@ export type PipelineMigrationState =
|
||||
| 'blocked'
|
||||
| 'already_current'
|
||||
| 'not_legacy'
|
||||
| 'unsupported_runner'
|
||||
| 'activation_pending';
|
||||
|
||||
export interface PipelineMigrationIssue {
|
||||
|
||||
@@ -37,6 +37,19 @@ export default {
|
||||
'After checking the runtime, refresh, select this pipeline and confirm to retry activation only. Its saved configuration will not be migrated again.',
|
||||
details: 'Migration details',
|
||||
notices: {
|
||||
customRunner:
|
||||
'Legacy custom runners must be rewritten as plugin runners before they can be bound. See the plugin docs: https://langbot.app/docs/en/plugin/dev/tutor',
|
||||
fieldDropped:
|
||||
'Unrecognized legacy fields or sections were removed from the active config; the original values are kept in the migration backup.',
|
||||
valueRepaired:
|
||||
'Malformed or missing values were repaired with the 4.10 defaults. Review them after migration.',
|
||||
mixedRunner:
|
||||
'Both a new and a legacy runner selection exist; the usable one was kept.',
|
||||
runnerConfigReplaced:
|
||||
'The existing new-style runner config is replaced by the migration result; the original is kept in the backup.',
|
||||
runnerAdded:
|
||||
'The required runner plugin was added to the extension list of this pipeline.',
|
||||
extensionPrefs: 'Invalid entries in the extension settings were ignored.',
|
||||
runtimeUnavailable:
|
||||
'The plugin runtime is disconnected. Restore the connection and retry, or migrate data only.',
|
||||
executionFailed: 'Migration failed. Check the server logs and retry.',
|
||||
@@ -119,6 +132,7 @@ export default {
|
||||
blocked: 'Blocked',
|
||||
already_current: 'Already current',
|
||||
not_legacy: 'Not legacy',
|
||||
unsupported_runner: 'Unsupported runner',
|
||||
activation_pending: 'Activation pending',
|
||||
pending: 'Pending',
|
||||
migrated: 'Migrated',
|
||||
|
||||
@@ -36,6 +36,20 @@ export default {
|
||||
'Tras comprobar el entorno, actualiza, selecciona esta canalización y confirma para reintentar solo la activación. No se volverá a migrar la configuración guardada.',
|
||||
details: 'Detalles de migración',
|
||||
notices: {
|
||||
customRunner:
|
||||
'Los runners personalizados antiguos deben reescribirse como runners de plugin antes de vincularlos. Consulta la documentación de plugins: https://langbot.app/docs/en/plugin/dev/tutor',
|
||||
fieldDropped:
|
||||
'Los campos o secciones antiguos no reconocidos se eliminaron de la configuración activa; los valores originales se conservan en la copia de seguridad.',
|
||||
valueRepaired:
|
||||
'Los valores mal formados o ausentes se repararon con los valores predeterminados de 4.10. Revísalos tras la migración.',
|
||||
mixedRunner:
|
||||
'Existen una selección de runner nueva y otra antigua; se conservó la utilizable.',
|
||||
runnerConfigReplaced:
|
||||
'La configuración de runner nueva existente se reemplaza por el resultado de la migración; la original se conserva en la copia de seguridad.',
|
||||
runnerAdded:
|
||||
'Se añadió el plugin de runner necesario a la lista de extensiones de esta pipeline.',
|
||||
extensionPrefs:
|
||||
'Se ignoraron entradas no válidas de la configuración de extensiones.',
|
||||
runtimeUnavailable:
|
||||
'El entorno de plugins está desconectado. Restablece la conexión y reintenta, o migra solo los datos.',
|
||||
executionFailed:
|
||||
@@ -124,6 +138,7 @@ export default {
|
||||
blocked: 'Bloqueado',
|
||||
already_current: 'Ya actualizado',
|
||||
not_legacy: 'No es antiguo',
|
||||
unsupported_runner: 'Runner no compatible',
|
||||
activation_pending: 'Activación pendiente',
|
||||
pending: 'Pendiente',
|
||||
migrated: 'Migrado',
|
||||
|
||||
@@ -37,6 +37,19 @@ export default {
|
||||
'実行環境を確認して再読み込みし、このパイプラインを選択して確定すると、有効化のみを再試行します。保存済み設定は再移行しません。',
|
||||
details: '移行の詳細',
|
||||
notices: {
|
||||
customRunner:
|
||||
'旧形式のカスタム Runner は、プラグイン Runner として書き直してからバインドしてください。プラグイン開発ドキュメント:https://langbot.app/docs/ja/plugin/dev/tutor',
|
||||
fieldDropped:
|
||||
'認識できない旧フィールドやセクションは有効な設定から削除され、元の値は移行バックアップに保存されます。',
|
||||
valueRepaired:
|
||||
'不正または欠落した値は 4.10 の既定値で自動修復されました。移行後に確認してください。',
|
||||
mixedRunner:
|
||||
'新旧両方の Runner 指定があるため、利用可能な方を採用しました。',
|
||||
runnerConfigReplaced:
|
||||
'既存の新形式 Runner 設定は移行結果で置き換えられ、元の値はバックアップに保存されます。',
|
||||
runnerAdded:
|
||||
'必要な Runner プラグインをこのパイプラインの拡張リストに追加しました。',
|
||||
extensionPrefs: '拡張設定の無効な項目は無視されました。',
|
||||
runtimeUnavailable:
|
||||
'プラグインランタイムが未接続です。接続を復旧して再試行するか、データのみ移行してください。',
|
||||
executionFailed:
|
||||
@@ -119,6 +132,7 @@ export default {
|
||||
blocked: '移行不可',
|
||||
already_current: '移行済みの形式',
|
||||
not_legacy: '旧形式ではない',
|
||||
unsupported_runner: '非対応の Runner',
|
||||
activation_pending: '有効化待ち',
|
||||
pending: '待機中',
|
||||
migrated: '移行済み',
|
||||
|
||||
@@ -36,6 +36,19 @@ export default {
|
||||
'Проверьте среду выполнения, обновите список, выберите конвейер и подтвердите повторную активацию. Сохранённая конфигурация не будет мигрировать повторно.',
|
||||
details: 'Подробности переноса',
|
||||
notices: {
|
||||
customRunner:
|
||||
'Устаревшие пользовательские runner нужно переписать как runner-плагины перед привязкой. См. документацию по плагинам: https://langbot.app/docs/en/plugin/dev/tutor',
|
||||
fieldDropped:
|
||||
'Нераспознанные устаревшие поля или разделы удалены из активной конфигурации; исходные значения сохранены в резервной копии миграции.',
|
||||
valueRepaired:
|
||||
'Некорректные или отсутствующие значения исправлены на значения по умолчанию 4.10. Проверьте их после миграции.',
|
||||
mixedRunner: 'Указан и новый, и устаревший runner; оставлен пригодный.',
|
||||
runnerConfigReplaced:
|
||||
'Существующая конфигурация runner нового формата заменяется результатом миграции; исходная сохранена в резервной копии.',
|
||||
runnerAdded:
|
||||
'Нужный runner-плагин добавлен в список расширений этого конвейера.',
|
||||
extensionPrefs:
|
||||
'Недопустимые записи в настройках расширений проигнорированы.',
|
||||
runtimeUnavailable:
|
||||
'Среда плагинов отключена. Восстановите подключение и повторите попытку или перенесите только данные.',
|
||||
executionFailed:
|
||||
@@ -121,6 +134,7 @@ export default {
|
||||
blocked: 'Заблокирован',
|
||||
already_current: 'Уже актуален',
|
||||
not_legacy: 'Не устаревший',
|
||||
unsupported_runner: 'Неподдерживаемый runner',
|
||||
activation_pending: 'Ожидает активации',
|
||||
pending: 'Ожидает',
|
||||
migrated: 'Перенесён',
|
||||
|
||||
@@ -36,6 +36,19 @@ export default {
|
||||
'หลังตรวจสอบสภาพแวดล้อมการทำงาน ให้รีเฟรช เลือกไปป์ไลน์นี้และยืนยันเพื่อลองเปิดใช้งานอีกครั้งเท่านั้น การตั้งค่าที่บันทึกไว้จะไม่ถูกย้ายซ้ำ',
|
||||
details: 'รายละเอียดการย้าย',
|
||||
notices: {
|
||||
customRunner:
|
||||
'Runner แบบกำหนดเองรุ่นเก่าต้องเขียนใหม่เป็น Runner แบบปลั๊กอินก่อนจึงจะผูกได้ ดูเอกสารปลั๊กอิน: https://langbot.app/docs/en/plugin/dev/tutor',
|
||||
fieldDropped:
|
||||
'ฟิลด์หรือส่วนเก่าที่ไม่รู้จักถูกนำออกจากการตั้งค่าที่ใช้งาน ค่าเดิมถูกเก็บไว้ในข้อมูลสำรองการย้าย',
|
||||
valueRepaired:
|
||||
'ค่าที่ผิดรูปแบบหรือขาดหายถูกซ่อมด้วยค่าเริ่มต้นของ 4.10 โปรดตรวจสอบหลังการย้าย',
|
||||
mixedRunner:
|
||||
'มีการเลือก Runner ทั้งแบบใหม่และแบบเก่า ระบบเลือกอันที่ใช้งานได้',
|
||||
runnerConfigReplaced:
|
||||
'การตั้งค่า Runner แบบใหม่ที่มีอยู่จะถูกแทนที่ด้วยผลการย้าย ค่าเดิมถูกเก็บไว้ในข้อมูลสำรอง',
|
||||
runnerAdded:
|
||||
'เพิ่มปลั๊กอิน Runner ที่จำเป็นลงในรายการส่วนขยายของไปป์ไลน์นี้แล้ว',
|
||||
extensionPrefs: 'รายการที่ไม่ถูกต้องในการตั้งค่าส่วนขยายถูกละเว้น',
|
||||
runtimeUnavailable:
|
||||
'ไม่ได้เชื่อมต่อรันไทม์ปลั๊กอิน โปรดเชื่อมต่อใหม่แล้วลองอีกครั้ง หรือย้ายเฉพาะข้อมูล',
|
||||
executionFailed:
|
||||
@@ -115,6 +128,7 @@ export default {
|
||||
blocked: 'ถูกบล็อก',
|
||||
already_current: 'เป็นรุ่นใหม่แล้ว',
|
||||
not_legacy: 'ไม่ใช่รุ่นเก่า',
|
||||
unsupported_runner: 'Runner ที่ไม่รองรับ',
|
||||
activation_pending: 'รอเปิดใช้งาน',
|
||||
pending: 'รอดำเนินการ',
|
||||
migrated: 'ย้ายแล้ว',
|
||||
|
||||
@@ -36,6 +36,18 @@ export default {
|
||||
'Sau khi kiểm tra môi trường chạy, làm mới, chọn pipeline này và xác nhận để chỉ thử kích hoạt lại. Cấu hình đã lưu sẽ không được di chuyển lần nữa.',
|
||||
details: 'Chi tiết chuyển đổi',
|
||||
notices: {
|
||||
customRunner:
|
||||
'Runner tùy chỉnh kiểu cũ cần được viết lại thành runner dạng plugin trước khi liên kết. Xem tài liệu plugin: https://langbot.app/docs/en/plugin/dev/tutor',
|
||||
fieldDropped:
|
||||
'Các trường hoặc mục cũ không nhận dạng được đã bị loại khỏi cấu hình đang dùng; giá trị gốc được lưu trong bản sao lưu di chuyển.',
|
||||
valueRepaired:
|
||||
'Các giá trị sai định dạng hoặc thiếu đã được sửa bằng giá trị mặc định của 4.10. Hãy kiểm tra sau khi di chuyển.',
|
||||
mixedRunner: 'Có cả lựa chọn runner mới và cũ; đã giữ lựa chọn dùng được.',
|
||||
runnerConfigReplaced:
|
||||
'Cấu hình runner kiểu mới hiện có được thay bằng kết quả di chuyển; bản gốc được lưu trong bản sao lưu.',
|
||||
runnerAdded:
|
||||
'Đã thêm plugin runner cần thiết vào danh sách tiện ích của pipeline này.',
|
||||
extensionPrefs: 'Các mục không hợp lệ trong cài đặt tiện ích đã bị bỏ qua.',
|
||||
runtimeUnavailable:
|
||||
'Môi trường chạy plugin bị ngắt kết nối. Khôi phục kết nối rồi thử lại, hoặc chỉ di chuyển dữ liệu.',
|
||||
executionFailed:
|
||||
@@ -118,6 +130,7 @@ export default {
|
||||
blocked: 'Bị chặn',
|
||||
already_current: 'Đã cập nhật',
|
||||
not_legacy: 'Không phải bản cũ',
|
||||
unsupported_runner: 'Runner không được hỗ trợ',
|
||||
activation_pending: 'Chờ kích hoạt',
|
||||
pending: 'Đang chờ',
|
||||
migrated: 'Đã di chuyển',
|
||||
|
||||
@@ -31,6 +31,17 @@ export default {
|
||||
'检查运行环境后刷新,选中此流水线并确认,即可仅重试激活,不会再次迁移已保存的配置。',
|
||||
details: '迁移详情',
|
||||
notices: {
|
||||
customRunner:
|
||||
'旧版自定义 Runner 需要改写为插件 Runner 后再绑定。参见插件开发文档:https://langbot.app/docs/zh/plugin/dev/tutor',
|
||||
fieldDropped:
|
||||
'未识别的旧字段或配置段已从活动配置中移除,原值保存在迁移备份中。',
|
||||
valueRepaired:
|
||||
'格式不正确或缺失的值已按 4.10 默认值自动修复,请在迁移后检查。',
|
||||
mixedRunner: '同时存在新旧 Runner 选择,已采用可用的那一项。',
|
||||
runnerConfigReplaced:
|
||||
'已有的新版 Runner 配置会被迁移结果替换,原值保存在迁移备份中。',
|
||||
runnerAdded: '已将所需 Runner 插件加入此流水线的扩展列表。',
|
||||
extensionPrefs: '扩展设置中有无效项,已忽略。',
|
||||
runtimeUnavailable:
|
||||
'插件运行时未连接,请恢复连接后重试,或选择仅迁移数据。',
|
||||
executionFailed: '迁移执行失败,请查看服务日志后重试。',
|
||||
@@ -96,6 +107,7 @@ export default {
|
||||
blocked: '已阻止',
|
||||
already_current: '已是新版',
|
||||
not_legacy: '非旧版',
|
||||
unsupported_runner: '不支持的 Runner',
|
||||
activation_pending: '等待激活',
|
||||
pending: '等待中',
|
||||
migrated: '已迁移',
|
||||
|
||||
@@ -32,6 +32,17 @@ export default {
|
||||
'檢查執行環境後重新整理,選取此流水線並確認,即可只重試啟用,不會再次遷移已儲存的設定。',
|
||||
details: '遷移詳情',
|
||||
notices: {
|
||||
customRunner:
|
||||
'舊版自訂 Runner 需要改寫為外掛 Runner 後再綁定。參見外掛開發文件:https://langbot.app/docs/zh/plugin/dev/tutor',
|
||||
fieldDropped:
|
||||
'未識別的舊欄位或設定段已從使用中設定移除,原值保存在遷移備份中。',
|
||||
valueRepaired:
|
||||
'格式不正確或缺少的值已依 4.10 預設值自動修復,請在遷移後檢查。',
|
||||
mixedRunner: '同時存在新舊 Runner 選擇,已採用可用的那一項。',
|
||||
runnerConfigReplaced:
|
||||
'既有的新版 Runner 設定會被遷移結果取代,原值保存在遷移備份中。',
|
||||
runnerAdded: '已將所需 Runner 外掛加入此流水線的擴充列表。',
|
||||
extensionPrefs: '擴充設定中有無效項目,已忽略。',
|
||||
runtimeUnavailable:
|
||||
'外掛執行環境未連線,請恢復連線後重試,或選擇僅遷移資料。',
|
||||
executionFailed: '遷移執行失敗,請查看服務日誌後重試。',
|
||||
@@ -97,6 +108,7 @@ export default {
|
||||
blocked: '已阻止',
|
||||
already_current: '已是新版',
|
||||
not_legacy: '非舊版',
|
||||
unsupported_runner: '不支援的 Runner',
|
||||
activation_pending: '等待啟用',
|
||||
pending: '等待中',
|
||||
migrated: '已遷移',
|
||||
|
||||
Reference in New Issue
Block a user