@contractspec/bundle.workspace 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/dist/index.js CHANGED
@@ -586,6 +586,7 @@ import { anthropic } from "@ai-sdk/anthropic";
586
586
  import { openai } from "@ai-sdk/openai";
587
587
  import { ollama } from "ollama-ai-provider";
588
588
  import { generateObject, generateText, streamText } from "ai";
589
+ import { DEFAULT_MODELS } from "@contractspec/lib.ai-providers/models";
589
590
  function createNodeAiAdapter(config) {
590
591
  return {
591
592
  async validateProvider(providerConfig) {
@@ -654,11 +655,11 @@ function getAIProvider(config) {
654
655
  const { aiProvider, aiModel, customEndpoint } = config;
655
656
  switch (aiProvider) {
656
657
  case "claude": {
657
- const model = aiModel ?? "claude-3-5-sonnet-20241022";
658
+ const model = aiModel ?? DEFAULT_MODELS.anthropic;
658
659
  return anthropic(model);
659
660
  }
660
661
  case "openai": {
661
- const model = aiModel ?? "gpt-4o";
662
+ const model = aiModel ?? DEFAULT_MODELS.openai;
662
663
  return openai(model);
663
664
  }
664
665
  case "ollama": {
@@ -2465,7 +2466,7 @@ class OpenAICodexAgent {
2465
2466
  }
2466
2467
  try {
2467
2468
  const isComplex = this.isComplexTask(task);
2468
- const modelName = isComplex ? "o1" : "gpt-4o";
2469
+ const modelName = isComplex ? "o1" : "gpt-5.4";
2469
2470
  const model = openai2(modelName);
2470
2471
  const systemPrompt = this.buildSystemPrompt(task);
2471
2472
  const userPrompt = this.buildUserPrompt(task);
@@ -2500,7 +2501,7 @@ class OpenAICodexAgent {
2500
2501
  };
2501
2502
  }
2502
2503
  try {
2503
- const model = openai2("gpt-4o");
2504
+ const model = openai2("gpt-5.4");
2504
2505
  const prompt = `
2505
2506
  Review this code implementation against its specification.
2506
2507
 
@@ -5158,7 +5159,7 @@ function generateContractsrcConfig(options) {
5158
5159
  return {
5159
5160
  $schema: "https://api.contractspec.io/schemas/contractsrc.json",
5160
5161
  aiProvider: "claude",
5161
- aiModel: "claude-sonnet-4-20250514",
5162
+ aiModel: "claude-sonnet-4-6",
5162
5163
  agentMode: "claude-code",
5163
5164
  outputDir: "./src",
5164
5165
  conventions: {
@@ -586,6 +586,7 @@ import { anthropic } from "@ai-sdk/anthropic";
586
586
  import { openai } from "@ai-sdk/openai";
587
587
  import { ollama } from "ollama-ai-provider";
588
588
  import { generateObject, generateText, streamText } from "ai";
589
+ import { DEFAULT_MODELS } from "@contractspec/lib.ai-providers/models";
589
590
  function createNodeAiAdapter(config) {
590
591
  return {
591
592
  async validateProvider(providerConfig) {
@@ -654,11 +655,11 @@ function getAIProvider(config) {
654
655
  const { aiProvider, aiModel, customEndpoint } = config;
655
656
  switch (aiProvider) {
656
657
  case "claude": {
657
- const model = aiModel ?? "claude-3-5-sonnet-20241022";
658
+ const model = aiModel ?? DEFAULT_MODELS.anthropic;
658
659
  return anthropic(model);
659
660
  }
660
661
  case "openai": {
661
- const model = aiModel ?? "gpt-4o";
662
+ const model = aiModel ?? DEFAULT_MODELS.openai;
662
663
  return openai(model);
663
664
  }
664
665
  case "ollama": {
@@ -2465,7 +2466,7 @@ class OpenAICodexAgent {
2465
2466
  }
2466
2467
  try {
2467
2468
  const isComplex = this.isComplexTask(task);
2468
- const modelName = isComplex ? "o1" : "gpt-4o";
2469
+ const modelName = isComplex ? "o1" : "gpt-5.4";
2469
2470
  const model = openai2(modelName);
2470
2471
  const systemPrompt = this.buildSystemPrompt(task);
2471
2472
  const userPrompt = this.buildUserPrompt(task);
@@ -2500,7 +2501,7 @@ class OpenAICodexAgent {
2500
2501
  };
2501
2502
  }
2502
2503
  try {
2503
- const model = openai2("gpt-4o");
2504
+ const model = openai2("gpt-5.4");
2504
2505
  const prompt = `
2505
2506
  Review this code implementation against its specification.
2506
2507
 
@@ -5158,7 +5159,7 @@ function generateContractsrcConfig(options) {
5158
5159
  return {
5159
5160
  $schema: "https://api.contractspec.io/schemas/contractsrc.json",
5160
5161
  aiProvider: "claude",
5161
- aiModel: "claude-sonnet-4-20250514",
5162
+ aiModel: "claude-sonnet-4-6",
5162
5163
  agentMode: "claude-code",
5163
5164
  outputDir: "./src",
5164
5165
  conventions: {
@@ -123,7 +123,7 @@ export interface BatchFixRequest {
123
123
  * Context for spec generation.
124
124
  */
125
125
  export interface SpecGenerationContext {
126
- /** Spec key (e.g., "docs.search"). */
126
+ /** Spec key (e.g., "docs_search"). */
127
127
  key: string;
128
128
  /** Spec version (e.g., "1.0.0"). */
129
129
  version: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/bundle.workspace",
3
- "version": "3.5.3",
3
+ "version": "3.5.5",
4
4
  "description": "Workspace utilities for monorepo development",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -33,14 +33,14 @@
33
33
  "dependencies": {
34
34
  "@ai-sdk/anthropic": "3.0.58",
35
35
  "@ai-sdk/openai": "3.0.41",
36
- "@contractspec/lib.ai-agent": "5.0.3",
37
- "@contractspec/lib.ai-providers": "3.5.3",
38
- "@contractspec/lib.contracts-spec": "3.5.3",
39
- "@contractspec/lib.contracts-integrations": "3.5.3",
40
- "@contractspec/lib.contracts-transformers": "3.5.3",
41
- "@contractspec/lib.source-extractors": "2.5.3",
42
- "@contractspec/module.workspace": "3.5.3",
43
- "@contractspec/lib.utils-typescript": "3.5.3",
36
+ "@contractspec/lib.ai-agent": "5.0.5",
37
+ "@contractspec/lib.ai-providers": "3.5.5",
38
+ "@contractspec/lib.contracts-spec": "3.5.5",
39
+ "@contractspec/lib.contracts-integrations": "3.5.5",
40
+ "@contractspec/lib.contracts-transformers": "3.5.5",
41
+ "@contractspec/lib.source-extractors": "2.5.5",
42
+ "@contractspec/module.workspace": "3.5.5",
43
+ "@contractspec/lib.utils-typescript": "3.5.5",
44
44
  "ai": "6.0.116",
45
45
  "chalk": "^5.6.2",
46
46
  "chokidar": "^5.0.0",
@@ -52,12 +52,12 @@
52
52
  "zod": "^4.3.5"
53
53
  },
54
54
  "devDependencies": {
55
- "@contractspec/tool.typescript": "3.5.3",
55
+ "@contractspec/tool.typescript": "3.5.5",
56
56
  "@types/bun": "^1.3.10",
57
57
  "@types/micromatch": "^4.0.10",
58
58
  "@types/node": "^25.3.5",
59
59
  "typescript": "^5.9.3",
60
- "@contractspec/tool.bun": "3.5.3"
60
+ "@contractspec/tool.bun": "3.5.5"
61
61
  },
62
62
  "exports": {
63
63
  ".": {