mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 00:49:41 +02:00
chore: bump version to 0.1550
This commit is contained in:
+1
-12
@@ -8,12 +8,10 @@
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import { SAFE_PATH_PATTERN } from '../utils/regex-patterns.js';
|
||||
|
||||
// ========== Path Validation ==========
|
||||
|
||||
/** Regex to validate working directory paths (no shell metacharacters) — matches tmux-manager.ts */
|
||||
const SAFE_PATH_PATTERN = /^[a-zA-Z0-9_\/\-. ~]+$/;
|
||||
|
||||
/** Validate a path string: no shell metacharacters, no traversal, must be absolute */
|
||||
export function isValidWorkingDir(p: string): boolean {
|
||||
if (!p || !p.startsWith('/')) return false;
|
||||
@@ -80,15 +78,6 @@ export const RunPromptSchema = z.object({
|
||||
prompt: z.string().min(1).max(100000),
|
||||
});
|
||||
|
||||
/**
|
||||
* Schema for POST /api/sessions/:id/input
|
||||
* Sends input to an interactive session.
|
||||
*/
|
||||
export const SessionInputSchema = z.object({
|
||||
input: z.string(),
|
||||
useMux: z.boolean().optional(),
|
||||
});
|
||||
|
||||
/**
|
||||
* Schema for POST /api/sessions/:id/resize
|
||||
* Resizes a session's terminal.
|
||||
|
||||
Reference in New Issue
Block a user