feat(task): replace built-in task adaptors with a sandboxed JS plugin system (#7076)

This commit is contained in:
Calcium-Ion
2026-08-29 18:51:57 +08:00
committed by GitHub
parent 7037ac15bd
commit eb48396d5f
336 changed files with 52333 additions and 6369 deletions
+23
View File
@@ -0,0 +1,23 @@
package dto
type TaskPluginError struct {
Code string `json:"code"`
Message string `json:"message"`
HTTPStatus int `json:"httpStatus"`
Retryable bool `json:"retryable"`
}
// TaskView is the only persisted-task shape exposed to JavaScript plugins.
// It deliberately excludes ownership, channel, quota, properties, and private
// upstream identifiers.
type TaskView struct {
TaskID string `json:"task_id"`
Platform string `json:"platform"`
Status string `json:"status"`
Progress string `json:"progress"`
FailReason string `json:"fail_reason"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at,omitempty"`
FinishedAt int64 `json:"finished_at,omitempty"`
Data any `json:"data,omitempty"`
}