@sixb/core 0.1.15 → 0.1.16

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 (131) hide show
  1. package/dist/actions/index.js +15 -15
  2. package/dist/actions/worker.js +1 -1
  3. package/dist/agents/index.js +26 -26
  4. package/dist/auth/index.js +5 -5
  5. package/dist/authorization/index.js +2 -2
  6. package/dist/bootstrap/index.js +30 -30
  7. package/dist/{chunk-qne45xqq.js → chunk-2xvgy3x5.js} +2 -2
  8. package/dist/{chunk-2tz5vnvz.js → chunk-3q7z9hd4.js} +19 -19
  9. package/dist/{chunk-4jph1t3v.js → chunk-40qb8wpe.js} +9 -9
  10. package/dist/{chunk-4jph1t3v.js.map → chunk-40qb8wpe.js.map} +3 -3
  11. package/dist/{chunk-xr7y35yj.js → chunk-667x4drs.js} +2 -2
  12. package/dist/{chunk-8fjmqjyx.js → chunk-69kt9q43.js} +1 -1
  13. package/dist/{chunk-fjw417jf.js → chunk-6z1q7j19.js} +22 -9
  14. package/dist/{chunk-fjw417jf.js.map → chunk-6z1q7j19.js.map} +4 -4
  15. package/dist/{chunk-8w27xf9e.js → chunk-7g2gjvah.js} +1 -1
  16. package/dist/{chunk-wem5vqjw.js → chunk-8x74221e.js} +7 -7
  17. package/dist/{chunk-wd34wnsy.js → chunk-a7ne02hk.js} +6 -6
  18. package/dist/{chunk-bxx3ms5t.js → chunk-b9y8hcm2.js} +2 -2
  19. package/dist/{chunk-mmac1mp6.js → chunk-chdg6eqq.js} +2 -2
  20. package/dist/{chunk-6q7c68yx.js → chunk-cq44v1a6.js} +2 -2
  21. package/dist/{chunk-adbve9zt.js → chunk-cxj8y8t0.js} +2 -2
  22. package/dist/{chunk-p0nbkys4.js → chunk-dp7yk20b.js} +1 -1
  23. package/dist/{chunk-1jvq82rp.js → chunk-dsv8kdgk.js} +3 -3
  24. package/dist/{chunk-dsfw1bdr.js → chunk-f72rbvsb.js} +2 -2
  25. package/dist/{chunk-ex8s8wsk.js → chunk-gkxsenvp.js} +17 -9
  26. package/dist/{chunk-ex8s8wsk.js.map → chunk-gkxsenvp.js.map} +4 -4
  27. package/dist/{chunk-vef6qa14.js → chunk-gmdvns8f.js} +2 -2
  28. package/dist/{chunk-3c90jvfj.js → chunk-h044jb97.js} +1072 -1075
  29. package/dist/chunk-h044jb97.js.map +15 -0
  30. package/dist/{chunk-z708gemf.js → chunk-h4138ww2.js} +4 -4
  31. package/dist/{chunk-yfppyaty.js → chunk-h866d223.js} +1 -1
  32. package/dist/{chunk-7jc21943.js → chunk-kttr5ftm.js} +4 -4
  33. package/dist/{chunk-py2dw8cw.js → chunk-kvysp909.js} +1 -1
  34. package/dist/{chunk-p1683c0v.js → chunk-kyjcwqz6.js} +5 -2
  35. package/dist/{chunk-p1683c0v.js.map → chunk-kyjcwqz6.js.map} +3 -3
  36. package/dist/{chunk-ffwvdgk1.js → chunk-nj0020ay.js} +1 -1
  37. package/dist/{chunk-y0zmae99.js → chunk-nkbev3tr.js} +3 -3
  38. package/dist/{chunk-r5sc1d2b.js → chunk-nvymebc1.js} +1 -1
  39. package/dist/{chunk-2fv8sajb.js → chunk-qnd7ehe5.js} +2 -2
  40. package/dist/{chunk-n5t4mq6z.js → chunk-sbcm1b92.js} +3 -3
  41. package/dist/{chunk-d8yes9yx.js → chunk-swxzncrv.js} +1 -1
  42. package/dist/{chunk-drz59ve0.js → chunk-tkdbge6v.js} +1 -1
  43. package/dist/{chunk-ky7zpbtt.js → chunk-tnvafr7g.js} +1 -1
  44. package/dist/{chunk-dqkd3kdj.js → chunk-vjqt7q3a.js} +20 -20
  45. package/dist/{chunk-a4g5yjm0.js → chunk-vsvrv7n8.js} +1 -1
  46. package/dist/{chunk-q3grgzp1.js → chunk-zb47r1c8.js} +2 -2
  47. package/dist/{chunk-3nx8vj5a.js → chunk-zvmr2hqk.js} +3 -2
  48. package/dist/chunk-zvmr2hqk.js.map +12 -0
  49. package/dist/execution/agent.js +24 -24
  50. package/dist/execution/primitive.js +24 -24
  51. package/dist/execution/request.js +25 -25
  52. package/dist/index.js +34 -34
  53. package/dist/materializer/index.js +12 -12
  54. package/dist/models/embedding-model.d.ts +4 -0
  55. package/dist/models/embedding-model.d.ts.map +1 -1
  56. package/dist/models/execution/index.js +12 -12
  57. package/dist/models/index.js +2 -2
  58. package/dist/objects/index.js +15 -15
  59. package/dist/objects/query/index.js +13 -13
  60. package/dist/objects/query/index.js.map +1 -1
  61. package/dist/objects/vectors/indexing-generate.d.ts.map +1 -1
  62. package/dist/objects/vectors/profile.d.ts.map +1 -1
  63. package/dist/objects/vectors/query.d.ts +1 -1
  64. package/dist/objects/vectors/query.d.ts.map +1 -1
  65. package/dist/objects/vectors/resolve-query.d.ts.map +1 -1
  66. package/dist/objects/vectors/types.d.ts +1 -1
  67. package/dist/objects/vectors/types.d.ts.map +1 -1
  68. package/dist/ontology/builders.d.ts +13 -4
  69. package/dist/ontology/builders.d.ts.map +1 -1
  70. package/dist/ontology/index.js +3 -3
  71. package/dist/ontology/internal.js +2 -2
  72. package/dist/ontology/vector-profiles.d.ts.map +1 -1
  73. package/dist/pipelines/index.js +13 -13
  74. package/dist/projections/internal.js +12 -12
  75. package/dist/runtime/internal.js +14 -14
  76. package/dist/sandboxes/index.js +5 -5
  77. package/dist/shares/internal.js +11 -11
  78. package/dist/storage/agents/provider.js +1 -1
  79. package/dist/storage/file-upload-sessions/provider.js +6 -6
  80. package/dist/storage/index.js +10 -10
  81. package/dist/storage/workflow-runs/provider.js +6 -6
  82. package/dist/syncs/index.js +14 -14
  83. package/dist/testing/index.js +37 -37
  84. package/dist/testing/index.js.map +1 -1
  85. package/dist/webhooks/internal.js +12 -12
  86. package/dist/workflows/index.js +27 -27
  87. package/package.json +1 -1
  88. package/src/models/embedding-model.ts +12 -0
  89. package/src/models/execution/embedding.ts +5 -1
  90. package/src/objects/query/validate.ts +1 -10
  91. package/src/objects/vectors/README.md +8 -0
  92. package/src/objects/vectors/handle.ts +1 -1
  93. package/src/objects/vectors/indexing-generate.ts +5 -1
  94. package/src/objects/vectors/profile.ts +2 -0
  95. package/src/objects/vectors/query.ts +18 -4
  96. package/src/objects/vectors/resolve-query.ts +9 -5
  97. package/src/objects/vectors/types.ts +3 -1
  98. package/src/ontology/builders.ts +21 -7
  99. package/src/ontology/vector-profiles.ts +1 -0
  100. package/dist/chunk-3c90jvfj.js.map +0 -15
  101. package/dist/chunk-3nx8vj5a.js.map +0 -12
  102. /package/dist/{chunk-qne45xqq.js.map → chunk-2xvgy3x5.js.map} +0 -0
  103. /package/dist/{chunk-2tz5vnvz.js.map → chunk-3q7z9hd4.js.map} +0 -0
  104. /package/dist/{chunk-xr7y35yj.js.map → chunk-667x4drs.js.map} +0 -0
  105. /package/dist/{chunk-8fjmqjyx.js.map → chunk-69kt9q43.js.map} +0 -0
  106. /package/dist/{chunk-8w27xf9e.js.map → chunk-7g2gjvah.js.map} +0 -0
  107. /package/dist/{chunk-wem5vqjw.js.map → chunk-8x74221e.js.map} +0 -0
  108. /package/dist/{chunk-wd34wnsy.js.map → chunk-a7ne02hk.js.map} +0 -0
  109. /package/dist/{chunk-bxx3ms5t.js.map → chunk-b9y8hcm2.js.map} +0 -0
  110. /package/dist/{chunk-mmac1mp6.js.map → chunk-chdg6eqq.js.map} +0 -0
  111. /package/dist/{chunk-6q7c68yx.js.map → chunk-cq44v1a6.js.map} +0 -0
  112. /package/dist/{chunk-adbve9zt.js.map → chunk-cxj8y8t0.js.map} +0 -0
  113. /package/dist/{chunk-p0nbkys4.js.map → chunk-dp7yk20b.js.map} +0 -0
  114. /package/dist/{chunk-1jvq82rp.js.map → chunk-dsv8kdgk.js.map} +0 -0
  115. /package/dist/{chunk-dsfw1bdr.js.map → chunk-f72rbvsb.js.map} +0 -0
  116. /package/dist/{chunk-vef6qa14.js.map → chunk-gmdvns8f.js.map} +0 -0
  117. /package/dist/{chunk-z708gemf.js.map → chunk-h4138ww2.js.map} +0 -0
  118. /package/dist/{chunk-yfppyaty.js.map → chunk-h866d223.js.map} +0 -0
  119. /package/dist/{chunk-7jc21943.js.map → chunk-kttr5ftm.js.map} +0 -0
  120. /package/dist/{chunk-py2dw8cw.js.map → chunk-kvysp909.js.map} +0 -0
  121. /package/dist/{chunk-ffwvdgk1.js.map → chunk-nj0020ay.js.map} +0 -0
  122. /package/dist/{chunk-y0zmae99.js.map → chunk-nkbev3tr.js.map} +0 -0
  123. /package/dist/{chunk-r5sc1d2b.js.map → chunk-nvymebc1.js.map} +0 -0
  124. /package/dist/{chunk-2fv8sajb.js.map → chunk-qnd7ehe5.js.map} +0 -0
  125. /package/dist/{chunk-n5t4mq6z.js.map → chunk-sbcm1b92.js.map} +0 -0
  126. /package/dist/{chunk-d8yes9yx.js.map → chunk-swxzncrv.js.map} +0 -0
  127. /package/dist/{chunk-drz59ve0.js.map → chunk-tkdbge6v.js.map} +0 -0
  128. /package/dist/{chunk-ky7zpbtt.js.map → chunk-tnvafr7g.js.map} +0 -0
  129. /package/dist/{chunk-dqkd3kdj.js.map → chunk-vjqt7q3a.js.map} +0 -0
  130. /package/dist/{chunk-a4g5yjm0.js.map → chunk-vsvrv7n8.js.map} +0 -0
  131. /package/dist/{chunk-q3grgzp1.js.map → chunk-zb47r1c8.js.map} +0 -0
