@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,77 @@
|
|
|
1
|
+
import { dom } from './dom.js';
|
|
2
|
+
import { openStudio } from './studioShell.js';
|
|
3
|
+
let callbacks = {
|
|
4
|
+
openNewTerminal: async () => { },
|
|
5
|
+
openSettings: () => { },
|
|
6
|
+
launchGameStudio: () => { }
|
|
7
|
+
};
|
|
8
|
+
export function configureStudioStartCallbacks(cbs) {
|
|
9
|
+
callbacks = cbs;
|
|
10
|
+
}
|
|
11
|
+
export function hydrateStartShellOptions(shells) {
|
|
12
|
+
const targets = [dom.startShellSelect, dom.termShellSelect];
|
|
13
|
+
for (const sel of targets) {
|
|
14
|
+
if (!sel)
|
|
15
|
+
continue;
|
|
16
|
+
const prev = sel.value;
|
|
17
|
+
sel.textContent = '';
|
|
18
|
+
for (const sh of shells) {
|
|
19
|
+
const opt = document.createElement('option');
|
|
20
|
+
opt.value = sh.id;
|
|
21
|
+
opt.textContent = sh.label;
|
|
22
|
+
if (sh.isDefault)
|
|
23
|
+
opt.selected = true;
|
|
24
|
+
sel.appendChild(opt);
|
|
25
|
+
}
|
|
26
|
+
if (prev && shells.some((s) => s.id === prev)) {
|
|
27
|
+
sel.value = prev;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function applyPlatformShortcutLabels() {
|
|
32
|
+
const isMac = /mac/i.test(navigator.platform || navigator.userAgent || '');
|
|
33
|
+
if (dom.startKbdFiles)
|
|
34
|
+
dom.startKbdFiles.textContent = isMac ? '⌘⌥P' : 'Ctrl+Alt+P';
|
|
35
|
+
if (dom.startKbdTerminal)
|
|
36
|
+
dom.startKbdTerminal.textContent = isMac ? '⌃`' : 'Ctrl+`';
|
|
37
|
+
if (dom.startKbdBrowser)
|
|
38
|
+
dom.startKbdBrowser.textContent = isMac ? '⌘⌥T' : 'Ctrl+Alt+T';
|
|
39
|
+
}
|
|
40
|
+
export function bindStudioStartEvents() {
|
|
41
|
+
applyPlatformShortcutLabels();
|
|
42
|
+
dom.startFilesBtn?.addEventListener('click', () => {
|
|
43
|
+
openStudio('files');
|
|
44
|
+
dom.fileFilterEl.focus();
|
|
45
|
+
});
|
|
46
|
+
dom.startTerminalBtn?.addEventListener('click', () => {
|
|
47
|
+
const selectedShell = dom.startShellSelect?.value || undefined;
|
|
48
|
+
openStudio('terminal');
|
|
49
|
+
void callbacks.openNewTerminal(selectedShell);
|
|
50
|
+
});
|
|
51
|
+
dom.startShellSelect?.addEventListener('click', (e) => {
|
|
52
|
+
e.stopPropagation();
|
|
53
|
+
});
|
|
54
|
+
dom.startBrowserBtn?.addEventListener('click', () => {
|
|
55
|
+
openStudio('browser');
|
|
56
|
+
dom.browserUrlInput.focus();
|
|
57
|
+
});
|
|
58
|
+
dom.startMoreBtn?.addEventListener('click', () => {
|
|
59
|
+
const shelf = dom.startMoreShelf;
|
|
60
|
+
if (!shelf || !dom.startMoreBtn)
|
|
61
|
+
return;
|
|
62
|
+
const nextOpen = !shelf.classList.contains('open');
|
|
63
|
+
shelf.classList.toggle('open', nextOpen);
|
|
64
|
+
dom.startMoreBtn.setAttribute('aria-expanded', nextOpen ? 'true' : 'false');
|
|
65
|
+
});
|
|
66
|
+
dom.startEditorBtn?.addEventListener('click', () => {
|
|
67
|
+
openStudio('canvas');
|
|
68
|
+
dom.filePathInput.focus();
|
|
69
|
+
});
|
|
70
|
+
dom.startDiffBtn?.addEventListener('click', () => openStudio('diff'));
|
|
71
|
+
dom.startCliBtn?.addEventListener('click', () => {
|
|
72
|
+
openStudio('cli');
|
|
73
|
+
dom.cliCmdInput.focus();
|
|
74
|
+
});
|
|
75
|
+
dom.startGameBtn?.addEventListener('click', () => callbacks.launchGameStudio());
|
|
76
|
+
dom.startSettingsBtn?.addEventListener('click', () => callbacks.openSettings());
|
|
77
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { dom } from './dom.js';
|
|
2
|
+
import { openStudio } from './studioShell.js';
|
|
3
|
+
import type { AvailableShellPayload } from './types.js';
|
|
4
|
+
|
|
5
|
+
export interface StudioStartCallbacks {
|
|
6
|
+
openNewTerminal(shell?: string): Promise<void>;
|
|
7
|
+
openSettings(): void;
|
|
8
|
+
launchGameStudio(): void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let callbacks: StudioStartCallbacks = {
|
|
12
|
+
openNewTerminal: async () => {},
|
|
13
|
+
openSettings: () => {},
|
|
14
|
+
launchGameStudio: () => {}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function configureStudioStartCallbacks(cbs: StudioStartCallbacks): void {
|
|
18
|
+
callbacks = cbs;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function hydrateStartShellOptions(shells: AvailableShellPayload[]): void {
|
|
22
|
+
const targets = [dom.startShellSelect, dom.termShellSelect];
|
|
23
|
+
for (const sel of targets) {
|
|
24
|
+
if (!sel) continue;
|
|
25
|
+
const prev = sel.value;
|
|
26
|
+
sel.textContent = '';
|
|
27
|
+
for (const sh of shells) {
|
|
28
|
+
const opt = document.createElement('option');
|
|
29
|
+
opt.value = sh.id;
|
|
30
|
+
opt.textContent = sh.label;
|
|
31
|
+
if (sh.isDefault) opt.selected = true;
|
|
32
|
+
sel.appendChild(opt);
|
|
33
|
+
}
|
|
34
|
+
if (prev && shells.some((s) => s.id === prev)) {
|
|
35
|
+
sel.value = prev;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function applyPlatformShortcutLabels(): void {
|
|
41
|
+
const isMac = /mac/i.test(navigator.platform || navigator.userAgent || '');
|
|
42
|
+
if (dom.startKbdFiles) dom.startKbdFiles.textContent = isMac ? '⌘⌥P' : 'Ctrl+Alt+P';
|
|
43
|
+
if (dom.startKbdTerminal) dom.startKbdTerminal.textContent = isMac ? '⌃`' : 'Ctrl+`';
|
|
44
|
+
if (dom.startKbdBrowser) dom.startKbdBrowser.textContent = isMac ? '⌘⌥T' : 'Ctrl+Alt+T';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function bindStudioStartEvents(): void {
|
|
48
|
+
applyPlatformShortcutLabels();
|
|
49
|
+
|
|
50
|
+
dom.startFilesBtn?.addEventListener('click', () => {
|
|
51
|
+
openStudio('files');
|
|
52
|
+
dom.fileFilterEl.focus();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
dom.startTerminalBtn?.addEventListener('click', () => {
|
|
56
|
+
const selectedShell = dom.startShellSelect?.value || undefined;
|
|
57
|
+
openStudio('terminal');
|
|
58
|
+
void callbacks.openNewTerminal(selectedShell);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
dom.startShellSelect?.addEventListener('click', (e) => {
|
|
62
|
+
e.stopPropagation();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
dom.startBrowserBtn?.addEventListener('click', () => {
|
|
66
|
+
openStudio('browser');
|
|
67
|
+
dom.browserUrlInput.focus();
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
dom.startMoreBtn?.addEventListener('click', () => {
|
|
71
|
+
const shelf = dom.startMoreShelf;
|
|
72
|
+
if (!shelf || !dom.startMoreBtn) return;
|
|
73
|
+
const nextOpen = !shelf.classList.contains('open');
|
|
74
|
+
shelf.classList.toggle('open', nextOpen);
|
|
75
|
+
dom.startMoreBtn.setAttribute('aria-expanded', nextOpen ? 'true' : 'false');
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
dom.startEditorBtn?.addEventListener('click', () => {
|
|
79
|
+
openStudio('canvas');
|
|
80
|
+
dom.filePathInput.focus();
|
|
81
|
+
});
|
|
82
|
+
dom.startDiffBtn?.addEventListener('click', () => openStudio('diff'));
|
|
83
|
+
dom.startCliBtn?.addEventListener('click', () => {
|
|
84
|
+
openStudio('cli');
|
|
85
|
+
dom.cliCmdInput.focus();
|
|
86
|
+
});
|
|
87
|
+
dom.startGameBtn?.addEventListener('click', () => callbacks.launchGameStudio());
|
|
88
|
+
dom.startSettingsBtn?.addEventListener('click', () => callbacks.openSettings());
|
|
89
|
+
}
|