feat(手动下载): 保存目录选项接口与下载前指定作品
- GET /download-save-paths:按下载器列出默认保存目录与路径映射的下载器侧目录,并给出「自动」会用的下载器(站点指定 > 默认 > 第一个)
- POST /acquisition-plans 新增 identity(本地作品或 TMDB 外部身份):转调 /source-releases/{id}/identity 建 / 绑作品并加人工锁,再按该作品下载
- 测试 harness 支持装配 agent 模块;pg 测试覆盖保存目录选项与指定身份下载
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
fb6c76875c
commit
4bb19433ad
7 files changed
+260
-6
No files matched your search
@@ -14,6 +14,7 @@ import { createLogger } from "../../src/logger.ts";
|
||||
import { type AoOverrides, createAcquisitionOrganizeModule } from "../../src/modules/acquisition-organize/index.ts";
|
||||
import type { AoDeps } from "../../src/modules/acquisition-organize/services/common.ts";
|
||||
import { createCapabilityRegistry } from "../../src/modules/agent/capability-registry.ts";
|
||||
import { createAgentModule } from "../../src/modules/agent/index.ts";
|
||||
import { createSourcesIdentityModule } from "../../src/modules/sources-identity/index.ts";
|
||||
import type { ServerContext } from "../../src/modules/types.ts";
|
||||
import { fakeEngine } from "../support/engine.ts";
|
||||
@@ -90,8 +91,8 @@ export interface Harness {
|
||||
export async function createHarness(
|
||||
name: string,
|
||||
overrides: AoOverrides = {},
|
||||
/** withSources:同时装配 sources-identity 模块(待处理中心路由等) */
|
||||
opts: { withSources?: boolean } = {},
|
||||
/** withSources:同时装配 sources-identity 模块(待处理中心路由等);withAgent:再装配 agent 模块(POST /acquisition-plans 等) */
|
||||
opts: { withSources?: boolean; withAgent?: boolean } = {},
|
||||
): Promise<Harness> {
|
||||
const ts = await createTestSchema(uniqueSchema(`ao_test_${name}`));
|
||||
const { db } = ts;
|
||||
@@ -161,7 +162,11 @@ export async function createHarness(
|
||||
role: "all",
|
||||
version: "test",
|
||||
db,
|
||||
modules: opts.withSources ? [module, createSourcesIdentityModule()] : [module],
|
||||
modules: [
|
||||
module,
|
||||
...(opts.withSources || opts.withAgent ? [createSourcesIdentityModule()] : []),
|
||||
...(opts.withAgent ? [createAgentModule()] : []),
|
||||
],
|
||||
ctx,
|
||||
apiKeyStore: {
|
||||
async findByHash(hash) {
|
||||
|
||||
Reference in new issue
Block a user