@amaster.ai/employee-runtime-connector 0.1.1-beta.240 → 0.1.1-beta.241
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.
|
@@ -5227,6 +5227,120 @@ var mirrorxCurrentRunContractSchema = external_exports.object({
|
|
|
5227
5227
|
|
|
5228
5228
|
// ../shared/src/amaster-runtime-user-presentation.ts
|
|
5229
5229
|
var ERROR_PRESENTATIONS = {
|
|
5230
|
+
runtime_document_ingest_failed: {
|
|
5231
|
+
label: "\u6587\u6863\u8BB0\u5F55\u5931\u8D25",
|
|
5232
|
+
summary: "\u672C\u6B21\u8FD0\u884C\u672A\u80FD\u5B8C\u6210\u6587\u6863\u5199\u5165\uFF0C\u6587\u6863\u7ED3\u679C\u9700\u8981\u91CD\u65B0\u6838\u5BF9\u3002",
|
|
5233
|
+
nextAction: null,
|
|
5234
|
+
tone: "danger"
|
|
5235
|
+
},
|
|
5236
|
+
continuation_checkpoint_unavailable: {
|
|
5237
|
+
label: "\u63A5\u7EED\u8BB0\u5F55\u4E0D\u53EF\u7528",
|
|
5238
|
+
summary: "\u7EE7\u7EED\u6267\u884C\u6240\u9700\u7684\u8BB0\u5F55\u7F3A\u5931\u3001\u8FC7\u671F\u6216\u4E0D\u5339\u914D\u3002",
|
|
5239
|
+
nextAction: null,
|
|
5240
|
+
tone: "danger"
|
|
5241
|
+
},
|
|
5242
|
+
continuation_checkpoint_file_unavailable: {
|
|
5243
|
+
label: "\u63A5\u7EED\u6587\u4EF6\u4E0D\u53EF\u7528",
|
|
5244
|
+
summary: "\u7EE7\u7EED\u6267\u884C\u6240\u9700\u7684\u6587\u4EF6\u65E0\u6CD5\u8BFB\u53D6\u6216\u6821\u9A8C\u3002",
|
|
5245
|
+
nextAction: null,
|
|
5246
|
+
tone: "danger"
|
|
5247
|
+
},
|
|
5248
|
+
pi_managed_mcp_invalid: {
|
|
5249
|
+
label: "\u5DE5\u5177\u914D\u7F6E\u6821\u9A8C\u5931\u8D25",
|
|
5250
|
+
summary: "\u8FD0\u884C\u73AF\u5883\u7684\u5DE5\u5177\u6E05\u5355\u672A\u901A\u8FC7\u4E00\u81F4\u6027\u6821\u9A8C\u3002",
|
|
5251
|
+
nextAction: null,
|
|
5252
|
+
tone: "danger"
|
|
5253
|
+
},
|
|
5254
|
+
pi_managed_mcp_effective_tools_failed: {
|
|
5255
|
+
label: "\u53EF\u7528\u5DE5\u5177\u6821\u9A8C\u5931\u8D25",
|
|
5256
|
+
summary: "\u8FD0\u884C\u73AF\u5883\u672A\u80FD\u786E\u8BA4\u672C\u6B21\u6267\u884C\u5B9E\u9645\u53EF\u7528\u7684\u5DE5\u5177\u3002",
|
|
5257
|
+
nextAction: null,
|
|
5258
|
+
tone: "danger"
|
|
5259
|
+
},
|
|
5260
|
+
runtime_connector_managed_skill_unavailable: {
|
|
5261
|
+
label: "\u6240\u9700\u6280\u80FD\u4E0D\u53EF\u7528",
|
|
5262
|
+
summary: "\u6267\u884C\u73AF\u5883\u7F3A\u5C11\u672C\u6B21\u4EFB\u52A1\u6240\u9700\u7684\u53D7\u7BA1\u6280\u80FD\u3002",
|
|
5263
|
+
nextAction: null,
|
|
5264
|
+
tone: "danger"
|
|
5265
|
+
},
|
|
5266
|
+
pi_transient_upstream: {
|
|
5267
|
+
label: "\u6A21\u578B\u670D\u52A1\u6682\u4E0D\u53EF\u7528",
|
|
5268
|
+
summary: "\u6A21\u578B\u670D\u52A1\u8FD4\u56DE\u4E86\u4E34\u65F6\u9519\u8BEF\uFF0C\u672C\u6B21\u6267\u884C\u672A\u80FD\u7EE7\u7EED\u3002",
|
|
5269
|
+
nextAction: null,
|
|
5270
|
+
tone: "danger"
|
|
5271
|
+
},
|
|
5272
|
+
runtime_connector_command_failed: {
|
|
5273
|
+
label: "\u6267\u884C\u547D\u4EE4\u5931\u8D25",
|
|
5274
|
+
summary: "\u8FD0\u884C\u5668\u62A5\u544A\u547D\u4EE4\u672A\u80FD\u5B8C\u6210\uFF0C\u5177\u4F53\u539F\u56E0\u8BF7\u67E5\u770B\u9519\u8BEF\u8BE6\u60C5\u3002",
|
|
5275
|
+
nextAction: null,
|
|
5276
|
+
tone: "danger"
|
|
5277
|
+
},
|
|
5278
|
+
amaster_runtime_connector_dispatch_lost: {
|
|
5279
|
+
label: "\u6267\u884C\u8C03\u5EA6\u5DF2\u4E2D\u65AD",
|
|
5280
|
+
summary: "\u7CFB\u7EDF\u672A\u80FD\u4FDD\u6301\u672C\u6B21\u8FD0\u884C\u4E0E\u6267\u884C\u547D\u4EE4\u7684\u6709\u6548\u5173\u8054\u3002",
|
|
5281
|
+
nextAction: null,
|
|
5282
|
+
tone: "danger"
|
|
5283
|
+
},
|
|
5284
|
+
runtime_model_queued_deadline_exceeded: {
|
|
5285
|
+
label: "\u6A21\u578B\u6392\u961F\u8D85\u65F6",
|
|
5286
|
+
summary: "\u6A21\u578B\u8BF7\u6C42\u5728\u7B49\u5F85\u671F\u9650\u5185\u672A\u80FD\u5F00\u59CB\u6267\u884C\u3002",
|
|
5287
|
+
nextAction: null,
|
|
5288
|
+
tone: "warning"
|
|
5289
|
+
},
|
|
5290
|
+
model_call_terminal_event_missing: {
|
|
5291
|
+
label: "\u6A21\u578B\u7ED3\u675F\u72B6\u6001\u7F3A\u5931",
|
|
5292
|
+
summary: "\u6A21\u578B\u8C03\u7528\u672A\u8FD4\u56DE\u53EF\u786E\u8BA4\u7ED3\u675F\u72B6\u6001\u7684\u4E8B\u4EF6\uFF0C\u7CFB\u7EDF\u65E0\u6CD5\u786E\u8BA4\u7ED3\u679C\u3002",
|
|
5293
|
+
nextAction: null,
|
|
5294
|
+
tone: "danger"
|
|
5295
|
+
},
|
|
5296
|
+
source_acquisition_executor_failed: {
|
|
5297
|
+
label: "\u8D44\u6599\u83B7\u53D6\u5931\u8D25",
|
|
5298
|
+
summary: "\u83B7\u53D6\u4EFB\u52A1\u6240\u9700\u8D44\u6599\u65F6\u6267\u884C\u5668\u53D1\u751F\u9519\u8BEF\u3002",
|
|
5299
|
+
nextAction: null,
|
|
5300
|
+
tone: "danger"
|
|
5301
|
+
},
|
|
5302
|
+
runtime_dispatch_wait_expired: {
|
|
5303
|
+
label: "\u7B49\u5F85\u8C03\u5EA6\u8D85\u65F6",
|
|
5304
|
+
summary: "\u672C\u6B21\u8FD0\u884C\u672A\u80FD\u5728\u7B49\u5F85\u671F\u9650\u5185\u83B7\u5F97\u6267\u884C\u5B89\u6392\u3002",
|
|
5305
|
+
nextAction: null,
|
|
5306
|
+
tone: "warning"
|
|
5307
|
+
},
|
|
5308
|
+
platform_execution_context_invalid: {
|
|
5309
|
+
label: "\u6267\u884C\u6388\u6743\u4E0A\u4E0B\u6587\u5931\u6548",
|
|
5310
|
+
summary: "\u672C\u6B21\u8FD0\u884C\u7684\u6388\u6743\u4E0A\u4E0B\u6587\u5DF2\u5931\u6548\uFF0C\u6267\u884C\u5DF2\u505C\u6B62\u3002",
|
|
5311
|
+
nextAction: null,
|
|
5312
|
+
tone: "danger"
|
|
5313
|
+
},
|
|
5314
|
+
runtime_command_execution_authority_lost: {
|
|
5315
|
+
label: "\u6267\u884C\u6743\u9650\u5DF2\u5931\u6548",
|
|
5316
|
+
summary: "\u672C\u6B21\u547D\u4EE4\u5DF2\u5931\u53BB\u6709\u6548\u6267\u884C\u6743\u9650\u3002",
|
|
5317
|
+
nextAction: null,
|
|
5318
|
+
tone: "warning"
|
|
5319
|
+
},
|
|
5320
|
+
issue_paused: {
|
|
5321
|
+
label: "\u4EFB\u52A1\u5DF2\u6682\u505C",
|
|
5322
|
+
summary: "\u4EFB\u52A1\u6682\u505C\u540E\uFF0C\u672C\u6B21\u6267\u884C\u5DF2\u505C\u6B62\u3002",
|
|
5323
|
+
nextAction: null,
|
|
5324
|
+
tone: "neutral"
|
|
5325
|
+
},
|
|
5326
|
+
issue_cancelled: {
|
|
5327
|
+
label: "\u4EFB\u52A1\u5DF2\u53D6\u6D88",
|
|
5328
|
+
summary: "\u4EFB\u52A1\u53D6\u6D88\u540E\uFF0C\u672C\u6B21\u6267\u884C\u5DF2\u505C\u6B62\u3002",
|
|
5329
|
+
nextAction: null,
|
|
5330
|
+
tone: "neutral"
|
|
5331
|
+
},
|
|
5332
|
+
issue_dependencies_blocked: {
|
|
5333
|
+
label: "\u7B49\u5F85\u524D\u7F6E\u4EFB\u52A1",
|
|
5334
|
+
summary: "\u524D\u7F6E\u4F9D\u8D56\u5C1A\u672A\u6EE1\u8DB3\uFF0C\u672C\u6B21\u6267\u884C\u5DF2\u505C\u6B62\u3002",
|
|
5335
|
+
nextAction: null,
|
|
5336
|
+
tone: "warning"
|
|
5337
|
+
},
|
|
5338
|
+
executor_timeout: {
|
|
5339
|
+
label: "\u8FD0\u884C\u8D85\u65F6",
|
|
5340
|
+
summary: "\u672C\u6B21\u6267\u884C\u8D85\u8FC7\u5141\u8BB8\u65F6\u95F4\uFF0C\u7CFB\u7EDF\u5DF2\u7ECF\u505C\u6B62\u8FD0\u884C\u3002",
|
|
5341
|
+
nextAction: null,
|
|
5342
|
+
tone: "warning"
|
|
5343
|
+
},
|
|
5230
5344
|
control_plane_cancel_requested: {
|
|
5231
5345
|
label: "\u5DF2\u6309\u8981\u6C42\u53D6\u6D88",
|
|
5232
5346
|
summary: "\u672C\u6B21\u6267\u884C\u5DF2\u6309\u53D6\u6D88\u8BF7\u6C42\u5B89\u5168\u7ED3\u675F\u3002",
|
|
@@ -29183,6 +29297,31 @@ function prepareRuntimeDocumentUploads(cwd, mcpToolResults) {
|
|
|
29183
29297
|
}
|
|
29184
29298
|
|
|
29185
29299
|
// src/amaster-runtime-daemon/runtime-document-ingest-queue.mjs
|
|
29300
|
+
var RuntimeDocumentIngestAggregateError = class extends AggregateError {
|
|
29301
|
+
};
|
|
29302
|
+
function runtimeDocumentIngestFailureDiagnostics(error) {
|
|
29303
|
+
if (!(error instanceof RuntimeDocumentIngestAggregateError)) return null;
|
|
29304
|
+
const codes = /* @__PURE__ */ new Set(["ECONNRESET", "ECONNREFUSED", "ETIMEDOUT", "ENOTFOUND", "EAI_AGAIN", "ENOENT", "EACCES", "EPERM", "ENOSPC", "AbortError", "document_receipt_not_finalized"]);
|
|
29305
|
+
const errors = error.errors;
|
|
29306
|
+
return {
|
|
29307
|
+
version: 1,
|
|
29308
|
+
failureCount: errors.length,
|
|
29309
|
+
reasons: errors.slice(0, 5).map((failure) => {
|
|
29310
|
+
const reason = {};
|
|
29311
|
+
const seen = /* @__PURE__ */ new Set();
|
|
29312
|
+
let current = failure;
|
|
29313
|
+
for (let depth = 0; depth < 3 && current instanceof Error && !seen.has(current); depth++) {
|
|
29314
|
+
seen.add(current);
|
|
29315
|
+
if (reason.httpStatus === void 0 && Number.isInteger(current.httpStatus) && current.httpStatus >= 100 && current.httpStatus <= 599) reason.httpStatus = current.httpStatus;
|
|
29316
|
+
const code = codes.has(current.code) ? current.code : current.name === "AbortError" ? "AbortError" : null;
|
|
29317
|
+
if (!reason.code && code) reason.code = code;
|
|
29318
|
+
current = current.cause;
|
|
29319
|
+
}
|
|
29320
|
+
return reason;
|
|
29321
|
+
}),
|
|
29322
|
+
truncated: errors.length > 5
|
|
29323
|
+
};
|
|
29324
|
+
}
|
|
29186
29325
|
function createRuntimeDocumentIngestQueue({ ingest }) {
|
|
29187
29326
|
const inFlightCallIds = /* @__PURE__ */ new Set();
|
|
29188
29327
|
const finalizedCallIds = /* @__PURE__ */ new Set();
|
|
@@ -29230,7 +29369,7 @@ function createRuntimeDocumentIngestQueue({ ingest }) {
|
|
|
29230
29369
|
await api.drain();
|
|
29231
29370
|
const unresolvedErrors = [...new Set(errorsByCallId.values())];
|
|
29232
29371
|
if (unresolvedErrors.length > 0) {
|
|
29233
|
-
throw new
|
|
29372
|
+
throw new RuntimeDocumentIngestAggregateError(
|
|
29234
29373
|
unresolvedErrors,
|
|
29235
29374
|
`${unresolvedErrors.length} Runtime Document ingest operation(s) failed`
|
|
29236
29375
|
);
|
|
@@ -30540,7 +30679,7 @@ function assertRequiredTaskAttachmentMaterialized(input, materialized) {
|
|
|
30540
30679
|
}
|
|
30541
30680
|
|
|
30542
30681
|
// src/amaster-runtime-daemon.mjs
|
|
30543
|
-
var CONNECTOR_VERSION = "0.1.1-beta.
|
|
30682
|
+
var CONNECTOR_VERSION = "0.1.1-beta.241";
|
|
30544
30683
|
var CONNECTOR_CONTRACT_VERSION = "2026-06-04.v1";
|
|
30545
30684
|
var daemonRequire = createRequire(import.meta.url);
|
|
30546
30685
|
var MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
|
|
@@ -34807,7 +34946,9 @@ async function ingestRuntimeWorkspaceDocuments(config, command, cwd, mcpToolResu
|
|
|
34807
34946
|
...sourcePathHeaders
|
|
34808
34947
|
}));
|
|
34809
34948
|
if (readString(receipt.callId) !== upload.callId || readString(receipt.status) !== "finalized") {
|
|
34810
|
-
|
|
34949
|
+
const error = new Error(`Runtime Document ${upload.callId} was not finalized: ${JSON.stringify(receipt)}`);
|
|
34950
|
+
error.code = "document_receipt_not_finalized";
|
|
34951
|
+
throw error;
|
|
34811
34952
|
}
|
|
34812
34953
|
receipts.push(receipt);
|
|
34813
34954
|
await ingestLog(config, command, "system", "info", `Finalized Runtime Document ${upload.sourceRelativePath}`, {
|
|
@@ -36708,13 +36849,15 @@ async function processCommand(config, command) {
|
|
|
36708
36849
|
} catch (err) {
|
|
36709
36850
|
const message = err instanceof Error ? err.message : String(err);
|
|
36710
36851
|
const errorCode = commandFailureErrorCode(err);
|
|
36852
|
+
const documentIngestFailure = runtimeDocumentIngestFailureDiagnostics(err);
|
|
36711
36853
|
const runtimeArtifacts = Array.isArray(asRecord(err).receipts) ? asRecord(err).receipts.map(asRecord) : [];
|
|
36712
36854
|
await ingestLog(config, command, "system", "error", message);
|
|
36713
36855
|
await completeCommand(config, command, "failed", {
|
|
36714
36856
|
summary: message,
|
|
36715
36857
|
commandType: command.commandType,
|
|
36716
36858
|
...errorCode && /^[a-z][a-z0-9_]{0,127}$/.test(errorCode) ? { errorCode } : {},
|
|
36717
|
-
...runtimeArtifacts.length > 0 ? { runtimeArtifacts } : {}
|
|
36859
|
+
...runtimeArtifacts.length > 0 ? { runtimeArtifacts } : {},
|
|
36860
|
+
...documentIngestFailure ? { documentIngestFailure } : {}
|
|
36718
36861
|
}, message);
|
|
36719
36862
|
}
|
|
36720
36863
|
}
|
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.241";
|
|
11
11
|
|
|
12
12
|
const CONFIG_KEY_MAP = new Map([
|
|
13
13
|
["server_url", "AMASTER_EMPLOYEE_SERVER_URL"],
|