@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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +31 -0
- package/dist/config.d.ts +1 -1
- package/dist/core/harness/pi.js +1 -1
- package/dist/core/harness/pi.js.map +1 -1
- package/dist/core/model-provider-validation.js +1 -1
- package/dist/core/model-provider-validation.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/core/catalog-registry.test.ts +2 -2
- package/src/core/harness/pi.ts +2 -2
- package/src/core/harness/registry.test.ts +2 -2
- package/src/core/model-provider-validation.test.ts +1 -1
- package/src/core/model-provider-validation.ts +1 -1
- package/src/presentation/routes/model-provider-catalog.test.ts +1 -1
- package/src/presentation/routes/model-provider-config.test.ts +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipfox/api-agent",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "
|
|
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.
|
|
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": "
|
|
43
|
-
"@shipfox/api-auth-context": "
|
|
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.
|
|
50
|
-
"@shipfox/node-module": "1.0.
|
|
51
|
-
"@shipfox/node-opentelemetry": "0.6.
|
|
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
|
|
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
|
|
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
|
});
|
package/src/core/harness/pi.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {getModels
|
|
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
|
|
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', () => {
|
|
@@ -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(
|
|
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
|
|