@contractspec/lib.contracts 1.45.5 → 1.46.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.
@@ -218,6 +218,61 @@ const VersioningConfigSchema = z$2.object({
218
218
  exclude: z$2.array(z$2.string()).optional()
219
219
  });
220
220
  /**
221
+ * Supported rule synchronization targets.
222
+ */
223
+ const RuleSyncTargetSchema = z$2.enum([
224
+ "cursor",
225
+ "windsurf",
226
+ "cline",
227
+ "claude-code",
228
+ "copilot",
229
+ "subagent",
230
+ "skill"
231
+ ]);
232
+ /**
233
+ * Configuration for AI agent rules synchronization (rulesync).
234
+ */
235
+ const RuleSyncConfigSchema = z$2.object({
236
+ enabled: z$2.boolean().default(false),
237
+ rulesDir: z$2.string().default("./.rules"),
238
+ rules: z$2.array(z$2.string()).default(["**/*.rule.md"]),
239
+ targets: z$2.array(RuleSyncTargetSchema).default(["cursor", "windsurf"]),
240
+ autoSync: z$2.boolean().default(true),
241
+ ejectMode: z$2.boolean().default(false)
242
+ });
243
+ /**
244
+ * Claude Agent SDK configuration.
245
+ */
246
+ const ClaudeAgentSDKConfigSchema = z$2.object({
247
+ enabled: z$2.boolean().default(false),
248
+ apiKey: z$2.string().optional(),
249
+ model: z$2.string().default("claude-sonnet-4-20250514"),
250
+ computerUse: z$2.boolean().default(false),
251
+ extendedThinking: z$2.boolean().default(false)
252
+ });
253
+ /**
254
+ * OpenCode SDK configuration.
255
+ */
256
+ const OpenCodeSDKConfigSchema = z$2.object({
257
+ enabled: z$2.boolean().default(false),
258
+ serverUrl: z$2.string().optional(),
259
+ port: z$2.number().optional(),
260
+ agentType: z$2.enum([
261
+ "build",
262
+ "plan",
263
+ "general",
264
+ "explore"
265
+ ]).default("general"),
266
+ model: z$2.string().optional()
267
+ });
268
+ /**
269
+ * External agent SDK configuration section.
270
+ */
271
+ const ExternalAgentsConfigSchema = z$2.object({
272
+ claudeAgent: ClaudeAgentSDKConfigSchema.optional(),
273
+ openCode: OpenCodeSDKConfigSchema.optional()
274
+ });
275
+ /**
221
276
  * Rule severity levels (inspired by ESLint).
222
277
  */