@@ -78,6 +78,9 @@ function assertEmbeddingModel(model) {
78
78
  function assertEmbeddingModelRef(model) {
79
79
  const definition = model?.definition;
80
80
  const representation = definition?.representation;
81
+ if (definition?.inputMode !== undefined && definition.inputMode !== "symmetric" && definition.inputMode !== "asymmetric") {
82
+ throw new TypeError("[Sixb] Invalid embedding input mode.");
83
+ }
81
84
  if (representation !== undefined && (!representation || typeof representation !== "object" || !validIdentityPart(representation.name) || representation.version !== undefined && !validIdentityPart(representation.version)))
82
85
  throw new TypeError("[Sixb] Invalid embedding model representation.");
83
86
  if (!definition || definition.kind !== "embedding" || definition.providerId !== model.providerId || definition.modelId !== model.modelId || typeof model.providerId !== "string" || !model.providerId || model.providerId.trim() !== model.providerId || typeof model.modelId !== "string" || !model.modelId || model.modelId.trim() !== model.modelId || !Number.isSafeInteger(definition.dimensions) || definition.dimensions < 1 || definition.dimensions > 16000) {
@@ -85,7 +88,7 @@ function assertEmbeddingModelRef(model) {
85
88
  }
86
89
  }
87
90
  function sameEmbeddingModel(left, right) {
88
- return left.providerId === right.providerId && left.modelId === right.modelId && left.definition.dimensions === right.definition.dimensions && (left.definition.representation?.name ?? left.modelId) === (right.definition.representation?.name ?? right.modelId) && left.definition.representation?.version === right.definition.representation?.version;
91
+ return left.providerId === right.providerId && left.modelId === right.modelId && left.definition.dimensions === right.definition.dimensions && (left.definition.inputMode ?? "symmetric") === (right.definition.inputMode ?? "symmetric") && (left.definition.representation?.name ?? left.modelId) === (right.definition.representation?.name ?? right.modelId) && left.definition.representation?.version === right.definition.representation?.version;
89
92
  }
90
93
  function validIdentityPart(value) {
91
94
  return typeof value === "string" && value.length > 0 && value.trim() === value;
@@ -101,4 +104,4 @@ class EmbeddingModelResponseError2 extends ModelProviderError2 {
101
104
 
102
105
  export { ModelCatalogUnavailableError2, ModelProviderError2, ModelStreamError2, UnsupportedModelFeatureError2, StructuredOutputError2, assertEmbeddingModel, assertEmbeddingModelRef, sameEmbeddingModel, EmbeddingModelResponseError2 };
103
106
 
104
- //# debugId=7C7075E45C9223F364756E2164756E21
107
+ //# debugId=5948F3F6BD60B08464756E2164756E21
@@ -3,9 +3,9 @@
3
3
  "sources": ["../src/models/errors.ts", "../src/models/embedding-model.ts"],
4
4
  "sourcesContent": [
5
5
  "import type { ModelFinishReason, ModelUsage } from \"./events\"\nimport type { ModelCallCost } from \"./pricing\"\n\n/** Catalog transport/access failed; callers may use local metadata without masking invalid definitions. */\nexport class ModelCatalogUnavailableError extends Error {\n readonly name = \"ModelCatalogUnavailableError\"\n}\n\n/** A provider or provider protocol rejected a model request. */\nexport class ModelProviderError extends Error {\n readonly name = \"ModelProviderError\"\n\n constructor(\n message: string,\n readonly providerId: string,\n readonly modelId: string,\n options?: ErrorOptions & {\n readonly status?: number\n readonly code?: string\n readonly requestId?: string\n readonly retryAfterMs?: number\n readonly retryable?: boolean\n }\n ) {\n super(message, options)\n this.status = options?.status\n this.code = options?.code\n this.requestId = options?.requestId\n this.retryAfterMs = options?.retryAfterMs\n this.retryable = options?.retryable ?? false\n }\n\n readonly status?: number\n readonly code?: string\n readonly requestId?: string\n readonly retryAfterMs?: number\n readonly retryable: boolean\n}\n\nexport class ModelStreamError extends Error {\n readonly name = \"ModelStreamError\"\n}\n\nexport class UnsupportedModelFeatureError extends Error {\n readonly name = \"UnsupportedModelFeatureError\"\n\n constructor(\n message?: string,\n options?: ErrorOptions & {\n readonly reason?: \"unsupported-model\" | \"unsupported-schema\"\n }\n ) {\n super(message, options)\n this.reason = options?.reason\n }\n\n readonly reason?: \"unsupported-model\" | \"unsupported-schema\"\n}\n\nexport class StructuredOutputError extends Error {\n readonly name = \"StructuredOutputError\"\n\n constructor(\n message: string,\n options?: ErrorOptions & {\n readonly text?: string\n readonly providerId?: string\n readonly modelId?: string\n readonly responseId?: string\n readonly responseModelId?: string\n readonly finishReason?: ModelFinishReason\n readonly usage?: ModelUsage\n readonly cost?: ModelCallCost\n }\n ) {\n super(message, options)\n this.text = options?.text\n this.providerId = options?.providerId\n this.modelId = options?.modelId\n this.responseId = options?.responseId\n this.responseModelId = options?.responseModelId\n this.finishReason = options?.finishReason\n this.usage = options?.usage\n this.cost = options?.cost\n }\n\n readonly text?: string\n readonly providerId?: string\n readonly modelId?: string\n readonly responseId?: string\n readonly responseModelId?: string\n readonly finishReason?: ModelFinishReason\n readonly usage?: ModelUsage\n readonly cost?: ModelCallCost\n}\n",
6
- "import type { ModelDefinition } from \"./definitions\"\nimport { ModelProviderError } from \"./errors\"\nimport type { ModelProviderIds, ModelRoute, ModelUsage } from \"./events\"\nimport type { ModelCostEstimator, ModelReportedCost } from \"./pricing\"\n\n/** The identity includes the configured output dimension, not only the vendor's model id. */\nexport interface EmbeddingModelDefinition extends ModelDefinition {\n readonly kind: \"embedding\"\n readonly dimensions: number\n /** Actual representation behind a routing alias. Omit only when modelId identifies it directly. */\n readonly representation?: { readonly name: string; readonly version?: string }\n}\n\nexport interface EmbeddingModelRequest {\n readonly texts: readonly string[]\n /** Providers must honor cancellation and propagate this signal to their transport. */\n readonly signal?: AbortSignal\n}\n\n/** Provider accounting facts; absent meters or prices remain unknown. */\nexport interface EmbeddingModelResponseMetadata {\n readonly usage?: ModelUsage\n readonly providerIds?: ModelProviderIds\n readonly responseModelId?: string\n readonly reportedCost?: ModelReportedCost\n readonly route?: ModelRoute\n}\n\nexport interface EmbeddingModelResult extends EmbeddingModelResponseMetadata {\n readonly vectors: readonly (readonly number[])[]\n}\n\n/** Serializable profile reference; executable providers stay on the server. */\nexport interface EmbeddingModelRef {\n readonly providerId: string\n readonly modelId: string\n readonly definition: EmbeddingModelDefinition\n}\n\n/** Conservative transport bounds for automatic projection batching, not token estimates. */\nexport interface EmbeddingBatchLimits {\n readonly maxInputs: number\n readonly maxInputBytes: number\n readonly maxTotalInputBytes: number\n}\n\nexport interface EmbeddingModel extends EmbeddingModelRef {\n /** Omit when safe multi-input bounds are unknown; automatic indexing then calls one at a time. */\n readonly batching?: EmbeddingBatchLimits\n readonly costEstimator?: ModelCostEstimator\n /** Resolve and pin optional pricing before admission, without an inference call. */\n resolve?(): Promise<EmbeddingModel>\n embed(request: EmbeddingModelRequest): Promise<EmbeddingModelResult>\n}\n\nexport function assertEmbeddingModel(model: EmbeddingModel): void {\n if (!model || typeof model !== \"object\" || typeof model.embed !== \"function\") {\n throw new TypeError(\"[Sixb] Expected an EmbeddingModel with an embed method.\")\n }\n assertEmbeddingModelRef(model)\n if (\n model.batching &&\n [\n model.batching.maxInputs,\n model.batching.maxInputBytes,\n model.batching.maxTotalInputBytes,\n ].some((value) => !Number.isSafeInteger(value) || value < 1)\n ) {\n throw new TypeError(\"[Sixb] Embedding batch limits must be positive safe integers.\")\n }\n}\n\nexport function assertEmbeddingModelRef(model: EmbeddingModelRef): void {\n const definition = model?.definition\n const representation = definition?.representation\n if (\n representation !== undefined &&\n (!representation ||\n typeof representation !== \"object\" ||\n !validIdentityPart(representation.name) ||\n (representation.version !== undefined && !validIdentityPart(representation.version)))\n )\n throw new TypeError(\"[Sixb] Invalid embedding model representation.\")\n if (\n !definition ||\n definition.kind !== \"embedding\" ||\n definition.providerId !== model.providerId ||\n definition.modelId !== model.modelId ||\n typeof model.providerId !== \"string\" ||\n !model.providerId ||\n model.providerId.trim() !== model.providerId ||\n typeof model.modelId !== \"string\" ||\n !model.modelId ||\n model.modelId.trim() !== model.modelId ||\n !Number.isSafeInteger(definition.dimensions) ||\n definition.dimensions < 1 ||\n definition.dimensions > 16000\n ) {\n throw new TypeError(\"[Sixb] Invalid embedding model identity or dimensions (expected 1–16000).\")\n }\n}\n\n/** Routing identity, representation and dimensions must agree before any inference. */\nexport function sameEmbeddingModel(left: EmbeddingModelRef, right: EmbeddingModelRef): boolean {\n return (\n left.providerId === right.providerId &&\n left.modelId === right.modelId &&\n left.definition.dimensions === right.definition.dimensions &&\n (left.definition.representation?.name ?? left.modelId) ===\n (right.definition.representation?.name ?? right.modelId) &&\n left.definition.representation?.version === right.definition.representation?.version\n )\n}\n\nfunction validIdentityPart(value: unknown): value is string {\n return typeof value === \"string\" && value.length > 0 && value.trim() === value\n}\n\n/** A completed provider response whose vectors are unusable, but may still be billable. */\nexport class EmbeddingModelResponseError extends ModelProviderError {\n constructor(\n message: string,\n providerId: string,\n modelId: string,\n readonly metadata: EmbeddingModelResponseMetadata\n ) {\n super(message, providerId, modelId, { code: \"invalid_embedding_response\", retryable: false })\n }\n}\n"
6
+ "import type { ModelDefinition } from \"./definitions\"\nimport { ModelProviderError } from \"./errors\"\nimport type { ModelProviderIds, ModelRoute, ModelUsage } from \"./events\"\nimport type { ModelCostEstimator, ModelReportedCost } from \"./pricing\"\n\n/** The identity includes the configured output dimension, not only the vendor's model id. */\nexport interface EmbeddingModelDefinition extends ModelDefinition {\n readonly kind: \"embedding\"\n readonly dimensions: number\n /** Asymmetric models use distinct document/query modes. Omission means symmetric. */\n readonly inputMode?: \"symmetric\" | \"asymmetric\"\n /** Actual representation behind a routing alias. Omit only when modelId identifies it directly. */\n readonly representation?: { readonly name: string; readonly version?: string }\n}\n\nexport interface EmbeddingModelRequest {\n readonly texts: readonly string[]\n /** Retrieval role. Sixb sets this for indexing and search; symmetric models may ignore it. */\n readonly purpose?: \"document\" | \"query\"\n /** Providers must honor cancellation and propagate this signal to their transport. */\n readonly signal?: AbortSignal\n}\n\n/** Provider accounting facts; absent meters or prices remain unknown. */\nexport interface EmbeddingModelResponseMetadata {\n readonly usage?: ModelUsage\n readonly providerIds?: ModelProviderIds\n readonly responseModelId?: string\n readonly reportedCost?: ModelReportedCost\n readonly route?: ModelRoute\n}\n\nexport interface EmbeddingModelResult extends EmbeddingModelResponseMetadata {\n readonly vectors: readonly (readonly number[])[]\n}\n\n/** Serializable profile reference; executable providers stay on the server. */\nexport interface EmbeddingModelRef {\n readonly providerId: string\n readonly modelId: string\n readonly definition: EmbeddingModelDefinition\n}\n\n/** Conservative transport bounds for automatic projection batching, not token estimates. */\nexport interface EmbeddingBatchLimits {\n readonly maxInputs: number\n readonly maxInputBytes: number\n readonly maxTotalInputBytes: number\n}\n\nexport interface EmbeddingModel extends EmbeddingModelRef {\n /** Omit when safe multi-input bounds are unknown; automatic indexing then calls one at a time. */\n readonly batching?: EmbeddingBatchLimits\n readonly costEstimator?: ModelCostEstimator\n /** Resolve and pin optional pricing before admission, without an inference call. */\n resolve?(): Promise<EmbeddingModel>\n embed(request: EmbeddingModelRequest): Promise<EmbeddingModelResult>\n}\n\nexport function assertEmbeddingModel(model: EmbeddingModel): void {\n if (!model || typeof model !== \"object\" || typeof model.embed !== \"function\") {\n throw new TypeError(\"[Sixb] Expected an EmbeddingModel with an embed method.\")\n }\n assertEmbeddingModelRef(model)\n if (\n model.batching &&\n [\n model.batching.maxInputs,\n model.batching.maxInputBytes,\n model.batching.maxTotalInputBytes,\n ].some((value) => !Number.isSafeInteger(value) || value < 1)\n ) {\n throw new TypeError(\"[Sixb] Embedding batch limits must be positive safe integers.\")\n }\n}\n\nexport function assertEmbeddingModelRef(model: EmbeddingModelRef): void {\n const definition = model?.definition\n const representation = definition?.representation\n if (\n definition?.inputMode !== undefined &&\n definition.inputMode !== \"symmetric\" &&\n definition.inputMode !== \"asymmetric\"\n ) {\n throw new TypeError(\"[Sixb] Invalid embedding input mode.\")\n }\n if (\n representation !== undefined &&\n (!representation ||\n typeof representation !== \"object\" ||\n !validIdentityPart(representation.name) ||\n (representation.version !== undefined && !validIdentityPart(representation.version)))\n )\n throw new TypeError(\"[Sixb] Invalid embedding model representation.\")\n if (\n !definition ||\n definition.kind !== \"embedding\" ||\n definition.providerId !== model.providerId ||\n definition.modelId !== model.modelId ||\n typeof model.providerId !== \"string\" ||\n !model.providerId ||\n model.providerId.trim() !== model.providerId ||\n typeof model.modelId !== \"string\" ||\n !model.modelId ||\n model.modelId.trim() !== model.modelId ||\n !Number.isSafeInteger(definition.dimensions) ||\n definition.dimensions < 1 ||\n definition.dimensions > 16000\n ) {\n throw new TypeError(\"[Sixb] Invalid embedding model identity or dimensions (expected 1–16000).\")\n }\n}\n\n/** Routing identity, representation and dimensions must agree before any inference. */\nexport function sameEmbeddingModel(left: EmbeddingModelRef, right: EmbeddingModelRef): boolean {\n return (\n left.providerId === right.providerId &&\n left.modelId === right.modelId &&\n left.definition.dimensions === right.definition.dimensions &&\n (left.definition.inputMode ?? \"symmetric\") === (right.definition.inputMode ?? \"symmetric\") &&\n (left.definition.representation?.name ?? left.modelId) ===\n (right.definition.representation?.name ?? right.modelId) &&\n left.definition.representation?.version === right.definition.representation?.version\n )\n}\n\nfunction validIdentityPart(value: unknown): value is string {\n return typeof value === \"string\" && value.length > 0 && value.trim() === value\n}\n\n/** A completed provider response whose vectors are unusable, but may still be billable. */\nexport class EmbeddingModelResponseError extends ModelProviderError {\n constructor(\n message: string,\n providerId: string,\n modelId: string,\n readonly metadata: EmbeddingModelResponseMetadata\n ) {\n super(message, providerId, modelId, { code: \"invalid_embedding_response\", retryable: false })\n }\n}\n"
7
7
  ],
8
- "mappings": ";;AAIO,MAAM,sCAAqC,MAAM;AAAA,EAC7C,OAAO;AAClB;AAAA;AAGO,MAAM,4BAA2B,MAAM;AAAA,EAKjC;AAAA,EACA;AAAA,EALF,OAAO;AAAA,EAEhB,WAAW,CACT,SACS,YACA,SACT,SAOA;AAAA,IACA,MAAM,SAAS,OAAO;AAAA,IAVb;AAAA,IACA;AAAA,IAUT,KAAK,SAAS,SAAS;AAAA,IACvB,KAAK,OAAO,SAAS;AAAA,IACrB,KAAK,YAAY,SAAS;AAAA,IAC1B,KAAK,eAAe,SAAS;AAAA,IAC7B,KAAK,YAAY,SAAS,aAAa;AAAA;AAAA,EAGhC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACX;AAAA;AAEO,MAAM,0BAAyB,MAAM;AAAA,EACjC,OAAO;AAClB;AAAA;AAEO,MAAM,sCAAqC,MAAM;AAAA,EAC7C,OAAO;AAAA,EAEhB,WAAW,CACT,SACA,SAGA;AAAA,IACA,MAAM,SAAS,OAAO;AAAA,IACtB,KAAK,SAAS,SAAS;AAAA;AAAA,EAGhB;AACX;AAAA;AAEO,MAAM,+BAA8B,MAAM;AAAA,EACtC,OAAO;AAAA,EAEhB,WAAW,CACT,SACA,SAUA;AAAA,IACA,MAAM,SAAS,OAAO;AAAA,IACtB,KAAK,OAAO,SAAS;AAAA,IACrB,KAAK,aAAa,SAAS;AAAA,IAC3B,KAAK,UAAU,SAAS;AAAA,IACxB,KAAK,aAAa,SAAS;AAAA,IAC3B,KAAK,kBAAkB,SAAS;AAAA,IAChC,KAAK,eAAe,SAAS;AAAA,IAC7B,KAAK,QAAQ,SAAS;AAAA,IACtB,KAAK,OAAO,SAAS;AAAA;AAAA,EAGd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACX;;;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ACE,CAAC,cACD,WAAW,SAAS,eACpB,WAAW,eAAe,MAAM,cAChC,WAAW,YAAY,MAAM,WAC7B,OAAO,MAAM,eAAe,YAC5B,CAAC,MAAM,cACP,MAAM,WAAW,KAAK,MAAM,MAAM,cAClC,OAAO,MAAM,YAAY,YACzB,CAAC,MAAM,WACP,MAAM,QAAQ,KAAK,MAAM,MAAM,WAC/B,CAAC,OAAO,cAAc,WAAW,UAAU,KAC3C,WAAW,aAAa,KACxB,WAAW,aAAa,OACxB;AAAA,IACA,MAAM,IAAI,UAAU,gFAA2E;AAAA,EACjG;AAAA;AAIK,SAAS,kBAAkB,CAAC,MAAyB,OAAmC;AAAA,EAC7F,OACE,KAAK,eAAe,MAAM,cAC1B,KAAK,YAAY,MAAM,WACvB,KAAK,WAAW,eAAe,MAAM,WAAW,eAC/C,KAAK,WAAW,aAAa,kBAAkB,MAAM,WAAW,aAAa,iBAC7E,KAAK,WAAW,gBAAgB,QAAQ,KAAK,cAC3C,MAAM,WAAW,gBAAgB,QAAQ,MAAM,YAClD,KAAK,WAAW,gBAAgB,YAAY,MAAM,WAAW,gBAAgB;AAAA;AAIjF,SAAS,iBAAiB,CAAC,OAAiC;AAAA,EAC1D,OAAO,OAAO,UAAU,YAAY,MAAM,SAAS,KAAK,MAAM,KAAK,MAAM;AAAA;AAAA;AAIpE,MAAM,qCAAoC,oBAAmB;AAAA,EAKvD;AAAA,EAJX,WAAW,CACT,SACA,YACA,SACS,UACT;AAAA,IACA,MAAM,SAAS,YAAY,SAAS,EAAE,MAAM,8BAA8B,WAAW,MAAM,CAAC;AAAA,IAFnF;AAAA;AAIb;",
9
+ "debugId": "5948F3F6BD60B08464756E2164756E21",
10
10
  "names": []
11
11
  }
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  isPrimitiveSchema
4
- } from "./chunk-d8yes9yx.js";
4
+ } from "./chunk-swxzncrv.js";
5
5
  import {
6
6
  isPlainRecord
7
7
  } from "./chunk-wy0qdqfm.js";
@@ -9,10 +9,10 @@ import {
9
9
  import {
10
10
  resolveExecutionScopeAuthorization,
11
11
  assertAuthorized2
12
- } from "./chunk-8fjmqjyx.js";
12
+ } from "./chunk-69kt9q43.js";
13
13
  import {
14
14
  SYNC_RUN_FAILURE_CODES2
15
- } from "./chunk-fjw417jf.js";
15
+ } from "./chunk-6z1q7j19.js";
16
16
  import {
17
17
  SyncRunError2
18
18
  } from "./chunk-jmfet9r4.js";
