@critiquedotsh/harness 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +17 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -12620,7 +12620,10 @@ __export(critique_code_runtime_config_exports, {
|
|
|
12620
12620
|
CRITIQUE_CODE_CREDENTIAL_LABELS: () => CRITIQUE_CODE_CREDENTIAL_LABELS,
|
|
12621
12621
|
CRITIQUE_CODE_PROVIDER_ROUTES: () => CRITIQUE_CODE_PROVIDER_ROUTES,
|
|
12622
12622
|
CRITIQUE_CODE_SETTINGS_SCHEMA: () => CRITIQUE_CODE_SETTINGS_SCHEMA,
|
|
12623
|
+
DEFAULT_CRITIQUE_INFERENCE_BASE_URL: () => DEFAULT_CRITIQUE_INFERENCE_BASE_URL,
|
|
12624
|
+
DEFAULT_CRITIQUE_INFERENCE_ORIGIN: () => DEFAULT_CRITIQUE_INFERENCE_ORIGIN,
|
|
12623
12625
|
applyStoredCritiqueCodeCredentials: () => applyStoredCritiqueCodeCredentials,
|
|
12626
|
+
canonicalizeCritiqueInferenceBaseUrl: () => canonicalizeCritiqueInferenceBaseUrl,
|
|
12624
12627
|
credentialKindForRoute: () => credentialKindForRoute,
|
|
12625
12628
|
critiqueCodeAuthPath: () => critiqueCodeAuthPath,
|
|
12626
12629
|
critiqueCodeHome: () => critiqueCodeHome,
|
|
@@ -12835,12 +12838,21 @@ function preferredCritiqueCodeRoute(credentials, settings) {
|
|
|
12835
12838
|
if (hasCritiqueCodeCredential(credentials, "custom-openai")) return "custom-openai";
|
|
12836
12839
|
return void 0;
|
|
12837
12840
|
}
|
|
12841
|
+
function canonicalizeCritiqueInferenceBaseUrl(url) {
|
|
12842
|
+
const trimmed = url.trim().replace(/\/+$/, "");
|
|
12843
|
+
try {
|
|
12844
|
+
const parsed = new URL(trimmed);
|
|
12845
|
+
if (parsed.hostname === "critique.sh") parsed.hostname = "www.critique.sh";
|
|
12846
|
+
return parsed.toString().replace(/\/+$/, "");
|
|
12847
|
+
} catch {
|
|
12848
|
+
return trimmed;
|
|
12849
|
+
}
|
|
12850
|
+
}
|
|
12838
12851
|
function inferenceBaseUrl(env = process.env) {
|
|
12839
12852
|
const override = env.CRITIQUE_INFERENCE_BASE_URL?.trim();
|
|
12840
|
-
|
|
12841
|
-
return "https://critique.sh/api/v1";
|
|
12853
|
+
return canonicalizeCritiqueInferenceBaseUrl(override || DEFAULT_CRITIQUE_INFERENCE_BASE_URL);
|
|
12842
12854
|
}
|
|
12843
|
-
var CRITIQUE_CODE_SETTINGS_SCHEMA, CRITIQUE_CODE_PROVIDER_ROUTES, CRITIQUE_CODE_CREDENTIAL_KINDS, CRITIQUE_CODE_AGENT_MODES, CRITIQUE_CODE_AUTONOMY, CREDENTIAL_ENV, AUTH_PROVIDER_ID, CRITIQUE_CODE_CREDENTIAL_LABELS, ROUTE_CREDENTIAL_KIND;
|
|
12855
|
+
var CRITIQUE_CODE_SETTINGS_SCHEMA, CRITIQUE_CODE_PROVIDER_ROUTES, CRITIQUE_CODE_CREDENTIAL_KINDS, CRITIQUE_CODE_AGENT_MODES, CRITIQUE_CODE_AUTONOMY, CREDENTIAL_ENV, AUTH_PROVIDER_ID, CRITIQUE_CODE_CREDENTIAL_LABELS, ROUTE_CREDENTIAL_KIND, DEFAULT_CRITIQUE_INFERENCE_ORIGIN, DEFAULT_CRITIQUE_INFERENCE_BASE_URL;
|
|
12844
12856
|
var init_critique_code_runtime_config = __esm({
|
|
12845
12857
|
"lib/finish/critique-code-runtime-config.ts"() {
|
|
12846
12858
|
"use strict";
|
|
@@ -12918,6 +12930,8 @@ var init_critique_code_runtime_config = __esm({
|
|
|
12918
12930
|
"vercel-ai-gateway": "vercel-ai-gateway",
|
|
12919
12931
|
"custom-openai": "custom-openai"
|
|
12920
12932
|
};
|
|
12933
|
+
DEFAULT_CRITIQUE_INFERENCE_ORIGIN = "https://www.critique.sh";
|
|
12934
|
+
DEFAULT_CRITIQUE_INFERENCE_BASE_URL = `${DEFAULT_CRITIQUE_INFERENCE_ORIGIN}/api/v1`;
|
|
12921
12935
|
}
|
|
12922
12936
|
});
|
|
12923
12937
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@critiquedotsh/harness",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "CritiqueCode author agent — implement, then forced review and verified repair. Same org as @critiquedotsh/cli; not the sidecar.",
|
|
5
5
|
"homepage": "https://critique.sh/docs/platform/critique-code",
|
|
6
6
|
"repository": {
|