223
278
  const RuleSeveritySchema = z$2.enum([
@@ -284,7 +339,9 @@ const ContractsrcSchema = z$2.object({
284
339
  "simple",
285
340
  "cursor",
286
341
  "claude-code",
287
- "openai-codex"
342
+ "openai-codex",
343
+ "claude-agent-sdk",
344
+ "opencode-sdk"
288
345
  ]).default("simple"),
289
346
  customEndpoint: z$2.url().nullable().optional(),
290
347
  customApiKey: z$2.string().nullable().optional(),
@@ -302,7 +359,9 @@ const ContractsrcSchema = z$2.object({
302
359
  hooks: HooksConfigSchema.optional(),
303
360
  schemaFormat: SchemaFormatSchema.default("contractspec"),
304
361
  formatter: FormatterConfigSchema.optional(),
305
- versioning: VersioningConfigSchema.optional()
362
+ versioning: VersioningConfigSchema.optional(),
363
+ ruleSync: RuleSyncConfigSchema.optional(),
364
+ externalAgents: ExternalAgentsConfigSchema.optional()
306
365
  });
307
366
  /**
308
367
  * Default configuration values.
@@ -325,4 +384,4 @@ const DEFAULT_CONTRACTSRC = {
325
384
  };
326
385
 
327
386
  //#endregion
328
- export { BumpStrategySchema, ChangelogFormatSchema, ChangelogTierSchema, CheckRunConfigSchema, CiConfigSchema, ContractsrcSchema, DEFAULT_CONTRACTSRC, ExternalWorkspaceSchema, FolderConventionsSchema, FormatterConfigSchema, FormatterTypeSchema, GroupingRuleSchema, GroupingStrategySchema, HooksConfigSchema, ImpactConfigSchema, LintRulesSchema, MetaRepoConfigSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, PrCommentConfigSchema, RuleSeveritySchema, RulesConfigSchema, SchemaFormatSchema, SpecKindSchema, VersioningConfigSchema };
387
+ export { BumpStrategySchema, ChangelogFormatSchema, ChangelogTierSchema, CheckRunConfigSchema, CiConfigSchema, ClaudeAgentSDKConfigSchema, ContractsrcSchema, DEFAULT_CONTRACTSRC, ExternalAgentsConfigSchema, ExternalWorkspaceSchema, FolderConventionsSchema, FormatterConfigSchema, FormatterTypeSchema, GroupingRuleSchema, GroupingStrategySchema, HooksConfigSchema, ImpactConfigSchema, LintRulesSchema, MetaRepoConfigSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, OpenCodeSDKConfigSchema, PrCommentConfigSchema, RuleSeveritySchema, RuleSyncConfigSchema, RuleSyncTargetSchema, RulesConfigSchema, SchemaFormatSchema, SpecKindSchema, VersioningConfigSchema };
@@ -1,2 +1,2 @@
1
- import { BumpStrategy, BumpStrategySchema, ChangelogFormat, ChangelogFormatSchema, ChangelogTier, ChangelogTierSchema, ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventions, FolderConventionsSchema, FormatterConfig, FormatterConfigSchema, FormatterType, FormatterTypeSchema, OpenApiConfig, OpenApiConfigSchema, OpenApiExportConfig, OpenApiExportConfigSchema, OpenApiSourceConfig, OpenApiSourceConfigSchema, SchemaFormat, SchemaFormatSchema, VersioningConfig, VersioningConfigSchema } from "./contractsrc-schema.js";
2
- export { type BumpStrategy, BumpStrategySchema, type ChangelogFormat, ChangelogFormatSchema, type ChangelogTier, ChangelogTierSchema, type ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, type FolderConventions, FolderConventionsSchema, type FormatterConfig, FormatterConfigSchema, type FormatterType, FormatterTypeSchema, type OpenApiConfig, OpenApiConfigSchema, type OpenApiExportConfig, OpenApiExportConfigSchema, type OpenApiSourceConfig, OpenApiSourceConfigSchema, type SchemaFormat, SchemaFormatSchema, type VersioningConfig, VersioningConfigSchema };
1
+ import { BumpStrategy, BumpStrategySchema, ChangelogFormat, ChangelogFormatSchema, ChangelogTier, ChangelogTierSchema, ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventions, FolderConventionsSchema, FormatterConfig, FormatterConfigSchema, FormatterType, FormatterTypeSchema, OpenApiConfig, OpenApiConfigSchema, OpenApiExportConfig, OpenApiExportConfigSchema, OpenApiSourceConfig, OpenApiSourceConfigSchema, RuleSyncConfig, RuleSyncConfigSchema, RuleSyncTarget, RuleSyncTargetSchema, SchemaFormat, SchemaFormatSchema, VersioningConfig, VersioningConfigSchema } from "./contractsrc-schema.js";
2
+ export { type BumpStrategy, BumpStrategySchema, type ChangelogFormat, ChangelogFormatSchema, type ChangelogTier, ChangelogTierSchema, type ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, type FolderConventions, FolderConventionsSchema, type FormatterConfig, FormatterConfigSchema, type FormatterType, FormatterTypeSchema, type OpenApiConfig, OpenApiConfigSchema, type OpenApiExportConfig, OpenApiExportConfigSchema, type OpenApiSourceConfig, OpenApiSourceConfigSchema, type RuleSyncConfig, RuleSyncConfigSchema, type RuleSyncTarget, RuleSyncTargetSchema, type SchemaFormat, SchemaFormatSchema, type VersioningConfig, VersioningConfigSchema };
@@ -1,3 +1,3 @@
1
- import { BumpStrategySchema, ChangelogFormatSchema, ChangelogTierSchema, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, FormatterConfigSchema, FormatterTypeSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, SchemaFormatSchema, VersioningConfigSchema } from "./contractsrc-schema.js";
1
+ import { BumpStrategySchema, ChangelogFormatSchema, ChangelogTierSchema, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, FormatterConfigSchema, FormatterTypeSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, RuleSyncConfigSchema, RuleSyncTargetSchema, SchemaFormatSchema, VersioningConfigSchema } from "./contractsrc-schema.js";
2
2
 
3
- export { BumpStrategySchema, ChangelogFormatSchema, ChangelogTierSchema, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, FormatterConfigSchema, FormatterTypeSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, SchemaFormatSchema, VersioningConfigSchema };
3
+ export { BumpStrategySchema, ChangelogFormatSchema, ChangelogTierSchema, ContractsrcSchema, DEFAULT_CONTRACTSRC, FolderConventionsSchema, FormatterConfigSchema, FormatterTypeSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, RuleSyncConfigSchema, RuleSyncTargetSchema, SchemaFormatSchema, VersioningConfigSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.contracts",
3
- "version": "1.45.5",
3
+ "version": "1.46.0",
4
4
  "description": "Core contract specification definitions and runtime",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -25,8 +25,8 @@
25
25
  "test": "bun test"
26
26
  },
27
27
  "devDependencies": {
28
- "@contractspec/tool.tsdown": "1.45.5",
29
- "@contractspec/tool.typescript": "1.45.5",
28
+ "@contractspec/tool.tsdown": "1.46.0",
29
+ "@contractspec/tool.typescript": "1.46.0",
30
30
  "@types/express": "^5.0.3",
31
31
  "@types/turndown": "^5.0.6",
32
32
  "tsdown": "^0.18.3",
@@ -35,8 +35,8 @@
35
35
  "dependencies": {
36
36
  "@aws-sdk/client-secrets-manager": "^3.958.0",
37
37
  "@aws-sdk/client-sqs": "^3.958.0",
38
- "@contractspec/lib.logger": "1.45.5",
39
- "@contractspec/lib.schema": "1.45.5",
38
+ "@contractspec/lib.logger": "1.46.0",
39
+ "@contractspec/lib.schema": "1.46.0",
40
40
  "@elevenlabs/elevenlabs-js": "^2.27.0",
41
41
  "@google-cloud/secret-manager": "^6.1.1",
42
42
  "@google-cloud/storage": "^7.18.0",