@@ -20,7 +20,7 @@ import {
20
20
  executionRecordInputFromRuntime,
21
21
  ensureExecutionRecord2,
22
22
  createPrimitiveExecutionRecord
23
- } from "./chunk-8w27xf9e.js";
23
+ } from "./chunk-7g2gjvah.js";
24
24
 
25
25
  // src/syncs/errors.ts
26
26
  class SyncValidationError2 extends Error {
@@ -7,7 +7,7 @@ import {
7
7
  resolveExecutionScopeAuthorization,
8
8
  AuthorizationError2,
9
9
  assertProviderAccess2
10
- } from "./chunk-8fjmqjyx.js";
10
+ } from "./chunk-69kt9q43.js";
11
11
  import {
12
12
  isOAuthConnectorDefinition2
13
13
  } from "./chunk-9x8dybsb.js";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  normalizeSchemaValue2,
4
4
  coerceSchemaValueToTyped2
5
- } from "./chunk-d8yes9yx.js";
5
+ } from "./chunk-swxzncrv.js";
6
6
  import {
7
7
  validateSchemaOrRefValue2
8
- } from "./chunk-drz59ve0.js";
8
+ } from "./chunk-tkdbge6v.js";
9
9
  import {
10
10
  OntologyValidationError2
11
11
  } from "./chunk-cqr3acm1.js";
@@ -9,10 +9,10 @@ import {
9
9
  import {
10
10
  resolveExecutionScopeAuthorization,
11
11
  assertAuthorized2
12
- } from "./chunk-8fjmqjyx.js";
12
+ } from "./chunk-69kt9q43.js";
13
13
  import {
14
14
  PIPELINE_RUN_FAILURE_CODES2
15
- } from "./chunk-fjw417jf.js";
15
+ } from "./chunk-6z1q7j19.js";
16
16
  import {
17
17
  PipelineRunError2
18
18
  } from "./chunk-mmagke4x.js";
@@ -20,7 +20,7 @@ import {
20
20
  executionRecordInputFromRuntime,
21
21
  ensureExecutionRecord2,
22
22
  createPrimitiveExecutionRecord
23
- } from "./chunk-8w27xf9e.js";
23
+ } from "./chunk-7g2gjvah.js";
24
24
 
25
25
  // src/pipelines/errors.ts
