@amaster.ai/employee-runtime-connector 0.1.1-beta.297 → 0.1.1-beta.298

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.
@@ -34380,7 +34380,7 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
34380
34380
  }
34381
34381
 
34382
34382
  // src/amaster-runtime-daemon.mjs
34383
- var CONNECTOR_VERSION = "0.1.1-beta.297";
34383
+ var CONNECTOR_VERSION = "0.1.1-beta.298";
34384
34384
  var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
34385
34385
  var daemonRequire = createRequire(import.meta.url);
34386
34386
  var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
@@ -35791,12 +35791,11 @@ function readJsonFile2(filePath) {
35791
35791
  function syncPiExecutorProviderConfig(config, agentDir, providerConfig) {
35792
35792
  if (!agentDir) return null;
35793
35793
  const { modelsSynced, settingsSynced } = syncAmasterProviderFiles(agentDir, providerConfig);
35794
- if (modelsSynced || settingsSynced) {
35795
- handoffPiRunPathsToChild(config, [
35796
- modelsSynced ? join19(agentDir, "models.json") : null,
35797
- settingsSynced ? join19(agentDir, "settings.json") : null
35798
- ]);
35799
- }
35794
+ if (!modelsSynced && !settingsSynced) return null;
35795
+ handoffPiRunPathsToChild(config, [
35796
+ modelsSynced ? join19(agentDir, "models.json") : null,
35797
+ settingsSynced ? join19(agentDir, "settings.json") : null
35798
+ ]);
35800
35799
  return { modelsSynced, settingsSynced };
35801
35800
  }
35802
35801
  function normalizeWorkspaceContext(workspace) {
@@ -35949,10 +35948,6 @@ async function materializeEffectiveAgentInstructions(config, command, workspace,
35949
35948
  agentInstructionRevisionId: readString(instructionContract.revisionId),
35950
35949
  agentInstructionContentHash: readString(instructionContract.contentHash)
35951
35950
  });
35952
- await ingestLog(config, command, "system", "info", `Materialized ${materialized.length} agent instruction file(s) into the execution workspace`, {
35953
- fileCount: materialized.length,
35954
- files: materialized.map((entry) => entry.path)
35955
- });
35956
35951
  }
35957
35952
  return materialized;
35958
35953
  }
@@ -38741,14 +38736,6 @@ async function materializeIssueAttachments(config, command, workspace) {
38741
38736
  sha256: attachment.sha256 ?? null
38742
38737
  }))
38743
38738
  });
38744
- await ingestLog(config, command, "system", "info", `Materialized ${materialized.length} issue attachment(s) into the execution workspace`, {
38745
- attachmentCount: materialized.length,
38746
- attachments: materialized.map((attachment) => ({
38747
- id: attachment.id ?? null,
38748
- name: attachment.name,
38749
- path: attachment.relativePath
38750
- }))
38751
- });
38752
38739
  }
38753
38740
  return materialized;
38754
38741
  }
@@ -38832,10 +38819,6 @@ async function materializeRequiredArtifactInputs(config, command, workspace) {
38832
38819
  writeFileSync12(manifestPath, JSON.stringify(localManifest, null, 2) + "\n");
38833
38820
  chmodSync8(manifestPath, 292);
38834
38821
  updateWorkspaceManifest(workspaceManifestPath(workspace), { artifactInputManifest: localManifest });
38835
- await ingestLog(config, command, "system", "info", `Materialized ${materialized.length} required artifact input(s) into the execution workspace`, {
38836
- artifactInputCount: materialized.length,
38837
- artifactInputs: localManifest.entries
38838
- });
38839
38822
  return materialized;
38840
38823
  }
