@causyne/agent 1.20.124 → 1.20.128
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/bin/causyne.js +1 -1
- package/docs/THIRD_PARTY_NOTICES.md +36 -2
- package/package.json +6 -4
- package/src/acp/protocol.ts +19 -1
- package/src/acp/server.js +282 -8
- package/src/acp/server.ts +284 -8
- package/src/agent/abortableDelay.js +2 -2
- package/src/agent/abortableDelay.ts +2 -2
- package/src/agent/errorClassifier.js +9 -1
- package/src/agent/errorClassifier.ts +8 -1
- package/src/agentLoop.js +142 -53
- package/src/agentLoop.ts +151 -50
- package/src/approvalPolicy.js +34 -10
- package/src/approvalPolicy.ts +42 -11
- package/src/browser/causyneBrowser.js +61 -3
- package/src/browser/causyneBrowser.ts +65 -3
- package/src/browser/urlPolicy.js +14 -1
- package/src/browser/urlPolicy.ts +12 -1
- package/src/cliMode.js +21 -9
- package/src/cliMode.ts +20 -8
- package/src/commands.js +365 -45
- package/src/commands.ts +403 -45
- package/src/config.js +19 -4
- package/src/config.ts +18 -4
- package/src/core/contextCompactor.js +54 -7
- package/src/core/contextCompactor.ts +63 -7
- package/src/core/goalLoop.js +257 -0
- package/src/core/goalLoop.ts +310 -0
- package/src/entrypoint.js +135 -3
- package/src/entrypoint.ts +136 -3
- package/src/game/causyneCoreBridge.js +686 -0
- package/src/game/causyneCoreBridge.ts +702 -0
- package/src/game/gameLauncher.js +287 -0
- package/src/game/gameLauncher.ts +352 -0
- package/src/game/gameProvisioner.js +425 -0
- package/src/game/gameProvisioner.ts +488 -0
- package/src/headlessCli.js +19 -12
- package/src/headlessCli.ts +22 -8
- package/src/infra/atomicWriter.js +40 -4
- package/src/infra/atomicWriter.ts +36 -4
- package/src/launchIntent.js +73 -3
- package/src/launchIntent.ts +76 -3
- package/src/lsp/lspClient.js +83 -12
- package/src/lsp/lspClient.ts +75 -12
- package/src/mcp/mcpRegistry.js +75 -8
- package/src/mcp/mcpRegistry.ts +70 -7
- package/src/memory/contextBudget.js +2 -0
- package/src/memory/contextBudget.ts +1 -0
- package/src/memory/episodicStore.js +40 -0
- package/src/memory/episodicStore.ts +46 -0
- package/src/memory.js +67 -0
- package/src/memory.ts +65 -0
- package/src/modelVariants.js +45 -0
- package/src/modelVariants.ts +54 -0
- package/src/outputRecovery.js +3 -2
- package/src/outputRecovery.ts +4 -2
- package/src/permissionPresets.js +327 -0
- package/src/permissionPresets.ts +361 -0
- package/src/personalization.js +365 -0
- package/src/personalization.ts +471 -0
- package/src/projectInstructions.js +30 -10
- package/src/projectInstructions.ts +31 -12
- package/src/providers/acp.js +3 -2
- package/src/providers/acp.ts +3 -2
- package/src/providers/antigravity.js +64 -9
- package/src/providers/antigravity.ts +75 -9
- package/src/providers/byokHttp.js +7 -1
- package/src/providers/byokHttp.ts +6 -1
- package/src/providers/byokStream.js +21 -8
- package/src/providers/byokStream.ts +17 -7
- package/src/providers/dashscope-byok.js +21 -5
- package/src/providers/dashscope-byok.ts +29 -11
- package/src/providers/moonshot.js +26 -7
- package/src/providers/moonshot.ts +34 -13
- package/src/providers/muse.js +6 -0
- package/src/providers/muse.ts +8 -0
- package/src/providers/ollama.js +39 -7
- package/src/providers/ollama.ts +36 -7
- package/src/providers/openai-compatible.js +16 -3
- package/src/providers/openai-compatible.ts +13 -3
- package/src/providers/openai.js +62 -4
- package/src/providers/openai.ts +50 -4
- package/src/providers/openrouter.js +19 -4
- package/src/providers/openrouter.ts +21 -4
- package/src/providers/qwen-byok.js +21 -5
- package/src/providers/qwen-byok.ts +29 -11
- package/src/providers/xai.js +26 -10
- package/src/providers/xai.ts +34 -16
- package/src/reporting.js +4 -2
- package/src/reporting.ts +4 -2
- package/src/sandbox.js +34 -0
- package/src/sandbox.ts +43 -0
- package/src/scheduler/scheduler.js +372 -0
- package/src/scheduler/scheduler.ts +433 -0
- package/src/sessionSearchIndex.js +267 -0
- package/src/sessionSearchIndex.ts +311 -0
- package/src/skillsManager.js +2 -3
- package/src/skillsManager.ts +2 -3
- package/src/toolPacks.js +6 -0
- package/src/toolPacks.ts +6 -0
- package/src/tools/applyPatch.js +1 -1
- package/src/tools/applyPatch.ts +1 -1
- package/src/tools/generateMediaViaApi.js +4 -3
- package/src/tools/generateMediaViaApi.ts +4 -3
- package/src/tools/memoryWrite.js +15 -1
- package/src/tools/memoryWrite.ts +16 -1
- package/src/tools/nativeEngine.js +2 -2
- package/src/tools/nativeEngine.ts +2 -2
- package/src/tools/openSourceToolProvisioner.js +2 -2
- package/src/tools/openSourceToolProvisioner.ts +2 -2
- package/src/tools/osSandbox.js +1 -1
- package/src/tools/osSandbox.ts +1 -1
- package/src/tools/payloadSanitizer.js +0 -1
- package/src/tools/payloadSanitizer.ts +0 -1
- package/src/tools/pdfReader.js +122 -20
- package/src/tools/pdfReader.ts +111 -20
- package/src/tools/presentDeliverable.js +103 -0
- package/src/tools/presentDeliverable.ts +127 -0
- package/src/tools/ptcRuntime.js +444 -0
- package/src/tools/ptcRuntime.ts +490 -0
- package/src/tools/ptyTerminal.js +1108 -0
- package/src/tools/ptyTerminal.ts +1245 -0
- package/src/tools/registry.js +21 -12
- package/src/tools/registry.ts +21 -12
- package/src/tools/toolOutputStore.js +26 -4
- package/src/tools/toolOutputStore.ts +22 -4
- package/src/tools/webFetch.js +158 -11
- package/src/tools/webFetch.ts +145 -11
- package/src/tools/webSearch.js +123 -36
- package/src/tools/webSearch.ts +124 -33
- package/src/tui/banner.js +5 -1
- package/src/tui/banner.ts +6 -1
- package/src/tui/chatRenderer.js +1 -2
- package/src/tui/chatRenderer.ts +1 -2
- package/src/tui/completion.js +1 -0
- package/src/tui/completion.ts +1 -0
- package/src/tui/composerControls.js +111 -27
- package/src/tui/composerControls.ts +124 -28
- package/src/tui/dialogs.js +3 -16
- package/src/tui/dialogs.ts +3 -16
- package/src/tui/home.js +1 -0
- package/src/tui/home.ts +1 -0
- package/src/tui/invocation.js +1 -2
- package/src/tui/invocation.ts +1 -2
- package/src/tui/modelPicker.js +22 -12
- package/src/tui/modelPicker.ts +22 -12
- package/src/tui/overlay.js +2 -5
- package/src/tui/overlay.ts +2 -5
- package/src/tui/prompt.js +6 -4
- package/src/tui/prompt.ts +6 -4
- package/src/tui/selectList.js +4 -12
- package/src/tui/selectList.ts +4 -12
- package/src/tui/setup.js +22 -9
- package/src/tui/setup.ts +26 -9
- package/src/tui/statusLine.ts +2 -0
- package/src/web/client/browserPanel.js +905 -0
- package/src/web/client/browserPanel.ts +872 -0
- package/src/web/client/chatStream.js +321 -0
- package/src/web/client/chatStream.ts +297 -0
- package/src/web/client/cliPanel.js +165 -0
- package/src/web/client/cliPanel.ts +171 -0
- package/src/web/client/composer.js +204 -0
- package/src/web/client/composer.ts +209 -0
- package/src/web/client/diffPanel.js +176 -0
- package/src/web/client/diffPanel.ts +203 -0
- package/src/web/client/dom.js +271 -0
- package/src/web/client/dom.ts +272 -0
- package/src/web/client/filesAndCanvas.js +233 -0
- package/src/web/client/filesAndCanvas.ts +240 -0
- package/src/web/client/gameLauncherUi.js +78 -0
- package/src/web/client/gameLauncherUi.ts +78 -0
- package/src/web/client/main.js +316 -0
- package/src/web/client/main.ts +391 -0
- package/src/web/client/markdown.js +364 -0
- package/src/web/client/markdown.ts +373 -0
- package/src/web/client/modelPicker.js +455 -0
- package/src/web/client/modelPicker.ts +451 -0
- package/src/web/client/permissionPresetsUi.js +307 -0
- package/src/web/client/permissionPresetsUi.ts +333 -0
- package/src/web/client/sessions.js +353 -0
- package/src/web/client/sessions.ts +372 -0
- package/src/web/client/settingsModal.js +824 -0
- package/src/web/client/settingsModal.ts +959 -0
- package/src/web/client/state.js +280 -0
- package/src/web/client/state.ts +259 -0
- package/src/web/client/streamSmoother.js +127 -0
- package/src/web/client/streamSmoother.ts +119 -0
- package/src/web/client/studioLayout.js +89 -0
- package/src/web/client/studioLayout.ts +103 -0
- package/src/web/client/studioShell.js +660 -0
- package/src/web/client/studioShell.ts +672 -0
- package/src/web/client/studioStart.js +77 -0
- package/src/web/client/studioStart.ts +89 -0
- package/src/web/client/terminalPanel.js +606 -0
- package/src/web/client/terminalPanel.ts +632 -0
- package/src/web/client/terminalTheme.js +249 -0
- package/src/web/client/terminalTheme.ts +258 -0
- package/src/web/client/turnView.js +934 -0
- package/src/web/client/turnView.ts +981 -0
- package/src/web/client/types.js +1 -0
- package/src/web/client/types.ts +322 -0
- package/src/web/client/validators.js +147 -0
- package/src/web/client/validators.ts +140 -0
- package/src/web/server/activeRuns.js +152 -0
- package/src/web/server/activeRuns.ts +171 -0
- package/src/web/server/routesBrowser.js +409 -0
- package/src/web/server/routesBrowser.ts +435 -0
- package/src/web/server/routesChat.js +304 -0
- package/src/web/server/routesChat.ts +347 -0
- package/src/web/server/routesCore.js +472 -0
- package/src/web/server/routesCore.ts +522 -0
- package/src/web/server/routesSettings.js +344 -0
- package/src/web/server/routesSettings.ts +397 -0
- package/src/web/server/routesTerminal.js +162 -0
- package/src/web/server/routesTerminal.ts +182 -0
- package/src/web/server/routesWorkspace.js +510 -0
- package/src/web/server/routesWorkspace.ts +546 -0
- package/src/web/server/security.js +98 -0
- package/src/web/server/security.ts +108 -0
- package/src/web/server/sessionTranscript.js +586 -0
- package/src/web/server/sessionTranscript.ts +566 -0
- package/src/web/server/staticAssets.js +104 -0
- package/src/web/server/staticAssets.ts +116 -0
- package/src/web/server/types.js +1 -0
- package/src/web/server/types.ts +135 -0
- package/src/web/server/workspaceFiles.js +368 -0
- package/src/web/server/workspaceFiles.ts +363 -0
- package/src/web/skybridgeServer.js +78 -2448
- package/src/web/skybridgeServer.ts +120 -2600
- package/src/web/skybridgeUi.js +20 -450
- package/src/web/skybridgeUi.ts +24 -455
- package/src/web/styles/agent.css +380 -0
- package/src/web/styles/composer.css +193 -0
- package/src/web/styles/overlays.css +935 -0
- package/src/web/styles/shell.css +387 -0
- package/src/web/styles/studio.css +951 -0
- package/src/web/styles/thread.css +221 -0
- package/src/web/styles/tokens.css +94 -0
- package/src/web/ui/brandMark.js +73 -0
- package/src/web/ui/brandMark.ts +82 -0
- package/src/web/ui/modalsTemplate.js +388 -0
- package/src/web/ui/modalsTemplate.ts +388 -0
- package/src/web/ui/sidebarTemplate.js +63 -0
- package/src/web/ui/sidebarTemplate.ts +64 -0
- package/src/web/ui/studioTemplate.js +256 -0
- package/src/web/ui/studioTemplate.ts +256 -0
- package/src/web/ui/workspaceTemplate.js +72 -0
- package/src/web/ui/workspaceTemplate.ts +73 -0
- package/src/worktreeManager.js +16 -1
- package/src/worktreeManager.ts +22 -1
- package/src/web/skybridgeClientScript.js +0 -3951
- package/src/web/skybridgeClientScript.ts +0 -3952
- package/src/web/skybridgeStyles.js +0 -827
- package/src/web/skybridgeStyles.ts +0 -828
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/* Conversation Thread, Motion System, Markdown Prose & Code Cards */
|
|
2
|
+
@keyframes df-body-fade-in { 0% { opacity: 0.01; } to { opacity: 1; } }
|
|
3
|
+
@keyframes cds-morph-in { 0% { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
|
|
4
|
+
@keyframes fade-in-text { 0% { opacity: 0; } to { opacity: 1; } }
|
|
5
|
+
@keyframes timeline-block-enter {
|
|
6
|
+
0% { opacity: 0; filter: blur(3px); transform: translateY(4px) scale(0.97); }
|
|
7
|
+
100% { opacity: 1; filter: none; transform: none; }
|
|
8
|
+
}
|
|
9
|
+
@keyframes dframe-clay-breathe {
|
|
10
|
+
0%, 100% { opacity: 0.55; transform: scale(0.84); }
|
|
11
|
+
50% { opacity: 1; transform: scale(1.04); }
|
|
12
|
+
}
|
|
13
|
+
@keyframes dframe-dot-pulse {
|
|
14
|
+
0%, 100% { opacity: 0.35; }
|
|
15
|
+
45% { opacity: 1; }
|
|
16
|
+
}
|
|
17
|
+
@keyframes thinking-shimmer {
|
|
18
|
+
0% { background-position: 180% 0; }
|
|
19
|
+
100% { background-position: -180% 0; }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.thread-wrap {
|
|
23
|
+
flex: 1;
|
|
24
|
+
min-height: 0;
|
|
25
|
+
width: 100%;
|
|
26
|
+
overflow-y: auto;
|
|
27
|
+
padding: 14px 20px 44px;
|
|
28
|
+
scroll-behavior: auto;
|
|
29
|
+
}
|
|
30
|
+
.thread {
|
|
31
|
+
width: 100%;
|
|
32
|
+
max-width: var(--thread-w);
|
|
33
|
+
margin: 0 auto;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: 24px;
|
|
37
|
+
}
|
|
38
|
+
.thread.chat-fade-in { animation: df-body-fade-in 0.22s ease-out; }
|
|
39
|
+
.turn { display: flex; flex-direction: column; gap: 8px; }
|
|
40
|
+
.turn.turn-enter { animation: cds-morph-in 0.22s cubic-bezier(0.19, 1, 0.22, 1) backwards; }
|
|
41
|
+
.turn.user { align-items: flex-end; }
|
|
42
|
+
.user-bubble {
|
|
43
|
+
max-width: 78%;
|
|
44
|
+
background: var(--surface-2);
|
|
45
|
+
color: var(--text);
|
|
46
|
+
padding: 10px 16px;
|
|
47
|
+
border-radius: 20px;
|
|
48
|
+
white-space: pre-wrap;
|
|
49
|
+
word-break: break-word;
|
|
50
|
+
font-size: 14.5px;
|
|
51
|
+
line-height: 1.55;
|
|
52
|
+
}
|
|
53
|
+
.user-actions { display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity 0.14s ease; }
|
|
54
|
+
.turn.user:hover .user-actions, .turn.user:focus-within .user-actions { opacity: 1; }
|
|
55
|
+
.thread-spacer { width: 100%; flex-shrink: 0; pointer-events: none; transition: height 0.12s ease-out; }
|
|
56
|
+
.attach-line { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
|
|
57
|
+
.attach-tag {
|
|
58
|
+
font-size: 12px;
|
|
59
|
+
padding: 2px 9px;
|
|
60
|
+
border-radius: 6px;
|
|
61
|
+
background: var(--surface);
|
|
62
|
+
border: 1px solid var(--border);
|
|
63
|
+
color: var(--text-2);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.assistant-row { display: flex; align-items: flex-start; gap: 14px; width: 100%; }
|
|
67
|
+
.assistant-avatar {
|
|
68
|
+
width: 28px;
|
|
69
|
+
height: 28px;
|
|
70
|
+
border-radius: 50%;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
background: transparent;
|
|
73
|
+
border: 1px solid transparent;
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
margin-top: 1px;
|
|
78
|
+
transition: border-color 0.2s ease, opacity 0.2s ease;
|
|
79
|
+
}
|
|
80
|
+
.assistant-avatar svg { width: 22px; height: 22px; }
|
|
81
|
+
.turn-live-row {
|
|
82
|
+
display: none;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: 9px;
|
|
85
|
+
padding: 6px 2px 2px;
|
|
86
|
+
color: var(--text-2);
|
|
87
|
+
font-size: 13px;
|
|
88
|
+
line-height: 1.3;
|
|
89
|
+
}
|
|
90
|
+
.turn-live-row.is-active { display: inline-flex; animation: cds-morph-in 0.2s ease-out; }
|
|
91
|
+
.turn-live-mark {
|
|
92
|
+
width: 20px;
|
|
93
|
+
height: 20px;
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
flex-shrink: 0;
|
|
98
|
+
}
|
|
99
|
+
.turn-live-mark svg { width: 20px; height: 20px; }
|
|
100
|
+
.turn-live-label {
|
|
101
|
+
font-size: 13px;
|
|
102
|
+
font-weight: 500;
|
|
103
|
+
letter-spacing: -0.01em;
|
|
104
|
+
background: linear-gradient(90deg, var(--text-dim) 0%, var(--text) 45%, #ABDB5F 55%, var(--text-dim) 100%);
|
|
105
|
+
background-size: 220% 100%;
|
|
106
|
+
-webkit-background-clip: text;
|
|
107
|
+
background-clip: text;
|
|
108
|
+
color: transparent;
|
|
109
|
+
animation: thinking-shimmer 2.4s linear infinite;
|
|
110
|
+
}
|
|
111
|
+
:root[data-theme="light"] .turn-live-label {
|
|
112
|
+
background: linear-gradient(90deg, #646b62 0%, #141714 45%, #55821a 55%, #646b62 100%);
|
|
113
|
+
background-size: 220% 100%;
|
|
114
|
+
-webkit-background-clip: text;
|
|
115
|
+
background-clip: text;
|
|
116
|
+
color: transparent;
|
|
117
|
+
}
|
|
118
|
+
.assistant-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
|
|
119
|
+
.assistant-col > :empty { display: none !important; }
|
|
120
|
+
.assistant-prose { color: var(--text); font-size: 15px; line-height: 1.68; word-break: break-word; }
|
|
121
|
+
.assistant-prose > * { contain: layout; }
|
|
122
|
+
.assistant-prose > .md-table-wrap { contain: none; }
|
|
123
|
+
.assistant-prose p { margin: 0 0 12px; }
|
|
124
|
+
.assistant-prose p:last-child { margin-bottom: 0; }
|
|
125
|
+
.assistant-prose h1, .assistant-prose h2, .assistant-prose h3, .assistant-prose h4 {
|
|
126
|
+
font-weight: 600;
|
|
127
|
+
margin: 16px 0 8px;
|
|
128
|
+
line-height: 1.3;
|
|
129
|
+
color: var(--text);
|
|
130
|
+
}
|
|
131
|
+
.assistant-prose h1 { font-size: 1.32em; }
|
|
132
|
+
.assistant-prose h2 { font-size: 1.18em; }
|
|
133
|
+
.assistant-prose h3 { font-size: 1.06em; }
|
|
134
|
+
.assistant-prose ul, .assistant-prose ol { margin: 0 0 12px; padding-left: 22px; }
|
|
135
|
+
.assistant-prose li { margin: 4px 0; }
|
|
136
|
+
.assistant-prose blockquote {
|
|
137
|
+
margin: 10px 0;
|
|
138
|
+
padding: 6px 14px;
|
|
139
|
+
border-left: 2px solid var(--border-strong);
|
|
140
|
+
color: var(--text-2);
|
|
141
|
+
}
|
|
142
|
+
.assistant-prose hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
|
|
143
|
+
.assistant-prose a { color: var(--lime); text-decoration: underline; text-underline-offset: 2px; }
|
|
144
|
+
.assistant-prose code.inline-code {
|
|
145
|
+
font: 0.88em var(--font-mono);
|
|
146
|
+
padding: 2px 5px;
|
|
147
|
+
border-radius: 5px;
|
|
148
|
+
background: var(--surface-2);
|
|
149
|
+
}
|
|
150
|
+
.md-file-chip {
|
|
151
|
+
display: inline-flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
gap: 5px;
|
|
154
|
+
max-width: 100%;
|
|
155
|
+
padding: 1px 7px;
|
|
156
|
+
margin: 0 1px;
|
|
157
|
+
border-radius: 6px;
|
|
158
|
+
border: 1px solid var(--border);
|
|
159
|
+
background: var(--surface);
|
|
160
|
+
color: var(--text);
|
|
161
|
+
font: 12.5px/1.45 var(--font-mono);
|
|
162
|
+
vertical-align: baseline;
|
|
163
|
+
transition: background 0.14s ease, border-color 0.14s ease;
|
|
164
|
+
}
|
|
165
|
+
.md-file-chip:hover { background: var(--surface-2); border-color: var(--border-strong); }
|
|
166
|
+
.md-file-chip.is-static { cursor: default; color: var(--text-2); }
|
|
167
|
+
.md-file-chip svg {
|
|
168
|
+
width: 12px;
|
|
169
|
+
height: 12px;
|
|
170
|
+
stroke: var(--text-dim);
|
|
171
|
+
fill: none;
|
|
172
|
+
stroke-width: 1.8;
|
|
173
|
+
stroke-linecap: round;
|
|
174
|
+
stroke-linejoin: round;
|
|
175
|
+
flex-shrink: 0;
|
|
176
|
+
}
|
|
177
|
+
.md-file-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
178
|
+
.md-file-chip-line { color: var(--text-dim); font-size: 11.5px; flex-shrink: 0; }
|
|
179
|
+
.stream-fade { animation: fade-in-text 0.15s linear backwards; }
|
|
180
|
+
.md-table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: 8px; }
|
|
181
|
+
.md-table { width: 100%; border-collapse: collapse; font-size: 13.5px; word-break: normal; }
|
|
182
|
+
.md-table th, .md-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; }
|
|
183
|
+
.md-table th { background: var(--surface); font-weight: 500; color: var(--text); white-space: nowrap; }
|
|
184
|
+
.md-table tr:last-child td { border-bottom: none; }
|
|
185
|
+
|
|
186
|
+
/* Code Block Chrome */
|
|
187
|
+
.code-card {
|
|
188
|
+
margin: 12px 0;
|
|
189
|
+
border: 1px solid var(--border);
|
|
190
|
+
border-radius: 10px;
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
background: #0d0f0d;
|
|
193
|
+
}
|
|
194
|
+
:root[data-theme="light"] .code-card { background: #191d18; color: #ecefe9; }
|
|
195
|
+
.code-head {
|
|
196
|
+
display: flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
justify-content: space-between;
|
|
199
|
+
padding: 7px 12px;
|
|
200
|
+
background: rgba(255, 255, 255, 0.03);
|
|
201
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.07);
|
|
202
|
+
font-size: 12px;
|
|
203
|
+
color: #a0a79c;
|
|
204
|
+
}
|
|
205
|
+
.code-head-actions { display: inline-flex; gap: 4px; }
|
|
206
|
+
.code-btn {
|
|
207
|
+
border: none;
|
|
208
|
+
background: transparent;
|
|
209
|
+
color: #c4cbc0;
|
|
210
|
+
border-radius: 6px;
|
|
211
|
+
padding: 3px 8px;
|
|
212
|
+
font-size: 12px;
|
|
213
|
+
}
|
|
214
|
+
.code-btn:hover { background: rgba(255, 255, 255, 0.09); color: #ffffff; }
|
|
215
|
+
.code-pre {
|
|
216
|
+
margin: 0;
|
|
217
|
+
padding: 13px 14px;
|
|
218
|
+
overflow-x: auto;
|
|
219
|
+
font: 12.8px/1.55 var(--font-mono);
|
|
220
|
+
color: #e4e8e0;
|
|
221
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* Causyne Web Interface — Theme Tokens, Typography & Global Base */
|
|
2
|
+
:root {
|
|
3
|
+
--bg: #141714;
|
|
4
|
+
--sidebar-bg: #101310;
|
|
5
|
+
--surface: #1b1f1b;
|
|
6
|
+
--surface-2: #232823;
|
|
7
|
+
--surface-3: #2c322c;
|
|
8
|
+
--popover-bg: #1c201c;
|
|
9
|
+
--border: rgba(255, 255, 255, 0.08);
|
|
10
|
+
--border-strong: rgba(255, 255, 255, 0.14);
|
|
11
|
+
--text: #ecefe9;
|
|
12
|
+
--text-2: #a0a79c;
|
|
13
|
+
--text-dim: #70776c;
|
|
14
|
+
--lime: #B5D66A;
|
|
15
|
+
--lime-hover: #c5e37e;
|
|
16
|
+
--lime-ink: #12170c;
|
|
17
|
+
--lime-soft: rgba(181, 214, 106, 0.10);
|
|
18
|
+
--ok: #68c98a;
|
|
19
|
+
--warn: #e5b85c;
|
|
20
|
+
--err: #e57373;
|
|
21
|
+
--diff-add-bg: rgba(104, 201, 138, 0.11);
|
|
22
|
+
--diff-del-bg: rgba(229, 115, 115, 0.12);
|
|
23
|
+
--shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
|
|
24
|
+
--font-display: "Exo 2", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
25
|
+
--font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
26
|
+
--font-mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, monospace;
|
|
27
|
+
--sidebar-w: 256px;
|
|
28
|
+
--studio-w: 480px;
|
|
29
|
+
--thread-w: 740px;
|
|
30
|
+
--composer-w: 700px;
|
|
31
|
+
--topbar-h: 52px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:root[data-theme="light"] {
|
|
35
|
+
--bg: #ffffff;
|
|
36
|
+
--sidebar-bg: #f6f7f5;
|
|
37
|
+
--surface: #f4f5f2;
|
|
38
|
+
--surface-2: #eaede8;
|
|
39
|
+
--surface-3: #dfe3dc;
|
|
40
|
+
--popover-bg: #ffffff;
|
|
41
|
+
--border: rgba(20, 23, 20, 0.08);
|
|
42
|
+
--border-strong: rgba(20, 23, 20, 0.15);
|
|
43
|
+
--text: #181b17;
|
|
44
|
+
--text-2: #52594f;
|
|
45
|
+
--text-dim: #7b8277;
|
|
46
|
+
--lime: #4c7417;
|
|
47
|
+
--lime-hover: #3d6011;
|
|
48
|
+
--lime-ink: #ffffff;
|
|
49
|
+
--lime-soft: rgba(76, 116, 23, 0.09);
|
|
50
|
+
--ok: #1f8a4c;
|
|
51
|
+
--warn: #b2780c;
|
|
52
|
+
--err: #c93b3b;
|
|
53
|
+
--diff-add-bg: rgba(31, 138, 76, 0.09);
|
|
54
|
+
--diff-del-bg: rgba(201, 59, 59, 0.09);
|
|
55
|
+
--shadow: 0 10px 26px rgba(18, 24, 16, 0.10);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
59
|
+
|
|
60
|
+
html, body {
|
|
61
|
+
margin: 0;
|
|
62
|
+
padding: 0;
|
|
63
|
+
height: 100%;
|
|
64
|
+
background: var(--bg);
|
|
65
|
+
color: var(--text);
|
|
66
|
+
font: 14px/1.55 var(--font-sans);
|
|
67
|
+
-webkit-font-smoothing: antialiased;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
::selection { background: var(--lime); color: var(--lime-ink); }
|
|
72
|
+
button, input, textarea, select { font: inherit; color: inherit; }
|
|
73
|
+
button { cursor: pointer; }
|
|
74
|
+
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
|
|
75
|
+
outline: 1.5px solid var(--border-strong);
|
|
76
|
+
outline-offset: 1px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
|
|
80
|
+
*::-webkit-scrollbar { width: 6px; height: 6px; }
|
|
81
|
+
*::-webkit-scrollbar-track { background: transparent; }
|
|
82
|
+
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
|
|
83
|
+
*::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
|
|
84
|
+
|
|
85
|
+
.sr-only {
|
|
86
|
+
position: absolute;
|
|
87
|
+
width: 1px;
|
|
88
|
+
height: 1px;
|
|
89
|
+
padding: 0;
|
|
90
|
+
margin: -1px;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
clip: rect(0, 0, 0, 0);
|
|
93
|
+
border: 0;
|
|
94
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const CAUSYNE_BLADE_PATHS = [
|
|
2
|
+
{
|
|
3
|
+
cls: 'b1',
|
|
4
|
+
fill: '#ABDB5F',
|
|
5
|
+
d: 'M 682.32,144.33 A 29.64,29.64 0 0 1 723.52,132.42 L 1071.15,334.84 A 31.71,31.71 0 0 1 1058.12,393.82 L 542.17,441.63 A 8.50,8.50 0 0 1 533.85,429.23 Z'
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
cls: 'b2',
|
|
9
|
+
fill: '#383D45',
|
|
10
|
+
d: 'M 1104.54,837.92 A 39.43,39.43 0 0 1 1033.41,861.10 L 741.14,466.14 A 14.97,14.97 0 0 1 751.86,442.32 L 1066.59,414.57 A 37.43,37.43 0 0 1 1107.30,452.12 Z'
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
cls: 'b3',
|
|
14
|
+
fill: '#383D45',
|
|
15
|
+
d: 'M 828.50,645.61 A 8.50,8.50 0 0 1 842.76,644.60 L 1029.91,895.29 A 32.64,32.64 0 0 1 1019.14,943.60 L 647.88,1141.98 A 43.37,43.37 0 0 1 589.39,1082.93 Z'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
cls: 'b4',
|
|
19
|
+
fill: '#383D45',
|
|
20
|
+
d: 'M 553.56,1101.63 A 30.36,30.36 0 0 1 510.70,1112.54 L 183.70,904.44 A 38.88,38.88 0 0 1 201.08,832.92 L 696.78,788.28 A 16.97,16.97 0 0 1 713.14,813.39 Z'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
cls: 'b5',
|
|
24
|
+
fill: '#383D45',
|
|
25
|
+
d: 'M 510.57,758.90 A 13.28,13.28 0 0 1 501.43,780.14 L 179.80,814.91 A 30.67,30.67 0 0 1 145.84,784.23 L 148.24,400.27 A 39.69,39.69 0 0 1 219.51,376.48 Z'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
cls: 'b6',
|
|
29
|
+
fill: '#383D45',
|
|
30
|
+
d: 'M 426.44,590.45 A 8.50,8.50 0 0 1 412.13,591.67 L 218.19,336.46 A 28.65,28.65 0 0 1 227.41,293.90 L 598.25,93.95 A 41.84,41.84 0 0 1 655.24,150.07 Z'
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
export function escapeHtmlAttr(value) {
|
|
34
|
+
return value
|
|
35
|
+
.replace(/&/g, '&')
|
|
36
|
+
.replace(/</g, '<')
|
|
37
|
+
.replace(/>/g, '>')
|
|
38
|
+
.replace(/"/g, '"')
|
|
39
|
+
.replace(/'/g, ''');
|
|
40
|
+
}
|
|
41
|
+
export function getCausyneFaviconSvg() {
|
|
42
|
+
const outlines = CAUSYNE_BLADE_PATHS.map((b) => ` <path d="${b.d}"/>`).join('\n');
|
|
43
|
+
const fills = CAUSYNE_BLADE_PATHS.map((b) => ` <path fill="${b.fill}" d="${b.d}"/>`).join('\n');
|
|
44
|
+
return [
|
|
45
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1254 1254" width="1254" height="1254">',
|
|
46
|
+
' <title>Causyne</title>',
|
|
47
|
+
' <g fill="none" stroke="#FFFFFF" stroke-width="16" stroke-linejoin="round" stroke-linecap="round">',
|
|
48
|
+
outlines,
|
|
49
|
+
' </g>',
|
|
50
|
+
' <g>',
|
|
51
|
+
fills,
|
|
52
|
+
' </g>',
|
|
53
|
+
'</svg>'
|
|
54
|
+
].join('\n');
|
|
55
|
+
}
|
|
56
|
+
export function renderCausyneMarkSvg(idAttr, extraClass) {
|
|
57
|
+
const idPart = idAttr ? ` id="${idAttr}"` : '';
|
|
58
|
+
const cls = extraClass ? `brand-mark causyne-aperture ${extraClass}` : 'brand-mark causyne-aperture';
|
|
59
|
+
const outlines = CAUSYNE_BLADE_PATHS.map((b) => `<path d="${b.d}"/>`).join('');
|
|
60
|
+
const fills = CAUSYNE_BLADE_PATHS.map((b) => `<path class="causyne-blade ${b.cls}" fill="${b.fill}" d="${b.d}"/>`).join('');
|
|
61
|
+
return [
|
|
62
|
+
`<svg${idPart} class="${cls}" viewBox="0 0 1254 1254" aria-hidden="true">`,
|
|
63
|
+
'<g class="causyne-rotor">',
|
|
64
|
+
'<g class="causyne-outline" fill="none" stroke="#FFFFFF" stroke-width="18" stroke-linejoin="round" stroke-linecap="round">',
|
|
65
|
+
outlines,
|
|
66
|
+
'</g>',
|
|
67
|
+
'<g class="causyne-blades">',
|
|
68
|
+
fills,
|
|
69
|
+
'</g>',
|
|
70
|
+
'</g>',
|
|
71
|
+
'</svg>'
|
|
72
|
+
].join('\n');
|
|
73
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export interface CausyneBladePath {
|
|
2
|
+
readonly cls: string;
|
|
3
|
+
readonly fill: string;
|
|
4
|
+
readonly d: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const CAUSYNE_BLADE_PATHS: readonly CausyneBladePath[] = [
|
|
8
|
+
{
|
|
9
|
+
cls: 'b1',
|
|
10
|
+
fill: '#ABDB5F',
|
|
11
|
+
d: 'M 682.32,144.33 A 29.64,29.64 0 0 1 723.52,132.42 L 1071.15,334.84 A 31.71,31.71 0 0 1 1058.12,393.82 L 542.17,441.63 A 8.50,8.50 0 0 1 533.85,429.23 Z'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
cls: 'b2',
|
|
15
|
+
fill: '#383D45',
|
|
16
|
+
d: 'M 1104.54,837.92 A 39.43,39.43 0 0 1 1033.41,861.10 L 741.14,466.14 A 14.97,14.97 0 0 1 751.86,442.32 L 1066.59,414.57 A 37.43,37.43 0 0 1 1107.30,452.12 Z'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
cls: 'b3',
|
|
20
|
+
fill: '#383D45',
|
|
21
|
+
d: 'M 828.50,645.61 A 8.50,8.50 0 0 1 842.76,644.60 L 1029.91,895.29 A 32.64,32.64 0 0 1 1019.14,943.60 L 647.88,1141.98 A 43.37,43.37 0 0 1 589.39,1082.93 Z'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
cls: 'b4',
|
|
25
|
+
fill: '#383D45',
|
|
26
|
+
d: 'M 553.56,1101.63 A 30.36,30.36 0 0 1 510.70,1112.54 L 183.70,904.44 A 38.88,38.88 0 0 1 201.08,832.92 L 696.78,788.28 A 16.97,16.97 0 0 1 713.14,813.39 Z'
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
cls: 'b5',
|
|
30
|
+
fill: '#383D45',
|
|
31
|
+
d: 'M 510.57,758.90 A 13.28,13.28 0 0 1 501.43,780.14 L 179.80,814.91 A 30.67,30.67 0 0 1 145.84,784.23 L 148.24,400.27 A 39.69,39.69 0 0 1 219.51,376.48 Z'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
cls: 'b6',
|
|
35
|
+
fill: '#383D45',
|
|
36
|
+
d: 'M 426.44,590.45 A 8.50,8.50 0 0 1 412.13,591.67 L 218.19,336.46 A 28.65,28.65 0 0 1 227.41,293.90 L 598.25,93.95 A 41.84,41.84 0 0 1 655.24,150.07 Z'
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
export function escapeHtmlAttr(value: string): string {
|
|
41
|
+
return value
|
|
42
|
+
.replace(/&/g, '&')
|
|
43
|
+
.replace(/</g, '<')
|
|
44
|
+
.replace(/>/g, '>')
|
|
45
|
+
.replace(/"/g, '"')
|
|
46
|
+
.replace(/'/g, ''');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function getCausyneFaviconSvg(): string {
|
|
50
|
+
const outlines = CAUSYNE_BLADE_PATHS.map((b) => ` <path d="${b.d}"/>`).join('\n');
|
|
51
|
+
const fills = CAUSYNE_BLADE_PATHS.map((b) => ` <path fill="${b.fill}" d="${b.d}"/>`).join('\n');
|
|
52
|
+
return [
|
|
53
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1254 1254" width="1254" height="1254">',
|
|
54
|
+
' <title>Causyne</title>',
|
|
55
|
+
' <g fill="none" stroke="#FFFFFF" stroke-width="16" stroke-linejoin="round" stroke-linecap="round">',
|
|
56
|
+
outlines,
|
|
57
|
+
' </g>',
|
|
58
|
+
' <g>',
|
|
59
|
+
fills,
|
|
60
|
+
' </g>',
|
|
61
|
+
'</svg>'
|
|
62
|
+
].join('\n');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function renderCausyneMarkSvg(idAttr?: string, extraClass?: string): string {
|
|
66
|
+
const idPart = idAttr ? ` id="${idAttr}"` : '';
|
|
67
|
+
const cls = extraClass ? `brand-mark causyne-aperture ${extraClass}` : 'brand-mark causyne-aperture';
|
|
68
|
+
const outlines = CAUSYNE_BLADE_PATHS.map((b) => `<path d="${b.d}"/>`).join('');
|
|
69
|
+
const fills = CAUSYNE_BLADE_PATHS.map((b) => `<path class="causyne-blade ${b.cls}" fill="${b.fill}" d="${b.d}"/>`).join('');
|
|
70
|
+
return [
|
|
71
|
+
`<svg${idPart} class="${cls}" viewBox="0 0 1254 1254" aria-hidden="true">`,
|
|
72
|
+
'<g class="causyne-rotor">',
|
|
73
|
+
'<g class="causyne-outline" fill="none" stroke="#FFFFFF" stroke-width="18" stroke-linejoin="round" stroke-linecap="round">',
|
|
74
|
+
outlines,
|
|
75
|
+
'</g>',
|
|
76
|
+
'<g class="causyne-blades">',
|
|
77
|
+
fills,
|
|
78
|
+
'</g>',
|
|
79
|
+
'</g>',
|
|
80
|
+
'</svg>'
|
|
81
|
+
].join('\n');
|
|
82
|
+
}
|