@agi-cli/server 0.1.143 → 0.1.145
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agi-cli/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.145",
|
|
4
4
|
"description": "HTTP API server for AGI CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"typecheck": "tsc --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@agi-cli/sdk": "0.1.
|
|
33
|
-
"@agi-cli/database": "0.1.
|
|
32
|
+
"@agi-cli/sdk": "0.1.145",
|
|
33
|
+
"@agi-cli/database": "0.1.145",
|
|
34
34
|
"drizzle-orm": "^0.44.5",
|
|
35
35
|
"hono": "^4.9.9",
|
|
36
36
|
"zod": "^4.1.8"
|
|
@@ -243,7 +243,7 @@ export async function setupRunner(opts: RunOpts): Promise<SetupResult> {
|
|
|
243
243
|
thinkingConfig: { thinkingBudget: THINKING_BUDGET },
|
|
244
244
|
};
|
|
245
245
|
} else if (underlyingProvider === 'openai-compatible') {
|
|
246
|
-
providerOptions['
|
|
246
|
+
providerOptions['openaiCompatible'] = {
|
|
247
247
|
reasoningEffort: 'high',
|
|
248
248
|
};
|
|
249
249
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { providerBasePrompt } from '@agi-cli/sdk';
|
|
2
|
+
import { debugLog } from '../debug/index.ts';
|
|
2
3
|
import { composeEnvironmentAndInstructions } from '../context/environment.ts';
|
|
3
4
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
4
5
|
import BASE_PROMPT from '@agi-cli/sdk/prompts/base.txt' with { type: 'text' };
|
|
@@ -44,7 +45,7 @@ export async function composeSystemPrompt(options: {
|
|
|
44
45
|
|
|
45
46
|
const parts: string[] = [];
|
|
46
47
|
|
|
47
|
-
const
|
|
48
|
+
const providerResult = await providerBasePrompt(
|
|
48
49
|
options.provider,
|
|
49
50
|
options.model,
|
|
50
51
|
options.projectRoot,
|
|
@@ -52,15 +53,12 @@ export async function composeSystemPrompt(options: {
|
|
|
52
53
|
const baseInstructions = (BASE_PROMPT || '').trim();
|
|
53
54
|
|
|
54
55
|
parts.push(
|
|
55
|
-
|
|
56
|
+
providerResult.prompt.trim(),
|
|
56
57
|
baseInstructions.trim(),
|
|
57
58
|
options.agentPrompt.trim(),
|
|
58
59
|
);
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
? `provider:${options.provider}`
|
|
62
|
-
: 'provider:unknown';
|
|
63
|
-
components.push(providerComponent);
|
|
60
|
+
if (providerResult.prompt.trim()) {
|
|
61
|
+
components.push(`provider:${providerResult.resolvedType}`);
|
|
64
62
|
}
|
|
65
63
|
if (baseInstructions.trim()) {
|
|
66
64
|
components.push('base');
|
|
@@ -131,6 +129,7 @@ export async function composeSystemPrompt(options: {
|
|
|
131
129
|
|
|
132
130
|
const composed = parts.filter(Boolean).join('\n\n').trim();
|
|
133
131
|
if (composed) {
|
|
132
|
+
debugLog(`[system] pieces: ${dedupeComponents(components).join(', ')}`);
|
|
134
133
|
return {
|
|
135
134
|
prompt: composed,
|
|
136
135
|
components: dedupeComponents(components),
|