@openclaw/typesafe 2026.11.7 → 2026.11.9

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.
@@ -1,4 +1,4 @@
1
- import { a as HOSTED_ORIGIN, c as providerBaseUrl, o as hasCredentials, r as evaluationError, s as localBaseUrl, t as EvaluationError, u as usesHostedEndpoint } from "./errors-CAxlQL5v.mjs";
1
+ import { a as HOSTED_ORIGIN, c as providerBaseUrl, o as hasCredentials, r as evaluationError, s as localBaseUrl, t as EvaluationError, u as usesHostedEndpoint } from "./errors-BEKARoBh.mjs";
2
2
  import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
3
3
  import { createProviderCredentialMatcher, fetchWithProviderHttpGuard, resolveProviderHttpRequestConfigWithOriginTrust, resolveProviderTransportSsrFPolicy, sanitizeConfiguredModelProviderRequest } from "openclaw/plugin-sdk/provider-http";
4
4
  import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
@@ -6,7 +6,7 @@ import { responseWithRelease, shouldUseEnvHttpProxyForUrl, withTrustedEnvProxyGu
6
6
  import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
7
7
  import { parseRetryAfterHeaderSeconds } from "openclaw/plugin-sdk/retry-runtime";
8
8
  import { isDeepStrictEqual } from "node:util";
9
- //#region extensions/typesafe/src/schema-validator.generated.js
9
+ // extensions/typesafe/src/schema-validator.generated.js
10
10
  /*!
11
11
  TypeBox
12
12
 
@@ -89,8 +89,7 @@ var isEvaluationQuestion = (() => {
89
89
  ], check_0 = (value) => typeof value == "object" && value !== null && !Array.isArray(value) && "type" in value && Object.getOwnPropertyNames(value).every((unique_0, unique_1) => External[0].test(unique_0) || !1) && typeof value.type == "string" && value.type === "noul" && (value.instructions === void 0 || !("instructions" in value) || typeof value.instructions == "string" || typeof value.instructions == "object" && value.instructions !== null && !Array.isArray(value.instructions) && Object.getOwnPropertyNames(value.instructions).every((unique_2, unique_3) => External[1].test(unique_2) || !0) && !0 || Array.isArray(value.instructions) && value.instructions.every((unique_4, index) => !0) || value.instructions === null) && (value.criteria === void 0 || !("criteria" in value) || typeof value.criteria == "object" && value.criteria !== null && !Array.isArray(value.criteria) && Object.getOwnPropertyNames(value.criteria).every((unique_5, unique_6) => External[2].test(unique_5) || !1) && (value.criteria.true === void 0 || !("true" in value.criteria) || typeof value.criteria.true == "string" || typeof value.criteria.true == "object" && value.criteria.true !== null && !Array.isArray(value.criteria.true) && Object.getOwnPropertyNames(value.criteria.true).every((unique_7, unique_8) => External[3].test(unique_7) || !0) && !0 || Array.isArray(value.criteria.true) && value.criteria.true.every((unique_9, index) => !0) || value.criteria.true === null) && (value.criteria.false === void 0 || !("false" in value.criteria) || typeof value.criteria.false == "string" || typeof value.criteria.false == "object" && value.criteria.false !== null && !Array.isArray(value.criteria.false) && Object.getOwnPropertyNames(value.criteria.false).every((unique_10, unique_11) => External[4].test(unique_10) || !0) && !0 || Array.isArray(value.criteria.false) && value.criteria.false.every((unique_12, index) => !0) || value.criteria.false === null) || value.criteria === null) || typeof value == "object" && value !== null && !Array.isArray(value) && "type" in value && "criteria" in value && Object.getOwnPropertyNames(value).every((unique_13, unique_14) => External[5].test(unique_13) || !1) && typeof value.type == "string" && value.type === "choice" && (value.instructions === void 0 || !("instructions" in value) || typeof value.instructions == "string" || typeof value.instructions == "object" && value.instructions !== null && !Array.isArray(value.instructions) && Object.getOwnPropertyNames(value.instructions).every((unique_15, unique_16) => External[6].test(unique_15) || !0) && !0 || Array.isArray(value.instructions) && value.instructions.every((unique_17, index) => !0) || value.instructions === null) && typeof value.criteria == "object" && value.criteria !== null && !Array.isArray(value.criteria) && Object.getOwnPropertyNames(value.criteria).every((unique_18, unique_19) => External[7].test(unique_18) || typeof value.criteria[unique_18] == "string" || typeof value.criteria[unique_18] == "object" && value.criteria[unique_18] !== null && !Array.isArray(value.criteria[unique_18]) && Object.getOwnPropertyNames(value.criteria[unique_18]).every((unique_20, unique_21) => External[8].test(unique_20) || !0) && !0 || Array.isArray(value.criteria[unique_18]) && value.criteria[unique_18].every((unique_22, index) => !0) || value.criteria[unique_18] === null) && Object.getOwnPropertyNames(value.criteria).length >= 2 && Object.getOwnPropertyNames(value.criteria).length <= 255 || typeof value == "object" && value !== null && !Array.isArray(value) && "type" in value && "criteria" in value && Object.getOwnPropertyNames(value).every((unique_23, unique_24) => External[9].test(unique_23) || !1) && typeof value.type == "string" && value.type === "score" && (value.instructions === void 0 || !("instructions" in value) || typeof value.instructions == "string" || typeof value.instructions == "object" && value.instructions !== null && !Array.isArray(value.instructions) && Object.getOwnPropertyNames(value.instructions).every((unique_25, unique_26) => External[10].test(unique_25) || !0) && !0 || Array.isArray(value.instructions) && value.instructions.every((unique_27, index) => !0) || value.instructions === null) && Array.isArray(value.criteria) && value.criteria.every((unique_28, index) => typeof unique_28 == "string" || typeof unique_28 == "object" && unique_28 !== null && !Array.isArray(unique_28) && Object.getOwnPropertyNames(unique_28).every((unique_29, unique_30) => External[11].test(unique_29) || !0) && !0 || Array.isArray(unique_28) && unique_28.every((unique_31, index2) => !0) || unique_28 === null) && value.criteria.length >= 2 && value.criteria.length <= 10;
90
90
  return (value) => check_0(value);
91
91
  })();
92
- //#endregion
93
- //#region extensions/typesafe/src/schema.ts
92
+ // extensions/typesafe/src/schema.ts
94
93
  const MAX_JSON_BYTES = 4194304;
95
94
  const MAX_JSON_NODES = 262144;
96
95
  const MAX_JSON_DEPTH = 64;
@@ -167,8 +166,7 @@ function parseResult(value, input) {
167
166
  throw new Error("TypeSafe returned an invalid evaluation response.");
168
167
  }
169
168
  }
170
- //#endregion
171
- //#region extensions/typesafe/src/client.ts
169
+ // extensions/typesafe/src/client.ts
172
170
  const IMAGE_OPT_IN_HEADER = "TypeSafe-Danger-Zone-Images";
173
171
  const API_BASE_URL = `${HOSTED_ORIGIN}/v1`;
174
172
  function httpError(response) {
@@ -360,5 +358,4 @@ async function evaluate(input, config, abortSignal, deadlineMonotonicMs, isAdmis
360
358
  throw evaluationError(error, abortSignal?.aborted ?? false);
361
359
  }
362
360
  }
363
- //#endregion
364
361
  export { evaluate };
@@ -1,5 +1,5 @@
1
1
  import { Type } from "typebox";
2
- //#region extensions/typesafe/src/config.ts
2
+ // extensions/typesafe/src/config.ts
3
3
  const LOCAL_BASE_URL_PATTERN = "^https?://(?:localhost|127\\.0\\.0\\.1|\\[::1\\])(?::[0-9]{1,5})?/?$";
4
4
  const localBaseUrlPattern = new RegExp(LOCAL_BASE_URL_PATTERN);
5
5
  const ConfigSchema = Type.Object({
@@ -65,8 +65,7 @@ function runtimeConfig(config) {
65
65
  timeoutMs
66
66
  };
67
67
  }
68
- //#endregion
69
- //#region extensions/typesafe/src/errors.ts
68
+ // extensions/typesafe/src/errors.ts
70
69
  var EvaluationError = class extends Error {
71
70
  constructor(message, reason, retryAfterMs) {
72
71
  super(message);
@@ -90,5 +89,4 @@ function decisionFailure(error) {
90
89
  };
91
90
  throw new Error("TypeSafe decision adapter contract failure.");
92
91
  }
93
- //#endregion
94
92
  export { HOSTED_ORIGIN as a, providerBaseUrl as c, ConfigSchema as i, runtimeConfig as l, decisionFailure as n, hasCredentials as o, evaluationError as r, localBaseUrl as s, EvaluationError as t, usesHostedEndpoint as u };
@@ -1 +1 @@
1
- {"version":3,"entries":[{"output":"index.js","source":"extensions/typesafe/index.ts"}],"chunks":[{"output":".setup/client-28h1nLtb.mjs","sha256":"c2e0db4d6cb47bcda8344d8e566cf0b9bb3359e58cbc41bc7d5678bdf9be945e","facadeSource":"extensions/typesafe/src/client.ts","sources":["extensions/typesafe/src/client.ts","extensions/typesafe/src/schema-validator.generated.js","extensions/typesafe/src/schema.ts"]},{"output":".setup/errors-CAxlQL5v.mjs","sha256":"f6305d81e1570cef8ef01ac9c437653ecd74e6fe010c8285cd617b406542d0d9","facadeSource":null,"sources":["extensions/typesafe/src/config.ts","extensions/typesafe/src/errors.ts"]},{"output":"index.js","sha256":"53426ee7acb9187bd0f084397442375d5b07b3cbc19c395f0211f39613cb7da6","facadeSource":"extensions/typesafe/index.ts","sources":["extensions/typesafe/index.ts","extensions/typesafe/openclaw.plugin.json","extensions/typesafe/src/credentials.ts","extensions/typesafe/src/decisions.ts"]}],"unrenderedSources":[]}
1
+ {"version":3,"entries":[{"output":"index.js","source":"extensions/typesafe/index.ts"}],"chunks":[{"output":".setup/client-DI7wM7N-.mjs","sha256":"c2bf5117466053d799751214c8c15858b26601a00f2bd5576a844a8cf993243c","facadeSource":"extensions/typesafe/src/client.ts","sources":["extensions/typesafe/src/client.ts","extensions/typesafe/src/schema-validator.generated.js","extensions/typesafe/src/schema.ts"]},{"output":".setup/errors-BEKARoBh.mjs","sha256":"f79730614710fdd9a257f0ffab888aee49670d6546baa9047388f426723b0ac8","facadeSource":null,"sources":["extensions/typesafe/src/config.ts","extensions/typesafe/src/errors.ts"]},{"output":"index.js","sha256":"7f992578d29999633a1e7875c7172c98ffec2039728952a44f380a81ca71f4f7","facadeSource":"extensions/typesafe/index.ts","sources":["extensions/typesafe/index.ts","extensions/typesafe/openclaw.plugin.json","extensions/typesafe/src/credentials.ts","extensions/typesafe/src/decisions.ts"]}],"unrenderedSources":[]}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as providerBaseUrl, i as ConfigSchema, l as runtimeConfig, n as decisionFailure, o as hasCredentials } from "./.setup/errors-CAxlQL5v.mjs";
1
+ import { c as providerBaseUrl, i as ConfigSchema, l as runtimeConfig, n as decisionFailure, o as hasCredentials } from "./.setup/errors-BEKARoBh.mjs";
2
2
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
3
3
  import { findNormalizedProviderValue } from "openclaw/plugin-sdk/model-ref-parse";
4
4
  import { resolveSecretInputString } from "openclaw/plugin-sdk/secret-input";
@@ -8,7 +8,7 @@ import { decisionBatchV2ToV1, decisionResultV1ToV2, validateDecisionBatchV2 } fr
8
8
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
9
9
  import { resolveProviderRequestHeaders } from "openclaw/plugin-sdk/provider-http";
10
10
  import { omitNullRequestHeaders } from "openclaw/plugin-sdk/provider-request-headers";
11
- //#region extensions/typesafe/src/credentials.ts
11
+ // extensions/typesafe/src/credentials.ts
12
12
  /** Read the active host snapshot only; never resolve refs or discover fallback credentials. */
13
13
  function resolveRuntimeConfig(snapshot) {
14
14
  const configured = snapshot.plugins?.entries?.typesafe?.config;
@@ -37,8 +37,7 @@ function resolveRuntimeConfig(snapshot) {
37
37
  apiKey: prepared.value
38
38
  };
39
39
  }
40
- //#endregion
41
- //#region extensions/typesafe/openclaw.plugin.json
40
+ // extensions/typesafe/openclaw.plugin.json
42
41
  var modelCatalog = { "providers": { "typesafe": {
43
42
  "models": [
44
43
  {
@@ -199,9 +198,8 @@ var modelCatalog = { "providers": { "typesafe": {
199
198
  ],
200
199
  "authScope": "plugin"
201
200
  } } };
202
- //#endregion
203
- //#region extensions/typesafe/src/decisions.ts
204
- const loadClient = createLazyRuntimeModule(() => import("./.setup/client-28h1nLtb.mjs"));
201
+ // extensions/typesafe/src/decisions.ts
202
+ const loadClient = createLazyRuntimeModule(() => import("./.setup/client-DI7wM7N-.mjs"));
205
203
  const models = modelCatalog.providers.typesafe.models;
206
204
  const hostedBaseUrl = providerBaseUrl(models[0].baseUrl);
207
205
  function effectiveBaseUrl(config) {
@@ -463,8 +461,7 @@ function createPreparedDecisionProvider(getConfig) {
463
461
  }
464
462
  };
465
463
  }
466
- //#endregion
467
- //#region extensions/typesafe/index.ts
464
+ // extensions/typesafe/index.ts
468
465
  var typesafe_default = definePluginEntry({
469
466
  id: "typesafe",
470
467
  name: "TypeSafe AI",
@@ -474,5 +471,4 @@ var typesafe_default = definePluginEntry({
474
471
  api.registerDecisionProvider(createPreparedDecisionProvider(() => resolveRuntimeConfig(api.runtime.config.current())));
475
472
  }
476
473
  });
477
- //#endregion
478
474
  export { typesafe_default as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/typesafe",
3
- "version": "2026.11.7",
3
+ "version": "2026.11.9",
4
4
  "description": "OpenClaw TypeSafe typed decision provider",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,11 +21,11 @@
21
21
  "minHostVersion": ">=2026.9.6"
22
22
  },
23
23
  "compat": {
24
- "pluginApi": ">=2026.11.7"
24
+ "pluginApi": ">=2026.11.9"
25
25
  },
26
26
  "build": {
27
27
  "bundledDist": false,
28
- "openclawVersion": "2026.11.7"
28
+ "openclawVersion": "2026.11.9"
29
29
  },
30
30
  "release": {
31
31
  "publishToClawHub": true,
@@ -43,7 +43,7 @@
43
43
  "assets/activity.svg"
44
44
  ],
45
45
  "peerDependencies": {
46
- "openclaw": ">=2026.11.7"
46
+ "openclaw": ">=2026.11.9"
47
47
  },
48
48
  "peerDependenciesMeta": {
49
49
  "openclaw": {