@amaster.ai/employee-runtime-connector 0.1.0-beta.47 → 0.1.0-beta.48

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.
@@ -3353,6 +3353,18 @@ function tcReadString(value) {
3353
3353
  function tcReadNumber(value, fallback = 0) {
3354
3354
  return typeof value === "number" && Number.isFinite(value) ? value : fallback;
3355
3355
  }
3356
+ var TC_PI_ARGUMENT_VALIDATION_NODE_BUDGET = 4e3;
3357
+ function tcContainsPiArgumentValidation(value, depth = 0, seen = /* @__PURE__ */ new WeakSet(), budget = { remaining: TC_PI_ARGUMENT_VALIDATION_NODE_BUDGET }) {
3358
+ if (budget.remaining <= 0) return false;
3359
+ budget.remaining -= 1;
3360
+ if (typeof value === "string") {
3361
+ return /\binvalid(?:[_ -]+)tool(?:[_ -]+)arguments?\b|\binvalid args json\b|\btool[- ]arguments? (?:failed )?validation\b/i.test(value.slice(0, 2e4));
3362
+ }
3363
+ if (!value || typeof value !== "object" || depth >= 6 || seen.has(value)) return false;
3364
+ seen.add(value);
3365
+ const entries = Array.isArray(value) ? value.slice(0, 40).map((entry, index) => [String(index), entry]) : Object.entries(value).slice(0, 80);
3366
+ return entries.some(([, entry]) => tcContainsPiArgumentValidation(entry, depth + 1, seen, budget));
3367
+ }
3356
3368
  function tcTruncateText(value, maxChars = 16e3) {
3357
3369
  const text = String(value ?? "");
3358
3370
  if (text.length <= maxChars) return text;
@@ -3724,6 +3736,7 @@ function summarizePiEvent(event) {
3724
3736
  if (type === "tool_execution_start" || type === "tool_execution_end") {
3725
3737
  const toolName = tcReadString(event.toolName) ?? "unknown";
3726
3738
  const completed = type === "tool_execution_end";
3739
+ const argumentValidationFailed = completed && event.isError === true && tcContainsPiArgumentValidation(event.result);
3727
3740
  return {
3728
3741
  stream: "system",
3729
3742
  level: completed && event.isError === true ? "error" : "info",
@@ -3733,7 +3746,8 @@ function summarizePiEvent(event) {
3733
3746
  executorEventType: type,
3734
3747
  toolName,
3735
3748
  toolCallId: tcReadString(event.toolCallId),
3736
- status: completed ? event.isError === true ? "failed" : "completed" : "started"
3749
+ status: completed ? event.isError === true ? "failed" : "completed" : "started",
3750
+ ...argumentValidationFailed ? { errorCode: "invalid_tool_arguments" } : {}
3737
3751
  }
3738
3752
  };
3739
3753
  }
@@ -7845,7 +7859,7 @@ function createBrowserSessionBroker(options) {
7845
7859
  if (browserExecutablePath && !browserExecutableReady) {
7846
7860
  return { ready: false, reason: "chrome_unavailable" };
7847
7861
  }
7848
- if (typeof playwright.chromium.executablePath === "function") {
7862
+ if (!browserExecutablePath && typeof playwright.chromium.executablePath === "function") {
7849
7863
  const executablePath = playwright.chromium.executablePath();
7850
7864
  if (!executablePath || !existsSync12(executablePath)) {
7851
7865
  return { ready: false, reason: "chrome_unavailable" };
@@ -8130,7 +8144,7 @@ function createPublicNetworkScope(options = {}) {
8130
8144
  }
8131
8145
 
8132
8146
  // src/amaster-runtime-daemon.mjs
8133
- var CONNECTOR_VERSION = "0.1.0-beta.47";
8147
+ var CONNECTOR_VERSION = "0.1.0-beta.48";
8134
8148
  var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
8135
8149
  var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
8136
8150
  var CHECKPOINT_TTL_MS = 24 * 60 * 60 * 1e3;
@@ -5,7 +5,7 @@ import { dirname, join, resolve } from "node:path";
5
5
  import { homedir, hostname } from "node:os";
6
6
  import { fileURLToPath } from "node:url";
7
7
 
8
- const CONNECTOR_VERSION = "0.1.0-beta.47";
8
+ const CONNECTOR_VERSION = "0.1.0-beta.48";
9
9
 
10
10
  const CAPABILITIES = [
11
11
  "remote_registration",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amaster.ai/employee-runtime-connector",
3
- "version": "0.1.0-beta.47",
3
+ "version": "0.1.0-beta.48",
4
4
  "description": "MirrorX runtime connector CLI and daemon",
5
5
  "license": "MIT",
6
6
  "type": "module",