@contractspec/lib.contracts 1.45.6 → 1.46.1

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.
@@ -35,9 +35,9 @@ declare const OpenApiSourceConfigSchema: z$2.ZodObject<{
35
35
  stable: "stable";
36
36
  }>>;
37
37
  defaultAuth: z$2.ZodOptional<z$2.ZodEnum<{
38
- user: "user";
39
- anonymous: "anonymous";
40
38
  admin: "admin";
39
+ anonymous: "anonymous";
40
+ user: "user";
41
41
  }>>;
42
42
  defaultOwners: z$2.ZodOptional<z$2.ZodArray<z$2.ZodString>>;
43
43
  schemaFormat: z$2.ZodDefault<z$2.ZodEnum<{
@@ -85,9 +85,9 @@ declare const OpenApiConfigSchema: z$2.ZodObject<{
85
85
  stable: "stable";
86
86
  }>>;
87
87
  defaultAuth: z$2.ZodOptional<z$2.ZodEnum<{
88
- user: "user";
89
- anonymous: "anonymous";
90
88
  admin: "admin";
89
+ anonymous: "anonymous";
90
+ user: "user";
91
91
  }>>;
92
92
  defaultOwners: z$2.ZodOptional<z$2.ZodArray<z$2.ZodString>>;
93
93
  schemaFormat: z$2.ZodDefault<z$2.ZodEnum<{
@@ -313,8 +313,8 @@ declare const ChangelogFormatSchema: z$2.ZodEnum<{
313
313
  * Changelog tier configuration.
314
314
  */
315
315
  declare const ChangelogTierSchema: z$2.ZodEnum<{
316
- spec: "spec";
317
316
  library: "library";
317
+ spec: "spec";
318
318
  monorepo: "monorepo";
319
319
  }>;
320
320
  /**
@@ -328,8 +328,8 @@ declare const VersioningConfigSchema: z$2.ZodObject<{
328
328
  }>>;
329
329
  integrateWithChangesets: z$2.ZodDefault<z$2.ZodBoolean>;
330
330
  changelogTiers: z$2.ZodDefault<z$2.ZodArray<z$2.ZodEnum<{
331
- spec: "spec";
332
331
  library: "library";
332
+ spec: "spec";
333
333
  monorepo: "monorepo";
334
334
  }>>>;
335
335
  format: z$2.ZodDefault<z$2.ZodEnum<{
@@ -348,10 +348,10 @@ declare const VersioningConfigSchema: z$2.ZodObject<{
348
348
  * Supported rule synchronization targets.
349
349
  */
350
350
  declare const RuleSyncTargetSchema: z$2.ZodEnum<{
351
+ "claude-code": "claude-code";
351
352
  cursor: "cursor";
352
353
  windsurf: "windsurf";
353
354
  cline: "cline";
354
- "claude-code": "claude-code";
355
355
  copilot: "copilot";
356
356
  subagent: "subagent";
357
357
  skill: "skill";
@@ -364,10 +364,10 @@ declare const RuleSyncConfigSchema: z$2.ZodObject<{
364
364
  rulesDir: z$2.ZodDefault<z$2.ZodString>;
365
365
  rules: z$2.ZodDefault<z$2.ZodArray<z$2.ZodString>>;
366
366
  targets: z$2.ZodDefault<z$2.ZodArray<z$2.ZodEnum<{
367
+ "claude-code": "claude-code";
367
368
  cursor: "cursor";
368
369
  windsurf: "windsurf";
369
370
  cline: "cline";
370
- "claude-code": "claude-code";
371
371
  copilot: "copilot";
372
372
  subagent: "subagent";
373
373
  skill: "skill";
@@ -375,6 +375,55 @@ declare const RuleSyncConfigSchema: z$2.ZodObject<{
375
375
  autoSync: z$2.ZodDefault<z$2.ZodBoolean>;
376
376
  ejectMode: z$2.ZodDefault<z$2.ZodBoolean>;
377
377
  }, z$2.core.$strip>;
378
+ /**
379
+ * Claude Agent SDK configuration.
380
+ */
381
+ declare const ClaudeAgentSDKConfigSchema: z$2.ZodObject<{
382
+ enabled: z$2.ZodDefault<z$2.ZodBoolean>;
383
+ apiKey: z$2.ZodOptional<z$2.ZodString>;
384
+ model: z$2.ZodDefault<z$2.ZodString>;
385
+ computerUse: z$2.ZodDefault<z$2.ZodBoolean>;
386
+ extendedThinking: z$2.ZodDefault<z$2.ZodBoolean>;
387
+ }, z$2.core.$strip>;
388
+ /**
389
+ * OpenCode SDK configuration.
390
+ */
391
+ declare const OpenCodeSDKConfigSchema: z$2.ZodObject<{
392
+ enabled: z$2.ZodDefault<z$2.ZodBoolean>;
393
+ serverUrl: z$2.ZodOptional<z$2.ZodString>;
394
+ port: z$2.ZodOptional<z$2.ZodNumber>;
395
+ agentType: z$2.ZodDefault<z$2.ZodEnum<{
396
+ build: "build";
397
+ plan: "plan";
398
+ general: "general";
399
+ explore: "explore";
400
+ }>>;
401
+ model: z$2.ZodOptional<z$2.ZodString>;
402
+ }, z$2.core.$strip>;
403
+ /**
404
+ * External agent SDK configuration section.
405
+ */
406
+ declare const ExternalAgentsConfigSchema: z$2.ZodObject<{
407
+ claudeAgent: z$2.ZodOptional<z$2.ZodObject<{
408
+ enabled: z$2.ZodDefault<z$2.ZodBoolean>;
409
+ apiKey: z$2.ZodOptional<z$2.ZodString>;
410
+ model: z$2.ZodDefault<z$2.ZodString>;
411
+ computerUse: z$2.ZodDefault<z$2.ZodBoolean>;
412
+ extendedThinking: z$2.ZodDefault<z$2.ZodBoolean>;
413
+ }, z$2.core.$strip>>;
414
+ openCode: z$2.ZodOptional<z$2.ZodObject<{
415
+ enabled: z$2.ZodDefault<z$2.ZodBoolean>;
416
+ serverUrl: z$2.ZodOptional<z$2.ZodString>;
417
+ port: z$2.ZodOptional<z$2.ZodNumber>;
418
+ agentType: z$2.ZodDefault<z$2.ZodEnum<{
419
+ build: "build";
420
+ plan: "plan";
421
+ general: "general";
422
+ explore: "explore";
423
+ }>>;
424
+ model: z$2.ZodOptional<z$2.ZodString>;
425
+ }, z$2.core.$strip>>;
426
+ }, z$2.core.$strip>;
378
427
  /**
379
428
  * Rule severity levels (inspired by ESLint).
380
429
  */
@@ -387,16 +436,16 @@ declare const RuleSeveritySchema: z$2.ZodEnum<{
387
436
  * Contract kinds for per-kind rule overrides.
388
437
  */
389
438
  declare const SpecKindSchema: z$2.ZodEnum<{
439
+ "data-view": "data-view";
390
440
  telemetry: "telemetry";
391
441
  operation: "operation";
442
+ workflow: "workflow";
443
+ feature: "feature";
444
+ "app-config": "app-config";
392
445
  event: "event";
393
446
  presentation: "presentation";
394
- feature: "feature";
395
- workflow: "workflow";
396
- "data-view": "data-view";
397
447
  migration: "migration";
398
448
  experiment: "experiment";
399
- "app-config": "app-config";
400
449
  }>;
401
450
  /**
402
451
  * Available lint rules with their severity.
@@ -530,16 +579,16 @@ declare const RulesConfigSchema: z$2.ZodObject<{
530
579
  }>>;
531
580
  }, z$2.core.$strip>>;
532
581
  overrides: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodEnum<{
582
+ "data-view": "data-view";
533
583
  telemetry: "telemetry";
534
584
  operation: "operation";
585
+ workflow: "workflow";
586
+ feature: "feature";
587
+ "app-config": "app-config";
535
588
  event: "event";
536
589
  presentation: "presentation";
537
- feature: "feature";
538
- workflow: "workflow";
539
- "data-view": "data-view";
540
590
  migration: "migration";
541
591
  experiment: "experiment";
542
- "app-config": "app-config";
543
592
  }>, z$2.ZodObject<{
544
593
  'require-acceptance': z$2.ZodOptional<z$2.ZodEnum<{
545
594
  error: "error";
@@ -620,10 +669,12 @@ declare const ContractsrcSchema: z$2.ZodObject<{
620
669
  }>>;
621
670
  aiModel: z$2.ZodOptional<z$2.ZodString>;
622
671
  agentMode: z$2.ZodDefault<z$2.ZodEnum<{
623
- cursor: "cursor";
624
672
  "claude-code": "claude-code";
673
+ cursor: "cursor";
625
674
  simple: "simple";
626
675
  "openai-codex": "openai-codex";
676
+ "claude-agent-sdk": "claude-agent-sdk";
677
+ "opencode-sdk": "opencode-sdk";
627
678
  }>>;
628
679
  customEndpoint: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodURL>>;
629
680
  customApiKey: z$2.ZodOptional<z$2.ZodNullable<z$2.ZodString>>;
@@ -701,9 +752,9 @@ declare const ContractsrcSchema: z$2.ZodObject<{
701
752
  stable: "stable";
702
753
  }>>;
703
754
  defaultAuth: z$2.ZodOptional<z$2.ZodEnum<{
704
- user: "user";
705
- anonymous: "anonymous";
706
755
  admin: "admin";
756
+ anonymous: "anonymous";
757
+ user: "user";
707
758
  }>>;
708
759
  defaultOwners: z$2.ZodOptional<z$2.ZodArray<z$2.ZodString>>;
709
760
  schemaFormat: z$2.ZodDefault<z$2.ZodEnum<{
@@ -827,16 +878,16 @@ declare const ContractsrcSchema: z$2.ZodObject<{
827
878
  }>>;
828
879
  }, z$2.core.$strip>>;
829
880
  overrides: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodEnum<{
881
+ "data-view": "data-view";
830
882
  telemetry: "telemetry";
831
883
  operation: "operation";
884
+ workflow: "workflow";
885
+ feature: "feature";
886
+ "app-config": "app-config";
832
887
  event: "event";
833
888
  presentation: "presentation";
834
- feature: "feature";
835
- workflow: "workflow";
836
- "data-view": "data-view";
837
889
  migration: "migration";
838
890
  experiment: "experiment";
839
- "app-config": "app-config";
840
891
  }>, z$2.ZodObject<{
841
892
  'require-acceptance': z$2.ZodOptional<z$2.ZodEnum<{
842
893
  error: "error";
@@ -928,8 +979,8 @@ declare const ContractsrcSchema: z$2.ZodObject<{
928
979
  }>>;
929
980
  integrateWithChangesets: z$2.ZodDefault<z$2.ZodBoolean>;
930
981
  changelogTiers: z$2.ZodDefault<z$2.ZodArray<z$2.ZodEnum<{
931
- spec: "spec";
932
982
  library: "library";
983
+ spec: "spec";
933
984
  monorepo: "monorepo";
934
985
  }>>>;
935
986
  format: z$2.ZodDefault<z$2.ZodEnum<{
@@ -949,10 +1000,10 @@ declare const ContractsrcSchema: z$2.ZodObject<{
949
1000
  rulesDir: z$2.ZodDefault<z$2.ZodString>;
950
1001
  rules: z$2.ZodDefault<z$2.ZodArray<z$2.ZodString>>;
951
1002
  targets: z$2.ZodDefault<z$2.ZodArray<z$2.ZodEnum<{
1003
+ "claude-code": "claude-code";
952
1004
  cursor: "cursor";
953
1005
  windsurf: "windsurf";
954
1006
  cline: "cline";
955
- "claude-code": "claude-code";
956
1007
  copilot: "copilot";
957
1008
  subagent: "subagent";
958
1009
  skill: "skill";
@@ -960,6 +1011,27 @@ declare const ContractsrcSchema: z$2.ZodObject<{
960
1011
  autoSync: z$2.ZodDefault<z$2.ZodBoolean>;
961
1012
  ejectMode: z$2.ZodDefault<z$2.ZodBoolean>;
962
1013
  }, z$2.core.$strip>>;
1014
+ externalAgents: z$2.ZodOptional<z$2.ZodObject<{
1015
+ claudeAgent: z$2.ZodOptional<z$2.ZodObject<{
1016
+ enabled: z$2.ZodDefault<z$2.ZodBoolean>;
1017
+ apiKey: z$2.ZodOptional<z$2.ZodString>;
1018
+ model: z$2.ZodDefault<z$2.ZodString>;
1019
+ computerUse: z$2.ZodDefault<z$2.ZodBoolean>;
1020
+ extendedThinking: z$2.ZodDefault<z$2.ZodBoolean>;
1021
+ }, z$2.core.$strip>>;
1022
+ openCode: z$2.ZodOptional<z$2.ZodObject<{
1023
+ enabled: z$2.ZodDefault<z$2.ZodBoolean>;
1024
+ serverUrl: z$2.ZodOptional<z$2.ZodString>;
1025
+ port: z$2.ZodOptional<z$2.ZodNumber>;
1026
+ agentType: z$2.ZodDefault<z$2.ZodEnum<{
1027
+ build: "build";
1028
+ plan: "plan";
1029
+ general: "general";
1030
+ explore: "explore";
1031
+ }>>;
1032
+ model: z$2.ZodOptional<z$2.ZodString>;
1033
+ }, z$2.core.$strip>>;
1034
+ }, z$2.core.$strip>>;
963
1035
  }, z$2.core.$strip>;
964
1036
  type OpenApiSourceConfig = z$2.infer<typeof OpenApiSourceConfigSchema>;
965
1037
  type OpenApiExportConfig = z$2.infer<typeof OpenApiExportConfigSchema>;
@@ -988,9 +1060,12 @@ type ChangelogTier = z$2.infer<typeof ChangelogTierSchema>;
988
1060
  type VersioningConfig = z$2.infer<typeof VersioningConfigSchema>;
989
1061
  type RuleSyncTarget = z$2.infer<typeof RuleSyncTargetSchema>;
990
1062
  type RuleSyncConfig = z$2.infer<typeof RuleSyncConfigSchema>;
1063
+ type ClaudeAgentSDKConfig = z$2.infer<typeof ClaudeAgentSDKConfigSchema>;
1064
+ type OpenCodeSDKConfig = z$2.infer<typeof OpenCodeSDKConfigSchema>;
1065
+ type ExternalAgentsConfig = z$2.infer<typeof ExternalAgentsConfigSchema>;
991
1066
  /**
992
1067
  * Default configuration values.
993
1068
  */
994
1069
  declare const DEFAULT_CONTRACTSRC: ContractsrcConfig;
995
1070
  //#endregion
996
- export { BumpStrategy, BumpStrategySchema, ChangelogFormat, ChangelogFormatSchema, ChangelogTier, ChangelogTierSchema, CheckRunConfig, CheckRunConfigSchema, CiConfig, CiConfigSchema, ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, ExternalWorkspace, ExternalWorkspaceSchema, FolderConventions, FolderConventionsSchema, FormatterConfig, FormatterConfigSchema, FormatterType, FormatterTypeSchema, GroupingRule, GroupingRuleSchema, GroupingStrategy, GroupingStrategySchema, HooksConfig, HooksConfigSchema, ImpactConfig, ImpactConfigSchema, LintRules, LintRulesSchema, MetaRepoConfig, MetaRepoConfigSchema, OpenApiConfig, OpenApiConfigSchema, OpenApiExportConfig, OpenApiExportConfigSchema, OpenApiSourceConfig, OpenApiSourceConfigSchema, PrCommentConfig, PrCommentConfigSchema, RuleSeverity, RuleSeveritySchema, RuleSyncConfig, RuleSyncConfigSchema, RuleSyncTarget, RuleSyncTargetSchema, RulesConfig, RulesConfigSchema, SchemaFormat, SchemaFormatSchema, SpecKind, SpecKindSchema, VersioningConfig, VersioningConfigSchema };
1071
+ export { BumpStrategy, BumpStrategySchema, ChangelogFormat, ChangelogFormatSchema, ChangelogTier, ChangelogTierSchema, CheckRunConfig, CheckRunConfigSchema, CiConfig, CiConfigSchema, ClaudeAgentSDKConfig, ClaudeAgentSDKConfigSchema, ContractsrcConfig, ContractsrcSchema, DEFAULT_CONTRACTSRC, ExternalAgentsConfig, ExternalAgentsConfigSchema, ExternalWorkspace, ExternalWorkspaceSchema, FolderConventions, FolderConventionsSchema, FormatterConfig, FormatterConfigSchema, FormatterType, FormatterTypeSchema, GroupingRule, GroupingRuleSchema, GroupingStrategy, GroupingStrategySchema, HooksConfig, HooksConfigSchema, ImpactConfig, ImpactConfigSchema, LintRules, LintRulesSchema, MetaRepoConfig, MetaRepoConfigSchema, OpenApiConfig, OpenApiConfigSchema, OpenApiExportConfig, OpenApiExportConfigSchema, OpenApiSourceConfig, OpenApiSourceConfigSchema, OpenCodeSDKConfig, OpenCodeSDKConfigSchema, PrCommentConfig, PrCommentConfigSchema, RuleSeverity, RuleSeveritySchema, RuleSyncConfig, RuleSyncConfigSchema, RuleSyncTarget, RuleSyncTargetSchema, RulesConfig, RulesConfigSchema, SchemaFormat, SchemaFormatSchema, SpecKind, SpecKindSchema, VersioningConfig, VersioningConfigSchema };
@@ -241,6 +241,38 @@ const RuleSyncConfigSchema = z$2.object({
241
241
  ejectMode: z$2.boolean().default(false)
242
242
  });
243
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
+ /**
244
276
  * Rule severity levels (inspired by ESLint).
245
277
  */
246
278
  const RuleSeveritySchema = z$2.enum([
@@ -307,7 +339,9 @@ const ContractsrcSchema = z$2.object({
307
339
  "simple",
308
340
  "cursor",
309
341
  "claude-code",
310
- "openai-codex"
342
+ "openai-codex",
343
+ "claude-agent-sdk",
344
+ "opencode-sdk"
311
345
  ]).default("simple"),
312
346
  customEndpoint: z$2.url().nullable().optional(),
313
347
  customApiKey: z$2.string().nullable().optional(),
@@ -326,7 +360,8 @@ const ContractsrcSchema = z$2.object({
326
360
  schemaFormat: SchemaFormatSchema.default("contractspec"),
327
361
  formatter: FormatterConfigSchema.optional(),
328
362
  versioning: VersioningConfigSchema.optional(),
329
- ruleSync: RuleSyncConfigSchema.optional()
363
+ ruleSync: RuleSyncConfigSchema.optional(),
364
+ externalAgents: ExternalAgentsConfigSchema.optional()
330
365
  });
331
366
  /**
332
367
  * Default configuration values.
@@ -349,4 +384,4 @@ const DEFAULT_CONTRACTSRC = {
349
384
  };
350
385
 
351
386
  //#endregion
352
- export { BumpStrategySchema, ChangelogFormatSchema, ChangelogTierSchema, CheckRunConfigSchema, CiConfigSchema, ContractsrcSchema, DEFAULT_CONTRACTSRC, ExternalWorkspaceSchema, FolderConventionsSchema, FormatterConfigSchema, FormatterTypeSchema, GroupingRuleSchema, GroupingStrategySchema, HooksConfigSchema, ImpactConfigSchema, LintRulesSchema, MetaRepoConfigSchema, OpenApiConfigSchema, OpenApiExportConfigSchema, OpenApiSourceConfigSchema, PrCommentConfigSchema, RuleSeveritySchema, RuleSyncConfigSchema, RuleSyncTargetSchema, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.contracts",
3
- "version": "1.45.6",
3
+ "version": "1.46.1",
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.6",
29
- "@contractspec/tool.typescript": "1.45.6",
28
+ "@contractspec/tool.tsdown": "1.46.1",
29
+ "@contractspec/tool.typescript": "1.46.1",
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.6",
39
- "@contractspec/lib.schema": "1.45.6",
38
+ "@contractspec/lib.logger": "1.46.1",
39
+ "@contractspec/lib.schema": "1.46.1",
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",