fix: 接入 dsflash-go model catalog
This commit is contained in:
@@ -47,7 +47,7 @@ P0 最小 JSON 形态:
|
||||
|
||||
| credential 类别 | 装配归属 | 运行时投影 | 规则 |
|
||||
| --- | --- | --- | --- |
|
||||
| Provider credential | `ProfileRef` / `executionPolicy.secretScope.providerCredentials[]` | profile-scoped 只读 Secret projection,再复制到 per-run writable `CODEX_HOME` | 只服务 `codex`/`deepseek`/`minimax-m3` backend profile;缺失为 `secret-unavailable`,不得 fallback。 |
|
||||
| Provider credential | `ProfileRef` / `executionPolicy.secretScope.providerCredentials[]` | profile-scoped 只读 Secret projection,再复制到 per-run writable `CODEX_HOME` | 只服务 `codex`/`deepseek`/`minimax-m3`/`dsflash-go` backend profile;`dsflash-go` 额外包含 `model-catalog.json`;缺失为 `secret-unavailable`,不得 fallback。 |
|
||||
| Git resource credential | `ResourceBundleRef.credentialRef` | 只服务 resource materialization 的 Git fetch/checkout | 只能用于拉取 `ResourceBundleRef.repoUrl` 对应代码,不得暴露给 agent shell 作为通用 GitHub token。 |
|
||||
| Tool credential | `executionPolicy.secretScope.toolCredentials[]` | 由 runner 按 tool scope 投影为文件或 env,并只暴露给当前 run/command 允许的工具 | 用于 GitHub PR、issue、UniDesk SSH passthrough、artifact registry 等 agent shell 工具能力;不等同于 AgentRun integration,不触发 GitHub sink/OA/Event 之类外部动作记录。 |
|
||||
| Short-lived execution context | runner-job `transientEnv` | 单次 Job env,response/dry-run/event 只显示 name/hash | 只用于业务 dispatcher 生成的短期或 owner-scoped runtime context,例如 HWLAB HWPOD runtime API key、runtime URL 和非敏感服务地址;不得承载 provider credential、GitHub token、UniDesk SSH client token 或长期 SSH key。 |
|
||||
@@ -97,7 +97,7 @@ HWLAB v0.2 原有 Code Agent 已经验证了 profile、session、workspace 和 S
|
||||
|
||||
| HWLAB v0.2 基线能力 | HWLAB 参考入口 | RuntimeAssembly 承接字段 | 承接规则 |
|
||||
| --- | --- | --- | --- |
|
||||
| provider profile 可切换 | `internal/cloud/code-agent-contract.ts` | `ProfileRef.profile`、`ProfileRef.secretRef` | `deepseek`、`minimax-m3` 与 `codex` 只选择 profile/config/SecretRef,不复制 backend 协议;缺失 Secret 必须失败,不 fallback。 |
|
||||
| provider profile 可切换 | `internal/cloud/code-agent-contract.ts` | `ProfileRef.profile`、`ProfileRef.secretRef` | `deepseek`、`minimax-m3`、`dsflash-go` 与 `codex` 只选择 profile/config/SecretRef/model catalog,不复制 backend 协议;缺失 Secret 必须失败,不 fallback。 |
|
||||
| Codex app-server thread 复用 | `internal/cloud/codex-stdio-session.ts`、`internal/cloud/code-agent-session-registry.ts` | `SessionRef.sessionId`、`conversationId`、`threadId` | AgentRun 保存 backend thread/session 摘要;不保存 API KEY、`auth.json`、`config.toml` 或完整 `CODEX_HOME`。 |
|
||||
| 固定 `/workspace/hwlab` 代码上下文 | `internal/cloud/code-agent-contract.ts` | `ResourceBundleRef.repoUrl`、`ref` / `workspaceRef.branch`、materialized `commitId` | 用 Git-only repo/ref checkout 取代 HWLAB Pod 内固定路径;runner checkout 到隔离 workspace,并在 event/result 记录实际 commit。 |
|
||||
| writable `CODEX_HOME` 与 Secret 投影分离 | `docs/reference/code-agent-chat-readiness.md` | `ProfileRef` + runner runtime home | Secret 只读投影,复制到当前 run/profile writable runtime home;profile 间不共享。 |
|
||||
@@ -116,9 +116,10 @@ HWLAB Workbench 的 project/workspace 不属于 RuntimeAssembly 四要素,也
|
||||
|
||||
### ProfileRef
|
||||
|
||||
- `profile` 在 v0.1 只允许 `codex`、`deepseek` 或 `minimax-m3`。
|
||||
- `profile` 在 v0.1 只允许 `codex`、`deepseek`、`minimax-m3` 或 `dsflash-go`。
|
||||
- `secretRef` 只保存 Secret 名称和 key,不保存值。
|
||||
- 当前 profile 只能读取当前 profile 的 SecretRef;缺失必须 `secret-unavailable`,不能 fallback 到另一个 profile。
|
||||
- `dsflash-go` 的 `secretRef.keys` 必须包含 `auth.json`、`config.toml` 与 `model-catalog.json`;legacy 调用方漏传 `model-catalog.json` 时由 manager/runner 按 profile capability 归一补齐 projection,但不能降低运行时 readiness 校验。
|
||||
- profile Secret 只读投影,backend 需要可写目录时复制到 per-run/profile runtime home。
|
||||
|
||||
### SessionRef
|
||||
@@ -225,9 +226,10 @@ skill 只来自 gitbundle 复制进 workspace 的 `.agents/skills/<name>/SKILL.m
|
||||
- `codex` run 只挂载 `agentrun-v01-provider-codex`。
|
||||
- `deepseek` run 只挂载 `agentrun-v01-provider-deepseek`。
|
||||
- `minimax-m3` run 只挂载 `agentrun-v01-provider-minimax-m3`。
|
||||
- `codex -> deepseek -> minimax-m3 -> codex` 切换后,`CODEX_HOME`、SecretRef、backend_status 不互相污染。
|
||||
- 删除或缺失 `deepseek`/`minimax-m3` SecretRef 时必须 `secret-unavailable`,不能 fallback 到 `codex`。
|
||||
- 所有输出不得包含 Secret value、`auth.json` 或 `config.toml` 明文。
|
||||
- `dsflash-go` run 只挂载 `agentrun-v01-provider-dsflash-go`,并包含 `auth.json`、`config.toml` 与 `model-catalog.json`。
|
||||
- `codex -> deepseek -> minimax-m3 -> dsflash-go -> codex` 切换后,`CODEX_HOME`、SecretRef、backend_status、model catalog 不互相污染。
|
||||
- 删除或缺失 `deepseek`/`minimax-m3`/`dsflash-go` SecretRef 时必须 `secret-unavailable`,不能 fallback 到 `codex`。
|
||||
- 所有输出不得包含 Secret value、`auth.json`、`config.toml` 或 `model-catalog.json` 明文。
|
||||
|
||||
### A2b Tool credential 验收
|
||||
|
||||
@@ -268,7 +270,7 @@ skill 只来自 gitbundle 复制进 workspace 的 `.agents/skills/<name>/SKILL.m
|
||||
| 要素 | v0.1 状态 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| `BackendImageRef` | 部分实现 | CI/CD 已使用 digest-pinned runtime image;当前 runner/backend 仍复用 agentrun 镜像。 |
|
||||
| `ProfileRef` | 已实现/已通过 HWLAB v0.2 原入口复测 | `codex`、`deepseek` 与 `minimax-m3` 已通过 SecretRef、writable runtime home 和真实 stdio turn 验证;MiniMax-M3 已通过 HWLAB 显式 session 原入口复测,后续只允许作为 profile/config/SecretRef 选择,不新增直连 backend。 |
|
||||
| `ProfileRef` | 已实现/待 dsflash-go 真实主闭环 | `codex`、`deepseek` 与 `minimax-m3` 已通过 SecretRef、writable runtime home 和真实 stdio turn 验证;MiniMax-M3 已通过 HWLAB 显式 session 原入口复测。`dsflash-go` 已补齐 SecretRef/model catalog 装配、自测试和 legacy key 归一,仍需完成真实 runtime 与 HWLAB 原入口复测;后续只允许作为 profile/config/SecretRef/model catalog 选择,不新增直连 backend。 |
|
||||
| `SessionRef` | 已实现最小持久化 | manager 持久化 `sessionId/conversationId/threadId`,run 创建会解析既有 session,runner 按 threadId resume;session 不保存 credential 文件,TTL/GC 后续细化。 |
|
||||
| `SessionRef` | v0.1.1 已实现/已通过 HWLAB v0.2 原入口复测 | manager 持久化 `sessionId/conversationId/threadId` + 每个 session 绑 RWO PVC(`agentrun-v01-session-<sessionId>`),runner Job 把 PVC 直接挂到 `${CODEX_HOME}/<codex_rollout_subdir>`,codex app-server 自己落盘;runner pod 删除后 replacement runner 仍复用同一 SessionRef/PVC/thread,禁止 copy/restore、replacement threadId 和 fake resume。 |
|
||||
| `ResourceBundleRef` | 已实现 `kind="gitbundle"` materialization/promptRefs/tools/skillDirs 装配 | `repoUrl + ref/materialized commit + bundles[]` 已进入 run schema 和 runner checkout,workspace 受 `AGENTRUN_WORKSPACE_ROOT` 限制,event/result 记录 requested ref/commit、actual commit、tree/workspace/bundles 摘要;`tools/` PATH、`promptRefs` thread-start 注入和 `.agents/skills` 目录发现已实现。 |
|
||||
|
||||
Reference in New Issue
Block a user