@amaster.ai/employee-runtime-connector 0.1.1-beta.242 → 0.1.1-beta.244

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/README.md CHANGED
@@ -161,3 +161,7 @@ connector package version under `/opt/pi-cli-runtime` and sets
161
161
  `AMASTER_RUNTIME_CLI_TARGET` to that package binary. Do not mount repository
162
162
  scripts or previously installed runtime code from `/data` over this path;
163
163
  `/data` is a state volume and must survive package upgrades and rollbacks.
164
+
165
+ ### Pi extension load diagnostics
166
+
167
+ Successful `pi_agent_extension_load_timing` events are forwarded as `system` / `info` records with an extension name and duration. The event payload preserves `sourceStream: stderr` and the original structured diagnostic. Successful timing records are excluded from result stderr excerpts so they do not create warning panels. Failed loads remain `stderr` / `error` with their diagnostic details; unknown or malformed events keep the existing stderr behavior. This applies to new runs after updating the connector in the runner image; historical log records are not rewritten.
@@ -9026,11 +9026,14 @@ var goalCriteriaProgressReadModelSchema = external_exports.object({
9026
9026
  items: external_exports.array(goalCriterionProgressReadModelSchema)
9027
9027
  }).strict();
9028
9028
  var DEFAULT_CONTINUE_PROGRESS_RATIONALE = "Board \u786E\u8BA4\u5F53\u524D\u4E1A\u52A1\u7ED3\u679C\u5C1A\u672A\u8FBE\u5230\uFF0C\u7EE7\u7EED\u63A8\u8FDB\u3002";
9029
+ var DEFAULT_KEEP_IN_GOAL_RATIONALE = "\u516C\u53F8\u8D1F\u8D23\u4EBA\u786E\u8BA4\u8FD9\u6761\u8FBE\u6210\u6807\u51C6\u4ECD\u9002\u7528\u4E8E\u5F53\u524D\u76EE\u6807\u3002";
9030
+ var DEFAULT_DEFER_GOAL_CRITERION_RATIONALE = "\u516C\u53F8\u8D1F\u8D23\u4EBA\u8BBE\u7F6E\u4E86\u4E0B\u6B21\u786E\u8BA4\u65F6\u95F4\u3002";
9029
9031
  var boardDecideGoalCriterionBaseSchema = external_exports.object({
9030
9032
  rationale: external_exports.string().trim().min(1).max(2e3),
9031
9033
  expectedDecisionToken: sha256Schema5
9032
9034
  }).strict();
9033
9035
  var continueProgressRationaleSchema = external_exports.string().trim().max(2e3).optional().transform((value) => value || DEFAULT_CONTINUE_PROGRESS_RATIONALE);
