/** * 运营中心 · 活动模块的契约(L1 活动清单 / L2 活动详情 / L3 实例详情;`docs/API文档-活动模块.md`)。 * * 只有 zod schema 与推导类型。两个概念(2026-08-25 用户定): * · **活动** = 装进来的活动包在运营面上的投影 —— 名称 / 分类 / 版本 / 模型来自清单, * 负责人 / 说明 / 图标 / 色相来自运营侧档案(`sys.activity_profile`,活动包本身不载这些); * · **实例** = 这个活动的一次运行(一张 task)—— 五态是对 task 运行态 / 终态的**如实映射**, * 不是第六套状态机(见 `INSTANCE_STATE_LABEL` 旁的口径)。 */ import { z } from 'zod'; /** 运营态:激活中 / 已禁用 —— 禁用只拦「新启动」,已完成与在途实例都不受影响(2026-08-27 用户定) */ export declare const ACTIVITY_STATUSES: readonly ["active", "disabled"]; export declare const activityStatusSchema: z.ZodEnum<{ active: "active"; disabled: "disabled"; }>; export type ActivityStatus = z.infer; export declare const ACTIVITY_STATUS_LABEL: Readonly>; /** 业务色相 —— 一卡一色;缺省由前端兜底(`blue`) */ export declare const ACTIVITY_HUES: readonly ["blue", "teal", "amber", "violet"]; export declare const activityHueSchema: z.ZodEnum<{ blue: "blue"; teal: "teal"; amber: "amber"; violet: "violet"; }>; export type ActivityHue = z.infer; /** 凡出人都是两段:展示用 name,筛选 / 提交用 id */ export declare const staffRefSchema: z.ZodObject<{ id: z.core.$ZodBranded; name: z.ZodString; }, z.core.$strip>; export type StaffRef = z.infer; export declare const activitySummarySchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; biz: z.ZodString; status: z.ZodEnum<{ active: "active"; disabled: "disabled"; }>; version: z.ZodString; owner: z.ZodNullable; name: z.ZodString; }, z.core.$strip>>; llm: z.ZodString; instanceCount: z.ZodNumber; createdAt: z.ZodString; ico: z.ZodOptional; hue: z.ZodOptional>; }, z.core.$strip>; export type ActivitySummary = z.infer; export declare const activityDetailSchema: z.ZodObject<{ name: z.ZodString; id: z.ZodString; version: z.ZodString; status: z.ZodEnum<{ active: "active"; disabled: "disabled"; }>; createdAt: z.ZodString; biz: z.ZodString; owner: z.ZodNullable; name: z.ZodString; }, z.core.$strip>>; llm: z.ZodString; ico: z.ZodOptional; hue: z.ZodOptional>; desc: z.ZodString; view: z.ZodNullable>; }, z.core.$strip>; export type ActivityDetail = z.infer; /** * 沙箱视图向父页报高的消息类型(postMessage 载荷 `{ type, height }`)。 * 视图模版本身**无脚本**(安装静态审拦着);报高脚本由服务端在出口那一刻注入。 */ export declare const ACTIVITY_VIEW_HEIGHT_MESSAGE = "jcai:view-height"; /** * 实例五态(2026-08-25 用户定),对 task 的如实映射: * pending 已建单、推进器还没领到(`used.steps = 0`) * running 在途(含等人回传 / 监听中 / 挂起 / 落地受阻) * completed 终态 released * rejected 验收被负责人打回、模型还没重新提交的那一段(重新提交后回 running) * failed 终态 blocked / stalled / exhausted,以及手动终止(靠 `reason.kind='terminated'` 区分) */ export declare const INSTANCE_STATES: readonly ["pending", "running", "completed", "rejected", "failed"]; export declare const instanceStateSchema: z.ZodEnum<{ running: "running"; completed: "completed"; pending: "pending"; failed: "failed"; rejected: "rejected"; }>; export type InstanceState = z.infer; export declare const INSTANCE_STATE_LABEL: Readonly>; export declare const instanceSummarySchema: z.ZodObject<{ id: z.ZodString; no: z.ZodString; state: z.ZodEnum<{ running: "running"; completed: "completed"; pending: "pending"; failed: "failed"; rejected: "rejected"; }>; owner: z.ZodObject<{ id: z.core.$ZodBranded; name: z.ZodString; }, z.core.$strip>; input: z.ZodString; output: z.ZodNullable; startedAt: z.ZodString; }, z.core.$strip>; export type InstanceSummary = z.infer; export declare const instanceStatsSchema: z.ZodObject<{ total: z.ZodNumber; byState: z.ZodRecord, z.ZodNumber>; }, z.core.$strip>; export type InstanceStats = z.infer; export declare const instanceListSchema: z.ZodObject<{ stats: z.ZodObject<{ total: z.ZodNumber; byState: z.ZodRecord, z.ZodNumber>; }, z.core.$strip>; total: z.ZodNumber; page: z.ZodNumber; size: z.ZodNumber; items: z.ZodArray; owner: z.ZodObject<{ id: z.core.$ZodBranded; name: z.ZodString; }, z.core.$strip>; input: z.ZodString; output: z.ZodNullable; startedAt: z.ZodString; }, z.core.$strip>>; }, z.core.$strip>; export type InstanceList = z.infer; export declare const instanceFileSchema: z.ZodObject<{ index: z.ZodNumber; name: z.ZodString; contentType: z.ZodString; size: z.ZodNumber; }, z.core.$strip>; export type InstanceFile = z.infer; export declare const INSTANCE_REASON_KINDS: readonly ["rejected", "failed", "terminated"]; export declare const instanceReasonSchema: z.ZodObject<{ kind: z.ZodEnum<{ terminated: "terminated"; failed: "failed"; rejected: "rejected"; }>; text: z.ZodString; }, z.core.$strip>; export type InstanceReason = z.infer; export declare const STEP_RESULTS: readonly ["done", "fail", "current", "pending"]; export declare const instanceStepSchema: z.ZodObject<{ seq: z.ZodNumber; name: z.ZodString; by: z.ZodEnum<{ human: "human"; agent: "agent"; }>; byName: z.ZodString; at: z.ZodNullable; durationMs: z.ZodNullable; res: z.ZodEnum<{ pending: "pending"; done: "done"; fail: "fail"; current: "current"; }>; note: z.ZodString; }, z.core.$strip>; export type InstanceStep = z.infer; /** 起单来源:manual(运营端手动启动)/ upstream(工作流节点)/ mail 等通道名 / testbed(测试台试跑)/ system */ export declare const instanceSourceSchema: z.ZodObject<{ kind: z.ZodString; label: z.ZodString; }, z.core.$strip>; export type InstanceSource = z.infer; export declare const instanceDetailSchema: z.ZodObject<{ id: z.ZodString; state: z.ZodEnum<{ running: "running"; completed: "completed"; pending: "pending"; failed: "failed"; rejected: "rejected"; }>; startedAt: z.ZodString; owner: z.ZodObject<{ id: z.core.$ZodBranded; name: z.ZodString; }, z.core.$strip>; no: z.ZodString; activityId: z.ZodString; llm: z.ZodString; endedAt: z.ZodNullable; durationMs: z.ZodNullable; reason: z.ZodNullable; text: z.ZodString; }, z.core.$strip>>; input: z.ZodObject<{ content: z.ZodString; source: z.ZodObject<{ kind: z.ZodString; label: z.ZodString; }, z.core.$strip>; submittedAt: z.ZodString; files: z.ZodArray>; }, z.core.$strip>; output: z.ZodObject<{ files: z.ZodArray>; }, z.core.$strip>; steps: z.ZodArray; byName: z.ZodString; at: z.ZodNullable; durationMs: z.ZodNullable; res: z.ZodEnum<{ pending: "pending"; done: "done"; fail: "fail"; current: "current"; }>; note: z.ZodString; }, z.core.$strip>>; }, z.core.$strip>; export type InstanceDetail = z.infer; /** * 控件种类:text 单行 / textarea 多行 / select 单选(只能选候选)/ combo 选择 + 新增 / list 字符串数组。 * 新增种类前后端一起升级;前端遇到不认识的 type 摆「暂不支持的控件」。 */ export declare const LAUNCH_PARAM_TYPES: readonly ["text", "textarea", "select", "combo", "list"]; export declare const launchParamTypeSchema: z.ZodEnum<{ text: "text"; textarea: "textarea"; select: "select"; combo: "combo"; list: "list"; }>; export type LaunchParamType = z.infer; export declare const launchOptionSchema: z.ZodObject<{ value: z.ZodString; label: z.ZodString; }, z.core.$strip>; export type LaunchOption = z.infer; export declare const launchParamSchema: z.ZodObject<{ key: z.ZodString; label: z.ZodString; type: z.ZodEnum<{ text: "text"; textarea: "textarea"; select: "select"; combo: "combo"; list: "list"; }>; required: z.ZodOptional; desc: z.ZodOptional; placeholder: z.ZodOptional; options: z.ZodOptional>>; default: z.ZodOptional]>>; }, z.core.$strip>; export type LaunchParam = z.infer; export declare const launchParamsSchema: z.ZodObject<{ activityId: z.ZodString; version: z.ZodString; params: z.ZodArray; required: z.ZodOptional; desc: z.ZodOptional; placeholder: z.ZodOptional; options: z.ZodOptional>>; default: z.ZodOptional]>>; }, z.core.$strip>>; }, z.core.$strip>; export type LaunchParams = z.infer; export declare const launchInputSchema: z.ZodObject<{ idempotencyKey: z.ZodString; ownerId: z.core.$ZodBranded; params: z.ZodRecord]>>; }, z.core.$strip>; export type LaunchInput = z.infer;