@amaster.ai/employee-runtime-connector 0.1.0-beta.51 → 0.1.0-beta.52

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.
@@ -2904,9 +2904,10 @@ function removeRunCompletionState(directory, commandId) {
2904
2904
  }
2905
2905
 
2906
2906
  // src/amaster-runtime-daemon/prompt-compiler.mjs
2907
- var DEFAULT_PROMPT_BUDGET_CHARS = 32e3;
2907
+ var DEFAULT_PROMPT_BUDGET_CHARS = 2e5;
2908
2908
  var DEADLINE_POSTURE_GUARD = "Named-window:skip_this_window_and_continue; no lower-quality/approval-bypass/fabrication/whole-task-stop; deadline_posture_receipt=targetMilestoneRef,posture,onMiss,taskContinuation,next owner/action; not Server proof";
2909
2909
  var MIN_PROMPT_BUDGET_CHARS = 8192;
2910
+ var MAX_PROMPT_SECTION_JSON_CHARS = 1e5;
2910
2911
  var CONTINUATION_WAKE_PATTERN = /(continuation|continued|retry|approved|liveness|resume|max_turn)/i;
2911
2912
  var RECOVERY_WAKE_REASONS = /* @__PURE__ */ new Set([
2912
2913
  "finish_successful_run_handoff",
@@ -3172,7 +3173,7 @@ function verifiedCompanyContextSection(context) {
3172
3173
  content: [
3173
3174
  "Use these server-snapshotted current Company facts as authoritative context for this run.",
3174
3175
  "The current verification contract does not supply shareholder structure or a financial baseline; treat them as unknown unless separate evidence is present, and do not describe the verified registration facts below as missing.",
3175
- stringifyBoundedJson(companyContext, 8e3)
3176
+ stringifyBoundedJson(companyContext, MAX_PROMPT_SECTION_JSON_CHARS)
3176
3177
  ].join("\n"),
3177
3178
  sourceRef: [
3178
3179
  `company:${companyId}`,
@@ -3229,7 +3230,7 @@ function interactionResolutionText(context) {
3229
3230
  "Treat this resolved interaction as the authoritative delta for this run.",
3230
3231
  readString(resolution.status) === "changes_requested" ? "Apply every requested change before creating a replacement review." : "",
3231
3232
  exactDocumentRevisionDirective,
3232
- stringifyBoundedJson(resolution, 8e3)
3233
+ stringifyBoundedJson(resolution, MAX_PROMPT_SECTION_JSON_CHARS)
3233
3234
  ].filter(Boolean).join("\n");
3234
3235
  }
3235
3236
  function recoveryInstructionText(input) {
@@ -3508,7 +3509,7 @@ ${resolvedDependencies.details.content}` : ""
3508
3509
  { name: "wake_comments", title: wakeDeltaTitle, priority: interactionResolution ? 99 : 95, sourceRef: wakeDeltaSourceRefs, originalContent: wakeDeltaOriginal, content: wakeDeltaContent, truncationReason: commentsSelected ? null : "duplicate_task_context" },
3509
3510
  { name: "task", title: "Task Context", priority: 90, sourceRef: `issue:${input.issueId ?? "unknown"}`, originalContent: taskText, content: includeTask ? taskText : "", truncationReason: includeTask ? null : "mode_selection" },
3510
3511
  { name: "governed_reads", title: "Governed External Reads", priority: 88, sourceRef: governedReads.provenance.map((entry) => entry.sourceRef), observedAt: governedReads.provenance.map((entry) => entry.observedAt), freshness: governedReads.provenance.map((entry) => entry.freshness), scope: governedReads.provenance.map((entry) => entry.scope), content: governedReads.content },
3511
- { name: "agent_instructions", title: "Agent Instructions", priority: 85, sourceRef: "agent_instructions_bundle", content: readString(input.agentInstructions) ?? "" },
3512
+ { name: "agent_instructions", title: "Agent Instructions", priority: 100, sourceRef: "agent_instructions_bundle", content: readString(input.agentInstructions) ?? "" },
3512
3513
  { name: "attachments", title: "Materialized Inputs", priority: 80, sourceRef: "materialized_attachments", content: readString(input.attachmentsText) ?? "" },
3513
3514
  { name: "on_demand_refs", title: "On-demand Context References", priority: 70, sourceRef: `issue:${input.issueId ?? "unknown"}`, content: onDemandRefs(input) },
3514
3515
  { name: "raw_snapshot", title: "Raw Context Snapshot", priority: 0, sourceRef: `run:${input.runId ?? "unknown"}`, originalChars: jsonCharLength(context), content: "", truncationReason: "on_demand_large_object" }
@@ -8697,13 +8698,11 @@ function createPublicNetworkScope(options = {}) {
8697
8698
  }
8698
8699
 
8699
8700
  // src/amaster-runtime-daemon.mjs
8700
- var CONNECTOR_VERSION = "0.1.0-beta.51";
8701
+ var CONNECTOR_VERSION = "0.1.0-beta.52";
8701
8702
  var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
8702
8703
  var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
8703
8704
  var CHECKPOINT_TTL_MS = 24 * 60 * 60 * 1e3;
8704
8705
  var PROMPT_AGENT_INSTRUCTION_FILE_ORDER = ["AGENTS.md", "SOUL.md"];
8705
- var MAX_PROMPT_AGENT_INSTRUCTION_FILE_CHARS = 12e3;
8706
- var MAX_PROMPT_AGENT_INSTRUCTIONS_CHARS = 24e3;
8707
8706
  var AMASTER_PI_PROHIBITED_EXTRA_ARGS = /* @__PURE__ */ new Set(["--no-extensions", "--no-skills", "--no-tools", "--no-session"]);
8708
8707
  var MAX_PI_CAPABILITY_SOURCE_ENTRIES = 200;
8709
8708
  var PI_COMPLETION_OUTPUT_GRACE_MS = 1e3;
@@ -9827,13 +9826,17 @@ function renderIssueLine(context) {
9827
9826
  function renderComments(context) {
9828
9827
  const wake = asRecord(context.paperclipWake);
9829
9828
  const comments = Array.isArray(wake.comments) ? wake.comments : [];
9830
- return comments.map((entry, index) => {
9829
+ const rendered = comments.map((entry, index) => {
9831
9830
  const comment = asRecord(entry);
9832
9831
  const id = readString(comment.id) ?? `comment-${index + 1}`;
9833
9832
  const body = readString(comment.body) ?? "";
9833
+ const truncatedNote = comment.bodyTruncated === true ? `
9834
+ [comment body truncated \u2014 fetch full text via typed read tool: comment:${id}]` : "";
9834
9835
  return `${index + 1}. ${id}
9835
- ${body}`;
9836
+ ${body}${truncatedNote}`;
9836
9837
  }).filter((entry) => entry.trim().length > 0).join("\n\n");
9838
+ const fallbackNote = wake.fallbackFetchNeeded === true ? "[some wake comments were truncated or omitted from this prompt \u2014 fetch full text via managed typed read tools using the comment:<id> references]" : "";
9839
+ return [rendered, fallbackNote].filter(Boolean).join("\n\n");
9837
9840
  }
9838
9841
  function renderTaskMarkdown(context) {
9839
9842
  return readString(context.paperclipTaskMarkdown);
@@ -9861,16 +9864,10 @@ function normalizeAgentInstructionsFiles(bundle) {
9861
9864
  function renderAgentInstructionsBundle(bundle) {
9862
9865
  const files = normalizeAgentInstructionsFiles(asRecord(bundle));
9863
9866
  if (files.length === 0) return "";
9864
- const parts = ["Current agent instructions:"];
9865
- let used = parts[0].length;
9866
- for (const file of files) {
9867
- const content = truncateText(file.content, MAX_PROMPT_AGENT_INSTRUCTION_FILE_CHARS);
9868
- const section = [`### ${file.path}`, content].join("\n");
9869
- if (used + section.length > MAX_PROMPT_AGENT_INSTRUCTIONS_CHARS) break;
9870
- parts.push(section);
9871
- used += section.length;
9872
- }
9873
- return parts.length > 1 ? parts.join("\n\n") : "";
9867
+ return [
9868
+ "Current agent instructions:",
9869
+ ...files.map((file) => [`### ${file.path}`, file.content].join("\n"))
9870
+ ].join("\n\n");
9874
9871
  }
9875
9872
  function commandRuntimeAuth(command) {
9876
9873
  const topLevel = asRecord(command.runtimeAuth);
@@ -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.51";
8
+ const CONNECTOR_VERSION = "0.1.0-beta.52";
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.51",
3
+ "version": "0.1.0-beta.52",
4
4
  "description": "MirrorX runtime connector CLI and daemon",
5
5
  "license": "MIT",
6
6
  "type": "module",