@stndrds/schema 1.0.0-alpha.291 → 1.0.0-alpha.293

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.
Files changed (35) hide show
  1. package/dist/{all-FGIrc6mI.d.ts → all-CDJSpI46.d.ts} +105 -6
  2. package/dist/{all-DaucFjyz.d.mts → all-Cru_CaSY.d.mts} +105 -6
  3. package/dist/{chunk-5JMQNH2A.js → chunk-5N7OSHVX.js} +4 -4
  4. package/dist/{chunk-KLDZHAGX.mjs → chunk-APRL56F4.mjs} +1 -1
  5. package/dist/{chunk-RDYTVHNN.js → chunk-C32UUQ6D.js} +4 -4
  6. package/dist/{chunk-UW3BOSB6.mjs → chunk-GRUSTQK3.mjs} +1 -1
  7. package/dist/{chunk-K7XGY34S.js → chunk-OASIPLEB.js} +98 -40
  8. package/dist/{chunk-ZHB4VBCX.js → chunk-P4VCAPJT.js} +3 -3
  9. package/dist/{chunk-RMJ75YLQ.mjs → chunk-ULM2BA5A.mjs} +62 -8
  10. package/dist/{chunk-JSQCTLV5.mjs → chunk-VGGGLTYJ.mjs} +1 -1
  11. package/dist/{chunk-3YCZ5H3H.js → chunk-Y3UPKP2B.js} +4 -0
  12. package/dist/{chunk-7WEOBXXA.mjs → chunk-Z5OPSBMQ.mjs} +4 -0
  13. package/dist/exceptions.d.mts +3 -0
  14. package/dist/exceptions.d.ts +3 -0
  15. package/dist/exceptions.js +39 -39
  16. package/dist/exceptions.mjs +1 -1
  17. package/dist/{index-Eh1tYq3i.d.mts → index-BdVnHL3F.d.mts} +27 -7
  18. package/dist/{index-0VG9u1XW.d.ts → index-CFhPHQaI.d.ts} +27 -7
  19. package/dist/index.d.mts +877 -429
  20. package/dist/index.d.ts +877 -429
  21. package/dist/index.js +654 -334
  22. package/dist/index.mjs +332 -61
  23. package/dist/utils.js +8 -8
  24. package/dist/utils.mjs +2 -2
  25. package/dist/validation/all.d.mts +2 -2
  26. package/dist/validation/all.d.ts +2 -2
  27. package/dist/validation/all.js +29 -29
  28. package/dist/validation/all.mjs +4 -4
  29. package/dist/validation/config/index.d.mts +1 -1
  30. package/dist/validation/config/index.d.ts +1 -1
  31. package/dist/validation/config/index.js +12 -12
  32. package/dist/validation/config/index.mjs +2 -2
  33. package/dist/validation/object/index.js +14 -14
  34. package/dist/validation/object/index.mjs +2 -2
  35. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk5JMQNH2A_js = require('./chunk-5JMQNH2A.js');
4
- var chunk3YCZ5H3H_js = require('./chunk-3YCZ5H3H.js');
3
+ var chunk5N7OSHVX_js = require('./chunk-5N7OSHVX.js');
4
+ var chunkY3UPKP2B_js = require('./chunk-Y3UPKP2B.js');
5
5
  var zod = require('zod');
6
6
 
7
7
  // src/types/system-attributes.ts
@@ -155,6 +155,13 @@ var FORMULA_OPERATORS = [
155
155
  "is_empty",
156
156
  "is_not_empty"
157
157
  ];
158
+ var LOCATION_FILTER_PROPERTIES = ["city", "postalCode", "country"];
159
+ function isLocationFilterProperty(name) {
160
+ return LOCATION_FILTER_PROPERTIES.includes(name);
161
+ }
162
+ function isLocationPartOperator(operator) {
163
+ return TEXT_OPERATORS.includes(operator);
164
+ }
158
165
  var ATTRIBUTE_FILTER_OPERATORS = {
159
166
  text: TEXT_OPERATORS,
160
167
  richtext: [],
@@ -500,7 +507,7 @@ function canonicalizeFilterValue(rule, effectiveType) {
500
507
  const message = `Filter on a currency attribute expected a numeric amount, received ${JSON.stringify(
501
508
  value
502
509
  )}`;
503
- throw new chunk3YCZ5H3H_js.ValidationError(message, [{ path: ["value"], message }]);
510
+ throw new chunkY3UPKP2B_js.ValidationError(message, [{ path: ["value"], message }]);
504
511
  }
505
512
  function hasCurrencyAmount(value) {
506
513
  if (typeof value !== "object") return true;
@@ -533,10 +540,12 @@ var SYNONYM_ALIASES = {
533
540
  // set
534
541
  in: "any_of",
535
542
  isAnyOf: "any_of",
543
+ anyOf: "any_of",
536
544
  oneOf: "any_of",
537
545
  notIn: "none_of",
538
546
  not_in: "none_of",
539
547
  isNoneOf: "none_of",
548
+ noneOf: "none_of",
540
549
  notOneOf: "none_of",
541
550
  // text
542
551
  startsWith: "starts_with",
@@ -661,13 +670,13 @@ function resolveCanonicalOperator(rawOperator, effectiveType) {
661
670
  const replacement = REMOVED_OPERATOR_REPLACEMENTS[rawOperator];
662
671
  if (replacement) {
663
672
  const m = `Unknown filter operator "${rawOperator}" \u2014 use ${replacement}`;
664
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["operator"], message: m }]);
673
+ throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["operator"], message: m }]);
665
674
  }
666
675
  const normalized = normalizeOperator(rawOperator);
667
676
  const membership = SUBSTRING_TO_MEMBERSHIP[normalized];
668
677
  if (membership && SET_MEMBERSHIP_TYPES.has(effectiveType)) {
669
678
  const m = `Operator "${normalized}" is not valid for type "${effectiveType}" \u2014 use "${membership}"`;
670
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["operator"], message: m }]);
679
+ throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["operator"], message: m }]);
671
680
  }
672
681
  return normalized;
673
682
  }
