@amaster.ai/employee-runtime-connector 0.1.1-beta.47 → 0.1.1-beta.49

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.
@@ -2858,7 +2858,7 @@ function createManagedPiMcpProfileApi(options = {}) {
2858
2858
  const SESSION_ROLLOUT_MARKER2 = ".amaster-pi-session-rollout.json";
2859
2859
  const DEFAULT_SESSION_ROLLOUT_TTL_MS2 = 24 * 60 * 60 * 1e3;
2860
2860
  const PI_VERSION_ATTESTATION_TIMEOUT_MS = 1e4;
2861
- const PI_EFFECTIVE_TOOLS_ATTESTATION_TIMEOUT_MS = 3e4;
2861
+ const PI_EFFECTIVE_TOOLS_ATTESTATION_TIMEOUT_MS = 6e4;
2862
2862
  const PI_ATTESTATION_MAX_ATTEMPTS = 2;
2863
2863
  const PI_ATTESTATION_RECENT_LIVE_TTL_MS = Number.isFinite(options.recentLiveTtlMs) && options.recentLiveTtlMs > 0 ? options.recentLiveTtlMs : 30 * 60 * 1e3;
2864
2864
  const recentLivePiVersionProbes = /* @__PURE__ */ new Map();
@@ -3017,6 +3017,7 @@ function createManagedPiMcpProfileApi(options = {}) {
3017
3017
  if (mcpToolMode === MANAGED_PI_DIRECT_TYPED_MCP_TOOL_MODE && !sourceAcquisitionCatalog && !diagnosisCatalog && !fullCatalog) {
3018
3018
  throw new Error("pi_managed_mcp_invalid: direct tool catalog size mismatch");
3019
3019
  }
3020
+ const catalogKind = sourceAcquisitionCatalog ? "source_acquisition" : diagnosisCatalog ? "diagnosis" : "full";
3020
3021
  const admittedToolNames = sourceAcquisitionCatalog ? SOURCE_ACQUISITION_DIRECT_TYPED_V1_TOOL_NAMES : diagnosisCatalog ? /* @__PURE__ */ new Set([...DIRECT_TYPED_V1_TOOL_NAMES, ...DIAGNOSIS_WIKI_READ_DIRECT_TYPED_V1_TOOL_NAMES]) : FULL_DIRECT_TYPED_V1_TOOL_NAMES;
3021
3022
  const names = /* @__PURE__ */ new Set();
3022
3023
  const exposedNames = /* @__PURE__ */ new Set();
@@ -3066,7 +3067,7 @@ function createManagedPiMcpProfileApi(options = {}) {
3066
3067
  if (catalog.setHash !== setHash) {
3067
3068
  throw new Error("pi_managed_mcp_invalid: direct tool catalog set hash mismatch");
3068
3069
  }
3069
- return { setHash, tools: normalized.sort((left, right) => left.name.localeCompare(right.name)) };
3070
+ return { setHash, tools: normalized.sort((left, right) => left.name.localeCompare(right.name)), kind: catalogKind };
3070
3071
  }
3071
3072
  function resolvePiExecutablePath(executorCommand, env) {
3072
3073
  if (isAbsolute2(executorCommand) || executorCommand.includes("/") || executorCommand.includes("\\")) {
@@ -3832,7 +3833,10 @@ ${result3.stderr ?? ""}`, "Pi", MINIMUM_PI_VERSION);
3832
3833
  skillArgs,
3833
3834
  spawnIdentity,
3834
3835
  workspaceMcpConfigPath,
3835
- toolAllowlist: mcpToolMode === MANAGED_PI_DIRECT_TYPED_MCP_TOOL_MODE ? [...directToolNames] : null,
3836
+ // Only narrowed specialized catalogs (diagnosis/source-acquisition) pin
3837
+ // the run to the governed tool set. The full catalog is additive: an
3838
+ // ordinary run keeps Pi's native tools plus the direct governed tools.
3839
+ toolAllowlist: mcpToolMode === MANAGED_PI_DIRECT_TYPED_MCP_TOOL_MODE && directCatalog.kind !== "full" ? [...directToolNames] : null,
3836
3840
  protectedValues: [.../* @__PURE__ */ new Set([
3837
3841
  sessionToken,
3838
3842
  ...sharedRuntime.protectedValues,
@@ -5121,7 +5125,8 @@ function governedBusinessDecisionProjection(state, detailRead) {
5121
5125
  kind: readString(missing.object_kind) ?? null,
5122
5126
  state: readString(missing.instance_state) ?? null,
5123
5127
  reason_code: readString(missing.reason_code) ?? null,
5124
- next_owner: readString(missing.next_owner) ?? null
5128
+ next_owner: readString(missing.next_owner) ?? null,
5129
+ task_relevance: readString(missing.task_relevance) === "informational" ? "informational" : "terminal_prerequisite"
5125
5130
  };
5126
5131
  }),
5127
5132
  unsupported: capabilities.filter((entry) => readString(asRecord(entry).object_kind_support) === "unsupported").map((entry) => readString(asRecord(entry).object_kind)).filter(Boolean),
@@ -5182,7 +5187,9 @@ function governedBusinessStateSection(context, input) {
5182
5187
  const governedStates = [current, resume].filter((state) => Object.keys(state).length > 0);
5183
5188
  const hasUnsupportedObjects = governedStates.some((state) => Array.isArray(state.capabilities) && state.capabilities.some((entry) => readString(asRecord(entry).object_kind_support) === "unsupported"));
5184
5189
  const hasUnavailableRead = governedStates.some((state) => readString(asRecord(state.availability).status) === "unavailable" || Array.isArray(state.capabilities) && state.capabilities.some((entry) => readString(asRecord(entry).read_capability) === "unavailable"));
5185
- const hasMissingObjects = governedStates.some((state) => Array.isArray(state.missing_objects) && state.missing_objects.length > 0);
5190
+ const missingObjects = governedStates.flatMap((state) => Array.isArray(state.missing_objects) ? state.missing_objects.map(asRecord) : []);
5191
+ const hasTerminalPrerequisiteMissingObjects = missingObjects.some((entry) => readString(entry.task_relevance) !== "informational");
5192
+ const hasInformationalMissingObjects = missingObjects.some((entry) => readString(entry.task_relevance) === "informational");
5186
5193
  const hasFreeTextReason = governedStates.some((state) => Boolean(readString(state.free_text_reason)));
5187
5194
  const hasChildIssues = Array.isArray(context.childIssueSummaries) && context.childIssueSummaries.length > 0;
5188
5195
  const rules = [
@@ -5191,7 +5198,8 @@ function governedBusinessStateSection(context, input) {
5191
5198
  hasUnsupportedObjects ? "An object kind listed under unsupported has no governed record type. You may create or update a clearly labeled tracker/document, but never claim a formal record or receipt for that kind." : null,
5192
5199
  hasChildIssues ? "For parent aggregation, read Server-owned governed state; never accept child final prose, an Issue, or a Document as a formal object receipt." : null,
5193
5200
  hasUnavailableRead ? "An unavailable read does not prove an instance is absent. Unrelated work may continue, but formal-object completion claims must remain fail-closed until a managed read succeeds." : null,
5194
- hasMissingObjects ? "When a required formal object is listed under missing, keep the task incomplete and report its reason_code plus next_owner." : null,
5201
+ hasTerminalPrerequisiteMissingObjects ? "When a formal object listed under missing has task_relevance=terminal_prerequisite, or task_relevance is absent in a legacy payload, keep the task incomplete and report its reason_code plus next_owner." : null,
5202
+ hasInformationalMissingObjects ? "task_relevance=informational means the missing Company object is context only, not a current Task terminal blocker. It must not block Task completion; do not create a Board interaction solely because of it." : null,
5195
5203
  hasFreeTextReason ? "free_text_reason is explanatory only and is not authority; resolve any conflict in favor of the structured Server-owned state." : null,
5196
5204
  retainsFullSnapshot ? "No executable managed detail read is available for at least one state below, so its bounded full snapshot remains inline. Do not guess a tool name or claim that omitted state can be fetched." : "The default body is a decision projection, not the complete process ledger. Use detail_read only when the current task needs omitted diagnosis, recommendation, activation, enrollment, or dispatch details."
5197
5205
  ].filter(Boolean).join("\n");
@@ -10122,7 +10130,7 @@ var source_acquisition_compatibility_default = {
10122
10130
  };
10123
10131
 
10124
10132
  // src/amaster-runtime-daemon.mjs
10125
- var CONNECTOR_VERSION = "0.1.1-beta.47";
10133
+ var CONNECTOR_VERSION = "0.1.1-beta.49";
10126
10134
  var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
10127
10135
  var SOURCE_ACQUISITION_CAPABILITY = source_acquisition_compatibility_default.profileVersion;
10128
10136
  var SOURCE_ACQUISITION_PROFILE_VERSION = source_acquisition_compatibility_default.profileVersion;
@@ -6,7 +6,7 @@ import { basename, dirname, join, resolve } from "node:path";
6
6
  import { homedir, hostname } from "node:os";
7
7
  import { fileURLToPath } from "node:url";
8
8
 
9
- const CONNECTOR_VERSION = "0.1.1-beta.47";
9
+ const CONNECTOR_VERSION = "0.1.1-beta.49";
10
10
 
11
11
  const CAPABILITIES = [
12
12
  "remote_registration",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amaster.ai/employee-runtime-connector",
3
- "version": "0.1.1-beta.47",
3
+ "version": "0.1.1-beta.49",
4
4
  "description": "MirrorX runtime connector CLI and daemon",
5
5
  "license": "MIT",
6
6
  "type": "module",