@agentdock/wire 0.0.92 → 0.0.94

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 (49) hide show
  1. package/dist/accountLanguage.d.ts +32 -0
  2. package/dist/accountLanguage.js +1 -0
  3. package/dist/agentCapabilities.d.ts +26 -0
  4. package/dist/agentCapabilities.js +1 -1
  5. package/dist/agentRuntimeSettings.d.ts +140 -0
  6. package/dist/agentRuntimeSettings.js +1 -0
  7. package/dist/enterpriseGateway.d.ts +215 -0
  8. package/dist/enterpriseGateway.js +1 -0
  9. package/dist/envelope.d.ts +45 -30
  10. package/dist/events.d.ts +24 -12
  11. package/dist/events.js +1 -1
  12. package/dist/features.d.ts +7 -3
  13. package/dist/features.js +1 -1
  14. package/dist/feedback.d.ts +18 -18
  15. package/dist/gateway.d.ts +386 -0
  16. package/dist/gateway.js +1 -0
  17. package/dist/handoffBrief.d.ts +14 -0
  18. package/dist/handoffBrief.js +52 -0
  19. package/dist/inboundEvents.d.ts +70 -0
  20. package/dist/inboundEvents.js +1 -1
  21. package/dist/index.d.ts +20 -12
  22. package/dist/index.js +1 -1
  23. package/dist/interactionEvents.d.ts +2 -2
  24. package/dist/legacyProtocol.d.ts +36 -36
  25. package/dist/machine.d.ts +9 -0
  26. package/dist/machine.js +1 -1
  27. package/dist/messageMeta.d.ts +6 -4
  28. package/dist/messageMeta.js +1 -1
  29. package/dist/messages.d.ts +338 -216
  30. package/dist/messages.js +1 -1
  31. package/dist/notification.d.ts +1 -1
  32. package/dist/notification.js +1 -1
  33. package/dist/rpc.d.ts +884 -84
  34. package/dist/rpc.js +1 -1
  35. package/dist/scheduledTasks.d.ts +50 -50
  36. package/dist/sessionBtw.d.ts +153 -0
  37. package/dist/sessionBtw.js +1 -0
  38. package/dist/sessionTitle.d.ts +16 -0
  39. package/dist/sessionTitle.js +1 -0
  40. package/dist/socketEvents.d.ts +9 -0
  41. package/dist/socketEvents.js +1 -1
  42. package/dist/sourceMetadata.d.ts +2 -2
  43. package/dist/stats.d.ts +87 -49
  44. package/dist/stats.js +1 -1
  45. package/dist/sync.d.ts +315 -0
  46. package/dist/sync.js +1 -1
  47. package/dist/workItems.d.ts +345 -0
  48. package/dist/workItems.js +1 -0
  49. package/package.json +1 -1
