@amaster.ai/employee-runtime-connector 0.1.1-beta.270 → 0.1.1-beta.271
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.
|
@@ -5372,6 +5372,12 @@ var ERROR_PRESENTATIONS = {
|
|
|
5372
5372
|
nextAction: null,
|
|
5373
5373
|
tone: "neutral"
|
|
5374
5374
|
},
|
|
5375
|
+
issue_terminal_status: {
|
|
5376
|
+
label: "\u4EFB\u52A1\u5DF2\u7ED3\u675F",
|
|
5377
|
+
summary: "\u4EFB\u52A1\u5DF2\u8FDB\u5165\u7EC8\u6001\uFF0C\u672C\u6B21\u6267\u884C\u5DF2\u505C\u6B62\u3002",
|
|
5378
|
+
nextAction: null,
|
|
5379
|
+
tone: "neutral"
|
|
5380
|
+
},
|
|
5375
5381
|
issue_dependencies_blocked: {
|
|
5376
5382
|
label: "\u7B49\u5F85\u524D\u7F6E\u4EFB\u52A1",
|
|
5377
5383
|
summary: "\u524D\u7F6E\u4F9D\u8D56\u5C1A\u672A\u6EE1\u8DB3\uFF0C\u672C\u6B21\u6267\u884C\u5DF2\u505C\u6B62\u3002",
|
|
@@ -5507,7 +5513,7 @@ var ERROR_PRESENTATIONS = {
|
|
|
5507
5513
|
pi_provider_quota_exhausted: {
|
|
5508
5514
|
label: "\u6A21\u578B\u989D\u5EA6\u4E0D\u8DB3",
|
|
5509
5515
|
summary: "\u5F53\u524D Credits \u4F59\u989D\u4E0D\u8DB3\uFF0C\u672C\u6B21\u4EFB\u52A1\u5DF2\u8FDB\u5165\u989D\u5EA6\u6062\u590D\u7B49\u5F85\u3002",
|
|
5510
|
-
nextAction: "\u5145\u503C\u540E\u7CFB\u7EDF\u4F1A\u5B9A\u65F6\u68C0\u67E5\u5E76\u81EA\u52A8\u6062\u590D\uFF0C\u65E0\u9700\u624B\u52A8\u91CD\u8BD5\u3002",
|
|
5516
|
+
nextAction: "\u8BF7\u5230 IAM \u8D22\u52A1\u4E2D\u5FC3\u5145\u503C\uFF0C\u5145\u503C\u540E\u7CFB\u7EDF\u4F1A\u5B9A\u65F6\u68C0\u67E5\u5E76\u81EA\u52A8\u6062\u590D\uFF0C\u65E0\u9700\u624B\u52A8\u91CD\u8BD5\u3002",
|
|
5511
5517
|
tone: "warning"
|
|
5512
5518
|
},
|
|
5513
5519
|
pi_governed_tool_surface_changed: {
|
|
@@ -21260,9 +21266,7 @@ const completionAuthority = ${JSON.stringify(completionAuthority)};
|
|
|
21260
21266
|
${managedPiInitializationCompletionSource()}
|
|
21261
21267
|
export default function(pi) {
|
|
21262
21268
|
pi.on("tool_result", async (event) => {
|
|
21263
|
-
|
|
21264
|
-
// Other executors retain the original document workflow.
|
|
21265
|
-
if (process.platform !== "linux" || event.isError || event.details?.server !== "amaster"
|
|
21269
|
+
if (event.isError || event.details?.server !== "amaster"
|
|
21266
21270
|
|| !["runtime_action_plan", "runtime_action_status"].includes(event.toolName)) return;
|
|
21267
21271
|
if (!Array.isArray(event.content) || event.content.length !== 1 || event.content[0].type !== "text") return;
|
|
21268
21272
|
let envelope;
|
|
@@ -21289,14 +21293,35 @@ export default function(pi) {
|
|
|
21289
21293
|
|| doc.contentRef.planId !== result.planId || doc.contentRef.readTool !== "runtime_action.status")) {
|
|
21290
21294
|
throw new Error("invalid_document_reference");
|
|
21291
21295
|
}
|
|
21292
|
-
//
|
|
21296
|
+
// Linux can safely address descendants through a pinned directory fd. On platforms without
|
|
21297
|
+
// traversable directory-fd paths, keep the governed file directly under the process cwd: a
|
|
21298
|
+
// relative single-component path is resolved from the kernel-pinned cwd and has no replaceable
|
|
21299
|
+
// parent directory that could redirect the write outside the workspace.
|
|
21293
21300
|
const flags = fs.constants.O_RDONLY | fs.constants.O_DIRECTORY | fs.constants.O_NOFOLLOW;
|
|
21294
|
-
|
|
21295
|
-
|
|
21296
|
-
|
|
21297
|
-
|
|
21298
|
-
|
|
21299
|
-
|
|
21301
|
+
let parentPath;
|
|
21302
|
+
let materializedPathPrefix;
|
|
21303
|
+
if (process.platform === "linux") {
|
|
21304
|
+
root = fs.openSync(cwd, flags);
|
|
21305
|
+
const rootPath = "/proc/self/fd/" + root;
|
|
21306
|
+
try { fs.mkdirSync(rootPath + "/deliverables", { mode: 0o700 }); }
|
|
21307
|
+
catch (error) { if (error.code !== "EEXIST") throw error; }
|
|
21308
|
+
parent = fs.openSync(rootPath + "/deliverables", flags);
|
|
21309
|
+
parentPath = "/proc/self/fd/" + parent;
|
|
21310
|
+
materializedPathPrefix = "deliverables/";
|
|
21311
|
+
} else {
|
|
21312
|
+
const configured = fs.statSync(cwd);
|
|
21313
|
+
const current = fs.statSync(".");
|
|
21314
|
+
if (!configured.isDirectory() || configured.dev !== current.dev || configured.ino !== current.ino) {
|
|
21315
|
+
throw new Error("workspace_cwd_mismatch");
|
|
21316
|
+
}
|
|
21317
|
+
root = fs.openSync(".", flags);
|
|
21318
|
+
const pinned = fs.fstatSync(root);
|
|
21319
|
+
if (pinned.dev !== current.dev || pinned.ino !== current.ino) {
|
|
21320
|
+
throw new Error("workspace_cwd_changed");
|
|
21321
|
+
}
|
|
21322
|
+
parentPath = ".";
|
|
21323
|
+
materializedPathPrefix = "";
|
|
21324
|
+
}
|
|
21300
21325
|
let target;
|
|
21301
21326
|
// Preserve conflicts and select a stable alternate; replay verifies these same candidates.
|
|
21302
21327
|
function selectTarget() {
|
|
@@ -21322,7 +21347,8 @@ export default function(pi) {
|
|
|
21322
21347
|
let bytes;
|
|
21323
21348
|
if (doc.contentRef) {
|
|
21324
21349
|
// Use this run's existing governed session; references cannot select an endpoint or credential.
|
|
21325
|
-
const
|
|
21350
|
+
const safeConfigPath = process.platform === "linux" ? configPath : ".pi/mcp.json";
|
|
21351
|
+
const server = JSON.parse(fs.readFileSync(safeConfigPath, "utf8")).mcpServers.amaster;
|
|
21326
21352
|
const chunks = [];
|
|
21327
21353
|
let offset = 0;
|
|
21328
21354
|
while (offset < doc.byteSize) {
|
|
@@ -21383,9 +21409,10 @@ export default function(pi) {
|
|
|
21383
21409
|
}
|
|
21384
21410
|
}
|
|
21385
21411
|
}
|
|
21386
|
-
|
|
21412
|
+
const materializedPath = materializedPathPrefix + targetName;
|
|
21413
|
+
doc.path = materializedPath;
|
|
21387
21414
|
result.initializationDocumentMaterialization = {
|
|
21388
|
-
status: "materialized", path:
|
|
21415
|
+
status: "materialized", path: materializedPath, sha256: doc.sha256, byteSize: doc.byteSize,
|
|
21389
21416
|
planId: result.planId, revision: result.revision, replayed, uploaded: false,
|
|
21390
21417
|
};
|
|
21391
21418
|
} catch {
|
|
@@ -33904,7 +33931,7 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
|
|
|
33904
33931
|
}
|
|
33905
33932
|
|
|
33906
33933
|
// src/amaster-runtime-daemon.mjs
|
|
33907
|
-
var CONNECTOR_VERSION = "0.1.1-beta.
|
|
33934
|
+
var CONNECTOR_VERSION = "0.1.1-beta.271";
|
|
33908
33935
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
33909
33936
|
var daemonRequire = createRequire(import.meta.url);
|
|
33910
33937
|
var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
|
|
@@ -39143,15 +39170,16 @@ async function executeRunCommand(config, command) {
|
|
|
39143
39170
|
);
|
|
39144
39171
|
}
|
|
39145
39172
|
const parsedForValidation = parsed;
|
|
39173
|
+
const completionOutputHasFinalAssistantText = terminalTextRepair?.succeeded === true ? true : execution.completionOutputHasFinalAssistantText;
|
|
39146
39174
|
const piTurnLimitFailure = executor.kind === "pi" && !cancelled && !hasOutputFlood && !hasArgumentAmplification && !hasMemoryLimit && execution.timedOut !== true && !execution.spawnError ? classifyPiTurnLimitResult(parsedForValidation, {
|
|
39147
39175
|
authoritativeTerminalDisposition: Boolean(terminalRunDisposition)
|
|
39148
39176
|
}) : null;
|
|
39149
39177
|
const piInvalidOutputError = executor.kind === "pi" ? piOutputValidationError(parsedForValidation, {
|
|
39150
|
-
allowMissingTurnEnd: completionOutputStopped,
|
|
39178
|
+
allowMissingTurnEnd: completionOutputStopped || execution.completionOutputType === "agent_settled" && completionOutputHasFinalAssistantText === true,
|
|
39151
39179
|
allowMissingAssistantOutput: execution.completionOutputType === "approval_required" || Boolean(terminalRunDisposition),
|
|
39152
39180
|
allowMissingFinalAssistantText: Boolean(terminalRunDisposition),
|
|
39153
39181
|
completionOutputType: execution.completionOutputType,
|
|
39154
|
-
completionOutputHasFinalAssistantText
|
|
39182
|
+
completionOutputHasFinalAssistantText
|
|
39155
39183
|
}) : null;
|
|
39156
39184
|
const piOutputFailure = executor.kind === "pi" && !cancelled && !hasOutputFlood && !hasArgumentAmplification && !hasMemoryLimit && execution.timedOut !== true && !execution.spawnError ? classifyPiOutputFailure(parsedForValidation, {
|
|
39157
39185
|
exitCode: execution.exitCode,
|
package/dist/amaster-runtime.mjs
CHANGED
|
@@ -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.
|
|
10
|
+
const CONNECTOR_VERSION = "0.1.1-beta.271";
|
|
11
11
|
|
|
12
12
|
const CONFIG_KEY_MAP = new Map([
|
|
13
13
|
["server_url", "AMASTER_EMPLOYEE_SERVER_URL"],
|