@contractspec/bundle.library 3.5.3 → 3.5.5
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 +64 -0
- package/dist/application/index.js +20 -4
- package/dist/application/mcp/cliMcp.js +1 -1
- package/dist/application/mcp/index.js +20 -4
- package/dist/application/mcp/internalMcp.js +2 -2
- package/dist/application/mcp/providerRankingMcp.js +17 -1
- package/dist/features/docs.feature.js +1 -1
- package/dist/features/index.js +1 -1
- package/dist/features/registry.js +1 -1
- package/dist/index.js +1 -1
- package/dist/node/application/index.js +20 -4
- package/dist/node/application/mcp/cliMcp.js +1 -1
- package/dist/node/application/mcp/index.js +20 -4
- package/dist/node/application/mcp/internalMcp.js +2 -2
- package/dist/node/application/mcp/providerRankingMcp.js +17 -1
- package/dist/node/features/docs.feature.js +1 -1
- package/dist/node/features/index.js +1 -1
- package/dist/node/features/registry.js +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/presentation/features/hooks/index.js +1 -1
- package/dist/node/presentation/features/hooks/useContractsRegistry.js +1 -1
- package/dist/node/presentation/features/hooks/useFeatureRegistry.js +1 -1
- package/dist/node/presentation/features/index.js +1 -1
- package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +1 -1
- package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -1
- package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +1 -1
- package/dist/node/presentation/features/organisms/FeatureEventsList.js +1 -1
- package/dist/node/presentation/features/organisms/FeatureFormsList.js +1 -1
- package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +1 -1
- package/dist/node/presentation/features/organisms/index.js +1 -1
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -1
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -1
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -1
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +1 -1
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -1
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +1 -1
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -1
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -1
- package/dist/presentation/features/hooks/index.js +1 -1
- package/dist/presentation/features/hooks/useContractsRegistry.js +1 -1
- package/dist/presentation/features/hooks/useFeatureRegistry.js +1 -1
- package/dist/presentation/features/index.js +1 -1
- package/dist/presentation/features/organisms/FeatureDataViewsList.js +1 -1
- package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -1
- package/dist/presentation/features/organisms/FeatureDiscovery/index.js +1 -1
- package/dist/presentation/features/organisms/FeatureEventsList.js +1 -1
- package/dist/presentation/features/organisms/FeatureFormsList.js +1 -1
- package/dist/presentation/features/organisms/FeaturePresentationsList.js +1 -1
- package/dist/presentation/features/organisms/index.js +1 -1
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -1
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -1
- package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -1
- package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +1 -1
- package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -1
- package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +1 -1
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -1
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -1
- package/package.json +23 -22
- package/src/application/mcp/cliMcp.ts +1 -1
- package/src/application/mcp/internalMcp.ts +2 -2
- package/src/application/mcp/providerRankingMcp.ts +23 -1
- package/src/components/docs/generated/docs-index._common.json +94 -445
- package/src/components/docs/generated/docs-index.platform-docs.json +5 -5
- package/src/components/docs/generated/docs-index.unknown.json +5 -5
- package/src/features/docs.feature.ts +1 -1
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 138ms
|
|
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 157ms
|
|
|
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 157ms
|
|
|
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 120ms
|
|
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 126ms
|
|
|
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,69 @@
|
|
|
1
1
|
# @contractspec/bundle.library
|
|
2
2
|
|
|
3
|
+
## 3.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 27b77db: feat(ai-models): add latest models and align defaults
|
|
8
|
+
- Add claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5, gpt-5.4, gpt-5-mini
|
|
9
|
+
- Add mistral-large-2512, mistral-medium-2508, mistral-small-2506, devstral-2512
|
|
10
|
+
- Add gemini-3.1-pro-preview, gemini-3.1-flash-lite-preview, gemini-3-flash-preview
|
|
11
|
+
- Fix GPT-5.4 cost and context window; update default models to claude-sonnet-4-6
|
|
12
|
+
- Enrich provider-ranking MCP with cost from ai-providers when store has none
|
|
13
|
+
- Update model allowlist for gpt-5 and gemini 3.x; align agentpacks templates
|
|
14
|
+
|
|
15
|
+
- 693eedd: chore: improve ai models
|
|
16
|
+
- Updated dependencies [27b77db]
|
|
17
|
+
- Updated dependencies [693eedd]
|
|
18
|
+
- @contractspec/lib.ai-providers@3.5.5
|
|
19
|
+
- @contractspec/lib.contracts-spec@3.5.5
|
|
20
|
+
- @contractspec/lib.contracts-runtime-server-graphql@3.5.5
|
|
21
|
+
- @contractspec/lib.contracts-runtime-server-rest@3.5.5
|
|
22
|
+
- @contractspec/lib.contracts-runtime-server-mcp@3.5.5
|
|
23
|
+
- @contractspec/lib.contracts-integrations@3.5.5
|
|
24
|
+
- @contractspec/module.context-storage@0.5.5
|
|
25
|
+
- @contractspec/lib.contracts-library@3.5.5
|
|
26
|
+
- @contractspec/lib.example-shared-ui@4.0.5
|
|
27
|
+
- @contractspec/lib.provider-ranking@0.5.5
|
|
28
|
+
- @contractspec/lib.runtime-sandbox@2.5.5
|
|
29
|
+
- @contractspec/lib.surface-runtime@0.3.5
|
|
30
|
+
- @contractspec/lib.design-system@3.5.5
|
|
31
|
+
- @contractspec/lib.content-gen@3.5.5
|
|
32
|
+
- @contractspec/module.examples@3.5.5
|
|
33
|
+
- @contractspec/lib.ui-kit-web@3.5.5
|
|
34
|
+
- @contractspec/lib.knowledge@3.5.5
|
|
35
|
+
- @contractspec/lib.ui-link@3.5.5
|
|
36
|
+
- @contractspec/lib.logger@3.5.5
|
|
37
|
+
- @contractspec/lib.schema@3.5.5
|
|
38
|
+
|
|
39
|
+
## 3.5.4
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- c585fb1: fix: mcp tooling naming
|
|
44
|
+
- f5d4816: Standardize MCP tool naming from dot notation to underscore notation for MCP protocol compatibility. Update docs, docblocks, and generated indexes accordingly. Path resolver and fixture updates.
|
|
45
|
+
- Updated dependencies [c585fb1]
|
|
46
|
+
- Updated dependencies [f5d4816]
|
|
47
|
+
- @contractspec/lib.contracts-runtime-server-graphql@3.5.4
|
|
48
|
+
- @contractspec/lib.contracts-runtime-server-rest@3.5.4
|
|
49
|
+
- @contractspec/lib.contracts-runtime-server-mcp@3.5.4
|
|
50
|
+
- @contractspec/lib.contracts-integrations@3.5.4
|
|
51
|
+
- @contractspec/module.context-storage@0.5.4
|
|
52
|
+
- @contractspec/lib.contracts-library@3.5.4
|
|
53
|
+
- @contractspec/lib.example-shared-ui@4.0.4
|
|
54
|
+
- @contractspec/lib.provider-ranking@0.5.4
|
|
55
|
+
- @contractspec/lib.runtime-sandbox@2.5.4
|
|
56
|
+
- @contractspec/lib.surface-runtime@0.3.4
|
|
57
|
+
- @contractspec/lib.contracts-spec@3.5.4
|
|
58
|
+
- @contractspec/lib.design-system@3.5.4
|
|
59
|
+
- @contractspec/lib.content-gen@3.5.4
|
|
60
|
+
- @contractspec/module.examples@3.5.4
|
|
61
|
+
- @contractspec/lib.ui-kit-web@3.5.4
|
|
62
|
+
- @contractspec/lib.knowledge@3.5.4
|
|
63
|
+
- @contractspec/lib.ui-link@3.5.4
|
|
64
|
+
- @contractspec/lib.logger@3.5.4
|
|
65
|
+
- @contractspec/lib.schema@3.5.4
|
|
66
|
+
|
|
3
67
|
## 3.5.3
|
|
4
68
|
|
|
5
69
|
### Patch Changes
|
|
@@ -565,7 +565,7 @@ function buildCliOps() {
|
|
|
565
565
|
});
|
|
566
566
|
const suggestSpec = defineCommand({
|
|
567
567
|
meta: {
|
|
568
|
-
key: "
|
|
568
|
+
key: "cli_suggestCommand",
|
|
569
569
|
version: "1.0.0",
|
|
570
570
|
stability: "stable",
|
|
571
571
|
owners: CLI_OWNERS,
|
|
@@ -739,7 +739,7 @@ function buildInternalPrompts() {
|
|
|
739
739
|
const prompts = new PromptRegistry3;
|
|
740
740
|
prompts.register(definePrompt3({
|
|
741
741
|
meta: {
|
|
742
|
-
key: "
|
|
742
|
+
key: "internal_bootstrap",
|
|
743
743
|
version: "1.0.0",
|
|
744
744
|
title: "Bootstrap internal ContractSpec agent",
|
|
745
745
|
description: "Points agents to the correct MCP endpoints and guardrails.",
|
|
@@ -777,7 +777,7 @@ function buildInternalOps() {
|
|
|
777
777
|
});
|
|
778
778
|
const describeSpec = defineCommand2({
|
|
779
779
|
meta: {
|
|
780
|
-
key: "
|
|
780
|
+
key: "internal_describe",
|
|
781
781
|
version: "1.0.0",
|
|
782
782
|
stability: "stable",
|
|
783
783
|
owners: INTERNAL_OWNERS,
|
|
@@ -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
|
}));
|
|
@@ -539,7 +539,7 @@ function buildCliOps() {
|
|
|
539
539
|
});
|
|
540
540
|
const suggestSpec = defineCommand({
|
|
541
541
|
meta: {
|
|
542
|
-
key: "
|
|
542
|
+
key: "cli_suggestCommand",
|
|
543
543
|
version: "1.0.0",
|
|
544
544
|
stability: "stable",
|
|
545
545
|
owners: CLI_OWNERS,
|
|
@@ -713,7 +713,7 @@ function buildInternalPrompts() {
|
|
|
713
713
|
const prompts = new PromptRegistry3;
|
|
714
714
|
prompts.register(definePrompt3({
|
|
715
715
|
meta: {
|
|
716
|
-
key: "
|
|
716
|
+
key: "internal_bootstrap",
|
|
717
717
|
version: "1.0.0",
|
|
718
718
|
title: "Bootstrap internal ContractSpec agent",
|
|
719
719
|
description: "Points agents to the correct MCP endpoints and guardrails.",
|
|
@@ -751,7 +751,7 @@ function buildInternalOps() {
|
|
|
751
751
|
});
|
|
752
752
|
const describeSpec = defineCommand2({
|
|
753
753
|
meta: {
|
|
754
|
-
key: "
|
|
754
|
+
key: "internal_describe",
|
|
755
755
|
version: "1.0.0",
|
|
756
756
|
stability: "stable",
|
|
757
757
|
owners: INTERNAL_OWNERS,
|
|
@@ -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
|
}));
|
|
@@ -313,7 +313,7 @@ function buildInternalPrompts() {
|
|
|
313
313
|
const prompts = new PromptRegistry;
|
|
314
314
|
prompts.register(definePrompt({
|
|
315
315
|
meta: {
|
|
316
|
-
key: "
|
|
316
|
+
key: "internal_bootstrap",
|
|
317
317
|
version: "1.0.0",
|
|
318
318
|
title: "Bootstrap internal ContractSpec agent",
|
|
319
319
|
description: "Points agents to the correct MCP endpoints and guardrails.",
|
|
@@ -351,7 +351,7 @@ function buildInternalOps() {
|
|
|
351
351
|
});
|
|
352
352
|
const describeSpec = defineCommand({
|
|
353
353
|
meta: {
|
|
354
|
-
key: "
|
|
354
|
+
key: "internal_describe",
|
|
355
355
|
version: "1.0.0",
|
|
356
356
|
stability: "stable",
|
|
357
357
|
owners: INTERNAL_OWNERS,
|
|
@@ -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
|
}));
|
package/dist/features/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -33380,7 +33380,7 @@ var DocsFeature = {
|
|
|
33380
33380
|
stability: "stable"
|
|
33381
33381
|
},
|
|
33382
33382
|
operations: [
|
|
33383
|
-
{ key: "
|
|
33383
|
+
{ key: "docs_search", version: "1.0.0" },
|
|
33384
33384
|
{ key: "docs.navigate", version: "1.0.0" }
|
|
33385
33385
|
],
|
|
33386
33386
|
events: [
|
|
@@ -564,7 +564,7 @@ function buildCliOps() {
|
|
|
564
564
|
});
|
|
565
565
|
const suggestSpec = defineCommand({
|
|
566
566
|
meta: {
|
|
567
|
-
key: "
|
|
567
|
+
key: "cli_suggestCommand",
|
|
568
568
|
version: "1.0.0",
|
|
569
569
|
stability: "stable",
|
|
570
570
|
owners: CLI_OWNERS,
|
|
@@ -738,7 +738,7 @@ function buildInternalPrompts() {
|
|
|
738
738
|
const prompts = new PromptRegistry3;
|
|
739
739
|
prompts.register(definePrompt3({
|
|
740
740
|
meta: {
|
|
741
|
-
key: "
|
|
741
|
+
key: "internal_bootstrap",
|
|
742
742
|
version: "1.0.0",
|
|
743
743
|
title: "Bootstrap internal ContractSpec agent",
|
|
744
744
|
description: "Points agents to the correct MCP endpoints and guardrails.",
|
|
@@ -776,7 +776,7 @@ function buildInternalOps() {
|
|
|
776
776
|
});
|
|
777
777
|
const describeSpec = defineCommand2({
|
|
778
778
|
meta: {
|
|
779
|
-
key: "
|
|
779
|
+
key: "internal_describe",
|
|
780
780
|
version: "1.0.0",
|
|
781
781
|
stability: "stable",
|
|
782
782
|
owners: INTERNAL_OWNERS,
|
|
@@ -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
|
}));
|
|
@@ -538,7 +538,7 @@ function buildCliOps() {
|
|
|
538
538
|
});
|
|
539
539
|
const suggestSpec = defineCommand({
|
|
540
540
|
meta: {
|
|
541
|
-
key: "
|
|
541
|
+
key: "cli_suggestCommand",
|
|
542
542
|
version: "1.0.0",
|
|
543
543
|
stability: "stable",
|
|
544
544
|
owners: CLI_OWNERS,
|
|
@@ -712,7 +712,7 @@ function buildInternalPrompts() {
|
|
|
712
712
|
const prompts = new PromptRegistry3;
|
|
713
713
|
prompts.register(definePrompt3({
|
|
714
714
|
meta: {
|
|
715
|
-
key: "
|
|
715
|
+
key: "internal_bootstrap",
|
|
716
716
|
version: "1.0.0",
|
|
717
717
|
title: "Bootstrap internal ContractSpec agent",
|
|
718
718
|
description: "Points agents to the correct MCP endpoints and guardrails.",
|
|
@@ -750,7 +750,7 @@ function buildInternalOps() {
|
|
|
750
750
|
});
|
|
751
751
|
const describeSpec = defineCommand2({
|
|
752
752
|
meta: {
|
|
753
|
-
key: "
|
|
753
|
+
key: "internal_describe",
|
|
754
754
|
version: "1.0.0",
|
|
755
755
|
stability: "stable",
|
|
756
756
|
owners: INTERNAL_OWNERS,
|
|
@@ -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
|
}));
|
|
@@ -312,7 +312,7 @@ function buildInternalPrompts() {
|
|
|
312
312
|
const prompts = new PromptRegistry;
|
|
313
313
|
prompts.register(definePrompt({
|
|
314
314
|
meta: {
|
|
315
|
-
key: "
|
|
315
|
+
key: "internal_bootstrap",
|
|
316
316
|
version: "1.0.0",
|
|
317
317
|
title: "Bootstrap internal ContractSpec agent",
|
|
318
318
|
description: "Points agents to the correct MCP endpoints and guardrails.",
|
|
@@ -350,7 +350,7 @@ function buildInternalOps() {
|
|
|
350
350
|
});
|
|
351
351
|
const describeSpec = defineCommand({
|
|
352
352
|
meta: {
|
|
353
|
-
key: "
|
|
353
|
+
key: "internal_describe",
|
|
354
354
|
version: "1.0.0",
|
|
355
355
|
stability: "stable",
|
|
356
356
|
owners: INTERNAL_OWNERS,
|
|
@@ -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/dist/node/index.js
CHANGED
|
@@ -33379,7 +33379,7 @@ var DocsFeature = {
|
|
|
33379
33379
|
stability: "stable"
|
|
33380
33380
|
},
|
|
33381
33381
|
operations: [
|
|
33382
|
-
{ key: "
|
|
33382
|
+
{ key: "docs_search", version: "1.0.0" },
|
|
33383
33383
|
{ key: "docs.navigate", version: "1.0.0" }
|
|
33384
33384
|
],
|
|
33385
33385
|
events: [
|