@amaster.ai/employee-runtime-connector 0.1.1-beta.322 → 0.1.1-beta.324
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.
|
@@ -5575,6 +5575,13 @@ var ERROR_PRESENTATIONS = {
|
|
|
5575
5575
|
actionTitle: "\u4FEE\u590D\u6267\u884C\u73AF\u5883\u540E\u91CD\u8BD5",
|
|
5576
5576
|
tone: "danger"
|
|
5577
5577
|
},
|
|
5578
|
+
effective_instructions_not_ready: {
|
|
5579
|
+
label: "\u5458\u5DE5\u6709\u6548\u6307\u4EE4\u672A\u5C31\u7EEA",
|
|
5580
|
+
summary: "\u8BE5\u5458\u5DE5\u7F3A\u5C11\u53EF\u6267\u884C\u7684\u6709\u6548\u6307\u4EE4\uFF0C\u7CFB\u7EDF\u5DF2\u5728\u8C03\u7528\u8FD0\u884C\u5668\u524D\u505C\u6B62\u672C\u6B21\u6267\u884C\u3002",
|
|
5581
|
+
nextAction: "\u7531\u5E73\u53F0\u91CD\u65B0\u7F16\u8BD1\u8BE5\u5458\u5DE5\u7684\u6709\u6548\u6307\u4EE4\uFF0C\u786E\u8BA4\u5C31\u7EEA\u540E\u518D\u91CD\u8BD5\u4EFB\u52A1\u3002",
|
|
5582
|
+
actionTitle: "\u91CD\u65B0\u7F16\u8BD1\u5458\u5DE5\u6307\u4EE4\u540E\u91CD\u8BD5",
|
|
5583
|
+
tone: "danger"
|
|
5584
|
+
},
|
|
5578
5585
|
runtime_artifact_ingest_failed: {
|
|
5579
5586
|
label: "\u6210\u679C\u8BB0\u5F55\u5931\u8D25",
|
|
5580
5587
|
summary: "\u672C\u6B21\u8FD0\u884C\u7ED3\u675F\u65F6\u672A\u80FD\u628A\u6210\u679C\u8BB0\u5F55\u5230\u7CFB\u7EDF\uFF0C\u4EFB\u52A1\u7ED3\u679C\u9700\u8981\u91CD\u65B0\u6838\u5BF9\u3002",
|
|
@@ -30141,7 +30148,7 @@ function fixedRules(input, includeIssueLine, runContract = "producer") {
|
|
|
30141
30148
|
readString(input.executorCapabilityNotice),
|
|
30142
30149
|
wikiAccessRuleLine(input),
|
|
30143
30150
|
"- Runtime Artifact lineage fields sourceWorkProductId and sourceWorkProductIds accept only current artifact work product ids returned as result.effectResult.workProductId by a succeeded upload_artifact action. Never pass a documentId or revisionId as artifact lineage.",
|
|
30144
|
-
"- When all inputs are issue documents and there is no source artifact work product, persist the derived result
|
|
30151
|
+
"- When all inputs are issue documents and there is no source artifact work product, persist the derived result using an available Issue document action and do not call upload_artifact for a derived or review artifact.",
|
|
30145
30152
|
"- When this task creates, deploys, publishes, or otherwise delivers a user-openable non-file result, call upsert_work_product before final disposition. Use application for apps/sites/mini programs/dashboards, published_content for posts/videos/articles, external_link for other URL results, and the existing code/runtime types for pull requests, branches, commits, previews, and services.",
|
|
30146
30153
|
"- For a Helige application created with the helige-app-builder skill, call upsert_work_product immediately after the preview or deployment is verified and before upsert_document, add_comment, or update_parent. Use provider helige, applicationId as externalId, the actual preview or production URL, and preserve applicationId, appCode, releaseId, releaseVersion, environment, applicationKind, platform, observedAt, and publishedAt metadata when available.",
|
|
30147
30154
|
"- upsert_work_product records an agent-reported result for collection; it does not prove provider verification, health, approval, or business Acceptance. Those states remain Server/provider owned.",
|
|
@@ -30224,7 +30231,7 @@ function interactionResolutionText(context) {
|
|
|
30224
30231
|
};
|
|
30225
30232
|
const target = asRecord(resolution.target);
|
|
30226
30233
|
const exactDocumentRevisionDirective = readString(resolution.status) === "changes_requested" && readString(target.type) === "issue_document" && readString(target.issueId) && readString(target.documentId) && readString(target.key) && readString(target.revisionId) ? [
|
|
30227
|
-
"The review target is an exact issue_document revision. Revise that same document with upsert_document_revision: copy target.issueId, target.documentId, and target.key, use target.revisionId as baseRevisionId, and put the complete revised markdown in the required action.body; metadata-only revisions are invalid.",
|
|
30234
|
+
"The review target is an exact issue_document revision. Revise that same document with upsert_document_revision: copy target.issueId, target.documentId, and target.key, use target.revisionId as baseRevisionId, and put the complete revised markdown in the required action.body; metadata-only revisions are invalid. If finalized workspace Markdown already exists and upsert_document_revision_from_workspace_file is available, reuse that file with the same target identity and CAS token instead of regenerating action.body.",
|
|
30228
30235
|
"Do not copy the reviewed document into the current issue and do not restart its revision lineage at 1."
|
|
30229
30236
|
].join(" ") : "";
|
|
30230
30237
|
return [
|
|
@@ -34154,7 +34161,7 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
|
|
|
34154
34161
|
}
|
|
34155
34162
|
|
|
34156
34163
|
// src/amaster-runtime-daemon.mjs
|
|
34157
|
-
var CONNECTOR_VERSION = "0.1.1-beta.
|
|
34164
|
+
var CONNECTOR_VERSION = "0.1.1-beta.324";
|
|
34158
34165
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
34159
34166
|
var daemonRequire = createRequire(import.meta.url);
|
|
34160
34167
|
var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
|
|
@@ -34859,6 +34866,33 @@ function handoffPiRunPathsToChild(config, paths) {
|
|
|
34859
34866
|
makePiRunPathWritable(path, ownership.uid, ownership.gid);
|
|
34860
34867
|
}
|
|
34861
34868
|
}
|
|
34869
|
+
function materializePiRuntimeSystemPrompt(config, promptRoot, commandId, contents) {
|
|
34870
|
+
const normalizedCommandId = readString(commandId);
|
|
34871
|
+
if (!normalizedCommandId) throw new Error("pi_runtime_system_prompt_command_id_missing");
|
|
34872
|
+
const promptIdentity = createHash19("sha256").update(normalizedCommandId).digest("hex");
|
|
34873
|
+
const promptDir = join19(promptRoot, "tmp");
|
|
34874
|
+
mkdirSync10(promptDir, { recursive: true, mode: 448 });
|
|
34875
|
+
const promptDirStat = lstatSync12(promptDir);
|
|
34876
|
+
if (!promptDirStat.isDirectory() || promptDirStat.isSymbolicLink()) {
|
|
34877
|
+
throw new Error("pi_runtime_system_prompt_directory_invalid");
|
|
34878
|
+
}
|
|
34879
|
+
chmodSync8(promptDir, 448);
|
|
34880
|
+
const promptPath = join19(promptDir, `runtime-system-${promptIdentity}.md`);
|
|
34881
|
+
const temporaryPath = join19(promptDir, `.runtime-system.${process.pid}.${randomUUID()}.tmp`);
|
|
34882
|
+
try {
|
|
34883
|
+
writeFileSync12(temporaryPath, contents, { encoding: "utf8", mode: 384, flag: "wx" });
|
|
34884
|
+
renameSync10(temporaryPath, promptPath);
|
|
34885
|
+
chmodSync8(promptPath, 384);
|
|
34886
|
+
const promptMode = statSync13(promptPath).mode & 511;
|
|
34887
|
+
if (promptMode !== 384) {
|
|
34888
|
+
throw new Error(`pi_runtime_system_prompt_permissions_failed: mode=${promptMode.toString(8)}`);
|
|
34889
|
+
}
|
|
34890
|
+
} finally {
|
|
34891
|
+
rmSync10(temporaryPath, { force: true });
|
|
34892
|
+
}
|
|
34893
|
+
handoffPiRunPathsToChild(config, [promptDir, promptPath]);
|
|
34894
|
+
return promptPath;
|
|
34895
|
+
}
|
|
34862
34896
|
function writeLocalRuntimeStatus(config, runtimeStatus) {
|
|
34863
34897
|
const currentState = readState(process.env);
|
|
34864
34898
|
writeState(process.env, {
|
|
@@ -39030,6 +39064,7 @@ async function executeRunCommand(config, command) {
|
|
|
39030
39064
|
let managedMcpProfile = null;
|
|
39031
39065
|
let managedMcpCleanup = null;
|
|
39032
39066
|
let cleanupManagedMcpProfile = null;
|
|
39067
|
+
let piRuntimeSystemPromptCleanupPath = null;
|
|
39033
39068
|
let piExecutorIdentity = null;
|
|
39034
39069
|
const providerProtectedValues = [];
|
|
39035
39070
|
let piResolvedProviderConfig = null;
|
|
@@ -39346,14 +39381,8 @@ async function executeRunCommand(config, command) {
|
|
|
39346
39381
|
const appendedSystemPrompt = readString(promptCompilation.systemPrompt);
|
|
39347
39382
|
if (executor.kind === "pi" && appendedSystemPrompt) {
|
|
39348
39383
|
const promptRoot = managedMcpProfile?.profileRoot ?? workspace.executorHome;
|
|
39349
|
-
const
|
|
39350
|
-
|
|
39351
|
-
const promptPath = join19(
|
|
39352
|
-
promptDir,
|
|
39353
|
-
`runtime-system-${createHash19("sha256").update(command.commandId, "utf8").digest("hex")}.md`
|
|
39354
|
-
);
|
|
39355
|
-
writeFileSync12(promptPath, appendedSystemPrompt, { encoding: "utf8", mode: 384, flag: "wx" });
|
|
39356
|
-
handoffPiRunPathsToChild(config, [promptDir, promptPath]);
|
|
39384
|
+
const promptPath = materializePiRuntimeSystemPrompt(config, promptRoot, command.commandId, appendedSystemPrompt);
|
|
39385
|
+
if (!managedMcpProfile) piRuntimeSystemPromptCleanupPath = promptPath;
|
|
39357
39386
|
const printIndex = invocation.args.lastIndexOf("-p");
|
|
39358
39387
|
invocation.args.splice(printIndex < 0 ? invocation.args.length : printIndex, 0, "--append-system-prompt", promptPath);
|
|
39359
39388
|
}
|
|
@@ -40064,6 +40093,9 @@ async function executeRunCommand(config, command) {
|
|
|
40064
40093
|
return { resultDelivered: Boolean(completion) };
|
|
40065
40094
|
} finally {
|
|
40066
40095
|
await preparationLogChain;
|
|
40096
|
+
if (piRuntimeSystemPromptCleanupPath) {
|
|
40097
|
+
rmSync10(piRuntimeSystemPromptCleanupPath, { force: true });
|
|
40098
|
+
}
|
|
40067
40099
|
if (managedMcpProfile && !managedMcpCleanup && !completionOwnsManagedMcpProfile) {
|
|
40068
40100
|
managedMcpCleanup = cleanupManagedMcpProfile(managedMcpProfile, {
|
|
40069
40101
|
commandId: command.commandId,
|
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.324";
|
|
11
11
|
|
|
12
12
|
const CONFIG_KEY_MAP = new Map([
|
|
13
13
|
["server_url", "AMASTER_EMPLOYEE_SERVER_URL"],
|