@causyne/agent 1.17.0 → 1.19.0
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/package.json +1 -1
- package/src/agentLoop.js +2348 -2518
- package/src/agentLoop.ts +2865 -0
- package/src/checkpoints.d.ts +4 -0
- package/src/cliMode.js +10 -3
- package/src/commands.js +274 -25
- package/src/config.js +22 -0
- package/src/contextManager.d.ts +10 -0
- package/src/continuum/adapters/antigravity.js +193 -0
- package/src/continuum/adapters/antigravity.ts +204 -0
- package/src/continuum/adapters/base.js +48 -0
- package/src/continuum/adapters/base.ts +57 -0
- package/src/continuum/adapters/causyne.js +66 -0
- package/src/continuum/adapters/causyne.ts +72 -0
- package/src/continuum/adapters/claudeCode.js +171 -0
- package/src/continuum/adapters/claudeCode.ts +179 -0
- package/src/continuum/adapters/codex.js +181 -0
- package/src/continuum/adapters/codex.ts +193 -0
- package/src/continuum/adapters/opencode.js +134 -0
- package/src/continuum/adapters/opencode.ts +153 -0
- package/src/continuum/compactor.js +54 -0
- package/src/continuum/compactor.ts +83 -0
- package/src/continuum/index.js +8 -0
- package/src/continuum/index.ts +9 -0
- package/src/continuum/ingest.js +63 -0
- package/src/continuum/ingest.ts +89 -0
- package/src/continuum/sanitizer.js +55 -0
- package/src/continuum/sanitizer.ts +59 -0
- package/src/continuum/scanner.js +86 -0
- package/src/continuum/scanner.ts +106 -0
- package/src/continuum/types.js +3 -0
- package/src/continuum/types.ts +51 -0
- package/src/continuum/ui/continuumPicker.js +111 -0
- package/src/continuum/ui/continuumPicker.ts +145 -0
- package/src/cortex/autoCondenser.d.ts +2 -0
- package/src/cortex/vectorDb.d.ts +1 -0
- package/src/designPalettes.d.ts +2 -0
- package/src/devMode.d.ts +1 -0
- package/src/dynamicCatalogue.js +140 -1
- package/src/dynamicCatalogue.ts +179 -1
- package/src/embodimentSession.d.ts +2 -0
- package/src/entrypoint.js +12 -0
- package/src/memory.d.ts +1 -0
- package/src/memoryManager.d.ts +1 -0
- package/src/modelIds.d.ts +2 -0
- package/src/outputStore.d.ts +4 -0
- package/src/providers/acp.js +321 -267
- package/src/providers/acp.ts +360 -0
- package/src/providers/antigravity.js +389 -239
- package/src/providers/antigravity.ts +450 -0
- package/src/providers/base.d.ts +68 -0
- package/src/providers/factory.d.ts +1 -0
- package/src/provisioning/capabilityProvisioner.d.ts +2 -0
- package/src/sandbox.d.ts +1 -0
- package/src/skillsManager.d.ts +3 -0
- package/src/slopDetector.d.ts +3 -0
- package/src/taskBuffer.d.ts +1 -0
- package/src/tokenTracker.d.ts +1 -0
- package/src/toolPacks.d.ts +8 -0
- package/src/tools/registry.d.ts +4 -0
- package/src/tui/chatRenderer.js +71 -12
- package/src/tui/clipboardSync.js +36 -0
- package/src/tui/clipboardSync.ts +36 -0
- package/src/tui/dialogs.js +15 -2
- package/src/tui/home.js +27 -25
- package/src/tui/modelPicker.js +221 -0
- package/src/tui/modelPicker.ts +290 -0
- package/src/tui/prompt.js +17 -6
- package/src/tui/selectList.js +20 -0
- package/src/tui/theme.js +4 -0
package/src/dynamicCatalogue.ts
CHANGED
|
@@ -15,12 +15,13 @@ import path from 'node:path';
|
|
|
15
15
|
import { execFile } from 'node:child_process';
|
|
16
16
|
import { promisify } from 'node:util';
|
|
17
17
|
import { causyneHome } from './utils/paths.js';
|
|
18
|
-
import { MODEL_CATALOGUE, PEER_MODEL_CATALOGUE } from './modelCatalogue.js';
|
|
18
|
+
import { MODEL_CATALOGUE, PEER_MODEL_CATALOGUE, DEFAULT_MODEL_BY_PROVIDER } from './modelCatalogue.js';
|
|
19
19
|
import {
|
|
20
20
|
ANTIGRAVITY_MODELS,
|
|
21
21
|
ANTIGRAVITY_LABEL_BY_ID,
|
|
22
22
|
resolveAgyBinary
|
|
23
23
|
} from './providers/antigravity.js';
|
|
24
|
+
import { isBinaryOnPath, BUILTIN_PEER_PRESETS } from './acp/agentCatalog.js';
|
|
24
25
|
|
|
25
26
|
const execFileAsync = promisify(execFile);
|
|
26
27
|
|
|
@@ -103,6 +104,183 @@ export function getCuratedModels(provider: string): string[] {
|
|
|
103
104
|
return [];
|
|
104
105
|
}
|
|
105
106
|
|
|
107
|
+
export interface ByokProviderInfo {
|
|
108
|
+
id: string;
|
|
109
|
+
label: string;
|
|
110
|
+
isConfigured: boolean;
|
|
111
|
+
isCurrent: boolean;
|
|
112
|
+
models: string[];
|
|
113
|
+
defaultModel: string;
|
|
114
|
+
envVar?: string | undefined;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface AcpPeerInfo {
|
|
118
|
+
id: string;
|
|
119
|
+
providerKey: string;
|
|
120
|
+
label: string;
|
|
121
|
+
installed: boolean;
|
|
122
|
+
status: 'ready' | 'not_installed';
|
|
123
|
+
isCurrent: boolean;
|
|
124
|
+
command: string;
|
|
125
|
+
models: string[];
|
|
126
|
+
setupInstruction: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface ProviderOverview {
|
|
130
|
+
activeProvider: string;
|
|
131
|
+
activeModel: string;
|
|
132
|
+
byok: ByokProviderInfo[];
|
|
133
|
+
acp: AcpPeerInfo[];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Categorize available providers into BYOK and ACP peer agents,
|
|
138
|
+
* checking configured state for BYOK and installation status for ACP agents.
|
|
139
|
+
*/
|
|
140
|
+
export function getAvailableProvidersOverview(
|
|
141
|
+
config: { provider?: string; apiKey?: string; model?: string; providerKeys?: Record<string, string> } = {}
|
|
142
|
+
): ProviderOverview {
|
|
143
|
+
const currentProvider = config.provider || '';
|
|
144
|
+
const currentModel = config.model || '';
|
|
145
|
+
|
|
146
|
+
const byokDefs: Array<{ id: string; label: string; envVar?: string; defaultModel: string; models: string[] }> = [
|
|
147
|
+
{
|
|
148
|
+
id: 'anthropic',
|
|
149
|
+
label: 'Anthropic',
|
|
150
|
+
envVar: 'ANTHROPIC_API_KEY',
|
|
151
|
+
defaultModel: DEFAULT_MODEL_BY_PROVIDER['anthropic'] || 'claude-3-7-sonnet',
|
|
152
|
+
models: MODEL_CATALOGUE['Anthropic'] ? [...MODEL_CATALOGUE['Anthropic']] : []
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
id: 'openai',
|
|
156
|
+
label: 'OpenAI',
|
|
157
|
+
envVar: 'OPENAI_API_KEY',
|
|
158
|
+
defaultModel: DEFAULT_MODEL_BY_PROVIDER['openai'] || 'gpt-4o',
|
|
159
|
+
models: MODEL_CATALOGUE['OpenAI'] ? [...MODEL_CATALOGUE['OpenAI']] : []
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: 'gemini',
|
|
163
|
+
label: 'Google Gemini',
|
|
164
|
+
envVar: 'GEMINI_API_KEY',
|
|
165
|
+
defaultModel: DEFAULT_MODEL_BY_PROVIDER['gemini'] || 'gemini-2.5-pro',
|
|
166
|
+
models: MODEL_CATALOGUE['Gemini'] ? [...MODEL_CATALOGUE['Gemini']] : []
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: 'deepseek',
|
|
170
|
+
label: 'DeepSeek',
|
|
171
|
+
envVar: 'DEEPSEEK_API_KEY',
|
|
172
|
+
defaultModel: DEFAULT_MODEL_BY_PROVIDER['deepseek'] || 'deepseek-chat',
|
|
173
|
+
models: MODEL_CATALOGUE['DeepSeek'] ? [...MODEL_CATALOGUE['DeepSeek']] : []
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
id: 'qwen',
|
|
177
|
+
label: 'Qwen / DashScope',
|
|
178
|
+
envVar: 'DASHSCOPE_API_KEY',
|
|
179
|
+
defaultModel: DEFAULT_MODEL_BY_PROVIDER['qwen'] || 'qwen2.5-coder-32b-instruct',
|
|
180
|
+
models: MODEL_CATALOGUE['Qwen'] ? [...MODEL_CATALOGUE['Qwen']] : []
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
id: 'ollama',
|
|
184
|
+
label: 'Ollama (Local Server)',
|
|
185
|
+
defaultModel: DEFAULT_MODEL_BY_PROVIDER['ollama'] || 'llama3.3',
|
|
186
|
+
models: MODEL_CATALOGUE['Ollama (Local)'] ? [...MODEL_CATALOGUE['Ollama (Local)']] : []
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: 'xai',
|
|
190
|
+
label: 'xAI (Grok)',
|
|
191
|
+
envVar: 'XAI_API_KEY',
|
|
192
|
+
defaultModel: DEFAULT_MODEL_BY_PROVIDER['xai'] || 'grok-3',
|
|
193
|
+
models: MODEL_CATALOGUE['xAI (Grok)'] ? [...MODEL_CATALOGUE['xAI (Grok)']] : []
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: 'moonshot',
|
|
197
|
+
label: 'Moonshot (Kimi)',
|
|
198
|
+
envVar: 'MOONSHOT_API_KEY',
|
|
199
|
+
defaultModel: DEFAULT_MODEL_BY_PROVIDER['moonshot'] || 'kimi-k3',
|
|
200
|
+
models: MODEL_CATALOGUE['Moonshot (Kimi)'] ? [...MODEL_CATALOGUE['Moonshot (Kimi)']] : []
|
|
201
|
+
}
|
|
202
|
+
];
|
|
203
|
+
|
|
204
|
+
const byok: ByokProviderInfo[] = byokDefs.map((def) => {
|
|
205
|
+
const isCurrent = currentProvider === def.id || (def.id === 'qwen' && currentProvider === 'dashscope-byok');
|
|
206
|
+
const hasStoredKey = Boolean(isCurrent && config.apiKey)
|
|
207
|
+
|| Boolean(config.providerKeys && (config.providerKeys[def.id] || (def.id === 'qwen' && config.providerKeys['dashscope-byok'])))
|
|
208
|
+
|| Boolean(def.envVar && process.env[def.envVar]);
|
|
209
|
+
const isConfigured = def.id === 'ollama' || hasStoredKey;
|
|
210
|
+
|
|
211
|
+
return {
|
|
212
|
+
id: def.id,
|
|
213
|
+
label: def.label,
|
|
214
|
+
isConfigured,
|
|
215
|
+
isCurrent,
|
|
216
|
+
models: def.models,
|
|
217
|
+
defaultModel: def.defaultModel,
|
|
218
|
+
envVar: def.envVar
|
|
219
|
+
};
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
const acpPeers: AcpPeerInfo[] = [];
|
|
223
|
+
|
|
224
|
+
// Antigravity (special native local provider)
|
|
225
|
+
const hasAgy = Boolean(resolveAgyBinary());
|
|
226
|
+
acpPeers.push({
|
|
227
|
+
id: 'antigravity',
|
|
228
|
+
providerKey: 'antigravity',
|
|
229
|
+
label: 'Google Antigravity (AGY)',
|
|
230
|
+
installed: hasAgy,
|
|
231
|
+
status: hasAgy ? 'ready' : 'not_installed',
|
|
232
|
+
isCurrent: currentProvider === 'antigravity',
|
|
233
|
+
command: 'agy --output-format json',
|
|
234
|
+
models: [...ANTIGRAVITY_MODELS],
|
|
235
|
+
setupInstruction: 'Install Antigravity IDE or agy CLI to enable Google AGY models.'
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
// Standard ACP presets
|
|
239
|
+
const presetOrder = ['opencode', 'claude', 'codex', 'gemini', 'cursor', 'hermes', 'qwen', 'copilot', 'kimi', 'goose'];
|
|
240
|
+
for (const presetId of presetOrder) {
|
|
241
|
+
const preset = BUILTIN_PEER_PRESETS[presetId];
|
|
242
|
+
if (!preset) continue;
|
|
243
|
+
|
|
244
|
+
let installed = false;
|
|
245
|
+
if (preset.id === 'cursor') {
|
|
246
|
+
installed = isBinaryOnPath('cursor-agent') || isBinaryOnPath('cursor');
|
|
247
|
+
} else {
|
|
248
|
+
installed = isBinaryOnPath(preset.binaryName);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const providerKey = `acp/${preset.id}`;
|
|
252
|
+
const isCurrent = currentProvider === providerKey;
|
|
253
|
+
|
|
254
|
+
let models: string[] = [];
|
|
255
|
+
if (PEER_MODEL_CATALOGUE[preset.id]) {
|
|
256
|
+
models = [...(PEER_MODEL_CATALOGUE[preset.id] || [])];
|
|
257
|
+
} else if (DEFAULT_MODEL_BY_PROVIDER[providerKey]) {
|
|
258
|
+
models = [DEFAULT_MODEL_BY_PROVIDER[providerKey]];
|
|
259
|
+
} else {
|
|
260
|
+
models = [preset.id];
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
acpPeers.push({
|
|
264
|
+
id: preset.id,
|
|
265
|
+
providerKey,
|
|
266
|
+
label: preset.label,
|
|
267
|
+
installed,
|
|
268
|
+
status: installed ? 'ready' : 'not_installed',
|
|
269
|
+
isCurrent,
|
|
270
|
+
command: `${preset.command} ${preset.args.join(' ')}`,
|
|
271
|
+
models,
|
|
272
|
+
setupInstruction: preset.setupInstruction || `Install ${preset.label} CLI on your system.`
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
return {
|
|
277
|
+
activeProvider: currentProvider,
|
|
278
|
+
activeModel: currentModel,
|
|
279
|
+
byok,
|
|
280
|
+
acp: acpPeers
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
|
|
106
284
|
const MODEL_LIST_TIMEOUT_MS = 8000;
|
|
107
285
|
const ANSI_ESCAPE = /\u001b\[[0-9;]*[A-Za-z]/g;
|
|
108
286
|
|
package/src/entrypoint.js
CHANGED
|
@@ -198,6 +198,18 @@ program
|
|
|
198
198
|
process.exit(result.ok ? 0 : 1);
|
|
199
199
|
});
|
|
200
200
|
|
|
201
|
+
program
|
|
202
|
+
.command('continuum [action] [args...]')
|
|
203
|
+
.alias('resume')
|
|
204
|
+
.description('Cross-agent session extraction & resumption (Antigravity, OpenCode, Codex, Claude Code)')
|
|
205
|
+
.allowUnknownOption()
|
|
206
|
+
.action(async (action, args) => {
|
|
207
|
+
const argv = action ? [action, ...(args || [])] : [];
|
|
208
|
+
const result = await runCommand('continuum', argv, { surface: 'terminal' });
|
|
209
|
+
console.log('\n' + (result.output || '') + '\n');
|
|
210
|
+
process.exit(result.ok ? 0 : 1);
|
|
211
|
+
});
|
|
212
|
+
|
|
201
213
|
program
|
|
202
214
|
.command('exec <command>')
|
|
203
215
|
.description('Quick execute a command using the agent terminal')
|
package/src/memory.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getMemoryContextString(...args: any[]): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const MemoryManager: any;
|