@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,72 @@
|
|
|
1
|
+
import { renderCausyneMarkSvg } from './brandMark.js';
|
|
2
|
+
export function renderWorkspaceHtml() {
|
|
3
|
+
return [
|
|
4
|
+
' <div class="workspace">',
|
|
5
|
+
' <header class="topbar" role="banner">',
|
|
6
|
+
' <div class="topbar-left">',
|
|
7
|
+
' <button id="open-sidebar-btn" class="icon-btn" type="button" aria-label="Open sidebar">',
|
|
8
|
+
' <svg viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"/><line x1="9" y1="4" x2="9" y2="20"/></svg>',
|
|
9
|
+
' </button>',
|
|
10
|
+
' <button id="model-trigger" class="model-trigger" type="button" aria-haspopup="menu" aria-expanded="false">',
|
|
11
|
+
' <span id="model-trigger-name" class="model-trigger-name">Causyne</span>',
|
|
12
|
+
' <svg class="model-chevron" viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>',
|
|
13
|
+
' </button>',
|
|
14
|
+
' </div>',
|
|
15
|
+
' <div class="topbar-right">',
|
|
16
|
+
' <div id="liveness-pill" class="liveness-pill" aria-live="polite">',
|
|
17
|
+
` ${renderCausyneMarkSvg(undefined, 'liveness-mark')}`,
|
|
18
|
+
' <span id="liveness-text" class="liveness-text">Working</span>',
|
|
19
|
+
' </div>',
|
|
20
|
+
' <span id="usage-pill" class="usage-pill"></span>',
|
|
21
|
+
' <button id="studio-toggle-btn" class="studio-toggle" type="button" aria-expanded="false" aria-controls="studio-pane-root" title="Toggle panel (⌘\\)">',
|
|
22
|
+
' <svg viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"/><line x1="15" y1="4" x2="15" y2="20"/></svg>',
|
|
23
|
+
' <span>Panel</span>',
|
|
24
|
+
' </button>',
|
|
25
|
+
' </div>',
|
|
26
|
+
' </header>',
|
|
27
|
+
' <main id="stage" class="stage is-empty" role="main">',
|
|
28
|
+
' <div class="hero-block">',
|
|
29
|
+
` <div class="hero-emblem">${renderCausyneMarkSvg(undefined, 'hero-mark')}</div>`,
|
|
30
|
+
' <h1 class="hero-title">Where should we begin?</h1>',
|
|
31
|
+
' </div>',
|
|
32
|
+
' <section id="thread-wrap" class="thread-wrap" aria-label="Conversation">',
|
|
33
|
+
' <div id="thread" class="thread" role="list" aria-label="Conversation"></div>',
|
|
34
|
+
' </section>',
|
|
35
|
+
' <div class="composer-dock">',
|
|
36
|
+
' <button id="scroll-bottom-btn" class="scroll-bottom-btn" type="button" aria-label="Scroll to bottom">↓</button>',
|
|
37
|
+
' <div id="mention-popover" class="mention-popover" role="listbox" aria-label="Suggestions"></div>',
|
|
38
|
+
' <form id="chat-form" autocomplete="off">',
|
|
39
|
+
' <div id="composer-pill" class="composer-pill">',
|
|
40
|
+
' <div id="composer-chips" class="composer-chips"></div>',
|
|
41
|
+
' <div class="composer-input-row">',
|
|
42
|
+
' <textarea id="prompt-input" class="composer-input" rows="1" aria-label="Ask anything" placeholder="Ask anything"></textarea>',
|
|
43
|
+
' </div>',
|
|
44
|
+
' <div class="composer-toolbar">',
|
|
45
|
+
' <div class="composer-toolbar-left">',
|
|
46
|
+
' <button id="plus-btn" class="plus-btn" type="button" aria-label="Add files and tools" aria-expanded="false">+</button>',
|
|
47
|
+
' <button id="perm-trigger" class="perm-trigger" type="button" aria-haspopup="menu" aria-expanded="false" aria-label="Permission preset: Workspace Write">',
|
|
48
|
+
' <span id="perm-trigger-icon" class="perm-trigger-icon" aria-hidden="true"></span>',
|
|
49
|
+
' <span id="perm-trigger-label" class="perm-trigger-label">Workspace Write</span>',
|
|
50
|
+
' <svg class="perm-chevron" viewBox="0 0 24 24" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>',
|
|
51
|
+
' </button>',
|
|
52
|
+
' </div>',
|
|
53
|
+
' <div class="composer-toolbar-right">',
|
|
54
|
+
' <button id="send-btn" class="send-btn" type="submit" aria-label="Send message">',
|
|
55
|
+
' <svg id="icon-send" viewBox="0 0 24 24"><line x1="12" y1="19" x2="12" y2="5"/><polyline points="6 11 12 5 18 11"/></svg>',
|
|
56
|
+
' <svg id="icon-stop" viewBox="0 0 24 24" style="display:none"><rect x="6" y="6" width="12" height="12" rx="2" fill="currentColor" stroke="none"/></svg>',
|
|
57
|
+
' </button>',
|
|
58
|
+
' </div>',
|
|
59
|
+
' </div>',
|
|
60
|
+
' </div>',
|
|
61
|
+
' </form>',
|
|
62
|
+
' <div class="hero-helper">',
|
|
63
|
+
' <button id="hero-help-btn" class="helper-pill" type="button">What can Causyne do?</button>',
|
|
64
|
+
' </div>',
|
|
65
|
+
' </div>',
|
|
66
|
+
' <footer class="stage-footer" role="contentinfo">',
|
|
67
|
+
' Causyne runs locally in your workspace.',
|
|
68
|
+
' </footer>',
|
|
69
|
+
' </main>',
|
|
70
|
+
' </div>'
|
|
71
|
+
].join('\n');
|
|
72
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { renderCausyneMarkSvg } from './brandMark.js';
|
|
2
|
+
|
|
3
|
+
export function renderWorkspaceHtml(): string {
|
|
4
|
+
return [
|
|
5
|
+
' <div class="workspace">',
|
|
6
|
+
' <header class="topbar" role="banner">',
|
|
7
|
+
' <div class="topbar-left">',
|
|
8
|
+
' <button id="open-sidebar-btn" class="icon-btn" type="button" aria-label="Open sidebar">',
|
|
9
|
+
' <svg viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"/><line x1="9" y1="4" x2="9" y2="20"/></svg>',
|
|
10
|
+
' </button>',
|
|
11
|
+
' <button id="model-trigger" class="model-trigger" type="button" aria-haspopup="menu" aria-expanded="false">',
|
|
12
|
+
' <span id="model-trigger-name" class="model-trigger-name">Causyne</span>',
|
|
13
|
+
' <svg class="model-chevron" viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>',
|
|
14
|
+
' </button>',
|
|
15
|
+
' </div>',
|
|
16
|
+
' <div class="topbar-right">',
|
|
17
|
+
' <div id="liveness-pill" class="liveness-pill" aria-live="polite">',
|
|
18
|
+
` ${renderCausyneMarkSvg(undefined, 'liveness-mark')}`,
|
|
19
|
+
' <span id="liveness-text" class="liveness-text">Working</span>',
|
|
20
|
+
' </div>',
|
|
21
|
+
' <span id="usage-pill" class="usage-pill"></span>',
|
|
22
|
+
' <button id="studio-toggle-btn" class="studio-toggle" type="button" aria-expanded="false" aria-controls="studio-pane-root" title="Toggle panel (⌘\\)">',
|
|
23
|
+
' <svg viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"/><line x1="15" y1="4" x2="15" y2="20"/></svg>',
|
|
24
|
+
' <span>Panel</span>',
|
|
25
|
+
' </button>',
|
|
26
|
+
' </div>',
|
|
27
|
+
' </header>',
|
|
28
|
+
' <main id="stage" class="stage is-empty" role="main">',
|
|
29
|
+
' <div class="hero-block">',
|
|
30
|
+
` <div class="hero-emblem">${renderCausyneMarkSvg(undefined, 'hero-mark')}</div>`,
|
|
31
|
+
' <h1 class="hero-title">Where should we begin?</h1>',
|
|
32
|
+
' </div>',
|
|
33
|
+
' <section id="thread-wrap" class="thread-wrap" aria-label="Conversation">',
|
|
34
|
+
' <div id="thread" class="thread" role="list" aria-label="Conversation"></div>',
|
|
35
|
+
' </section>',
|
|
36
|
+
' <div class="composer-dock">',
|
|
37
|
+
' <button id="scroll-bottom-btn" class="scroll-bottom-btn" type="button" aria-label="Scroll to bottom">↓</button>',
|
|
38
|
+
' <div id="mention-popover" class="mention-popover" role="listbox" aria-label="Suggestions"></div>',
|
|
39
|
+
' <form id="chat-form" autocomplete="off">',
|
|
40
|
+
' <div id="composer-pill" class="composer-pill">',
|
|
41
|
+
' <div id="composer-chips" class="composer-chips"></div>',
|
|
42
|
+
' <div class="composer-input-row">',
|
|
43
|
+
' <textarea id="prompt-input" class="composer-input" rows="1" aria-label="Ask anything" placeholder="Ask anything"></textarea>',
|
|
44
|
+
' </div>',
|
|
45
|
+
' <div class="composer-toolbar">',
|
|
46
|
+
' <div class="composer-toolbar-left">',
|
|
47
|
+
' <button id="plus-btn" class="plus-btn" type="button" aria-label="Add files and tools" aria-expanded="false">+</button>',
|
|
48
|
+
' <button id="perm-trigger" class="perm-trigger" type="button" aria-haspopup="menu" aria-expanded="false" aria-label="Permission preset: Workspace Write">',
|
|
49
|
+
' <span id="perm-trigger-icon" class="perm-trigger-icon" aria-hidden="true"></span>',
|
|
50
|
+
' <span id="perm-trigger-label" class="perm-trigger-label">Workspace Write</span>',
|
|
51
|
+
' <svg class="perm-chevron" viewBox="0 0 24 24" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>',
|
|
52
|
+
' </button>',
|
|
53
|
+
' </div>',
|
|
54
|
+
' <div class="composer-toolbar-right">',
|
|
55
|
+
' <button id="send-btn" class="send-btn" type="submit" aria-label="Send message">',
|
|
56
|
+
' <svg id="icon-send" viewBox="0 0 24 24"><line x1="12" y1="19" x2="12" y2="5"/><polyline points="6 11 12 5 18 11"/></svg>',
|
|
57
|
+
' <svg id="icon-stop" viewBox="0 0 24 24" style="display:none"><rect x="6" y="6" width="12" height="12" rx="2" fill="currentColor" stroke="none"/></svg>',
|
|
58
|
+
' </button>',
|
|
59
|
+
' </div>',
|
|
60
|
+
' </div>',
|
|
61
|
+
' </div>',
|
|
62
|
+
' </form>',
|
|
63
|
+
' <div class="hero-helper">',
|
|
64
|
+
' <button id="hero-help-btn" class="helper-pill" type="button">What can Causyne do?</button>',
|
|
65
|
+
' </div>',
|
|
66
|
+
' </div>',
|
|
67
|
+
' <footer class="stage-footer" role="contentinfo">',
|
|
68
|
+
' Causyne runs locally in your workspace.',
|
|
69
|
+
' </footer>',
|
|
70
|
+
' </main>',
|
|
71
|
+
' </div>'
|
|
72
|
+
].join('\n');
|
|
73
|
+
}
|
package/src/worktreeManager.js
CHANGED
|
@@ -234,7 +234,22 @@ export function createWorktree(dir, options = {}) {
|
|
|
234
234
|
throw new Error(`Worktree path already exists: ${safeDisplay(targetPath)}`);
|
|
235
235
|
}
|
|
236
236
|
try {
|
|
237
|
-
|
|
237
|
+
// Hardened checkout: disable repository hooks, fsmonitor, and clean/smudge filters
|
|
238
|
+
// so untrusted repository metadata cannot execute code during worktree creation.
|
|
239
|
+
runGit([
|
|
240
|
+
'-c', 'core.hooksPath=/dev/null',
|
|
241
|
+
'-c', 'core.fsmonitor=false',
|
|
242
|
+
'worktree', 'add', '--no-checkout', '-b', branch, targetPath, baseCommit
|
|
243
|
+
], repoRoot);
|
|
244
|
+
runGit([
|
|
245
|
+
'-c', 'core.hooksPath=/dev/null',
|
|
246
|
+
'-c', 'core.fsmonitor=false',
|
|
247
|
+
'-c', 'filter.lfs.smudge=',
|
|
248
|
+
'-c', 'filter.lfs.clean=',
|
|
249
|
+
'-c', 'filter.lfs.process=',
|
|
250
|
+
'-c', 'filter.lfs.required=false',
|
|
251
|
+
'reset', '--hard', '--no-recurse-submodules', baseCommit
|
|
252
|
+
], targetPath);
|
|
238
253
|
}
|
|
239
254
|
catch (err) {
|
|
240
255
|
throw new Error(`Failed to create git worktree: ${gitErrorDetail(err)}`);
|
package/src/worktreeManager.ts
CHANGED
|
@@ -274,7 +274,28 @@ export function createWorktree(
|
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
try {
|
|
277
|
-
|
|
277
|
+
// Hardened checkout: disable repository hooks, fsmonitor, and clean/smudge filters
|
|
278
|
+
// so untrusted repository metadata cannot execute code during worktree creation.
|
|
279
|
+
runGit(
|
|
280
|
+
[
|
|
281
|
+
'-c', 'core.hooksPath=/dev/null',
|
|
282
|
+
'-c', 'core.fsmonitor=false',
|
|
283
|
+
'worktree', 'add', '--no-checkout', '-b', branch, targetPath, baseCommit
|
|
284
|
+
],
|
|
285
|
+
repoRoot
|
|
286
|
+
);
|
|
287
|
+
runGit(
|
|
288
|
+
[
|
|
289
|
+
'-c', 'core.hooksPath=/dev/null',
|
|
290
|
+
'-c', 'core.fsmonitor=false',
|
|
291
|
+
'-c', 'filter.lfs.smudge=',
|
|
292
|
+
'-c', 'filter.lfs.clean=',
|
|
293
|
+
'-c', 'filter.lfs.process=',
|
|
294
|
+
'-c', 'filter.lfs.required=false',
|
|
295
|
+
'reset', '--hard', '--no-recurse-submodules', baseCommit
|
|
296
|
+
],
|
|
297
|
+
targetPath
|
|
298
|
+
);
|
|
278
299
|
} catch (err: unknown) {
|
|
279
300
|
throw new Error(`Failed to create git worktree: ${gitErrorDetail(err)}`);
|
|
280
301
|
}
|