38841
38824
  function issueCheckpointDir(workspace) {
@@ -38896,7 +38879,7 @@ async function materializeIssueCheckpoint(config, command, workspace) {
38896
38879
  const checkpointDir = issueCheckpointDir(workspace);
38897
38880
  const manifestPath = join19(checkpointDir, "manifest.json");
38898
38881
  const expectedContinuation = expectedContinuationCheckpoint(command);
38899
- const unavailable2 = { files: [], taskSessionRestored: false };
38882
+ const unavailable2 = { files: [], taskSessionRestored: false, checkpointExpiresAt: null };
38900
38883
  if (!existsSync18(manifestPath)) {
38901
38884
  if (expectedContinuation) throw new Error("continuation_checkpoint_unavailable: manifest_missing");
38902
38885
  return unavailable2;
@@ -39003,13 +38986,11 @@ async function materializeIssueCheckpoint(config, command, workspace) {
39003
38986
  }
39004
38987
  materialized.push(relativePath);
39005
38988
  }
39006
- if (materialized.length > 0) {
39007
- await ingestLog(config, command, "system", "info", `Materialized ${materialized.length} checkpoint file(s) into the execution workspace`, {
39008
- checkpointFiles: materialized,
39009
- checkpointExpiresAt: new Date(expiresAt).toISOString()
39010
- });
39011
- }
39012
- return { files: materialized, taskSessionRestored };
38989
+ return {
38990
+ files: materialized,
38991
+ taskSessionRestored,
38992
+ checkpointExpiresAt: new Date(expiresAt).toISOString()
38993
+ };
39013
38994
  } catch (restoreErr) {
39014
38995
  try {
39015
38996
  await clearIssueCheckpoint(config, command, workspace, "restore_failed");
@@ -39196,6 +39177,12 @@ async function executeRunCommand(config, command) {
39196
39177
  workspace,
39197
39178
  contextContract.instructions
39198
39179
  );
39180
+ if (materializedAgentInstructions.length > 0) {
39181
+ enqueuePreparationLog("system", "info", `Materialized ${materializedAgentInstructions.length} agent instruction file(s) into the execution workspace`, {
39182
+ fileCount: materializedAgentInstructions.length,
39183
+ files: materializedAgentInstructions.map((entry) => entry.path)
39184
+ });
39185
+ }
39199
39186
  const workspaceProjectInstructionReceipt = projectExternalWorkspaceProjectInstructions(
39200
39187
  workspace.sourceWorkspacePath,
39201
39188
  workspace.cwd,
@@ -39218,6 +39205,12 @@ async function executeRunCommand(config, command) {
39218
39205
  workspaceProjectInstructionProjection: workspaceProjectInstructionReceipt
39219
39206
  });
39220
39207
  const restoredCheckpoint = await materializeIssueCheckpoint(config, command, workspace);
39208
+ if (restoredCheckpoint.files.length > 0) {
39209
+ enqueuePreparationLog("system", "info", `Materialized ${restoredCheckpoint.files.length} checkpoint file(s) into the execution workspace`, {
39210
+ checkpointFiles: restoredCheckpoint.files,
39211
+ checkpointExpiresAt: restoredCheckpoint.checkpointExpiresAt
39212
+ });
39213
+ }
39221
39214
  const materializedCheckpointFiles = restoredCheckpoint.files;
39222
39215
  const requestedNativeSession = asRecord(asRecord(command.payload).nativeSession);
39223
39216
  const taskSessionCheckpointUnavailable = Object.keys(governedMcp).length > 0 && requestedNativeSession.mode === "task_session" && !expectedContinuationCheckpoint(command) && !restoredCheckpoint.taskSessionRestored;
@@ -39231,9 +39224,26 @@ async function executeRunCommand(config, command) {
39231
39224
  });
39232
39225
  }
39233
39226
  const requiredArtifactInputs = await materializeRequiredArtifactInputs(config, command, workspace);
39227
+ if (requiredArtifactInputs.length > 0) {
39228
+ enqueuePreparationLog("system", "info", `Materialized ${requiredArtifactInputs.length} required artifact input(s) into the execution workspace`, {
39229
+ artifactInputCount: requiredArtifactInputs.length,
39230
+ artifactInputs: requiredArtifactInputs.map(({ path: _path, relativePath, ...entry }) => ({ ...entry, path: relativePath }))
39231
+ });
39232
+ }
39234
39233
  let materializedAttachments = requiredArtifactInputs;
39235
39234
  try {
39236
- materializedAttachments = [...requiredArtifactInputs, ...await materializeIssueAttachments(config, command, workspace)];
39235
+ const issueAttachments = await materializeIssueAttachments(config, command, workspace);
39236
+ if (issueAttachments.length > 0) {
39237
+ enqueuePreparationLog("system", "info", `Materialized ${issueAttachments.length} issue attachment(s) into the execution workspace`, {
39238
+ attachmentCount: issueAttachments.length,
39239
+ attachments: issueAttachments.map((attachment) => ({
39240
+ id: attachment.id ?? null,
39241
+ name: attachment.name,
39242
+ path: attachment.relativePath
39243
+ }))
39244
+ });
39245
+ }
39246
+ materializedAttachments = [...requiredArtifactInputs, ...issueAttachments];
39237
39247
  } catch (err) {
39238
39248
  if (issueAttachmentsAreRequired(command, commandTaskResourceInput(command))) throw err;
39239
39249
  enqueuePreparationLog("system", "warn", `Failed to materialize issue attachments: ${err instanceof Error ? err.message : String(err)}`, {
@@ -39457,7 +39467,7 @@ async function executeRunCommand(config, command) {
39457
39467
  agentDir,
39458
39468
  piResolvedProviderConfig
39459
39469
  ));
39460
- if (providerSync && (providerSync.modelsSynced || providerSync.settingsSynced)) {
39470
+ if (providerSync) {
39461
39471
  enqueuePreparationLog("system", "info", "Synced AMaster provider config for pi executor", {
39462
39472
  modelsSynced: providerSync.modelsSynced,
39463
39473
  settingsSynced: providerSync.settingsSynced,
@@ -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.297";
10
+ const CONNECTOR_VERSION = "0.1.1-beta.298";
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.297",
3
+ "version": "0.1.1-beta.298",
4
4
  "description": "MirrorX runtime connector CLI and daemon",
5
5
  "license": "MIT",
6
6
  "type": "module",