@dudousxd/nestjs-agent-core 0.44.0 → 0.44.1
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/index.cjs +15 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -4194,6 +4194,10 @@ declare function claimActionProposalOutcome(row: ActionProposal, command: {
|
|
|
4194
4194
|
}, now: number, token: string): ActionProposal | null;
|
|
4195
4195
|
declare function actionProposalOutcomeFenceValid(row: ActionProposal, command: ActionProposalOutcomeLease, now: number): boolean;
|
|
4196
4196
|
declare function actionProposalOutcomeScope(outcome: ActionProposalOutcome): ActionProposalScope;
|
|
4197
|
+
/**
|
|
4198
|
+
* The outcome message admitted to the thread. The tool's own presentation text (`present` /
|
|
4199
|
+
* `emitUi`), when it has one, leads — what a person reads in the history; the summary follows.
|
|
4200
|
+
*/
|
|
4197
4201
|
declare function actionProposalOutcomeText(outcome: ActionProposalOutcome): string;
|
|
4198
4202
|
|
|
4199
4203
|
interface TextActionProposalCandidate {
|
package/dist/index.d.ts
CHANGED
|
@@ -4194,6 +4194,10 @@ declare function claimActionProposalOutcome(row: ActionProposal, command: {
|
|
|
4194
4194
|
}, now: number, token: string): ActionProposal | null;
|
|
4195
4195
|
declare function actionProposalOutcomeFenceValid(row: ActionProposal, command: ActionProposalOutcomeLease, now: number): boolean;
|
|
4196
4196
|
declare function actionProposalOutcomeScope(outcome: ActionProposalOutcome): ActionProposalScope;
|
|
4197
|
+
/**
|
|
4198
|
+
* The outcome message admitted to the thread. The tool's own presentation text (`present` /
|
|
4199
|
+
* `emitUi`), when it has one, leads — what a person reads in the history; the summary follows.
|
|
4200
|
+
*/
|
|
4197
4201
|
declare function actionProposalOutcomeText(outcome: ActionProposalOutcome): string;
|
|
4198
4202
|
|
|
4199
4203
|
interface TextActionProposalCandidate {
|
package/dist/index.js
CHANGED
|
@@ -2715,9 +2715,10 @@ function actionProposalOutcomeFenceValid(row2, command, now) {
|
|
|
2715
2715
|
}
|
|
2716
2716
|
__name(actionProposalOutcomeFenceValid, "actionProposalOutcomeFenceValid");
|
|
2717
2717
|
function outcomeSummary(outcome) {
|
|
2718
|
-
|
|
2719
|
-
if (outcome.executionStatus === "
|
|
2720
|
-
|
|
2718
|
+
const tool = JSON.stringify(outcome.toolName);
|
|
2719
|
+
if (outcome.executionStatus === "succeeded") return `Action ${tool} completed.${Object.hasOwn(outcome, "result") ? ` Result: ${JSON.stringify(outcome.result)}` : ""}`;
|
|
2720
|
+
if (outcome.executionStatus === "failed") return `Action ${tool} failed: ${JSON.stringify(outcome.error ?? "Execution failed")}`;
|
|
2721
|
+
return `Action ${tool} was ${outcome.decision} and was not executed.${outcome.error ? ` Reason: ${JSON.stringify(outcome.error)}` : ""}`;
|
|
2721
2722
|
}
|
|
2722
2723
|
__name(outcomeSummary, "outcomeSummary");
|
|
2723
2724
|
function actionProposalOutcomeScope(outcome) {
|
|
@@ -2728,8 +2729,15 @@ function actionProposalOutcomeScope(outcome) {
|
|
|
2728
2729
|
};
|
|
2729
2730
|
}
|
|
2730
2731
|
__name(actionProposalOutcomeScope, "actionProposalOutcomeScope");
|
|
2732
|
+
function storableText(text) {
|
|
2733
|
+
return text.replaceAll(String.fromCharCode(0), "\\u0000").replace(/[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g, (char) => `\\u${char.charCodeAt(0).toString(16)}`);
|
|
2734
|
+
}
|
|
2735
|
+
__name(storableText, "storableText");
|
|
2731
2736
|
function actionProposalOutcomeText(outcome) {
|
|
2732
|
-
|
|
2737
|
+
const text = outcome.text === void 0 ? void 0 : storableText(outcome.text).trim();
|
|
2738
|
+
return text ? `${text}
|
|
2739
|
+
|
|
2740
|
+
${outcomeSummary(outcome)}` : outcomeSummary(outcome);
|
|
2733
2741
|
}
|
|
2734
2742
|
__name(actionProposalOutcomeText, "actionProposalOutcomeText");
|
|
2735
2743
|
|
|
@@ -9159,9 +9167,9 @@ var ptBrActionProposalText = {
|
|
|
9159
9167
|
]
|
|
9160
9168
|
},
|
|
9161
9169
|
replies: {
|
|
9162
|
-
approved: "
|
|
9163
|
-
rejected: "
|
|
9164
|
-
expired: "
|
|
9170
|
+
approved: "Confirmado! J\xE1 estou cuidando disso.",
|
|
9171
|
+
rejected: "Tudo bem, cancelado. Nada foi feito.",
|
|
9172
|
+
expired: "Esse pedido expirou; nada foi feito.",
|
|
9165
9173
|
unchanged: "N\xE3o foi poss\xEDvel alterar esta proposta; atualize a lista para consultar seu estado.",
|
|
9166
9174
|
ambiguous: /* @__PURE__ */ __name((ids) => `Qual proposta? Responda confirmar #ID ou cancelar #ID: ${ids.join(", ")}`, "ambiguous"),
|
|
9167
9175
|
tooMany: "H\xE1 v\xE1rias propostas. Confirme ou rejeite usando #ID expl\xEDcito."
|