@granular-software/sdk 0.4.26 → 0.4.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -13114,10 +13114,15 @@ external_exports.union([
13114
13114
  scalarType: external_exports.string().optional()
13115
13115
  }).strict()
13116
13116
  ]);
13117
+ external_exports.union([
13118
+ external_exports.boolean(),
13119
+ external_exports.object({
13120
+ enabled: external_exports.boolean().optional(),
13121
+ phonetic: external_exports.boolean().optional()
13122
+ }).strict()
13123
+ ]);
13117
13124
  external_exports.object({
13118
- operator: external_exports.enum(
13119
- [...VALIDATION_RULE_OPERATORS]
13120
- ),
13125
+ operator: external_exports.enum([...VALIDATION_RULE_OPERATORS]),
13121
13126
  stringValue: external_exports.string().optional(),
13122
13127
  numberValue: external_exports.number().optional(),
13123
13128
  booleanValue: external_exports.boolean().optional(),
@@ -13210,12 +13215,18 @@ function collectMetamodelSummarySelections(packages) {
13210
13215
  const propertyFields = [];
13211
13216
  const methodFields = [];
13212
13217
  for (const metamodelPackage of packages) {
13213
- pushUnique(classFields, metamodelPackage.summary.selections?.classFields || []);
13218
+ pushUnique(
13219
+ classFields,
13220
+ metamodelPackage.summary.selections?.classFields || []
13221
+ );
13214
13222
  pushUnique(
13215
13223
  propertyFields,
13216
13224
  metamodelPackage.summary.selections?.propertyFields || []
13217
13225
  );
13218
- pushUnique(methodFields, metamodelPackage.summary.selections?.methodFields || []);
13226
+ pushUnique(
13227
+ methodFields,
13228
+ metamodelPackage.summary.selections?.methodFields || []
13229
+ );
13219
13230
  }
13220
13231
  return {
13221
13232
  classFields: unique(classFields),
@@ -13303,7 +13314,11 @@ function createMetamodelRegistry(metamodelPackages) {
13303
13314
  return collectMetamodelSummarySelections(packages);
13304
13315
  },
13305
13316
  applyClassSummaryReaders(rawClass, classSummary) {
13306
- return applyMetamodelSummaryReadersToClass(packages, rawClass, classSummary);
13317
+ return applyMetamodelSummaryReadersToClass(
13318
+ packages,
13319
+ rawClass,
13320
+ classSummary
13321
+ );
13307
13322
  },
13308
13323
  applyPropertySummaryReaders(rawProperty, propertySummary) {
13309
13324
  return applyMetamodelSummaryReadersToProperty(
@@ -13313,7 +13328,11 @@ function createMetamodelRegistry(metamodelPackages) {
13313
13328
  );
13314
13329
  },
13315
13330
  applyMethodSummaryReaders(rawMethod, methodSummary) {
13316
- return applyMetamodelSummaryReadersToMethod(packages, rawMethod, methodSummary);
13331
+ return applyMetamodelSummaryReadersToMethod(
13332
+ packages,
13333
+ rawMethod,
13334
+ methodSummary
13335
+ );
13317
13336
  },
13318
13337
  applyClassIR(classIR, classSummary) {
13319
13338
  return applyMetamodelClassIR(packages, classIR, classSummary);
@@ -13361,6 +13380,10 @@ function mergeClassSummaryPatch(target, patch) {
13361
13380
  }
13362
13381
  function mergePropertySummaryPatch(target, patch) {
13363
13382
  pushUnique(target.notes, patch.notes || []);
13383
+ if (patch.searchable !== void 0) target.searchable = patch.searchable;
13384
+ if (patch.searchablePhonetic !== void 0) {
13385
+ target.searchablePhonetic = patch.searchablePhonetic;
13386
+ }
13364
13387
  if (patch.required !== void 0) target.required = patch.required;
13365
13388
  if (patch.enumRule !== void 0) target.enumRule = patch.enumRule;
13366
13389
  if (patch.filterBy !== void 0) target.filterBy = patch.filterBy;
@@ -13372,9 +13395,11 @@ function mergeMethodSummaryPatch(target, patch) {
13372
13395
  if (patch.effectKey !== void 0) target.effectKey = patch.effectKey;
13373
13396
  if (patch.description !== void 0) target.description = patch.description;
13374
13397
  if (patch.inputSchema !== void 0) target.inputSchema = patch.inputSchema;
13375
- if (patch.outputSchema !== void 0) target.outputSchema = patch.outputSchema;
13398
+ if (patch.outputSchema !== void 0)
13399
+ target.outputSchema = patch.outputSchema;
13376
13400
  if (patch.metamodels !== void 0) target.metamodels = patch.metamodels;
13377
- if (patch.effectBehaviors !== void 0) target.effectBehaviors = patch.effectBehaviors;
13401
+ if (patch.effectBehaviors !== void 0)
13402
+ target.effectBehaviors = patch.effectBehaviors;
13378
13403
  if (patch.static !== void 0) target.static = patch.static;
13379
13404
  }
13380
13405
  function toPascalCase2(value) {
@@ -13777,12 +13802,20 @@ function defaultFilterOperators(scalarType) {
13777
13802
  switch ((scalarType || "").toLowerCase()) {
13778
13803
  case "number":
13779
13804
  case "date":
13780
- return ["equal_to", "greater_than", "less_than", "not_null"];
13805
+ return [
13806
+ "equal_to",
13807
+ "greater_than",
13808
+ "greater_than_or_equal_to",
13809
+ "less_than",
13810
+ "less_than_or_equal_to",
13811
+ "not_null"
13812
+ ];
13781
13813
  case "boolean":
13782
- return ["equal_to", "not_null"];
13814
+ return ["equal_to", "true", "false", "not_null"];
13783
13815
  default:
13784
13816
  return [
13785
13817
  "equal_to",
13818
+ "in",
13786
13819
  "contains",
13787
13820
  "not_contains",
13788
13821
  "starts_with",
@@ -13791,16 +13824,26 @@ function defaultFilterOperators(scalarType) {
13791
13824
  ];
13792
13825
  }
13793
13826
  }
13827
+ function supportsDefaultFilterBy(scalarType) {
13828
+ return ["string", "number", "boolean", "date"].includes(
13829
+ String(scalarType || "").toLowerCase()
13830
+ );
13831
+ }
13794
13832
  function normalizeFilterByInput(filterBy, scalarType) {
13795
- if (!filterBy) return null;
13833
+ if (filterBy === false) return null;
13834
+ if (filterBy === void 0) {
13835
+ if (!supportsDefaultFilterBy(scalarType)) return null;
13836
+ return { operators: defaultFilterOperators(scalarType), scalarType };
13837
+ }
13796
13838
  if (filterBy === true) {
13797
- return { operators: defaultFilterOperators(scalarType) };
13839
+ return { operators: defaultFilterOperators(scalarType), scalarType };
13798
13840
  }
13799
13841
  if (Array.isArray(filterBy)) {
13800
- return { operators: filterBy };
13842
+ return { operators: filterBy, scalarType };
13801
13843
  }
13802
13844
  return {
13803
- operators: filterBy.operators
13845
+ operators: filterBy.operators,
13846
+ scalarType: filterBy.scalarType || scalarType
13804
13847
  };
13805
13848
  }
13806
13849
  function buildFilterByFieldMutations(fieldPath, filterBy, scalarType) {
@@ -13811,7 +13854,7 @@ function buildFilterByFieldMutations(fieldPath, filterBy, scalarType) {
13811
13854
  label: `set filterBy on ${fieldPath}`,
13812
13855
  query: `mutation { at(path: ${JSON.stringify(fieldPath)}) { set_filter_by(operators: ${JSON.stringify(
13813
13856
  normalized.operators
13814
- )}) { operators } } }`
13857
+ )}${normalized.scalarType ? `, scalar_type: ${JSON.stringify(normalized.scalarType)}` : ""}) { operators } } }`
13815
13858
  }
13816
13859
  ];
13817
13860
  }
@@ -13821,7 +13864,7 @@ var filterByMetamodelPackage = defineMetamodelPackage({
13821
13864
  fieldRows: [
13822
13865
  {
13823
13866
  key: "filterBy",
13824
- description: "Exposes filter operators for generated query surfaces. Accepts `true`, an operator array, or `{ operators, scalarType }`."
13867
+ description: "Exposes filter operators for generated query surfaces. Scalar fields are filterable by default; set `filterBy: false` to opt out, or override with `true`, an operator array, or `{ operators, scalarType }`."
13825
13868
  }
13826
13869
  ]
13827
13870
  },
@@ -14085,6 +14128,123 @@ var requiredMetamodelPackage = defineMetamodelPackage({
14085
14128
  }
14086
14129
  });
14087
14130
 
14131
+ // ../metamodel-searchable/src/index.ts
14132
+ function supportsDefaultSearchable(scalarType) {
14133
+ return String(scalarType || "").toLowerCase() === "string";
14134
+ }
14135
+ function normalizeSearchableInput(searchable, scalarType) {
14136
+ if (!supportsDefaultSearchable(scalarType)) return null;
14137
+ if (typeof searchable === "boolean" || searchable === void 0) {
14138
+ return {
14139
+ enabled: searchable !== false,
14140
+ phonetic: false
14141
+ };
14142
+ }
14143
+ const enabled = searchable.enabled !== false;
14144
+ return {
14145
+ enabled,
14146
+ phonetic: enabled && searchable.phonetic === true
14147
+ };
14148
+ }
14149
+ function buildSearchableFieldMutations(fieldPath, searchable, scalarType) {
14150
+ const normalized = normalizeSearchableInput(searchable, scalarType);
14151
+ if (normalized === null) return [];
14152
+ return [
14153
+ {
14154
+ label: `set searchable on ${fieldPath}`,
14155
+ query: `mutation { at(path: ${JSON.stringify(fieldPath)}) { set_searchable(enabled: ${normalized.enabled}, phonetic: ${normalized.phonetic}) { enabled phonetic } } }`
14156
+ }
14157
+ ];
14158
+ }
14159
+ var searchableMetamodelPackage = defineMetamodelPackage({
14160
+ id: "searchable",
14161
+ docs: {
14162
+ fieldRows: [
14163
+ {
14164
+ key: "searchable",
14165
+ description: "Controls full-text search exposure for string fields. String fields are searchable by default; set `searchable: false` to opt out, or use `searchable: { phonetic: true }` to keep the field searchable while enabling FalkorDB phonetic matching for class-wide search."
14166
+ }
14167
+ ]
14168
+ },
14169
+ graphql: {
14170
+ typeDefs: [
14171
+ `
14172
+ type SearchableMetamodel {
14173
+ model: Model!
14174
+ enabled: Boolean!
14175
+ phonetic: Boolean!
14176
+ }
14177
+
14178
+ extend type Model {
14179
+ searchable: SearchableMetamodel
14180
+ }
14181
+
14182
+ extend type ModelMutation {
14183
+ set_searchable(enabled: Boolean!, phonetic: Boolean): SearchableMetamodel
14184
+ }
14185
+ `
14186
+ ],
14187
+ createResolvers({ run }) {
14188
+ return {
14189
+ SearchableMetamodel: {
14190
+ model: (value) => value.model,
14191
+ enabled: (value) => value.enabled !== false,
14192
+ phonetic: (value) => value.phonetic === true
14193
+ },
14194
+ Model: {
14195
+ searchable: async (ant) => await run(ant.searchable())
14196
+ },
14197
+ ModelMutation: {
14198
+ set_searchable: async (ant, { enabled, phonetic }) => {
14199
+ return {
14200
+ model: await run(ant.set_searchable(enabled, phonetic === true)),
14201
+ enabled,
14202
+ phonetic: phonetic === true
14203
+ };
14204
+ }
14205
+ }
14206
+ };
14207
+ }
14208
+ },
14209
+ manifest: {
14210
+ buildFieldMutations(fieldPath, spec) {
14211
+ return buildSearchableFieldMutations(
14212
+ fieldPath,
14213
+ spec.searchable,
14214
+ spec.type
14215
+ );
14216
+ }
14217
+ },
14218
+ summary: {
14219
+ selections: {
14220
+ propertyFields: [`searchable { enabled phonetic }`]
14221
+ },
14222
+ readPropertySummary(rawProperty) {
14223
+ if (typeof rawProperty.searchable?.enabled !== "boolean") {
14224
+ return {};
14225
+ }
14226
+ return {
14227
+ searchable: rawProperty.searchable.enabled,
14228
+ searchablePhonetic: rawProperty.searchable.phonetic === true
14229
+ };
14230
+ }
14231
+ },
14232
+ domain: {
14233
+ applyToPropertyIR(propertyIR, propertySummary) {
14234
+ if (String(propertySummary.type || "").toLowerCase() !== "string" || propertySummary.searchable === false) {
14235
+ return propertyIR;
14236
+ }
14237
+ return {
14238
+ ...propertyIR,
14239
+ docs: [
14240
+ ...propertyIR.docs,
14241
+ propertySummary.searchablePhonetic ? "Searchable via `search` using FalkorDB full-text query syntax with phonetic matching enabled." : "Searchable via `search` using FalkorDB full-text query syntax."
14242
+ ]
14243
+ };
14244
+ }
14245
+ }
14246
+ });
14247
+
14088
14248
  // ../metamodel-state-machine/src/index.ts
14089
14249
  function normalizeStateMachines(values) {
14090
14250
  return (values || []).map((machine) => {
@@ -14665,6 +14825,7 @@ var DEFAULT_METAMODEL_PACKAGES = [
14665
14825
  requiredMetamodelPackage,
14666
14826
  enumMetamodelPackage,
14667
14827
  filterByMetamodelPackage,
14828
+ searchableMetamodelPackage,
14668
14829
  validationRuleMetamodelPackage,
14669
14830
  stateMachineMetamodelPackage,
14670
14831
  effectBehaviorsMetamodelPackage
@@ -14838,6 +14999,7 @@ Scalar fields can carry lightweight metamodels directly in their field spec:
14838
14999
  "type": "string",
14839
15000
  "required": true,
14840
15001
  "note": "Must use the canonical prefix",
15002
+ "searchable": { "phonetic": true },
14841
15003
  "filterBy": true,
14842
15004
  "validate": [
14843
15005
  { "operator": "regex", "stringValue": "^TKT-[A-Z0-9-]+$" }
@@ -14858,11 +15020,27 @@ Scalar fields can carry lightweight metamodels directly in their field spec:
14858
15020
  { "operator": "gt", "numberValue": 0 },
14859
15021
  { "operator": "lt", "numberValue": 100 }
14860
15022
  ]
15023
+ },
15024
+ "internal_code": {
15025
+ "type": "string",
15026
+ "description": "Opaque implementation detail",
15027
+ "searchable": false,
15028
+ "filterBy": false
14861
15029
  }
14862
15030
  }
14863
15031
  }
14864
15032
  \`\`\`
14865
15033
 
15034
+ Scalar fields are filterable by default. Set \`"filterBy": false\` only when a field should not appear in generated filter surfaces.
15035
+ String fields are searchable by default. Set \`"searchable": false\` only when a field should be excluded from generated full-text search surfaces and heavy full-text indexes.
15036
+ \`search\` is broad class-wide retrieval across all searchable string fields of a class. It is not a field-scoped operator. Use \`filter\` for exact field-specific constraints, and combine \`search\` + \`filter\` when you need both flexible text matching and exact structure.
15037
+ Runtime note: class-wide \`search\` is implemented as one denormalized full-text search document per class instance, built from that instance's searchable string fields. Exact field constraints still belong in \`filter\`.
15038
+ Preferred search ladder: start with plain text such as \`find({ search: "example name" })\`. If results are empty or ambiguous, retry with RediSearch-style fuzzy / prefix / OR operators. Add \`filter\` only when you need exact structural narrowing.
15039
+ Plain string \`search\` is normalized for human text before it reaches full-text search, so case, punctuation, repeated whitespace, and diacritics do not need to be manually enumerated in agent code.
15040
+ Do not manually enumerate capitalization / punctuation / spacing variants in agent code. Use plain \`search\` first, then escalate to fuzzy / prefix / OR operators only if the first pass is empty or ambiguous.
15041
+ Optional indexing note: \`"searchable": { "phonetic": true }\` keeps the field searchable and enables FalkorDB phonetic matching for the class-wide search index. Query syntax does not change; agents should keep using normal \`search\` strings.
15042
+ Without an explicit sort, indexed \`search\` results are returned in FalkorDB relevance order. If you pass a sort, that explicit sort takes precedence.
15043
+
14866
15044
  Supported field metamodel keys:
14867
15045
 
14868
15046
  ${fieldMetamodelTable}
@@ -18522,9 +18700,24 @@ var Session = class {
18522
18700
  * Get domain documentation for LLMs. Returns types (preferred) or fallback.
18523
18701
  */
18524
18702
  async getDomainDocumentation() {
18525
- const types = await this.getDomainTypes();
18526
- if (types && (types.includes("export declare class") || types.includes("export async function"))) {
18527
- return types;
18703
+ const [types, docs] = await Promise.all([
18704
+ this.getDomainTypes(),
18705
+ this.getDomainDocs()
18706
+ ]);
18707
+ const normalizedTypes = types.trim();
18708
+ const normalizedDocs = docs.trim();
18709
+ if (normalizedTypes && (normalizedTypes.includes("export declare class") || normalizedTypes.includes("export async function"))) {
18710
+ if (!normalizedDocs) {
18711
+ return normalizedTypes;
18712
+ }
18713
+ return [
18714
+ normalizedTypes,
18715
+ "Generated usage notes from ./sandbox-tools docs:",
18716
+ normalizedDocs
18717
+ ].join("\n\n");
18718
+ }
18719
+ if (normalizedDocs) {
18720
+ return normalizedDocs;
18528
18721
  }
18529
18722
  const summary = await this.getDomain();
18530
18723
  return this.generateFallbackDocs(summary);
@@ -9,7 +9,7 @@ import { Doc } from '@automerge/automerge/slim';
9
9
  * Configuration for the Granular client
10
10
  */
11
11
  type AccessTokenProvider = () => Promise<string | null | undefined> | string | null | undefined;
12
- type EndpointMode = 'auto' | 'local' | 'production';
12
+ type EndpointMode = "auto" | "local" | "production";
13
13
  interface GranularOptions {
14
14
  /** Your Granular API key (for service/CLI auth; use with GRANULAR_API_KEY) */
15
15
  apiKey?: string;
@@ -131,7 +131,7 @@ interface ConversationSessionInfo {
131
131
  environmentId: string;
132
132
  versionId?: string | null;
133
133
  docId: string;
134
- status: 'active' | 'closed' | 'expired';
134
+ status: "active" | "closed" | "expired";
135
135
  createdAt: string;
136
136
  lastSeenAt: string;
137
137
  summary?: string | null;
@@ -239,7 +239,7 @@ interface AssignmentListResponse {
239
239
  * pin themselves to one immutable ontology version.
240
240
  */
241
241
  interface BuildPolicy {
242
- mode: 'tag' | 'current' | 'pinned';
242
+ mode: "tag" | "current" | "pinned";
243
243
  buildId?: string;
244
244
  versionId?: string;
245
245
  tagId?: string;
@@ -250,7 +250,7 @@ interface VersionTag {
250
250
  tagId: string;
251
251
  sandboxId: string;
252
252
  name: string;
253
- kind: 'channel' | 'release' | 'system';
253
+ kind: "channel" | "release" | "system";
254
254
  targetBuildId?: string | null;
255
255
  targetVersionId?: string | null;
256
256
  description?: string | null;
@@ -275,7 +275,7 @@ interface EnvironmentData {
275
275
  tag?: VersionTag | null;
276
276
  tracking?: BuildPolicy;
277
277
  buildPolicy: BuildPolicy;
278
- updateState?: 'up_to_date' | 'update_available' | 'upgrading' | 'failed';
278
+ updateState?: "up_to_date" | "update_available" | "upgrading" | "failed";
279
279
  createdAt: number;
280
280
  updatedAt: number;
281
281
  }
@@ -324,7 +324,7 @@ interface Manifest {
324
324
  interface ManifestListResponse {
325
325
  items: Manifest[];
326
326
  }
327
- type BuildStatus = 'queued' | 'building' | 'completed' | 'failed' | 'canceled';
327
+ type BuildStatus = "queued" | "building" | "completed" | "failed" | "canceled";
328
328
  /**
329
329
  * An immutable ontology version derived from a specific manifest revision.
330
330
  *
@@ -359,8 +359,8 @@ interface BuildListResponse {
359
359
  }
360
360
  interface SemanticVersionDiffEntry {
361
361
  operationId: string;
362
- kind: 'create' | 'update' | 'relationship' | 'effect' | 'eventStream' | 'unknown';
363
- changeType: 'added' | 'removed' | 'changed';
362
+ kind: "create" | "update" | "relationship" | "effect" | "eventStream" | "unknown";
363
+ changeType: "added" | "removed" | "changed";
364
364
  label: string;
365
365
  additive: boolean;
366
366
  breaking: boolean;
@@ -422,7 +422,7 @@ interface ResolvedEffectBehaviors {
422
422
  reverse?: ResolvedEffectReverse;
423
423
  approvalRequired?: ResolvedEffectApprovalRequired;
424
424
  }
425
- type EffectInvocationMode = 'execute' | 'dryRun' | 'reverse';
425
+ type EffectInvocationMode = "execute" | "dryRun" | "reverse";
426
426
  interface EffectInvocationMetadata {
427
427
  mode?: EffectInvocationMode;
428
428
  reverseHandler?: string;
@@ -479,9 +479,9 @@ interface ToolSchema {
479
479
  * ```
480
480
  */
481
481
  outputSchema?: Record<string, unknown>;
482
- stability?: 'stable' | 'experimental' | 'deprecated';
482
+ stability?: "stable" | "experimental" | "deprecated";
483
483
  provenance?: {
484
- source: 'mcp' | 'custom';
484
+ source: "mcp" | "custom";
485
485
  };
486
486
  tags?: string[];
487
487
  /**
@@ -588,8 +588,8 @@ interface EffectsChangedEvent extends ToolsChangedEvent {
588
588
  }
589
589
  type EffectHandler = ToolHandler;
590
590
  type InstanceEffectHandler = InstanceToolHandler;
591
- type JobStatus = 'queued' | 'running' | 'awaitingTool' | 'awaitingHuman' | 'succeeded' | 'failed' | 'timeout' | 'canceled';
592
- type JobFeedbackSentiment = 'good' | 'bad';
591
+ type JobStatus = "queued" | "running" | "awaitingTool" | "awaitingHuman" | "succeeded" | "failed" | "timeout" | "canceled";
592
+ type JobFeedbackSentiment = "good" | "bad";
593
593
  interface JobFeedbackToolCall {
594
594
  callId?: string;
595
595
  toolName?: string;
@@ -601,7 +601,7 @@ interface JobFeedbackToolCall {
601
601
  durationMs?: number | null;
602
602
  }
603
603
  interface JobFeedbackMetadata {
604
- source: 'sdk';
604
+ source: "sdk";
605
605
  status: JobStatus;
606
606
  code: string;
607
607
  domainRevision?: string;
@@ -657,7 +657,7 @@ interface Job {
657
657
  }
658
658
  interface Prompt {
659
659
  id: string;
660
- type: 'confirm' | 'choice' | 'input';
660
+ type: "confirm" | "choice" | "input";
661
661
  title: string;
662
662
  message: string;
663
663
  options?: Array<string | {
@@ -676,7 +676,7 @@ interface ConversationMessageShowRefs {
676
676
  variableNames?: string[];
677
677
  }
678
678
  interface ConversationMessageInput {
679
- role: 'user' | 'assistant';
679
+ role: "user" | "assistant";
680
680
  content?: string;
681
681
  show?: ConversationMessageShowRefs;
682
682
  jobId?: string;
@@ -692,7 +692,7 @@ interface ConversationAppendResult {
692
692
  }
693
693
  interface SessionTranscriptEntry {
694
694
  id: string;
695
- role: 'user' | 'assistant';
695
+ role: "user" | "assistant";
696
696
  content: string;
697
697
  timestamp: number;
698
698
  jobId?: string;
@@ -703,9 +703,9 @@ interface SessionTranscriptEntry {
703
703
  error?: string;
704
704
  show?: ConversationMessageShowRefs;
705
705
  historyContent?: string;
706
- source: 'conversation' | 'job_code' | 'job_result' | 'job_prompt' | 'job_agent_message';
706
+ source: "conversation" | "job_code" | "job_result" | "job_prompt" | "job_agent_message";
707
707
  }
708
- type SessionHeapFieldType = 'string' | 'number' | 'boolean' | 'null' | 'unknown';
708
+ type SessionHeapFieldType = "string" | "number" | "boolean" | "null" | "unknown";
709
709
  interface SessionHeapFieldValue {
710
710
  name: string;
711
711
  type: SessionHeapFieldType;
@@ -733,7 +733,7 @@ interface SessionHeapList {
733
733
  }
734
734
  interface SessionHeapVariable {
735
735
  name: string;
736
- kind: 'entry' | 'list' | 'scalar';
736
+ kind: "entry" | "list" | "scalar";
737
737
  entryPath?: string;
738
738
  listName?: string;
739
739
  value?: string | number | boolean | null;
@@ -770,13 +770,13 @@ interface WSClientOptions {
770
770
  onReconnectError?: (info: WSReconnectErrorInfo) => void;
771
771
  }
772
772
  interface RPCRequest {
773
- type: 'rpc';
773
+ type: "rpc";
774
774
  method: string;
775
775
  params: unknown;
776
776
  id: string;
777
777
  }
778
778
  interface RPCResponse {
779
- type: 'rpc_result' | 'rpc_error';
779
+ type: "rpc_result" | "rpc_error";
780
780
  id: string;
781
781
  result?: unknown;
782
782
  error?: {
@@ -786,12 +786,12 @@ interface RPCResponse {
786
786
  };
787
787
  }
788
788
  interface SyncMessage {
789
- type: 'sync';
789
+ type: "sync";
790
790
  message?: string | number[] | Uint8Array;
791
791
  data?: number[];
792
792
  }
793
793
  interface RPCRequestFromServer {
794
- type: 'rpc';
794
+ type: "rpc";
795
795
  method: string;
796
796
  params: unknown;
797
797
  id: string;
@@ -835,7 +835,7 @@ interface RelationshipInfo {
835
835
  /** The foreign model type */
836
836
  foreign_model: ModelRef;
837
837
  /** Computed relationship kind: "one_to_one" | "one_to_many" | "many_to_one" | "many_to_many" */
838
- relationship_kind: 'one_to_one' | 'one_to_many' | 'many_to_one' | 'many_to_many';
838
+ relationship_kind: "one_to_one" | "one_to_many" | "many_to_one" | "many_to_many";
839
839
  }
840
840
  /**
841
841
  * Options for defining a relationship between two model types
@@ -934,8 +934,8 @@ interface RecordObjectsOptions {
934
934
  */
935
935
  onChunkComplete?: (info: RecordObjectsChunkInfo) => void | Promise<void>;
936
936
  }
937
- type RecordImportStatus = 'queued' | 'processing' | 'completed' | 'failed' | 'canceled';
938
- type RecordImportItemStatus = 'queued' | 'processing' | 'completed' | 'failed' | 'canceled';
937
+ type RecordImportStatus = "queued" | "processing" | "completed" | "failed" | "canceled";
938
+ type RecordImportItemStatus = "queued" | "processing" | "completed" | "failed" | "canceled";
939
939
  interface RecordImportStats {
940
940
  totalRecords: number;
941
941
  queuedRecords: number;
@@ -1000,10 +1000,14 @@ interface ManifestPropertySpec {
1000
1000
  required?: boolean;
1001
1001
  note?: string | string[];
1002
1002
  enum?: string[] | ManifestEnumRuleSpec;
1003
+ searchable?: boolean | {
1004
+ enabled?: boolean;
1005
+ phonetic?: boolean;
1006
+ };
1003
1007
  filterBy?: boolean | string[] | ManifestFilterBySpec;
1004
1008
  validate?: ManifestValidationRuleSpec[];
1005
1009
  }
1006
- type ManifestValidationOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'true' | 'false' | 'regex' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with';
1010
+ type ManifestValidationOperator = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "true" | "false" | "regex" | "contains" | "not_contains" | "starts_with" | "ends_with";
1007
1011
  interface ManifestEnumRuleSpec {
1008
1012
  values: string[];
1009
1013
  message?: string;
@@ -1092,7 +1096,7 @@ interface ManifestEffectDeclaration {
1092
1096
  isStatic?: boolean;
1093
1097
  inputSchema: ManifestEffectSchema;
1094
1098
  outputSchema?: ManifestEffectSchema;
1095
- stability?: 'stable' | 'experimental' | 'deprecated';
1099
+ stability?: "stable" | "experimental" | "deprecated";
1096
1100
  tags?: string[];
1097
1101
  metamodels?: ManifestEffectMetamodelSpec;
1098
1102
  }
@@ -1153,7 +1157,7 @@ interface ManifestImport {
1153
1157
  }
1154
1158
  interface ManifestVolume {
1155
1159
  name: string;
1156
- scope: 'sandbox' | 'build' | 'user';
1160
+ scope: "sandbox" | "build" | "user";
1157
1161
  imports?: ManifestImport[];
1158
1162
  operations: ManifestOperation[];
1159
1163
  }
@@ -1196,7 +1200,7 @@ interface StreamEvent {
1196
1200
  environmentId: string;
1197
1201
  sessionId?: string;
1198
1202
  subjectId?: string;
1199
- source: 'sandbox' | 'api';
1203
+ source: "sandbox" | "api";
1200
1204
  isAcked: boolean;
1201
1205
  createdAt: number;
1202
1206
  }