@amaster.ai/employee-runtime-connector 0.1.1-beta.300 → 0.1.1-beta.301

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
@@ -214,6 +214,8 @@ This isolation does not schedule a retry or a second business continuation. Comm
214
214
 
215
215
  Executor process logs (stdout/stderr events, including full-transcript chat turns) are streamed to the Server as batches against `/ingest/logs/batch`. Every live log entry carries a per-command monotonically increasing `seq`; the Server dedupes on `(commandId, sourceSeq)`, so a retry after an ambiguous outcome (restart, timeout, 5xx) never duplicates canonical `heartbeat_run_events`.
216
216
 
217
+ Full-transcript turns preserve every pi event as canonical log entries, including per-token streaming deltas (`thinking_delta`, `text_delta`, `toolcall_delta`) — the chat transcript's typewriter rendering is driven by them. No per-stream entry budget exists: every entry is delivered, and live output is never suppressed. Byte volume stays bounded by the executor flood limit, and outage-time connector memory by the retry backlog byte bound below.
218
+
217
219
  A batch whose delivery outcome is ambiguous is not dropped: it enters a bounded in-memory retry backlog that is retried on a timer and drains in source order, preserving `heartbeat_run_events` ordering. If the backlog is still undelivered when the executor turn ends, the remaining entries move into the durable result outbox and the command result is deferred until the log entries are delivered first; a sustained log-ingest outage bounded by `AMASTER_RESULT_OUTBOX_MAX_ATTEMPTS` drops the entries with a stderr diagnostic rather than holding the result hostage. HTTP 400 entries keep the existing bisect-to-invalid drop semantics.
218
220
 
219
221
  Tuning knobs (defaults are the production values):
@@ -5852,7 +5852,7 @@ function normalizeAgentRoleId(role) {
5852
5852
  // ../shared/src/constants.ts
5853
5853
  var COMPANY_STATUSES = ["active", "paused", "archived"];
5854
5854
  var COMPANY_SANDBOX_DESIRED_STATES = ["running", "stopped", "deleting"];
5855
- var DEFAULT_COMPANY_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024;
5855
+ var DEFAULT_COMPANY_ATTACHMENT_MAX_BYTES = 50 * 1024 * 1024;
5856
5856
  var MAX_COMPANY_ATTACHMENT_MAX_BYTES = 1024 * 1024 * 1024;
5857
5857
  var DEPLOYMENT_MODES = ["local_trusted", "authenticated"];
5858
5858
  var DEPLOYMENT_EXPOSURES = ["private", "public"];
@@ -12979,6 +12979,25 @@ var boardReactivateBusinessDemandAutomationRuleSchema = external_exports.object(
12979
12979
  rationale: external_exports.string().trim().min(1).max(2e3)
12980
12980
  }).strict();
12981
12981
 
12982
+ // ../shared/src/goal-work-progress.ts
12983
+ var goalWorkProgressBaseSchema = external_exports.object({
12984
+ basis: external_exports.literal("linked_tasks"),
12985
+ completedCount: external_exports.number().int().nonnegative(),
12986
+ remainingCount: external_exports.number().int().nonnegative(),
12987
+ totalCount: external_exports.number().int().nonnegative()
12988
+ });
12989
+ var goalWorkProgressSummarySchema = external_exports.discriminatedUnion("state", [
12990
+ goalWorkProgressBaseSchema.extend({
12991
+ state: external_exports.literal("ready"),
12992
+ totalCount: external_exports.number().int().positive(),
12993
+ percent: external_exports.number().int().min(0).max(100)
12994
+ }).strict(),
12995
+ goalWorkProgressBaseSchema.extend({
12996
+ state: external_exports.literal("unavailable"),
12997
+ percent: external_exports.null()
12998
+ }).strict()
12999
+ ]);
13000
+
12982
13001
  // ../shared/src/goal-action-semantics.ts
12983
13002
  var GOAL_ACTION_INTERACTION_PURPOSE_CODES = [
12984
13003
  "goal_gap_authority_exception",
@@ -27508,7 +27527,8 @@ function shouldPreservePiEventForFullTranscript(event) {
27508
27527
  if (!event || typeof event !== "object") return false;
27509
27528
  if (isProviderBookkeepingEvent(event)) return false;
27510
27529
  const type = tcReadString(event.type);
27511
- return type !== null && PI_FULL_TRANSCRIPT_EVENT_TYPES.has(type);
27530
+ if (!PI_FULL_TRANSCRIPT_EVENT_TYPES.has(type)) return false;
27531
+ return true;
27512
27532
  }
27513
27533
 
27514
27534
  // src/amaster-runtime-daemon/executor-protocol/codex.mjs
@@ -34391,7 +34411,7 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
34391
34411
  }
34392
34412
 
34393
34413
  // src/amaster-runtime-daemon.mjs
34394
- var CONNECTOR_VERSION = "0.1.1-beta.300";
34414
+ var CONNECTOR_VERSION = "0.1.1-beta.301";
34395
34415
  var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
