@shipfox/api-agent 9.2.0 → 10.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shipfox/api-agent",
3
3
  "license": "MIT",
4
- "version": "9.2.0",
4
+ "version": "10.0.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -34,21 +34,21 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@earendil-works/pi-ai": "0.79.9",
37
+ "@earendil-works/pi-ai": "0.82.0",
38
38
  "@opentelemetry/api": "^1.9.1",
39
39
  "drizzle-orm": "^0.45.2",
40
40
  "zod": "^4.4.3",
41
41
  "@shipfox/node-error-monitoring": "0.3.0",
42
- "@shipfox/api-agent-dto": "9.0.2",
43
- "@shipfox/api-auth-context": "9.2.0",
42
+ "@shipfox/api-agent-dto": "10.0.0",
43
+ "@shipfox/api-auth-context": "10.0.0",
44
44
  "@shipfox/api-secrets-dto": "9.0.2",
45
45
  "@shipfox/inter-module": "0.2.2",
46
46
  "@shipfox/config": "1.2.4",
47
47
  "@shipfox/node-drizzle": "0.3.4",
48
48
  "@shipfox/node-egress-guard": "0.1.3",
49
- "@shipfox/node-fastify": "0.3.3",
50
- "@shipfox/node-module": "1.0.2",
51
- "@shipfox/node-opentelemetry": "0.6.2",
49
+ "@shipfox/node-fastify": "0.4.0",
50
+ "@shipfox/node-module": "1.0.4",
51
+ "@shipfox/node-opentelemetry": "0.6.3",
52
52
  "@shipfox/node-postgres": "0.4.4",
53
53
  "@shipfox/redact": "0.2.5"
54
54
  },
@@ -1,4 +1,4 @@
1
- import {getModels, getProviders, type KnownProvider} from '@earendil-works/pi-ai';
1
+ import {getModels, getProviders} from '@earendil-works/pi-ai/compat';
2
2
  import {
3
3
  MODEL_PROVIDER_CATALOG_SEED,
4
4
  MODEL_PROVIDER_IDS,
@@ -30,7 +30,7 @@ describe('model provider catalog registry', () => {
30
30
  );
31
31
 
32
32
  const missingDefaults = supportedEntries.flatMap((entry) => {
33
- const piModels = getModels(entry.id as KnownProvider);
33
+ const piModels = getModels(entry.id as Parameters<typeof getModels>[0]);
34
34
  const defaultExists = piModels.some((model) => model.id === entry.default_model);
35
35
  return defaultExists ? [] : [formatMissingDefault(entry.id, entry.default_model)];
36
36
  });
@@ -1,4 +1,4 @@
1
- import {getModels, type KnownProvider} from '@earendil-works/pi-ai';
1
+ import {getModels} from '@earendil-works/pi-ai/compat';
2
2
  import {type AgentModelOptionDto, PI_HARNESS} from '@shipfox/api-agent-dto';
3
3
  import {probeModelProviderCredentials} from '../model-provider-validation.js';
4
4
  import type {HarnessProviderCatalog} from './registry.js';
@@ -6,7 +6,7 @@ import type {HarnessProviderCatalog} from './registry.js';
6
6
  export {PI_HARNESS};
7
7
 
8
8
  export function listPiProviderModels(providerId: string): AgentModelOptionDto[] {
9
- return getModels(providerId as KnownProvider).map((model) => ({
9
+ return getModels(providerId as Parameters<typeof getModels>[0]).map((model) => ({
10
10
  id: model.id,
11
11
  label: model.name,
12
12
  }));
@@ -1,5 +1,5 @@
1
1
  import type {AssistantMessage, Context, ProviderStreamOptions} from '@earendil-works/pi-ai';
2
- import {getModels} from '@earendil-works/pi-ai';
2
+ import {getModels} from '@earendil-works/pi-ai/compat';
3
3
  import {
4
4
  claudeAgentThinkingSchema,
5
5
  harnessSchema,
@@ -32,7 +32,7 @@ const metrics = vi.hoisted(() => ({
32
32
  },
33
33
  }));
34
34
 
35
- vi.mock('@earendil-works/pi-ai', () => piAi);
35
+ vi.mock('@earendil-works/pi-ai/compat', () => piAi);
36
36
  vi.mock('#metrics/index.js', () => metrics);
37
37
 
38
38
  describe('harness registry', () => {
@@ -11,7 +11,7 @@ const piAi = vi.hoisted(() => ({
11
11
  getModels: vi.fn(),
12
12
  }));
13
13
 
14
- vi.mock('@earendil-works/pi-ai', () => piAi);
14
+ vi.mock('@earendil-works/pi-ai/compat', () => piAi);
15
15
 
16
16
  describe('probeModelProviderCredentials', () => {
17
17
  beforeEach(() => {
@@ -4,7 +4,7 @@ import {
4
4
  complete,
5
5
  getModels,
6
6
  type ProviderStreamOptions,
7
- } from '@earendil-works/pi-ai';
7
+ } from '@earendil-works/pi-ai/compat';
8
8
  import type {
9
9
  CustomAgentModelDto,
10
10
  ModelProviderApi,
@@ -57,7 +57,7 @@ describe('model provider catalog route', () => {
57
57
  });
58
58
 
59
59
  expect(res.statusCode).toBe(200);
60
- expect(res.json().providers).toHaveLength(35);
60
+ expect(res.json().providers).toHaveLength(37);
61
61
  for (const provider of res.json().providers) {
62
62
  if (provider.support_status === 'supported') {
63
63
  expect(provider.models.length).toBeGreaterThan(0);
@@ -1,4 +1,4 @@
1
- import {complete} from '@earendil-works/pi-ai';
1
+ import {complete} from '@earendil-works/pi-ai/compat';
2
2
  import type {ModelProviderRef} from '@shipfox/api-agent-dto';
3
3
  import {
4
4
  AUTH_USER,
@@ -22,8 +22,8 @@ import {modelProviderConfigs} from '#db/schema/model-provider-configs.js';
22
22
  import {getSecretsByNamespace, setSecrets} from '#test/fixtures/secrets-client.js';
23
23
  import {agentRoutes} from './index.js';
24
24
 
25
- vi.mock('@earendil-works/pi-ai', async (importOriginal) => {
26
- const actual = await importOriginal<typeof import('@earendil-works/pi-ai')>();
25
+ vi.mock('@earendil-works/pi-ai/compat', async (importOriginal) => {
26
+ const actual = await importOriginal<typeof import('@earendil-works/pi-ai/compat')>();
27
27
  return {...actual, complete: vi.fn()};
28
28
  });
29
29