@itpay/cli 2.1.57 → 2.1.58
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/src/main.js +10 -4
- package/dist/src/state/config.js +1 -1
- package/package.json +2 -2
package/dist/src/main.js
CHANGED
|
@@ -17599,6 +17599,12 @@ function railActionError(error, serviceExecutionID, actionType) {
|
|
|
17599
17599
|
__name(railActionError, "railActionError");
|
|
17600
17600
|
var railInputRecoveryInstruction = "Agent\u6309\u5F53\u524D\u6A21\u677F\u81EA\u884C\u4FEE\u6B63\u9519\u8BEF\u5B57\u6BB5\u548CJSON\u5C42\u7EA7\uFF0C\u4FDD\u7559\u5DF2\u6709\u6458\u8981\u7684\u7AEF\u70B9\u542B\u4E49\u53CA\u539F\u5730\u70B9/\u65E5\u671F/\u4EBA\u6570\uFF0C\u4E0D\u91CD\u590D\u7814\u7A76\u6216\u4E8B\u540E\u8865\u5199\u5192\u5145\u67E5\u8BE2\u524D\u6458\u8981\uFF1B\u4E0D\u8981\u5411\u7528\u6237\u8BE2\u95EE\u6280\u672F\u5B57\u6BB5\u3002\u53EA\u6709\u771F\u5B9E\u4E1A\u52A1\u6B67\u4E49\u624D\u95EE\u4EBA\uFF1B\u4F7F\u7528\u8FD4\u56DE\u7684\u6267\u884C\u8EAB\u4EFD\u6062\u590D\uFF0C\u672A\u521B\u5EFA\u65F6\u7528\u539F\u670D\u52A1\u3002";
|
|
17601
17601
|
|
|
17602
|
+
// src/services/shared/workflow-actor.ts
|
|
17603
|
+
function workflowSubmissionActor(action) {
|
|
17604
|
+
return action.submission_actor === "agent" ? "agent" : "human";
|
|
17605
|
+
}
|
|
17606
|
+
__name(workflowSubmissionActor, "workflowSubmissionActor");
|
|
17607
|
+
|
|
17602
17608
|
// src/services/rail/review.ts
|
|
17603
17609
|
function railWorkflowEnvelope(model) {
|
|
17604
17610
|
const execution = model.execution;
|
|
@@ -17744,7 +17750,7 @@ function railWorkflowEnvelope(model) {
|
|
|
17744
17750
|
...sides.some((side) => side.status !== "resolved" && !side.candidates?.length) ? {} : { interaction: {
|
|
17745
17751
|
schema_version: "itpay.interaction.v1",
|
|
17746
17752
|
stage: "location_confirmation_required",
|
|
17747
|
-
input_template: fileInputTemplate(`itpay services action ${id} --action ${action.action_type} --actor-type
|
|
17753
|
+
input_template: fileInputTemplate(`itpay services action ${id} --action ${action.action_type} --actor-type ${workflowSubmissionActor(action)} --status approved --input-json <\u5730\u70B9\u786E\u8BA4.json> --json`, { ...railInputTemplate(action.input_schema), ...requiredFields.includes("choices") ? { choices: Object.fromEntries(sides.filter((side) => side.candidates?.length).map((side) => [side.side, "<\u6240\u9009\u5019\u9009id>"])) } : {} }, requiredFields, { executionID: id, userAnswerRequired: true })
|
|
17748
17754
|
} },
|
|
17749
17755
|
recovery: []
|
|
17750
17756
|
};
|
|
@@ -17794,7 +17800,7 @@ function railWorkflowEnvelope(model) {
|
|
|
17794
17800
|
interaction: {
|
|
17795
17801
|
schema_version: "itpay.interaction.v1",
|
|
17796
17802
|
stage: "confirmation_required",
|
|
17797
|
-
input_template: fileInputTemplate(`itpay services action ${id} --action ${action.action_type} --actor-type
|
|
17803
|
+
input_template: fileInputTemplate(`itpay services action ${id} --action ${action.action_type} --actor-type ${workflowSubmissionActor(action)} --status approved --input-json <file> --json`, railInputTemplate(action.input_schema), requiredFields, { executionID: id, userAnswerRequired: true })
|
|
17798
17804
|
},
|
|
17799
17805
|
recovery: []
|
|
17800
17806
|
};
|
|
@@ -17837,7 +17843,7 @@ function railWorkflowEnvelope(model) {
|
|
|
17837
17843
|
stage: inputTemplate ? "input_required" : "payment",
|
|
17838
17844
|
...inputTemplate ? { input_template: inputTemplate } : {},
|
|
17839
17845
|
...state === "payment" && model.workflow?.human_action?.context?.review ? {
|
|
17840
|
-
revise_template: fileInputTemplate(`itpay services action ${id} --action ${model.workflow.human_action.action_type} --actor-type
|
|
17846
|
+
revise_template: fileInputTemplate(`itpay services action ${id} --action ${model.workflow.human_action.action_type} --actor-type ${workflowSubmissionActor(model.workflow.human_action)} --status approved --input-json <file> --json`, railInputTemplate(model.workflow.human_action.input_schema), requiredInputFields(model.workflow.human_action.input_schema), { executionID: id, userAnswerRequired: true })
|
|
17841
17847
|
} : {}
|
|
17842
17848
|
}
|
|
17843
17849
|
} : {},
|
|
@@ -19090,7 +19096,7 @@ function workflowEnvelope(model) {
|
|
|
19090
19096
|
instruction: "\u5C55\u793A\u672C\u6B21\u64CD\u4F5C\u7684\u5F85\u786E\u8BA4\u5185\u5BB9\uFF1B\u5DF2\u6709\u660E\u786E\u540C\u610F\u4E14\u76EE\u6807\u4E0E\u7248\u672C\u672A\u53D8\u65F6\u6CBF\u7528\uFF0C\u53EA\u8865\u7F3A\u5931\u7684\u771F\u5B9E\u540C\u610F\u3002\u6309\u5B8C\u6574\u6A21\u677F\u63D0\u4EA4\u540C\u4E00\u6267\u884C\uFF1B\u9009\u62E9\u5BF9\u8C61\u4E0D\u7B49\u4E8E\u8D2D\u4E70\u6279\u51C6\u3002",
|
|
19091
19097
|
next: null,
|
|
19092
19098
|
recovery: [],
|
|
19093
|
-
interaction: { schema_version: "itpay.interaction.v1", stage: "confirmation_required", input_template: fileInputTemplate(`itpay services action ${id} --action ${action.action_type} --actor-type
|
|
19099
|
+
interaction: { schema_version: "itpay.interaction.v1", stage: "confirmation_required", input_template: fileInputTemplate(`itpay services action ${id} --action ${action.action_type} --actor-type ${workflowSubmissionActor(action)} --status approved --input-json <file> --json`, serviceInputTemplate(action.input_schema), requiredInputFields(action.input_schema), { executionID: id, userAnswerRequired: true }) }
|
|
19094
19100
|
};
|
|
19095
19101
|
const inputRequired = state === "input_required";
|
|
19096
19102
|
const failed = ["failed", "recovery_required", "cancelled"].includes(state);
|
package/dist/src/state/config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itpay/cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.58",
|
|
4
4
|
"description": "The ItPay CLI for services, orders, and human-authorized purchased content.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -148,5 +148,5 @@
|
|
|
148
148
|
"services",
|
|
149
149
|
"api"
|
|
150
150
|
],
|
|
151
|
-
"gitHead": "
|
|
151
|
+
"gitHead": "d58a8dd40dffb30430dd3af4246dd04194388336"
|
|
152
152
|
}
|