@agi-cli/server 0.1.164 → 0.1.166

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.164",
3
+ "version": "0.1.166",
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.164",
33
- "@agi-cli/database": "0.1.164",
32
+ "@agi-cli/sdk": "0.1.166",
33
+ "@agi-cli/database": "0.1.166",
34
34
  "drizzle-orm": "^0.44.5",
35
35
  "hono": "^4.9.9",
36
36
  "zod": "^4.1.8"
@@ -15,7 +15,7 @@ export function registerDefaultsRoute(app: Hono) {
15
15
  scope?: 'global' | 'local';
16
16
  }>();
17
17
 
18
- const scope = body.scope || 'local';
18
+ const scope = body.scope || 'global';
19
19
  const updates: Partial<{
20
20
  agent: string;
21
21
  provider: string;
@@ -20,12 +20,6 @@ export function registerSessionApprovalRoute(app: Hono) {
20
20
  return c.json({ ok: false, error: 'approved must be a boolean' }, 400);
21
21
  }
22
22
 
23
- console.log('[approval-route] Received approval request', {
24
- sessionId,
25
- callId: body.callId,
26
- approved: body.approved,
27
- });
28
-
29
23
  const result = resolveApproval(body.callId, body.approved);
30
24
 
31
25
  if (!result.ok) {
@@ -50,7 +50,6 @@ export async function selectProviderAndModel(
50
50
  : await pickAuthorizedProvider({
51
51
  cfg,
52
52
  candidate: explicitProvider ?? agentProviderDefault,
53
- explicitProvider,
54
53
  });
55
54
 
56
55
  if (!provider) {
@@ -77,19 +76,14 @@ export async function selectProviderAndModel(
77
76
  async function pickAuthorizedProvider(args: {
78
77
  cfg: AGIConfig;
79
78
  candidate: ProviderId;
80
- explicitProvider?: ProviderId;
81
79
  }): Promise<ProviderId | undefined> {
82
- const { cfg, candidate, explicitProvider } = args;
80
+ const { cfg, candidate } = args;
83
81
  const candidates = uniqueProviders([
84
82
  candidate,
85
83
  ...FALLBACK_ORDER,
86
84
  ...providerIds,
87
85
  ]);
88
86
  for (const provider of candidates) {
89
- const enabled = cfg.providers[provider]?.enabled ?? true;
90
- const explicitlyRequested =
91
- explicitProvider != null && provider === explicitProvider;
92
- if (!enabled && !explicitlyRequested) continue;
93
87
  const ok = await isProviderAuthorized(cfg, provider);
94
88
  if (ok) return provider;
95
89
  }