9036
+ var optionalGoalCriterionRationaleSchema = (defaultValue) => external_exports.string().trim().max(2e3).optional().transform((value) => value || defaultValue);
9034
9037
  var correctedFactSourceSchema = external_exports.object({
9035
9038
  kind: external_exports.literal("board_assertion"),
9036
9039
  label: external_exports.string().trim().min(1).max(200)
@@ -9047,19 +9050,25 @@ var correctedGoalCriterionFactSchema = external_exports.object({
9047
9050
  var boardDecideGoalCriterionSchema = external_exports.discriminatedUnion("action", [
9048
9051
  boardDecideGoalCriterionBaseSchema.extend({
9049
9052
  action: external_exports.enum([
9050
- "keep_in_goal",
9051
9053
  "mark_not_applicable",
9052
9054
  "confirm_achieved",
9053
9055
  "correct_facts"
9054
9056
  ])
9055
9057
  }).strict(),
9058
+ external_exports.object({
9059
+ action: external_exports.literal("keep_in_goal"),
9060
+ rationale: optionalGoalCriterionRationaleSchema(DEFAULT_KEEP_IN_GOAL_RATIONALE),
9061
+ expectedDecisionToken: sha256Schema5
9062
+ }).strict(),
9056
9063
  external_exports.object({
9057
9064
  action: external_exports.literal("continue_progress"),
9058
9065
  rationale: continueProgressRationaleSchema,
9059
9066
  expectedDecisionToken: sha256Schema5
9060
9067
  }).strict(),
9061
- boardDecideGoalCriterionBaseSchema.extend({
9068
+ external_exports.object({
9062
9069
  action: external_exports.literal("defer"),
9070
+ rationale: optionalGoalCriterionRationaleSchema(DEFAULT_DEFER_GOAL_CRITERION_RATIONALE),
9071
+ expectedDecisionToken: sha256Schema5,
9063
9072
  remindAt: external_exports.string().datetime({ offset: true })
9064
9073
  }).strict(),
9065
9074
  boardDecideGoalCriterionBaseSchema.extend({
@@ -27134,6 +27143,11 @@ function isProviderBookkeepingEvent(event) {
27134
27143
  function isCodexHostDiagnosticNoise(text2) {
27135
27144
  return /codex_core_plugins::(?:remote::remote_installed_plugin_sync|manager|marketplace|loader|manifest|startup_sync)\b/.test(text2) || /chatgpt authentication required for remote plugin catalog/i.test(text2) || /remote plugin sync request .* failed with status 401/i.test(text2) || /skipping (?:invalid )?marketplace plugin/i.test(text2) || /configured non-curated plugin no longer exists in discovered marketplaces/i.test(text2) || /codex_memories_write::/.test(text2) || /state db .* failed during memories startup/i.test(text2) || /failed to claim job: error returned from database: .* no such table:/i.test(text2) || /codex_rmcp_client::stdio_server_launcher: Failed to kill MCP process group/i.test(text2);
27136
27145
  }
27146
+ function piExtensionLoadTiming(text2) {
27147
+ const event = parseJsonLine(text2);
27148
+ if (event?.event !== "pi_agent_extension_load_timing" || !tcReadString(event.extensionPath) || !["completed", "failed"].includes(event.status)) return null;
27149
+ return event;
27150
+ }
27137
27151
  function isPiHostDiagnosticNoise(text2) {
27138
27152
  return /(?:browser[-_\s]?use|extension).*(?:connection closed)|(?:connection closed).*(?:browser[-_\s]?use|extension)/i.test(text2) || /^\[(?:pi-channels|pi-image-gen|pi-web-access)\]\s+(?:config|session_start|agent_start)\b/i.test(text2) || /@amaster\.ai\/pi-(?:channels|image-gen|web-access|browser-use).*(?:config|session_start|agent_start)/i.test(text2) || /^Connection error\.$/.test(text2) || /^TypeError:\s*terminated$/.test(text2);
27139
27153
  }
@@ -27147,6 +27161,8 @@ function filterExecutionStderrForResult(executorKind, stderr) {
27147
27161
  if (hadTrailingNewline) lines.pop();
27148
27162
  const kept = lines.filter((line) => {
27149
27163
  const trimmed = line.trim();
27164
+ const timing = executorKind === "pi" ? piExtensionLoadTiming(trimmed) : null;
27165
+ if (timing) return timing.status !== "completed";
27150
27166
  return !trimmed || !isNoise(trimmed);
27151
27167
  });
27152
27168
  const result2 = kept.join("\n");
@@ -27500,6 +27516,28 @@ function summarizePiEvent(event) {
27500
27516
  function summarizeExecutorOutputLine(executorKind, stream, line) {
27501
27517
  const text2 = String(line ?? "").trim();
27502
27518
  if (!text2) return null;
27519
+ if (executorKind === "pi" && stream === "stderr") {
27520
+ const timing = piExtensionLoadTiming(text2);
27521
+ if (timing) {
27522
+ const completed = timing.status === "completed";
27523
+ const normalizedPath = timing.extensionPath.replaceAll("\\", "/");
27524
+ const packagePath = normalizedPath.split("/node_modules/").at(-1);
27525
+ const parts = packagePath.split("/");
27526
+ const name = normalizedPath.includes("/node_modules/") ? parts.slice(0, parts[0].startsWith("@") ? 2 : 1).join("/") : parts.at(-1);
27527
+ const duration = typeof timing.totalDurationMs === "number" && Number.isFinite(timing.totalDurationMs) && timing.totalDurationMs >= 0 ? ` \xB7 ${Math.round(timing.totalDurationMs)} ms` : "";
27528
+ return {
27529
+ stream: completed ? "system" : "stderr",
27530
+ level: completed ? "info" : "error",
27531
+ message: completed ? `\u6269\u5C55\u52A0\u8F7D\u5B8C\u6210 \xB7 ${name}${duration}` : tcTruncateText(text2),
27532
+ payload: {
27533
+ presentationKind: completed ? "diagnostic" : "error",
27534
+ executorEventType: timing.event,
27535
+ sourceStream: stream,
27536
+ diagnostic: timing
27537
+ }
27538
+ };
27539
+ }
27540
+ }
27503
27541
  if (executorKind === "codex" && stream === "stderr" && isCodexHostDiagnosticNoise(text2)) return null;
27504
27542
  if (executorKind === "pi" && stream === "stderr" && isPiHostDiagnosticNoise(text2)) return null;
27505
27543
  if (stream === "stdout") {
@@ -30679,7 +30717,7 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
30679
30717
  }
30680
30718
 
30681
30719
  // src/amaster-runtime-daemon.mjs
30682
- var CONNECTOR_VERSION = "0.1.1-beta.242";
30720
+ var CONNECTOR_VERSION = "0.1.1-beta.244";
30683
30721
  var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
30684
30722
  var daemonRequire = createRequire(import.meta.url);
30685
30723
  var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
@@ -7,7 +7,7 @@ import { homedir, hostname } from "node:os";
7
7
  import { fileURLToPath } from "node:url";
8
8
  import { BUILD_SUPPORTED_CAPABILITIES } from "./amaster-runtime-daemon/capability-registry.mjs";
9
9
 
10
- const CONNECTOR_VERSION = "0.1.1-beta.242";
10
+ const CONNECTOR_VERSION = "0.1.1-beta.244";
11
11
 
12
12
  const CONFIG_KEY_MAP = new Map([
13
13
  ["server_url", "AMASTER_EMPLOYEE_SERVER_URL"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amaster.ai/employee-runtime-connector",
3
- "version": "0.1.1-beta.242",
3
+ "version": "0.1.1-beta.244",
4
4
  "description": "MirrorX runtime connector CLI and daemon",
5
5
  "license": "MIT",
6
6
  "type": "module",