@amaster.ai/employee-runtime-connector 0.1.0-beta.25 → 0.1.0-beta.27

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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // AMaster Employee runtime connector daemon bundle.
2
+ // MirrorX runtime connector daemon bundle.
3
3
 
4
4
  // src/amaster-runtime-daemon.mjs
5
5
  import { createHash as createHash6 } from "node:crypto";
@@ -2302,7 +2302,7 @@ function governedReadSection(context) {
2302
2302
  function fixedRules(input, includeIssueLine) {
2303
2303
  return [
2304
2304
  "## AMaster Runtime Connector Task",
2305
- "You are executing a task dispatched by AMaster Employee from the central control plane.",
2305
+ "You are executing a task dispatched by MirrorX from the central control plane.",
2306
2306
  "Work only inside the declared workspace. Make concrete progress and finish with a concise result summary.",
2307
2307
  "Do not install operating-system or user-global packages, and do not use host package managers such as brew, apt, yum, or global pip/npm installs. Use tools already available or workspace-local dependencies or virtual environments. If a required renderer or evaluator is unavailable, keep the source artifact, record the exact verification gap, and do not mutate the host.",
2308
2308
  `- command id: ${input.commandId}`,
@@ -2324,6 +2324,24 @@ function approvalContinuationText(input) {
2324
2324
  "Do not advance to another write action until that exact call returns status succeeded."
2325
2325
  ].join("\n");
2326
2326
  }
2327
+ function runtimeAuthorizationText(context) {
2328
+ const envelope = asRecord(context.authorizationEnvelope);
2329
+ const allowed = new Set(
2330
+ Array.isArray(envelope.allowedActionClasses) ? envelope.allowedActionClasses.filter((value) => typeof value === "string") : []
2331
+ );
2332
+ const optionIds = asRecord(envelope.authorizationOptionIds);
2333
+ const missing = Object.entries(optionIds).map(([authorizationClass, optionId]) => ({
2334
+ authorizationClass,
2335
+ optionId: readString(optionId)
2336
+ })).filter((entry) => entry.optionId && !allowed.has(entry.authorizationClass));
2337
+ if (missing.length === 0) return "";
2338
+ return [
2339
+ `Current allowed action classes: ${[...allowed].join(", ") || "task_governance"}.`,
2340
+ "If the task requires a missing runtime action class, create a request_checkbox_confirmation interaction using the exact option id below and wait for its accepted continuation:",
2341
+ ...missing.map((entry) => `- ${entry.authorizationClass}: ${entry.optionId}`),
2342
+ "Never use request_confirmation to authorize a runtime action class."
2343
+ ].join("\n");
2344
+ }
2327
2345
  function sectionText(section) {
2328
2346
  if (!section.content) return "";
2329
2347
  return section.title ? `## ${section.title}
@@ -2401,6 +2419,7 @@ function compileCommandPromptWithManifest(input, options = {}) {
2401
2419
  const rawSections = [
2402
2420
  { name: "runtime_rules", title: "", priority: 100, sourceRef: `command:${input.commandId}`, content: fixedRules(input, !hasTask) },
2403
2421
  { name: "approval_continuation", title: "Approved Runtime Action Continuation", priority: 99, sourceRef: `run:${input.runId ?? "unknown"}`, content: approvalContinuationText(input), truncationReason: mode === "continuation" ? null : "mode_selection" },
2422
+ { name: "runtime_authorization", title: "Runtime Action Authorization", priority: 98, sourceRef: `run:${input.runId ?? "unknown"}`, content: runtimeAuthorizationText(context) },
2404
2423
  { name: "continuation_summary", title: "Continuation Summary", priority: 97, sourceRef: readString(asRecord(context.paperclipContinuationSummary).key) ?? `issue:${input.issueId ?? "unknown"}`, observedAt: readString(asRecord(context.paperclipContinuationSummary).updatedAt), originalContent: continuationSummary, content: mode === "cold" ? "" : continuationSummary, truncationReason: mode === "cold" ? "mode_selection" : null },
2405
2424
  { name: "wake_comments", title: "Wake Comment Delta", priority: 95, sourceRef: commentRefs(context).map((id) => `comment:${id}`), originalContent: readString(input.comments) ?? "", content: commentsSelected ? readString(input.comments) ?? "" : "", truncationReason: commentsSelected ? null : "duplicate_task_context" },
2406
2425
  { name: "task", title: "Task Context", priority: 90, sourceRef: `issue:${input.issueId ?? "unknown"}`, originalContent: taskText, content: includeTask ? taskText : "", truncationReason: includeTask ? null : "mode_selection" },
@@ -4700,7 +4719,7 @@ function readWorkspaceStatus(cwd, opts = {}) {
4700
4719
  }
4701
4720
 
4702
4721
  // src/amaster-runtime-daemon.mjs
4703
- var CONNECTOR_VERSION = "0.1.0-beta.25";
4722
+ var CONNECTOR_VERSION = "0.1.0-beta.27";
4704
4723
  var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
4705
4724
  var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
4706
4725
  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.25";
8
+ const CONNECTOR_VERSION = "0.1.0-beta.27";
9
9
 
10
10
  const CAPABILITIES = [
11
11
  "remote_registration",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@amaster.ai/employee-runtime-connector",
3
- "version": "0.1.0-beta.25",
4
- "description": "AMaster Employee runtime connector CLI and daemon",
3
+ "version": "0.1.0-beta.27",
4
+ "description": "MirrorX runtime connector CLI and daemon",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "bin": {