26
26
  class PipelineError2 extends Error {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-z3y5kg1x.js";
5
5
  import {
6
6
  assertEmbeddingModelRef
7
- } from "./chunk-p1683c0v.js";
7
+ } from "./chunk-kyjcwqz6.js";
8
8
  import {
9
9
  OntologyValidationError2
10
10
  } from "./chunk-cqr3acm1.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  validateSchemaValue2,
4
4
  isRecord2
5
- } from "./chunk-d8yes9yx.js";
5
+ } from "./chunk-swxzncrv.js";
6
6
  import {
7
7
  OntologyValidationError2
8
8
  } from "./chunk-cqr3acm1.js";
@@ -9,7 +9,7 @@ import {
9
9
  ModelProviderError2,
10
10
  UnsupportedModelFeatureError2,
11
11
  assertEmbeddingModel
12
- } from "./chunk-p1683c0v.js";
12
+ } from "./chunk-kyjcwqz6.js";
13
13
  import {
14
14
  assertJsonValue2,
15
15
  cloneJsonValue2
@@ -1,11 +1,11 @@
1
1
  // @bun
2
2
  import {
3
3
  OntologyRegistry2
4
- } from "./chunk-3nx8vj5a.js";
4
+ } from "./chunk-zvmr2hqk.js";
5
5
  import {
6
6
  ProjectionRegistry2,
7
7
  createOntologyMaterializer2
8
- } from "./chunk-z708gemf.js";
8
+ } from "./chunk-h4138ww2.js";
9
9
  import {
10
10
  captureSixbFailure2,
11
11
  isSixbError2
@@ -13,12 +13,12 @@ import {
13
13
  import {
14
14
  SecurityRegistry,
15
15
  AuthRuntime2
16
- } from "./chunk-qne45xqq.js";
16
+ } from "./chunk-2xvgy3x5.js";
17
17
  import {
18
18
  captureExecutionScope,
19
19
  resolveExecutionScopeAuthorization,
20
20
  AuthorizationError2
21
- } from "./chunk-8fjmqjyx.js";
21
+ } from "./chunk-69kt9q43.js";
22
22
  import {
23
23
  AuthRuntimeError2,
24
24
  isMagicLinkAuthStrategy2,
@@ -26,24 +26,24 @@ import {
26
26
  } from "./chunk-2jntasmh.js";
27
27
  import {
28
28
  createModelCatalog2
29
- } from "./chunk-ky7zpbtt.js";
29
+ } from "./chunk-tnvafr7g.js";
30
30
  import {
31
31
  FileUploadSessionError2
32
- } from "./chunk-p0nbkys4.js";
32
+ } from "./chunk-dp7yk20b.js";
33
33
  import {
34
34
  isMigrationCapableStorage2,
35
35
  checkStorageSchema2
36
- } from "./chunk-fjw417jf.js";
36
+ } from "./chunk-6z1q7j19.js";
37
37
  import {
38
38
  createAuthorizedObjectReader
39
- } from "./chunk-wem5vqjw.js";
39
+ } from "./chunk-8x74221e.js";
40
40
  import {
41
41
  attachSixbErrorReporter2,
42
42
  shareSixbErrorReporter2
43
43
  } from "./chunk-vjcd8d27.js";
44
44
  import {
45
45
  ActionRegistry2
46
- } from "./chunk-1jvq82rp.js";
46
+ } from "./chunk-dsv8kdgk.js";
47
47
  import {
48
48
  assertDatasetDefinition2
49
49
  } from "./chunk-cd234ba4.js";
@@ -56,7 +56,7 @@ import {
56
56
  } from "./chunk-e1c18xjx.js";
57
57
  import {
58
58
  createSandboxDefinition
59
- } from "./chunk-vef6qa14.js";
59
+ } from "./chunk-gmdvns8f.js";
60
60
  import {
61
61
  ConnectorError2,
62
62
  ConnectorNotFoundError2,
@@ -68,16 +68,16 @@ import {
68
68
  isConnectorStorageError,
69
69
  storageBoundaryError,
70
70
  recoverConnectorFailure
71
- } from "./chunk-r5sc1d2b.js";
71
+ } from "./chunk-nvymebc1.js";
72
72
  import {
73
73
  toolsFromProjectConfig
74
- } from "./chunk-dsfw1bdr.js";
74
+ } from "./chunk-f72rbvsb.js";
75
75
  import {
76
76
  assertNoAgentDefinitions,
77
77
  validateWorkflowsAtStartup2,
78
78
  validateWorkflowAgentStepGroupReferences2,
79
79
  createBoundSixb
80
- } from "./chunk-2tz5vnvz.js";
80
+ } from "./chunk-3q7z9hd4.js";
81
81
  import {
82
82
  registerConnectorConnectionCallbackProcess
83
83
  } from "./chunk-5a4a52tq.js";
@@ -93,7 +93,7 @@ import {
93
93
  validateSharesAtStartup,
94
94
  discoverOntologySources2,
95
95
  discoverProjectDefinitions2
96
- } from "./chunk-wd34wnsy.js";
96
+ } from "./chunk-a7ne02hk.js";
97
97
  import {
98
98
  LoggingService2
99
99
  } from "./chunk-3qms4nax.js";
@@ -101,22 +101,22 @@ import {
101
101
  bindEmbeddingModels,
102
102
  createVectorIndexingRuntime,
103
103
  registerVectorIndexingRuntime
104
- } from "./chunk-ex8s8wsk.js";
104
+ } from "./chunk-gkxsenvp.js";
105
105
  import {
106
106
  registerProjectionRegistry2
107
- } from "./chunk-6q7c68yx.js";
107
+ } from "./chunk-cq44v1a6.js";
108
108
  import {
109
109
  SyncValidationError2
110
- } from "./chunk-y0zmae99.js";
110
+ } from "./chunk-nkbev3tr.js";
111
111
  import {
112
112
  ModelExecutionSession
113
- } from "./chunk-mmac1mp6.js";
113
+ } from "./chunk-chdg6eqq.js";
114
114
  import {
115
115
  isOAuthConnectorDefinition2
116
116
  } from "./chunk-9x8dybsb.js";
117
117
  import {
118
118
  ensureExecutionRecord2
119
- } from "./chunk-8w27xf9e.js";
119
+ } from "./chunk-7g2gjvah.js";
120
120
  import {
121
121
  ConnectorConnectionStorageError2,
122
122
  CONNECTOR_CONNECTION_RUN_FAILURE_CODES2
@@ -129,7 +129,7 @@ import {
129
129
  } from "./chunk-kkqwzy6h.js";
130
130
  import {
131
131
  sameEmbeddingModel
132
- } from "./chunk-p1683c0v.js";
132
+ } from "./chunk-kyjcwqz6.js";
133
133
  import {
134
134
  supportsDirectUpload2
135
135
  } from "./chunk-h3v76ams.js";
@@ -3,7 +3,7 @@ import {
3
3
  createPrincipalRuntimeAuthorization,
4
4
  createDisabledRuntimeAuthorization,
5
5
  createDelegatedRuntimeAuthorization
6
- } from "./chunk-8fjmqjyx.js";
6
+ } from "./chunk-69kt9q43.js";
7
7
 
8
8
  // src/execution/scopes.ts
9
9
  import { randomUUID } from "crypto";
@@ -7,13 +7,13 @@ import {
7
7
  ConnectorError2,
8
8
  createConnectorCodedError,
9
9
  getConnectorExecutionSourceResolver
10
- } from "./chunk-r5sc1d2b.js";
10
+ } from "./chunk-nvymebc1.js";
11
11
  import {
12
12
  isDatasetDefinition2
13
13
  } from "./chunk-cd234ba4.js";
