This repository has been archived on 2026-09-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
BPOS-MVP/api-report/packages/contracts/src/id.d.ts
T
JCAI Main AgentandClaude Opus 5 14d4fa046a M1: 底座 —— @contracts 首版 + event / ledger / org / llm
@contracts 首版(§8.1 九个文件):
- id 品牌 ID / terminal 终态五名与归侧四标签 / envelope 信封六字段与四类事件
- card 工单两模式 + 对话卡族(形状对齐 2026-07-26 原型定稿)
- contract7 契约七件 / ledger 三级寻址与写三分 / process-package 流程包 DSL 与触发器三类
- manifest 活动包清单六区(含 CMMN·DMN·步序声明的资产形状)/ org / api 路由契约

模块(L1):
- event   信封存储、归属解析三级短路、投递五诺、监听注册表、三级消费裁定
- ledger  schema 自生长(最大化合并/最宽类型/只增不破坏)、任务视图叠加、写三分、冲突检查
- org     岗位授权(客体三类×动作三种)、停用前置检查、会话、种子播种
- llm     四元绑定、ModelGateway 三模式(live/record/replay)—— 两缝之一

app 装配:Hono 服务 + 鉴权中间件 + 治理台/工作台路由;drizzle 迁移;AES-256-GCM 凭证密封

ADR-007 工具链与门禁 · ADR-008 投递队列 · ADR-009 凭证加密
(ADR 编号自 007 续:编码规范 §14 已用到 006,README 写「从 005 续」是笔误)

门禁五道全绿;96 个测试通过,含对真实 PG 的 ledger 集成测试

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
2026-07-27 00:59:14 +08:00

56 lines
3.8 KiB
TypeScript

/**
* 品牌 ID(编码规范 §8.1)。
*
* 每一类 ID 有自己的名义类型 —— TaskId 传不进要 WorkflowId 的位置,编译期就拦下。
* 运行时形态一律是非空字符串;生成归 adapter(clock / uuid 走 port,domain 零随机)。
*/
import { z } from 'zod';
export declare const staffIdSchema: z.core.$ZodBranded<z.ZodString, "StaffId", "out">;
export type StaffId = z.infer<typeof staffIdSchema>;
export declare const positionIdSchema: z.core.$ZodBranded<z.ZodString, "PositionId", "out">;
export type PositionId = z.infer<typeof positionIdSchema>;
export declare const processPackageIdSchema: z.core.$ZodBranded<z.ZodString, "ProcessPackageId", "out">;
export type ProcessPackageId = z.infer<typeof processPackageIdSchema>;
export declare const workflowIdSchema: z.core.$ZodBranded<z.ZodString, "WorkflowId", "out">;
export type WorkflowId = z.infer<typeof workflowIdSchema>;
export declare const nodeIdSchema: z.core.$ZodBranded<z.ZodString, "NodeId", "out">;
export type NodeId = z.infer<typeof nodeIdSchema>;
export declare const triggerIdSchema: z.core.$ZodBranded<z.ZodString, "TriggerId", "out">;
export type TriggerId = z.infer<typeof triggerIdSchema>;
export declare const approvalIdSchema: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
export type ApprovalId = z.infer<typeof approvalIdSchema>;
export declare const activityIdSchema: z.core.$ZodBranded<z.ZodString, "ActivityId", "out">;
export type ActivityId = z.infer<typeof activityIdSchema>;
export declare const taskIdSchema: z.core.$ZodBranded<z.ZodString, "TaskId", "out">;
export type TaskId = z.infer<typeof taskIdSchema>;
export declare const deliverableIdSchema: z.core.$ZodBranded<z.ZodString, "DeliverableId", "out">;
export type DeliverableId = z.infer<typeof deliverableIdSchema>;
export declare const stageIdSchema: z.core.$ZodBranded<z.ZodString, "StageId", "out">;
export type StageId = z.infer<typeof stageIdSchema>;
export declare const cardIdSchema: z.core.$ZodBranded<z.ZodString, "CardId", "out">;
export type CardId = z.infer<typeof cardIdSchema>;
export declare const workOrderIdSchema: z.core.$ZodBranded<z.ZodString, "WorkOrderId", "out">;
export type WorkOrderId = z.infer<typeof workOrderIdSchema>;
export declare const eventIdSchema: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
export type EventId = z.infer<typeof eventIdSchema>;
export declare const deliveryIdSchema: z.core.$ZodBranded<z.ZodString, "DeliveryId", "out">;
export type DeliveryId = z.infer<typeof deliveryIdSchema>;
export declare const listenerIdSchema: z.core.$ZodBranded<z.ZodString, "ListenerId", "out">;
export type ListenerId = z.infer<typeof listenerIdSchema>;
export declare const messageIdSchema: z.core.$ZodBranded<z.ZodString, "MessageId", "out">;
export type MessageId = z.infer<typeof messageIdSchema>;
export declare const toolIdSchema: z.core.$ZodBranded<z.ZodString, "ToolId", "out">;
export type ToolId = z.infer<typeof toolIdSchema>;
export declare const llmInstanceIdSchema: z.core.$ZodBranded<z.ZodString, "LlmInstanceId", "out">;
export type LlmInstanceId = z.infer<typeof llmInstanceIdSchema>;
export declare const channelIdSchema: z.core.$ZodBranded<z.ZodString, "ChannelId", "out">;
export type ChannelId = z.infer<typeof channelIdSchema>;
export declare const skillIdSchema: z.core.$ZodBranded<z.ZodString, "SkillId", "out">;
export type SkillId = z.infer<typeof skillIdSchema>;
export declare const memoryEntryIdSchema: z.core.$ZodBranded<z.ZodString, "MemoryEntryId", "out">;
export type MemoryEntryId = z.infer<typeof memoryEntryIdSchema>;
export declare const actionIntentIdSchema: z.core.$ZodBranded<z.ZodString, "ActionIntentId", "out">;
export type ActionIntentId = z.infer<typeof actionIntentIdSchema>;
export declare const minuteIdSchema: z.core.$ZodBranded<z.ZodString, "MinuteId", "out">;
export type MinuteId = z.infer<typeof minuteIdSchema>;