@siming-org/core 0.8.7 → 0.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +55 -32
  2. package/dist/index.js +497 -456
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2369,8 +2369,13 @@ declare function createNodeLibraryRepo(db: Db): NodeLibraryRepo;
2369
2369
  * Auth Schema — 云主机部署权限体系(T202608310001)
2370
2370
  * 三凭证模型:管理员账号密码(Web 登录)/ 管理员 Token(admin- 前缀,全权)/
2371
2371
  * 项目 Token(project- 前缀,绑定单项目读写、全局资产只读)。
2372
- * 服务端仅存单向哈希(密码 scrypt / Token sha256),明文零落库。
2372
+ * 密码仅存 scrypt 单向哈希;Token 明文落库(T202610140004 多枚治理——破坏性升级,
2373
+ * sha256 哈希列退役,明文支持随时查看/复制)。
2373
2374
  */
2375
+ /** Token 名称规则单源(T202610140004):trim 后 1-64 字符,同类型内可重名 */
2376
+ declare const AuthTokenNameSchema: z.ZodString;
2377
+ /** 每类(管理员 / 每项目)Token 数量上限单源(T202610140004)——server 文案与 web 预判共同引用 */
2378
+ declare const AUTH_TOKEN_LIMIT = 10;
2374
2379
  /** Token 类型:前缀自描述(admin- / project-),随机部分 43 字符 base64url */
