@agentconnect/host 0.2.6 → 0.2.7
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/dist/providers/claude.js
CHANGED
|
@@ -3,7 +3,7 @@ import { access, mkdir, readFile, rm, writeFile } from 'fs/promises';
|
|
|
3
3
|
import https from 'https';
|
|
4
4
|
import os from 'os';
|
|
5
5
|
import path from 'path';
|
|
6
|
-
import { buildInstallCommand, buildInstallCommandAuto, buildLoginCommand, buildStatusCommand, checkCommandVersion, commandExists, createLineParser, debugLog, logProviderSpawn, resolveWindowsCommand, resolveCommandPath, resolveCommandRealPath, runCommand, } from './utils.js';
|
|
6
|
+
import { buildInstallCommand, buildInstallCommandAuto, buildLoginCommand, buildStatusCommand, checkCommandVersion, commandExists, createLineParser, appendPromptArg, debugLog, logProviderSpawn, resolveWindowsCommand, resolveCommandPath, resolveCommandRealPath, runCommand, } from './utils.js';
|
|
7
7
|
const CLAUDE_PACKAGE = '@anthropic-ai/claude-code';
|
|
8
8
|
const INSTALL_UNIX = 'curl -fsSL https://claude.ai/install.sh | bash';
|
|
9
9
|
const INSTALL_WINDOWS_PS = 'irm https://claude.ai/install.ps1 | iex';
|
|
@@ -1156,7 +1156,7 @@ export function runClaudePrompt({ prompt, system, resumeSessionId, model, cwd, p
|
|
|
1156
1156
|
}
|
|
1157
1157
|
if (resumeSessionId)
|
|
1158
1158
|
args.push('--resume', resumeSessionId);
|
|
1159
|
-
args
|
|
1159
|
+
appendPromptArg(args, prompt);
|
|
1160
1160
|
logProviderSpawn({
|
|
1161
1161
|
provider: 'claude',
|
|
1162
1162
|
command,
|
package/dist/providers/codex.js
CHANGED
|
@@ -3,7 +3,7 @@ import { readFile } from 'fs/promises';
|
|
|
3
3
|
import https from 'https';
|
|
4
4
|
import os from 'os';
|
|
5
5
|
import path from 'path';
|
|
6
|
-
import { buildInstallCommandAuto, buildLoginCommand, buildStatusCommand, checkCommandVersion, commandExists, createLineParser, applySystemPrompt, debugLog, logProviderSpawn, resolveWindowsCommand, resolveCommandPath, resolveCommandRealPath, runCommand, } from './utils.js';
|
|
6
|
+
import { buildInstallCommandAuto, buildLoginCommand, buildStatusCommand, checkCommandVersion, commandExists, createLineParser, applySystemPrompt, appendPromptArg, debugLog, logProviderSpawn, resolveWindowsCommand, resolveCommandPath, resolveCommandRealPath, runCommand, } from './utils.js';
|
|
7
7
|
const CODEX_PACKAGE = '@openai/codex';
|
|
8
8
|
const DEFAULT_LOGIN = 'codex login';
|
|
9
9
|
const DEFAULT_STATUS = 'codex login status';
|
|
@@ -264,7 +264,7 @@ function buildCodexExecArgs(options) {
|
|
|
264
264
|
if (resumeSessionId) {
|
|
265
265
|
args.push('resume', resumeSessionId);
|
|
266
266
|
}
|
|
267
|
-
args
|
|
267
|
+
appendPromptArg(args, prompt);
|
|
268
268
|
return args;
|
|
269
269
|
}
|
|
270
270
|
function shouldFallbackToLegacy(lines) {
|
package/dist/providers/cursor.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawn } from 'child_process';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { buildInstallCommand, buildLoginCommand, buildStatusCommand, checkCommandVersion, commandExists, createLineParser, applySystemPrompt, debugLog, logProviderSpawn, resolveWindowsCommand, resolveCommandPath, resolveCommandRealPath, runCommand, } from './utils.js';
|
|
3
|
+
import { buildInstallCommand, buildLoginCommand, buildStatusCommand, checkCommandVersion, commandExists, createLineParser, applySystemPrompt, appendPromptArg, debugLog, logProviderSpawn, resolveWindowsCommand, resolveCommandPath, resolveCommandRealPath, runCommand, } from './utils.js';
|
|
4
4
|
const INSTALL_UNIX = 'curl https://cursor.com/install -fsS | bash';
|
|
5
5
|
const DEFAULT_LOGIN = 'cursor-agent login';
|
|
6
6
|
const DEFAULT_STATUS = 'cursor-agent status';
|
|
@@ -698,7 +698,7 @@ export function runCursorPrompt({ prompt, system, resumeSessionId, model, repoRo
|
|
|
698
698
|
args.push('--endpoint', endpoint);
|
|
699
699
|
}
|
|
700
700
|
const composedPrompt = applySystemPrompt(system, prompt);
|
|
701
|
-
args
|
|
701
|
+
appendPromptArg(args, composedPrompt);
|
|
702
702
|
logProviderSpawn({
|
|
703
703
|
provider: 'cursor',
|
|
704
704
|
command,
|
|
@@ -11,6 +11,7 @@ export declare function logProviderSpawn(options: {
|
|
|
11
11
|
}): void;
|
|
12
12
|
export declare function debugLog(scope: string, message: string, details?: Record<string, unknown>): void;
|
|
13
13
|
export declare function applySystemPrompt(system: string | undefined, prompt: string): string;
|
|
14
|
+
export declare function appendPromptArg(args: string[], prompt: string): void;
|
|
14
15
|
export interface SplitCommandResult {
|
|
15
16
|
command: string;
|
|
16
17
|
args: string[];
|
package/dist/providers/utils.js
CHANGED
|
@@ -50,6 +50,9 @@ export function applySystemPrompt(system, prompt) {
|
|
|
50
50
|
return prompt;
|
|
51
51
|
return `<<SYSTEM>>\n${trimmed}\n<</SYSTEM>>\n\n<<USER>>\n${prompt}`;
|
|
52
52
|
}
|
|
53
|
+
export function appendPromptArg(args, prompt) {
|
|
54
|
+
args.push('--', prompt);
|
|
55
|
+
}
|
|
53
56
|
export function splitCommand(value) {
|
|
54
57
|
if (!value)
|
|
55
58
|
return { command: '', args: [] };
|