14
14
  import {
15
15
  SyncValidationError2
16
- } from "./chunk-y0zmae99.js";
16
+ } from "./chunk-nkbev3tr.js";
17
17
  import {
18
18
  isOAuthConnectorAdapter,
19
19
  isConnectorDefinition
@@ -3,7 +3,7 @@ import {
3
3
  validatePrimaryProperties2,
4
4
  validatePropertyDefinitions2,
5
5
  validateQueryMetadata2
6
- } from "./chunk-d8yes9yx.js";
6
+ } from "./chunk-swxzncrv.js";
7
7
  import {
8
8
  createPropertyTokenMap2,
9
9
  createLinkTokenMap2
@@ -28,6 +28,7 @@ function snapshotVectorProfiles(profiles) {
28
28
  providerId,
29
29
  modelId,
30
30
  dimensions: definition.dimensions,
31
+ ...definition.inputMode ? { inputMode: definition.inputMode } : {},
31
32
  ...definition.representation ? {
32
33
  representation: Object.freeze({
33
34
  name: definition.representation.name,
@@ -460,4 +461,4 @@ function integerEnum2(values) {
460
461
  }
461
462
  export { snapshotVectorProfiles, OntologyRegistry2, defineObjectType2, defineOntology2, defineValueType2, defineInterface2, prop2, link2, valueTypeRef2, stringEnum2, integerEnum2 };
462
463
 
463
- //# debugId=BF5295FE042DF86664756E2164756E21
464
+ //# debugId=5A2422C7AC15B2AF64756E2164756E21
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/ontology/vector-profiles.ts", "../src/ontology/registry.ts", "../src/ontology/builders.ts"],
4
+ "sourcesContent": [
5
+ "import type { ObjectVectorSearchProfile } from \"./types\"\n\n/** Metadata-only copy. Executable provider objects and credentials never leave the host. */\nexport function snapshotVectorProfiles(\n profiles: Readonly<Record<string, ObjectVectorSearchProfile>>\n): Readonly<Record<string, ObjectVectorSearchProfile>> {\n const snapshot: Record<string, ObjectVectorSearchProfile> = Object.create(null)\n for (const [name, profileDefinition] of Object.entries(profiles)) {\n const { providerId, modelId, definition } = profileDefinition.model\n snapshot[name] = Object.freeze({\n source: Object.freeze([...profileDefinition.source]),\n model: Object.freeze({\n providerId,\n modelId,\n definition: Object.freeze({\n kind: \"embedding\" as const,\n providerId,\n modelId,\n dimensions: definition.dimensions,\n ...(definition.inputMode ? { inputMode: definition.inputMode } : {}),\n ...(definition.representation\n ? {\n representation: Object.freeze({\n name: definition.representation.name,\n ...(definition.representation.version === undefined\n ? {}\n : { version: definition.representation.version }),\n }),\n }\n : {}),\n }),\n }),\n })\n }\n return Object.freeze(snapshot)\n}\n",
6
+ "/**\n * Standalone ontology registry — owns all type state and resolution logic.\n *\n * Zero infrastructure dependencies: imports only from the `ontology/` module.\n * Other modules depend on its read-only catalog instead of coupling to the full\n * `Sixb` facade.\n */\n\nimport {\n formatUnknownObjectTypeMessage,\n OntologyNotFoundError,\n OntologyValidationError,\n} from \"./errors\"\nimport type { ObjectTypeWithPropertyTokens } from \"./tokens\"\nimport { createLinkTokenMap, createPropertyTokenMap } from \"./tokens\"\nimport type { ObjectType, Schema, ValueType } from \"./types\"\nimport {\n validatePrimaryProperties,\n validatePropertyDefinitions,\n validateQueryMetadata,\n} from \"./validation\"\nimport { snapshotVectorProfiles } from \"./vector-profiles\"\n\n// ── Input types ──────────────────────────────────────────────\n\n/** Typed wrapper used by `createSixb` to register full ontology documents. */\nexport type OntologyDocumentInput = {\n readonly id: string\n readonly version: string\n readonly objectTypes: readonly ObjectTypeWithPropertyTokens[]\n readonly valueTypes?: readonly ValueType[]\n}\n\n/**\n * Runtime accepts either full ontology documents or individual object types.\n * This keeps setup flexible while preserving strict typing.\n */\nexport type OntologySource = ObjectTypeWithPropertyTokens | OntologyDocumentInput\n\nexport interface OntologyRegistryOptions {\n readonly sources: readonly OntologySource[]\n}\n\n/** Read-only access to the host's validated ontology definitions and type graph. */\nexport interface OntologyDefinitionCatalog {\n listObjectTypes(): readonly ObjectTypeWithPropertyTokens[]\n getObjectTypeById(objectTypeId: string): ObjectTypeWithPropertyTokens | null\n resolveObjectType(objectTypeId: string): ObjectTypeWithPropertyTokens\n getPrimaryPropertyId(objectTypeId: string): string\n listSubTypes(objectTypeId: string): string[]\n listAncestorChain(objectType: ObjectType): readonly ObjectTypeWithPropertyTokens[]\n isValidLinkTarget(expected: string | string[], actual: string): boolean\n getObjectTypesById(): ReadonlyMap<string, ObjectTypeWithPropertyTokens>\n getValueTypesById(): ReadonlyMap<string, ValueType>\n getPrimaryByTypeId(): ReadonlyMap<string, string>\n}\n\n// ── Private helpers ──────────────────────────────────────────\n\nfunction isOntologyDocumentSource(\n source: OntologySource\n): source is Exclude<OntologySource, ObjectTypeWithPropertyTokens> {\n return \"objectTypes\" in source\n}\n\n/**\n * Recursively walk a schema tree and collect ValueTypes discovered\n * via `valueTypeRef` nodes that carry a `_resolved` schema.\n *\n * This enables auto-registration: when codegen emits `valueTypeRef(VT)`,\n * it stores the resolved schema (and the semantic type, if any) inline. We\n * extract them here so the runtime `valueTypesById` registry is populated\n * without requiring users to pass ValueTypes explicitly. Unit validation reads\n * the semantic type from that registry, so dropping it would make a\n * unit-bearing value type reject every unit.\n */\nfunction extractValueTypesFromSchema(\n schema: Schema,\n collected: Map<string, ValueType>,\n seen: Set<string>\n): void {\n if (typeof schema === \"string\") return\n\n if (schema.type === \"valueTypeRef\") {\n if (schema._resolved && !seen.has(schema.valueTypeId)) {\n seen.add(schema.valueTypeId)\n const localName = schema.valueTypeId.includes(\":\")\n ? schema.valueTypeId.slice(schema.valueTypeId.indexOf(\":\") + 1)\n : schema.valueTypeId\n collected.set(schema.valueTypeId, {\n id: schema.valueTypeId,\n name: localName,\n schema: schema._resolved,\n ...(schema._semanticType === undefined ? {} : { semanticType: schema._semanticType }),\n })\n extractValueTypesFromSchema(schema._resolved, collected, seen)\n }\n return\n }\n\n if (schema.type === \"object\") {\n for (const field of Object.values(schema.properties)) {\n extractValueTypesFromSchema(field.schema, collected, seen)\n }\n return\n }\n\n if (schema.type === \"array\") {\n extractValueTypesFromSchema(schema.items, collected, seen)\n return\n }\n\n if (schema.type === \"map\") {\n extractValueTypesFromSchema(schema.valueSchema, collected, seen)\n }\n}\n\nfunction collectOntology(sources: readonly OntologySource[]): {\n objectTypes: ObjectTypeWithPropertyTokens[]\n valueTypes: ValueType[]\n} {\n const objectTypes: ObjectTypeWithPropertyTokens[] = []\n const valueTypes: ValueType[] = []\n const seenObjectTypes = new Set<ObjectTypeWithPropertyTokens>()\n\n for (const source of sources) {\n if (isOntologyDocumentSource(source)) {\n for (const ot of source.objectTypes) {\n if (!seenObjectTypes.has(ot)) {\n seenObjectTypes.add(ot)\n objectTypes.push(ot)\n }\n }\n valueTypes.push(...(source.valueTypes ?? []))\n } else {\n if (!seenObjectTypes.has(source)) {\n seenObjectTypes.add(source)\n objectTypes.push(source)\n }\n }\n }\n\n // Auto-discover ValueTypes embedded in ObjectType schemas via _resolved.\n // Explicit ValueTypes (from OntologyDocumentInput) take priority.\n const explicitIds = new Set(valueTypes.map((vt) => vt.id))\n const discovered = new Map<string, ValueType>()\n\n for (const objectType of objectTypes) {\n for (const property of objectType.properties) {\n extractValueTypesFromSchema(property.schema, discovered, explicitIds)\n }\n for (const linkDef of objectType.links) {\n if (linkDef.properties) {\n for (const property of linkDef.properties) {\n extractValueTypesFromSchema(property.schema, discovered, explicitIds)\n }\n }\n }\n }\n\n valueTypes.push(...discovered.values())\n\n return { objectTypes, valueTypes }\n}\n\n// ── OntologyRegistry ─────────────────────────────────────────\n\n/**\n * Self-contained registry for ontology types.\n *\n * Holds all object types, value types, the subtype graph, and the primary\n * property mapping. Validates inheritance chains and flattens inherited\n * properties at construction time.\n *\n * Exposes read-only accessors so consumers never mutate ontology state.\n */\nexport class OntologyRegistry implements OntologyDefinitionCatalog {\n private readonly objectTypesById = new Map<string, ObjectTypeWithPropertyTokens>()\n private readonly valueTypesById = new Map<string, ValueType>()\n private readonly subTypesById = new Map<string, Set<string>>()\n private readonly primaryByTypeId: Map<string, string>\n\n constructor(options: OntologyRegistryOptions) {\n const { objectTypes, valueTypes } = collectOntology(options.sources)\n\n for (const objectType of objectTypes) {\n if (this.objectTypesById.has(objectType.id)) {\n throw new OntologyValidationError(`Duplicate object type id: ${objectType.id}`)\n }\n this.objectTypesById.set(objectType.id, objectType)\n }\n\n for (const valueType of valueTypes) {\n if (this.valueTypesById.has(valueType.id)) {\n throw new OntologyValidationError(`Duplicate value type id: ${valueType.id}`)\n }\n this.valueTypesById.set(valueType.id, valueType)\n }\n\n this.validateAndBuildExtendsRegistry()\n this.resolveInheritedProperties()\n validatePropertyDefinitions(this.objectTypesById, this.valueTypesById)\n validateQueryMetadata(this.objectTypesById, this.valueTypesById)\n for (const [id, type] of this.objectTypesById) {\n if (type.search?.vectors)\n this.objectTypesById.set(id, {\n ...type,\n search: { ...type.search, vectors: snapshotVectorProfiles(type.search.vectors) },\n })\n }\n this.primaryByTypeId = validatePrimaryProperties(this.objectTypesById)\n }\n\n // ── Public read API ──────────────────────────────────────\n\n /** All registered object types. */\n listObjectTypes(): readonly ObjectTypeWithPropertyTokens[] {\n return [...this.objectTypesById.values()]\n }\n\n /** Lookup an object type by id. Returns `null` if not found. */\n getObjectTypeById(objectTypeId: string): ObjectTypeWithPropertyTokens | null {\n return this.objectTypesById.get(objectTypeId) ?? null\n }\n\n /**\n * Lookup an object type by id, throwing if it does not exist.\n *\n * Use this when the caller requires the type to exist and should fail\n * loudly on unknown types (e.g., write operations receiving a type id).\n */\n resolveObjectType(objectTypeId: string): ObjectTypeWithPropertyTokens {\n const objectType = this.objectTypesById.get(objectTypeId)\n if (!objectType) {\n throw new OntologyNotFoundError(formatUnknownObjectTypeMessage(objectTypeId))\n }\n return objectType\n }\n\n /** Get the primary property id for a given object type. Throws if unknown. */\n getPrimaryPropertyId(objectTypeId: string): string {\n const id = this.primaryByTypeId.get(objectTypeId)\n if (!id) throw new OntologyNotFoundError(formatUnknownObjectTypeMessage(objectTypeId))\n return id\n }\n\n /** Collect all transitive sub-types of the given object type id. */\n listSubTypes(objectTypeId: string): string[] {\n const result: string[] = []\n const collect = (typeId: string): void => {\n const children = this.subTypesById.get(typeId)\n if (!children) return\n for (const childId of children) {\n result.push(childId)\n collect(childId)\n }\n }\n collect(objectTypeId)\n return result\n }\n\n /** Get the structural extends chain from root ancestor to the provided type. */\n listAncestorChain(objectType: ObjectType): readonly ObjectTypeWithPropertyTokens[] {\n const chain: ObjectTypeWithPropertyTokens[] = []\n let current: ObjectTypeWithPropertyTokens | null = this.resolveObjectType(objectType.id)\n const seen = new Set<string>()\n\n while (current) {\n if (seen.has(current.id)) {\n throw new OntologyValidationError(\n `Circular extends chain detected while resolving ancestors for \"${objectType.id}\".`\n )\n }\n seen.add(current.id)\n chain.push(current)\n current = current.extends ? this.resolveObjectType(current.extends) : null\n }\n\n return chain.reverse()\n }\n\n /**\n * Check whether `actual` is a valid target for a link expecting `expected`.\n *\n * Supports wildcard `\"*\"`, single concrete types, and arrays. A type\n * matches if it equals the expected type or is a transitive subtype.\n */\n isValidLinkTarget(expected: string | string[], actual: string): boolean {\n if (expected === \"*\") return true\n const types = Array.isArray(expected) ? expected : [expected]\n if (types.includes(\"*\")) return true\n for (const type of types) {\n if (actual === type || this.listSubTypes(type).includes(actual)) return true\n }\n return false\n }\n\n // ── Map accessors (read-only views) ──────────────────────\n\n /** Read-only view of all object types by id. */\n getObjectTypesById(): ReadonlyMap<string, ObjectTypeWithPropertyTokens> {\n return this.objectTypesById\n }\n\n /** Read-only view of all value types by id. */\n getValueTypesById(): ReadonlyMap<string, ValueType> {\n return this.valueTypesById\n }\n\n /** Read-only view of primary property ids by object type id. */\n getPrimaryByTypeId(): ReadonlyMap<string, string> {\n return this.primaryByTypeId\n }\n\n // ── Private initialization ───────────────────────────────\n\n /**\n * Build the subtype graph from `extends` and `parents` declarations.\n *\n * Validates that parent types exist and detects circular `extends` chains.\n */\n private validateAndBuildExtendsRegistry(): void {\n const resolving = new Set<string>()\n const resolved = new Set<string>()\n\n const registerChild = (parentId: string, childId: string): void => {\n let children = this.subTypesById.get(parentId)\n if (!children) {\n children = new Set()\n this.subTypesById.set(parentId, children)\n }\n children.add(childId)\n }\n\n const visit = (typeId: string, chain: string[]): void => {\n if (resolved.has(typeId)) return\n\n const objectType = this.objectTypesById.get(typeId)\n if (!objectType || !objectType.extends) {\n resolved.add(typeId)\n return\n }\n\n const parentId = objectType.extends\n\n if (!this.objectTypesById.has(parentId)) {\n throw new OntologyValidationError(\n `ObjectType \"${typeId}\" extends unknown type \"${parentId}\". If \"${parentId}\" comes from an external ontology, add it to 'ontologies' in createSixb().`\n )\n }\n\n if (resolving.has(typeId)) {\n throw new OntologyValidationError(\n `Circular extends chain detected: ${[...chain, typeId].join(\" → \")}`\n )\n }\n\n resolving.add(typeId)\n visit(parentId, [...chain, typeId])\n\n registerChild(parentId, typeId)\n\n resolving.delete(typeId)\n resolved.add(typeId)\n }\n\n for (const typeId of this.objectTypesById.keys()) {\n visit(typeId, [])\n }\n\n for (const [typeId, objectType] of this.objectTypesById) {\n if (!objectType.parents) continue\n for (const parentId of objectType.parents) {\n if (parentId === objectType.extends) continue\n if (!this.objectTypesById.has(parentId)) {\n throw new OntologyValidationError(\n `ObjectType \"${typeId}\" lists unknown parent \"${parentId}\" in parents. If \"${parentId}\" comes from an external ontology, add it to 'ontologies' in createSixb().`\n )\n }\n registerChild(parentId, typeId)\n }\n }\n }\n\n /**\n * For types with string `extends`, merge parent properties/links\n * and rebuild tokens. Idempotent: no-op if already flattened (codegen case).\n */\n private resolveInheritedProperties(): void {\n const resolved = new Set<string>()\n\n const resolve = (typeId: string): void => {\n if (resolved.has(typeId)) return\n const objectType = this.objectTypesById.get(typeId)!\n\n if (!objectType.extends) {\n resolved.add(typeId)\n return\n }\n\n resolve(objectType.extends)\n const parent = this.objectTypesById.get(objectType.extends)!\n\n const mergeById = <T extends { id: string }>(\n parentItems: readonly T[],\n childItems: readonly T[]\n ): T[] => {\n const childIds = new Set(childItems.map((item) => item.id))\n const fromParent = parentItems.filter((item) => !childIds.has(item.id))\n return [...fromParent, ...childItems]\n }\n\n const mergedProperties = mergeById(parent.properties, objectType.properties)\n const mergedLinks = mergeById(parent.links, objectType.links)\n\n const changed =\n mergedProperties.length !== objectType.properties.length ||\n mergedLinks.length !== objectType.links.length\n\n if (changed) {\n const merged: ObjectType = {\n ...objectType,\n properties: mergedProperties,\n links: mergedLinks,\n }\n const withTokens: ObjectTypeWithPropertyTokens = {\n ...merged,\n p: createPropertyTokenMap(merged),\n }\n ;(withTokens as ObjectTypeWithPropertyTokens & { l: unknown }).l =\n createLinkTokenMap(merged)\n this.objectTypesById.set(typeId, withTokens)\n }\n\n resolved.add(typeId)\n }\n\n for (const typeId of this.objectTypesById.keys()) {\n resolve(typeId)\n }\n }\n}\n",
7
+ "/**\n * Builder helpers for ontology modeling.\n *\n * These functions provide shorthand for constructing `ObjectType`, `ValueType`,\n * `Interface`, `Property`, `ObjectLink`, and `EnumSchema` values with sensible\n * defaults so you can focus on the semantics rather than boilerplate.\n *\n * ```ts\n * import { defineObjectType, prop, link, stringEnum } from \"@sixb/core\"\n *\n * const thermostat = defineObjectType({\n * id: \"thermostat\",\n * name: \"Thermostat\",\n * properties: [\n * prop(\"currentTemperature\", \"double\", {\n * name: \"Current Temperature\",\n * semanticType: \"Temperature\",\n * required: true,\n * }),\n * prop(\"mode\", stringEnum([\"off\", \"heat\", \"cool\", \"auto\"])),\n * ],\n * links: [\n * link.ref(\"controls\", \"hvacZone\", { cardinality: \"one\" }),\n * ],\n * })\n * ```\n */\n\nimport type { ObjectTypeWithPropertyTokens, ObjectTypeWithTokens } from \"./tokens\"\nimport { createLinkTokenMap, createPropertyTokenMap } from \"./tokens\"\nimport type {\n EnumSchema,\n Interface,\n LinkCardinality,\n ObjectLink,\n ObjectLinkTargetMetadata,\n ObjectType,\n ObjectVectorSearchProfile,\n Ontology,\n Property,\n PropertyMode,\n PropertyQueryMetadata,\n Schema,\n ValueType,\n ValueTypeRefSchema,\n} from \"./types\"\nimport type { QuantitativeTypeId } from \"./units\"\n\ntype NameFromOptions<TId extends string, TOptions> = TOptions extends {\n name: infer TName extends string\n}\n ? TName\n : TId\n\n/**\n * Preserve literal option values when an option key is provided.\n *\n * Why this exists:\n * - `prop(\"x\", \"string\", { required: true })` should keep `required` as literal `true`\n * (not widen to `boolean`) so downstream inference can treat the field as required.\n */\ntype FieldFromOptions<TOptions, TKey extends string, TFallback> =\n TOptions extends Record<TKey, infer TValue>\n ? { [K in TKey]: TValue }\n : { [K in TKey]?: TFallback }\n\nconst selfLinkTargetObjectTypeId = \"__sixb.self__\"\ntype SelfLinkTargetObjectTypeId = typeof selfLinkTargetObjectTypeId\n\ntype NormalizeSelfLink<TObjectTypeId extends string, TLink> = TLink extends {\n targetObjectTypeId: SelfLinkTargetObjectTypeId\n}\n ? Omit<TLink, \"targetObjectTypeId\"> & { targetObjectTypeId: TObjectTypeId }\n : TLink\n\ntype NormalizeSelfLinks<TObjectTypeId extends string, TLinks extends readonly ObjectLink[]> = {\n -readonly [K in keyof TLinks]: NormalizeSelfLink<TObjectTypeId, TLinks[K]>\n}\n\n// ── Extends type utilities ───────────────────────────────────\n\n/**\n * Merge parent + child collections by id. Uses built-in `Exclude` on\n * the element union — no recursion, no \"excessively deep\" errors.\n */\ntype MergedCollection<\n TParent extends readonly { id: string }[],\n TChild extends readonly { id: string }[],\n> = Array<Exclude<TParent[number], { id: TChild[number][\"id\"] }> | TChild[number]>\n\n/**\n * Extract child's own collection, normalized as a mutable tuple. Falls back to [].\n */\ntype OwnCollection<TInput, TKey extends string, TItem> =\n TInput extends Record<TKey, infer T extends readonly TItem[]> ? [...T] : []\n\ntype OwnLinks<TInput> = TInput extends { id: infer TObjectTypeId extends string }\n ? TInput extends Record<\"links\", infer TLinks extends readonly ObjectLink[]>\n ? NormalizeSelfLinks<TObjectTypeId, TLinks>\n : []\n : []\n\n/**\n * Merge two arrays by id: parent items first, child items override by id.\n */\nfunction mergeById<T extends { id: string }>(parent: readonly T[], child: readonly T[]): T[] {\n const childIds = new Set(child.map((item) => item.id))\n const fromParent = parent.filter((item) => !childIds.has(item.id))\n return [...fromParent, ...child]\n}\n\n// ── Object Type ─────────────────────────────────────────────\n\ntype DefineObjectTypeBase = Omit<ObjectType, \"properties\" | \"links\" | \"extends\" | \"parents\">\n\n/**\n * Structural constraint for the `extends` field.\n *\n * We require only the data needed for merge (id + collections), not the\n * full `ObjectTypeWithTokens<ObjectType>`. The latter requires\n * `LinkTokenMap<ObjectType>` with a `{ [id: string]: LinkToken }` index\n * signature, which is incompatible with the literal-keyed maps produced by\n * concrete `defineObjectType()` calls.\n */\ntype DefineObjectTypeInput = DefineObjectTypeBase & {\n extends?:\n | string\n | {\n readonly id: string\n readonly properties: readonly Property[]\n readonly links: readonly ObjectLink[]\n }\n parents?: readonly string[]\n properties?: readonly Property[]\n links?: readonly ObjectLink[]\n}\n\n/**\n * Normalize `parents` from readonly tuple to mutable `string[] | undefined`.\n */\ntype NormalizeParents<TInput> = TInput extends { parents: infer P extends readonly string[] }\n ? { parents: [...P] }\n : { parents?: undefined }\n\ntype DefineObjectTypeResult<TInput extends DefineObjectTypeInput> = Omit<\n TInput,\n \"properties\" | \"links\" | \"extends\" | \"parents\"\n> &\n (TInput extends {\n extends: infer TParent extends {\n id: string\n properties: readonly Property[]\n links: readonly ObjectLink[]\n }\n }\n ? NormalizeParents<TInput> & {\n extends: TParent[\"id\"]\n properties: MergedCollection<\n TParent[\"properties\"],\n OwnCollection<TInput, \"properties\", Property>\n >\n links: MergedCollection<TParent[\"links\"], OwnLinks<TInput>>\n }\n : TInput extends { extends: infer TParentId extends string }\n ? {\n extends: TParentId\n parents: string[]\n properties: OwnCollection<TInput, \"properties\", Property>\n links: OwnLinks<TInput>\n }\n : NormalizeParents<TInput> & {\n extends: undefined\n properties: OwnCollection<TInput, \"properties\", Property>\n links: OwnLinks<TInput>\n })\n\ntype DefineObjectTypeWithTokensResult<TInput extends DefineObjectTypeInput> = ObjectTypeWithTokens<\n DefineObjectTypeResult<TInput>\n>\n\n/**\n * Define an object type with sensible defaults.\n *\n * `properties` and `links` default to `[]` so you can define\n * a bare object type with just `id` and `name`.\n */\nexport function defineObjectType<const TInput extends DefineObjectTypeInput>(\n input: TInput\n): DefineObjectTypeWithTokensResult<TInput>\nexport function defineObjectType(input: DefineObjectTypeInput): ObjectTypeWithTokens<ObjectType> {\n const ext = input.extends\n\n const ownProperties = input.properties ? [...input.properties] : []\n const ownLinks = input.links\n ? input.links.map((link) => normalizeSelfLinkTarget(input.id, link))\n : []\n\n let extendsId: string | undefined\n let parentIds: string[] | undefined\n let properties: Property[]\n let links: ObjectLink[]\n\n if (typeof ext === \"string\") {\n // Pre-flattened: string extends — no merge, properties/links taken as-is\n extendsId = ext\n parentIds = [ext, ...(input.parents ?? []).filter((id) => id !== ext)]\n properties = ownProperties\n links = ownLinks\n } else if (ext != null) {\n // Object extends — merge parent collections\n extendsId = ext.id\n parentIds = [ext.id, ...(input.parents ?? []).filter((id) => id !== ext.id)]\n properties = mergeById(ext.properties, ownProperties)\n links = mergeById([...ext.links], ownLinks)\n } else {\n // No extends\n extendsId = undefined\n parentIds = input.parents ? [...input.parents] : undefined\n properties = ownProperties\n links = ownLinks\n }\n\n const objectType: ObjectType = {\n id: input.id,\n name: input.name,\n description: input.description,\n quantityKind: input.quantityKind,\n seeAlso: input.seeAlso,\n extends: extendsId,\n parents: parentIds,\n implements: input.implements,\n properties,\n links,\n search: input.search,\n }\n\n return {\n ...objectType,\n l: createLinkTokenMap(objectType),\n p: createPropertyTokenMap(objectType),\n }\n}\n\nfunction normalizeSelfLinkTarget(objectTypeId: string, link: ObjectLink): ObjectLink {\n if (link.targetObjectTypeId !== selfLinkTargetObjectTypeId) {\n return link\n }\n\n return {\n ...link,\n targetObjectTypeId: objectTypeId,\n }\n}\n\n// ── Ontology ────────────────────────────────────────────────\n\ntype DefineOntologyBase = Omit<Ontology, \"objectTypes\" | \"valueTypes\" | \"interfaces\">\n\ntype DefineOntologyInput = DefineOntologyBase & {\n objectTypes?: readonly ObjectType[]\n valueTypes?: readonly ValueType[]\n interfaces?: readonly Interface[]\n}\n\ntype DefineOntologyResult<TInput extends DefineOntologyInput> = Omit<\n TInput,\n \"objectTypes\" | \"valueTypes\" | \"interfaces\"\n> & {\n objectTypes: TInput extends { objectTypes: infer TObjectTypes extends readonly ObjectType[] }\n ? [...TObjectTypes]\n : []\n valueTypes: TInput extends { valueTypes: infer TValueTypes extends readonly ValueType[] }\n ? [...TValueTypes]\n : []\n interfaces: TInput extends { interfaces: infer TInterfaces extends readonly Interface[] }\n ? [...TInterfaces]\n : []\n}\n\n/**\n * Define a complete ontology document.\n *\n * `objectTypes`, `valueTypes`, and `interfaces` default to `[]`.\n */\nexport function defineOntology<const TInput extends DefineOntologyInput>(\n input: TInput\n): DefineOntologyResult<TInput>\nexport function defineOntology(input: DefineOntologyInput): Ontology {\n return {\n ...input,\n objectTypes: input.objectTypes ? [...input.objectTypes] : [],\n valueTypes: input.valueTypes ? [...input.valueTypes] : [],\n interfaces: input.interfaces ? [...input.interfaces] : [],\n }\n}\n\n// ── Value Type ──────────────────────────────────────────────\n\n/**\n * Define a reusable value type.\n *\n * Identity function for type inference and discoverability — the `define*`\n * prefix makes it easy to find all ontology builders.\n */\nexport function defineValueType<const TValueType extends ValueType>(input: TValueType): TValueType {\n return input\n}\n\n// ── Interface ───────────────────────────────────────────────\n\ntype DefineInterfaceBase = Omit<Interface, \"properties\" | \"links\">\n\ntype DefineInterfaceInput = DefineInterfaceBase & {\n properties?: readonly Property[]\n links?: readonly ObjectLink[]\n}\n\ntype DefineInterfaceResult<TInput extends DefineInterfaceInput> = Omit<\n TInput,\n \"properties\" | \"links\"\n> & {\n properties: TInput extends { properties: infer TProperties extends readonly Property[] }\n ? [...TProperties]\n : []\n links: TInput extends { links: infer TLinks extends readonly ObjectLink[] } ? [...TLinks] : []\n}\n\n/**\n * Define a reusable interface contract.\n *\n * `properties` and `links` default to `[]`.\n */\nexport function defineInterface<const TInput extends DefineInterfaceInput>(\n input: TInput\n): DefineInterfaceResult<TInput>\nexport function defineInterface(input: DefineInterfaceInput): Interface {\n return {\n ...input,\n properties: input.properties ? [...input.properties] : [],\n links: input.links ? [...input.links] : [],\n }\n}\n\n// ── Property shorthand ──────────────────────────────────────\n\ntype PropertyOptions = {\n name?: string\n description?: string\n required?: boolean\n nullable?: boolean\n primary?: true\n mode?: PropertyMode\n semanticType?: QuantitativeTypeId\n query?: PropertyQueryMetadata\n}\n\ntype PropertyResult<\n TId extends string,\n TSchema extends Schema,\n TOptions extends PropertyOptions | undefined,\n> = {\n id: TId\n name: NameFromOptions<TId, TOptions>\n schema: TSchema\n} & FieldFromOptions<TOptions, \"description\", string> &\n FieldFromOptions<TOptions, \"required\", boolean> &\n FieldFromOptions<TOptions, \"nullable\", boolean> &\n FieldFromOptions<TOptions, \"primary\", true> &\n FieldFromOptions<TOptions, \"mode\", PropertyMode> &\n FieldFromOptions<TOptions, \"semanticType\", QuantitativeTypeId> &\n FieldFromOptions<TOptions, \"query\", PropertyQueryMetadata>\n\n/**\n * Shorthand for creating a {@link Property}.\n *\n * `name` defaults to `id` — override via `options.name` when you need\n * a separate display name.\n *\n * ```ts\n * prop(\"currentTemperature\", \"double\", {\n * name: \"Current Temperature\",\n * semanticType: \"Temperature\",\n * required: true,\n * })\n * ```\n */\n// Overloads keep option literals (e.g. `required: true`, `mode: \"telemetry\"`) intact.\nexport function prop<const TId extends string, const TSchema extends Schema>(\n id: TId,\n schema: TSchema\n): PropertyResult<TId, TSchema, undefined>\nexport function prop<\n const TId extends string,\n const TSchema extends Schema,\n const TOptions extends PropertyOptions,\n>(id: TId, schema: TSchema, options: TOptions): PropertyResult<TId, TSchema, TOptions>\nexport function prop(id: string, schema: Schema, options?: PropertyOptions): Property {\n return {\n id,\n name: options?.name ?? id,\n schema,\n ...options,\n }\n}\n\n// ── Link shorthand ──────────────────────────────────────────\n\n/**\n * Runtime check: does a value look like an ObjectType?\n *\n * Discriminates ObjectType from LinkOptions by checking for `properties` and `links`\n * arrays — ObjectType always has them, LinkOptions never does.\n */\nfunction isObjectTypeLike(value: unknown): value is ObjectType {\n return (\n typeof value === \"object\" &&\n value !== null &&\n Array.isArray((value as Record<string, unknown>).properties) &&\n Array.isArray((value as Record<string, unknown>).links)\n )\n}\n\ntype LinkOptions = {\n name?: string\n description?: string\n cardinality?: LinkCardinality\n properties?: Property[]\n}\n\ntype LinkResult<\n TId extends string,\n TTargetObjectTypeId,\n TOptions extends LinkOptions | undefined,\n> = {\n id: TId\n name: NameFromOptions<TId, TOptions>\n targetObjectTypeId: TTargetObjectTypeId\n} & FieldFromOptions<TOptions, \"description\", string> &\n FieldFromOptions<TOptions, \"cardinality\", LinkCardinality> &\n FieldFromOptions<TOptions, \"properties\", Property[]>\n\nexport type DirectLinkResult<\n TId extends string,\n TTargetObjectTypeId,\n TOptions extends LinkOptions | undefined,\n TTarget,\n> = LinkResult<TId, TTargetObjectTypeId, TOptions> & ObjectLinkTargetMetadata<TTarget>\n\ntype ObjectTypeIdArray<TTargets extends readonly ObjectType[]> = Array<TTargets[number][\"id\"]>\n/** Keep profile names without carrying provider types through every linked declaration. */\nexport type DirectLinkTarget<\n TId extends string,\n TName extends string,\n TProperties extends Property[],\n TVectorProfiles extends string = never,\n> = ObjectTypeWithPropertyTokens<\n {\n id: TId\n name: TName\n properties: TProperties\n links: ObjectLink[]\n } & ([TVectorProfiles] extends [never]\n ? unknown\n : { search: { vectors: Record<TVectorProfiles, ObjectVectorSearchProfile> } })\n>\n\ntype DirectLinkTargetFor<TTarget extends ObjectType> = TTarget extends ObjectTypeWithPropertyTokens\n ? DirectLinkTarget<\n TTarget[\"id\"],\n TTarget[\"name\"],\n TTarget[\"properties\"],\n TTarget extends { search: { vectors: infer TProfiles } }\n ? Extract<keyof TProfiles, string>\n : never\n >\n : TTarget\n\n/**\n * Shorthand for creating an {@link ObjectLink}.\n *\n * `link(...)` accepts direct ObjectType targets and preserves their type for\n * query authoring. Use `link.ref(...)` for id-only references, `link.self(...)`\n * for recursive links, and `link.any(...)` for wildcard links.\n *\n * ```ts\n * // ObjectType target — extracts .id at runtime and preserves the target type\n * link(\"controls\", HVACZone, { cardinality: \"one\" })\n *\n * // Id target — resolved by the generated ontology type manifest\n * link.ref(\"controls\", \"hvacZone\", { cardinality: \"one\" })\n *\n * // Self target — normalized to the source object type id by defineObjectType()\n * link.self(\"parent\", { cardinality: \"one\" })\n *\n * // Multiple targets\n * link(\"rel\", [TypeA, TypeB])\n *\n * // Wildcard — accepts any target type\n * link.any(\"anything\")\n * link.any(\"anything\", { cardinality: \"many\" })\n * ```\n */\ninterface LinkCallable {\n <const TId extends string, const TTarget extends ObjectType>(\n id: TId,\n target: TTarget\n ): DirectLinkResult<TId, TTarget[\"id\"], undefined, DirectLinkTargetFor<TTarget>>\n\n <const TId extends string, const TTarget extends ObjectType, const TOptions extends LinkOptions>(\n id: TId,\n target: TTarget,\n options: TOptions\n ): DirectLinkResult<TId, TTarget[\"id\"], TOptions, DirectLinkTargetFor<TTarget>>\n\n <const TId extends string, const TTargets extends readonly ObjectType[]>(\n id: TId,\n targets: TTargets\n ): DirectLinkResult<\n TId,\n ObjectTypeIdArray<TTargets>,\n undefined,\n DirectLinkTargetFor<TTargets[number]>\n >\n\n <\n const TId extends string,\n const TTargets extends readonly ObjectType[],\n const TOptions extends LinkOptions,\n >(\n id: TId,\n targets: TTargets,\n options: TOptions\n ): DirectLinkResult<\n TId,\n ObjectTypeIdArray<TTargets>,\n TOptions,\n DirectLinkTargetFor<TTargets[number]>\n >\n}\n\ninterface LinkBuilder extends LinkCallable {\n ref: typeof linkRef\n self: typeof linkSelf\n any: typeof linkAny\n}\n\nconst linkImpl = ((\n id: string,\n targetOrTargets: ObjectType | readonly ObjectType[],\n options?: LinkOptions\n): ObjectLink => {\n if (Array.isArray(targetOrTargets)) {\n return {\n id,\n name: options?.name ?? id,\n targetObjectTypeId: targetOrTargets.map((target) => target.id),\n ...options,\n }\n }\n\n if (isObjectTypeLike(targetOrTargets)) {\n return {\n id,\n name: options?.name ?? id,\n targetObjectTypeId: targetOrTargets.id,\n ...options,\n }\n }\n\n throw new Error(\n `[Sixb] link(\"${id}\", ...) requires an ObjectType target. Use link.ref(...) for id references, link.self(...) for self-links, or link.any(...) for wildcard links.`\n )\n}) as LinkCallable\n\nfunction linkRef<\n const TId extends string,\n const TTargetObjectTypeId extends string | readonly string[],\n>(id: TId, targetObjectTypeId: TTargetObjectTypeId): LinkResult<TId, TTargetObjectTypeId, undefined>\nfunction linkRef<\n const TId extends string,\n const TTargetObjectTypeId extends string | readonly string[],\n const TOptions extends LinkOptions,\n>(\n id: TId,\n targetObjectTypeId: TTargetObjectTypeId,\n options: TOptions\n): LinkResult<TId, TTargetObjectTypeId, TOptions>\nfunction linkRef(\n id: string,\n targetObjectTypeId: string | readonly string[],\n options?: LinkOptions\n): ObjectLink {\n return {\n id,\n name: options?.name ?? id,\n targetObjectTypeId:\n typeof targetObjectTypeId === \"string\" ? targetObjectTypeId : [...targetObjectTypeId],\n ...options,\n }\n}\n\nfunction linkSelf<\n const TId extends string,\n const TOptions extends LinkOptions | undefined = undefined,\n>(id: TId, options?: TOptions): LinkResult<TId, SelfLinkTargetObjectTypeId, TOptions> {\n return {\n id,\n name: options?.name ?? id,\n targetObjectTypeId: selfLinkTargetObjectTypeId,\n ...options,\n } as LinkResult<TId, SelfLinkTargetObjectTypeId, TOptions>\n}\n\nfunction linkAny<\n const TId extends string,\n const TOptions extends LinkOptions | undefined = undefined,\n>(id: TId, options?: TOptions): LinkResult<TId, \"*\", TOptions> {\n return {\n id,\n name: options?.name ?? id,\n targetObjectTypeId: \"*\",\n ...options,\n } as LinkResult<TId, \"*\", TOptions>\n}\n\nexport const link: LinkBuilder = Object.assign(linkImpl, {\n ref: linkRef,\n self: linkSelf,\n any: linkAny,\n})\n\n// ── ValueType ref shorthand ─────────────────────────────────\n\n/**\n * Create a value-type reference schema.\n *\n * ```ts\n * prop(\"azimuth\", valueTypeRef(\"bsh:AzimuthShape\"))\n * prop(\"area\", valueTypeRef(AreaShape)) // self-contained, no tuple needed\n * ```\n */\n// 1. String id only (existing behavior, no resolution)\nexport function valueTypeRef<const TId extends string>(\n valueTypeId: TId\n): ValueTypeRefSchema & { valueTypeId: TId }\n// 2. ValueType object (concise, self-contained: carries the schema and the semantic type)\nexport function valueTypeRef<const TVT extends ValueType>(\n valueType: TVT\n): TVT extends { semanticType: infer TSemanticType extends QuantitativeTypeId }\n ? {\n type: \"valueTypeRef\"\n valueTypeId: TVT[\"id\"]\n _resolved: TVT[\"schema\"]\n _semanticType: TSemanticType\n }\n : { type: \"valueTypeRef\"; valueTypeId: TVT[\"id\"]; _resolved: TVT[\"schema\"] }\n// 3. String id + explicit schema (escape hatch)\nexport function valueTypeRef<const TId extends string, const TResolved extends Schema>(\n valueTypeId: TId,\n resolved: TResolved\n): { type: \"valueTypeRef\"; valueTypeId: TId; _resolved: TResolved }\n// Implementation\nexport function valueTypeRef(\n idOrValueType: string | ValueType,\n resolved?: Schema\n): ValueTypeRefSchema {\n if (typeof idOrValueType === \"string\") {\n if (resolved !== undefined) {\n return { type: \"valueTypeRef\", valueTypeId: idOrValueType, _resolved: resolved }\n }\n return { type: \"valueTypeRef\", valueTypeId: idOrValueType }\n }\n return {\n type: \"valueTypeRef\",\n valueTypeId: idOrValueType.id,\n _resolved: idOrValueType.schema,\n ...(idOrValueType.semanticType === undefined\n ? {}\n : { _semanticType: idOrValueType.semanticType }),\n }\n}\n\n// ── Enum helpers ────────────────────────────────────────────\n\n/**\n * Create a string enum schema.\n *\n * ```ts\n * prop(\"mode\", stringEnum([\"off\", \"heat\", \"cool\", \"auto\"]))\n * ```\n */\nexport function stringEnum<const V extends readonly string[]>(\n values: V\n): EnumSchema & {\n values: [...V]\n} {\n return { type: \"enum\", valueType: \"string\", values: [...values] }\n}\n\n/**\n * Create an integer enum schema.\n *\n * ```ts\n * prop(\"fanSpeed\", integerEnum([1, 2, 3]))\n * ```\n */\nexport function integerEnum<const V extends readonly number[]>(\n values: V\n): EnumSchema & {\n values: [...V]\n} {\n return { type: \"enum\", valueType: \"integer\", values: [...values] }\n}\n"
8
+ ],
9
+ "mappings": ";;;;;;;;;;;;;;;;AAGO,SAAS,sBAAsB,CACpC,UACqD;AAAA,EACrD,MAAM,WAAsD,OAAO,OAAO,IAAI;AAAA,EAC9E,YAAY,MAAM,sBAAsB,OAAO,QAAQ,QAAQ,GAAG;AAAA,IAChE,QAAQ,YAAY,SAAS,eAAe,kBAAkB;AAAA,IAC9D,SAAS,QAAQ,OAAO,OAAO;AAAA,MAC7B,QAAQ,OAAO,OAAO,CAAC,GAAG,kBAAkB,MAAM,CAAC;AAAA,MACnD,OAAO,OAAO,OAAO;AAAA,QACnB;AAAA,QACA;AAAA,QACA,YAAY,OAAO,OAAO;AAAA,UACxB,MAAM;AAAA,UACN;AAAA,UACA;AAAA,UACA,YAAY,WAAW;AAAA,aACnB,WAAW,YAAY,EAAE,WAAW,WAAW,UAAU,IAAI,CAAC;AAAA,aAC9D,WAAW,iBACX;AAAA,YACE,gBAAgB,OAAO,OAAO;AAAA,cAC5B,MAAM,WAAW,eAAe;AAAA,iBAC5B,WAAW,eAAe,YAAY,YACtC,CAAC,IACD,EAAE,SAAS,WAAW,eAAe,QAAQ;AAAA,YACnD,CAAC;AAAA,UACH,IACA,CAAC;AAAA,QACP,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AAAA,EACA,OAAO,OAAO,OAAO,QAAQ;AAAA;;;ACyB/B,SAAS,wBAAwB,CAC/B,QACiE;AAAA,EACjE,OAAO,iBAAiB;AAAA;AAc1B,SAAS,2BAA2B,CAClC,QACA,WACA,MACM;AAAA,EACN,IAAI,OAAO,WAAW;AAAA,IAAU;AAAA,EAEhC,IAAI,OAAO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B;AAAA,EACL;AAAA;AAGF,SAAS,OAGR,CAAC,IAAS,SAAoD;AAAA,EAC7D,OAAO;AAAA,IACL;AAAA,IACA,MAAM,SAAS,QAAQ;AAAA,IACvB,oBAAoB;AAAA,OACjB;AAAA,EACL;AAAA;AAGK,IAAM,QAAoB,OAAO,OAAO,UAAU;AAAA,EACvD,KAAK;AAAA,EACL,MAAM;AAAA,EACN,KAAK;AACP,CAAC;AAiCM,SAAS,aAAY,CAC1B,eACA,UACoB;AAAA,EACpB,IAAI,OAAO,kBAAkB,UAAU;AAAA,IACrC,IAAI,aAAa,WAAW;AAAA,MAC1B,OAAO,EAAE,MAAM,gBAAgB,aAAa,eAAe,WAAW,SAAS;AAAA,IACjF;AAAA,IACA,OAAO,EAAE,MAAM,gBAAgB,aAAa,cAAc;AAAA,EAC5D;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,IACN,aAAa,cAAc;AAAA,IAC3B,WAAW,cAAc;AAAA,OACrB,cAAc,iBAAiB,YAC/B,CAAC,IACD,EAAE,eAAe,cAAc,aAAa;AAAA,EAClD;AAAA;AAYK,SAAS,WAA6C,CAC3D,QAGA;AAAA,EACA,OAAO,EAAE,MAAM,QAAQ,WAAW,UAAU,QAAQ,CAAC,GAAG,MAAM,EAAE;AAAA;AAU3D,SAAS,YAA8C,CAC5D,QAGA;AAAA,EACA,OAAO,EAAE,MAAM,QAAQ,WAAW,WAAW,QAAQ,CAAC,GAAG,MAAM,EAAE;AAAA;",
10
+ "debugId": "5A2422C7AC15B2AF64756E2164756E21",
11
+ "names": []
12
+ }
@@ -6,36 +6,36 @@ import {
6
6
  bindDurableAgentExecution2,
7
7
  restoreAgentExecutionScope2,
8
8
  assertAgentExecutionRecord2
9
- } from "../chunk-2tz5vnvz.js";
10
- import"../chunk-y0zmae99.js";
11
- import"../chunk-r5sc1d2b.js";
12
- import"../chunk-adbve9zt.js";
13
- import"../chunk-mmac1mp6.js";
14
- import"../chunk-bxx3ms5t.js";
15
- import"../chunk-py2dw8cw.js";
9
+ } from "../chunk-3q7z9hd4.js";
10
+ import"../chunk-nkbev3tr.js";
11
+ import"../chunk-nvymebc1.js";
12
+ import"../chunk-cxj8y8t0.js";
13
+ import"../chunk-chdg6eqq.js";
14
+ import"../chunk-b9y8hcm2.js";
15
+ import"../chunk-kvysp909.js";
16
16
  import"../chunk-f85hpqnm.js";
17
17
  import"../chunk-fj1dvp37.js";
18
- import"../chunk-4jph1t3v.js";
18
+ import"../chunk-40qb8wpe.js";
19
19
  import"../chunk-85cd7e8c.js";
20
- import"../chunk-n5t4mq6z.js";
20
+ import"../chunk-sbcm1b92.js";
21
21
  import"../chunk-5a4a52tq.js";
22
22
  import"../chunk-91kcnbf0.js";
23
23
  import"../chunk-rb143ggb.js";
24
24
  import"../chunk-cd234ba4.js";
25
- import"../chunk-1jvq82rp.js";
26
- import"../chunk-wem5vqjw.js";
27
- import"../chunk-z708gemf.js";
28
- import"../chunk-3c90jvfj.js";
25
+ import"../chunk-dsv8kdgk.js";
26
+ import"../chunk-8x74221e.js";
27
+ import"../chunk-h4138ww2.js";
28
+ import"../chunk-h044jb97.js";
29
29
  import {
30
30
  ensureExecutionRecord2
31
- } from "../chunk-8w27xf9e.js";
32
- import"../chunk-fjw417jf.js";
31
+ } from "../chunk-7g2gjvah.js";
32
+ import"../chunk-6z1q7j19.js";
33
33
  import"../chunk-br3k6qbf.js";
34
34
  import"../chunk-jmfet9r4.js";
35
35
  import"../chunk-qf954wje.js";
36
- import"../chunk-xr7y35yj.js";
36
+ import"../chunk-667x4drs.js";
37
37
  import"../chunk-tw03bsmb.js";
38
- import"../chunk-p0nbkys4.js";
38
+ import"../chunk-dp7yk20b.js";
39
39
  import"../chunk-zdkcdshk.js";
40
40
  import"../chunk-h89wz928.js";
41
41
  import"../chunk-g4rbm4a6.js";
@@ -49,9 +49,9 @@ import"../chunk-69266efg.js";
49
49
  import"../chunk-xnx96gfy.js";
50
50
  import"../chunk-s3csryxe.js";
51
51
  import"../chunk-jgwb25gc.js";
52
- import"../chunk-ky7zpbtt.js";
52
+ import"../chunk-tnvafr7g.js";
53
53
  import"../chunk-pqajwytd.js";
54
- import"../chunk-3nx8vj5a.js";
54
+ import"../chunk-zvmr2hqk.js";
55
55
  import"../chunk-7ytf06d3.js";
56
56
  import"../chunk-wr8qp979.js";
57
57
  import"../chunk-vjcd8d27.js";
@@ -60,12 +60,12 @@ import"../chunk-39tqv9hz.js";
60
60
  import"../chunk-gfdh9kqa.js";
61
61
  import"../chunk-dmn70ztd.js";
62
62
  import"../chunk-4gmng3vf.js";
63
- import"../chunk-qne45xqq.js";
64
- import"../chunk-2fv8sajb.js";
65
- import"../chunk-drz59ve0.js";
66
- import"../chunk-8fjmqjyx.js";
63
+ import"../chunk-2xvgy3x5.js";
64
+ import"../chunk-qnd7ehe5.js";
65
+ import"../chunk-tkdbge6v.js";
66
+ import"../chunk-69kt9q43.js";
67
67
  import"../chunk-v4jbb3rs.js";
68
- import"../chunk-d8yes9yx.js";
68
+ import"../chunk-swxzncrv.js";
69
69
  import"../chunk-6fsr7y93.js";
70
70
  import"../chunk-z3y5kg1x.js";
71
71
  import"../chunk-2jntasmh.js";