mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
section 11: Phase 11: Internal session routes, ocm tool allow-list and
This commit is contained in:
1 parent
206113438c
commit
fc623fde96
10 files changed
+868
-2
No files matched your search
@@ -13,4 +13,5 @@ export * from './internal-assistant'
|
||||
export * from './session-pins'
|
||||
export * from './session-permissions'
|
||||
export * from './session-goals'
|
||||
export * from './internal-sessions'
|
||||
export * from './logs'
|
||||
@@ -0,0 +1,31 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const InternalCreateSessionRequestSchema = z
|
||||
.object({
|
||||
repoId: z.number().int(),
|
||||
prompt: z.string().trim().min(1).max(20000),
|
||||
title: z.string().max(200).optional(),
|
||||
model: z.string().optional(),
|
||||
agent: z.string().optional(),
|
||||
worktree: z.boolean().optional(),
|
||||
ref: z.string().optional(),
|
||||
})
|
||||
.strict();
|
||||
|
||||
export type InternalCreateSessionRequest = z.infer<typeof InternalCreateSessionRequestSchema>;
|
||||
|
||||
export const InternalSessionPromptRequestSchema = z
|
||||
.object({
|
||||
text: z.string().trim().min(1).max(20000),
|
||||
})
|
||||
.strict();
|
||||
|
||||
export type InternalSessionPromptRequest = z.infer<typeof InternalSessionPromptRequestSchema>;
|
||||
|
||||
export const InternalForkSessionRequestSchema = z
|
||||
.object({
|
||||
beforeMessageId: z.string().optional(),
|
||||
})
|
||||
.strict();
|
||||
|
||||
export type InternalForkSessionRequest = z.infer<typeof InternalForkSessionRequestSchema>;
|
||||
@@ -96,6 +96,10 @@ export const AssistantModeStatusSchema = z.object({
|
||||
path: z.string(),
|
||||
created: z.boolean(),
|
||||
}).optional(),
|
||||
sessionManagementSkill: z.object({
|
||||
path: z.string(),
|
||||
created: z.boolean(),
|
||||
}).optional(),
|
||||
defaultAgent: z.object({
|
||||
name: z.literal('assistant'),
|
||||
path: z.string(),
|
||||
|
||||
Reference in new issue
Block a user