@frockbot/configuration-core 0.3.11 → 0.3.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frockbot/configuration-core",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -12,8 +12,8 @@
12
12
  "typecheck": "tsc --noEmit -p tsconfig.json"
13
13
  },
14
14
  "dependencies": {
15
- "@frockbot/connection-core": "0.3.11",
16
- "@frockbot/kernel-composition": "0.3.11"
15
+ "@frockbot/connection-core": "0.3.12",
16
+ "@frockbot/kernel-composition": "0.3.12"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/bun": "1.3.6",
package/src/index.test.ts CHANGED
@@ -1664,7 +1664,7 @@ describe("effective Bot model resolution", () => {
1664
1664
  */
1665
1665
  const flockModel: ModelBindingV1 = {
1666
1666
  connectionId: "flock-ai",
1667
- providerModelId: "@flock/auto",
1667
+ providerModelId: "@frock/auto",
1668
1668
  };
1669
1669
  const flockPackage: ExecutionPackageDefinition = {
1670
1670
  packageId: "provider-flock-ai",
@@ -1705,7 +1705,7 @@ describe("effective Bot model resolution", () => {
1705
1705
  connectionId: "flock-ai",
1706
1706
  packageId: "provider-flock-ai",
1707
1707
  connectionTypeId: "flock-ai-account",
1708
- displayName: "Flock AI",
1708
+ displayName: "Frock AI",
1709
1709
  state: "ready",
1710
1710
  providerType: "flock-ai",
1711
1711
  modelCatalog: {
@@ -1714,7 +1714,7 @@ describe("effective Bot model resolution", () => {
1714
1714
  state: "fresh",
1715
1715
  models: [
1716
1716
  {
1717
- providerModelId: "@flock/auto",
1717
+ providerModelId: "@frock/auto",
1718
1718
  displayName: "Auto",
1719
1719
  capabilities: { tools: true, vision: false, reasoning: true },
1720
1720
  source: "discovered",
@@ -99,6 +99,24 @@ function boundedText(value: unknown, label: string, maximum: number): string {
99
99
  return normalized;
100
100
  }
101
101
 
102
+ /**
103
+ * The built-in provider was named Flock AI before it was named Frock AI, and
104
+ * its model ids carried the provider's name. Bindings written before the
105
+ * rename are still in production storage, so a stored `@flock/…` id is read as
106
+ * the `@frock/…` id it has always meant. This is the one place that
107
+ * translation happens: every binding crosses this decoder, so resolution,
108
+ * catalog lookup, presentation and the provider request all see one spelling,
109
+ * and nothing writes the old one back.
110
+ */
111
+ const LEGACY_FROCK_MODEL_PREFIX = "@flock/";
112
+ const FROCK_MODEL_PREFIX = "@frock/";
113
+
114
+ function normalizedProviderModelId(id: string): string {
115
+ return id.startsWith(LEGACY_FROCK_MODEL_PREFIX)
116
+ ? `${FROCK_MODEL_PREFIX}${id.slice(LEGACY_FROCK_MODEL_PREFIX.length)}`
117
+ : id;
118
+ }
119
+
102
120
  /** The exact model binding DTO, decoded wherever it crosses a durable seam. */
103
121
  export function decodeModelBindingV1(value: unknown): ModelBindingV1 {
104
122
  const binding = record(value, "model");
@@ -115,10 +133,8 @@ export function decodeModelBindingV1(value: unknown): ModelBindingV1 {
115
133
  }
116
134
  return {
117
135
  connectionId: binding.connectionId,
118
- providerModelId: boundedText(
119
- binding.providerModelId,
120
- "model.providerModelId",
121
- 256,
136
+ providerModelId: normalizedProviderModelId(
137
+ boundedText(binding.providerModelId, "model.providerModelId", 256),
122
138
  ),
123
139
  };
124
140
  }