@@ -677,7 +686,7 @@ function assertOperatorForType(operator, type, context) {
677
686
  if (!ops?.includes(normalized)) {
678
687
  const validList = ops?.length ? ops.join(", ") : "(no operators registered for this type)";
679
688
  const summary = `Operator "${operator}" is not valid for ${context} type "${type}". Valid operators: ${validList}.`;
680
- throw new chunk3YCZ5H3H_js.ValidationError(summary, [
689
+ throw new chunkY3UPKP2B_js.ValidationError(summary, [
681
690
  {
682
691
  path: ["operator"],
683
692
  message: summary
@@ -690,7 +699,7 @@ function assertRelativeDateValue(rule) {
690
699
  if (rule.operator !== "is_within") return;
691
700
  if (!isRelativeDateValue(rule.value)) {
692
701
  const m = `Operator "is_within" requires a relative-date value { amount: positive number, unit: days|weeks|months|years, direction: past|future }`;
693
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["value"], message: m }]);
702
+ throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["value"], message: m }]);
694
703
  }
695
704
  }
696
705
  function applyCanonicalForm(rule, operator, effectiveType) {
@@ -703,19 +712,23 @@ function assertDynamicValueForAttribute(rule, attrType) {
703
712
  const v = rule.value;
704
713
  if (v.dynamic === "actor" && attrType !== "user") {
705
714
  const m = `actor token (@me) is only valid on user attributes, not "${attrType}"`;
706
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["value"], message: m }]);
715
+ throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["value"], message: m }]);
707
716
  }
708
717
  if (v.dynamic === "date" && attrType !== "date") {
709
718
  const m = `date token (@today/@now) is only valid on date attributes, not "${attrType}"`;
710
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["value"], message: m }]);
719
+ throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["value"], message: m }]);
711
720
  }
712
721
  }
722
+ var LOCATION_PARTS_LIST = LOCATION_FILTER_PROPERTIES.map((part) => `"${part}"`).join(", ");
723
+ function locationPartsHint(type) {
724
+ return type === "location" ? ` A location is filtered on one of its parts: set "property" to one of ${LOCATION_PARTS_LIST} and use a text operator (e.g. contains).` : "";
725
+ }
713
726
  function collectQualifiedRuleIssues(rule, context) {
714
727
  try {
715
728
  validateQualifiedRule({ ...rule }, context);
716
729
  return [];
717
730
  } catch (error) {
718
- if (!(error instanceof chunk3YCZ5H3H_js.ValidationError)) throw error;
731
+ if (!(error instanceof chunkY3UPKP2B_js.ValidationError)) throw error;
719
732
  return error.errors.map((issue) => ({ ...issue, path: [...issue.path] }));
720
733
  }
721
734
  }
@@ -723,17 +736,19 @@ function validateQualifiedRule(rule, context) {
723
736
  const rootAttr = context.attributes.find((a) => a.name === rule.attribute);
724
737
  const systemOps = SYSTEM_FILTER_OPERATORS[rule.attribute];
725
738
  if (!(rootAttr || systemOps)) {
726
- throw new chunk3YCZ5H3H_js.ValidationError(`Unknown attribute: ${rule.attribute}`, [
727
- { path: ["attribute"], message: `Unknown attribute: ${rule.attribute}` }
728
- ]);
739
+ const [head, ...tail] = rule.attribute.split(".");
740
+ const dottedRoot = tail.length > 0 ? context.attributes.find((a) => a.name === head) : void 0;
741
+ const dottedHint = dottedRoot?.type === "location" ? ` Dotted paths are not supported \u2014 set "attribute" to "${head}" and "property" to ${isLocationFilterProperty(tail[0] ?? "") ? `"${tail[0]}"` : `one of ${LOCATION_PARTS_LIST}`}.` : rule.attribute.includes(".") ? ' Dotted paths are not supported \u2014 filter on the attribute name alone, or use the full-text "query" parameter to match text inside a value.' : "";
742
+ const m = `Unknown attribute: ${rule.attribute}${dottedHint}`;
743
+ throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["attribute"], message: m }]);
729
744
  }
730
745
  if (rule.quantifier !== void 0 && !rule.property) {
731
746
  const m = `quantifier is only valid on qualified edge rules (set "property")`;
732
- throw new chunk3YCZ5H3H_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
747
+ throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
733
748
  }
734
749
  if (!rootAttr) {
735
750
  if (rule.property) {
736
- throw new chunk3YCZ5H3H_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
751
+ throw new chunkY3UPKP2B_js.ValidationError(`Cannot qualify system attribute "${rule.attribute}"`, [
737
752
  { path: ["property"], message: `"${rule.attribute}" is a system column, not a reference` }
738
753
  ]);
739
754
  }
@@ -741,7 +756,7 @@ function validateQualifiedRule(rule, context) {
741
756
  const normalizedOperator2 = resolveCanonicalOperator(rule.operator, effectiveType);
742
757
  if (!systemOps.includes(normalizedOperator2)) {
743
758
  const summary = `Operator "${rule.operator}" is not valid for system attribute "${rule.attribute}". Valid operators: ${systemOps.join(", ")}.`;
744
- throw new chunk3YCZ5H3H_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
759
+ throw new chunkY3UPKP2B_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
745
760
  }
746
761
  applyCanonicalForm(rule, normalizedOperator2, effectiveType);
747
762
  return;
@@ -752,26 +767,40 @@ function validateQualifiedRule(rule, context) {
752
767
  const normalizedOperator2 = resolveCanonicalOperator(rule.operator, rootAttr.type);
753
768
  if (!ops.includes(normalizedOperator2)) {
754
769
  const validList = ops.length ? ops.join(", ") : "(not filterable)";
755
- const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.`;
756
- throw new chunk3YCZ5H3H_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
770
+ const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.${locationPartsHint(rootAttr.type)}`;
771
+ throw new chunkY3UPKP2B_js.ValidationError(summary, [{ path: ["operator"], message: summary }]);
757
772
  }
758
773
  applyCanonicalForm(rule, normalizedOperator2, resolveEffectiveFilterType(rootAttr));
759
774
  return;
760
775
  }
776
+ if (rootAttr.type === "location") {
777
+ if (rule.quantifier !== void 0) {
778
+ const m = "quantifier is not valid on a location part \u2014 a location is one value, not a set of edges";
779
+ throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["quantifier"], message: m }]);
780
+ }
781
+ if (!isLocationFilterProperty(rule.property)) {
782
+ const m = `Property "${rule.property}" is not a part of location "${rule.attribute}". Valid parts: ${LOCATION_PARTS_LIST}.`;
783
+ throw new chunkY3UPKP2B_js.ValidationError(m, [{ path: ["property"], message: m }]);
784
+ }
785
+ assertDynamicValueForAttribute(rule, "text");
786
+ const normalizedOperator2 = assertOperatorForType(rule.operator, "text", "property");
787
+ applyCanonicalForm(rule, normalizedOperator2, "text");
788
+ return;
789
+ }
761
790
  if (!REFERENCE_TYPES.has(rootAttr.type)) {
762
- throw new chunk3YCZ5H3H_js.ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
791
+ throw new chunkY3UPKP2B_js.ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
763
792
  { path: ["property"], message: `Attribute "${rule.attribute}" is not a reference type` }
764
793
  ]);
