@amaster.ai/employee-runtime-connector 0.1.1-beta.221 → 0.1.1-beta.222

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.
@@ -12261,6 +12261,12 @@ var externalObjectSummarySchema = external_exports.object({
12261
12261
  var agentAdapterTypeSchema = external_exports.string().trim().min(1).default("process").describe(`Known built-in adapters: ${AGENT_ADAPTER_TYPES.join(", ")}. External adapters may register additional non-empty string types at runtime.`);
12262
12262
  var optionalAgentAdapterTypeSchema = external_exports.string().trim().min(1).optional();
12263
12263
 
12264
+ // ../shared/src/agent-eligibility.ts
12265
+ var NON_ASSIGNABLE_AGENT_STATUSES = ["pending_approval", "terminated"];
12266
+ var ASSIGNABLE_AGENT_STATUSES = ["active", "paused", "idle", "running", "error"];
12267
+ var NON_ASSIGNABLE_AGENT_STATUS_SET = new Set(NON_ASSIGNABLE_AGENT_STATUSES);
12268
+ var ASSIGNABLE_AGENT_STATUS_SET = new Set(ASSIGNABLE_AGENT_STATUSES);
12269
+
12264
12270
  // ../shared/src/trust-policy.ts
12265
12271
  var TRUST_PRESETS = ["standard", "low_trust_review"];
12266
12272
  var LOW_TRUST_REVIEW_PRESET = "low_trust_review";
@@ -26074,6 +26080,27 @@ function compactExecutorJsonlForTranscript(event) {
26074
26080
  _truncated: true
26075
26081
  });
26076
26082
  }
26083
+ function compactPiToolLifecycleForTranscript(event, readableSummary) {
26084
+ const record6 = tcAsRecord(event);
26085
+ const type = tcReadString(record6.type);
26086
+ if (type !== "tool_execution_start" && type !== "tool_execution_end") return null;
26087
+ const toolCallId = tcReadString(record6.toolCallId);
26088
+ if (!toolCallId) return null;
26089
+ const toolName = tcReadString(record6.toolName) ?? "tool";
26090
+ const summary = tcTruncateText(readableSummary || `${type === "tool_execution_start" ? "\u5DE5\u5177\u5F00\u59CB" : "\u5DE5\u5177\u5B8C\u6210"}\uFF1A${toolName}`, 500);
26091
+ return JSON.stringify(type === "tool_execution_start" ? {
26092
+ type,
26093
+ toolCallId,
26094
+ toolName,
26095
+ args: { summary }
26096
+ } : {
26097
+ type,
26098
+ toolCallId,
26099
+ toolName,
26100
+ result: summary,
26101
+ isError: record6.isError === true
26102
+ });
26103
+ }
26077
26104
  function summarizeTokenUsage(usage) {
26078
26105
  const record6 = tcAsRecord(usage);
26079
26106
  const inputTokens = tcReadNumber(record6.input_tokens ?? record6.inputTokens, 0);
@@ -29532,7 +29559,7 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
29532
29559
  }
29533
29560
 
29534
29561
  // src/amaster-runtime-daemon.mjs
29535
- var CONNECTOR_VERSION = "0.1.1-beta.221";
29562
+ var CONNECTOR_VERSION = "0.1.1-beta.222";
29536
29563
  var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
29537
29564
  var daemonRequire = createRequire(import.meta.url);
29538
29565
  var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
@@ -31745,7 +31772,20 @@ function createLiveOutputLogger(config, command, executorKind, protectedValues =
31745
31772
  }
31746
31773
  }
31747
31774
  let entry = null;
31748
- if (event && shouldPreserveExecutorJsonlForTranscript(executorKind, event)) {
31775
+ const summarizedEntry = summarizeExecutorOutputLine(executorKind, stream, text2);
31776
+ const piToolLifecycle = executorKind === "pi" && event ? compactPiToolLifecycleForTranscript(event, summarizedEntry?.message) : null;
31777
+ if (piToolLifecycle) {
31778
+ entry = {
31779
+ stream: "stdout",
31780
+ level: summarizedEntry?.level ?? "info",
31781
+ message: piToolLifecycle,
31782
+ payload: summarizedEntry?.payload ?? {
31783
+ presentationKind: "tool",
31784
+ executorKind,
31785
+ executorEventType: readString(event.type)
31786
+ }
31787
+ };
31788
+ } else if (event && shouldPreserveExecutorJsonlForTranscript(executorKind, event)) {
31749
31789
  entry = {
31750
31790
  stream: "stdout",
31751
31791
  level: "info",
@@ -31757,7 +31797,7 @@ function createLiveOutputLogger(config, command, executorKind, protectedValues =
31757
31797
  }
31758
31798
  };
31759
31799
  } else {
31760
- entry = summarizeExecutorOutputLine(executorKind, stream, text2);
31800
+ entry = summarizedEntry;
31761
31801
  }
31762
31802
  if (entry && shouldSuppressDuplicatePiAgentMessage(entry)) {
31763
31803
  if (stream === "stdout") {
@@ -35544,10 +35584,9 @@ async function runOnce(config) {
35544
35584
  await flushResultOutbox(config);
35545
35585
  await flushRunCompletionStates(config);
35546
35586
  const availableSlots = availableCommandSlots(config);
35547
- if (availableSlots <= 0) return 0;
35548
35587
  const leaseId = `amaster-${Date.now()}`;
35549
35588
  const polled = await postJson(config, `/api/amaster/runtime-connectors/${config.connectorId}/commands/poll`, {
35550
- limit: availableSlots,
35589
+ limit: Math.max(1, availableSlots),
35551
35590
  maxConcurrentCommands: maxConcurrentCommands(config),
35552
35591
  leaseId,
35553
35592
  leaseSeconds: config.leaseSeconds
@@ -35578,10 +35617,9 @@ async function dispatchAvailableCommands(config, options = {}) {
35578
35617
  await flushResultOutbox(config);
35579
35618
  await flushRunCompletionStates(config);
35580
35619
  const availableSlots = availableCommandSlots(config);
35581
- if (availableSlots <= 0) return 0;
35582
35620
  const leaseId = `amaster-${Date.now()}`;
35583
35621
  const polled = await postJson(config, `/api/amaster/runtime-connectors/${config.connectorId}/commands/poll`, {
35584
- limit: availableSlots,
35622
+ limit: Math.max(1, availableSlots),
35585
35623
  maxConcurrentCommands: maxConcurrentCommands(config),
35586
35624
  leaseId,
35587
35625
  leaseSeconds: config.leaseSeconds
@@ -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.221";
10
+ const CONNECTOR_VERSION = "0.1.1-beta.222";
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.221",
3
+ "version": "0.1.1-beta.222",
4
4
  "description": "MirrorX runtime connector CLI and daemon",
5
5
  "license": "MIT",
6
6
  "type": "module",