@contractspec/bundle.library 3.5.4 → 3.6.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 +8 -8
- package/CHANGELOG.md +69 -0
- package/dist/application/index.js +17 -1
- package/dist/application/mcp/index.js +17 -1
- package/dist/application/mcp/providerRankingMcp.js +17 -1
- package/dist/node/application/index.js +17 -1
- package/dist/node/application/mcp/index.js +17 -1
- package/dist/node/application/mcp/providerRankingMcp.js +17 -1
- package/package.json +23 -22
- package/src/application/mcp/providerRankingMcp.ts +23 -1
- package/src/bundles/LibraryBundle.ts +2 -4
- package/src/components/docs/generated/docs-index._common.json +504 -93
- package/src/components/docs/generated/docs-index.ai-chat-assistant.json +10 -0
- package/src/components/docs/generated/docs-index.manifest.json +9 -4
- package/src/components/docs/generated/docs-index.platform-docs.json +12 -4
- package/src/components/docs/generated/docs-index.unknown.json +4 -4
- package/src/components/shell/WorkspaceShellRenderer.tsx +4 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -3,7 +3,7 @@ $ bun run prebuild && bun run build:bundle && bun run build:types
|
|
|
3
3
|
$ contractspec-bun-build prebuild
|
|
4
4
|
$ contractspec-bun-build transpile
|
|
5
5
|
[contractspec-bun-build] transpile target=bun root=src entries=297 noBundle=false
|
|
6
|
-
Bundled 297 modules in
|
|
6
|
+
Bundled 297 modules in 164ms
|
|
7
7
|
|
|
8
8
|
application/context-storage/index.js 1.0 KB (entry point)
|
|
9
9
|
presentation/features/templates/types.js 8 bytes (entry point)
|
|
@@ -288,13 +288,13 @@ Bundled 297 modules in 120ms
|
|
|
288
288
|
bundles/LibraryBundle.js 4.0 KB (entry point)
|
|
289
289
|
components/docs/DocsIndexPage.js 10.60 KB (entry point)
|
|
290
290
|
components/docs/advanced/AdvancedMCPPage.js 12.95 KB (entry point)
|
|
291
|
-
application/index.js
|
|
292
|
-
application/mcp/index.js
|
|
291
|
+
application/index.js 46.22 KB (entry point)
|
|
292
|
+
application/mcp/index.js 45.24 KB (entry point)
|
|
293
293
|
application/mcp/docsMcp.js 10.46 KB (entry point)
|
|
294
294
|
features/docs/index.js 443 bytes (entry point)
|
|
295
295
|
features/docs/docs.contracts.js 443 bytes (entry point)
|
|
296
296
|
application/mcp/internalMcp.js 11.50 KB (entry point)
|
|
297
|
-
application/mcp/providerRankingMcp.js
|
|
297
|
+
application/mcp/providerRankingMcp.js 15.51 KB (entry point)
|
|
298
298
|
application/mcp/cliMcp.js 12.81 KB (entry point)
|
|
299
299
|
application/mcp/contractsMcp.js 16.0 KB (entry point)
|
|
300
300
|
infrastructure/elysia/logger.js 0.77 KB (entry point)
|
|
@@ -304,7 +304,7 @@ Bundled 297 modules in 120ms
|
|
|
304
304
|
application/mcp/contractsMcpTypes.js 8 bytes (entry point)
|
|
305
305
|
|
|
306
306
|
[contractspec-bun-build] transpile target=node root=src entries=297 noBundle=false
|
|
307
|
-
Bundled 297 modules in
|
|
307
|
+
Bundled 297 modules in 124ms
|
|
308
308
|
|
|
309
309
|
application/context-storage/index.js 0.99 KB (entry point)
|
|
310
310
|
presentation/features/templates/types.js 0 KB (entry point)
|
|
@@ -589,13 +589,13 @@ Bundled 297 modules in 116ms
|
|
|
589
589
|
bundles/LibraryBundle.js 4.0 KB (entry point)
|
|
590
590
|
components/docs/DocsIndexPage.js 10.59 KB (entry point)
|
|
591
591
|
components/docs/advanced/AdvancedMCPPage.js 12.94 KB (entry point)
|
|
592
|
-
application/index.js
|
|
593
|
-
application/mcp/index.js
|
|
592
|
+
application/index.js 46.23 KB (entry point)
|
|
593
|
+
application/mcp/index.js 45.24 KB (entry point)
|
|
594
594
|
application/mcp/docsMcp.js 10.46 KB (entry point)
|
|
595
595
|
features/docs/index.js 435 bytes (entry point)
|
|
596
596
|
features/docs/docs.contracts.js 435 bytes (entry point)
|
|
597
597
|
application/mcp/internalMcp.js 11.49 KB (entry point)
|
|
598
|
-
application/mcp/providerRankingMcp.js
|
|
598
|
+
application/mcp/providerRankingMcp.js 15.50 KB (entry point)
|
|
599
599
|
application/mcp/cliMcp.js 12.82 KB (entry point)
|
|
600
600
|
application/mcp/contractsMcp.js 16.0 KB (entry point)
|
|
601
601
|
infrastructure/elysia/logger.js 0.77 KB (entry point)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
# @contractspec/bundle.library
|
|
2
2
|
|
|
3
|
+
## 3.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ea320ea: feat: ai-chat tooling
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [6e3fe40]
|
|
12
|
+
- Updated dependencies [44b46cd]
|
|
13
|
+
- Updated dependencies [ea320ea]
|
|
14
|
+
- Updated dependencies [9d55d95]
|
|
15
|
+
- @contractspec/lib.contracts-spec@3.6.0
|
|
16
|
+
- @contractspec/module.examples@3.6.0
|
|
17
|
+
- @contractspec/lib.contracts-runtime-server-graphql@3.6.0
|
|
18
|
+
- @contractspec/lib.contracts-runtime-server-rest@3.6.0
|
|
19
|
+
- @contractspec/lib.contracts-runtime-server-mcp@3.6.0
|
|
20
|
+
- @contractspec/lib.contracts-integrations@3.6.0
|
|
21
|
+
- @contractspec/module.context-storage@0.6.0
|
|
22
|
+
- @contractspec/lib.contracts-library@3.6.0
|
|
23
|
+
- @contractspec/lib.example-shared-ui@5.0.0
|
|
24
|
+
- @contractspec/lib.provider-ranking@0.6.0
|
|
25
|
+
- @contractspec/lib.runtime-sandbox@2.6.0
|
|
26
|
+
- @contractspec/lib.surface-runtime@0.4.0
|
|
27
|
+
- @contractspec/lib.design-system@3.6.0
|
|
28
|
+
- @contractspec/lib.ai-providers@3.6.0
|
|
29
|
+
- @contractspec/lib.content-gen@3.6.0
|
|
30
|
+
- @contractspec/lib.ui-kit-web@3.6.0
|
|
31
|
+
- @contractspec/lib.knowledge@3.6.0
|
|
32
|
+
- @contractspec/lib.ui-link@3.6.0
|
|
33
|
+
- @contractspec/lib.logger@3.6.0
|
|
34
|
+
- @contractspec/lib.schema@3.6.0
|
|
35
|
+
|
|
36
|
+
## 3.5.5
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- 27b77db: feat(ai-models): add latest models and align defaults
|
|
41
|
+
- Add claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5, gpt-5.4, gpt-5-mini
|
|
42
|
+
- Add mistral-large-2512, mistral-medium-2508, mistral-small-2506, devstral-2512
|
|
43
|
+
- Add gemini-3.1-pro-preview, gemini-3.1-flash-lite-preview, gemini-3-flash-preview
|
|
44
|
+
- Fix GPT-5.4 cost and context window; update default models to claude-sonnet-4-6
|
|
45
|
+
- Enrich provider-ranking MCP with cost from ai-providers when store has none
|
|
46
|
+
- Update model allowlist for gpt-5 and gemini 3.x; align agentpacks templates
|
|
47
|
+
|
|
48
|
+
- 693eedd: chore: improve ai models
|
|
49
|
+
- Updated dependencies [27b77db]
|
|
50
|
+
- Updated dependencies [693eedd]
|
|
51
|
+
- @contractspec/lib.ai-providers@3.5.5
|
|
52
|
+
- @contractspec/lib.contracts-spec@3.5.5
|
|
53
|
+
- @contractspec/lib.contracts-runtime-server-graphql@3.5.5
|
|
54
|
+
- @contractspec/lib.contracts-runtime-server-rest@3.5.5
|
|
55
|
+
- @contractspec/lib.contracts-runtime-server-mcp@3.5.5
|
|
56
|
+
- @contractspec/lib.contracts-integrations@3.5.5
|
|
57
|
+
- @contractspec/module.context-storage@0.5.5
|
|
58
|
+
- @contractspec/lib.contracts-library@3.5.5
|
|
59
|
+
- @contractspec/lib.example-shared-ui@4.0.5
|
|
60
|
+
- @contractspec/lib.provider-ranking@0.5.5
|
|
61
|
+
- @contractspec/lib.runtime-sandbox@2.5.5
|
|
62
|
+
- @contractspec/lib.surface-runtime@0.3.5
|
|
63
|
+
- @contractspec/lib.design-system@3.5.5
|
|
64
|
+
- @contractspec/lib.content-gen@3.5.5
|
|
65
|
+
- @contractspec/module.examples@3.5.5
|
|
66
|
+
- @contractspec/lib.ui-kit-web@3.5.5
|
|
67
|
+
- @contractspec/lib.knowledge@3.5.5
|
|
68
|
+
- @contractspec/lib.ui-link@3.5.5
|
|
69
|
+
- @contractspec/lib.logger@3.5.5
|
|
70
|
+
- @contractspec/lib.schema@3.5.5
|
|
71
|
+
|
|
3
72
|
## 3.5.4
|
|
4
73
|
|
|
5
74
|
### Patch Changes
|
|
@@ -829,6 +829,7 @@ import {
|
|
|
829
829
|
RankingRefreshCommand
|
|
830
830
|
} from "@contractspec/lib.contracts-spec/provider-ranking";
|
|
831
831
|
import z4 from "zod";
|
|
832
|
+
import { getModelInfo } from "@contractspec/lib.ai-providers/models";
|
|
832
833
|
import { InMemoryProviderRankingStore } from "@contractspec/lib.provider-ranking/in-memory-store";
|
|
833
834
|
import { createDefaultIngesterRegistry } from "@contractspec/lib.provider-ranking/ingesters";
|
|
834
835
|
import { computeModelRankings } from "@contractspec/lib.provider-ranking/scoring";
|
|
@@ -927,10 +928,25 @@ function buildRankingResources() {
|
|
|
927
928
|
data: JSON.stringify({ error: "not_found", modelId })
|
|
928
929
|
};
|
|
929
930
|
}
|
|
931
|
+
const enriched = profile.costPerMillion == null ? (() => {
|
|
932
|
+
const info = getModelInfo(profile.modelId);
|
|
933
|
+
return info?.costPerMillion ? {
|
|
934
|
+
...profile,
|
|
935
|
+
costPerMillion: info.costPerMillion,
|
|
936
|
+
displayName: info.name,
|
|
937
|
+
contextWindow: info.contextWindow,
|
|
938
|
+
capabilities: [
|
|
939
|
+
...info.capabilities.vision ? ["vision"] : [],
|
|
940
|
+
...info.capabilities.tools ? ["tools"] : [],
|
|
941
|
+
...info.capabilities.reasoning ? ["reasoning"] : [],
|
|
942
|
+
...info.capabilities.streaming ? ["streaming"] : []
|
|
943
|
+
]
|
|
944
|
+
} : profile;
|
|
945
|
+
})() : profile;
|
|
930
946
|
return {
|
|
931
947
|
uri: `ranking://model/${encodeURIComponent(modelId)}`,
|
|
932
948
|
mimeType: "application/json",
|
|
933
|
-
data: JSON.stringify(
|
|
949
|
+
data: JSON.stringify(enriched, null, 2)
|
|
934
950
|
};
|
|
935
951
|
}
|
|
936
952
|
}));
|
|
@@ -803,6 +803,7 @@ import {
|
|
|
803
803
|
RankingRefreshCommand
|
|
804
804
|
} from "@contractspec/lib.contracts-spec/provider-ranking";
|
|
805
805
|
import z4 from "zod";
|
|
806
|
+
import { getModelInfo } from "@contractspec/lib.ai-providers/models";
|
|
806
807
|
import { InMemoryProviderRankingStore } from "@contractspec/lib.provider-ranking/in-memory-store";
|
|
807
808
|
import { createDefaultIngesterRegistry } from "@contractspec/lib.provider-ranking/ingesters";
|
|
808
809
|
import { computeModelRankings } from "@contractspec/lib.provider-ranking/scoring";
|
|
@@ -901,10 +902,25 @@ function buildRankingResources() {
|
|
|
901
902
|
data: JSON.stringify({ error: "not_found", modelId })
|
|
902
903
|
};
|
|
903
904
|
}
|
|
905
|
+
const enriched = profile.costPerMillion == null ? (() => {
|
|
906
|
+
const info = getModelInfo(profile.modelId);
|
|
907
|
+
return info?.costPerMillion ? {
|
|
908
|
+
...profile,
|
|
909
|
+
costPerMillion: info.costPerMillion,
|
|
910
|
+
displayName: info.name,
|
|
911
|
+
contextWindow: info.contextWindow,
|
|
912
|
+
capabilities: [
|
|
913
|
+
...info.capabilities.vision ? ["vision"] : [],
|
|
914
|
+
...info.capabilities.tools ? ["tools"] : [],
|
|
915
|
+
...info.capabilities.reasoning ? ["reasoning"] : [],
|
|
916
|
+
...info.capabilities.streaming ? ["streaming"] : []
|
|
917
|
+
]
|
|
918
|
+
} : profile;
|
|
919
|
+
})() : profile;
|
|
904
920
|
return {
|
|
905
921
|
uri: `ranking://model/${encodeURIComponent(modelId)}`,
|
|
906
922
|
mimeType: "application/json",
|
|
907
|
-
data: JSON.stringify(
|
|
923
|
+
data: JSON.stringify(enriched, null, 2)
|
|
908
924
|
};
|
|
909
925
|
}
|
|
910
926
|
}));
|
|
@@ -213,6 +213,7 @@ import {
|
|
|
213
213
|
RankingRefreshCommand
|
|
214
214
|
} from "@contractspec/lib.contracts-spec/provider-ranking";
|
|
215
215
|
import z from "zod";
|
|
216
|
+
import { getModelInfo } from "@contractspec/lib.ai-providers/models";
|
|
216
217
|
import { InMemoryProviderRankingStore } from "@contractspec/lib.provider-ranking/in-memory-store";
|
|
217
218
|
import { createDefaultIngesterRegistry } from "@contractspec/lib.provider-ranking/ingesters";
|
|
218
219
|
import { computeModelRankings } from "@contractspec/lib.provider-ranking/scoring";
|
|
@@ -311,10 +312,25 @@ function buildRankingResources() {
|
|
|
311
312
|
data: JSON.stringify({ error: "not_found", modelId })
|
|
312
313
|
};
|
|
313
314
|
}
|
|
315
|
+
const enriched = profile.costPerMillion == null ? (() => {
|
|
316
|
+
const info = getModelInfo(profile.modelId);
|
|
317
|
+
return info?.costPerMillion ? {
|
|
318
|
+
...profile,
|
|
319
|
+
costPerMillion: info.costPerMillion,
|
|
320
|
+
displayName: info.name,
|
|
321
|
+
contextWindow: info.contextWindow,
|
|
322
|
+
capabilities: [
|
|
323
|
+
...info.capabilities.vision ? ["vision"] : [],
|
|
324
|
+
...info.capabilities.tools ? ["tools"] : [],
|
|
325
|
+
...info.capabilities.reasoning ? ["reasoning"] : [],
|
|
326
|
+
...info.capabilities.streaming ? ["streaming"] : []
|
|
327
|
+
]
|
|
328
|
+
} : profile;
|
|
329
|
+
})() : profile;
|
|
314
330
|
return {
|
|
315
331
|
uri: `ranking://model/${encodeURIComponent(modelId)}`,
|
|
316
332
|
mimeType: "application/json",
|
|
317
|
-
data: JSON.stringify(
|
|
333
|
+
data: JSON.stringify(enriched, null, 2)
|
|
318
334
|
};
|
|
319
335
|
}
|
|
320
336
|
}));
|
|
@@ -828,6 +828,7 @@ import {
|
|
|
828
828
|
RankingRefreshCommand
|
|
829
829
|
} from "@contractspec/lib.contracts-spec/provider-ranking";
|
|
830
830
|
import z4 from "zod";
|
|
831
|
+
import { getModelInfo } from "@contractspec/lib.ai-providers/models";
|
|
831
832
|
import { InMemoryProviderRankingStore } from "@contractspec/lib.provider-ranking/in-memory-store";
|
|
832
833
|
import { createDefaultIngesterRegistry } from "@contractspec/lib.provider-ranking/ingesters";
|
|
833
834
|
import { computeModelRankings } from "@contractspec/lib.provider-ranking/scoring";
|
|
@@ -926,10 +927,25 @@ function buildRankingResources() {
|
|
|
926
927
|
data: JSON.stringify({ error: "not_found", modelId })
|
|
927
928
|
};
|
|
928
929
|
}
|
|
930
|
+
const enriched = profile.costPerMillion == null ? (() => {
|
|
931
|
+
const info = getModelInfo(profile.modelId);
|
|
932
|
+
return info?.costPerMillion ? {
|
|
933
|
+
...profile,
|
|
934
|
+
costPerMillion: info.costPerMillion,
|
|
935
|
+
displayName: info.name,
|
|
936
|
+
contextWindow: info.contextWindow,
|
|
937
|
+
capabilities: [
|
|
938
|
+
...info.capabilities.vision ? ["vision"] : [],
|
|
939
|
+
...info.capabilities.tools ? ["tools"] : [],
|
|
940
|
+
...info.capabilities.reasoning ? ["reasoning"] : [],
|
|
941
|
+
...info.capabilities.streaming ? ["streaming"] : []
|
|
942
|
+
]
|
|
943
|
+
} : profile;
|
|
944
|
+
})() : profile;
|
|
929
945
|
return {
|
|
930
946
|
uri: `ranking://model/${encodeURIComponent(modelId)}`,
|
|
931
947
|
mimeType: "application/json",
|
|
932
|
-
data: JSON.stringify(
|
|
948
|
+
data: JSON.stringify(enriched, null, 2)
|
|
933
949
|
};
|
|
934
950
|
}
|
|
935
951
|
}));
|
|
@@ -802,6 +802,7 @@ import {
|
|
|
802
802
|
RankingRefreshCommand
|
|
803
803
|
} from "@contractspec/lib.contracts-spec/provider-ranking";
|
|
804
804
|
import z4 from "zod";
|
|
805
|
+
import { getModelInfo } from "@contractspec/lib.ai-providers/models";
|
|
805
806
|
import { InMemoryProviderRankingStore } from "@contractspec/lib.provider-ranking/in-memory-store";
|
|
806
807
|
import { createDefaultIngesterRegistry } from "@contractspec/lib.provider-ranking/ingesters";
|
|
807
808
|
import { computeModelRankings } from "@contractspec/lib.provider-ranking/scoring";
|
|
@@ -900,10 +901,25 @@ function buildRankingResources() {
|
|
|
900
901
|
data: JSON.stringify({ error: "not_found", modelId })
|
|
901
902
|
};
|
|
902
903
|
}
|
|
904
|
+
const enriched = profile.costPerMillion == null ? (() => {
|
|
905
|
+
const info = getModelInfo(profile.modelId);
|
|
906
|
+
return info?.costPerMillion ? {
|
|
907
|
+
...profile,
|
|
908
|
+
costPerMillion: info.costPerMillion,
|
|
909
|
+
displayName: info.name,
|
|
910
|
+
contextWindow: info.contextWindow,
|
|
911
|
+
capabilities: [
|
|
912
|
+
...info.capabilities.vision ? ["vision"] : [],
|
|
913
|
+
...info.capabilities.tools ? ["tools"] : [],
|
|
914
|
+
...info.capabilities.reasoning ? ["reasoning"] : [],
|
|
915
|
+
...info.capabilities.streaming ? ["streaming"] : []
|
|
916
|
+
]
|
|
917
|
+
} : profile;
|
|
918
|
+
})() : profile;
|
|
903
919
|
return {
|
|
904
920
|
uri: `ranking://model/${encodeURIComponent(modelId)}`,
|
|
905
921
|
mimeType: "application/json",
|
|
906
|
-
data: JSON.stringify(
|
|
922
|
+
data: JSON.stringify(enriched, null, 2)
|
|
907
923
|
};
|
|
908
924
|
}
|
|
909
925
|
}));
|
|
@@ -212,6 +212,7 @@ import {
|
|
|
212
212
|
RankingRefreshCommand
|
|
213
213
|
} from "@contractspec/lib.contracts-spec/provider-ranking";
|
|
214
214
|
import z from "zod";
|
|
215
|
+
import { getModelInfo } from "@contractspec/lib.ai-providers/models";
|
|
215
216
|
import { InMemoryProviderRankingStore } from "@contractspec/lib.provider-ranking/in-memory-store";
|
|
216
217
|
import { createDefaultIngesterRegistry } from "@contractspec/lib.provider-ranking/ingesters";
|
|
217
218
|
import { computeModelRankings } from "@contractspec/lib.provider-ranking/scoring";
|
|
@@ -310,10 +311,25 @@ function buildRankingResources() {
|
|
|
310
311
|
data: JSON.stringify({ error: "not_found", modelId })
|
|
311
312
|
};
|
|
312
313
|
}
|
|
314
|
+
const enriched = profile.costPerMillion == null ? (() => {
|
|
315
|
+
const info = getModelInfo(profile.modelId);
|
|
316
|
+
return info?.costPerMillion ? {
|
|
317
|
+
...profile,
|
|
318
|
+
costPerMillion: info.costPerMillion,
|
|
319
|
+
displayName: info.name,
|
|
320
|
+
contextWindow: info.contextWindow,
|
|
321
|
+
capabilities: [
|
|
322
|
+
...info.capabilities.vision ? ["vision"] : [],
|
|
323
|
+
...info.capabilities.tools ? ["tools"] : [],
|
|
324
|
+
...info.capabilities.reasoning ? ["reasoning"] : [],
|
|
325
|
+
...info.capabilities.streaming ? ["streaming"] : []
|
|
326
|
+
]
|
|
327
|
+
} : profile;
|
|
328
|
+
})() : profile;
|
|
313
329
|
return {
|
|
314
330
|
uri: `ranking://model/${encodeURIComponent(modelId)}`,
|
|
315
331
|
mimeType: "application/json",
|
|
316
|
-
data: JSON.stringify(
|
|
332
|
+
data: JSON.stringify(enriched, null, 2)
|
|
317
333
|
};
|
|
318
334
|
}
|
|
319
335
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/bundle.library",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf dist",
|
|
@@ -2161,22 +2161,23 @@
|
|
|
2161
2161
|
},
|
|
2162
2162
|
"dependencies": {
|
|
2163
2163
|
"@apollo/client": "^4.1.6",
|
|
2164
|
-
"@contractspec/lib.
|
|
2165
|
-
"@contractspec/lib.contracts-
|
|
2166
|
-
"@contractspec/lib.
|
|
2167
|
-
"@contractspec/lib.
|
|
2168
|
-
"@contractspec/lib.
|
|
2169
|
-
"@contractspec/lib.
|
|
2170
|
-
"@contractspec/lib.
|
|
2171
|
-
"@contractspec/lib.
|
|
2172
|
-
"@contractspec/lib.
|
|
2173
|
-
"@contractspec/lib.
|
|
2174
|
-
"@contractspec/lib.
|
|
2175
|
-
"@contractspec/lib.
|
|
2176
|
-
"@contractspec/lib.
|
|
2177
|
-
"@contractspec/lib.ui-
|
|
2178
|
-
"@contractspec/
|
|
2179
|
-
"@contractspec/module.
|
|
2164
|
+
"@contractspec/lib.ai-providers": "3.6.0",
|
|
2165
|
+
"@contractspec/lib.contracts-spec": "3.6.0",
|
|
2166
|
+
"@contractspec/lib.contracts-library": "3.6.0",
|
|
2167
|
+
"@contractspec/lib.content-gen": "3.6.0",
|
|
2168
|
+
"@contractspec/lib.contracts-runtime-server-mcp": "3.6.0",
|
|
2169
|
+
"@contractspec/lib.design-system": "3.6.0",
|
|
2170
|
+
"@contractspec/lib.surface-runtime": "0.4.0",
|
|
2171
|
+
"@contractspec/lib.provider-ranking": "0.6.0",
|
|
2172
|
+
"@contractspec/lib.example-shared-ui": "5.0.0",
|
|
2173
|
+
"@contractspec/lib.knowledge": "3.6.0",
|
|
2174
|
+
"@contractspec/lib.logger": "3.6.0",
|
|
2175
|
+
"@contractspec/lib.runtime-sandbox": "2.6.0",
|
|
2176
|
+
"@contractspec/lib.schema": "3.6.0",
|
|
2177
|
+
"@contractspec/lib.ui-kit-web": "3.6.0",
|
|
2178
|
+
"@contractspec/lib.ui-link": "3.6.0",
|
|
2179
|
+
"@contractspec/module.context-storage": "0.6.0",
|
|
2180
|
+
"@contractspec/module.examples": "3.6.0",
|
|
2180
2181
|
"@dnd-kit/core": "^6.1.0",
|
|
2181
2182
|
"@dnd-kit/sortable": "^10.0.0",
|
|
2182
2183
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -2191,16 +2192,16 @@
|
|
|
2191
2192
|
"posthog-react-native": "^4.37.1",
|
|
2192
2193
|
"react-hook-form": "^7.71.2",
|
|
2193
2194
|
"zod": "^4.3.5",
|
|
2194
|
-
"@contractspec/lib.contracts-integrations": "3.
|
|
2195
|
-
"@contractspec/lib.contracts-runtime-server-rest": "3.
|
|
2196
|
-
"@contractspec/lib.contracts-runtime-server-graphql": "3.
|
|
2195
|
+
"@contractspec/lib.contracts-integrations": "3.6.0",
|
|
2196
|
+
"@contractspec/lib.contracts-runtime-server-rest": "3.6.0",
|
|
2197
|
+
"@contractspec/lib.contracts-runtime-server-graphql": "3.6.0"
|
|
2197
2198
|
},
|
|
2198
2199
|
"devDependencies": {
|
|
2199
2200
|
"@types/react": "~19.2.14",
|
|
2200
|
-
"@contractspec/tool.typescript": "3.
|
|
2201
|
+
"@contractspec/tool.typescript": "3.6.0",
|
|
2201
2202
|
"typescript": "^5.9.3",
|
|
2202
2203
|
"@types/bun": "~1.3.10",
|
|
2203
|
-
"@contractspec/tool.bun": "3.
|
|
2204
|
+
"@contractspec/tool.bun": "3.6.0"
|
|
2204
2205
|
},
|
|
2205
2206
|
"publishConfig": {
|
|
2206
2207
|
"access": "public",
|
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
ProviderTransportSupport,
|
|
20
20
|
ProviderAuthSupport,
|
|
21
21
|
} from '@contractspec/lib.provider-ranking/types';
|
|
22
|
+
import { getModelInfo } from '@contractspec/lib.ai-providers/models';
|
|
22
23
|
import { InMemoryProviderRankingStore } from '@contractspec/lib.provider-ranking/in-memory-store';
|
|
23
24
|
import { createDefaultIngesterRegistry } from '@contractspec/lib.provider-ranking/ingesters';
|
|
24
25
|
import { computeModelRankings } from '@contractspec/lib.provider-ranking/scoring';
|
|
@@ -145,10 +146,31 @@ function buildRankingResources() {
|
|
|
145
146
|
data: JSON.stringify({ error: 'not_found', modelId }),
|
|
146
147
|
};
|
|
147
148
|
}
|
|
149
|
+
// Enrich with cost from ai-providers when store has none
|
|
150
|
+
const enriched =
|
|
151
|
+
profile.costPerMillion == null
|
|
152
|
+
? (() => {
|
|
153
|
+
const info = getModelInfo(profile.modelId);
|
|
154
|
+
return info?.costPerMillion
|
|
155
|
+
? {
|
|
156
|
+
...profile,
|
|
157
|
+
costPerMillion: info.costPerMillion,
|
|
158
|
+
displayName: info.name,
|
|
159
|
+
contextWindow: info.contextWindow,
|
|
160
|
+
capabilities: [
|
|
161
|
+
...(info.capabilities.vision ? ['vision'] : []),
|
|
162
|
+
...(info.capabilities.tools ? ['tools'] : []),
|
|
163
|
+
...(info.capabilities.reasoning ? ['reasoning'] : []),
|
|
164
|
+
...(info.capabilities.streaming ? ['streaming'] : []),
|
|
165
|
+
],
|
|
166
|
+
}
|
|
167
|
+
: profile;
|
|
168
|
+
})()
|
|
169
|
+
: profile;
|
|
148
170
|
return {
|
|
149
171
|
uri: `ranking://model/${encodeURIComponent(modelId)}`,
|
|
150
172
|
mimeType: 'application/json',
|
|
151
|
-
data: JSON.stringify(
|
|
173
|
+
data: JSON.stringify(enriched, null, 2),
|
|
152
174
|
};
|
|
153
175
|
},
|
|
154
176
|
})
|
|
@@ -138,13 +138,11 @@ export const LibraryBundle = defineModuleBundle({
|
|
|
138
138
|
'Can select compact, balanced, or dense layouts for docs and templates.',
|
|
139
139
|
dataDepth:
|
|
140
140
|
'Controls content depth, pagination size, and inline expansion.',
|
|
141
|
-
control:
|
|
142
|
-
'Shows advanced commands and raw config only when allowed.',
|
|
141
|
+
control: 'Shows advanced commands and raw config only when allowed.',
|
|
143
142
|
media:
|
|
144
143
|
'Supports text-first docs, visual templates, and hybrid modes.',
|
|
145
144
|
pace: 'Maps to motion tokens and confirmation behavior.',
|
|
146
|
-
narrative:
|
|
147
|
-
'Can order summary before or after detail sections.',
|
|
145
|
+
narrative: 'Can order summary before or after detail sections.',
|
|
148
146
|
},
|
|
149
147
|
},
|
|
150
148
|
},
|