2375
2380
  declare const AuthTokenTypeSchema: z.ZodEnum<{
2376
2381
  project: "project";
@@ -2402,9 +2407,11 @@ declare const LoginSchema: z.ZodObject<{
2402
2407
  password: z.ZodString;
2403
2408
  }, z.core.$strip>;
2404
2409
  type LoginInput = z.infer<typeof LoginSchema>;
2410
+ /** Token 实体(T202610140004 多枚模型):明文落库 + 名称必填;哈希列已随破坏性升级退役 */
2405
2411
  declare const AuthTokenSchema: z.ZodObject<{
2406
2412
  id: z.ZodOptional<z.ZodString>;
2407
- tokenHash: z.ZodString;
2413
+ name: z.ZodString;
2414
+ token: z.ZodString;
2408
2415
  type: z.ZodEnum<{
2409
2416
  project: "project";
2410
2417
  admin: "admin";
@@ -2414,8 +2421,15 @@ declare const AuthTokenSchema: z.ZodObject<{
2414
2421
  updatedAt: z.ZodOptional<z.ZodDate>;
2415
2422
  }, z.core.$strip>;
2416
2423
  type AuthToken = z.infer<typeof AuthTokenSchema>;
2417
- /** Token 生成响应:明文 Token 仅此形态出现一次(PRD §3.5 一次性展示) */
2424
+ /** Token 签发请求体:名称单源复用 AuthTokenNameSchema(T202610140004) */
2425
+ declare const AuthTokenIssueInputSchema: z.ZodObject<{
2426
+ name: z.ZodString;
2427
+ }, z.core.$strip>;
2428
+ type AuthTokenIssueInput = z.infer<typeof AuthTokenIssueInputSchema>;
2429
+ /** Token 签发响应:明文(生成后亦随列表载荷可再查看,T202610140004) */
2418
2430
  declare const AuthTokenGenResponseSchema: z.ZodObject<{
2431
+ id: z.ZodString;
2432
+ name: z.ZodString;
2419
2433
  token: z.ZodString;
2420
2434
  type: z.ZodEnum<{
2421
2435
  project: "project";
@@ -2424,17 +2438,19 @@ declare const AuthTokenGenResponseSchema: z.ZodObject<{
2424
2438
  projectId: z.ZodOptional<z.ZodString>;
2425
2439
  }, z.core.$strip>;
2426
2440
  type AuthTokenGenResponse = z.infer<typeof AuthTokenGenResponseSchema>;
2427
- /** Token 状态视图(无值):列表/详情展示形态 */
2428
- declare const AuthTokenStatusSchema: z.ZodObject<{
2441
+ /** Token 列表行视图:明文随载荷返回(交互契约 F6——查看明文无独立请求与失败面) */
2442
+ declare const AuthTokenViewSchema: z.ZodObject<{
2443
+ id: z.ZodString;
2444
+ name: z.ZodString;
2429
2445
  type: z.ZodEnum<{
2430
2446
  project: "project";
2431
2447
  admin: "admin";
2432
2448
  }>;
2433
2449
  projectId: z.ZodOptional<z.ZodString>;
2434
- hasToken: z.ZodBoolean;
2450
+ token: z.ZodString;
2435
2451
  createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2436
2452
  }, z.core.$strip>;
2437
- type AuthTokenStatus = z.infer<typeof AuthTokenStatusSchema>;
2453
+ type AuthTokenView = z.infer<typeof AuthTokenViewSchema>;
2438
2454
  /** whoami 身份查询响应(身份四元组:身份 + 绑定项目 + server 地址 + 开关状态,PRD §3.6) */
2439
2455
  declare const AuthWhoamiSchema: z.ZodObject<{
2440
2456
  identity: z.ZodEnum<{
@@ -2523,22 +2539,25 @@ declare function createAuthAccountRepo(db: Db): {
2523
2539
  _collection: mongodb.Collection<mongodb.Document>;
2524
2540
  };
2525
2541
  declare function createAuthTokenRepo(db: Db): {
2526
- /** sha256(token 全串含前缀) 等值查询(唯一索引命中) */
2527
- findByHash(tokenHash: string): Promise<AuthToken | null>;
2528
- getTokenStatus(type: AuthTokenType, projectId?: string): Promise<{
2529
- hasToken: boolean;
2530
- createdAt: Date | null;
2531
- }>;
2532
- /** 重置语义:旧 Token 删除 + 新 Token 落库(重置后旧值立即失效,PRD §3.4)。
2533
- * 事务包删+插(rs0 支持——失败窗口不留零 Token 状态,失败不变性);admin 单例 /
2534
- * project 每项目一枚由 partial unique 索引兜底并发交错 */
2535
- upsertToken(type: AuthTokenType, tokenHash: string, projectId?: string): Promise<AuthToken>;
2536
- listProjectTokenStatuses(projectIds: string[]): Promise<Map<string, {
2537
- hasToken: boolean;
2538
- createdAt: Date | null;
2539
- }>>;
2542
+ /**
2543
+ * 签发(追加语义,不重置他枚):事务内 ①同类计数(admin=全 type;project=type+projectId)
2544
+ * ②生成明文 ③insert。计数 ≥ AUTH_TOKEN_LIMIT → 409(D2:事务快照隔离防不了幻读,
2545
+ * 单管理员下并发签发概率≈0,理论竞态越界可吊销自愈,计数器文档复杂度不值)。
2546
+ */
2547
+ issueToken(input: {
2548
+ type: AuthTokenType;
2549
+ projectId?: string;
2550
+ name: string;
2551
+ }): Promise<AuthToken>;
2552
+ /** 全量清单(project 型跨全项目,行含 projectId);按签发时间升序(追加语义稳定展示) */
2553
+ listTokens(type: AuthTokenType): Promise<AuthToken[]>;
2554
+ /** 吊销单枚(即时失效,他枚不受影响);非法 hex id 不抛 BSONError,与不存在同归 404(架构评审 F3) */
2555
+ revokeToken(id: string): Promise<void>;
2556
+ /** 明文等值查(token_1 唯一索引命中)——鉴权中间件每请求主通道 */
2557
+ findValidToken(tokenValue: string): Promise<AuthToken | null>;
2540
2558
  list(filter?: mongodb.Filter<mongodb.Document>): Promise<{
2541
- tokenHash: string;
2559
+ name: string;
2560
+ token: string;
2542
2561
  type: "project" | "admin";
2543
2562
  id?: string | undefined;
2544
2563
  projectId?: string | undefined;
@@ -2546,7 +2565,8 @@ declare function createAuthTokenRepo(db: Db): {
2546
2565
  updatedAt?: Date | undefined;
2547
2566
  }[]>;
2548
2567
  getById(id: string): Promise<{
2549
- tokenHash: string;
2568
+ name: string;
2569
+ token: string;
2550
2570
  type: "project" | "admin";
2551
2571
  id?: string | undefined;
2552
2572
  projectId?: string | undefined;
@@ -2554,7 +2574,8 @@ declare function createAuthTokenRepo(db: Db): {
2554
2574
  updatedAt?: Date | undefined;
2555
2575
  } | null>;
2556
2576
  getByName(name: string): Promise<{
2557
- tokenHash: string;
2577
+ name: string;
2578
+ token: string;
2558
2579
  type: "project" | "admin";
2559
2580
  id?: string | undefined;
2560
2581
  projectId?: string | undefined;
@@ -2562,14 +2583,16 @@ declare function createAuthTokenRepo(db: Db): {
2562
2583
  updatedAt?: Date | undefined;
2563
2584
  } | null>;
2564
2585
  create(data: OmitId<{
2565
- tokenHash: string;
2586
+ name: string;
2587
+ token: string;
2566
2588
  type: "project" | "admin";
2567
2589
  id?: string | undefined;
2568
2590
  projectId?: string | undefined;
2569
2591
  createdAt?: Date | undefined;
2570
2592
  updatedAt?: Date | undefined;
2571
2593
  }>, session?: mongodb.ClientSession): Promise<{
2572
- tokenHash: string;
2594
+ name: string;
2595
+ token: string;
2573
2596
  type: "project" | "admin";
2574
2597
  id?: string | undefined;
2575
2598
  projectId?: string | undefined;
@@ -2577,14 +2600,16 @@ declare function createAuthTokenRepo(db: Db): {
2577
2600
  updatedAt?: Date | undefined;
2578
2601
  }>;
2579
2602
  update(id: string, patch: EoptPartial<OmitId<{
2580
- tokenHash: string;
2603
+ name: string;
2604
+ token: string;
2581
2605
  type: "project" | "admin";
2582
2606
  id?: string | undefined;
2583
2607
  projectId?: string | undefined;
2584
2608
  createdAt?: Date | undefined;
2585
2609
  updatedAt?: Date | undefined;
2586
2610
  }>>): Promise<{
2587
- tokenHash: string;
2611
+ name: string;
2612
+ token: string;
2588
2613
  type: "project" | "admin";
2589
2614
  id?: string | undefined;
2590
2615
  projectId?: string | undefined;
@@ -2678,8 +2703,6 @@ declare function generateToken(type: 'admin' | 'project'): string;
2678
2703
  /** Token 前缀合法性与类型提取(非前缀形态 = 格式非法) */
2679
2704
  declare function tokenTypeFromValue(token: string): AuthTokenKind | null;
2680
2705
  type AuthTokenKind = 'admin' | 'project';
2681
- /** Token sha256 hex(哈希对象含前缀全串,D2) */
2682
- declare function hashToken(token: string): string;
2683
2706
  /** 会话 id:256bit 随机 hex(D4) */
2684
2707
  declare function generateSessionId(): string;
2685
2708
 
@@ -3983,7 +4006,7 @@ declare function parseAuthEnabledEnvValue(raw: string): boolean | undefined;
3983
4006
  * Domain error types — thrown by core business logic, caught by server's app.onError().
3984
4007
  */
3985
4008
  /** N012 语义化业务错误码(可选挂载到 AppError 子类;HTTP 形状向后兼容:error 字段缺省仍为 http 级 code) */
3986
- type BizCode = 'PROJECT_ARCHIVED' | 'TEMPLATE_PROJECT_MISMATCH' | 'TEMPLATE_PROJECT_IMMUTABLE' | 'SCOPE_IMMUTABLE' | 'TASK_PROJECT_IMMUTABLE' | 'DEFAULT_PROJECT_IMMUTABLE' | 'TEMPLATE_NAME_CONFLICT' | 'TEMPLATE_CODE_CONFLICT' | 'TEMPLATE_CODE_IMMUTABLE' | 'PROJECT_NOT_FOUND' | 'AGENT_SKILL_SCOPE_CONFLICT' | 'MODEL_CODE_EXISTS' | 'MODEL_CODE_IMMUTABLE' | 'MODEL_ALIAS_IN_USE' | 'ENUM_ENTRY_BUILTIN' | 'ENUM_ENTRY_IN_USE' | 'ENUM_VALUE_CONFLICT' | 'NAME_SCOPE_CONFLICT' | 'REFERENCE_IN_USE' | 'TASK_DOC_NOT_SET' | 'TASK_DOC_NOT_FOUND' | 'TASK_DOC_SECTION_NOT_FOUND' | 'TASK_AT_PAUSE_POINT' | 'TASK_NOT_AT_PAUSE_POINT' | 'NODE_NOT_IN_INSTANCE' | 'CHECK_NOT_FOUND' | 'NODE_RECORD_NOT_WRITABLE' | 'TASK_TERMINATED' | 'TASK_NOT_TERMINATED' | 'TASK_FINALIZE_CONFIRMATION_REQUIRED' | 'TASK_PRUNE_GRAPH_INVALID' | 'TASK_SKIP_NODE_NOT_FOUND' | 'TASK_TYPE_TRACK_MISMATCH' | 'TASK_TRACK_MATCH_MISSING' | 'TEMPLATE_DISABLED' | 'AUTH_REQUIRED' | 'AUTH_TOKEN_INVALID' | 'AUTH_INVALID_CREDENTIALS' | 'AUTH_FORBIDDEN' | 'AUTH_ACCOUNT_EXISTS' | 'BATCH_EMPTY' | 'BATCH_LIMIT_EXCEEDED' | 'BATCH_PAYLOAD_TOO_LARGE' | 'NODE_PRESET_CODE_EXISTS' | 'NODE_PRESET_CODE_IMMUTABLE' | 'NODE_PRESET_VERSION_REQUIRED' | 'TEMPLATE_NODE_ID_DUPLICATE' | 'TEMPLATE_SAME_TRACK_FORK' | 'NODE_LIBRARY_COMPOSITION_NOT_FOUND' | 'UPGRADE_DECISION_REQUIRED' | 'UPGRADE_STALE' | 'FLOW_MANIFEST_INVALID' | 'ISSUE_NOT_FOUND' | 'ISSUE_INVALID_TRANSITION' | 'ISSUE_PROJECT_MISMATCH' | 'ISSUE_BATCH_LIMIT_EXCEEDED';
4009
+ type BizCode = 'PROJECT_ARCHIVED' | 'TEMPLATE_PROJECT_MISMATCH' | 'TEMPLATE_PROJECT_IMMUTABLE' | 'SCOPE_IMMUTABLE' | 'TASK_PROJECT_IMMUTABLE' | 'DEFAULT_PROJECT_IMMUTABLE' | 'TEMPLATE_NAME_CONFLICT' | 'TEMPLATE_CODE_CONFLICT' | 'TEMPLATE_CODE_IMMUTABLE' | 'PROJECT_NOT_FOUND' | 'AGENT_SKILL_SCOPE_CONFLICT' | 'MODEL_CODE_EXISTS' | 'MODEL_CODE_IMMUTABLE' | 'MODEL_ALIAS_IN_USE' | 'ENUM_ENTRY_BUILTIN' | 'ENUM_ENTRY_IN_USE' | 'ENUM_VALUE_CONFLICT' | 'NAME_SCOPE_CONFLICT' | 'REFERENCE_IN_USE' | 'TASK_DOC_NOT_SET' | 'TASK_DOC_NOT_FOUND' | 'TASK_DOC_SECTION_NOT_FOUND' | 'TASK_AT_PAUSE_POINT' | 'TASK_NOT_AT_PAUSE_POINT' | 'NODE_NOT_IN_INSTANCE' | 'CHECK_NOT_FOUND' | 'NODE_RECORD_NOT_WRITABLE' | 'TASK_TERMINATED' | 'TASK_NOT_TERMINATED' | 'TASK_FINALIZE_CONFIRMATION_REQUIRED' | 'TASK_PRUNE_GRAPH_INVALID' | 'TASK_SKIP_NODE_NOT_FOUND' | 'TASK_TYPE_TRACK_MISMATCH' | 'TASK_TRACK_MATCH_MISSING' | 'TEMPLATE_DISABLED' | 'AUTH_REQUIRED' | 'AUTH_TOKEN_INVALID' | 'AUTH_INVALID_CREDENTIALS' | 'AUTH_FORBIDDEN' | 'AUTH_ACCOUNT_EXISTS' | 'AUTH_TOKEN_LIMIT' | 'AUTH_TOKEN_NOT_FOUND' | 'AUTH_TOKEN_MISSING_PROJECT_ID' | 'BATCH_EMPTY' | 'BATCH_LIMIT_EXCEEDED' | 'BATCH_PAYLOAD_TOO_LARGE' | 'NODE_PRESET_CODE_EXISTS' | 'NODE_PRESET_CODE_IMMUTABLE' | 'NODE_PRESET_VERSION_REQUIRED' | 'TEMPLATE_NODE_ID_DUPLICATE' | 'TEMPLATE_SAME_TRACK_FORK' | 'NODE_LIBRARY_COMPOSITION_NOT_FOUND' | 'UPGRADE_DECISION_REQUIRED' | 'UPGRADE_STALE' | 'FLOW_MANIFEST_INVALID' | 'ISSUE_NOT_FOUND' | 'ISSUE_INVALID_TRANSITION' | 'ISSUE_PROJECT_MISMATCH' | 'ISSUE_BATCH_LIMIT_EXCEEDED';
3987
4010
  /** bizCode → 用户可读中文 message(单一真相源,路由层抛错时引用) */
3988
4011
  declare const BIZ_CODE_MESSAGES: Record<BizCode, string>;
3989
4012
  interface AppErrorOptions {
@@ -4583,4 +4606,4 @@ declare function applyImport(deps: TemplateTransferDeps, targetProjectId: string
4583
4606
  declare const VERSION: string;
4584
4607
  declare function ping(): string;
4585
4608
 
4586
- export { AGENT_MAIN_DOC, ARTIFACT_TYPES, AUTH_COLLECTIONS, type AdvanceDeps, type AdvanceInput, type AdvanceRequest, AdvanceRequestSchema, type AdvanceResponse, AdvanceResponseSchema, type Agent, type AgentCopy, AgentCopySchema, type AgentCreate, AgentCreateSchema, type AgentFunction, AgentFunctionSchema, type AgentPayload, AgentPayloadSchema, type AgentRepo, AgentSchema, type AgentScope, AgentScopeSchema, AgentShapeSchema, type AgentUpdate, AgentUpdateSchema, type AiCheck, AiCheckSchema, AppError, type AppErrorOptions, type ApproveRequest, ApproveRequestSchema, type ApproveResponse, ApproveResponseSchema, type ArchNote, ArchNoteSchema, type Artifact, ArtifactSchema, type ArtifactType, type AssetListOpts, type AssetSetEnabled, AssetSetEnabledSchema, type AuthAccount, type AuthAccountCreate, AuthAccountCreateSchema, AuthAccountSchema, type AuthSession, type AuthStatus, AuthStatusSchema, type AuthToken, type AuthTokenGenResponse, AuthTokenGenResponseSchema, type AuthTokenKind, AuthTokenSchema, type AuthTokenStatus, AuthTokenStatusSchema, type AuthTokenType, AuthTokenTypeSchema, type AuthWhoami, AuthWhoamiSchema, BIZ_CODE_MESSAGES, BadRequestError, type BizCode, CONTEXT_VIEWS, type CancelRequest, CancelRequestSchema, type CheckItem, CheckItemSchema, type Composition, type CompositionEdge, CompositionEdgeSchema, CompositionSchema, type Confirmation, ConfirmationSchema, ConflictError, type ContextView, ContextViewSchema, type ConvertGroupOutcome, type CreateTaskResponse, CreateTaskResponseSchema, DAG_PHASES, DAG_TRACKS, DEFAULT_PROJECT_KEY, DEFAULT_VCS_DOC_PATHS, type DagEdge, DagEdgeSchema, type DagInstance, type DagInstanceNode, DagInstanceNodeSchema, DagInstanceSchema, type DagNode, DagNodePhaseSchema, DagNodeSchema, DagNodeTrackSchema, type DagTemplate, type DagTemplateCopy, DagTemplateCopySchema, type DagTemplateCreate, DagTemplateCreateSchema, type DagTemplateRepo, DagTemplateSchema, type DagTemplateUpdate, DagTemplateUpdateSchema, type Decision, DecisionSchema, type DependencyAction, DependencyActionSchema, type DependencyCheck, DependencyCheckSchema, type DependencyStatus, DependencyStatusSchema, ENTRY_ID_REGEX, EXPORT_FORMAT_VERSION, type EchoItem, EchoItemSchema, type EdgePausePoint, EdgePausePointBaseSchema, EdgePausePointSchema, type EnumEntry, EnumEntrySchema, type EnumRegistry, type EnumRegistryCategory, EnumRegistryCategorySchema, type EnumRegistryRepo, EnumRegistrySchema, type EnumRegistryUpdate, EnumRegistryUpdateSchema, type ExportBundle, ExportBundleSchema, ForbiddenError, HistoryActionSchema, type HistoryEntry, HistoryEntrySchema, ISSUE_ACTIVE_STATUSES, ISSUE_CONVERT_MODES, ISSUE_SOURCES, ISSUE_STATUSES, type ImportApplyRequest, ImportApplyRequestSchema, type ImportApplyResponse, ImportApplyResponseSchema, type ImportDecision, ImportDecisionSchema, type ImportPlanRequest, ImportPlanRequestSchema, type ImportPlanResponse, ImportPlanResponseSchema, type Issue, type IssueConvertMode, IssueConvertModeSchema, type IssueCreate, IssueCreateSchema, type IssueHistoryEntry, IssueHistoryEntrySchema, type IssueListFilter, type IssueProgress, IssueProgressSchema, type IssueRepo, IssueSchema, type IssueSource, IssueSourceSchema, type IssueStatus, type IssueStatusChange, IssueStatusSchema, type IssueTaskSnapshot, type IssueUpdate, IssueUpdateSchema, type IssueWithProgress, type LoginInput, LoginSchema, type ModelAlias, type ModelAliasCreate, ModelAliasCreateSchema, type ModelAliasPayload, ModelAliasPayloadSchema, type ModelAliasRepo, ModelAliasSchema, ModelAliasShapeSchema, type ModelAliasUpdate, ModelAliasUpdateSchema, type ModelAliasWithRefCount, ModelAliasWithRefCountSchema, NODE_CHECKS_MAX, NODE_ID_PATTERN, NODE_PRESET_CODE_PATTERN, NODE_STATUSES, type NodeContentFields, type NodeInfo, NodeInfoSchema, type NodeLibrary, type NodeLibraryRepo, NodeLibrarySchema, type NodeLibraryUpsert, NodeLibraryUpsertSchema, type NodePreset, type NodePresetCopy, NodePresetCopySchema, type NodePresetCreate, NodePresetCreateSchema, type NodePresetListFilter, type NodePresetRepo, NodePresetSchema, NodePresetShapeSchema, type NodePresetUpdate, NodePresetUpdateSchema, type NodeRecord, NodeRecordSchema, type NodeState, NodeStateSchema, NodeStatusSchema, NotFoundError, OBJECT_ID_HEX, type OmitId, PAUSE_POINT_TYPES, type PasswordChange, PasswordChangeSchema, PausePointTypeSchema, type PauseRequest, PauseRequestSchema, type Project, type ProjectCreate, ProjectCreateSchema, type ProjectRepo, ProjectSchema, type ProjectStatus, ProjectStatusSchema, type ProjectUpdate, ProjectUpdateSchema, type PruneResult, type PrunedGraph, REFERENCE_LIMITS, type ReferenceDoc, type ReopenInput, type ReopenRequest, ReopenRequestSchema, type ReopenResponse, type Repo, type ResumeRequest, ResumeRequestSchema, type ReviewSummary, ReviewSummarySchema, SIMING_CODE_REGEX, SIMING_CONFIG_ENV_KEYS, SIMING_CONFIG_KEYS, SKILL_MAIN_DOC, type SameTrackForkIssue, type SimingClient, type SimingConfig, type SimingConfigKey, SimingConfigSchema, SimingLogLevelSchema, type Skill, type SkillCopy, SkillCopySchema, type SkillCreate, SkillCreateSchema, type SkillPayload, SkillPayloadSchema, type SkillRepo, SkillSchema, type SkillScope, SkillScopeSchema, SkillShapeSchema, type SkillUpdate, SkillUpdateSchema, type SourcePreset, SourcePresetSchema, TASK_PHASES, TASK_STATUSES, TASK_TYPES, TEMPLATE_CODE_MAX_LENGTH, TEMPLATE_CODE_REGEX, TEMPLATE_STRUCTURE_CONSTRAINTS, type Task, type TaskBatchAck, TaskBatchAckSchema, type TaskBatchEntry, TaskBatchEntrySchema, type TaskBatchFailure, TaskBatchFailureSchema, type TaskContext, TaskContextSchema, type TaskCreateInput, TaskCreateInputSchema, type TaskDocContent, TaskDocContentSchema, type TaskIssueView, type TaskLink, TaskLinkSchema, type TaskPatch, TaskPhaseSchema, type TaskProgress, type TaskProgressPublic, TaskProgressPublicSchema, TaskProgressSchema, type TaskPublic, TaskPublicSchema, type TaskRepo, TaskSchema, TaskStatusSchema, type TaskSummary, TaskSummarySchema, type TaskType, type TemplateCandidate, TemplateCandidateSchema, TemplateCodeFieldSchema, type TemplateContentChanges, type TemplateContentDiff, type TemplateContentSource, type TemplatePayload, TemplatePayloadSchema, type TemplateStructureConstraint, type TemplateTransferDeps, type TestReport, TestReportSchema, type ToolCheck, ToolCheckSchema, type TrackChainResult, UnauthorizedError, type UpgradeAction, UpgradeActionSchema, type UpgradeApplyOutcome, type UpgradeApplyRequest, UpgradeApplyRequestSchema, type UpgradeApplyResultItem, type UpgradeDecision, type UpgradeDecisionInput, UpgradeDecisionSchema, type UpgradeNodeStatus, UpgradeNodeStatusSchema, type UpgradePlanItem, type UpgradePlanResult, VERSION, ValidationError, type VcsConfig, VcsConfigSchema, WRITE_ACK_ENTRY_KINDS, type WithId, type WriteAck, type WriteAckEntryKind, WriteAckEntryKindSchema, WriteAckSchema, advanceTask, applyImport, applyUpgradeDecisions, approveTask, assertBoundSkillsCompatible, assertModelAliasExists, assertNoSameTrackFork, assertReferenceAggregateLimit, assertReferencesDeletable, assertUniqueAiCheckIds, assertUniqueNodeIds, buildImportPlan, buildPrunedGraph, buildTemplateCode, buildUpgradePlan, bumpPatch, bumpPatchOrPassthrough, cancelTask, canonicalizeReferencePath, checkTermination, composeExportBundle, computeNodeContentHash, computeUpgradeStatus, createAgentRepo, createAuthAccountRepo, createAuthSessionRepo, createAuthTokenRepo, createDagTemplateRepo, createEnumRegistryRepo, createIssueRepo, createModelAliasRepo, createMongoClient, createNodeLibraryRepo, createNodePresetRepo, createProjectRepo, createReferencesSchema, createRepo, createSkillRepo, createTaskRepo, decisionKey, derivePreTerminalState, diffTemplateContent, effectiveTracks, enabledNeFalse, escapeRegExpLiteral, excerpt, findDuplicateNodeIds, findNextEdge, findSameTrackForks, findTemplateByName, generateEntryId, generateProjectKey, generateSessionId, generateToken, hasProjectDefault, hashPassword, hashToken, isLegalTemplateCode, matchSetOf, mkHistory, normalizeNameToTemplateCode, parseAuthEnabledEnvValue, pauseTask, ping, pruneInstance, renderPrompt, reopenTask, resumeTask, simulateTrackChains, sumReferenceContentChars, taskProgress, toNodeInfo, toTaskPublic, tokenTypeFromValue, trackIntersects, verifyPassword, withTransaction };
4609
+ export { AGENT_MAIN_DOC, ARTIFACT_TYPES, AUTH_COLLECTIONS, AUTH_TOKEN_LIMIT, type AdvanceDeps, type AdvanceInput, type AdvanceRequest, AdvanceRequestSchema, type AdvanceResponse, AdvanceResponseSchema, type Agent, type AgentCopy, AgentCopySchema, type AgentCreate, AgentCreateSchema, type AgentFunction, AgentFunctionSchema, type AgentPayload, AgentPayloadSchema, type AgentRepo, AgentSchema, type AgentScope, AgentScopeSchema, AgentShapeSchema, type AgentUpdate, AgentUpdateSchema, type AiCheck, AiCheckSchema, AppError, type AppErrorOptions, type ApproveRequest, ApproveRequestSchema, type ApproveResponse, ApproveResponseSchema, type ArchNote, ArchNoteSchema, type Artifact, ArtifactSchema, type ArtifactType, type AssetListOpts, type AssetSetEnabled, AssetSetEnabledSchema, type AuthAccount, type AuthAccountCreate, AuthAccountCreateSchema, AuthAccountSchema, type AuthSession, type AuthStatus, AuthStatusSchema, type AuthToken, type AuthTokenGenResponse, AuthTokenGenResponseSchema, type AuthTokenIssueInput, AuthTokenIssueInputSchema, type AuthTokenKind, AuthTokenNameSchema, AuthTokenSchema, type AuthTokenType, AuthTokenTypeSchema, type AuthTokenView, AuthTokenViewSchema, type AuthWhoami, AuthWhoamiSchema, BIZ_CODE_MESSAGES, BadRequestError, type BizCode, CONTEXT_VIEWS, type CancelRequest, CancelRequestSchema, type CheckItem, CheckItemSchema, type Composition, type CompositionEdge, CompositionEdgeSchema, CompositionSchema, type Confirmation, ConfirmationSchema, ConflictError, type ContextView, ContextViewSchema, type ConvertGroupOutcome, type CreateTaskResponse, CreateTaskResponseSchema, DAG_PHASES, DAG_TRACKS, DEFAULT_PROJECT_KEY, DEFAULT_VCS_DOC_PATHS, type DagEdge, DagEdgeSchema, type DagInstance, type DagInstanceNode, DagInstanceNodeSchema, DagInstanceSchema, type DagNode, DagNodePhaseSchema, DagNodeSchema, DagNodeTrackSchema, type DagTemplate, type DagTemplateCopy, DagTemplateCopySchema, type DagTemplateCreate, DagTemplateCreateSchema, type DagTemplateRepo, DagTemplateSchema, type DagTemplateUpdate, DagTemplateUpdateSchema, type Decision, DecisionSchema, type DependencyAction, DependencyActionSchema, type DependencyCheck, DependencyCheckSchema, type DependencyStatus, DependencyStatusSchema, ENTRY_ID_REGEX, EXPORT_FORMAT_VERSION, type EchoItem, EchoItemSchema, type EdgePausePoint, EdgePausePointBaseSchema, EdgePausePointSchema, type EnumEntry, EnumEntrySchema, type EnumRegistry, type EnumRegistryCategory, EnumRegistryCategorySchema, type EnumRegistryRepo, EnumRegistrySchema, type EnumRegistryUpdate, EnumRegistryUpdateSchema, type ExportBundle, ExportBundleSchema, ForbiddenError, HistoryActionSchema, type HistoryEntry, HistoryEntrySchema, ISSUE_ACTIVE_STATUSES, ISSUE_CONVERT_MODES, ISSUE_SOURCES, ISSUE_STATUSES, type ImportApplyRequest, ImportApplyRequestSchema, type ImportApplyResponse, ImportApplyResponseSchema, type ImportDecision, ImportDecisionSchema, type ImportPlanRequest, ImportPlanRequestSchema, type ImportPlanResponse, ImportPlanResponseSchema, type Issue, type IssueConvertMode, IssueConvertModeSchema, type IssueCreate, IssueCreateSchema, type IssueHistoryEntry, IssueHistoryEntrySchema, type IssueListFilter, type IssueProgress, IssueProgressSchema, type IssueRepo, IssueSchema, type IssueSource, IssueSourceSchema, type IssueStatus, type IssueStatusChange, IssueStatusSchema, type IssueTaskSnapshot, type IssueUpdate, IssueUpdateSchema, type IssueWithProgress, type LoginInput, LoginSchema, type ModelAlias, type ModelAliasCreate, ModelAliasCreateSchema, type ModelAliasPayload, ModelAliasPayloadSchema, type ModelAliasRepo, ModelAliasSchema, ModelAliasShapeSchema, type ModelAliasUpdate, ModelAliasUpdateSchema, type ModelAliasWithRefCount, ModelAliasWithRefCountSchema, NODE_CHECKS_MAX, NODE_ID_PATTERN, NODE_PRESET_CODE_PATTERN, NODE_STATUSES, type NodeContentFields, type NodeInfo, NodeInfoSchema, type NodeLibrary, type NodeLibraryRepo, NodeLibrarySchema, type NodeLibraryUpsert, NodeLibraryUpsertSchema, type NodePreset, type NodePresetCopy, NodePresetCopySchema, type NodePresetCreate, NodePresetCreateSchema, type NodePresetListFilter, type NodePresetRepo, NodePresetSchema, NodePresetShapeSchema, type NodePresetUpdate, NodePresetUpdateSchema, type NodeRecord, NodeRecordSchema, type NodeState, NodeStateSchema, NodeStatusSchema, NotFoundError, OBJECT_ID_HEX, type OmitId, PAUSE_POINT_TYPES, type PasswordChange, PasswordChangeSchema, PausePointTypeSchema, type PauseRequest, PauseRequestSchema, type Project, type ProjectCreate, ProjectCreateSchema, type ProjectRepo, ProjectSchema, type ProjectStatus, ProjectStatusSchema, type ProjectUpdate, ProjectUpdateSchema, type PruneResult, type PrunedGraph, REFERENCE_LIMITS, type ReferenceDoc, type ReopenInput, type ReopenRequest, ReopenRequestSchema, type ReopenResponse, type Repo, type ResumeRequest, ResumeRequestSchema, type ReviewSummary, ReviewSummarySchema, SIMING_CODE_REGEX, SIMING_CONFIG_ENV_KEYS, SIMING_CONFIG_KEYS, SKILL_MAIN_DOC, type SameTrackForkIssue, type SimingClient, type SimingConfig, type SimingConfigKey, SimingConfigSchema, SimingLogLevelSchema, type Skill, type SkillCopy, SkillCopySchema, type SkillCreate, SkillCreateSchema, type SkillPayload, SkillPayloadSchema, type SkillRepo, SkillSchema, type SkillScope, SkillScopeSchema, SkillShapeSchema, type SkillUpdate, SkillUpdateSchema, type SourcePreset, SourcePresetSchema, TASK_PHASES, TASK_STATUSES, TASK_TYPES, TEMPLATE_CODE_MAX_LENGTH, TEMPLATE_CODE_REGEX, TEMPLATE_STRUCTURE_CONSTRAINTS, type Task, type TaskBatchAck, TaskBatchAckSchema, type TaskBatchEntry, TaskBatchEntrySchema, type TaskBatchFailure, TaskBatchFailureSchema, type TaskContext, TaskContextSchema, type TaskCreateInput, TaskCreateInputSchema, type TaskDocContent, TaskDocContentSchema, type TaskIssueView, type TaskLink, TaskLinkSchema, type TaskPatch, TaskPhaseSchema, type TaskProgress, type TaskProgressPublic, TaskProgressPublicSchema, TaskProgressSchema, type TaskPublic, TaskPublicSchema, type TaskRepo, TaskSchema, TaskStatusSchema, type TaskSummary, TaskSummarySchema, type TaskType, type TemplateCandidate, TemplateCandidateSchema, TemplateCodeFieldSchema, type TemplateContentChanges, type TemplateContentDiff, type TemplateContentSource, type TemplatePayload, TemplatePayloadSchema, type TemplateStructureConstraint, type TemplateTransferDeps, type TestReport, TestReportSchema, type ToolCheck, ToolCheckSchema, type TrackChainResult, UnauthorizedError, type UpgradeAction, UpgradeActionSchema, type UpgradeApplyOutcome, type UpgradeApplyRequest, UpgradeApplyRequestSchema, type UpgradeApplyResultItem, type UpgradeDecision, type UpgradeDecisionInput, UpgradeDecisionSchema, type UpgradeNodeStatus, UpgradeNodeStatusSchema, type UpgradePlanItem, type UpgradePlanResult, VERSION, ValidationError, type VcsConfig, VcsConfigSchema, WRITE_ACK_ENTRY_KINDS, type WithId, type WriteAck, type WriteAckEntryKind, WriteAckEntryKindSchema, WriteAckSchema, advanceTask, applyImport, applyUpgradeDecisions, approveTask, assertBoundSkillsCompatible, assertModelAliasExists, assertNoSameTrackFork, assertReferenceAggregateLimit, assertReferencesDeletable, assertUniqueAiCheckIds, assertUniqueNodeIds, buildImportPlan, buildPrunedGraph, buildTemplateCode, buildUpgradePlan, bumpPatch, bumpPatchOrPassthrough, cancelTask, canonicalizeReferencePath, checkTermination, composeExportBundle, computeNodeContentHash, computeUpgradeStatus, createAgentRepo, createAuthAccountRepo, createAuthSessionRepo, createAuthTokenRepo, createDagTemplateRepo, createEnumRegistryRepo, createIssueRepo, createModelAliasRepo, createMongoClient, createNodeLibraryRepo, createNodePresetRepo, createProjectRepo, createReferencesSchema, createRepo, createSkillRepo, createTaskRepo, decisionKey, derivePreTerminalState, diffTemplateContent, effectiveTracks, enabledNeFalse, escapeRegExpLiteral, excerpt, findDuplicateNodeIds, findNextEdge, findSameTrackForks, findTemplateByName, generateEntryId, generateProjectKey, generateSessionId, generateToken, hasProjectDefault, hashPassword, isLegalTemplateCode, matchSetOf, mkHistory, normalizeNameToTemplateCode, parseAuthEnabledEnvValue, pauseTask, ping, pruneInstance, renderPrompt, reopenTask, resumeTask, simulateTrackChains, sumReferenceContentChars, taskProgress, toNodeInfo, toTaskPublic, tokenTypeFromValue, trackIntersects, verifyPassword, withTransaction };