765
794
  }
766
795
  const propSchema = rootAttr.properties;
767
796
  if (!propSchema) {
768
- throw new chunk3YCZ5H3H_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
797
+ throw new chunkY3UPKP2B_js.ValidationError(`Attribute "${rule.attribute}" has no qualifyWith schema`, [
769
798
  { path: ["property"], message: `"${rule.attribute}" has no qualifyWith` }
770
799
  ]);
771
800
  }
772
801
  const propDef = propSchema.definitions.find((p) => p.name === rule.property);
773
802
  if (!propDef) {
774
- throw new chunk3YCZ5H3H_js.ValidationError(
803
+ throw new chunkY3UPKP2B_js.ValidationError(
775
804
  `Property "${rule.property}" not defined on "${rule.attribute}".qualifyWith()`,
776
805
  [{ path: ["property"], message: `Unknown property: ${rule.property}` }]
777
806
  );
@@ -787,7 +816,7 @@ function parseResourceVisibility(value) {
787
816
  if (typeof value === "string" && RESOURCE_VISIBILITIES.includes(value)) {
788
817
  return value;
789
818
  }
790
- throw new chunk3YCZ5H3H_js.ValidationError(
819
+ throw new chunkY3UPKP2B_js.ValidationError(
791
820
  `visibility must be one of: ${RESOURCE_VISIBILITIES.join(", ")} (received: ${String(value)})`,
792
821
  []
793
822
  );
@@ -821,12 +850,15 @@ var RESERVED_OBJECT_NAMES = ["skill"];
821
850
  // src/validators/view-config.schema.ts
822
851
  var createModeSchema = zod.z.enum(["redirect", "inline", "peek"]);
823
852
  var nonEmptyStringArraySchema = zod.z.array(zod.z.string()).min(1);
824
- var columnsSchema = zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.columnsPerTab);
853
+ var columnsSchema = zod.z.array(zod.z.string()).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.columnsPerTab);
854
+ var displayAttributesSchema = zod.z.array(zod.z.string().min(1)).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.columnsPerTab).refine((names) => new Set(names).size === names.length, {
855
+ message: "Displayed attribute names must be unique"
856
+ });
825
857
  var sortRuleSchema = zod.z.object({
826
858
  attribute: zod.z.string(),
827
859
  direction: zod.z.enum(["asc", "desc"])
828
860
  }).strict();
829
- var sortsSchema = zod.z.array(sortRuleSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.sortsPerTab);
861
+ var sortsSchema = zod.z.array(sortRuleSchema).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.sortsPerTab);
830
862
  var relativeDateValueSchema = zod.z.object({
831
863
  amount: zod.z.number(),
832
864
  unit: zod.z.enum(["days", "weeks", "months", "years"]),
@@ -900,7 +932,7 @@ var filterRuleSchema = zod.z.object({
900
932
  operator: filterOperatorSchema,
901
933
  value: filterValueSchema
902
934
  }).strict();
903
- var filterRulesSchema = zod.z.array(filterRuleSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.filterRulesPerTab);
935
+ var filterRulesSchema = zod.z.array(filterRuleSchema).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.filterRulesPerTab);
904
936
  var filterStateSchema = zod.z.object({
905
937
  combinator: zod.z.enum(["and", "or"]),
906
938
  rules: filterRulesSchema
@@ -991,17 +1023,17 @@ var baseGroupShape = {
991
1023
  var fieldGroupWriteSchema = zod.z.object({
992
1024
  ...baseGroupShape,
993
1025
  type: zod.z.literal("fields"),
994
- fields: zod.z.array(fieldSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.fieldsPerGroup)
1026
+ fields: zod.z.array(fieldSchema).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.fieldsPerGroup)
995
1027
  }).strict();
996
1028
  var groupWriteSchema = fieldGroupWriteSchema;
997
1029
  var baseTabShape = {
998
1030
  id: zod.z.string(),
999
1031
  name: zod.z.string(),
1000
1032
  label: zod.z.string(),
1001
- icon: chunk5JMQNH2A_js.iconNameSchema.optional(),
1033
+ icon: chunk5N7OSHVX_js.iconNameSchema.optional(),
1002
1034
  order: zod.z.number().optional()
1003
1035
  };
1004
- var formTabGroupsSchema = zod.z.array(groupWriteSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.groupsPerFormTab);
1036
+ var formTabGroupsSchema = zod.z.array(groupWriteSchema).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.groupsPerFormTab);
1005
1037
  var formTabShape = {
1006
1038
  ...baseTabShape,
1007
1039
  type: zod.z.literal("form"),
@@ -1016,13 +1048,13 @@ function refineFormTab(tab, ctx) {
1016
1048
  (count, group) => count + (group.type === "fields" ? group.fields.length : 0),
1017
1049
  0
1018
1050
  );
1019
- if (totalFields > chunk5JMQNH2A_js.SCHEMA_LIMITS.fieldsPerFormTab) {
1051
+ if (totalFields > chunk5N7OSHVX_js.SCHEMA_LIMITS.fieldsPerFormTab) {
1020
1052
  ctx.addIssue({
1021
1053
  code: "too_big",
1022
1054
  origin: "array",
1023
- maximum: chunk5JMQNH2A_js.SCHEMA_LIMITS.fieldsPerFormTab,
1055
+ maximum: chunk5N7OSHVX_js.SCHEMA_LIMITS.fieldsPerFormTab,
1024
1056
  inclusive: true,
1025
- message: `A form tab can contain at most ${chunk5JMQNH2A_js.SCHEMA_LIMITS.fieldsPerFormTab} fields`,
1057
+ message: `A form tab can contain at most ${chunk5N7OSHVX_js.SCHEMA_LIMITS.fieldsPerFormTab} fields`,
1026
1058
  path: ["groups"]
1027
1059
  });
1028
1060
  }
@@ -1226,12 +1258,12 @@ var formsTabSchema = zod.z.object({
1226
1258
  var emailsTabSchema = zod.z.object({
1227
1259
  ...baseTabShape,
1228
1260
  type: zod.z.literal("emails"),
1229
- emailAttributeIds: zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.emailAttributesPerTab)
1261
+ emailAttributeIds: zod.z.array(zod.z.string()).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.emailAttributesPerTab)
1230
1262
  }).strict();
1231
1263
  var meetingsTabSchema = zod.z.object({
1232
1264
  ...baseTabShape,
1233
1265
  type: zod.z.literal("meetings"),
1234
- emailAttributeIds: zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.emailAttributesPerTab)
1266
+ emailAttributeIds: zod.z.array(zod.z.string()).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.emailAttributesPerTab)
1235
1267
  }).strict();
1236
1268
  var nonFormDetailTabSchemas = [
1237
1269
  tableTabSchema,
@@ -1254,7 +1286,7 @@ var detailTabDraftSchema = zod.z.discriminatedUnion("type", [
1254
1286
  var listTabCommonShape = {
1255
1287
  id: zod.z.string(),
1256
1288
  label: zod.z.string(),
1257
- icon: chunk5JMQNH2A_js.iconNameSchema.optional(),
1289
+ icon: chunk5N7OSHVX_js.iconNameSchema.optional(),
1258
1290
  default: zod.z.boolean().optional(),
1259
1291
  // Which records the tab scopes to. `"all"` is the default and means "impose
1260
1292
  // no scope" — the mandatory viewer predicate alone decides, so the tab shows
@@ -1262,6 +1294,8 @@ var listTabCommonShape = {
1262
1294
  // required so configs stored before the field existed still parse.
1263
1295
  visibility: zod.z.enum(LIST_VIEW_TAB_VISIBILITIES).default("all"),
1264
1296
  columns: columnsSchema,
1297
+ descriptionAttribute: zod.z.string().min(1).optional(),
1298
+ displayAttributes: displayAttributesSchema.optional(),
1265
1299
  filters: filterGroupSchema.optional(),
1266
1300
  sorts: sortsSchema.optional(),
1267
1301
  readOnly: zod.z.boolean().optional(),
@@ -1270,11 +1304,15 @@ var listTabCommonShape = {
1270
1304
  var listTableTabSchema = zod.z.object({
1271
1305
  ...listTabCommonShape,
1272
1306
  layout: zod.z.literal("table"),
1273
- columnSizing: zod.z.record(zod.z.string(), zod.z.number()).optional()
1307
+ columnSizing: zod.z.record(zod.z.string(), zod.z.number()).optional(),
1308
+ // Opted-in system views expose their immutable code grouping as an inert
1309
+ // hint so Architect can return to Kanban after a saved layout change.
1310
+ groupByAttribute: zod.z.string().min(1).optional()
1274
1311
  }).strict();
1275
1312
  var listKanbanTabSchema = zod.z.object({
1276
1313
  ...listTabCommonShape,
1277
1314
  layout: zod.z.literal("kanban"),
1315
+ columns: columnsSchema.default([]),
1278
1316
  groupByAttribute: zod.z.string(),
1279
1317
  cardUserAttribute: zod.z.string().optional(),
1280
1318
  cardDateAttribute: zod.z.string().optional(),
@@ -1282,17 +1320,33 @@ var listKanbanTabSchema = zod.z.object({
1282
1320
  kanbanColumnVisibility: zod.z.record(zod.z.string(), zod.z.boolean()).optional(),
1283
1321
  kanbanPinnedColumns: zod.z.array(zod.z.string()).optional()
1284
1322
  }).strict();
1323
+ var listRowsTabSchema = zod.z.object({
1324
+ ...listTabCommonShape,
1325
+ layout: zod.z.literal("list"),
1326
+ columns: columnsSchema.default([]),
1327
+ columnSizing: zod.z.record(zod.z.string(), zod.z.number()).optional(),
1328
+ groupByAttribute: zod.z.string().min(1).optional()
1329
+ }).strict();
1285
1330
  var listViewTabSchema = zod.z.discriminatedUnion("layout", [
1286
1331
  listTableTabSchema,
1332
+ listRowsTabSchema,
1287
1333
  listKanbanTabSchema
1288
1334
  ]);
1289
1335
  var _listViewConfigSchema = zod.z.object({
1336
+ allowPresentationCustomization: zod.z.boolean().optional(),
1290
1337
  defaultFilters: filterGroupSchema.optional(),
1291
- tabs: zod.z.array(listViewTabSchema).min(1).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.tabsPerView)
1338
+ tabs: zod.z.array(listViewTabSchema).min(1).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.tabsPerView)
1292
1339
  }).strict().superRefine((config, ctx) => {
1293
1340
  addDuplicateIdIssues(config.tabs, ctx, ["tabs"]);
1294
1341
  let hasDefault = false;
1295
1342
  config.tabs.forEach((tab, index) => {
1343
+ if (tab.layout !== "kanban" && tab.groupByAttribute !== void 0 && config.allowPresentationCustomization !== true) {
1344
+ ctx.addIssue({
1345
+ code: "unrecognized_keys",
1346
+ keys: ["groupByAttribute"],
1347
+ path: ["tabs", index]
1348
+ });
1349
+ }
1296
1350
  if (!tab.default) return;
1297
1351
  if (hasDefault) {
1298
1352
  ctx.addIssue({
@@ -1309,7 +1363,7 @@ var sidePanelPaneSchema = zod.z.discriminatedUnion("kind", [
1309
1363
  kind: zod.z.literal("fields"),
1310
1364
  id: zod.z.string().optional(),
1311
1365
  label: zod.z.string().optional(),
1312
- attributes: zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.sidePanelAttributes)
1366
+ attributes: zod.z.array(zod.z.string()).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.sidePanelAttributes)
1313
1367
  }).strict(),
1314
1368
  zod.z.object({
1315
1369
  kind: zod.z.literal("activity"),
@@ -1328,10 +1382,10 @@ var sidePanelPaneSchema = zod.z.discriminatedUnion("kind", [
1328
1382
  }).strict()
1329
1383
  ]);
1330
1384
  var _detailViewConfigSchema = zod.z.object({
1331
- tabs: zod.z.array(detailTabSchema).min(1).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.tabsPerView),
1385
+ tabs: zod.z.array(detailTabSchema).min(1).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.tabsPerView),
1332
1386
  sidePanel: zod.z.object({
1333
- attributes: zod.z.array(zod.z.string()).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.sidePanelAttributes).optional(),
1334
- panes: zod.z.array(sidePanelPaneSchema).max(chunk5JMQNH2A_js.SCHEMA_LIMITS.sidePanelPanes).optional(),
1387
+ attributes: zod.z.array(zod.z.string()).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.sidePanelAttributes).optional(),
1388
+ panes: zod.z.array(sidePanelPaneSchema).max(chunk5N7OSHVX_js.SCHEMA_LIMITS.sidePanelPanes).optional(),
1335
1389
  width: zod.z.number().optional()
1336
1390
  }).strict().refine((sidePanel) => sidePanel.attributes !== void 0 || sidePanel.panes !== void 0, {
1337
1391
  message: "sidePanel requires attributes or panes"
@@ -1381,6 +1435,7 @@ exports.ATTRIBUTE_FILTER_OPERATORS = ATTRIBUTE_FILTER_OPERATORS;
1381
1435
  exports.LIST_TAB_KANBAN_KEYS = LIST_TAB_KANBAN_KEYS;
1382
1436
  exports.LIST_TAB_TABLE_KEYS = LIST_TAB_TABLE_KEYS;
1383
1437
  exports.LIST_VIEW_TAB_VISIBILITIES = LIST_VIEW_TAB_VISIBILITIES;
1438
+ exports.LOCATION_FILTER_PROPERTIES = LOCATION_FILTER_PROPERTIES;
1384
1439
  exports.NO_VALUE_OPERATORS = NO_VALUE_OPERATORS;
1385
1440
  exports.OPERATORS_BY_TYPE = OPERATORS_BY_TYPE;
1386
1441
  exports.REMOVED_OPERATOR_REPLACEMENTS = REMOVED_OPERATOR_REPLACEMENTS;
@@ -1399,6 +1454,7 @@ exports.currentActor = currentActor;
1399
1454
  exports.detailTabDraftSchema = detailTabDraftSchema;
1400
1455
  exports.detailTabSchema = detailTabSchema;
1401
1456
  exports.detailViewConfigSchema = detailViewConfigSchema;
1457
+ exports.displayAttributesSchema = displayAttributesSchema;
1402
1458
  exports.extractCurrencyFilterValue = extractCurrencyFilterValue;
1403
1459
  exports.extractFilterValue = extractFilterValue;
1404
1460
  exports.fieldSchema = fieldSchema;
@@ -1420,6 +1476,8 @@ exports.isAttributeKanbanGroupable = isAttributeKanbanGroupable;
1420
1476
  exports.isAttributeSearchable = isAttributeSearchable;
1421
1477
  exports.isAttributeSortable = isAttributeSortable;
1422
1478
  exports.isDynamicValue = isDynamicValue;
1479
+ exports.isLocationFilterProperty = isLocationFilterProperty;
1480
+ exports.isLocationPartOperator = isLocationPartOperator;
1423
1481
  exports.isManagedSystemAttribute = isManagedSystemAttribute;
1424
1482
  exports.isNoValueOperator = isNoValueOperator;
1425
1483
  exports.isRelativeDateValue = isRelativeDateValue;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk3YCZ5H3H_js = require('./chunk-3YCZ5H3H.js');
3
+ var chunkY3UPKP2B_js = require('./chunk-Y3UPKP2B.js');
4
4
 
5
5
  // src/utils/canonical-json.ts
6
6
  function canonicalStringify(value) {
@@ -17,10 +17,10 @@ function canonicalStringify(value) {
17
17
  case "object":
18
18
  break;
19
19
  default:
20
- throw new chunk3YCZ5H3H_js.ValidationError(`Cannot canonicalize value of type ${typeof v}`, []);
20
+ throw new chunkY3UPKP2B_js.ValidationError(`Cannot canonicalize value of type ${typeof v}`, []);
21
21
  }
22
22
  const obj = v;
23
- if (seen.has(obj)) throw new chunk3YCZ5H3H_js.ValidationError("Cannot canonicalize circular structure", []);
23
+ if (seen.has(obj)) throw new chunkY3UPKP2B_js.ValidationError("Cannot canonicalize circular structure", []);
24
24
  seen.add(obj);
25
25
  try {
26
26
  if (Array.isArray(obj)) return `[${obj.map((e) => encode(e) ?? "null").join(",")}]`;
@@ -1,5 +1,5 @@
1
- import { SCHEMA_LIMITS, iconNameSchema } from './chunk-UW3BOSB6.mjs';
2
- import { ValidationError } from './chunk-7WEOBXXA.mjs';
1
+ import { SCHEMA_LIMITS, iconNameSchema } from './chunk-GRUSTQK3.mjs';
2
+ import { ValidationError } from './chunk-Z5OPSBMQ.mjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  // src/types/system-attributes.ts
@@ -153,6 +153,13 @@ var FORMULA_OPERATORS = [
153
153
  "is_empty",
154
154
  "is_not_empty"
155
155
  ];
156
+ var LOCATION_FILTER_PROPERTIES = ["city", "postalCode", "country"];
157
+ function isLocationFilterProperty(name) {
158
+ return LOCATION_FILTER_PROPERTIES.includes(name);
159
+ }
160
+ function isLocationPartOperator(operator) {
161
+ return TEXT_OPERATORS.includes(operator);
162
+ }
156
163
  var ATTRIBUTE_FILTER_OPERATORS = {
157
164
  text: TEXT_OPERATORS,
158
165
  richtext: [],
@@ -531,10 +538,12 @@ var SYNONYM_ALIASES = {
531
538
  // set
532
539
  in: "any_of",
533
540
  isAnyOf: "any_of",
541
+ anyOf: "any_of",
534
542
  oneOf: "any_of",
535
543
  notIn: "none_of",
536
544
  not_in: "none_of",
537
545
  isNoneOf: "none_of",
546
+ noneOf: "none_of",
538
547
  notOneOf: "none_of",
539
548
  // text
540
549
  startsWith: "starts_with",
@@ -708,6 +717,10 @@ function assertDynamicValueForAttribute(rule, attrType) {
708
717
  throw new ValidationError(m, [{ path: ["value"], message: m }]);
709
718
  }
710
719
  }
720
+ var LOCATION_PARTS_LIST = LOCATION_FILTER_PROPERTIES.map((part) => `"${part}"`).join(", ");
721
+ function locationPartsHint(type) {
722
+ return type === "location" ? ` A location is filtered on one of its parts: set "property" to one of ${LOCATION_PARTS_LIST} and use a text operator (e.g. contains).` : "";
723
+ }
711
724
  function collectQualifiedRuleIssues(rule, context) {
712
725
  try {
713
726
  validateQualifiedRule({ ...rule }, context);
@@ -721,9 +734,11 @@ function validateQualifiedRule(rule, context) {
721
734
  const rootAttr = context.attributes.find((a) => a.name === rule.attribute);
722
735
  const systemOps = SYSTEM_FILTER_OPERATORS[rule.attribute];
723
736
  if (!(rootAttr || systemOps)) {
724
- throw new ValidationError(`Unknown attribute: ${rule.attribute}`, [
725
- { path: ["attribute"], message: `Unknown attribute: ${rule.attribute}` }
726
- ]);
737
+ const [head, ...tail] = rule.attribute.split(".");
738
+ const dottedRoot = tail.length > 0 ? context.attributes.find((a) => a.name === head) : void 0;
739
+ const dottedHint = dottedRoot?.type === "location" ? ` Dotted paths are not supported \u2014 set "attribute" to "${head}" and "property" to ${isLocationFilterProperty(tail[0] ?? "") ? `"${tail[0]}"` : `one of ${LOCATION_PARTS_LIST}`}.` : rule.attribute.includes(".") ? ' Dotted paths are not supported \u2014 filter on the attribute name alone, or use the full-text "query" parameter to match text inside a value.' : "";
740
+ const m = `Unknown attribute: ${rule.attribute}${dottedHint}`;
741
+ throw new ValidationError(m, [{ path: ["attribute"], message: m }]);
727
742
  }
728
743
  if (rule.quantifier !== void 0 && !rule.property) {
729
744
  const m = `quantifier is only valid on qualified edge rules (set "property")`;
@@ -750,12 +765,26 @@ function validateQualifiedRule(rule, context) {
750
765
  const normalizedOperator2 = resolveCanonicalOperator(rule.operator, rootAttr.type);
751
766
  if (!ops.includes(normalizedOperator2)) {
752
767
  const validList = ops.length ? ops.join(", ") : "(not filterable)";
753
- const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.`;
768
+ const summary = `Operator "${rule.operator}" is not valid for attribute "${rootAttr.name}". Valid operators: ${validList}.${locationPartsHint(rootAttr.type)}`;
754
769
  throw new ValidationError(summary, [{ path: ["operator"], message: summary }]);
755
770
  }
756
771
  applyCanonicalForm(rule, normalizedOperator2, resolveEffectiveFilterType(rootAttr));
757
772
  return;
758
773
  }
774
+ if (rootAttr.type === "location") {
775
+ if (rule.quantifier !== void 0) {
776
+ const m = "quantifier is not valid on a location part \u2014 a location is one value, not a set of edges";
777
+ throw new ValidationError(m, [{ path: ["quantifier"], message: m }]);
778
+ }
779
+ if (!isLocationFilterProperty(rule.property)) {
780
+ const m = `Property "${rule.property}" is not a part of location "${rule.attribute}". Valid parts: ${LOCATION_PARTS_LIST}.`;
781
+ throw new ValidationError(m, [{ path: ["property"], message: m }]);
782
+ }
783
+ assertDynamicValueForAttribute(rule, "text");
784
+ const normalizedOperator2 = assertOperatorForType(rule.operator, "text", "property");
785
+ applyCanonicalForm(rule, normalizedOperator2, "text");
786
+ return;
787
+ }
759
788
  if (!REFERENCE_TYPES.has(rootAttr.type)) {
760
789
  throw new ValidationError(`Cannot qualify ${rootAttr.type} attribute "${rule.attribute}"`, [
761
790
  { path: ["property"], message: `Attribute "${rule.attribute}" is not a reference type` }
@@ -820,6 +849,9 @@ var RESERVED_OBJECT_NAMES = ["skill"];
820
849
  var createModeSchema = z.enum(["redirect", "inline", "peek"]);
821
850
  var nonEmptyStringArraySchema = z.array(z.string()).min(1);
822
851
  var columnsSchema = z.array(z.string()).max(SCHEMA_LIMITS.columnsPerTab);
852
+ var displayAttributesSchema = z.array(z.string().min(1)).max(SCHEMA_LIMITS.columnsPerTab).refine((names) => new Set(names).size === names.length, {
853
+ message: "Displayed attribute names must be unique"
854
+ });
823
855
  var sortRuleSchema = z.object({
824
856
  attribute: z.string(),
825
857
  direction: z.enum(["asc", "desc"])
@@ -1260,6 +1292,8 @@ var listTabCommonShape = {
1260
1292
  // required so configs stored before the field existed still parse.
1261
1293
  visibility: z.enum(LIST_VIEW_TAB_VISIBILITIES).default("all"),
1262
1294
  columns: columnsSchema,
1295
+ descriptionAttribute: z.string().min(1).optional(),
1296
+ displayAttributes: displayAttributesSchema.optional(),
1263
1297
  filters: filterGroupSchema.optional(),
1264
1298
  sorts: sortsSchema.optional(),
1265
1299
  readOnly: z.boolean().optional(),
@@ -1268,11 +1302,15 @@ var listTabCommonShape = {
1268
1302
  var listTableTabSchema = z.object({
1269
1303
  ...listTabCommonShape,
1270
1304
  layout: z.literal("table"),
1271
- columnSizing: z.record(z.string(), z.number()).optional()
1305
+ columnSizing: z.record(z.string(), z.number()).optional(),
1306
+ // Opted-in system views expose their immutable code grouping as an inert
1307
+ // hint so Architect can return to Kanban after a saved layout change.
1308
+ groupByAttribute: z.string().min(1).optional()
1272
1309
  }).strict();
1273
1310
  var listKanbanTabSchema = z.object({
1274
1311
  ...listTabCommonShape,
1275
1312
  layout: z.literal("kanban"),
1313
+ columns: columnsSchema.default([]),
1276
1314
  groupByAttribute: z.string(),
1277
1315
  cardUserAttribute: z.string().optional(),
1278
1316
  cardDateAttribute: z.string().optional(),
@@ -1280,17 +1318,33 @@ var listKanbanTabSchema = z.object({
1280
1318
  kanbanColumnVisibility: z.record(z.string(), z.boolean()).optional(),
1281
1319
  kanbanPinnedColumns: z.array(z.string()).optional()
1282
1320
  }).strict();
1321
+ var listRowsTabSchema = z.object({
1322
+ ...listTabCommonShape,
1323
+ layout: z.literal("list"),
1324
+ columns: columnsSchema.default([]),
1325
+ columnSizing: z.record(z.string(), z.number()).optional(),
1326
+ groupByAttribute: z.string().min(1).optional()
1327
+ }).strict();
1283
1328
  var listViewTabSchema = z.discriminatedUnion("layout", [
1284
1329
  listTableTabSchema,
1330
+ listRowsTabSchema,
1285
1331
  listKanbanTabSchema
1286
1332
  ]);
1287
1333
  var _listViewConfigSchema = z.object({
1334
+ allowPresentationCustomization: z.boolean().optional(),
1288
1335
  defaultFilters: filterGroupSchema.optional(),
1289
1336
  tabs: z.array(listViewTabSchema).min(1).max(SCHEMA_LIMITS.tabsPerView)
1290
1337
  }).strict().superRefine((config, ctx) => {
1291
1338
  addDuplicateIdIssues(config.tabs, ctx, ["tabs"]);
1292
1339
  let hasDefault = false;
1293
1340
  config.tabs.forEach((tab, index) => {
1341
+ if (tab.layout !== "kanban" && tab.groupByAttribute !== void 0 && config.allowPresentationCustomization !== true) {
1342
+ ctx.addIssue({
1343
+ code: "unrecognized_keys",
1344
+ keys: ["groupByAttribute"],
1345
+ path: ["tabs", index]
1346
+ });
1347
+ }
1294
1348
  if (!tab.default) return;
1295
1349
  if (hasDefault) {
1296
1350
  ctx.addIssue({
@@ -1375,4 +1429,4 @@ var LIST_TAB_KANBAN_KEYS = [
1375
1429
  "kanbanPinnedColumns"
1376
1430
  ];
1377
1431
 
1378
- export { ATTRIBUTE_FILTER_OPERATORS, LIST_TAB_KANBAN_KEYS, LIST_TAB_TABLE_KEYS, LIST_VIEW_TAB_VISIBILITIES, NO_VALUE_OPERATORS, OPERATORS_BY_TYPE, REMOVED_OPERATOR_REPLACEMENTS, RESERVED_ATTRIBUTE_NAMES, RESERVED_OBJECT_NAMES, RESOURCE_VISIBILITIES, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FIELD_NAMES, SYSTEM_FILTER_ATTRIBUTE_TYPES, canonicalizeFilterValue, collectQualifiedRuleIssues, columnsSchema, currentActor, detailTabDraftSchema, detailTabSchema, detailViewConfigSchema, extractCurrencyFilterValue, extractFilterValue, fieldSchema, fieldShape, fieldSlotSchema, filterGroupSchema, filterStateSchema, getAttributeCapabilities, getAttributeFilterOperators, getOperatorPolarity, getRollupFilterOperators2 as getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, groupWriteSchema, inverseSourceSchema, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isAttributeSortable, isDynamicValue, isManagedSystemAttribute, isNoValueOperator, isRelativeDateValue, isSetMembershipOperator, listViewConfigSchema, listViewTabSchema, normalizeFilterRule, normalizeForEdgeRpc, normalizeOperator, now, parseResourceVisibility, parseViewConfig, relationSourceSchema, resolveEffectiveFilterType, resolveIsWithinBounds, resolveUtcDayBounds, sortsSchema, tableSourceSchema, toMultiValueOperator, toUtcDayString, today, validateQualifiedRule, viewConfigByTypeSchema, viewTypeSchema };
1432
+ export { ATTRIBUTE_FILTER_OPERATORS, LIST_TAB_KANBAN_KEYS, LIST_TAB_TABLE_KEYS, LIST_VIEW_TAB_VISIBILITIES, LOCATION_FILTER_PROPERTIES, NO_VALUE_OPERATORS, OPERATORS_BY_TYPE, REMOVED_OPERATOR_REPLACEMENTS, RESERVED_ATTRIBUTE_NAMES, RESERVED_OBJECT_NAMES, RESOURCE_VISIBILITIES, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FIELD_NAMES, SYSTEM_FILTER_ATTRIBUTE_TYPES, canonicalizeFilterValue, collectQualifiedRuleIssues, columnsSchema, currentActor, detailTabDraftSchema, detailTabSchema, detailViewConfigSchema, displayAttributesSchema, extractCurrencyFilterValue, extractFilterValue, fieldSchema, fieldShape, fieldSlotSchema, filterGroupSchema, filterStateSchema, getAttributeCapabilities, getAttributeFilterOperators, getOperatorPolarity, getRollupFilterOperators2 as getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, groupWriteSchema, inverseSourceSchema, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isAttributeSortable, isDynamicValue, isLocationFilterProperty, isLocationPartOperator, isManagedSystemAttribute, isNoValueOperator, isRelativeDateValue, isSetMembershipOperator, listViewConfigSchema, listViewTabSchema, normalizeFilterRule, normalizeForEdgeRpc, normalizeOperator, now, parseResourceVisibility, parseViewConfig, relationSourceSchema, resolveEffectiveFilterType, resolveIsWithinBounds, resolveUtcDayBounds, sortsSchema, tableSourceSchema, toMultiValueOperator, toUtcDayString, today, validateQualifiedRule, viewConfigByTypeSchema, viewTypeSchema };
@@ -1,4 +1,4 @@
1
- import { ValidationError } from './chunk-7WEOBXXA.mjs';
1
+ import { ValidationError } from './chunk-Z5OPSBMQ.mjs';
2
2
 
3
3
  // src/utils/canonical-json.ts
4
4
  function canonicalStringify(value) {
@@ -139,11 +139,15 @@ var SchemaErrorCode = {
139
139
  AGENT_WORK_MODE_REQUIRED: "AGENT_WORK_MODE_REQUIRED",
140
140
  AGENT_MESSAGE_NOT_FOUND: "AGENT_MESSAGE_NOT_FOUND",
141
141
  AGENT_MESSAGE_NOT_EDITABLE: "AGENT_MESSAGE_NOT_EDITABLE",
142
+ // Remote devices
143
+ DEVICE_NOT_FOUND: "DEVICE_NOT_FOUND",
144
+ DEVICE_OFFLINE: "DEVICE_OFFLINE",
142
145
  // AI / LLM
143
146
  AI_UNKNOWN: "AI_UNKNOWN",
144
147
  AI_USAGE_LIMIT_EXCEEDED: "AI_USAGE_LIMIT_EXCEEDED",
145
148
  AI_INVALID_USAGE: "AI_INVALID_USAGE",
146
149
  AI_INVALID_MODEL: "AI_INVALID_MODEL",
150
+ AI_INVALID_MODEL_INPUT: "AI_INVALID_MODEL_INPUT",
147
151
  AI_REPOSITORY_ERROR: "AI_REPOSITORY_ERROR",
148
152
  AI_GENERATION_FAILED: "AI_GENERATION_FAILED",
149
153
  // Documents — attach/detach and file operations
@@ -137,11 +137,15 @@ var SchemaErrorCode = {
137
137
  AGENT_WORK_MODE_REQUIRED: "AGENT_WORK_MODE_REQUIRED",
138
138
  AGENT_MESSAGE_NOT_FOUND: "AGENT_MESSAGE_NOT_FOUND",
139
139
  AGENT_MESSAGE_NOT_EDITABLE: "AGENT_MESSAGE_NOT_EDITABLE",
140
+ // Remote devices
141
+ DEVICE_NOT_FOUND: "DEVICE_NOT_FOUND",
142
+ DEVICE_OFFLINE: "DEVICE_OFFLINE",
140
143
  // AI / LLM
141
144
  AI_UNKNOWN: "AI_UNKNOWN",
142
145
  AI_USAGE_LIMIT_EXCEEDED: "AI_USAGE_LIMIT_EXCEEDED",
143
146
  AI_INVALID_USAGE: "AI_INVALID_USAGE",
144
147
  AI_INVALID_MODEL: "AI_INVALID_MODEL",
148
+ AI_INVALID_MODEL_INPUT: "AI_INVALID_MODEL_INPUT",
145
149
  AI_REPOSITORY_ERROR: "AI_REPOSITORY_ERROR",
146
150
  AI_GENERATION_FAILED: "AI_GENERATION_FAILED",
147
151
  // Documents — attach/detach and file operations
@@ -96,10 +96,13 @@ declare const SchemaErrorCode: {
96
96
  readonly AGENT_WORK_MODE_REQUIRED: "AGENT_WORK_MODE_REQUIRED";
97
97
  readonly AGENT_MESSAGE_NOT_FOUND: "AGENT_MESSAGE_NOT_FOUND";
98
98
  readonly AGENT_MESSAGE_NOT_EDITABLE: "AGENT_MESSAGE_NOT_EDITABLE";
99
+ readonly DEVICE_NOT_FOUND: "DEVICE_NOT_FOUND";
100
+ readonly DEVICE_OFFLINE: "DEVICE_OFFLINE";
99
101
  readonly AI_UNKNOWN: "AI_UNKNOWN";
100
102
  readonly AI_USAGE_LIMIT_EXCEEDED: "AI_USAGE_LIMIT_EXCEEDED";
101
103
  readonly AI_INVALID_USAGE: "AI_INVALID_USAGE";
102
104
  readonly AI_INVALID_MODEL: "AI_INVALID_MODEL";
105
+ readonly AI_INVALID_MODEL_INPUT: "AI_INVALID_MODEL_INPUT";
103
106
  readonly AI_REPOSITORY_ERROR: "AI_REPOSITORY_ERROR";
104
107
  readonly AI_GENERATION_FAILED: "AI_GENERATION_FAILED";
105
108
  readonly DOCUMENT_MIME_NOT_ACCEPTED: "DOCUMENT_MIME_NOT_ACCEPTED";
@@ -96,10 +96,13 @@ declare const SchemaErrorCode: {
96
96
  readonly AGENT_WORK_MODE_REQUIRED: "AGENT_WORK_MODE_REQUIRED";
97
97
  readonly AGENT_MESSAGE_NOT_FOUND: "AGENT_MESSAGE_NOT_FOUND";
98
98
  readonly AGENT_MESSAGE_NOT_EDITABLE: "AGENT_MESSAGE_NOT_EDITABLE";
99
+ readonly DEVICE_NOT_FOUND: "DEVICE_NOT_FOUND";
100
+ readonly DEVICE_OFFLINE: "DEVICE_OFFLINE";
99
101
  readonly AI_UNKNOWN: "AI_UNKNOWN";
100
102
  readonly AI_USAGE_LIMIT_EXCEEDED: "AI_USAGE_LIMIT_EXCEEDED";
101
103
  readonly AI_INVALID_USAGE: "AI_INVALID_USAGE";
102
104
  readonly AI_INVALID_MODEL: "AI_INVALID_MODEL";
105
+ readonly AI_INVALID_MODEL_INPUT: "AI_INVALID_MODEL_INPUT";
103
106
  readonly AI_REPOSITORY_ERROR: "AI_REPOSITORY_ERROR";
104
107
  readonly AI_GENERATION_FAILED: "AI_GENERATION_FAILED";
105
108
  readonly DOCUMENT_MIME_NOT_ACCEPTED: "DOCUMENT_MIME_NOT_ACCEPTED";