34396
34416
  var daemonRequire = createRequire(import.meta.url);
34397
34417
  var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
@@ -36692,7 +36712,6 @@ function createLiveOutputLogger(config, command, executorKind, protectedValues =
36692
36712
  const buffers = { stdout: "", stderr: "" };
36693
36713
  const displayCounts = { stdout: 0, stderr: 0, system: 0 };
36694
36714
  const sourceCounts = { stdout: 0, stderr: 0 };
36695
- const suppressedCounts = { stdout: 0, stderr: 0, system: 0 };
36696
36715
  const eventTypeCounts = /* @__PURE__ */ new Map();
36697
36716
  let jsonlEventCount = 0;
36698
36717
  let meaningfulProgressEventCount = 0;
@@ -36746,10 +36765,6 @@ function createLiveOutputLogger(config, command, executorKind, protectedValues =
36746
36765
  );
36747
36766
  const piToolArgumentTracker = executorKind === "pi" ? createPiToolArgumentAmplificationTracker(options.piToolArgumentGuard) : null;
36748
36767
  const fullTranscriptEnabled = executorKind === "pi" && readString(asRecord(asRecord(command).payload).transcriptDetail) === AMASTER_RUNTIME_TRANSCRIPT_DETAIL_FULL;
36749
- const maxEntriesPerStream = parsePositiveInteger(
36750
- process.env.AMASTER_RUNTIME_LIVE_LOG_MAX_ENTRIES_PER_STREAM,
36751
- fullTranscriptEnabled ? 2e3 : 200
36752
- );
36753
36768
  const countEventType = (event) => {
36754
36769
  const eventType = readString(asRecord(event).type) ?? "unknown";
36755
36770
  const key = eventTypeCounts.has(eventType) || eventTypeCounts.size < 32 ? eventType : "other";
@@ -36936,10 +36951,6 @@ function createLiveOutputLogger(config, command, executorKind, protectedValues =
36936
36951
  };
36937
36952
  const enqueue = (entry) => {
36938
36953
  const stream = entry.stream === "stderr" || entry.stream === "system" ? entry.stream : "stdout";
36939
- if ((displayCounts[stream] ?? 0) >= maxEntriesPerStream) {
36940
- suppressedCounts[stream] = (suppressedCounts[stream] ?? 0) + 1;
36941
- return;
36942
- }
36943
36954
  displayCounts[stream] = (displayCounts[stream] ?? 0) + 1;
36944
36955
  const entryBytes = runtimeLogBatchEntryBytes(command, entry);
36945
36956
  let candidateBatchBytes = pendingBatchBytes + (pendingBatch.length > 0 ? 1 : 0) + entryBytes;
@@ -37087,20 +37098,14 @@ function createLiveOutputLogger(config, command, executorKind, protectedValues =
37087
37098
  stopBacklogRetry();
37088
37099
  flushPendingBatch();
37089
37100
  await queue;
37090
- const suppressedSummaries = Object.entries(suppressedCounts).filter(([, count2]) => count2 > 0).map(([stream, count2]) => ({ stream, count: count2 }));
37091
- if (suppressedSummaries.length > 0 || logEntriesBacklogDropped > 0) {
37092
- const suppressedCount = suppressedSummaries.reduce((total, summary) => total + summary.count, 0);
37101
+ if (logEntriesBacklogDropped > 0) {
37093
37102
  const summaryEntry = {
37094
37103
  stream: "system",
37095
- level: logEntriesBacklogDropped > 0 ? "warn" : "info",
37096
- message: logEntriesBacklogDropped > 0 ? `Runtime output delivery exceeded the retry backlog bound: ${logEntriesBacklogDropped} oldest entr${logEntriesBacklogDropped === 1 ? "y" : "ies"} dropped before delivery` : `Runtime output summarized: ${suppressedCount} event(s) suppressed after ${maxEntriesPerStream} live log entries per stream`,
37104
+ level: "warn",
37105
+ message: `Runtime output delivery exceeded the retry backlog bound: ${logEntriesBacklogDropped} oldest entr${logEntriesBacklogDropped === 1 ? "y" : "ies"} dropped before delivery`,
37097
37106
  payload: {
37098
37107
  presentationKind: "output_summary",
37099
37108
  executorKind,
37100
- suppressedCount,
37101
- suppressedByStream: suppressedSummaries,
37102
- maxEntriesPerStream,
37103
- deliveryIncomplete: logEntriesBacklogDropped > 0,
37104
37109
  backlogDropped: logEntriesBacklogDropped
37105
37110
  }
37106
37111
  };
@@ -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.300";
10
+ const CONNECTOR_VERSION = "0.1.1-beta.301";
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.300",
3
+ "version": "0.1.1-beta.301",
4
4
  "description": "MirrorX runtime connector CLI and daemon",
5
5
  "license": "MIT",
6
6
  "type": "module",