package/dist/rpc.js CHANGED
@@ -1 +1 @@
1
- "use strict";import{z as t}from"zod";import{SessionMessageSchema as n}from"./messages.js";import{CLI_AGENT_TYPES as s,SPAWNABLE_AGENTS as e}from"./messageMeta.js";import{PermissionModeSchema as i}from"./interactionEvents.js";export const RpcMethod=t.enum(["spawn-session","stop-session","list-sessions","abort","switch-mode","approve-permission","deny-permission","answer-question","shutdown-daemon","get-messages","get-stats","get-team-stats","start-invite","get-machine-info","get-agent-settings","set-agent-settings","get-labs-settings","set-labs-settings","set-auto-upgrade-daemon","check-path","backfill-history-session","trigger-upgrade","checkpoint-list","checkpoint-diff","checkpoint-rollback","refresh-enterprise-models","cancel-task","file-relay-receive","set-debug","get-debug","record-usage","update-agent-models","update-agent-modes","dispatch-notification","get-context-usage"]),SESSION_RPC_METHODS=["answer-question","approve-permission","deny-permission","abort","stop-session","cancel-task","get-context-usage"],MACHINE_RPC_METHODS=["start-invite","get-machine-info","get-agent-settings","set-agent-settings","get-labs-settings","set-labs-settings","set-auto-upgrade-daemon","check-path","backfill-history-session","trigger-upgrade","checkpoint-list","checkpoint-diff","checkpoint-rollback","refresh-enterprise-models","dispatch-notification"],DAEMON_REQUIRED_RPC_METHODS=[...SESSION_RPC_METHODS,...MACHINE_RPC_METHODS],RpcCallSchema=t.object({method:t.string().min(1),params:t.unknown(),timeout:t.number().int().positive().default(3e4)}),RpcResultSchema=t.discriminatedUnion("ok",[t.object({ok:t.literal(!0),result:t.unknown()}),t.object({ok:t.literal(!1),error:t.string()})]),SpawnSessionParamsSchema=t.object({agentType:t.enum(s),cwd:t.string().min(1),prompt:t.string().optional(),permissionMode:i.default("default"),env:t.record(t.string()).optional(),model:t.string().optional(),baseUrl:t.string().url().optional(),appendSystemPrompt:t.string().optional(),allowedTools:t.array(t.string()).optional(),disallowedTools:t.array(t.string()).optional(),mcpConfig:t.string().optional(),resumeSessionId:t.string().optional(),serverSessionId:t.string().optional(),maxTurns:t.number().int().positive().optional(),machineId:t.string().min(1).optional(),spawnToken:t.string().optional(),systemPrompt:t.string().optional(),systemPromptFile:t.string().optional(),appendSystemPromptFile:t.string().optional(),fallbackModel:t.string().optional(),maxBudgetUsd:t.number().positive().optional(),tools:t.array(t.string()).optional(),effort:t.enum(["low","medium","high","xhigh","max"]).optional(),addDirs:t.array(t.string()).optional(),agent:t.string().optional(),agents:t.string().optional(),jsonSchema:t.string().optional(),strictMcpConfig:t.boolean().optional(),chrome:t.boolean().optional(),worktree:t.union([t.boolean(),t.string()]).optional(),forkSession:t.boolean().optional(),sessionId:t.string().uuid().optional(),settings:t.string().optional(),betas:t.array(t.string()).optional(),brief:t.boolean().optional(),noSessionPersistence:t.boolean().optional(),includePartialMessages:t.boolean().optional(),replayUserMessages:t.boolean().optional(),settingSources:t.string().optional(),disableSlashCommands:t.boolean().optional(),files:t.array(t.string()).optional(),pluginDirs:t.array(t.string()).optional(),dangerouslySkipPermissions:t.boolean().optional(),allowDangerouslySkipPermissions:t.boolean().optional(),startupScripts:t.array(t.string()).optional(),source:t.enum(["managed","history","scheduled"]).default("managed"),background:t.boolean().default(!1),useWindowsTerminal:t.boolean().optional()}).strict(),GetMessagesParamsSchema=t.object({sessionId:t.string().min(1),fromSeq:t.number().int().nonnegative().optional(),limit:t.number().int().positive().default(100)}).strict(),GetMessagesResponseSchema=t.object({messages:t.array(n),total:t.number(),hasMore:t.boolean()}).passthrough(),CustomModelSchema=t.object({id:t.string().min(1),label:t.string().min(1)}),SkillDefinitionSchema=t.object({name:t.string().min(1),description:t.string(),userInvocable:t.boolean().default(!0),source:t.enum(["project","user"]).default("project"),projectPath:t.string().optional()}).passthrough(),AGENT_ENV_NONE="none",AgentEnvConfigSchema=t.object({httpProxy:t.string().optional(),httpsProxy:t.string().optional(),customEnv:t.record(t.string()).optional(),customModels:t.array(CustomModelSchema).optional()}).strict(),AgentEnvConfigSetSchema=t.object({httpProxy:t.string().optional(),httpsProxy:t.string().optional(),customModels:t.array(CustomModelSchema).optional()}).strict(),AgentSettingsSchema=t.object({defaults:AgentEnvConfigSchema.optional(),startupScripts:t.array(t.string()).optional(),notification:t.object({feishu:t.string().optional(),dingtalk:t.string().optional()}).optional()}).merge(t.object(Object.fromEntries(e.map(o=>[o,AgentEnvConfigSchema.optional()])))),SetAgentSettingsSchema=t.object({defaults:AgentEnvConfigSetSchema.optional(),machineId:t.string().optional(),startupScripts:t.array(t.string()).optional()}).merge(t.object(Object.fromEntries(e.map(o=>[o,AgentEnvConfigSetSchema.optional()])))).strict(),MachineInfoResponseSchema=t.object({homedir:t.string(),defaultCwd:t.string().optional(),recentCwds:t.array(t.string()),projectPaths:t.array(t.string()).optional().default([]),availableAgents:t.array(t.string()),agentModels:t.record(t.string(),t.array(t.object({id:t.string(),displayName:t.string(),isDefault:t.boolean(),hidden:t.boolean(),source:t.enum(["builtin","acp","env","custom"]).optional().default("acp")}))).optional(),agentModes:t.record(t.string(),t.array(t.object({id:t.string(),label:t.string()}))).optional(),agentCliPaths:t.record(t.string(),t.string()).optional(),agentSettings:AgentSettingsSchema.optional(),agentSkills:t.record(t.string(),t.array(SkillDefinitionSchema)).optional()}),CheckPathParamsSchema=t.object({cwd:t.string().min(1),machineId:t.string().min(1).optional()}).strict(),LabsSettingsSchema=t.object({historySessionSync:t.boolean().default(!1)}).strict();
1
+ "use strict";import{z as t}from"zod";import{SessionMessageSchema as s}from"./messages.js";import{CLI_AGENT_TYPES as a,SPAWNABLE_AGENTS as n}from"./messageMeta.js";import{SessionHandoffContextSchema as r}from"./workItems.js";import{AccountLanguageSchema as e}from"./accountLanguage.js";export const RpcMethod=t.enum(["spawn-session","stop-session","list-sessions","abort","switch-mode","approve-permission","deny-permission","answer-question","shutdown-daemon","get-messages","get-stats","get-team-stats","start-invite","get-machine-info","get-agent-settings","set-agent-settings","get-labs-settings","set-labs-settings","set-auto-upgrade-daemon","check-path","backfill-history-session","trigger-upgrade","checkpoint-list","checkpoint-diff","checkpoint-rollback","refresh-enterprise-models","cancel-task","file-relay-receive","set-debug","get-debug","record-usage","update-agent-models","update-agent-modes","dispatch-notification","get-context-usage","ai-helper"]),SESSION_RPC_METHODS=["answer-question","approve-permission","deny-permission","abort","stop-session","cancel-task","get-context-usage"],MACHINE_RPC_METHODS=["start-invite","get-machine-info","get-agent-settings","set-agent-settings","get-labs-settings","set-labs-settings","set-auto-upgrade-daemon","check-path","backfill-history-session","trigger-upgrade","checkpoint-list","checkpoint-diff","checkpoint-rollback","refresh-enterprise-models","dispatch-notification","ai-helper"],DAEMON_REQUIRED_RPC_METHODS=[...SESSION_RPC_METHODS,...MACHINE_RPC_METHODS],RpcCallSchema=t.object({method:t.string().min(1),params:t.unknown(),timeout:t.number().int().positive().default(3e4)}),RpcResultSchema=t.discriminatedUnion("ok",[t.object({ok:t.literal(!0),result:t.unknown()}),t.object({ok:t.literal(!1),error:t.string()})]),SpawnSessionParamsSchema=t.object({agentType:t.enum(a),cwd:t.string().min(1),prompt:t.string().optional(),permissionMode:t.string().default("default"),env:t.record(t.string()).optional(),model:t.string().optional(),baseUrl:t.string().url().optional(),appendSystemPrompt:t.string().optional(),responseLanguage:e.optional(),allowedTools:t.array(t.string()).optional(),disallowedTools:t.array(t.string()).optional(),mcpConfig:t.string().optional(),resumeSessionId:t.string().optional(),serverSessionId:t.string().optional(),maxTurns:t.number().int().positive().optional(),machineId:t.string().min(1).optional(),spawnToken:t.string().optional(),handoffContext:r.optional(),systemPrompt:t.string().optional(),systemPromptFile:t.string().optional(),appendSystemPromptFile:t.string().optional(),fallbackModel:t.string().optional(),maxBudgetUsd:t.number().positive().optional(),tools:t.array(t.string()).optional(),effort:t.enum(["low","medium","high","xhigh","max"]).optional(),addDirs:t.array(t.string()).optional(),agent:t.string().optional(),agents:t.string().optional(),jsonSchema:t.string().optional(),strictMcpConfig:t.boolean().optional(),chrome:t.boolean().optional(),worktree:t.union([t.boolean(),t.string()]).optional(),forkSession:t.boolean().optional(),sessionId:t.string().uuid().optional(),settings:t.string().optional(),betas:t.array(t.string()).optional(),brief:t.boolean().optional(),noSessionPersistence:t.boolean().optional(),includePartialMessages:t.boolean().optional(),replayUserMessages:t.boolean().optional(),settingSources:t.string().optional(),disableSlashCommands:t.boolean().optional(),files:t.array(t.string()).optional(),pluginDirs:t.array(t.string()).optional(),dangerouslySkipPermissions:t.boolean().optional(),allowDangerouslySkipPermissions:t.boolean().optional(),startupScripts:t.array(t.string()).optional(),source:t.enum(["managed","history","scheduled"]).default("managed"),background:t.boolean().default(!1),useWindowsTerminal:t.boolean().optional()}).strict(),GetMessagesParamsSchema=t.object({sessionId:t.string().min(1),fromSeq:t.number().int().nonnegative().optional(),limit:t.number().int().positive().default(100)}).strict(),GetMessagesResponseSchema=t.object({messages:t.array(s),total:t.number(),hasMore:t.boolean()}).passthrough(),CustomModelSchema=t.object({id:t.string().min(1),label:t.string().min(1)}),SkillDefinitionSchema=t.object({name:t.string().min(1),description:t.string(),userInvocable:t.boolean().default(!0),source:t.enum(["project","user"]).default("project"),projectPath:t.string().optional()}).passthrough(),AGENT_ENV_NONE="none",AgentEnvConfigSchema=t.object({httpProxy:t.string().optional(),httpsProxy:t.string().optional(),customEnv:t.record(t.string()).optional(),customModels:t.array(CustomModelSchema).optional()}).strict(),AgentEnvConfigSetSchema=t.object({httpProxy:t.string().optional(),httpsProxy:t.string().optional(),customModels:t.array(CustomModelSchema).optional()}).strict(),AiHelperConfigSchema=t.object({enabled:t.boolean()}).strict(),LocalAiHelperConfigSchema=t.object({enabled:t.boolean(),provider:t.enum(["openai","anthropic","openai-compatible"]).optional(),baseUrl:t.string().url().optional(),apiKey:t.string().min(1).optional(),modelId:t.string().min(1).optional(),disableReasoning:t.boolean().optional()}).strict().superRefine((o,i)=>{o.provider==="openai-compatible"&&!o.baseUrl&&i.addIssue({code:t.ZodIssueCode.custom,path:["baseUrl"],message:"baseUrl is required"})}),AiHelperPayloadSchema=t.object({c:t.string().min(1),t:t.string().min(1)}).strict(),AiHelperDecryptedPayloadSchema=t.object({prompt:t.string().min(1).max(16e3),systemPrompt:t.string().max(8e3).optional()}).strict(),AiHelperParamsSchema=t.discriminatedUnion("format",[t.object({format:t.literal("encrypted"),payload:AiHelperPayloadSchema,sessionId:t.string().min(1),machineId:t.string().min(1).optional(),responseLanguage:e.optional()}).strict(),t.object({format:t.literal("plain"),prompt:t.string().min(1).max(16e3),systemPrompt:t.string().max(8e3).optional(),sessionId:t.string().min(1).optional(),machineId:t.string().min(1).optional(),responseLanguage:e.optional()}).strict()]),AgentSettingsSchema=t.object({defaults:AgentEnvConfigSchema.optional(),startupScripts:t.array(t.string()).optional(),notification:t.object({feishu:t.string().optional(),dingtalk:t.string().optional()}).optional()}).merge(t.object(Object.fromEntries(n.map(o=>[o,AgentEnvConfigSchema.optional()])))).merge(t.object({aiHelper:AiHelperConfigSchema.optional()})),SetAgentSettingsSchema=t.object({defaults:AgentEnvConfigSetSchema.optional(),machineId:t.string().optional()}).merge(t.object(Object.fromEntries(n.map(o=>[o,AgentEnvConfigSetSchema.optional()])))).merge(t.object({aiHelper:AiHelperConfigSchema.optional()})).strict(),MachineInfoResponseSchema=t.object({homedir:t.string(),defaultCwd:t.string().optional(),recentCwds:t.array(t.string()),projectPaths:t.array(t.string()).optional().default([]),availableAgents:t.array(t.string()),agentModels:t.record(t.string(),t.array(t.object({id:t.string(),displayName:t.string(),isDefault:t.boolean(),hidden:t.boolean(),source:t.enum(["builtin","acp","env","custom"]).optional().default("acp")}))).optional(),agentModes:t.record(t.string(),t.array(t.object({id:t.string(),label:t.string()}))).optional(),agentCliPaths:t.record(t.string(),t.string()).optional(),agentSettings:AgentSettingsSchema.optional(),agentSkills:t.record(t.string(),t.array(SkillDefinitionSchema)).optional(),capabilities:t.array(t.string()).optional()}),CheckPathParamsSchema=t.object({cwd:t.string().min(1),machineId:t.string().min(1).optional()}).strict(),LabsSettingsSchema=t.object({historySessionSync:t.boolean().default(!1)}).strict(),LocalAgentSettingsSchema=AgentSettingsSchema.omit({aiHelper:!0}).extend({version:t.literal(1).optional(),aiHelper:LocalAiHelperConfigSchema.optional()});
@@ -36,7 +36,7 @@ export declare const ScheduledSpawnParamsSchema: z.ZodObject<{
36
36
  }, "strict", z.ZodTypeAny, {
37
37
  prompt: string;
38
38
  model?: string | undefined;
39
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
39
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
40
40
  agent?: string | undefined;
41
41
  cwd?: string | undefined;
42
42
  startupScripts?: string[] | undefined;
@@ -50,7 +50,7 @@ export declare const ScheduledSpawnParamsSchema: z.ZodObject<{
50
50
  }, {
51
51
  prompt: string;
52
52
  model?: string | undefined;
53
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
53
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
54
54
  agent?: string | undefined;
55
55
  cwd?: string | undefined;
56
56
  startupScripts?: string[] | undefined;
@@ -81,16 +81,16 @@ export declare const TaskResultSchema: z.ZodObject<{
81
81
  status: "failed" | "done";
82
82
  reason?: string | undefined;
83
83
  summary?: string | undefined;
84
- headline?: string | undefined;
85
84
  outcome?: string | undefined;
85
+ headline?: string | undefined;
86
86
  suggestion?: string | undefined;
87
87
  unstructured?: boolean | undefined;
88
88
  }, {
89
89
  status: "failed" | "done";
90
90
  reason?: string | undefined;
91
91
  summary?: string | undefined;
92
- headline?: string | undefined;
93
92
  outcome?: string | undefined;
93
+ headline?: string | undefined;
94
94
  suggestion?: string | undefined;
95
95
  unstructured?: boolean | undefined;
96
96
  }>;
@@ -225,7 +225,7 @@ export declare const CreateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
225
225
  }, "strict", z.ZodTypeAny, {
226
226
  prompt: string;
227
227
  model?: string | undefined;
228
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
228
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
229
229
  agent?: string | undefined;
230
230
  cwd?: string | undefined;
231
231
  startupScripts?: string[] | undefined;
@@ -239,7 +239,7 @@ export declare const CreateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
239
239
  }, {
240
240
  prompt: string;
241
241
  model?: string | undefined;
242
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
242
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
243
243
  agent?: string | undefined;
244
244
  cwd?: string | undefined;
245
245
  startupScripts?: string[] | undefined;
@@ -258,12 +258,12 @@ export declare const CreateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
258
258
  totalRuns: z.ZodOptional<z.ZodNumber>;
259
259
  }, "strict", z.ZodTypeAny, {
260
260
  name: string;
261
- triggerType: "token" | "cron" | "continuous";
262
261
  enabled: boolean;
262
+ triggerType: "token" | "cron" | "continuous";
263
263
  spawnParams: {
264
264
  prompt: string;
265
265
  model?: string | undefined;
266
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
266
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
267
267
  agent?: string | undefined;
268
268
  cwd?: string | undefined;
269
269
  startupScripts?: string[] | undefined;
@@ -284,7 +284,7 @@ export declare const CreateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
284
284
  spawnParams: {
285
285
  prompt: string;
286
286
  model?: string | undefined;
287
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
287
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
288
288
  agent?: string | undefined;
289
289
  cwd?: string | undefined;
290
290
  startupScripts?: string[] | undefined;
@@ -296,20 +296,20 @@ export declare const CreateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
296
296
  missedRunPolicy?: "skip" | "run-once" | undefined;
297
297
  circuitBreakerThreshold?: number | undefined;
298
298
  };
299
+ enabled?: boolean | undefined;
299
300
  machineId?: string | undefined;
300
301
  triggerType?: "token" | "cron" | "continuous" | undefined;
301
- enabled?: boolean | undefined;
302
302
  maxConcurrent?: number | undefined;
303
303
  schedule?: string | undefined;
304
304
  totalRuns?: number | undefined;
305
305
  }>, {
306
306
  name: string;
307
- triggerType: "token" | "cron" | "continuous";
308
307
  enabled: boolean;
308
+ triggerType: "token" | "cron" | "continuous";
309
309
  spawnParams: {
310
310
  prompt: string;
311
311
  model?: string | undefined;
312
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
312
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
313
313
  agent?: string | undefined;
314
314
  cwd?: string | undefined;
315
315
  startupScripts?: string[] | undefined;
@@ -330,7 +330,7 @@ export declare const CreateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
330
330
  spawnParams: {
331
331
  prompt: string;
332
332
  model?: string | undefined;
333
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
333
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
334
334
  agent?: string | undefined;
335
335
  cwd?: string | undefined;
336
336
  startupScripts?: string[] | undefined;
@@ -342,20 +342,20 @@ export declare const CreateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
342
342
  missedRunPolicy?: "skip" | "run-once" | undefined;
343
343
  circuitBreakerThreshold?: number | undefined;
344
344
  };
345
+ enabled?: boolean | undefined;
345
346
  machineId?: string | undefined;
346
347
  triggerType?: "token" | "cron" | "continuous" | undefined;
347
- enabled?: boolean | undefined;
348
348
  maxConcurrent?: number | undefined;
349
349
  schedule?: string | undefined;
350
350
  totalRuns?: number | undefined;
351
351
  }>, {
352
352
  name: string;
353
- triggerType: "token" | "cron" | "continuous";
354
353
  enabled: boolean;
354
+ triggerType: "token" | "cron" | "continuous";
355
355
  spawnParams: {
356
356
  prompt: string;
357
357
  model?: string | undefined;
358
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
358
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
359
359
  agent?: string | undefined;
360
360
  cwd?: string | undefined;
361
361
  startupScripts?: string[] | undefined;
@@ -376,7 +376,7 @@ export declare const CreateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
376
376
  spawnParams: {
377
377
  prompt: string;
378
378
  model?: string | undefined;
379
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
379
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
380
380
  agent?: string | undefined;
381
381
  cwd?: string | undefined;
382
382
  startupScripts?: string[] | undefined;
@@ -388,9 +388,9 @@ export declare const CreateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
388
388
  missedRunPolicy?: "skip" | "run-once" | undefined;
389
389
  circuitBreakerThreshold?: number | undefined;
390
390
  };
391
+ enabled?: boolean | undefined;
391
392
  machineId?: string | undefined;
392
393
  triggerType?: "token" | "cron" | "continuous" | undefined;
393
- enabled?: boolean | undefined;
394
394
  maxConcurrent?: number | undefined;
395
395
  schedule?: string | undefined;
396
396
  totalRuns?: number | undefined;
@@ -426,7 +426,7 @@ export declare const UpdateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
426
426
  }, "strict", z.ZodTypeAny, {
427
427
  prompt: string;
428
428
  model?: string | undefined;
429
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
429
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
430
430
  agent?: string | undefined;
431
431
  cwd?: string | undefined;
432
432
  startupScripts?: string[] | undefined;
@@ -440,7 +440,7 @@ export declare const UpdateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
440
440
  }, {
441
441
  prompt: string;
442
442
  model?: string | undefined;
443
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
443
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
444
444
  agent?: string | undefined;
445
445
  cwd?: string | undefined;
446
446
  startupScripts?: string[] | undefined;
@@ -456,13 +456,13 @@ export declare const UpdateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
456
456
  totalRuns: z.ZodOptional<z.ZodNumber>;
457
457
  }, "strict", z.ZodTypeAny, {
458
458
  name?: string | undefined;
459
+ enabled?: boolean | undefined;
459
460
  machineId?: string | null | undefined;
460
461
  triggerType?: "token" | "cron" | "continuous" | undefined;
461
- enabled?: boolean | undefined;
462
462
  spawnParams?: {
463
463
  prompt: string;
464
464
  model?: string | undefined;
465
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
465
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
466
466
  agent?: string | undefined;
467
467
  cwd?: string | undefined;
468
468
  startupScripts?: string[] | undefined;
@@ -479,13 +479,13 @@ export declare const UpdateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
479
479
  totalRuns?: number | undefined;
480
480
  }, {
481
481
  name?: string | undefined;
482
+ enabled?: boolean | undefined;
482
483
  machineId?: string | null | undefined;
483
484
  triggerType?: "token" | "cron" | "continuous" | undefined;
484
- enabled?: boolean | undefined;
485
485
  spawnParams?: {
486
486
  prompt: string;
487
487
  model?: string | undefined;
488
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
488
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
489
489
  agent?: string | undefined;
490
490
  cwd?: string | undefined;
491
491
  startupScripts?: string[] | undefined;
@@ -502,13 +502,13 @@ export declare const UpdateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
502
502
  totalRuns?: number | undefined;
503
503
  }>, {
504
504
  name?: string | undefined;
505
+ enabled?: boolean | undefined;
505
506
  machineId?: string | null | undefined;
506
507
  triggerType?: "token" | "cron" | "continuous" | undefined;
507
- enabled?: boolean | undefined;
508
508
  spawnParams?: {
509
509
  prompt: string;
510
510
  model?: string | undefined;
511
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
511
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
512
512
  agent?: string | undefined;
513
513
  cwd?: string | undefined;
514
514
  startupScripts?: string[] | undefined;
@@ -525,13 +525,13 @@ export declare const UpdateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
525
525
  totalRuns?: number | undefined;
526
526
  }, {
527
527
  name?: string | undefined;
528
+ enabled?: boolean | undefined;
528
529
  machineId?: string | null | undefined;
529
530
  triggerType?: "token" | "cron" | "continuous" | undefined;
530
- enabled?: boolean | undefined;
531
531
  spawnParams?: {
532
532
  prompt: string;
533
533
  model?: string | undefined;
534
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
534
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
535
535
  agent?: string | undefined;
536
536
  cwd?: string | undefined;
537
537
  startupScripts?: string[] | undefined;
@@ -548,13 +548,13 @@ export declare const UpdateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
548
548
  totalRuns?: number | undefined;
549
549
  }>, {
550
550
  name?: string | undefined;
551
+ enabled?: boolean | undefined;
551
552
  machineId?: string | null | undefined;
552
553
  triggerType?: "token" | "cron" | "continuous" | undefined;
553
- enabled?: boolean | undefined;
554
554
  spawnParams?: {
555
555
  prompt: string;
556
556
  model?: string | undefined;
557
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
557
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
558
558
  agent?: string | undefined;
559
559
  cwd?: string | undefined;
560
560
  startupScripts?: string[] | undefined;
@@ -571,13 +571,13 @@ export declare const UpdateScheduledTaskSchema: z.ZodEffects<z.ZodEffects<z.ZodO
571
571
  totalRuns?: number | undefined;
572
572
  }, {
573
573
  name?: string | undefined;
574
+ enabled?: boolean | undefined;
574
575
  machineId?: string | null | undefined;
575
576
  triggerType?: "token" | "cron" | "continuous" | undefined;
576
- enabled?: boolean | undefined;
577
577
  spawnParams?: {
578
578
  prompt: string;
579
579
  model?: string | undefined;
580
- agentType?: "claude" | "copilot" | "opencode" | "codex" | "gemini" | "hermes" | "openclaw" | undefined;
580
+ agentType?: "hermes" | "codex" | "claude" | "copilot" | "opencode" | "gemini" | "openclaw" | undefined;
581
581
  agent?: string | undefined;
582
582
  cwd?: string | undefined;
583
583
  startupScripts?: string[] | undefined;
@@ -622,16 +622,16 @@ export declare const ScheduledTaskSummarySchema: z.ZodObject<{
622
622
  status: "failed" | "done";
623
623
  reason?: string | undefined;
624
624
  summary?: string | undefined;
625
- headline?: string | undefined;
626
625
  outcome?: string | undefined;
626
+ headline?: string | undefined;
627
627
  suggestion?: string | undefined;
628
628
  unstructured?: boolean | undefined;
629
629
  }, {
630
630
  status: "failed" | "done";
631
631
  reason?: string | undefined;
632
632
  summary?: string | undefined;
633
- headline?: string | undefined;
634
633
  outcome?: string | undefined;
634
+ headline?: string | undefined;
635
635
  suggestion?: string | undefined;
636
636
  unstructured?: boolean | undefined;
637
637
  }>>;
@@ -642,8 +642,8 @@ export declare const ScheduledTaskSummarySchema: z.ZodObject<{
642
642
  status: "failed" | "done";
643
643
  reason?: string | undefined;
644
644
  summary?: string | undefined;
645
- headline?: string | undefined;
646
645
  outcome?: string | undefined;
646
+ headline?: string | undefined;
647
647
  suggestion?: string | undefined;
648
648
  unstructured?: boolean | undefined;
649
649
  } | null;
@@ -654,8 +654,8 @@ export declare const ScheduledTaskSummarySchema: z.ZodObject<{
654
654
  status: "failed" | "done";
655
655
  reason?: string | undefined;
656
656
  summary?: string | undefined;
657
- headline?: string | undefined;
658
657
  outcome?: string | undefined;
658
+ headline?: string | undefined;
659
659
  suggestion?: string | undefined;
660
660
  unstructured?: boolean | undefined;
661
661
  } | null;
@@ -735,16 +735,16 @@ export declare const ScheduledTaskSummarySchema: z.ZodObject<{
735
735
  status: "failed" | "done";
736
736
  reason?: string | undefined;
737
737
  summary?: string | undefined;
738
- headline?: string | undefined;
739
738
  outcome?: string | undefined;
739
+ headline?: string | undefined;
740
740
  suggestion?: string | undefined;
741
741
  unstructured?: boolean | undefined;
742
742
  }, {
743
743
  status: "failed" | "done";
744
744
  reason?: string | undefined;
745
745
  summary?: string | undefined;
746
- headline?: string | undefined;
747
746
  outcome?: string | undefined;
747
+ headline?: string | undefined;
748
748
  suggestion?: string | undefined;
749
749
  unstructured?: boolean | undefined;
750
750
  }>>;
@@ -755,8 +755,8 @@ export declare const ScheduledTaskSummarySchema: z.ZodObject<{
755
755
  status: "failed" | "done";
756
756
  reason?: string | undefined;
757
757
  summary?: string | undefined;
758
- headline?: string | undefined;
759
758
  outcome?: string | undefined;
759
+ headline?: string | undefined;
760
760
  suggestion?: string | undefined;
761
761
  unstructured?: boolean | undefined;
762
762
  } | null;
@@ -767,8 +767,8 @@ export declare const ScheduledTaskSummarySchema: z.ZodObject<{
767
767
  status: "failed" | "done";
768
768
  reason?: string | undefined;
769
769
  summary?: string | undefined;
770
- headline?: string | undefined;
771
770
  outcome?: string | undefined;
771
+ headline?: string | undefined;
772
772
  suggestion?: string | undefined;
773
773
  unstructured?: boolean | undefined;
774
774
  } | null;
@@ -848,16 +848,16 @@ export declare const ScheduledTaskSummarySchema: z.ZodObject<{
848
848
  status: "failed" | "done";
849
849
  reason?: string | undefined;
850
850
  summary?: string | undefined;
851
- headline?: string | undefined;
852
851
  outcome?: string | undefined;
852
+ headline?: string | undefined;
853
853
  suggestion?: string | undefined;
854
854
  unstructured?: boolean | undefined;
855
855
  }, {
856
856
  status: "failed" | "done";
857
857
  reason?: string | undefined;
858
858
  summary?: string | undefined;
859
- headline?: string | undefined;
860
859
  outcome?: string | undefined;
860
+ headline?: string | undefined;
861
861
  suggestion?: string | undefined;
862
862
  unstructured?: boolean | undefined;
863
863
  }>>;
@@ -868,8 +868,8 @@ export declare const ScheduledTaskSummarySchema: z.ZodObject<{
868
868
  status: "failed" | "done";
869
869
  reason?: string | undefined;
870
870
  summary?: string | undefined;
871
- headline?: string | undefined;
872
871
  outcome?: string | undefined;
872
+ headline?: string | undefined;
873
873
  suggestion?: string | undefined;
874
874
  unstructured?: boolean | undefined;
875
875
  } | null;
@@ -880,8 +880,8 @@ export declare const ScheduledTaskSummarySchema: z.ZodObject<{
880
880
  status: "failed" | "done";
881
881
  reason?: string | undefined;
882
882
  summary?: string | undefined;
883
- headline?: string | undefined;
884
883
  outcome?: string | undefined;
884
+ headline?: string | undefined;
885
885
  suggestion?: string | undefined;
886
886
  unstructured?: boolean | undefined;
887
887
  } | null;
@@ -964,16 +964,16 @@ export declare const TaskExecutionSchema: z.ZodObject<{
964
964
  status: "failed" | "done";
965
965
  reason?: string | undefined;
966
966
  summary?: string | undefined;
967
- headline?: string | undefined;
968
967
  outcome?: string | undefined;
968
+ headline?: string | undefined;
969
969
  suggestion?: string | undefined;
970
970
  unstructured?: boolean | undefined;
971
971
  }, {
972
972
  status: "failed" | "done";
973
973
  reason?: string | undefined;
974
974
  summary?: string | undefined;
975
- headline?: string | undefined;
976
975
  outcome?: string | undefined;
976
+ headline?: string | undefined;
977
977
  suggestion?: string | undefined;
978
978
  unstructured?: boolean | undefined;
979
979
  }>>;
@@ -1007,16 +1007,16 @@ export declare const TaskExecutionSchema: z.ZodObject<{
1007
1007
  status: "failed" | "done";
1008
1008
  reason?: string | undefined;
1009
1009
  summary?: string | undefined;
1010
- headline?: string | undefined;
1011
1010
  outcome?: string | undefined;
1011
+ headline?: string | undefined;
1012
1012
  suggestion?: string | undefined;
1013
1013
  unstructured?: boolean | undefined;
1014
1014
  }, {
1015
1015
  status: "failed" | "done";
1016
1016
  reason?: string | undefined;
1017
1017
  summary?: string | undefined;
1018
- headline?: string | undefined;
1019
1018
  outcome?: string | undefined;
1019
+ headline?: string | undefined;
1020
1020
  suggestion?: string | undefined;
1021
1021
  unstructured?: boolean | undefined;
1022
1022
  }>>;
@@ -1050,16 +1050,16 @@ export declare const TaskExecutionSchema: z.ZodObject<{
1050
1050
  status: "failed" | "done";
1051
1051
  reason?: string | undefined;
1052
1052
  summary?: string | undefined;
1053
- headline?: string | undefined;
1054
1053
  outcome?: string | undefined;
1054
+ headline?: string | undefined;
1055
1055
  suggestion?: string | undefined;
1056
1056
  unstructured?: boolean | undefined;
1057
1057
  }, {
1058
1058
  status: "failed" | "done";
1059
1059
  reason?: string | undefined;
1060
1060
  summary?: string | undefined;
1061
- headline?: string | undefined;
1062
1061
  outcome?: string | undefined;
1062
+ headline?: string | undefined;
1063
1063
  suggestion?: string | undefined;
1064
1064
  unstructured?: boolean | undefined;
1065
1065
  }>>;
@@ -0,0 +1,153 @@
1
+ import { z } from 'zod';
2
+ export declare const SessionBtwStatusSchema: z.ZodEnum<["pending", "succeeded", "failed"]>;
3
+ export declare const SessionBtwErrorCodeSchema: z.ZodEnum<["context-history-unavailable", "context-too-large", "ai-helper-not-enabled", "ai-helper-config-invalid", "ai-helper-dek-unavailable", "authentication-failed", "quota-exceeded", "timeout", "protocol-incompatible", "upstream-failed", "execution-failed", "empty-response"]>;
4
+ export declare const SessionBtwRecordSchema: z.ZodObject<{
5
+ id: z.ZodString;
6
+ sessionId: z.ZodString;
7
+ operationId: z.ZodString;
8
+ anchorSeq: z.ZodNullable<z.ZodNumber>;
9
+ questionCiphertext: z.ZodString;
10
+ outcomeCiphertext: z.ZodNullable<z.ZodString>;
11
+ status: z.ZodEnum<["pending", "succeeded", "failed"]>;
12
+ createdAt: z.ZodString;
13
+ updatedAt: z.ZodString;
14
+ }, "strict", z.ZodTypeAny, {
15
+ status: "failed" | "pending" | "succeeded";
16
+ sessionId: string;
17
+ id: string;
18
+ createdAt: string;
19
+ updatedAt: string;
20
+ operationId: string;
21
+ anchorSeq: number | null;
22
+ questionCiphertext: string;
23
+ outcomeCiphertext: string | null;
24
+ }, {
25
+ status: "failed" | "pending" | "succeeded";
26
+ sessionId: string;
27
+ id: string;
28
+ createdAt: string;
29
+ updatedAt: string;
30
+ operationId: string;
31
+ anchorSeq: number | null;
32
+ questionCiphertext: string;
33
+ outcomeCiphertext: string | null;
34
+ }>;
35
+ export declare const SessionBtwListSchema: z.ZodEffects<z.ZodObject<{
36
+ sessionId: z.ZodString;
37
+ anchorAtOrAfter: z.ZodOptional<z.ZodNumber>;
38
+ anchorAtOrBefore: z.ZodOptional<z.ZodNumber>;
39
+ includeUnanchored: z.ZodOptional<z.ZodBoolean>;
40
+ cursor: z.ZodOptional<z.ZodString>;
41
+ limit: z.ZodDefault<z.ZodNumber>;
42
+ }, "strict", z.ZodTypeAny, {
43
+ sessionId: string;
44
+ limit: number;
45
+ cursor?: string | undefined;
46
+ anchorAtOrAfter?: number | undefined;
47
+ anchorAtOrBefore?: number | undefined;
48
+ includeUnanchored?: boolean | undefined;
49
+ }, {
50
+ sessionId: string;
51
+ limit?: number | undefined;
52
+ cursor?: string | undefined;
53
+ anchorAtOrAfter?: number | undefined;
54
+ anchorAtOrBefore?: number | undefined;
55
+ includeUnanchored?: boolean | undefined;
56
+ }>, {
57
+ sessionId: string;
58
+ limit: number;
59
+ cursor?: string | undefined;
60
+ anchorAtOrAfter?: number | undefined;
61
+ anchorAtOrBefore?: number | undefined;
62
+ includeUnanchored?: boolean | undefined;
63
+ }, {
64
+ sessionId: string;
65
+ limit?: number | undefined;
66
+ cursor?: string | undefined;
67
+ anchorAtOrAfter?: number | undefined;
68
+ anchorAtOrBefore?: number | undefined;
69
+ includeUnanchored?: boolean | undefined;
70
+ }>;
71
+ export declare const SessionBtwCreateSchema: z.ZodObject<{
72
+ sessionId: z.ZodString;
73
+ operationId: z.ZodString;
74
+ anchorSeq: z.ZodNullable<z.ZodNumber>;
75
+ questionCiphertext: z.ZodString;
76
+ }, "strict", z.ZodTypeAny, {
77
+ sessionId: string;
78
+ operationId: string;
79
+ anchorSeq: number | null;
80
+ questionCiphertext: string;
81
+ }, {
82
+ sessionId: string;
83
+ operationId: string;
84
+ anchorSeq: number | null;
85
+ questionCiphertext: string;
86
+ }>;
87
+ export declare const SessionBtwCompleteSchema: z.ZodObject<{
88
+ id: z.ZodString;
89
+ sessionId: z.ZodString;
90
+ operationId: z.ZodString;
91
+ status: z.ZodEnum<["succeeded", "failed"]>;
92
+ outcomeCiphertext: z.ZodString;
93
+ }, "strict", z.ZodTypeAny, {
94
+ status: "failed" | "succeeded";
95
+ sessionId: string;
96
+ id: string;
97
+ operationId: string;
98
+ outcomeCiphertext: string;
99
+ }, {
100
+ status: "failed" | "succeeded";
101
+ sessionId: string;
102
+ id: string;
103
+ operationId: string;
104
+ outcomeCiphertext: string;
105
+ }>;
106
+ export declare const SessionBtwDeleteSchema: z.ZodObject<{
107
+ id: z.ZodString;
108
+ sessionId: z.ZodString;
109
+ }, "strict", z.ZodTypeAny, {
110
+ sessionId: string;
111
+ id: string;
112
+ }, {
113
+ sessionId: string;
114
+ id: string;
115
+ }>;
116
+ export declare const SessionBtwQuestionSchema: z.ZodObject<{
117
+ format: z.ZodLiteral<1>;
118
+ question: z.ZodString;
119
+ }, "strict", z.ZodTypeAny, {
120
+ question: string;
121
+ format: 1;
122
+ }, {
123
+ question: string;
124
+ format: 1;
125
+ }>;
126
+ export declare const SessionBtwOutcomeSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
127
+ format: z.ZodLiteral<1>;
128
+ kind: z.ZodLiteral<"success">;
129
+ text: z.ZodString;
130
+ }, "strict", z.ZodTypeAny, {
131
+ text: string;
132
+ format: 1;
133
+ kind: "success";
134
+ }, {
135
+ text: string;
136
+ format: 1;
137
+ kind: "success";
138
+ }>, z.ZodObject<{
139
+ format: z.ZodLiteral<1>;
140
+ kind: z.ZodLiteral<"error">;
141
+ code: z.ZodEnum<["context-history-unavailable", "context-too-large", "ai-helper-not-enabled", "ai-helper-config-invalid", "ai-helper-dek-unavailable", "authentication-failed", "quota-exceeded", "timeout", "protocol-incompatible", "upstream-failed", "execution-failed", "empty-response"]>;
142
+ }, "strict", z.ZodTypeAny, {
143
+ code: "timeout" | "context-history-unavailable" | "context-too-large" | "ai-helper-not-enabled" | "ai-helper-config-invalid" | "ai-helper-dek-unavailable" | "authentication-failed" | "quota-exceeded" | "protocol-incompatible" | "upstream-failed" | "execution-failed" | "empty-response";
144
+ format: 1;
145
+ kind: "error";
146
+ }, {
147
+ code: "timeout" | "context-history-unavailable" | "context-too-large" | "ai-helper-not-enabled" | "ai-helper-config-invalid" | "ai-helper-dek-unavailable" | "authentication-failed" | "quota-exceeded" | "protocol-incompatible" | "upstream-failed" | "execution-failed" | "empty-response";
148
+ format: 1;
149
+ kind: "error";
150
+ }>]>;
151
+ export type SessionBtwRecord = z.infer<typeof SessionBtwRecordSchema>;
152
+ export type SessionBtwErrorCode = z.infer<typeof SessionBtwErrorCodeSchema>;
153
+ //# sourceMappingURL=sessionBtw.d.ts.map
@@ -0,0 +1 @@
1
+ "use strict";import{z as e}from"zod";export const SessionBtwStatusSchema=e.enum(["pending","succeeded","failed"]),SessionBtwErrorCodeSchema=e.enum(["context-history-unavailable","context-too-large","ai-helper-not-enabled","ai-helper-config-invalid","ai-helper-dek-unavailable","authentication-failed","quota-exceeded","timeout","protocol-incompatible","upstream-failed","execution-failed","empty-response"]),SessionBtwRecordSchema=e.object({id:e.string().min(1),sessionId:e.string().min(1).max(128),operationId:e.string().uuid(),anchorSeq:e.number().int().nonnegative().nullable(),questionCiphertext:e.string().min(1).max(1e5),outcomeCiphertext:e.string().min(1).max(1e5).nullable(),status:SessionBtwStatusSchema,createdAt:e.string().datetime(),updatedAt:e.string().datetime()}).strict(),SessionBtwListSchema=e.object({sessionId:e.string().min(1).max(128),anchorAtOrAfter:e.number().int().nonnegative().optional(),anchorAtOrBefore:e.number().int().nonnegative().optional(),includeUnanchored:e.boolean().optional(),cursor:e.string().min(1).max(256).optional(),limit:e.number().int().min(1).max(100).default(100)}).strict().refine(t=>t.anchorAtOrAfter===void 0||t.anchorAtOrBefore===void 0||t.anchorAtOrAfter<=t.anchorAtOrBefore,{message:"anchor range is invalid"}),SessionBtwCreateSchema=e.object({sessionId:e.string().min(1).max(128),operationId:e.string().uuid(),anchorSeq:e.number().int().nonnegative().nullable(),questionCiphertext:e.string().min(1).max(1e5)}).strict(),SessionBtwCompleteSchema=e.object({id:e.string().min(1),sessionId:e.string().min(1).max(128),operationId:e.string().uuid(),status:e.enum(["succeeded","failed"]),outcomeCiphertext:e.string().min(1).max(1e5)}).strict(),SessionBtwDeleteSchema=e.object({id:e.string().min(1),sessionId:e.string().min(1).max(128)}).strict(),SessionBtwQuestionSchema=e.object({format:e.literal(1),question:e.string().min(1).max(2e3)}).strict(),SessionBtwOutcomeSchema=e.discriminatedUnion("kind",[e.object({format:e.literal(1),kind:e.literal("success"),text:e.string().min(1).max(5e4)}).strict(),e.object({format:e.literal(1),kind:e.literal("error"),code:SessionBtwErrorCodeSchema}).strict()]);
@@ -0,0 +1,16 @@
1
+ /** Shared session-title resolution for server projections and Web display. */
2
+ /** Strip the generated trailing short-id from a session name. */
3
+ export declare function stripSessionTitleShortId(name: string): string;
4
+ /** Extract the human-readable portion of a daemon session tag. */
5
+ export declare function parseSessionTitleFromTag(tag: string): string;
6
+ /**
7
+ * Resolve a session's current display title consistently across packages.
8
+ * User renames win over automatic metadata titles, which win over tag-derived
9
+ * names. Callers provide a context-specific final fallback when this is null.
10
+ */
11
+ export declare function resolveSessionTitle(opts: {
12
+ displayName?: string | null;
13
+ metadataTitle?: string | null;
14
+ tag: string;
15
+ }): string | null;
16
+ //# sourceMappingURL=sessionTitle.d.ts.map
@@ -0,0 +1 @@
1
+ "use strict";export function stripSessionTitleShortId(e){return/^[0-9a-f]{8}$/i.test(e)?"":e.replace(/-[0-9a-f]{8}$/i,"")}export function parseSessionTitleFromTag(e){const t=e.split(":"),r=t.length>=3?t.slice(2).join(":"):t[t.length-1]??"";return stripSessionTitleShortId(r)}export function resolveSessionTitle(e){return e.displayName?e.displayName:e.metadataTitle?e.metadataTitle:parseSessionTitleFromTag(e.tag)||null}