@myrialabs/clopen 0.3.13 → 0.3.15
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.
- package/backend/chat/stream-manager.ts +15 -0
- package/backend/engine/README.md +16 -1669
- package/backend/engine/adapters/claude/message-converter.ts +36 -7
- package/backend/engine/adapters/claude/models.ts +219 -4
- package/backend/engine/docs/adapter-contract.md +183 -0
- package/backend/engine/docs/adding-an-engine.md +150 -0
- package/backend/engine/docs/database.md +123 -0
- package/backend/engine/docs/frontend-and-chat.md +176 -0
- package/backend/engine/docs/lessons-learned.md +715 -0
- package/backend/engine/docs/quick-reference.md +36 -0
- package/backend/engine/docs/system-tools.md +82 -0
- package/backend/engine/docs/websocket-routes.md +240 -0
- package/backend/files/file-archive.test.ts +131 -0
- package/backend/files/file-archive.ts +89 -28
- package/backend/files/file-operations.ts +21 -1
- package/backend/files/file-reading.ts +1 -13
- package/backend/files/file-watcher.ts +117 -3
- package/backend/http/audio.ts +236 -0
- package/backend/index.ts +6 -0
- package/backend/projects/project-cleanup.ts +1 -1
- package/backend/tunnel/cloudflared/index.ts +3 -1
- package/backend/tunnel/cloudflared/tunnel.ts +42 -0
- package/backend/tunnel/global-tunnel-manager.ts +52 -1
- package/backend/utils/ws.ts +9 -0
- package/backend/ws/chat/stream.ts +46 -38
- package/backend/ws/files/search.ts +5 -2
- package/backend/ws/files/watch.ts +48 -19
- package/backend/ws/files/write.ts +17 -6
- package/dist/assets/main-CYVFcz-a.js +358 -0
- package/dist/assets/{main-BqiSLc8F.css → main-DrFILAEB.css} +1 -1
- package/dist/audio/alert.ogg +0 -0
- package/dist/audio/bell.ogg +0 -0
- package/dist/audio/blip.ogg +0 -0
- package/dist/audio/chirp.ogg +0 -0
- package/dist/audio/cloud.ogg +0 -0
- package/dist/audio/glass.ogg +0 -0
- package/dist/audio/message.ogg +0 -0
- package/dist/audio/sparkle.ogg +0 -0
- package/dist/audio/subtle.ogg +0 -0
- package/dist/audio/tap.ogg +0 -0
- package/dist/audio/woodblock.ogg +0 -0
- package/dist/index.html +2 -2
- package/package.json +2 -2
- package/shared/constants/notification-sounds.ts +31 -0
- package/shared/types/stores/settings.ts +4 -0
- package/shared/types/unified/index.ts +6 -0
- package/shared/types/unified/stream.ts +15 -1
- package/shared/types/unified/tool.ts +41 -1
- package/dist/assets/main-DOVudc3_.js +0 -354
- /package/dist/audio/{notification.ogg → chime.ogg} +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.html
CHANGED
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
}
|
|
59
59
|
})();
|
|
60
60
|
</script>
|
|
61
|
-
<script type="module" crossorigin src="/assets/main-
|
|
62
|
-
<link rel="stylesheet" crossorigin href="/assets/main-
|
|
61
|
+
<script type="module" crossorigin src="/assets/main-CYVFcz-a.js"></script>
|
|
62
|
+
<link rel="stylesheet" crossorigin href="/assets/main-DrFILAEB.css">
|
|
63
63
|
</head>
|
|
64
64
|
<body
|
|
65
65
|
class="min-h-dvh bg-white text-slate-900 dark:bg-slate-950 dark:text-slate-100 transition-colors duration-200"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myrialabs/clopen",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
4
4
|
"description": "All-in-one web workspace for Claude Code & OpenCode — chat, terminal, git, browser preview, checkpoints, and real-time collaboration",
|
|
5
5
|
"author": "Myria Labs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
63
63
|
"lint": "eslint .",
|
|
64
64
|
"lint:fix": "eslint . --fix",
|
|
65
|
-
"test": "bun test",
|
|
65
|
+
"test": "bun test --isolate",
|
|
66
66
|
"generate-icons": "bun scripts/generate-icons.ts",
|
|
67
67
|
"prepublishOnly": "bun run build"
|
|
68
68
|
},
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Notification sound presets bundled with the app (served from /audio/<id>.ogg). */
|
|
2
|
+
export const NOTIFICATION_SOUND_PRESETS = [
|
|
3
|
+
{ id: 'chime', label: 'Chime' },
|
|
4
|
+
{ id: 'message', label: 'Message' },
|
|
5
|
+
{ id: 'alert', label: 'Alert' },
|
|
6
|
+
{ id: 'chirp', label: 'Chirp' },
|
|
7
|
+
{ id: 'blip', label: 'Blip' },
|
|
8
|
+
{ id: 'tap', label: 'Tap' },
|
|
9
|
+
{ id: 'cloud', label: 'Cloud' },
|
|
10
|
+
{ id: 'subtle', label: 'Subtle' },
|
|
11
|
+
{ id: 'sparkle', label: 'Sparkle' },
|
|
12
|
+
{ id: 'glass', label: 'Glass' },
|
|
13
|
+
{ id: 'bell', label: 'Bell' },
|
|
14
|
+
{ id: 'woodblock', label: 'Woodblock' }
|
|
15
|
+
] as const;
|
|
16
|
+
|
|
17
|
+
export type NotificationSoundPresetId = (typeof NOTIFICATION_SOUND_PRESETS)[number]['id'];
|
|
18
|
+
|
|
19
|
+
/** Sentinel value for the user's uploaded custom sound. */
|
|
20
|
+
export const NOTIFICATION_SOUND_CUSTOM = 'custom';
|
|
21
|
+
|
|
22
|
+
/** Accepted upload extensions for custom notification sounds. */
|
|
23
|
+
export const NOTIFICATION_SOUND_ALLOWED_EXTS = ['mp3', 'ogg', 'wav', 'm4a'] as const;
|
|
24
|
+
export type NotificationSoundExt = (typeof NOTIFICATION_SOUND_ALLOWED_EXTS)[number];
|
|
25
|
+
|
|
26
|
+
/** Max custom sound size in bytes (500 KB). */
|
|
27
|
+
export const NOTIFICATION_SOUND_MAX_BYTES = 500 * 1024;
|
|
28
|
+
|
|
29
|
+
export function isValidNotificationSoundExt(ext: string): ext is NotificationSoundExt {
|
|
30
|
+
return (NOTIFICATION_SOUND_ALLOWED_EXTS as readonly string[]).includes(ext);
|
|
31
|
+
}
|
|
@@ -23,6 +23,10 @@ export interface AppSettings {
|
|
|
23
23
|
autoSave: boolean;
|
|
24
24
|
theme: 'light' | 'dark' | 'system';
|
|
25
25
|
soundNotifications: boolean;
|
|
26
|
+
/** Sound id — preset id (e.g. 'default', 'chime') or 'custom' for the user-uploaded file. */
|
|
27
|
+
notificationSound: string;
|
|
28
|
+
/** Playback volume, 0..1. Default: 1. */
|
|
29
|
+
notificationVolume: number;
|
|
26
30
|
pushNotifications: boolean;
|
|
27
31
|
layoutPresetVisibility: Record<string, boolean>;
|
|
28
32
|
/** Base font size in pixels (10–20). Default: 13. */
|
|
@@ -40,6 +40,11 @@ export type {
|
|
|
40
40
|
AskUserQuestionOption,
|
|
41
41
|
TodoWriteInput,
|
|
42
42
|
TodoItem,
|
|
43
|
+
TaskStatus,
|
|
44
|
+
TaskCreateInput,
|
|
45
|
+
TaskGetInput,
|
|
46
|
+
TaskUpdateInput,
|
|
47
|
+
TaskListInput,
|
|
43
48
|
AgentInput,
|
|
44
49
|
TaskOutputInput,
|
|
45
50
|
TaskStopInput,
|
|
@@ -123,6 +128,7 @@ export type {
|
|
|
123
128
|
McpServerStatus,
|
|
124
129
|
RateLimitEvent,
|
|
125
130
|
RateLimitType,
|
|
131
|
+
NotificationEvent,
|
|
126
132
|
EngineOutput,
|
|
127
133
|
StreamEventType,
|
|
128
134
|
StreamStatus,
|
|
@@ -101,6 +101,19 @@ export interface RateLimitEvent {
|
|
|
101
101
|
rateLimitType: RateLimitType | null;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Transient, non-persisted notification surfaced as a toast. Currently emitted
|
|
106
|
+
* for Claude background-task completion (SDKTaskNotificationMessage); the
|
|
107
|
+
* stream-manager routes it to a `chat:notification`.
|
|
108
|
+
*/
|
|
109
|
+
export interface NotificationEvent {
|
|
110
|
+
type: 'notification';
|
|
111
|
+
sessionId: string;
|
|
112
|
+
level: 'info' | 'warning' | 'error';
|
|
113
|
+
title: string;
|
|
114
|
+
message: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
104
117
|
// ============================================================
|
|
105
118
|
// Engine Output
|
|
106
119
|
// ============================================================
|
|
@@ -117,7 +130,8 @@ export type EngineOutput =
|
|
|
117
130
|
| StreamEvent
|
|
118
131
|
| ResultEvent
|
|
119
132
|
| SystemInitEvent
|
|
120
|
-
| RateLimitEvent
|
|
133
|
+
| RateLimitEvent
|
|
134
|
+
| NotificationEvent;
|
|
121
135
|
|
|
122
136
|
// ============================================================
|
|
123
137
|
// Stream Transport (WebSocket layer)
|
|
@@ -96,6 +96,34 @@ export interface TodoItem {
|
|
|
96
96
|
activeForm: string;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
/** Task tools (Claude Agent SDK 0.3.142+ — replace the now-default-off TodoWrite). */
|
|
100
|
+
export type TaskStatus = 'pending' | 'in_progress' | 'completed';
|
|
101
|
+
|
|
102
|
+
export interface TaskCreateInput {
|
|
103
|
+
subject: string;
|
|
104
|
+
description: string;
|
|
105
|
+
activeForm?: string;
|
|
106
|
+
metadata?: Record<string, unknown>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface TaskGetInput {
|
|
110
|
+
taskId: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface TaskUpdateInput {
|
|
114
|
+
taskId: string;
|
|
115
|
+
subject?: string;
|
|
116
|
+
description?: string;
|
|
117
|
+
activeForm?: string;
|
|
118
|
+
status?: TaskStatus | 'deleted';
|
|
119
|
+
addBlocks?: string[];
|
|
120
|
+
addBlockedBy?: string[];
|
|
121
|
+
owner?: string;
|
|
122
|
+
metadata?: Record<string, unknown>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface TaskListInput {}
|
|
126
|
+
|
|
99
127
|
export interface AgentInput {
|
|
100
128
|
prompt: string;
|
|
101
129
|
description: string;
|
|
@@ -105,6 +133,12 @@ export interface AgentInput {
|
|
|
105
133
|
isolation?: 'worktree';
|
|
106
134
|
runInBackground?: boolean;
|
|
107
135
|
resume?: string;
|
|
136
|
+
/** Addressable name for a spawned teammate (Claude SDK 0.3.148). */
|
|
137
|
+
name?: string;
|
|
138
|
+
/** Team to spawn into; uses current team context if omitted. */
|
|
139
|
+
teamName?: string;
|
|
140
|
+
/** Permission mode for the spawned teammate. */
|
|
141
|
+
mode?: 'acceptEdits' | 'auto' | 'bypassPermissions' | 'default' | 'dontAsk' | 'plan' | 'bubble';
|
|
108
142
|
}
|
|
109
143
|
|
|
110
144
|
export interface TaskOutputInput {
|
|
@@ -141,6 +175,8 @@ export interface ConfigInput {
|
|
|
141
175
|
|
|
142
176
|
export interface EnterWorktreeInput {
|
|
143
177
|
name?: string;
|
|
178
|
+
/** Switch into an existing worktree instead of creating one (Claude SDK 0.3.148). */
|
|
179
|
+
path?: string;
|
|
144
180
|
}
|
|
145
181
|
|
|
146
182
|
export interface EnterPlanModeInput {}
|
|
@@ -260,6 +296,10 @@ export interface ToolInputMap {
|
|
|
260
296
|
Agent: AgentInput;
|
|
261
297
|
TaskOutput: TaskOutputInput;
|
|
262
298
|
TaskStop: TaskStopInput;
|
|
299
|
+
TaskCreate: TaskCreateInput;
|
|
300
|
+
TaskGet: TaskGetInput;
|
|
301
|
+
TaskUpdate: TaskUpdateInput;
|
|
302
|
+
TaskList: TaskListInput;
|
|
263
303
|
// MCP
|
|
264
304
|
ListMcpResources: ListMcpResourcesInput;
|
|
265
305
|
ReadMcpResource: ReadMcpResourceInput;
|
|
@@ -300,7 +340,7 @@ export const CANONICAL_TOOL_NAMES = new Set<KnownToolName>([
|
|
|
300
340
|
'Glob', 'Grep', 'List',
|
|
301
341
|
'WebFetch', 'WebSearch',
|
|
302
342
|
'TodoWrite', 'AskUserQuestion', 'EnterPlanMode', 'ExitPlanMode',
|
|
303
|
-
'Agent', 'TaskOutput', 'TaskStop',
|
|
343
|
+
'Agent', 'TaskOutput', 'TaskStop', 'TaskCreate', 'TaskGet', 'TaskUpdate', 'TaskList',
|
|
304
344
|
'ListMcpResources', 'ReadMcpResource',
|
|
305
345
|
'Config', 'EnterWorktree', 'ExitWorktree', 'Skill', 'ToolSearch', 'Lsp',
|
|
306
346
|
'ScheduleWakeup', 'Monitor', 'PushNotification', 'RemoteTrigger',
|