@primitive.ai/prim 0.1.0-alpha.107 → 0.1.0-alpha.108

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.
@@ -24435,8 +24435,9 @@ function validate43(data, { instancePath = "", parentData, parentDataProperty, r
24435
24435
  }
24436
24436
  validate43.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
24437
24437
  var isDemoStatusResponse = validate44;
24438
- var schema79 = { "type": "object", "properties": { "scenarioVersion": { "type": "number", "const": 1 }, "fictional": { "type": "boolean", "const": true }, "evaluation": { "type": "string", "const": "live" }, "runId": { "type": "string", "pattern": "^[a-zA-Z0-9]{1,64}$" }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "stage": { "type": "string", "enum": ["ready", "checking", "blocked", "approved", "completed", "skipped", "expired"] }, "authorName": { "type": "string", "maxLength": 200 }, "email": { "type": "string", "enum": ["not_queued", "queued", "accepted", "failed", "suppressed"] }, "verdict": { "type": "string", "enum": ["block", "pass", "pending"] }, "reasonCode": { "type": "string", "maxLength": 100 }, "choice": { "type": "string", "enum": ["adhere", "supersede"] }, "reason": { "type": "string", "maxLength": 500 }, "approvedDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": ["scenarioVersion", "fictional", "evaluation", "runId", "revision", "stage", "authorName", "email"], "additionalProperties": false };
24438
+ var schema79 = { "type": "object", "properties": { "scenarioVersion": { "type": "number", "const": 1 }, "fictional": { "type": "boolean", "const": true }, "evaluation": { "type": "string", "const": "live" }, "runId": { "type": "string", "pattern": "^[a-zA-Z0-9]{1,64}$" }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "stage": { "type": "string", "enum": ["ready", "checking", "blocked", "approved", "completed", "skipped", "expired"] }, "authorName": { "type": "string", "maxLength": 200 }, "story": { "type": "object", "properties": { "orgName": { "type": "string", "maxLength": 200 }, "recipient": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "decisionDate": { "type": "string", "maxLength": 100 } }, "required": ["orgName", "recipient", "decisionDate"], "additionalProperties": false }, "email": { "type": "string", "enum": ["not_queued", "queued", "accepted", "failed", "suppressed"] }, "verdict": { "type": "string", "enum": ["block", "pass", "pending"] }, "reasonCode": { "type": "string", "maxLength": 100 }, "choice": { "type": "string", "enum": ["adhere", "supersede"] }, "reason": { "type": "string", "maxLength": 500 }, "approvedDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": ["scenarioVersion", "fictional", "evaluation", "runId", "revision", "stage", "authorName", "story", "email"], "additionalProperties": false };
24439
24439
  var func34 = Object.prototype.hasOwnProperty;
24440
+ var pattern12 = new RegExp("^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "u");
24440
24441
  function validate44(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
24441
24442
  ;
24442
24443
  let vErrors = null;
@@ -24452,7 +24453,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
24452
24453
  if (errors === _errs0) {
24453
24454
  if (data && typeof data == "object" && !Array.isArray(data)) {
24454
24455
  let missing0;
24455
- if (data.scenarioVersion === void 0 && (missing0 = "scenarioVersion") || data.fictional === void 0 && (missing0 = "fictional") || data.evaluation === void 0 && (missing0 = "evaluation") || data.runId === void 0 && (missing0 = "runId") || data.revision === void 0 && (missing0 = "revision") || data.stage === void 0 && (missing0 = "stage") || data.authorName === void 0 && (missing0 = "authorName") || data.email === void 0 && (missing0 = "email")) {
24456
+ if (data.scenarioVersion === void 0 && (missing0 = "scenarioVersion") || data.fictional === void 0 && (missing0 = "fictional") || data.evaluation === void 0 && (missing0 = "evaluation") || data.runId === void 0 && (missing0 = "runId") || data.revision === void 0 && (missing0 = "revision") || data.stage === void 0 && (missing0 = "stage") || data.authorName === void 0 && (missing0 = "authorName") || data.story === void 0 && (missing0 = "story") || data.email === void 0 && (missing0 = "email")) {
24456
24457
  validate44.errors = [{ instancePath, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
24457
24458
  return false;
24458
24459
  } else {
@@ -24592,110 +24593,202 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
24592
24593
  var valid1 = true;
24593
24594
  }
24594
24595
  if (valid1) {
24595
- if (data.email !== void 0) {
24596
- let data7 = data.email;
24596
+ if (data.story !== void 0) {
24597
+ let data7 = data.story;
24597
24598
  const _errs17 = errors;
24598
- if (typeof data7 !== "string") {
24599
- validate44.errors = [{ instancePath: instancePath + "/email", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/email/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24600
- return false;
24601
- }
24602
- if (!(data7 === "not_queued" || data7 === "queued" || data7 === "accepted" || data7 === "failed" || data7 === "suppressed")) {
24603
- validate44.errors = [{ instancePath: instancePath + "/email", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/email/enum", keyword: "enum", params: { allowedValues: schema79.properties.email.enum }, message: "must be equal to one of the allowed values" }];
24604
- return false;
24599
+ if (errors === _errs17) {
24600
+ if (data7 && typeof data7 == "object" && !Array.isArray(data7)) {
24601
+ let missing1;
24602
+ if (data7.orgName === void 0 && (missing1 = "orgName") || data7.recipient === void 0 && (missing1 = "recipient") || data7.decisionDate === void 0 && (missing1 = "decisionDate")) {
24603
+ validate44.errors = [{ instancePath: instancePath + "/story", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/story/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
24604
+ return false;
24605
+ } else {
24606
+ const _errs19 = errors;
24607
+ for (const key1 in data7) {
24608
+ if (!(key1 === "orgName" || key1 === "recipient" || key1 === "decisionDate")) {
24609
+ validate44.errors = [{ instancePath: instancePath + "/story", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/story/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" }];
24610
+ return false;
24611
+ break;
24612
+ }
24613
+ }
24614
+ if (_errs19 === errors) {
24615
+ if (data7.orgName !== void 0) {
24616
+ let data8 = data7.orgName;
24617
+ const _errs20 = errors;
24618
+ if (errors === _errs20) {
24619
+ if (typeof data8 === "string") {
24620
+ if (func1(data8) > 200) {
24621
+ validate44.errors = [{ instancePath: instancePath + "/story/orgName", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/story/properties/orgName/maxLength", keyword: "maxLength", params: { limit: 200 }, message: "must NOT have more than 200 characters" }];
24622
+ return false;
24623
+ }
24624
+ } else {
24625
+ validate44.errors = [{ instancePath: instancePath + "/story/orgName", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/story/properties/orgName/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24626
+ return false;
24627
+ }
24628
+ }
24629
+ var valid2 = _errs20 === errors;
24630
+ } else {
24631
+ var valid2 = true;
24632
+ }
24633
+ if (valid2) {
24634
+ if (data7.recipient !== void 0) {
24635
+ let data9 = data7.recipient;
24636
+ const _errs22 = errors;
24637
+ if (errors === _errs22) {
24638
+ if (errors === _errs22) {
24639
+ if (typeof data9 === "string") {
24640
+ if (!pattern12.test(data9)) {
24641
+ validate44.errors = [{ instancePath: instancePath + "/story/recipient", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/story/properties/recipient/pattern", keyword: "pattern", params: { pattern: "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, message: `must match pattern "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"` }];
24642
+ return false;
24643
+ }
24644
+ } else {
24645
+ validate44.errors = [{ instancePath: instancePath + "/story/recipient", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/story/properties/recipient/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24646
+ return false;
24647
+ }
24648
+ }
24649
+ }
24650
+ var valid2 = _errs22 === errors;
24651
+ } else {
24652
+ var valid2 = true;
24653
+ }
24654
+ if (valid2) {
24655
+ if (data7.decisionDate !== void 0) {
24656
+ let data10 = data7.decisionDate;
24657
+ const _errs24 = errors;
24658
+ if (errors === _errs24) {
24659
+ if (typeof data10 === "string") {
24660
+ if (func1(data10) > 100) {
24661
+ validate44.errors = [{ instancePath: instancePath + "/story/decisionDate", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/story/properties/decisionDate/maxLength", keyword: "maxLength", params: { limit: 100 }, message: "must NOT have more than 100 characters" }];
24662
+ return false;
24663
+ }
24664
+ } else {
24665
+ validate44.errors = [{ instancePath: instancePath + "/story/decisionDate", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/story/properties/decisionDate/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24666
+ return false;
24667
+ }
24668
+ }
24669
+ var valid2 = _errs24 === errors;
24670
+ } else {
24671
+ var valid2 = true;
24672
+ }
24673
+ }
24674
+ }
24675
+ }
24676
+ }
24677
+ } else {
24678
+ validate44.errors = [{ instancePath: instancePath + "/story", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/story/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
24679
+ return false;
24680
+ }
24605
24681
  }
24606
24682
  var valid1 = _errs17 === errors;
24607
24683
  } else {
24608
24684
  var valid1 = true;
24609
24685
  }
24610
24686
  if (valid1) {
24611
- if (data.verdict !== void 0) {
24612
- let data8 = data.verdict;
24613
- const _errs19 = errors;
24614
- if (typeof data8 !== "string") {
24615
- validate44.errors = [{ instancePath: instancePath + "/verdict", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/verdict/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24687
+ if (data.email !== void 0) {
24688
+ let data11 = data.email;
24689
+ const _errs26 = errors;
24690
+ if (typeof data11 !== "string") {
24691
+ validate44.errors = [{ instancePath: instancePath + "/email", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/email/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24616
24692
  return false;
24617
24693
  }
24618
- if (!(data8 === "block" || data8 === "pass" || data8 === "pending")) {
24619
- validate44.errors = [{ instancePath: instancePath + "/verdict", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/verdict/enum", keyword: "enum", params: { allowedValues: schema79.properties.verdict.enum }, message: "must be equal to one of the allowed values" }];
24694
+ if (!(data11 === "not_queued" || data11 === "queued" || data11 === "accepted" || data11 === "failed" || data11 === "suppressed")) {
24695
+ validate44.errors = [{ instancePath: instancePath + "/email", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/email/enum", keyword: "enum", params: { allowedValues: schema79.properties.email.enum }, message: "must be equal to one of the allowed values" }];
24620
24696
  return false;
24621
24697
  }
24622
- var valid1 = _errs19 === errors;
24698
+ var valid1 = _errs26 === errors;
24623
24699
  } else {
24624
24700
  var valid1 = true;
24625
24701
  }
24626
24702
  if (valid1) {
24627
- if (data.reasonCode !== void 0) {
24628
- let data9 = data.reasonCode;
24629
- const _errs21 = errors;
24630
- if (errors === _errs21) {
24631
- if (typeof data9 === "string") {
24632
- if (func1(data9) > 100) {
24633
- validate44.errors = [{ instancePath: instancePath + "/reasonCode", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/reasonCode/maxLength", keyword: "maxLength", params: { limit: 100 }, message: "must NOT have more than 100 characters" }];
24634
- return false;
24635
- }
24636
- } else {
24637
- validate44.errors = [{ instancePath: instancePath + "/reasonCode", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/reasonCode/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24638
- return false;
24639
- }
24703
+ if (data.verdict !== void 0) {
24704
+ let data12 = data.verdict;
24705
+ const _errs28 = errors;
24706
+ if (typeof data12 !== "string") {
24707
+ validate44.errors = [{ instancePath: instancePath + "/verdict", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/verdict/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24708
+ return false;
24709
+ }
24710
+ if (!(data12 === "block" || data12 === "pass" || data12 === "pending")) {
24711
+ validate44.errors = [{ instancePath: instancePath + "/verdict", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/verdict/enum", keyword: "enum", params: { allowedValues: schema79.properties.verdict.enum }, message: "must be equal to one of the allowed values" }];
24712
+ return false;
24640
24713
  }
24641
- var valid1 = _errs21 === errors;
24714
+ var valid1 = _errs28 === errors;
24642
24715
  } else {
24643
24716
  var valid1 = true;
24644
24717
  }
24645
24718
  if (valid1) {
24646
- if (data.choice !== void 0) {
24647
- let data10 = data.choice;
24648
- const _errs23 = errors;
24649
- if (typeof data10 !== "string") {
24650
- validate44.errors = [{ instancePath: instancePath + "/choice", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/choice/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24651
- return false;
24652
- }
24653
- if (!(data10 === "adhere" || data10 === "supersede")) {
24654
- validate44.errors = [{ instancePath: instancePath + "/choice", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/choice/enum", keyword: "enum", params: { allowedValues: schema79.properties.choice.enum }, message: "must be equal to one of the allowed values" }];
24655
- return false;
24719
+ if (data.reasonCode !== void 0) {
24720
+ let data13 = data.reasonCode;
24721
+ const _errs30 = errors;
24722
+ if (errors === _errs30) {
24723
+ if (typeof data13 === "string") {
24724
+ if (func1(data13) > 100) {
24725
+ validate44.errors = [{ instancePath: instancePath + "/reasonCode", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/reasonCode/maxLength", keyword: "maxLength", params: { limit: 100 }, message: "must NOT have more than 100 characters" }];
24726
+ return false;
24727
+ }
24728
+ } else {
24729
+ validate44.errors = [{ instancePath: instancePath + "/reasonCode", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/reasonCode/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24730
+ return false;
24731
+ }
24656
24732
  }
24657
- var valid1 = _errs23 === errors;
24733
+ var valid1 = _errs30 === errors;
24658
24734
  } else {
24659
24735
  var valid1 = true;
24660
24736
  }
24661
24737
  if (valid1) {
24662
- if (data.reason !== void 0) {
24663
- let data11 = data.reason;
24664
- const _errs25 = errors;
24665
- if (errors === _errs25) {
24666
- if (typeof data11 === "string") {
24667
- if (func1(data11) > 500) {
24668
- validate44.errors = [{ instancePath: instancePath + "/reason", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/reason/maxLength", keyword: "maxLength", params: { limit: 500 }, message: "must NOT have more than 500 characters" }];
24669
- return false;
24670
- }
24671
- } else {
24672
- validate44.errors = [{ instancePath: instancePath + "/reason", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/reason/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24673
- return false;
24674
- }
24738
+ if (data.choice !== void 0) {
24739
+ let data14 = data.choice;
24740
+ const _errs32 = errors;
24741
+ if (typeof data14 !== "string") {
24742
+ validate44.errors = [{ instancePath: instancePath + "/choice", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/choice/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24743
+ return false;
24675
24744
  }
24676
- var valid1 = _errs25 === errors;
24745
+ if (!(data14 === "adhere" || data14 === "supersede")) {
24746
+ validate44.errors = [{ instancePath: instancePath + "/choice", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/choice/enum", keyword: "enum", params: { allowedValues: schema79.properties.choice.enum }, message: "must be equal to one of the allowed values" }];
24747
+ return false;
24748
+ }
24749
+ var valid1 = _errs32 === errors;
24677
24750
  } else {
24678
24751
  var valid1 = true;
24679
24752
  }
24680
24753
  if (valid1) {
24681
- if (data.approvedDigest !== void 0) {
24682
- let data12 = data.approvedDigest;
24683
- const _errs27 = errors;
24684
- if (errors === _errs27) {
24685
- if (typeof data12 === "string") {
24686
- if (!pattern5.test(data12)) {
24687
- validate44.errors = [{ instancePath: instancePath + "/approvedDigest", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/approvedDigest/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "^[a-f0-9]{64}$"' }];
24754
+ if (data.reason !== void 0) {
24755
+ let data15 = data.reason;
24756
+ const _errs34 = errors;
24757
+ if (errors === _errs34) {
24758
+ if (typeof data15 === "string") {
24759
+ if (func1(data15) > 500) {
24760
+ validate44.errors = [{ instancePath: instancePath + "/reason", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/reason/maxLength", keyword: "maxLength", params: { limit: 500 }, message: "must NOT have more than 500 characters" }];
24688
24761
  return false;
24689
24762
  }
24690
24763
  } else {
24691
- validate44.errors = [{ instancePath: instancePath + "/approvedDigest", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/approvedDigest/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24764
+ validate44.errors = [{ instancePath: instancePath + "/reason", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/reason/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24692
24765
  return false;
24693
24766
  }
24694
24767
  }
24695
- var valid1 = _errs27 === errors;
24768
+ var valid1 = _errs34 === errors;
24696
24769
  } else {
24697
24770
  var valid1 = true;
24698
24771
  }
24772
+ if (valid1) {
24773
+ if (data.approvedDigest !== void 0) {
24774
+ let data16 = data.approvedDigest;
24775
+ const _errs36 = errors;
24776
+ if (errors === _errs36) {
24777
+ if (typeof data16 === "string") {
24778
+ if (!pattern5.test(data16)) {
24779
+ validate44.errors = [{ instancePath: instancePath + "/approvedDigest", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/approvedDigest/pattern", keyword: "pattern", params: { pattern: "^[a-f0-9]{64}$" }, message: 'must match pattern "^[a-f0-9]{64}$"' }];
24780
+ return false;
24781
+ }
24782
+ } else {
24783
+ validate44.errors = [{ instancePath: instancePath + "/approvedDigest", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/DemoStatusResponse/properties/approvedDigest/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
24784
+ return false;
24785
+ }
24786
+ }
24787
+ var valid1 = _errs36 === errors;
24788
+ } else {
24789
+ var valid1 = true;
24790
+ }
24791
+ }
24699
24792
  }
24700
24793
  }
24701
24794
  }
@@ -25586,7 +25679,7 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
25586
25679
  }
25587
25680
  validate48.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
25588
25681
  var schema89 = { "anyOf": [{ "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "empty" }, "hasMore": { "type": "boolean", "const": false } }, "required": ["protocolVersion", "status", "hasMore"], "additionalProperties": {} }, { "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "leased" }, "events": { "minItems": 1, "maxItems": 40, "type": "array", "items": { "type": "object", "properties": { "eventId": { "type": "string", "minLength": 1, "maxLength": 128 }, "leaseVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "shortId": { "type": "string", "pattern": "^[0-9a-f]{8}$" }, "decisionId": { "type": "string", "minLength": 1, "maxLength": 128 }, "intent": { "type": "string" }, "webUrl": { "type": "string" }, "kind": { "type": "string", "enum": ["confirm_prompt", "publish_prompt"] } }, "required": ["eventId", "leaseVersion", "shortId", "intent", "webUrl"], "additionalProperties": {} } }, "hasMore": { "type": "boolean" } }, "required": ["protocolVersion", "status", "events", "hasMore"], "additionalProperties": {} }, { "type": "object", "properties": { "protocolVersion": { "type": "integer", "minimum": 1, "maximum": 2 }, "status": { "type": "string", "const": "unavailable" }, "reason": { "type": "string", "const": "organization_unbound" } }, "required": ["protocolVersion", "status", "reason"], "additionalProperties": {} }], "x-primitive-runtime-refinements": ["feedback_response_version_negotiation", "feedback_publish_prompt_decision_id", "unique_feedback_event_ids"] };
25589
- var pattern13 = new RegExp("^[0-9a-f]{8}$", "u");
25682
+ var pattern14 = new RegExp("^[0-9a-f]{8}$", "u");
25590
25683
  function validate49(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
25591
25684
  ;
25592
25685
  let vErrors = null;
@@ -25925,7 +26018,7 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
25925
26018
  const _errs27 = errors;
25926
26019
  if (errors === _errs27) {
25927
26020
  if (typeof data9 === "string") {
25928
- if (!pattern13.test(data9)) {
26021
+ if (!pattern14.test(data9)) {
25929
26022
  const err24 = { instancePath: instancePath + "/events/" + i0 + "/shortId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/FeedbackLeaseResponse/anyOf/1/properties/events/items/properties/shortId/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{8}$" }, message: 'must match pattern "^[0-9a-f]{8}$"' };
25930
26023
  if (vErrors === null) {
25931
26024
  vErrors = [err24];
@@ -26983,8 +27076,8 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
26983
27076
  }
26984
27077
  validate51.evaluated = { "dynamicProps": true, "dynamicItems": false };
26985
27078
  var isGitHubInstallIntentStartResponse = validate52;
26986
- var pattern14 = new RegExp("^[A-Za-z0-9]{1,128}$", "u");
26987
- var pattern15 = new RegExp("^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$", "u");
27079
+ var pattern15 = new RegExp("^[A-Za-z0-9]{1,128}$", "u");
27080
+ var pattern16 = new RegExp("^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$", "u");
26988
27081
  function validate52(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
26989
27082
  ;
26990
27083
  let vErrors = null;
@@ -27066,7 +27159,7 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
27066
27159
  const _errs9 = errors;
27067
27160
  if (errors === _errs9) {
27068
27161
  if (typeof data3 === "string") {
27069
- if (!pattern14.test(data3)) {
27162
+ if (!pattern15.test(data3)) {
27070
27163
  validate52.errors = [{ instancePath: instancePath + "/intentId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartResponse/properties/intentId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9]{1,128}$"' }];
27071
27164
  return false;
27072
27165
  }
@@ -27085,7 +27178,7 @@ function validate52(data, { instancePath = "", parentData, parentDataProperty, r
27085
27178
  const _errs11 = errors;
27086
27179
  if (errors === _errs11) {
27087
27180
  if (typeof data4 === "string") {
27088
- if (!pattern15.test(data4)) {
27181
+ if (!pattern16.test(data4)) {
27089
27182
  validate52.errors = [{ instancePath: instancePath + "/browserUrl", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStartResponse/properties/browserUrl/pattern", keyword: "pattern", params: { pattern: "^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$" }, message: 'must match pattern "^https:\\/\\/github\\.com\\/apps\\/primitive(?:-staging)?\\/installations\\/new\\?state=[0-9a-f]{64}$"' }];
27090
27183
  return false;
27091
27184
  }
@@ -27493,7 +27586,7 @@ function validate54(data, { instancePath = "", parentData, parentDataProperty, r
27493
27586
  const _errs3 = errors;
27494
27587
  if (errors === _errs3) {
27495
27588
  if (typeof data0 === "string") {
27496
- if (!pattern14.test(data0)) {
27589
+ if (!pattern15.test(data0)) {
27497
27590
  validate54.errors = [{ instancePath: instancePath + "/intentId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/GitHubInstallIntentStatusRequest/properties/intentId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9]{1,128}$"' }];
27498
27591
  return false;
27499
27592
  }
@@ -29067,7 +29160,7 @@ function validate55(data, { instancePath = "", parentData, parentDataProperty, r
29067
29160
  validate55.evaluated = { "dynamicProps": true, "dynamicItems": false };
29068
29161
  var isMoveIngestRequest = validate56;
29069
29162
  var schema103 = { "type": "object", "properties": { "batch": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "moveId": { "type": "string" }, "capturedAt": { "type": "number" }, "sessionId": { "type": "string" }, "invocationId": { "type": "string" }, "eventType": { "type": "string" }, "payload": {}, "env": {}, "repositoryContext": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "repository_bound" }, "repoSyncId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["kind", "repoSyncId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "non_repository" } }, "required": ["kind"], "additionalProperties": false }] }, "capturedOrganizationId": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9_-]+$" }, "captureAuthorityKind": { "type": "string", "enum": ["workos", "service_token"] }, "decisionLifecycleProtocolVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "producer": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] }, "toolOutcome": { "type": "string", "enum": ["succeeded", "returned", "failed", "interrupted", "prevented", "unknown"] }, "envelopeVersion": { "type": "number", "const": 4 } }, "required": ["moveId", "capturedAt", "sessionId", "eventType", "capturedOrganizationId", "captureAuthorityKind", "decisionLifecycleProtocolVersion", "envelopeVersion"], "additionalProperties": {} }, { "type": "object", "properties": { "moveId": { "type": "string" }, "capturedAt": { "type": "number" }, "sessionId": { "type": "string" }, "invocationId": { "type": "string" }, "eventType": { "type": "string" }, "payload": {}, "env": {}, "repositoryContext": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "repository_bound" }, "repoSyncId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": ["kind", "repoSyncId"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "non_repository" } }, "required": ["kind"], "additionalProperties": false }] }, "capturedOrganizationId": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9_-]+$" }, "captureAuthorityKind": { "type": "string", "enum": ["workos", "service_token"] }, "decisionLifecycleProtocolVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "producer": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] }, "toolOutcome": { "type": "string", "enum": ["succeeded", "returned", "failed", "interrupted", "prevented", "unknown"] }, "envelopeVersion": { "type": "number", "exclusiveMaximum": 4 } }, "required": ["moveId", "capturedAt", "sessionId", "eventType"], "additionalProperties": {} }] } } }, "required": ["batch"], "additionalProperties": {} };
29070
- var pattern17 = new RegExp("^[A-Za-z0-9_-]+$", "u");
29163
+ var pattern18 = new RegExp("^[A-Za-z0-9_-]+$", "u");
29071
29164
  function validate56(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
29072
29165
  ;
29073
29166
  let vErrors = null;
@@ -29428,7 +29521,7 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
29428
29521
  }
29429
29522
  errors++;
29430
29523
  } else {
29431
- if (!pattern17.test(data11)) {
29524
+ if (!pattern18.test(data11)) {
29432
29525
  const err22 = { instancePath: instancePath + "/batch/" + i0 + "/capturedOrganizationId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/0/properties/capturedOrganizationId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: 'must match pattern "^[A-Za-z0-9_-]+$"' };
29433
29526
  if (vErrors === null) {
29434
29527
  vErrors = [err22];
@@ -29953,7 +30046,7 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
29953
30046
  }
29954
30047
  errors++;
29955
30048
  } else {
29956
- if (!pattern17.test(data26)) {
30049
+ if (!pattern18.test(data26)) {
29957
30050
  const err58 = { instancePath: instancePath + "/batch/" + i0 + "/capturedOrganizationId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/MoveIngestRequest/properties/batch/items/anyOf/1/properties/capturedOrganizationId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9_-]+$" }, message: 'must match pattern "^[A-Za-z0-9_-]+$"' };
29958
30051
  if (vErrors === null) {
29959
30052
  vErrors = [err58];
@@ -30196,10 +30289,10 @@ function validate56(data, { instancePath = "", parentData, parentDataProperty, r
30196
30289
  }
30197
30290
  validate56.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
30198
30291
  var schema105 = { "type": "object", "properties": { "protocolVersion": { "type": "number", "const": 3 }, "agent": { "type": "string", "enum": ["claude_code", "codex", "cursor", "hermes"] }, "sessionId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "invocationId": { "type": "string", "pattern": "^[A-Za-z0-9._:-]{1,128}$" }, "repoSyncId": { "type": "string", "pattern": "^[A-Za-z0-9]{1,64}$" }, "paths": { "maxItems": 32, "type": "array", "items": { "type": "string" } }, "coverage": { "type": "string", "enum": ["complete", "unverified"] }, "branch": { "type": "string", "maxLength": 255, "pattern": "^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$" }, "clientMode": { "type": "string", "enum": ["block", "warn"] }, "clientVersion": { "type": "string", "maxLength": 32, "pattern": "^[A-Za-z0-9][A-Za-z0-9._+-]*$" }, "proposal": { "type": "string" } }, "required": ["protocolVersion", "agent", "sessionId", "invocationId", "repoSyncId", "paths", "coverage", "proposal"], "additionalProperties": false, "x-primitive-runtime-refinements": ["canonical_repository_paths", "unique_repository_paths", "complete_coverage_requires_path", "proposal_utf8_max_6144", "degrade_invalid_rollout_fields", "degrade_invalid_branch"] };
30199
- var pattern19 = new RegExp("^[A-Za-z0-9._:-]{1,128}$", "u");
30200
- var pattern21 = new RegExp("^[A-Za-z0-9]{1,64}$", "u");
30201
- var pattern22 = new RegExp("^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$", "u");
30202
- var pattern23 = new RegExp("^[A-Za-z0-9][A-Za-z0-9._+-]*$", "u");
30292
+ var pattern20 = new RegExp("^[A-Za-z0-9._:-]{1,128}$", "u");
30293
+ var pattern22 = new RegExp("^[A-Za-z0-9]{1,64}$", "u");
30294
+ var pattern23 = new RegExp("^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$", "u");
30295
+ var pattern24 = new RegExp("^[A-Za-z0-9][A-Za-z0-9._+-]*$", "u");
30203
30296
  function validate57(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
30204
30297
  ;
30205
30298
  let vErrors = null;
@@ -30265,7 +30358,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
30265
30358
  const _errs8 = errors;
30266
30359
  if (errors === _errs8) {
30267
30360
  if (typeof data2 === "string") {
30268
- if (!pattern19.test(data2)) {
30361
+ if (!pattern20.test(data2)) {
30269
30362
  validate57.errors = [{ instancePath: instancePath + "/sessionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/sessionId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9._:-]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9._:-]{1,128}$"' }];
30270
30363
  return false;
30271
30364
  }
@@ -30284,7 +30377,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
30284
30377
  const _errs10 = errors;
30285
30378
  if (errors === _errs10) {
30286
30379
  if (typeof data3 === "string") {
30287
- if (!pattern19.test(data3)) {
30380
+ if (!pattern20.test(data3)) {
30288
30381
  validate57.errors = [{ instancePath: instancePath + "/invocationId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/invocationId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9._:-]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9._:-]{1,128}$"' }];
30289
30382
  return false;
30290
30383
  }
@@ -30303,7 +30396,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
30303
30396
  const _errs12 = errors;
30304
30397
  if (errors === _errs12) {
30305
30398
  if (typeof data4 === "string") {
30306
- if (!pattern21.test(data4)) {
30399
+ if (!pattern22.test(data4)) {
30307
30400
  validate57.errors = [{ instancePath: instancePath + "/repoSyncId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/repoSyncId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9]{1,64}$" }, message: 'must match pattern "^[A-Za-z0-9]{1,64}$"' }];
30308
30401
  return false;
30309
30402
  }
@@ -30375,7 +30468,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
30375
30468
  validate57.errors = [{ instancePath: instancePath + "/branch", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/branch/maxLength", keyword: "maxLength", params: { limit: 255 }, message: "must NOT have more than 255 characters" }];
30376
30469
  return false;
30377
30470
  } else {
30378
- if (!pattern22.test(data8)) {
30471
+ if (!pattern23.test(data8)) {
30379
30472
  validate57.errors = [{ instancePath: instancePath + "/branch", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/branch/pattern", keyword: "pattern", params: { pattern: "^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$" }, message: 'must match pattern "^(?!@?$)(?!\\/)(?!.*\\/$)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)[^/]*\\.lock(?:\\/|$))(?!.*\\.\\.)(?!.*@\\{)(?!.*[~^:?*\\\\]).+$"' }];
30380
30473
  return false;
30381
30474
  }
@@ -30415,7 +30508,7 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
30415
30508
  validate57.errors = [{ instancePath: instancePath + "/clientVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/clientVersion/maxLength", keyword: "maxLength", params: { limit: 32 }, message: "must NOT have more than 32 characters" }];
30416
30509
  return false;
30417
30510
  } else {
30418
- if (!pattern23.test(data10)) {
30511
+ if (!pattern24.test(data10)) {
30419
30512
  validate57.errors = [{ instancePath: instancePath + "/clientVersion", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightRequestV3/properties/clientVersion/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9][A-Za-z0-9._+-]*$" }, message: 'must match pattern "^[A-Za-z0-9][A-Za-z0-9._+-]*$"' }];
30420
30513
  return false;
30421
30514
  }
@@ -30502,7 +30595,7 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
30502
30595
  const _errs5 = errors;
30503
30596
  if (errors === _errs5) {
30504
30597
  if (typeof data1 === "string") {
30505
- if (!pattern19.test(data1)) {
30598
+ if (!pattern20.test(data1)) {
30506
30599
  validate58.errors = [{ instancePath: instancePath + "/checkId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PreflightResponseV3/properties/checkId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9._:-]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9._:-]{1,128}$"' }];
30507
30600
  return false;
30508
30601
  }
@@ -30799,8 +30892,8 @@ function validate58(data, { instancePath = "", parentData, parentDataProperty, r
30799
30892
  return errors === 0;
30800
30893
  }
30801
30894
  validate58.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
30802
- var pattern25 = new RegExp("^[A-Za-z0-9._-]{1,128}$", "u");
30803
- var pattern26 = new RegExp("^pci_[A-Za-z0-9_-]{43}$", "u");
30895
+ var pattern26 = new RegExp("^[A-Za-z0-9._-]{1,128}$", "u");
30896
+ var pattern27 = new RegExp("^pci_[A-Za-z0-9_-]{43}$", "u");
30804
30897
  function validate59(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
30805
30898
  ;
30806
30899
  let vErrors = null;
@@ -30825,7 +30918,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
30825
30918
  const _errs3 = errors;
30826
30919
  if (errors === _errs3) {
30827
30920
  if (typeof data0 === "string") {
30828
- if (!pattern25.test(data0)) {
30921
+ if (!pattern26.test(data0)) {
30829
30922
  validate59.errors = [{ instancePath: instancePath + "/sessionId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PresenceHeartbeatRequest/properties/sessionId/pattern", keyword: "pattern", params: { pattern: "^[A-Za-z0-9._-]{1,128}$" }, message: 'must match pattern "^[A-Za-z0-9._-]{1,128}$"' }];
30830
30923
  return false;
30831
30924
  }
@@ -30844,7 +30937,7 @@ function validate59(data, { instancePath = "", parentData, parentDataProperty, r
30844
30937
  const _errs5 = errors;
30845
30938
  if (errors === _errs5) {
30846
30939
  if (typeof data1 === "string") {
30847
- if (!pattern26.test(data1)) {
30940
+ if (!pattern27.test(data1)) {
30848
30941
  validate59.errors = [{ instancePath: instancePath + "/clientInstanceId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/PresenceHeartbeatRequest/properties/clientInstanceId/pattern", keyword: "pattern", params: { pattern: "^pci_[A-Za-z0-9_-]{43}$" }, message: 'must match pattern "^pci_[A-Za-z0-9_-]{43}$"' }];
30849
30942
  return false;
30850
30943
  }
@@ -31508,7 +31601,7 @@ function validate62(data, { instancePath = "", parentData, parentDataProperty, r
31508
31601
  return errors === 0;
31509
31602
  }
31510
31603
  validate62.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
31511
- var pattern27 = new RegExp("^(?![A-Za-z0-9-]*--)[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?\\/[A-Za-z0-9._-]{1,100}$", "u");
31604
+ var pattern28 = new RegExp("^(?![A-Za-z0-9-]*--)[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?\\/[A-Za-z0-9._-]{1,100}$", "u");
31512
31605
  function validate63(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
31513
31606
  ;
31514
31607
  let vErrors = null;
@@ -31542,7 +31635,7 @@ function validate63(data, { instancePath = "", parentData, parentDataProperty, r
31542
31635
  const _errs3 = errors;
31543
31636
  if (errors === _errs3) {
31544
31637
  if (typeof data0 === "string") {
31545
- if (!pattern27.test(data0)) {
31638
+ if (!pattern28.test(data0)) {
31546
31639
  validate63.errors = [{ instancePath: instancePath + "/repositoryFullName", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/RepositoryBindRequest/properties/repositoryFullName/pattern", keyword: "pattern", params: { pattern: "^(?![A-Za-z0-9-]*--)[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?\\/[A-Za-z0-9._-]{1,100}$" }, message: 'must match pattern "^(?![A-Za-z0-9-]*--)[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?\\/[A-Za-z0-9._-]{1,100}$"' }];
31547
31640
  return false;
31548
31641
  }
@@ -31607,7 +31700,7 @@ function validate64(data, { instancePath = "", parentData, parentDataProperty, r
31607
31700
  return errors === 0;
31608
31701
  }
31609
31702
  validate64.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
31610
- var pattern29 = new RegExp("^api_key_[A-Za-z0-9_-]+$", "u");
31703
+ var pattern30 = new RegExp("^api_key_[A-Za-z0-9_-]+$", "u");
31611
31704
  function validate65(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
31612
31705
  ;
31613
31706
  let vErrors = null;
@@ -31693,7 +31786,7 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
31693
31786
  validate65.errors = [{ instancePath: instancePath + "/after", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListRequest/properties/after/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
31694
31787
  return false;
31695
31788
  } else {
31696
- if (!pattern29.test(data2)) {
31789
+ if (!pattern30.test(data2)) {
31697
31790
  validate65.errors = [{ instancePath: instancePath + "/after", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListRequest/properties/after/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
31698
31791
  return false;
31699
31792
  }
@@ -31721,9 +31814,9 @@ function validate65(data, { instancePath = "", parentData, parentDataProperty, r
31721
31814
  return errors === 0;
31722
31815
  }
31723
31816
  validate65.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
31724
- var pattern31 = new RegExp("^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$", "u");
31725
- var pattern32 = new RegExp("^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$", "u");
31726
- var pattern33 = new RegExp("^[\\x21-\\x7e]+$", "u");
31817
+ var pattern32 = new RegExp("^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$", "u");
31818
+ var pattern33 = new RegExp("^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$", "u");
31819
+ var pattern34 = new RegExp("^[\\x21-\\x7e]+$", "u");
31727
31820
  function validate66(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
31728
31821
  ;
31729
31822
  let vErrors = null;
@@ -31795,7 +31888,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
31795
31888
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/id/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
31796
31889
  return false;
31797
31890
  } else {
31798
- if (!pattern29.test(data2)) {
31891
+ if (!pattern30.test(data2)) {
31799
31892
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/id/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
31800
31893
  return false;
31801
31894
  }
@@ -31824,7 +31917,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
31824
31917
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
31825
31918
  return false;
31826
31919
  } else {
31827
- if (!pattern31.test(data3)) {
31920
+ if (!pattern32.test(data3)) {
31828
31921
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/name/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$" }, message: 'must match pattern "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$"' }];
31829
31922
  return false;
31830
31923
  }
@@ -31853,7 +31946,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
31853
31946
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/obfuscatedValue/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
31854
31947
  return false;
31855
31948
  } else {
31856
- if (!pattern32.test(data4)) {
31949
+ if (!pattern33.test(data4)) {
31857
31950
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/obfuscatedValue/pattern", keyword: "pattern", params: { pattern: "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$" }, message: 'must match pattern "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$"' }];
31858
31951
  return false;
31859
31952
  }
@@ -31893,7 +31986,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
31893
31986
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/permissions/" + i1, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/permissions/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
31894
31987
  return false;
31895
31988
  } else {
31896
- if (!pattern33.test(data6)) {
31989
+ if (!pattern34.test(data6)) {
31897
31990
  validate66.errors = [{ instancePath: instancePath + "/apiKeys/" + i0 + "/permissions/" + i1, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/apiKeys/items/properties/permissions/items/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e]+$" }, message: 'must match pattern "^[\\x21-\\x7e]+$"' }];
31898
31991
  return false;
31899
31992
  }
@@ -32179,7 +32272,7 @@ function validate66(data, { instancePath = "", parentData, parentDataProperty, r
32179
32272
  }
32180
32273
  errors++;
32181
32274
  } else {
32182
- if (!pattern29.test(data11)) {
32275
+ if (!pattern30.test(data11)) {
32183
32276
  const err12 = { instancePath: instancePath + "/nextCursor", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyListResponse/properties/nextCursor/anyOf/0/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' };
32184
32277
  if (vErrors === null) {
32185
32278
  vErrors = [err12];
@@ -32291,7 +32384,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
32291
32384
  validate67.errors = [{ instancePath: instancePath + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/id/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
32292
32385
  return false;
32293
32386
  } else {
32294
- if (!pattern29.test(data0)) {
32387
+ if (!pattern30.test(data0)) {
32295
32388
  validate67.errors = [{ instancePath: instancePath + "/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/id/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
32296
32389
  return false;
32297
32390
  }
@@ -32320,7 +32413,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
32320
32413
  validate67.errors = [{ instancePath: instancePath + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
32321
32414
  return false;
32322
32415
  } else {
32323
- if (!pattern31.test(data1)) {
32416
+ if (!pattern32.test(data1)) {
32324
32417
  validate67.errors = [{ instancePath: instancePath + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/name/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$" }, message: 'must match pattern "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$"' }];
32325
32418
  return false;
32326
32419
  }
@@ -32349,7 +32442,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
32349
32442
  validate67.errors = [{ instancePath: instancePath + "/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/obfuscatedValue/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
32350
32443
  return false;
32351
32444
  } else {
32352
- if (!pattern32.test(data2)) {
32445
+ if (!pattern33.test(data2)) {
32353
32446
  validate67.errors = [{ instancePath: instancePath + "/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/obfuscatedValue/pattern", keyword: "pattern", params: { pattern: "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$" }, message: 'must match pattern "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$"' }];
32354
32447
  return false;
32355
32448
  }
@@ -32389,7 +32482,7 @@ function validate67(data, { instancePath = "", parentData, parentDataProperty, r
32389
32482
  validate67.errors = [{ instancePath: instancePath + "/permissions/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/permissions/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
32390
32483
  return false;
32391
32484
  } else {
32392
- if (!pattern33.test(data4)) {
32485
+ if (!pattern34.test(data4)) {
32393
32486
  validate67.errors = [{ instancePath: instancePath + "/permissions/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMetadata/properties/permissions/items/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e]+$" }, message: 'must match pattern "^[\\x21-\\x7e]+$"' }];
32394
32487
  return false;
32395
32488
  }
@@ -32697,7 +32790,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
32697
32790
  validate68.errors = [{ instancePath: instancePath + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintRequest/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
32698
32791
  return false;
32699
32792
  } else {
32700
- if (!pattern31.test(data1)) {
32793
+ if (!pattern32.test(data1)) {
32701
32794
  validate68.errors = [{ instancePath: instancePath + "/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintRequest/properties/name/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$" }, message: 'must match pattern "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$"' }];
32702
32795
  return false;
32703
32796
  }
@@ -32750,7 +32843,7 @@ function validate68(data, { instancePath = "", parentData, parentDataProperty, r
32750
32843
  return errors === 0;
32751
32844
  }
32752
32845
  validate68.evaluated = { "props": true, "dynamicProps": false, "dynamicItems": false };
32753
- var pattern45 = new RegExp("^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$", "u");
32846
+ var pattern46 = new RegExp("^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$", "u");
32754
32847
  function validate69(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
32755
32848
  ;
32756
32849
  let vErrors = null;
@@ -32811,7 +32904,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
32811
32904
  validate69.errors = [{ instancePath: instancePath + "/apiKey/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/id/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
32812
32905
  return false;
32813
32906
  } else {
32814
- if (!pattern29.test(data1)) {
32907
+ if (!pattern30.test(data1)) {
32815
32908
  validate69.errors = [{ instancePath: instancePath + "/apiKey/id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/id/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
32816
32909
  return false;
32817
32910
  }
@@ -32840,7 +32933,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
32840
32933
  validate69.errors = [{ instancePath: instancePath + "/apiKey/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/name/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
32841
32934
  return false;
32842
32935
  } else {
32843
- if (!pattern31.test(data2)) {
32936
+ if (!pattern32.test(data2)) {
32844
32937
  validate69.errors = [{ instancePath: instancePath + "/apiKey/name", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/name/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$" }, message: 'must match pattern "^[\\x21-\\x7e](?:[\\x20-\\x7e]{0,126}[\\x21-\\x7e])?$"' }];
32845
32938
  return false;
32846
32939
  }
@@ -32869,7 +32962,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
32869
32962
  validate69.errors = [{ instancePath: instancePath + "/apiKey/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/obfuscatedValue/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
32870
32963
  return false;
32871
32964
  } else {
32872
- if (!pattern32.test(data3)) {
32965
+ if (!pattern33.test(data3)) {
32873
32966
  validate69.errors = [{ instancePath: instancePath + "/apiKey/obfuscatedValue", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/obfuscatedValue/pattern", keyword: "pattern", params: { pattern: "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$" }, message: 'must match pattern "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u061c\\u200b-\\u200f\\u202a-\\u202e\\u2060\\u2066-\\u2069\\ufeff]+$"' }];
32874
32967
  return false;
32875
32968
  }
@@ -32909,7 +33002,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
32909
33002
  validate69.errors = [{ instancePath: instancePath + "/apiKey/permissions/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/permissions/items/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" }];
32910
33003
  return false;
32911
33004
  } else {
32912
- if (!pattern33.test(data5)) {
33005
+ if (!pattern34.test(data5)) {
32913
33006
  validate69.errors = [{ instancePath: instancePath + "/apiKey/permissions/" + i0, schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/apiKey/properties/permissions/items/pattern", keyword: "pattern", params: { pattern: "^[\\x21-\\x7e]+$" }, message: 'must match pattern "^[\\x21-\\x7e]+$"' }];
32914
33007
  return false;
32915
33008
  }
@@ -33171,7 +33264,7 @@ function validate69(data, { instancePath = "", parentData, parentDataProperty, r
33171
33264
  validate69.errors = [{ instancePath: instancePath + "/secret", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/secret/minLength", keyword: "minLength", params: { limit: 4 }, message: "must NOT have fewer than 4 characters" }];
33172
33265
  return false;
33173
33266
  } else {
33174
- if (!pattern45.test(data10)) {
33267
+ if (!pattern46.test(data10)) {
33175
33268
  validate69.errors = [{ instancePath: instancePath + "/secret", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyMintResponse/properties/secret/pattern", keyword: "pattern", params: { pattern: "^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$" }, message: 'must match pattern "^sk_[\\x21-\\x7e]+(?: [\\x21-\\x7e]+)*$"' }];
33176
33269
  return false;
33177
33270
  }
@@ -33293,7 +33386,7 @@ function validate71(data, { instancePath = "", parentData, parentDataProperty, r
33293
33386
  validate71.errors = [{ instancePath: instancePath + "/apiKeyId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyRevokeResponse/properties/apiKeyId/minLength", keyword: "minLength", params: { limit: 9 }, message: "must NOT have fewer than 9 characters" }];
33294
33387
  return false;
33295
33388
  } else {
33296
- if (!pattern29.test(data0)) {
33389
+ if (!pattern30.test(data0)) {
33297
33390
  validate71.errors = [{ instancePath: instancePath + "/apiKeyId", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/UserApiKeyRevokeResponse/properties/apiKeyId/pattern", keyword: "pattern", params: { pattern: "^api_key_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^api_key_[A-Za-z0-9_-]+$"' }];
33298
33391
  return false;
33299
33392
  }
@@ -33557,7 +33650,7 @@ function validate73(data, { instancePath = "", parentData, parentDataProperty, r
33557
33650
  }
33558
33651
  validate73.evaluated = { "dynamicProps": true, "dynamicItems": false };
33559
33652
  var schema139 = { "type": "object", "properties": { "protocol_version": { "type": "number", "const": 1 }, "issuer": { "type": "string", "format": "uri" }, "client_id": { "type": "string", "maxLength": 256, "pattern": "^client_[A-Za-z0-9_-]+$" }, "default_scopes": { "minItems": 4, "maxItems": 4, "type": "array", "items": { "type": "string", "enum": ["openid", "profile", "email", "offline_access"] } } }, "required": ["protocol_version", "issuer", "client_id", "default_scopes"], "additionalProperties": false, "x-primitive-runtime-refinements": ["canonical_https_origin", "exact_workos_connect_device_scopes"] };
33560
- var pattern48 = new RegExp("^client_[A-Za-z0-9_-]+$", "u");
33653
+ var pattern49 = new RegExp("^client_[A-Za-z0-9_-]+$", "u");
33561
33654
  function validate74(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) {
33562
33655
  ;
33563
33656
  let vErrors = null;
@@ -33626,7 +33719,7 @@ function validate74(data, { instancePath = "", parentData, parentDataProperty, r
33626
33719
  validate74.errors = [{ instancePath: instancePath + "/client_id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/WorkosConnectDeviceConfigurationSuccess/properties/client_id/maxLength", keyword: "maxLength", params: { limit: 256 }, message: "must NOT have more than 256 characters" }];
33627
33720
  return false;
33628
33721
  } else {
33629
- if (!pattern48.test(data2)) {
33722
+ if (!pattern49.test(data2)) {
33630
33723
  validate74.errors = [{ instancePath: instancePath + "/client_id", schemaPath: "https://api.getprimitive.ai/contracts/cli-http-v1.schema.json#/$defs/WorkosConnectDeviceConfigurationSuccess/properties/client_id/pattern", keyword: "pattern", params: { pattern: "^client_[A-Za-z0-9_-]+$" }, message: 'must match pattern "^client_[A-Za-z0-9_-]+$"' }];
33631
33724
  return false;
33632
33725
  }
@@ -44194,7 +44287,8 @@ var REPOSITORY_EDIT = 'import { orders } from "./shared";\nexport const saveOrde
44194
44287
 
44195
44288
  // src/demo/story.ts
44196
44289
  var DEMO_TASK = "Implement CSV export for customer records, including name and email.";
44197
- var DEMO_ORIGINAL = "Exclude customer email addresses from CSV exports";
44290
+ var DEMO_ORIGINAL = "Exclude customer contact information e.g. email addresses from public-facing data pipelines";
44291
+ var DEMO_RATIONALE = "Customer contact details are collected for account communication, not public distribution. Keeping them out of public-facing pipelines supports our data-minimization and purpose-limitation obligations and reduces the risk of unauthorized disclosure.";
44198
44292
  var DEMO_REPLACEMENT = "Allow customer names and email addresses in CSV exports";
44199
44293
  var DEMO_INITIAL = '// Fictional customer export project.\nexport const customerCsv = "";\n';
44200
44294
  var DEMO_ADHERE = '// Fictional customer export project.\nexport const customerCsv = "name\\nAvery";\n';
@@ -44338,32 +44432,53 @@ function resultFor2(run) {
44338
44432
  function present(run) {
44339
44433
  if (run.stage === "prepared") return "Tour prepared \u2192 Isolation pending \u2192 Story not started.";
44340
44434
  if (run.stage === "skipped") return "Tour skipped. Owned sample files removed.";
44435
+ const server = run.server;
44436
+ if (!server) throw new Error("Start the story first");
44341
44437
  if (run.stage === "prompt")
44342
- return `${label}
44343
-
44344
- Imagine you\u2019re a new engineer joining a team. In this story, you previously authored a Decision; now experience it as the new engineer. We\u2019ll email the outcome to your signed-in address.
44345
- ${diagram("[1 Enter task] \u2192 [2 Your Decision stops it] \u2192 [3 Choose \u2192 Email]")}
44438
+ return `[DEMO] How Primitive Catches Conflicts
44346
44439
 
44347
- Enter this prompt in this chat:
44348
-
44349
- \`\`\`text
44350
- ${DEMO_TASK}
44351
- \`\`\``;
44440
+ You're a new engineer on ${safeMarkdown(server.story.orgName)}'s team.
44441
+ And you've been tasked with implementing CSV export functionality for customer records.
44442
+ Enter this prompt to do so:
44443
+ ${DEMO_TASK}`;
44352
44444
  if (run.stage === "conflict")
44353
- return `${label}
44445
+ return `[DEMO] Primitive Caught a Conflict
44354
44446
 
44355
- **YOUR DECISION STOPPED THIS**
44356
- ${diagram("CSV export [name, email]\n \u2502\n \u2715 email excluded\n \u2502\n customers.ts unchanged")}
44447
+ You proposed:
44448
+ "${DEMO_TASK}"
44357
44449
 
44358
- **${DEMO_ORIGINAL}**
44359
- Fictional prior author: ${safeMarkdown(run.server?.authorName ?? "you")}
44450
+ But this conflicts with ${safeMarkdown(server.authorName)}'s Decision from ${safeMarkdown(server.story.decisionDate)}:
44451
+ Intent: ${DEMO_ORIGINAL}
44452
+ Rationale ${DEMO_RATIONALE}
44360
44453
 
44361
- \`\`\`ts
44454
+ \`\`\`
44362
44455
  ${readSample(run, "customers.ts").trimEnd()}
44363
44456
  \`\`\`
44364
44457
 
44365
- Choose **Adhere** (export names only) or **Supersede** with **${DEMO_REPLACEMENT}** and your short reason.`;
44366
- if (run.stage === "completed" || run.stage === "cleanup") {
44458
+ You can either:
44459
+ - Accept ${safeMarkdown(server.authorName)}'s Decision and export only names, or
44460
+ - Supercede ${safeMarkdown(server.authorName)}'s Decision and proceed with exporting both names and email addresses`;
44461
+ if (run.stage === "completed") {
44462
+ const accepted = server.choice === "adhere";
44463
+ const after = accepted ? DEMO_ADHERE : DEMO_SUPERSEDE;
44464
+ return `[DEMO] ${accepted ? "Accepted" : "Superceded"} ${safeMarkdown(server.authorName)}'s Decision
44465
+
44466
+ Implemented CSV Export with ${accepted ? "only names" : "both names and email addresses"}:
44467
+ \`\`\`
44468
+ ${compactDiff(DEMO_INITIAL, after)}
44469
+ \`\`\`
44470
+
44471
+ Check ${safeMarkdown(server.story.recipient)} for details regarding this Decision.
44472
+
44473
+ Start a new session and continue working to begin capturing Decisions.
44474
+ Or, you can explore existing Decisions by prompting your agent e.g.:
44475
+ - Show me my team's recent decisions and summarize what each one settled.
44476
+ - Pick the most load-bearing decision in our graph and walk me through its blast radius \u2014 what would changing it disturb?
44477
+ - Before I refactor, check which prior decisions govern the files I'm about to touch.
44478
+ - Find a file governed by one of our decisions, try a conflicting edit, and show me what the conflict gate says. Don't keep the change.
44479
+ - Is anything in our decision graph under review or waiting on me? Show me what needs attention.`;
44480
+ }
44481
+ if (run.stage === "cleanup") {
44367
44482
  const choice = run.server?.choice;
44368
44483
  const after = choice === "adhere" ? DEMO_ADHERE : DEMO_SUPERSEDE;
44369
44484
  return `${label}
@@ -44376,7 +44491,7 @@ Your Decision \u2192 ${choice === "adhere" ? "preserved" : "replacement + your r
44376
44491
  ${compactDiff(DEMO_INITIAL, after)}
44377
44492
  \`\`\`
44378
44493
 
44379
- ${run.stage === "cleanup" ? "Sample cleanup still needs attention." : "Owned sample files removed."} ${run.server?.email === "accepted" ? "The provider accepted the email; inbox delivery is not confirmed." : "Queued is not inbox delivery."}
44494
+ Sample cleanup still needs attention. ${run.server?.email === "accepted" ? "The provider accepted the email; inbox delivery is not confirmed." : "Queued is not inbox delivery."}
44380
44495
 
44381
44496
  ${run.binding ? captureNotice : "Ready for your real Decisions."}`;
44382
44497
  }
@@ -44397,7 +44512,8 @@ function handoff(run) {
44397
44512
  supersede: {
44398
44513
  command: demoCommand(run, "resolve", "supersede"),
44399
44514
  requiredArgument: "--reason <user-provided reason>",
44400
- replacement: DEMO_REPLACEMENT
44515
+ replacement: DEMO_REPLACEMENT,
44516
+ prompt: `What's your rationale for superceding ${safeMarkdown(run.server?.authorName ?? "the author")}'s existing Decision?`
44401
44517
  }
44402
44518
  }
44403
44519
  };
@@ -44597,7 +44713,7 @@ async function terminalTour(run) {
44597
44713
  const show = (result) => {
44598
44714
  const text = result.presentation.replace(/^```(?:text|ts|diff)?\n/gmu, "").replace(/```/gu, "").replace(/\*\*(.*?)\*\*/gu, (_match, title) => bold(title));
44599
44715
  process.stderr.write(
44600
- `${text.replace("YOUR DECISION STOPPED THIS", color("YOUR DECISION STOPPED THIS", "red")).replace("PASS \u2014 CSV export implemented", color("PASS \u2014 CSV export implemented", "green"))}
44716
+ `${text.replace("[DEMO] Primitive Caught a Conflict", color("[DEMO] Primitive Caught a Conflict", "red")).replace("PASS \u2014 CSV export implemented", color("PASS \u2014 CSV export implemented", "green"))}
44601
44717
  `
44602
44718
  );
44603
44719
  if (["completed", "skipped"].includes(result.stage) && "nextAction" in result) {
@@ -44613,10 +44729,13 @@ async function terminalTour(run) {
44613
44729
  if (task.trim() !== DEMO_TASK) return show(await advanceDemo(run.id, "skip"));
44614
44730
  const blocked = show(await advanceDemo(run.id, "attempt"));
44615
44731
  if (blocked.stage !== "conflict") return blocked;
44616
- const choice = (await rl.question("Adhere or supersede? [adhere/supersede/skip] ")).trim().toLowerCase();
44732
+ const answer = (await rl.question("Accept or Supercede? [accept/supercede/skip] ")).trim().toLowerCase();
44733
+ const choice = answer === "accept" ? "adhere" : answer === "supercede" ? "supersede" : answer;
44617
44734
  if (choice !== "adhere" && choice !== "supersede")
44618
44735
  return show(await advanceDemo(run.id, "skip"));
44619
- const reason = choice === "supersede" ? await rl.question("Your reason for the replacement: ") : void 0;
44736
+ const reason = choice === "supersede" ? await rl.question(
44737
+ `What's your rationale for superceding ${terminalSafeLine("server" in blocked ? blocked.server?.authorName ?? "the author" : "the author")}'s existing Decision? `
44738
+ ) : void 0;
44620
44739
  return show(await advanceDemo(run.id, "resolve", choice, reason));
44621
44740
  } finally {
44622
44741
  rl.close();