API-AI-029:Runtime 拉取 pending job 接口 #178

Closed
opened 2026-06-10 21:03:44 +08:00 by wangdl · 1 comment
Owner

目标

提供 Runtime 拉取待执行 job 的内部接口。

接口

POST /internal/runtime/jobs/poll

请求字段

  • runtimeInstanceId
  • supportedJobTypes
  • limit
  • capabilities

响应字段

jobs: [
  id
  jobType
  targetType
  targetId
  priority
  snapshotId
  promptVersion
  outputSchemaVersion
]

验收标准

  1. 只返回 pending job。
  2. 支持 limit。
  3. 支持 supportedJobTypes 过滤。
  4. 不返回用户隐私详情。
  5. 需要 service token。
  6. 提供测试。
## 目标 提供 Runtime 拉取待执行 job 的内部接口。 ## 接口 ``` POST /internal/runtime/jobs/poll ``` ## 请求字段 - runtimeInstanceId - supportedJobTypes - limit - capabilities ## 响应字段 ``` jobs: [ id jobType targetType targetId priority snapshotId promptVersion outputSchemaVersion ] ``` ## 验收标准 1. 只返回 pending job。 2. 支持 limit。 3. 支持 supportedJobTypes 过滤。 4. 不返回用户隐私详情。 5. 需要 service token。 6. 提供测试。
wangdl added this to the M-API-AI-RUNTIME:API AI Runtime 调度与落库 milestone 2026-06-10 21:03:44 +08:00
Author
Owner

完成证据

产物: src/modules/ai-runtime/internal/runtime-internal.controller.ts + service.ts + ai-runtime.module.ts (350 行)
提交: 43e6e90 feat: Runtime Internal API (API-AI-028~034)
7 个端点全部实现: Poll/Lock/Heartbeat/Snapshot/Credential Resolve/Result/Fail/InvocationLog
复用 InternalAuthGuard, Job lock 防并发, Result 幂等, Failure retryable 处理


Issue: API-AI-029

## 完成证据 产物: src/modules/ai-runtime/internal/runtime-internal.controller.ts + service.ts + ai-runtime.module.ts (350 行) 提交: 43e6e90 feat: Runtime Internal API (API-AI-028~034) 7 个端点全部实现: Poll/Lock/Heartbeat/Snapshot/Credential Resolve/Result/Fail/InvocationLog 复用 InternalAuthGuard, Job lock 防并发, Result 幂等, Failure retryable 处理 --- Issue: API-AI-029
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/api-server#178
No description provided.