witnora 0.13.5 → 0.13.6

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 CHANGED
@@ -39,7 +39,7 @@ import { runOnboard } from "./onboard.js";
39
39
  import { inspectRepository } from "./onboard.js";
40
40
  import { renderReleaseEvaluation, runReleaseEvaluation } from "./release-evaluation.js";
41
41
  import { runPrivateCapabilityDiscovery } from "./private-discovery.js";
42
- import { doctorCustomerGateway, initializeCustomerGateway, readManagedCustomerGatewayLogs, renderGatewayDoctor, renderManagedGatewayStatus, restartManagedCustomerGateway, runCustomerGateway, startManagedCustomerGateway, statusManagedCustomerGateway, stopManagedCustomerGateway, } from "./gateway.js";
42
+ import { doctorCustomerGateway, initializeCustomerGateway, isGatewayDoctorReady, readManagedCustomerGatewayLogs, renderGatewayDoctor, renderManagedGatewayStatus, restartManagedCustomerGateway, runCustomerGateway, startManagedCustomerGateway, statusManagedCustomerGateway, stopManagedCustomerGateway, } from "./gateway.js";
43
43
  import { verifyEvidencePacketV02 } from "./evidence-v02.js";
44
44
  process.on("uncaughtException", reportFatalError);
45
45
  process.on("unhandledRejection", reportFatalError);
@@ -201,7 +201,7 @@ else if (command === "gateway") {
201
201
  else if (action === "doctor") {
202
202
  const result = await doctorCustomerGateway({ repository: readFlag("--repo") ?? process.cwd(), dir: readFlag("--dir") });
203
203
  process.stdout.write(readBoolFlag("--json") ? `${JSON.stringify(result, null, 2)}\n` : renderGatewayDoctor(result));
204
- if (result.overall !== "READY_TO_RECORD")
204
+ if (!isGatewayDoctorReady(result))
205
205
  process.exitCode = 1;
206
206
  }
207
207
  else if (action === "start") {
package/dist/gateway.js CHANGED
@@ -131,7 +131,9 @@ export async function upgradeCustomerGatewayRuntime(options) {
131
131
  const current = parseConfig(configRaw);
132
132
  if (current.projectId !== options.authorization.projectId || current.server !== options.authorization.server)
133
133
  throw new Error("Existing Gateway project/server binding does not match this authorized Runtime upgrade.");
134
- if (clientRaw !== gatewayClient(current) || readmeRaw !== gatewayReadme(current))
134
+ const generatedClient = clientRaw === gatewayClient(current)
135
+ || (!current.runtimeWorker && clientRaw === recordedGatewayClient(current));
136
+ if (!generatedClient || readmeRaw !== gatewayReadme(current))
135
137
  throw new Error("Existing Gateway files differ from the Witnora-generated version; refusing to overwrite them.");
136
138
  if (current.runtimeWorker && current.runtimeWorker.adapterId !== LOCAL_SANDBOX_ADAPTER_ID) {
137
139
  throw new Error("Existing Gateway already has a different Runtime worker; preserve it and reconfigure in Advanced mode.");
@@ -914,6 +916,9 @@ export function renderGatewayDoctor(result) {
914
916
  "",
915
917
  ].join("\n");
916
918
  }
919
+ export function isGatewayDoctorReady(result) {
920
+ return result.overall === "READY_TO_RECORD" || result.overall === "READY_FOR_RUNTIME";
921
+ }
917
922
  function parseConfig(raw) {
918
923
  const value = JSON.parse(raw);
919
924
  if (value.schemaVersion !== CONFIG_SCHEMA || !value.projectId || !value.server || !value.connectionName || !value.collectorId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "witnora",
3
- "version": "0.13.5",
3
+ "version": "0.13.6",
4
4
  "description": "Independent assurance for covered agent action paths across models and frameworks.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",