mastracode 0.22.0 → 0.22.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/CHANGELOG.md +18 -0
- package/dist/HarnessCompat.d.ts +2 -21
- package/dist/HarnessCompat.d.ts.map +1 -1
- package/dist/{chunk-B4IKAUT7.cjs → chunk-AG4CK4AA.cjs} +27 -4
- package/dist/chunk-AG4CK4AA.cjs.map +1 -0
- package/dist/{chunk-DFC5V3P7.cjs → chunk-G2TNUR63.cjs} +30 -93
- package/dist/chunk-G2TNUR63.cjs.map +1 -0
- package/dist/{chunk-BFO3NTQO.js → chunk-G6T5S552.js} +27 -4
- package/dist/chunk-G6T5S552.js.map +1 -0
- package/dist/{chunk-Y5AUV6T3.js → chunk-G76EJQC6.js} +30 -93
- package/dist/chunk-G76EJQC6.js.map +1 -0
- package/dist/cli.cjs +8 -8
- package/dist/cli.js +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/schema.d.ts +4 -7
- package/dist/schema.d.ts.map +1 -1
- package/dist/tui/commands/github.d.ts +14 -0
- package/dist/tui/commands/github.d.ts.map +1 -1
- package/dist/tui/handlers/agent-lifecycle.d.ts.map +1 -1
- package/dist/tui.cjs +11 -11
- package/dist/tui.js +1 -1
- package/package.json +6 -6
- package/dist/chunk-B4IKAUT7.cjs.map +0 -1
- package/dist/chunk-BFO3NTQO.js.map +0 -1
- package/dist/chunk-DFC5V3P7.cjs.map +0 -1
- package/dist/chunk-Y5AUV6T3.js.map +0 -1
|
@@ -1173,7 +1173,7 @@ function getInstallCommand(pm, version) {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
function getCurrentVersion() {
|
|
1175
1175
|
{
|
|
1176
|
-
return "0.22.
|
|
1176
|
+
return "0.22.1";
|
|
1177
1177
|
}
|
|
1178
1178
|
}
|
|
1179
1179
|
async function fetchLatestVersion() {
|
|
@@ -14641,7 +14641,7 @@ function parseGithubPRReference(input) {
|
|
|
14641
14641
|
return void 0;
|
|
14642
14642
|
}
|
|
14643
14643
|
async function getCurrentGithubThread(ctx) {
|
|
14644
|
-
const harness = ctx.harness;
|
|
14644
|
+
const harness = ctx.state.harness;
|
|
14645
14645
|
const threadId = harness.getCurrentThreadId?.();
|
|
14646
14646
|
if (!threadId) return {};
|
|
14647
14647
|
const thread = (await harness.listThreads?.({ allResources: true }))?.find((item) => item.id === threadId);
|
|
@@ -14725,6 +14725,21 @@ async function detectCurrentPullRequest(ctx) {
|
|
|
14725
14725
|
);
|
|
14726
14726
|
});
|
|
14727
14727
|
}
|
|
14728
|
+
async function tryAutoSubscribeToBranchPR(ctx) {
|
|
14729
|
+
if (!loadSettings().signals.experimentalGithubSignals) return;
|
|
14730
|
+
const githubSignalsProcessor = ctx.state.options?.githubSignals;
|
|
14731
|
+
if (!githubSignalsProcessor?.subscribeThreadToPR) return;
|
|
14732
|
+
const { threadId, resourceId } = await getCurrentGithubThread(ctx);
|
|
14733
|
+
if (!threadId || !resourceId) return;
|
|
14734
|
+
const currentPR = await detectCurrentPullRequest(ctx);
|
|
14735
|
+
const pr = currentPR ? parseGithubPRReference(currentPR) : void 0;
|
|
14736
|
+
if (!pr) return;
|
|
14737
|
+
try {
|
|
14738
|
+
const result = await githubSignalsProcessor.subscribeThreadToPR({ threadId, resourceId, pr });
|
|
14739
|
+
ctx.showInfo(`Auto-subscribed to ${result.owner}/${result.repo}#${result.number} via GitHub Signals.`);
|
|
14740
|
+
} catch {
|
|
14741
|
+
}
|
|
14742
|
+
}
|
|
14728
14743
|
async function handleGithubCommand(ctx, args = []) {
|
|
14729
14744
|
if (!loadSettings().signals.experimentalGithubSignals) {
|
|
14730
14745
|
ctx.showError("Experimental GitHub signals are disabled. Enable them in /settings and restart MastraCode.");
|
|
@@ -15087,6 +15102,7 @@ function pruneChatContainer(state) {
|
|
|
15087
15102
|
}
|
|
15088
15103
|
|
|
15089
15104
|
// src/tui/handlers/agent-lifecycle.ts
|
|
15105
|
+
var autoSubscribeCheckedThreads = /* @__PURE__ */ new Set();
|
|
15090
15106
|
function handleAgentStart(ctx) {
|
|
15091
15107
|
const { state } = ctx;
|
|
15092
15108
|
state.goalManager.startActiveTimer();
|
|
@@ -15114,6 +15130,13 @@ function handleAgentEnd(ctx) {
|
|
|
15114
15130
|
ctx.updateStatusLine();
|
|
15115
15131
|
}
|
|
15116
15132
|
});
|
|
15133
|
+
const harness = state.harness;
|
|
15134
|
+
const threadId = harness.getCurrentThreadId?.();
|
|
15135
|
+
if (threadId && !autoSubscribeCheckedThreads.has(threadId)) {
|
|
15136
|
+
autoSubscribeCheckedThreads.add(threadId);
|
|
15137
|
+
tryAutoSubscribeToBranchPR(ctx).catch(() => {
|
|
15138
|
+
});
|
|
15139
|
+
}
|
|
15117
15140
|
if (state.streamingComponent) {
|
|
15118
15141
|
state.streamingComponent = void 0;
|
|
15119
15142
|
state.streamingMessage = void 0;
|
|
@@ -19343,5 +19366,5 @@ Would you like to update now?`;
|
|
|
19343
19366
|
};
|
|
19344
19367
|
|
|
19345
19368
|
export { AssistantMessageComponent, LoginDialogComponent, LoginSelectorComponent, MastraTUI, ModelSelectorComponent, OMProgressComponent, ToolExecutionComponentEnhanced, UserMessageComponent, createTUIState, detectTerminalTheme, formatOMStatus, getCurrentVersion };
|
|
19346
|
-
//# sourceMappingURL=chunk-
|
|
19347
|
-
//# sourceMappingURL=chunk-
|
|
19369
|
+
//# sourceMappingURL=chunk-G6T5S552.js.map
|
|
19370
|
+
//# sourceMappingURL=chunk-G6T5S552.js.map
|