@akagilnc/pi-workflow-roles 0.1.5325 → 0.1.5365
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.
- package/dist/acp-host/production-host.js +109 -223
- package/dist/doctor-contracts.js +22 -34
- package/dist/headless-host/production-host.js +109 -223
- package/dist/merger-contracts.js +11 -6
- package/dist/migrate-book-topology.js +54 -98
- package/dist/open-tool-schema.js +1 -25
- package/dist/package-contracts/fixer-output.js +21 -35
- package/dist/public-cli/main.js +63 -107
- package/package.json +1 -1
- package/src/diarist-role.ts +12 -49
- package/src/doctor-contracts.ts +38 -49
- package/src/gleaner-left-role.ts +10 -11
- package/src/merger-contracts.ts +19 -12
- package/src/open-tool-schema.ts +8 -32
- package/src/package-contracts/fixer-output.ts +49 -52
- package/src/reviewer-role.ts +16 -35
- package/src/secretariat-role.ts +16 -12
- package/src/worker-role.ts +14 -29
- package/src/worker-submission-gates.ts +14 -3
|
@@ -280,29 +280,6 @@ function described(name, schema) {
|
|
|
280
280
|
if (typeof schema.description === "string") return schema;
|
|
281
281
|
throw new Error(`Tool field ${name} has no semantic description at its schema owner`);
|
|
282
282
|
}
|
|
283
|
-
function declarationIdentity(schema) {
|
|
284
|
-
const { description: _description, ...semantic } = schema;
|
|
285
|
-
return JSON.stringify(semantic);
|
|
286
|
-
}
|
|
287
|
-
function openToolObjectFromUnion(schema) {
|
|
288
|
-
const declarations = /* @__PURE__ */ new Map();
|
|
289
|
-
for (const variant of schema.anyOf) {
|
|
290
|
-
for (const [name, declaration] of Object.entries(variant.properties ?? {})) {
|
|
291
|
-
const entries = declarations.get(name) ?? [];
|
|
292
|
-
const identity = declarationIdentity(declaration);
|
|
293
|
-
if (!entries.some((entry) => declarationIdentity(entry) === identity)) entries.push(declaration);
|
|
294
|
-
declarations.set(name, entries);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
const properties = Object.fromEntries([...declarations].map(([name, entries]) => {
|
|
298
|
-
const descriptions = [...new Set(entries.map((entry) => entry.description).filter((value) => typeof value === "string"))].join(" ");
|
|
299
|
-
const declaration = entries.length === 1 ? entries[0] : Type3.Union(entries, descriptions === "" ? {} : { description: descriptions });
|
|
300
|
-
return [name, Type3.Optional(described(name, declaration))];
|
|
301
|
-
}));
|
|
302
|
-
const object = Type3.Object(properties, { additionalProperties: true });
|
|
303
|
-
object.required = [];
|
|
304
|
-
return object;
|
|
305
|
-
}
|
|
306
283
|
function openToolObject(schema) {
|
|
307
284
|
const object = Type3.Object(
|
|
308
285
|
Object.fromEntries(Object.entries(schema.properties).map(([name, declaration]) => [
|
|
@@ -414,50 +391,36 @@ import { Type as Type6 } from "typebox";
|
|
|
414
391
|
function validateFixerOutput(value, _phase) {
|
|
415
392
|
return value;
|
|
416
393
|
}
|
|
417
|
-
var FIXER_OUTPUT_TOOL_NAME,
|
|
394
|
+
var FIXER_OUTPUT_TOOL_NAME, PARTIALLY_COMPLETED_DEFINITION, FIXER_STATUS_DESCRIPTION, fixerOutputObject, fixerOutputSchema;
|
|
418
395
|
var init_fixer_output = __esm({
|
|
419
396
|
"src/package-contracts/fixer-output.ts"() {
|
|
420
397
|
"use strict";
|
|
421
398
|
init_open_tool_schema();
|
|
422
399
|
init_terminating_infrastructure();
|
|
423
400
|
FIXER_OUTPUT_TOOL_NAME = "ak_fixer_output";
|
|
424
|
-
transportString = Type6.String();
|
|
425
|
-
authorityBlockerSchema = Type6.Object({ cause: Type6.Optional(Type6.Literal("authority_violation")), evidence: Type6.Optional(transportString) });
|
|
426
|
-
prerequisiteBlockerSchema = Type6.Object({ cause: Type6.Optional(Type6.Literal("prerequisite_unmet")), prerequisiteId: Type6.Optional(transportString), evidence: Type6.Optional(transportString) });
|
|
427
|
-
blockerSchema = Type6.Union([authorityBlockerSchema, prerequisiteBlockerSchema]);
|
|
428
|
-
exceptionSchema = Type6.Object({ where: Type6.Optional(transportString), reason: Type6.Optional(transportString) });
|
|
429
|
-
testEvidenceSchema = Type6.Object({
|
|
430
|
-
contract: Type6.Optional(Type6.String({ description: "\u6D4B\u8BD5\u6539\u52A8\u6240\u8BC1\u660E\u7684\u5951\u7EA6" })),
|
|
431
|
-
minimumNecessaryCost: Type6.Optional(Type6.String({ description: "\u6D4B\u8BD5\u6539\u52A8\u7684\u4E00\u884C\u6700\u5C0F\u5FC5\u8981\u6210\u672C" })),
|
|
432
|
-
measuredDuration: Type6.Optional(Type6.String({ description: "\u805A\u7126\u9A8C\u8BC1\u5B9E\u6D4B\u65F6\u957F" }))
|
|
433
|
-
}, { description: "\u6D4B\u8BD5\u8BC1\u636E\u6761\uFF1Bdiff \u542B\u6D4B\u8BD5\u6539\u52A8\u65F6\u63D0\u4EA4\uFF1B\u673A\u5668\u4E0D\u6838\u9A8C\u3002" });
|
|
434
|
-
completedClassResultSchema = Type6.Object({
|
|
435
|
-
name: Type6.Optional(transportString),
|
|
436
|
-
disposition: Type6.Optional(Type6.Literal("completed")),
|
|
437
|
-
searchScope: Type6.Optional(transportString),
|
|
438
|
-
exceptions: Type6.Optional(Type6.Array(exceptionSchema)),
|
|
439
|
-
commitSha: Type6.Optional(transportString)
|
|
440
|
-
});
|
|
441
|
-
refusedClassResultSchema = Type6.Object({
|
|
442
|
-
name: Type6.Optional(transportString),
|
|
443
|
-
disposition: Type6.Optional(Type6.Literal("refused")),
|
|
444
|
-
remainingScope: Type6.Optional(transportString),
|
|
445
|
-
blocker: Type6.Optional(blockerSchema)
|
|
446
|
-
});
|
|
447
|
-
classResultSchema = Type6.Union([completedClassResultSchema, refusedClassResultSchema]);
|
|
448
|
-
completedClassResultsSchema = Type6.Array(completedClassResultSchema);
|
|
449
401
|
PARTIALLY_COMPLETED_DEFINITION = "partially_completed \u53EA\u80FD\u5728\u6709\u5408\u6CD5\u62D2\u7EDD\u9879\uFF08\u5B8C\u6210\u9879\u4E0E\u5408\u6CD5\u62D2\u7EDD\u9879\u5E76\u5B58\uFF09\u65F6\u7528\uFF0C\u522B\u7684\u60C5\u51B5\u4E0D\u51C6\u7528\u3002";
|
|
450
402
|
FIXER_STATUS_DESCRIPTION = `planned | completed | refused | unfinished | partially_completed\u3002unfinished \u7F3A\u524D\u7F6E\u6216\u8FDD\u5BAA\u7EA6\u675F\u81F4\u672C\u5C40\u672A\u5B8C\u6210\u65F6\u53EF\u7528\uFF0C\u7F3A\u5F85\u51B3 owner \u51B3\u5B9A\u6216\u7B54\u590D\u5C5E\u7F3A\u524D\u7F6E\u3002${PARTIALLY_COMPLETED_DEFINITION}`;
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
403
|
+
fixerOutputObject = Type6.Object({
|
|
404
|
+
status: Type6.Unknown({ description: FIXER_STATUS_DESCRIPTION }),
|
|
405
|
+
report: Type6.Unknown({ description: "\u5982\u5B9E\u7ED3\u679C\u62A5\u544A" }),
|
|
406
|
+
remainingScope: Type6.Unknown({
|
|
407
|
+
description: "\u672C\u5C40\u540E\u5269\u4F59\u5DE5\u4F5C\uFF1B\u4F9D\u6CD5\u4E0D\u80FD\u5B8C\u6210\u7684\u8303\u56F4\u4E5F\u5199\u6B64\u5904\u3002"
|
|
408
|
+
}),
|
|
409
|
+
blocker: Type6.Unknown({
|
|
410
|
+
description: "\u5408\u6CD5\u963B\u65AD\u5B8C\u6210\u7684 blocker\uFF0C\u539F\u6837\u7559\u5B58\u3002\u53EF\u5199 cause\uFF08authority_violation \u6216 prerequisite_unmet\uFF09\u3001evidence\uFF1Bprerequisite_unmet \u8FD8\u53EF\u5199 prerequisiteId\u3002"
|
|
411
|
+
}),
|
|
412
|
+
reason: Type6.Unknown({
|
|
413
|
+
description: "\u963B\u65AD\u539F\u56E0\uFF1A\u7F3A\u524D\u7F6E\u6216\u8FDD\u5BAA\u7EA6\u675F\u3002\u7F3A\u5F85\u51B3 owner \u51B3\u5B9A\u6216\u7B54\u590D\u5C5E\u7F3A\u524D\u7F6E\u3002"
|
|
414
|
+
}),
|
|
415
|
+
classResults: Type6.Unknown({
|
|
416
|
+
description: "\u5404\u7C7B class \u7ED3\u7B97\uFF0C\u539F\u6837\u7559\u5B58\u3002\u5B8C\u6210\u9879\u7684 disposition \u4E3A completed\uFF0C\u53EF\u5199 name\u3001searchScope\u3001exceptions\uFF08where\u3001reason\uFF09\u3001commitSha\u3002\u62D2\u7EDD\u9879\u7684 disposition \u4E3A refused\uFF0C\u53EF\u5199 name\u3001remainingScope\u3001blocker\u3002"
|
|
417
|
+
}),
|
|
418
|
+
testEvidence: Type6.Unknown({
|
|
419
|
+
description: "\u6D4B\u8BD5\u8BC1\u636E\u6761\uFF1Bdiff \u542B\u6D4B\u8BD5\u6539\u52A8\u65F6\u63D0\u4EA4\uFF1B\u673A\u5668\u4E0D\u6838\u9A8C\u3002\u53EF\u5199 contract\uFF08\u6D4B\u8BD5\u6539\u52A8\u6240\u8BC1\u660E\u7684\u5951\u7EA6\uFF09\u3001minimumNecessaryCost\uFF08\u6D4B\u8BD5\u6539\u52A8\u7684\u4E00\u884C\u6700\u5C0F\u5FC5\u8981\u6210\u672C\uFF09\u3001measuredDuration\uFF08\u805A\u7126\u9A8C\u8BC1\u5B9E\u6D4B\u65F6\u957F\uFF09\u3002"
|
|
420
|
+
})
|
|
421
|
+
});
|
|
459
422
|
fixerOutputSchema = withTerminatingOutputDeclarations(
|
|
460
|
-
|
|
423
|
+
openToolObject(fixerOutputObject)
|
|
461
424
|
);
|
|
462
425
|
}
|
|
463
426
|
});
|
|
@@ -575,7 +538,7 @@ function validateDoctorSubmissionShape(value) {
|
|
|
575
538
|
function validateDoctorOutput(value, _patient, _store) {
|
|
576
539
|
return validateDoctorSubmissionShape(value);
|
|
577
540
|
}
|
|
578
|
-
var DOCTOR_EVIDENCE_TOOL_NAME, DOCTOR_OUTPUT_TOOL_NAME, DOCTOR_AUDIT_TOOL_NAME, DOCTOR_OUTPUT_TOOL_DESCRIPTION, DOCTOR_TARGET_KINDS,
|
|
541
|
+
var DOCTOR_EVIDENCE_TOOL_NAME, DOCTOR_OUTPUT_TOOL_NAME, DOCTOR_AUDIT_TOOL_NAME, DOCTOR_OUTPUT_TOOL_DESCRIPTION, DOCTOR_TARGET_KINDS, DOCTOR_DISPOSITIONS, DOCTOR_PRESCRIPTION_KINDS, biteActual, biteNone, DOCTOR_BITE_KINDS, DOCTOR_STATUS_DESCRIPTION, doctorSubmissionObject, doctorSubmissionSchema, doctorEvidenceReadSchema, DoctorEvidenceStore;
|
|
579
542
|
var init_doctor_contracts = __esm({
|
|
580
543
|
"src/doctor-contracts.ts"() {
|
|
581
544
|
"use strict";
|
|
@@ -587,41 +550,29 @@ var init_doctor_contracts = __esm({
|
|
|
587
550
|
DOCTOR_AUDIT_TOOL_NAME = "ak_doctor_audit_decision";
|
|
588
551
|
DOCTOR_OUTPUT_TOOL_DESCRIPTION = "\u63D0\u4EA4\u552F\u4E00\u7EC8\u5C40\u5355\u6848\u8BC1\u8BCD\uFF1Bcompleted \u5141\u8BB8\u7A7A findings\u3002";
|
|
589
552
|
DOCTOR_TARGET_KINDS = ["law", "gate", "template", "station", "seat"];
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
Type8.Object({ kind: Type8.Optional(Type8.Literal("noRealBite")), targetKey: nonblank, eligibleEvidenceIds: evidenceIds }, { additionalProperties: true })
|
|
596
|
-
]);
|
|
597
|
-
assetKinds = DOCTOR_TARGET_KINDS;
|
|
598
|
-
findingBody = {
|
|
599
|
-
evidenceIds,
|
|
600
|
-
disposition: Type8.Optional(Type8.Union([Type8.Literal("keep"), Type8.Literal("thin"), Type8.Literal("delete")])),
|
|
601
|
-
guardrails: Type8.Optional(Type8.Object({ reproducibleFailure: guardrail, owningSeamOrInvariant: guardrail, deletionOrSimplificationSuffices: guardrail }, { additionalProperties: true })),
|
|
602
|
-
prescription: Type8.Optional(Type8.Object({ kind: Type8.Optional(Type8.Union([Type8.Literal("retain"), Type8.Literal("delete"), Type8.Literal("simplify"), Type8.Literal("patch"), Type8.Literal("addMechanism")])), recommendation: nonblank, necessityExplanation: nonblank }, { additionalProperties: true })),
|
|
603
|
-
lastRealBite: Type8.Optional(lastRealBite)
|
|
604
|
-
};
|
|
605
|
-
finding = Type8.Union([
|
|
606
|
-
Type8.Object({ targetKey: nonblank, observation: nonblank, evidenceIds }, { additionalProperties: true }),
|
|
607
|
-
Type8.Object({ targetKey: nonblank, targetKind: Type8.Optional(Type8.Union(assetKinds.map((kind) => Type8.Literal(kind)))), assetEvidence: Type8.Optional(Type8.Object({ targetKey: nonblank, targetKind: Type8.Optional(Type8.Union(assetKinds.map((kind) => Type8.Literal(kind)))), evidenceId: nonblank }, { additionalProperties: true })), ...findingBody }, { additionalProperties: true })
|
|
608
|
-
]);
|
|
609
|
-
caseIdentity = Type8.Object({ issueNumber: Type8.Optional(Type8.Integer()), runsPath: nonblank }, { additionalProperties: true });
|
|
553
|
+
DOCTOR_DISPOSITIONS = ["keep", "thin", "delete"];
|
|
554
|
+
DOCTOR_PRESCRIPTION_KINDS = ["retain", "delete", "simplify", "patch", "addMechanism"];
|
|
555
|
+
biteActual = "actual";
|
|
556
|
+
biteNone = "noRealBite";
|
|
557
|
+
DOCTOR_BITE_KINDS = [biteActual, biteNone];
|
|
610
558
|
DOCTOR_STATUS_DESCRIPTION = "completed | refused\u3002completed \u5141\u8BB8\u7A7A findings\uFF1Brefused \u4EC5\u5F53\u8BC1\u636E\u4E0D\u8DB3\u4EE5\u652F\u6491\u5982\u5B9E\u6848\u8BC1\u8BCD";
|
|
611
|
-
|
|
612
|
-
Type8.
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
},
|
|
622
|
-
|
|
559
|
+
doctorSubmissionObject = Type8.Object({
|
|
560
|
+
status: Type8.Unknown({ description: DOCTOR_STATUS_DESCRIPTION }),
|
|
561
|
+
case: Type8.Unknown({
|
|
562
|
+
description: "\u7559\u5B58\u592A\u533B\u7F72\u6848\u8EAB\u4EFD\uFF0C\u539F\u6837\u7559\u5B58\uFF08\u5982 issueNumber\u3001runsPath\uFF09\u3002\u673A\u68B0\u5C42\u53E6\u6309\u7ED1\u5B9A run \u6295\u5F71\u6848\u8EAB\u4EFD\uFF0C\u4E0D\u5728\u672C\u5B57\u6BB5\u91CD\u5224\u3002"
|
|
563
|
+
}),
|
|
564
|
+
findings: Type8.Unknown({
|
|
565
|
+
description: `\u9010\u6761\u8D44\u4EA7\u89C2\u5BDF\u4E0E\u5904\u65B9\uFF0C\u539F\u6837\u7559\u5B58\u3002\u4E00\u6761\u53EF\u542B targetKey\u3001targetKind\uFF08${DOCTOR_TARGET_KINDS.join(" | ")}\uFF09\u3001observation\u3001evidenceIds\u3001disposition\uFF08${DOCTOR_DISPOSITIONS.join(" | ")}\uFF09\u3001assetEvidence\uFF08targetKey\u3001targetKind\u3001evidenceId\uFF09\u3001guardrails\uFF08reproducibleFailure\u3001owningSeamOrInvariant\u3001deletionOrSimplificationSuffices\uFF0C\u5404\u9879\u53EF\u542B answer\u3001evidenceIds\u3001explanation\uFF09\u3001prescription\uFF08kind \u4E3A ${DOCTOR_PRESCRIPTION_KINDS.join(" | ")}\uFF0C\u53E6\u53EF\u5199 recommendation\u3001necessityExplanation\uFF09\u3001lastRealBite\uFF08kind \u4E3A ${DOCTOR_BITE_KINDS.join(" | ")}\uFF0C\u53E6\u53EF\u5199 targetKey\u3001evidenceId\u3001eligibleEvidenceIds\uFF09\u3002\u4E0D\u8981\u6C42\u4EFB\u4F55\u5904\u65B9\u6216\u53EF\u590D\u7528 finding\uFF1B\u7F3A\u53EF\u590D\u7528\u8D44\u4EA7\u6216 bounded-bite \u8BC1\u636E\u53EA\u6392\u9664\u5BF9\u5E94\u8D44\u4EA7\u5904\u65B9\u3002\u673A\u5668\u4E0D\u6838\u9A8C\u3002`
|
|
566
|
+
}),
|
|
567
|
+
reason: Type8.Unknown({
|
|
568
|
+
description: "\u8BC1\u636E\u4E0D\u8DB3\u4EE5\u652F\u6491\u5982\u5B9E\u8BC1\u8BCD\u7684\u539F\u56E0\uFF1B\u4EC5 refused \u65F6\u7528\u3002"
|
|
569
|
+
}),
|
|
570
|
+
missingEvidence: Type8.Unknown({
|
|
571
|
+
description: "\u5982\u5B9E\u8BC1\u8BCD\u6240\u9700\u800C\u5C1A\u7F3A\u7684\u8BC1\u636E\uFF0C\u539F\u6837\u7559\u5B58\uFF08\u5982\u6BCF\u9879 need\u3001targetKeys\uFF09\u3002"
|
|
572
|
+
})
|
|
573
|
+
});
|
|
623
574
|
doctorSubmissionSchema = withTerminatingOutputDeclarations(
|
|
624
|
-
|
|
575
|
+
openToolObject(doctorSubmissionObject)
|
|
625
576
|
);
|
|
626
577
|
doctorEvidenceReadSchema = Type8.Object({ evidenceId: Type8.String({ minLength: 1, description: "\u5F85\u8BFB\u7559\u5B58\u8BC1\u636E\u6807\u8BC6" }), offset: Type8.Optional(Type8.Integer({ minimum: 0, description: "\u8D77\u59CB\u5B57\u8282\u504F\u79FB\uFF08\u4ECE 0 \u8BA1\uFF09" })), limit: Type8.Optional(Type8.Integer({ minimum: 1, description: "\u8FD4\u56DE\u5B57\u8282\u6570\uFF08\u65E0\u4E0A\u9650\uFF09" })) }, { additionalProperties: true });
|
|
627
578
|
DoctorEvidenceStore = class {
|
|
@@ -715,7 +666,7 @@ function validateMergerInput(value) {
|
|
|
715
666
|
const authorizedChecks = Array.isArray(value.authorizedChecks) ? value.authorizedChecks.filter((check) => record(check)).map((c) => ({ name: asString(c.name), argv: asStringArray(c.argv).filter((a) => a.trim().length > 0) })).filter((c) => c.name.trim().length > 0 && c.argv.length > 0) : [];
|
|
716
667
|
return deepFreeze(structuredClone({ attemptId: value.attemptId.trim(), targetObjectId: asString(value.targetObjectId), sourceObjectId: asString(value.sourceObjectId), materials, expectedConflictPaths: asStringArray(value.expectedConflictPaths), resolutionScope: asStringArray(value.resolutionScope), authorizedChecks }));
|
|
717
668
|
}
|
|
718
|
-
var materialSchema, checkSchema, mergerInputSchema, MERGER_STATUS_DESCRIPTION,
|
|
669
|
+
var materialSchema, checkSchema, mergerInputSchema, MERGER_STATUS_DESCRIPTION, mergerOutputObject, mergerOutputSchema, MERGER_OUTPUT_TOOL_NAME, record, blank, MergerInputContractError, asString, asStringArray;
|
|
719
670
|
var init_merger_contracts = __esm({
|
|
720
671
|
"src/merger-contracts.ts"() {
|
|
721
672
|
"use strict";
|
|
@@ -734,11 +685,16 @@ var init_merger_contracts = __esm({
|
|
|
734
685
|
authorizedChecks: Type9.Array(checkSchema)
|
|
735
686
|
}, { additionalProperties: false });
|
|
736
687
|
MERGER_STATUS_DESCRIPTION = "completed | escalate";
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
688
|
+
mergerOutputObject = Type9.Object({
|
|
689
|
+
status: Type9.Unknown({ description: MERGER_STATUS_DESCRIPTION }),
|
|
690
|
+
attemptId: Type9.Unknown({ description: "\u5DF2\u53D7\u7406\u5408\u5E76 attempt \u8EAB\u4EFD" }),
|
|
691
|
+
report: Type9.Unknown({ description: "\u5982\u5B9E\u7ED3\u679C\u62A5\u544A" }),
|
|
692
|
+
mergeCommitId: Type9.Unknown({ description: "\u5B8C\u6210\u5408\u5E76 commit object ID" }),
|
|
693
|
+
diagnosis: Type9.Unknown({
|
|
694
|
+
description: "\u5408\u5E76\u65E0\u6CD5\u6216\u4E0D\u5E94\u7531\u672C\u5E2D\u5B8C\u6210\u7684\u539F\u56E0\uFF08\u542B\u65E0\u8FDB\u884C\u4E2D\u5408\u5E76\u3001\u65E0\u6D3B\u53EF\u5E72\u3001\u9700\u65B0\u7684\u4EA7\u54C1/\u6743\u529B\u51B3\u5B9A\uFF09"
|
|
695
|
+
})
|
|
696
|
+
});
|
|
697
|
+
mergerOutputSchema = withTerminatingOutputDeclarations(openToolObject(mergerOutputObject));
|
|
742
698
|
MERGER_OUTPUT_TOOL_NAME = "ak_merger_output";
|
|
743
699
|
record = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
744
700
|
blank = (v) => typeof v !== "string" || v.trim().length === 0;
|
|
@@ -7774,7 +7730,7 @@ async function admitPublicRole(role, parsed, env, override) {
|
|
|
7774
7730
|
if (parsed.runs === void 0) {
|
|
7775
7731
|
ensureRealDirectoryTree(placed.ledgerHome, caseRunsPath);
|
|
7776
7732
|
}
|
|
7777
|
-
let
|
|
7733
|
+
let caseIdentity;
|
|
7778
7734
|
try {
|
|
7779
7735
|
const patient = await loadDoctorCase(caseRunsPath);
|
|
7780
7736
|
if (patient.identity.issueNumber !== issueNumber) {
|
|
@@ -7782,7 +7738,7 @@ async function admitPublicRole(role, parsed, env, override) {
|
|
|
7782
7738
|
`doctor case issue ${patient.identity.issueNumber} does not match --issue ${issueNumber}`
|
|
7783
7739
|
);
|
|
7784
7740
|
}
|
|
7785
|
-
|
|
7741
|
+
caseIdentity = patient.identity;
|
|
7786
7742
|
caseRunsPath = await realpath4(caseRunsPath);
|
|
7787
7743
|
} catch (error) {
|
|
7788
7744
|
if (error instanceof CliUsageError) throw error;
|
|
@@ -7796,7 +7752,7 @@ async function admitPublicRole(role, parsed, env, override) {
|
|
|
7796
7752
|
return {
|
|
7797
7753
|
issueNumber,
|
|
7798
7754
|
caseRunsPath,
|
|
7799
|
-
caseIdentity
|
|
7755
|
+
caseIdentity,
|
|
7800
7756
|
attachments: persistedAttachmentRefs(frozenAttachments)
|
|
7801
7757
|
};
|
|
7802
7758
|
}
|
|
@@ -19838,7 +19794,7 @@ async function loadResumableRunRecord(home, runId, authority) {
|
|
|
19838
19794
|
let waitWindowMs;
|
|
19839
19795
|
let issueNumber;
|
|
19840
19796
|
let caseRunsPath;
|
|
19841
|
-
let
|
|
19797
|
+
let caseIdentity;
|
|
19842
19798
|
let sourceRunPath;
|
|
19843
19799
|
let sourceRun;
|
|
19844
19800
|
try {
|
|
@@ -19909,7 +19865,7 @@ async function loadResumableRunRecord(home, runId, authority) {
|
|
|
19909
19865
|
if (record4.caseIdentity !== null && typeof record4.caseIdentity === "object" && !Array.isArray(record4.caseIdentity)) {
|
|
19910
19866
|
const ci = record4.caseIdentity;
|
|
19911
19867
|
if (typeof ci.issueNumber === "number" && Number.isSafeInteger(ci.issueNumber) && ci.issueNumber >= 1 && typeof ci.runsPath === "string" && ci.runsPath.trim() !== "") {
|
|
19912
|
-
|
|
19868
|
+
caseIdentity = { issueNumber: ci.issueNumber, runsPath: ci.runsPath };
|
|
19913
19869
|
}
|
|
19914
19870
|
}
|
|
19915
19871
|
if (typeof record4.sourceRunPath === "string" && record4.sourceRunPath.trim() !== "") {
|
|
@@ -20038,7 +19994,7 @@ async function loadResumableRunRecord(home, runId, authority) {
|
|
|
20038
19994
|
...waitWindowMs === void 0 ? {} : { waitWindowMs },
|
|
20039
19995
|
...issueNumber === void 0 ? {} : { issueNumber },
|
|
20040
19996
|
...caseRunsPath === void 0 ? {} : { caseRunsPath },
|
|
20041
|
-
...
|
|
19997
|
+
...caseIdentity === void 0 ? {} : { caseIdentity },
|
|
20042
19998
|
...sourceRunPath === void 0 ? {} : { sourceRunPath },
|
|
20043
19999
|
...sourceRun === void 0 ? {} : { sourceRun },
|
|
20044
20000
|
...model === void 0 ? {} : { model }
|
|
@@ -20260,8 +20216,8 @@ function admitResumedRole(loaded) {
|
|
|
20260
20216
|
return admitted;
|
|
20261
20217
|
}
|
|
20262
20218
|
case "case-identity": {
|
|
20263
|
-
const { issueNumber, caseRunsPath, caseIdentity
|
|
20264
|
-
if (issueNumber === void 0 || caseRunsPath === void 0 ||
|
|
20219
|
+
const { issueNumber, caseRunsPath, caseIdentity } = fields;
|
|
20220
|
+
if (issueNumber === void 0 || caseRunsPath === void 0 || caseIdentity === void 0) {
|
|
20265
20221
|
throw new CliUsageError(
|
|
20266
20222
|
`role run admitted doctor case identity is missing: ${runId}`
|
|
20267
20223
|
);
|
|
@@ -20271,7 +20227,7 @@ function admitResumedRole(loaded) {
|
|
|
20271
20227
|
...base,
|
|
20272
20228
|
issueNumber,
|
|
20273
20229
|
caseRunsPath,
|
|
20274
|
-
caseIdentity
|
|
20230
|
+
caseIdentity
|
|
20275
20231
|
};
|
|
20276
20232
|
return admitted;
|
|
20277
20233
|
}
|
|
@@ -22465,16 +22421,9 @@ var gleanerLeftOutputSchema = withTerminatingOutputDeclarations(
|
|
|
22465
22421
|
status: Type17.Unknown({
|
|
22466
22422
|
description: "completed"
|
|
22467
22423
|
}),
|
|
22468
|
-
findings: Type17.
|
|
22469
|
-
|
|
22470
|
-
|
|
22471
|
-
pointer: Type17.Optional(Type17.String({ description: "\u6587\u4EF6/\u884C\u6307\u9488" })),
|
|
22472
|
-
statement: Type17.Optional(Type17.String({ description: "\u7591\u70B9\u9648\u8FF0" }))
|
|
22473
|
-
},
|
|
22474
|
-
{ additionalProperties: true, description: "\u4E00\u6761\u5F39\u7AE0" }
|
|
22475
|
-
),
|
|
22476
|
-
{ description: "\u5F39\u7AE0\u5217\u8868\uFF1B\u7A7A\u5217\u8868\u5408\u6CD5\u5B8C\u5C40" }
|
|
22477
|
-
)
|
|
22424
|
+
findings: Type17.Unknown({
|
|
22425
|
+
description: "\u5F39\u7AE0\u5217\u8868\uFF1B\u6BCF\u6761\u53EF\u542B pointer\uFF08\u6587\u4EF6/\u884C\u6307\u9488\uFF09\u4E0E statement\uFF08\u7591\u70B9\u9648\u8FF0\uFF09\uFF0C\u539F\u6837\u7559\u5B58\u3002\u7A7A\u5217\u8868\u5408\u6CD5\u5B8C\u5C40\uFF1B\u673A\u5668\u4E0D\u5224\u5F39\u7AE0\u662F\u5426\u6210\u7ACB\u3002"
|
|
22426
|
+
})
|
|
22478
22427
|
})
|
|
22479
22428
|
)
|
|
22480
22429
|
);
|
|
@@ -22510,37 +22459,7 @@ init_terminating_infrastructure();
|
|
|
22510
22459
|
init_diarist_contracts();
|
|
22511
22460
|
init_diarist_contracts();
|
|
22512
22461
|
import { Type as Type18 } from "typebox";
|
|
22513
|
-
var
|
|
22514
|
-
Type18.Object(
|
|
22515
|
-
{
|
|
22516
|
-
path: Type18.Optional(Type18.String({ description: "\u4F1A\u8BDD\u5377\u7EDD\u5BF9\u6216\u53EF\u8BFB\u8DEF\u5F84" })),
|
|
22517
|
-
ranges: Type18.Optional(
|
|
22518
|
-
Type18.Array(
|
|
22519
|
-
Type18.Object(
|
|
22520
|
-
{
|
|
22521
|
-
from: Type18.Optional(
|
|
22522
|
-
Type18.Object(
|
|
22523
|
-
{ id: Type18.Optional(Type18.String()), line: Type18.Optional(Type18.Unknown()) },
|
|
22524
|
-
{ additionalProperties: true, description: "\u8D77\u70B9\uFF1A\u539F\u751F id \u6216\u672C\u8F6E\u884C\u53F7\u4E8C\u9009\u4E00" }
|
|
22525
|
-
)
|
|
22526
|
-
),
|
|
22527
|
-
to: Type18.Optional(
|
|
22528
|
-
Type18.Object(
|
|
22529
|
-
{ id: Type18.Optional(Type18.String()), line: Type18.Optional(Type18.Unknown()) },
|
|
22530
|
-
{ additionalProperties: true, description: "\u7EC8\u70B9\uFF1A\u539F\u751F id \u6216\u672C\u8F6E\u884C\u53F7\u4E8C\u9009\u4E00" }
|
|
22531
|
-
)
|
|
22532
|
-
)
|
|
22533
|
-
},
|
|
22534
|
-
{ additionalProperties: true, description: "\u4E00\u6BB5\u5BF9\u8BDD\u533A\u95F4" }
|
|
22535
|
-
),
|
|
22536
|
-
{ description: "\u672C\u5377\u672C\u8F6E\u5404\u533A\u95F4\uFF1B\u81F3\u5C11\u4E00\u6BB5" }
|
|
22537
|
-
)
|
|
22538
|
-
)
|
|
22539
|
-
},
|
|
22540
|
-
{ additionalProperties: true, description: "\u4E00\u5377\u4F1A\u8BDD\u7684\u8FB9\u754C" }
|
|
22541
|
-
),
|
|
22542
|
-
{ description: "\u5BF9\u8BDD\u8FB9\u754C\uFF1B\u7A7A\u5217\u8868\uFF1D\u672C\u8F6E\u65E0\u5BF9\u8BDD\u53EF\u5212\u3002\u7AEF\u70B9\u65E0\u6CD5\u6307\u540D\u65F6\u8D70 reask\uFF0C\u4E0D\u4E2D\u6B62\u3002" }
|
|
22543
|
-
);
|
|
22462
|
+
var DIARIST_SESSIONS_DESCRIPTION = "\u5BF9\u8BDD\u8FB9\u754C\u3002\u6BCF\u5377\u542B path\uFF08\u4F1A\u8BDD\u5377\u7EDD\u5BF9\u6216\u53EF\u8BFB\u8DEF\u5F84\uFF09\u4E0E ranges\uFF08\u672C\u5377\u672C\u8F6E\u5404\u533A\u95F4\uFF09\u3002\u6BCF\u6BB5\u533A\u95F4\u542B from / to\uFF1B\u8D77\u70B9\u4E0E\u7EC8\u70B9\u5404\u5199 id\uFF08\u539F\u751F id\uFF09\u6216 line\uFF08\u672C\u8F6E\u884C\u53F7\uFF09\uFF0C\u4E8C\u9009\u4E00\u3002\u7A7A\u5217\u8868\uFF1D\u672C\u8F6E\u65E0\u5BF9\u8BDD\u53EF\u5212\u3002\u7AEF\u70B9\u65E0\u6CD5\u6307\u540D\u65F6\u8D70 reask\uFF0C\u4E0D\u4E2D\u6B62\u3002";
|
|
22544
22463
|
var diaristOutputSchema = withTerminatingOutputDeclarations(
|
|
22545
22464
|
openToolObject(
|
|
22546
22465
|
Type18.Object({
|
|
@@ -22552,24 +22471,13 @@ var diaristOutputSchema = withTerminatingOutputDeclarations(
|
|
|
22552
22471
|
description: "\u672C\u5EAD\u5BF9\u8C61\u7968\u53F7\uFF08\u6B63\u6574\u6570\uFF09\u6216 null/\u7701\u7565\uFF1D\u771F\u65E0\u7968\uFF1B\u4E0B\u6E38\u8D70 typed \u952E\uFF1B\u8BA4\u4E0D\u51FA\u7528 status=escalate\uFF0C\u4E0D\u6D17\u6210\u65E0\u5F55\u3002\u673A\u68B0\u5C42\u4E0D\u91CD\u5224\u3002"
|
|
22553
22472
|
})
|
|
22554
22473
|
),
|
|
22555
|
-
reason: Type18.
|
|
22556
|
-
|
|
22557
|
-
|
|
22558
|
-
|
|
22559
|
-
|
|
22560
|
-
|
|
22561
|
-
|
|
22562
|
-
Type18.Array(
|
|
22563
|
-
Type18.Object(
|
|
22564
|
-
{
|
|
22565
|
-
ticketNumber: Type18.Unknown({ description: "\u672C\u6761\u8FB9\u754C\u6240\u5F52\u7968\u53F7\uFF08\u6B63\u6574\u6570\uFF09" }),
|
|
22566
|
-
sessions: diaristSessionsSchema
|
|
22567
|
-
},
|
|
22568
|
-
{ additionalProperties: true }
|
|
22569
|
-
),
|
|
22570
|
-
{ description: "\u591A\u7968\u5EAD\u9010\u7968\u5BF9\u8BDD\u8FB9\u754C\uFF1B\u4E00\u6B21\u4EA4\u5377\u5404\u7968\u5404\u81EA\u5206\u5F55\u3002\u4E0E\u5355\u7968 sessions \u4E8C\u9009\u4E00\u3002" }
|
|
22571
|
-
)
|
|
22572
|
-
)
|
|
22474
|
+
reason: Type18.Unknown({
|
|
22475
|
+
description: "status \u4E3A escalate \u65F6\uFF1A\u8BA4\u4E0D\u51FA\u672C\u5EAD\u5BF9\u8C61\u7684\u539F\u56E0"
|
|
22476
|
+
}),
|
|
22477
|
+
sessions: Type18.Optional(Type18.Unknown({ description: DIARIST_SESSIONS_DESCRIPTION })),
|
|
22478
|
+
ticketSessions: Type18.Unknown({
|
|
22479
|
+
description: `\u591A\u7968\u5EAD\u9010\u7968\u5BF9\u8BDD\u8FB9\u754C\uFF1B\u6BCF\u7968\u542B ticketNumber\uFF08\u672C\u6761\u8FB9\u754C\u6240\u5F52\u7968\u53F7\uFF0C\u6B63\u6574\u6570\uFF09\u4E0E sessions\uFF08${DIARIST_SESSIONS_DESCRIPTION}\uFF09\u3002\u4E00\u6B21\u4EA4\u5377\u5404\u7968\u5404\u81EA\u5206\u5F55\u3002\u4E0E\u5355\u7968 sessions \u4E8C\u9009\u4E00\u3002`
|
|
22480
|
+
})
|
|
22573
22481
|
})
|
|
22574
22482
|
)
|
|
22575
22483
|
);
|
|
@@ -22593,19 +22501,13 @@ var secretariatVerdictSchema = withTerminatingOutputDeclarations(
|
|
|
22593
22501
|
description: "converged | escalate"
|
|
22594
22502
|
}),
|
|
22595
22503
|
ticketNumber: Type19.Optional(
|
|
22596
|
-
Type19.
|
|
22504
|
+
Type19.Unknown({ description: "\u672C\u7968\u53F7\uFF1B\u7F72\u65F6\u6307\u5411\u6700\u7EC8\u6B63\u6587\u6240\u5728\u7968" })
|
|
22597
22505
|
),
|
|
22598
|
-
note: Type19.
|
|
22506
|
+
note: Type19.Unknown({ description: "\u9644\u6CE8" }),
|
|
22599
22507
|
evidence: Type19.Optional(Type19.Unknown({ description: "\u7559\u5B58\u8BC1\u636E" })),
|
|
22600
|
-
decisionGate: Type19.
|
|
22601
|
-
|
|
22602
|
-
|
|
22603
|
-
question: Type19.Optional(Type19.String()),
|
|
22604
|
-
options: Type19.Optional(Type19.Array(Type19.String()))
|
|
22605
|
-
},
|
|
22606
|
-
{ additionalProperties: true, description: "\u9700\u965B\u4E0B\u5904\u7F6E\u7684\u95EE\u9898\u4E0E\u9009\u9879" }
|
|
22607
|
-
)
|
|
22608
|
-
)
|
|
22508
|
+
decisionGate: Type19.Unknown({
|
|
22509
|
+
description: "\u9700\u965B\u4E0B\u5904\u7F6E\u7684\u95EE\u9898\u4E0E\u9009\u9879\uFF1B\u53EF\u5199 question \u4E0E options\uFF0C\u539F\u6837\u7559\u5B58\u3002"
|
|
22510
|
+
})
|
|
22609
22511
|
},
|
|
22610
22512
|
{ additionalProperties: true }
|
|
22611
22513
|
)
|
|
@@ -22666,31 +22568,17 @@ init_open_tool_schema();
|
|
|
22666
22568
|
init_terminating_infrastructure();
|
|
22667
22569
|
init_reviewer_output();
|
|
22668
22570
|
import { Type as Type20 } from "typebox";
|
|
22669
|
-
var
|
|
22670
|
-
completeness: Type20.Optional(Type20.String({
|
|
22671
|
-
description: "completeness lens \u5B8C\u6574\u62A5\u544A\uFF1Acandidates\u3001\u9010\u6761\u5904\u7F6E\u4E0E verdict\uFF1B\u975E\u4EC5 verdict \u4E00\u884C\u3002hard-stop\uFF0Fusage error \u4E3A refused \u65F6\uFF0C\u82E5\u5DF2\u4EA7\u51FA\u62A5\u544A\u4ECD\u7167\u5F55\u4E8E\u6B64"
|
|
22672
|
-
})),
|
|
22673
|
-
correctness: Type20.Optional(Type20.String({
|
|
22674
|
-
description: "correctness lens \u5B8C\u6574\u62A5\u544A\uFF1Acandidates\u3001\u9010\u6761\u5904\u7F6E\u4E0E verdict\uFF1B\u975E\u4EC5 verdict \u4E00\u884C\u3002hard-stop\uFF0Fusage error \u4E3A refused \u65F6\uFF0C\u82E5\u5DF2\u4EA7\u51FA\u62A5\u544A\u4ECD\u7167\u5F55\u4E8E\u6B64"
|
|
22675
|
-
}))
|
|
22676
|
-
}, {
|
|
22677
|
-
additionalProperties: true,
|
|
22678
|
-
description: "\u5DF2\u8FD0\u884C lens \u7684 amendments \u627F\u8F7D candidates\u3001\u9010\u6761\u5904\u7F6E\u4E0E verdict \u7684\u5B8C\u6574\u62A5\u544A\uFF08\u975E\u4EC5 verdict \u884C\uFF09\uFF1B\u663E\u5F0F\u5355\u8F74\u65F6\u53E6\u4E00\u8F74\u53EF\u7701\u7565\u3002hard-stop\uFF0Fusage error \u4E3A refused \u65F6\uFF0C\u5DF2\u4EA7\u51FA\u62A5\u544A\u4ECD\u7167\u5F55\u5BF9\u5E94 lens \u5B57\u6BB5\u3002"
|
|
22679
|
-
});
|
|
22571
|
+
var REVIEWER_AMENDMENTS_DESCRIPTION = "\u5DF2\u8FD0\u884C lens \u7684 amendments \u627F\u8F7D candidates\u3001\u9010\u6761\u5904\u7F6E\u4E0E verdict \u7684\u5B8C\u6574\u62A5\u544A\uFF08\u975E\u4EC5 verdict \u884C\uFF09\uFF1B\u663E\u5F0F\u5355\u8F74\u65F6\u53E6\u4E00\u8F74\u53EF\u7701\u7565\uFF08completeness / correctness\uFF09\u3002hard-stop\uFF0Fusage error \u4E3A refused \u65F6\uFF0C\u5DF2\u4EA7\u51FA\u62A5\u544A\u4ECD\u7167\u5F55\u5BF9\u5E94 lens \u5B57\u6BB5\u3002";
|
|
22680
22572
|
var REVIEWER_STATUS_DESCRIPTION = "completed | refused\u3002\u4E24\u79CD\u6B63\u5E38 lens verdict\uFF08completeness / correctness\uFF09\u5747 completed\uFF1Bhard-stop \u4E0E usage error \u4E3A refused\uFF08\u5DF2\u4EA7\u51FA\u62A5\u544A\u4ECD\u7167\u5F55\u8FDB\u6240\u9009 lens amendments\uFF09\u3002";
|
|
22681
|
-
var
|
|
22682
|
-
Type20.
|
|
22683
|
-
|
|
22684
|
-
|
|
22685
|
-
|
|
22686
|
-
|
|
22687
|
-
|
|
22688
|
-
diagnostic: Type20.String({ description: "\u62D2\u7EDD\u8BCA\u65AD\u8BF4\u660E\uFF1Bhard-stop\uFF0Fusage error \u539F\u56E0\u8FDB\u6B64\u5B57\u6BB5\uFF0C\u5DF2\u4EA7\u51FA\u62A5\u544A\u53E6\u7167\u5F55 amendments" }),
|
|
22689
|
-
amendments: Type20.Optional(reviewerAmendmentsSchema)
|
|
22690
|
-
}, { additionalProperties: false })
|
|
22691
|
-
]);
|
|
22573
|
+
var reviewerOutputObject = Type20.Object({
|
|
22574
|
+
status: Type20.Unknown({ description: REVIEWER_STATUS_DESCRIPTION }),
|
|
22575
|
+
amendments: Type20.Unknown({ description: REVIEWER_AMENDMENTS_DESCRIPTION }),
|
|
22576
|
+
diagnostic: Type20.Unknown({
|
|
22577
|
+
description: "\u62D2\u7EDD\u8BCA\u65AD\u8BF4\u660E\uFF1Bhard-stop\uFF0Fusage error \u539F\u56E0\u8FDB\u6B64\u5B57\u6BB5\uFF0C\u5DF2\u4EA7\u51FA\u62A5\u544A\u53E6\u7167\u5F55 amendments"
|
|
22578
|
+
})
|
|
22579
|
+
});
|
|
22692
22580
|
var reviewerOutputSchema = withTerminatingOutputDeclarations(
|
|
22693
|
-
|
|
22581
|
+
openToolObject(reviewerOutputObject)
|
|
22694
22582
|
);
|
|
22695
22583
|
function createReviewerRoleRuntime(pi, dependencies, _hostActions) {
|
|
22696
22584
|
let soul;
|
|
@@ -22844,10 +22732,19 @@ function uninstallPackageWorkerHooks(cwd) {
|
|
|
22844
22732
|
function isRecord15(value) {
|
|
22845
22733
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22846
22734
|
}
|
|
22735
|
+
function containsWrittenReason(value) {
|
|
22736
|
+
if (typeof value === "string") return value.trim().length > 0;
|
|
22737
|
+
if (Array.isArray(value)) return value.some(containsWrittenReason);
|
|
22738
|
+
if (typeof value === "object" && value !== null) {
|
|
22739
|
+
return Object.entries(value).some(
|
|
22740
|
+
([key, item]) => containsWrittenReason(key) || containsWrittenReason(item)
|
|
22741
|
+
);
|
|
22742
|
+
}
|
|
22743
|
+
return false;
|
|
22744
|
+
}
|
|
22847
22745
|
function unfinishedReasonPresent(details) {
|
|
22848
|
-
if (typeof details !== "object" || details === null) return false;
|
|
22849
|
-
|
|
22850
|
-
return typeof reason === "string" && reason.trim().length > 0;
|
|
22746
|
+
if (typeof details !== "object" || details === null || Array.isArray(details)) return false;
|
|
22747
|
+
return containsWrittenReason(details.reason);
|
|
22851
22748
|
}
|
|
22852
22749
|
function readGateState(session) {
|
|
22853
22750
|
let baseline;
|
|
@@ -23001,27 +22898,16 @@ function fixerBashSeatbeltDenyReason(matched) {
|
|
|
23001
22898
|
|
|
23002
22899
|
// src/worker-role.ts
|
|
23003
22900
|
var CODER_STATUS_DESCRIPTION = `planned | completed | refused | partially_completed | unfinished\u3002unfinished\uFF1A\u7F3A\u524D\u7F6E\u6216\u8FDD\u5BAA\u7EA6\u675F\u81F4\u672C\u5C40\u672A\u5B8C\u6210\u3002${PARTIALLY_COMPLETED_DEFINITION}`;
|
|
23004
|
-
var
|
|
23005
|
-
Type21.
|
|
23006
|
-
|
|
23007
|
-
|
|
23008
|
-
|
|
23009
|
-
|
|
23010
|
-
|
|
23011
|
-
|
|
23012
|
-
}, { additionalProperties: false }),
|
|
23013
|
-
Type21.Object({
|
|
23014
|
-
status: Type21.Unknown({ description: CODER_STATUS_DESCRIPTION }),
|
|
23015
|
-
report: Type21.String({ description: "\u5982\u5B9E\u7ED3\u679C\u62A5\u544A" }),
|
|
23016
|
-
remainingScope: Type21.String({ description: "\u672C\u5C40\u540E\u5269\u4F59\u5DE5\u4F5C" }),
|
|
23017
|
-
reason: Type21.Optional(Type21.String({
|
|
23018
|
-
minLength: 1,
|
|
23019
|
-
description: "\u963B\u65AD\u539F\u56E0\uFF1A\u7F3A\u524D\u7F6E\u6216\u8FDD\u5BAA\u7EA6\u675F\u3002\u7F3A\u5F85\u51B3 owner \u51B3\u5B9A\u6216\u7B54\u590D\u5C5E\u7F3A\u524D\u7F6E\u3002"
|
|
23020
|
-
}))
|
|
23021
|
-
}, { additionalProperties: false })
|
|
23022
|
-
]);
|
|
22901
|
+
var coderOutputObject = Type21.Object({
|
|
22902
|
+
status: Type21.Unknown({ description: CODER_STATUS_DESCRIPTION }),
|
|
22903
|
+
report: Type21.Unknown({ description: "\u5982\u5B9E\u7ED3\u679C\u62A5\u544A" }),
|
|
22904
|
+
remainingScope: Type21.Unknown({ description: "\u672C\u5C40\u540E\u5269\u4F59\u5DE5\u4F5C" }),
|
|
22905
|
+
reason: Type21.Unknown({
|
|
22906
|
+
description: "\u963B\u65AD\u539F\u56E0\uFF1A\u7F3A\u524D\u7F6E\u6216\u8FDD\u5BAA\u7EA6\u675F\u3002\u7F3A\u5F85\u51B3 owner \u51B3\u5B9A\u6216\u7B54\u590D\u5C5E\u7F3A\u524D\u7F6E\u3002"
|
|
22907
|
+
})
|
|
22908
|
+
});
|
|
23023
22909
|
var coderOutputSchema = withTerminatingOutputDeclarations(
|
|
23024
|
-
|
|
22910
|
+
openToolObject(coderOutputObject)
|
|
23025
22911
|
);
|
|
23026
22912
|
var FIXER_FLAG_DEFINITIONS = {
|
|
23027
22913
|
packet: {
|
package/dist/merger-contracts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from "typebox";
|
|
2
2
|
import { exactUtf8 } from "./exact-utf8.js";
|
|
3
|
-
import {
|
|
3
|
+
import { openToolObject } from "./open-tool-schema.js";
|
|
4
4
|
import { withTerminatingOutputDeclarations } from "./package-contracts/terminating-infrastructure.js";
|
|
5
5
|
const materialSchema = Type.Object({ bytesBase64: Type.String(), sha256: Type.String() }, { additionalProperties: false });
|
|
6
6
|
const checkSchema = Type.Object({ name: Type.String({ minLength: 1 }), argv: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }) }, { additionalProperties: false });
|
|
@@ -14,11 +14,16 @@ const mergerInputSchema = Type.Object({
|
|
|
14
14
|
authorizedChecks: Type.Array(checkSchema)
|
|
15
15
|
}, { additionalProperties: false });
|
|
16
16
|
const MERGER_STATUS_DESCRIPTION = "completed | escalate";
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
const mergerOutputObject = Type.Object({
|
|
18
|
+
status: Type.Unknown({ description: MERGER_STATUS_DESCRIPTION }),
|
|
19
|
+
attemptId: Type.Unknown({ description: "\u5DF2\u53D7\u7406\u5408\u5E76 attempt \u8EAB\u4EFD" }),
|
|
20
|
+
report: Type.Unknown({ description: "\u5982\u5B9E\u7ED3\u679C\u62A5\u544A" }),
|
|
21
|
+
mergeCommitId: Type.Unknown({ description: "\u5B8C\u6210\u5408\u5E76 commit object ID" }),
|
|
22
|
+
diagnosis: Type.Unknown({
|
|
23
|
+
description: "\u5408\u5E76\u65E0\u6CD5\u6216\u4E0D\u5E94\u7531\u672C\u5E2D\u5B8C\u6210\u7684\u539F\u56E0\uFF08\u542B\u65E0\u8FDB\u884C\u4E2D\u5408\u5E76\u3001\u65E0\u6D3B\u53EF\u5E72\u3001\u9700\u65B0\u7684\u4EA7\u54C1/\u6743\u529B\u51B3\u5B9A\uFF09"
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
const mergerOutputSchema = withTerminatingOutputDeclarations(openToolObject(mergerOutputObject));
|
|
22
27
|
const MERGER_OUTPUT_TOOL_NAME = "ak_merger_output";
|
|
23
28
|
const record = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
24
29
|
const blank = (v) => typeof v !== "string" || v.trim().length === 0;
|