integrate-sdk 0.8.68-dev.0 → 0.8.70-dev.0
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/adapters/auto-routes.js +47 -5
- package/dist/adapters/base-handler.d.ts.map +1 -1
- package/dist/adapters/index.js +47 -5
- package/dist/adapters/nextjs.js +47 -5
- package/dist/adapters/node.js +47 -5
- package/dist/adapters/svelte-kit.js +47 -5
- package/dist/adapters/tanstack-start.js +47 -5
- package/dist/index.js +47 -5
- package/dist/oauth.js +47 -5
- package/dist/server.js +47 -5
- package/dist/src/adapters/base-handler.d.ts.map +1 -1
- package/dist/src/integrations/github-client.d.ts +455 -0
- package/dist/src/integrations/github-client.d.ts.map +1 -1
- package/dist/src/integrations/github.d.ts +1 -1
- package/dist/src/integrations/github.d.ts.map +1 -1
- package/dist/src/triggers/executor.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2671,7 +2671,36 @@ var init_github = __esm(() => {
|
|
|
2671
2671
|
"github_create_branch",
|
|
2672
2672
|
"github_get_user",
|
|
2673
2673
|
"github_list_commits",
|
|
2674
|
-
"github_get_commit"
|
|
2674
|
+
"github_get_commit",
|
|
2675
|
+
"github_list_issue_comments",
|
|
2676
|
+
"github_add_issue_comment",
|
|
2677
|
+
"github_update_issue_comment",
|
|
2678
|
+
"github_delete_issue_comment",
|
|
2679
|
+
"github_list_pr_files",
|
|
2680
|
+
"github_list_pr_commits",
|
|
2681
|
+
"github_list_pr_reviews",
|
|
2682
|
+
"github_create_pr_review",
|
|
2683
|
+
"github_list_pr_review_comments",
|
|
2684
|
+
"github_get_file_contents",
|
|
2685
|
+
"github_create_or_update_file",
|
|
2686
|
+
"github_delete_file",
|
|
2687
|
+
"github_list_releases",
|
|
2688
|
+
"github_get_release",
|
|
2689
|
+
"github_get_latest_release",
|
|
2690
|
+
"github_create_release",
|
|
2691
|
+
"github_list_labels",
|
|
2692
|
+
"github_create_label",
|
|
2693
|
+
"github_add_issue_labels",
|
|
2694
|
+
"github_list_collaborators",
|
|
2695
|
+
"github_fork_repo",
|
|
2696
|
+
"github_search_repos",
|
|
2697
|
+
"github_search_issues",
|
|
2698
|
+
"github_search_code",
|
|
2699
|
+
"github_list_workflows",
|
|
2700
|
+
"github_list_workflow_runs",
|
|
2701
|
+
"github_trigger_workflow",
|
|
2702
|
+
"github_list_milestones",
|
|
2703
|
+
"github_create_milestone"
|
|
2675
2704
|
];
|
|
2676
2705
|
});
|
|
2677
2706
|
|
|
@@ -10102,6 +10131,16 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10102
10131
|
stepError = err.message || "Tool execution failed";
|
|
10103
10132
|
logger30.error(`[Trigger ${trigger.id}] Step ${stepIndex} failed:`, err);
|
|
10104
10133
|
}
|
|
10134
|
+
if (stepSuccess && toolResult) {
|
|
10135
|
+
if (toolResult.isError === true) {
|
|
10136
|
+
stepSuccess = false;
|
|
10137
|
+
const errText = toolResult.content?.find((c) => c.type === "text")?.text;
|
|
10138
|
+
stepError = errText || "Tool returned an error response";
|
|
10139
|
+
} else if (toolResult.structuredContent?.success === false) {
|
|
10140
|
+
stepSuccess = false;
|
|
10141
|
+
stepError = toolResult.structuredContent?.error || "Tool returned success: false";
|
|
10142
|
+
}
|
|
10143
|
+
}
|
|
10105
10144
|
const duration = Date.now() - startTime;
|
|
10106
10145
|
const executedAt = new Date().toISOString();
|
|
10107
10146
|
steps.push({
|
|
@@ -10129,7 +10168,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10129
10168
|
updates.status = "failed";
|
|
10130
10169
|
}
|
|
10131
10170
|
await config.triggers.update(trigger.id, updates, context);
|
|
10132
|
-
return { success:
|
|
10171
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10133
10172
|
}
|
|
10134
10173
|
const completeRequest = {
|
|
10135
10174
|
success: stepSuccess,
|
|
@@ -10180,7 +10219,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10180
10219
|
};
|
|
10181
10220
|
deliverWebhooks(completeResponse.webhooks, payload, WEBHOOK_DELIVERY_TIMEOUT_MS).catch(() => {});
|
|
10182
10221
|
}
|
|
10183
|
-
return { success:
|
|
10222
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10184
10223
|
}
|
|
10185
10224
|
const limitError = `Trigger execution exceeded maximum of ${MAX_TRIGGER_STEPS} steps`;
|
|
10186
10225
|
logger30.error(`[Trigger ${trigger.id}] ${limitError}`);
|
|
@@ -11636,8 +11675,11 @@ class OAuthHandler {
|
|
|
11636
11675
|
const headers = this.getHeaders({
|
|
11637
11676
|
"Content-Type": "application/json"
|
|
11638
11677
|
});
|
|
11639
|
-
if (authHeader
|
|
11640
|
-
|
|
11678
|
+
if (authHeader) {
|
|
11679
|
+
const normalized = authHeader.replace(/^bearer\s+/i, "Bearer ");
|
|
11680
|
+
if (normalized.startsWith("Bearer ")) {
|
|
11681
|
+
headers["Authorization"] = normalized;
|
|
11682
|
+
}
|
|
11641
11683
|
}
|
|
11642
11684
|
if (integrationsHeader) {
|
|
11643
11685
|
headers["X-Integrations"] = integrationsHeader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-handler.d.ts","sourceRoot":"","sources":["../../../src/adapters/base-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAc3D;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE;QACxB,iDAAiD;QACjD,QAAQ,EAAE,MAAM,CAAC;QACjB,qDAAqD;QACrD,YAAY,EAAE,MAAM,CAAC;QACrB,qCAAqC;QACrC,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,8CAA8C;QAC9C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,kFAAkF;QACl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CAAC,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA4D1H;;;;;;;;;;;;;;OAcG;IACG,cAAc,CAClB,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,GACjC,OAAO,CAAC,gBAAgB,CAAC;CA0D7B"}
|
package/dist/adapters/index.js
CHANGED
|
@@ -2671,7 +2671,36 @@ var init_github = __esm(() => {
|
|
|
2671
2671
|
"github_create_branch",
|
|
2672
2672
|
"github_get_user",
|
|
2673
2673
|
"github_list_commits",
|
|
2674
|
-
"github_get_commit"
|
|
2674
|
+
"github_get_commit",
|
|
2675
|
+
"github_list_issue_comments",
|
|
2676
|
+
"github_add_issue_comment",
|
|
2677
|
+
"github_update_issue_comment",
|
|
2678
|
+
"github_delete_issue_comment",
|
|
2679
|
+
"github_list_pr_files",
|
|
2680
|
+
"github_list_pr_commits",
|
|
2681
|
+
"github_list_pr_reviews",
|
|
2682
|
+
"github_create_pr_review",
|
|
2683
|
+
"github_list_pr_review_comments",
|
|
2684
|
+
"github_get_file_contents",
|
|
2685
|
+
"github_create_or_update_file",
|
|
2686
|
+
"github_delete_file",
|
|
2687
|
+
"github_list_releases",
|
|
2688
|
+
"github_get_release",
|
|
2689
|
+
"github_get_latest_release",
|
|
2690
|
+
"github_create_release",
|
|
2691
|
+
"github_list_labels",
|
|
2692
|
+
"github_create_label",
|
|
2693
|
+
"github_add_issue_labels",
|
|
2694
|
+
"github_list_collaborators",
|
|
2695
|
+
"github_fork_repo",
|
|
2696
|
+
"github_search_repos",
|
|
2697
|
+
"github_search_issues",
|
|
2698
|
+
"github_search_code",
|
|
2699
|
+
"github_list_workflows",
|
|
2700
|
+
"github_list_workflow_runs",
|
|
2701
|
+
"github_trigger_workflow",
|
|
2702
|
+
"github_list_milestones",
|
|
2703
|
+
"github_create_milestone"
|
|
2675
2704
|
];
|
|
2676
2705
|
});
|
|
2677
2706
|
|
|
@@ -10102,6 +10131,16 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10102
10131
|
stepError = err.message || "Tool execution failed";
|
|
10103
10132
|
logger30.error(`[Trigger ${trigger.id}] Step ${stepIndex} failed:`, err);
|
|
10104
10133
|
}
|
|
10134
|
+
if (stepSuccess && toolResult) {
|
|
10135
|
+
if (toolResult.isError === true) {
|
|
10136
|
+
stepSuccess = false;
|
|
10137
|
+
const errText = toolResult.content?.find((c) => c.type === "text")?.text;
|
|
10138
|
+
stepError = errText || "Tool returned an error response";
|
|
10139
|
+
} else if (toolResult.structuredContent?.success === false) {
|
|
10140
|
+
stepSuccess = false;
|
|
10141
|
+
stepError = toolResult.structuredContent?.error || "Tool returned success: false";
|
|
10142
|
+
}
|
|
10143
|
+
}
|
|
10105
10144
|
const duration = Date.now() - startTime;
|
|
10106
10145
|
const executedAt = new Date().toISOString();
|
|
10107
10146
|
steps.push({
|
|
@@ -10129,7 +10168,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10129
10168
|
updates.status = "failed";
|
|
10130
10169
|
}
|
|
10131
10170
|
await config.triggers.update(trigger.id, updates, context);
|
|
10132
|
-
return { success:
|
|
10171
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10133
10172
|
}
|
|
10134
10173
|
const completeRequest = {
|
|
10135
10174
|
success: stepSuccess,
|
|
@@ -10180,7 +10219,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10180
10219
|
};
|
|
10181
10220
|
deliverWebhooks(completeResponse.webhooks, payload, WEBHOOK_DELIVERY_TIMEOUT_MS).catch(() => {});
|
|
10182
10221
|
}
|
|
10183
|
-
return { success:
|
|
10222
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10184
10223
|
}
|
|
10185
10224
|
const limitError = `Trigger execution exceeded maximum of ${MAX_TRIGGER_STEPS} steps`;
|
|
10186
10225
|
logger30.error(`[Trigger ${trigger.id}] ${limitError}`);
|
|
@@ -11636,8 +11675,11 @@ class OAuthHandler {
|
|
|
11636
11675
|
const headers = this.getHeaders({
|
|
11637
11676
|
"Content-Type": "application/json"
|
|
11638
11677
|
});
|
|
11639
|
-
if (authHeader
|
|
11640
|
-
|
|
11678
|
+
if (authHeader) {
|
|
11679
|
+
const normalized = authHeader.replace(/^bearer\s+/i, "Bearer ");
|
|
11680
|
+
if (normalized.startsWith("Bearer ")) {
|
|
11681
|
+
headers["Authorization"] = normalized;
|
|
11682
|
+
}
|
|
11641
11683
|
}
|
|
11642
11684
|
if (integrationsHeader) {
|
|
11643
11685
|
headers["X-Integrations"] = integrationsHeader;
|
package/dist/adapters/nextjs.js
CHANGED
|
@@ -2671,7 +2671,36 @@ var init_github = __esm(() => {
|
|
|
2671
2671
|
"github_create_branch",
|
|
2672
2672
|
"github_get_user",
|
|
2673
2673
|
"github_list_commits",
|
|
2674
|
-
"github_get_commit"
|
|
2674
|
+
"github_get_commit",
|
|
2675
|
+
"github_list_issue_comments",
|
|
2676
|
+
"github_add_issue_comment",
|
|
2677
|
+
"github_update_issue_comment",
|
|
2678
|
+
"github_delete_issue_comment",
|
|
2679
|
+
"github_list_pr_files",
|
|
2680
|
+
"github_list_pr_commits",
|
|
2681
|
+
"github_list_pr_reviews",
|
|
2682
|
+
"github_create_pr_review",
|
|
2683
|
+
"github_list_pr_review_comments",
|
|
2684
|
+
"github_get_file_contents",
|
|
2685
|
+
"github_create_or_update_file",
|
|
2686
|
+
"github_delete_file",
|
|
2687
|
+
"github_list_releases",
|
|
2688
|
+
"github_get_release",
|
|
2689
|
+
"github_get_latest_release",
|
|
2690
|
+
"github_create_release",
|
|
2691
|
+
"github_list_labels",
|
|
2692
|
+
"github_create_label",
|
|
2693
|
+
"github_add_issue_labels",
|
|
2694
|
+
"github_list_collaborators",
|
|
2695
|
+
"github_fork_repo",
|
|
2696
|
+
"github_search_repos",
|
|
2697
|
+
"github_search_issues",
|
|
2698
|
+
"github_search_code",
|
|
2699
|
+
"github_list_workflows",
|
|
2700
|
+
"github_list_workflow_runs",
|
|
2701
|
+
"github_trigger_workflow",
|
|
2702
|
+
"github_list_milestones",
|
|
2703
|
+
"github_create_milestone"
|
|
2675
2704
|
];
|
|
2676
2705
|
});
|
|
2677
2706
|
|
|
@@ -10102,6 +10131,16 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10102
10131
|
stepError = err.message || "Tool execution failed";
|
|
10103
10132
|
logger30.error(`[Trigger ${trigger.id}] Step ${stepIndex} failed:`, err);
|
|
10104
10133
|
}
|
|
10134
|
+
if (stepSuccess && toolResult) {
|
|
10135
|
+
if (toolResult.isError === true) {
|
|
10136
|
+
stepSuccess = false;
|
|
10137
|
+
const errText = toolResult.content?.find((c) => c.type === "text")?.text;
|
|
10138
|
+
stepError = errText || "Tool returned an error response";
|
|
10139
|
+
} else if (toolResult.structuredContent?.success === false) {
|
|
10140
|
+
stepSuccess = false;
|
|
10141
|
+
stepError = toolResult.structuredContent?.error || "Tool returned success: false";
|
|
10142
|
+
}
|
|
10143
|
+
}
|
|
10105
10144
|
const duration = Date.now() - startTime;
|
|
10106
10145
|
const executedAt = new Date().toISOString();
|
|
10107
10146
|
steps.push({
|
|
@@ -10129,7 +10168,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10129
10168
|
updates.status = "failed";
|
|
10130
10169
|
}
|
|
10131
10170
|
await config.triggers.update(trigger.id, updates, context);
|
|
10132
|
-
return { success:
|
|
10171
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10133
10172
|
}
|
|
10134
10173
|
const completeRequest = {
|
|
10135
10174
|
success: stepSuccess,
|
|
@@ -10180,7 +10219,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10180
10219
|
};
|
|
10181
10220
|
deliverWebhooks(completeResponse.webhooks, payload, WEBHOOK_DELIVERY_TIMEOUT_MS).catch(() => {});
|
|
10182
10221
|
}
|
|
10183
|
-
return { success:
|
|
10222
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10184
10223
|
}
|
|
10185
10224
|
const limitError = `Trigger execution exceeded maximum of ${MAX_TRIGGER_STEPS} steps`;
|
|
10186
10225
|
logger30.error(`[Trigger ${trigger.id}] ${limitError}`);
|
|
@@ -11636,8 +11675,11 @@ class OAuthHandler {
|
|
|
11636
11675
|
const headers = this.getHeaders({
|
|
11637
11676
|
"Content-Type": "application/json"
|
|
11638
11677
|
});
|
|
11639
|
-
if (authHeader
|
|
11640
|
-
|
|
11678
|
+
if (authHeader) {
|
|
11679
|
+
const normalized = authHeader.replace(/^bearer\s+/i, "Bearer ");
|
|
11680
|
+
if (normalized.startsWith("Bearer ")) {
|
|
11681
|
+
headers["Authorization"] = normalized;
|
|
11682
|
+
}
|
|
11641
11683
|
}
|
|
11642
11684
|
if (integrationsHeader) {
|
|
11643
11685
|
headers["X-Integrations"] = integrationsHeader;
|
package/dist/adapters/node.js
CHANGED
|
@@ -2671,7 +2671,36 @@ var init_github = __esm(() => {
|
|
|
2671
2671
|
"github_create_branch",
|
|
2672
2672
|
"github_get_user",
|
|
2673
2673
|
"github_list_commits",
|
|
2674
|
-
"github_get_commit"
|
|
2674
|
+
"github_get_commit",
|
|
2675
|
+
"github_list_issue_comments",
|
|
2676
|
+
"github_add_issue_comment",
|
|
2677
|
+
"github_update_issue_comment",
|
|
2678
|
+
"github_delete_issue_comment",
|
|
2679
|
+
"github_list_pr_files",
|
|
2680
|
+
"github_list_pr_commits",
|
|
2681
|
+
"github_list_pr_reviews",
|
|
2682
|
+
"github_create_pr_review",
|
|
2683
|
+
"github_list_pr_review_comments",
|
|
2684
|
+
"github_get_file_contents",
|
|
2685
|
+
"github_create_or_update_file",
|
|
2686
|
+
"github_delete_file",
|
|
2687
|
+
"github_list_releases",
|
|
2688
|
+
"github_get_release",
|
|
2689
|
+
"github_get_latest_release",
|
|
2690
|
+
"github_create_release",
|
|
2691
|
+
"github_list_labels",
|
|
2692
|
+
"github_create_label",
|
|
2693
|
+
"github_add_issue_labels",
|
|
2694
|
+
"github_list_collaborators",
|
|
2695
|
+
"github_fork_repo",
|
|
2696
|
+
"github_search_repos",
|
|
2697
|
+
"github_search_issues",
|
|
2698
|
+
"github_search_code",
|
|
2699
|
+
"github_list_workflows",
|
|
2700
|
+
"github_list_workflow_runs",
|
|
2701
|
+
"github_trigger_workflow",
|
|
2702
|
+
"github_list_milestones",
|
|
2703
|
+
"github_create_milestone"
|
|
2675
2704
|
];
|
|
2676
2705
|
});
|
|
2677
2706
|
|
|
@@ -10102,6 +10131,16 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10102
10131
|
stepError = err.message || "Tool execution failed";
|
|
10103
10132
|
logger30.error(`[Trigger ${trigger.id}] Step ${stepIndex} failed:`, err);
|
|
10104
10133
|
}
|
|
10134
|
+
if (stepSuccess && toolResult) {
|
|
10135
|
+
if (toolResult.isError === true) {
|
|
10136
|
+
stepSuccess = false;
|
|
10137
|
+
const errText = toolResult.content?.find((c) => c.type === "text")?.text;
|
|
10138
|
+
stepError = errText || "Tool returned an error response";
|
|
10139
|
+
} else if (toolResult.structuredContent?.success === false) {
|
|
10140
|
+
stepSuccess = false;
|
|
10141
|
+
stepError = toolResult.structuredContent?.error || "Tool returned success: false";
|
|
10142
|
+
}
|
|
10143
|
+
}
|
|
10105
10144
|
const duration = Date.now() - startTime;
|
|
10106
10145
|
const executedAt = new Date().toISOString();
|
|
10107
10146
|
steps.push({
|
|
@@ -10129,7 +10168,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10129
10168
|
updates.status = "failed";
|
|
10130
10169
|
}
|
|
10131
10170
|
await config.triggers.update(trigger.id, updates, context);
|
|
10132
|
-
return { success:
|
|
10171
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10133
10172
|
}
|
|
10134
10173
|
const completeRequest = {
|
|
10135
10174
|
success: stepSuccess,
|
|
@@ -10180,7 +10219,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10180
10219
|
};
|
|
10181
10220
|
deliverWebhooks(completeResponse.webhooks, payload, WEBHOOK_DELIVERY_TIMEOUT_MS).catch(() => {});
|
|
10182
10221
|
}
|
|
10183
|
-
return { success:
|
|
10222
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10184
10223
|
}
|
|
10185
10224
|
const limitError = `Trigger execution exceeded maximum of ${MAX_TRIGGER_STEPS} steps`;
|
|
10186
10225
|
logger30.error(`[Trigger ${trigger.id}] ${limitError}`);
|
|
@@ -11636,8 +11675,11 @@ class OAuthHandler {
|
|
|
11636
11675
|
const headers = this.getHeaders({
|
|
11637
11676
|
"Content-Type": "application/json"
|
|
11638
11677
|
});
|
|
11639
|
-
if (authHeader
|
|
11640
|
-
|
|
11678
|
+
if (authHeader) {
|
|
11679
|
+
const normalized = authHeader.replace(/^bearer\s+/i, "Bearer ");
|
|
11680
|
+
if (normalized.startsWith("Bearer ")) {
|
|
11681
|
+
headers["Authorization"] = normalized;
|
|
11682
|
+
}
|
|
11641
11683
|
}
|
|
11642
11684
|
if (integrationsHeader) {
|
|
11643
11685
|
headers["X-Integrations"] = integrationsHeader;
|
|
@@ -2671,7 +2671,36 @@ var init_github = __esm(() => {
|
|
|
2671
2671
|
"github_create_branch",
|
|
2672
2672
|
"github_get_user",
|
|
2673
2673
|
"github_list_commits",
|
|
2674
|
-
"github_get_commit"
|
|
2674
|
+
"github_get_commit",
|
|
2675
|
+
"github_list_issue_comments",
|
|
2676
|
+
"github_add_issue_comment",
|
|
2677
|
+
"github_update_issue_comment",
|
|
2678
|
+
"github_delete_issue_comment",
|
|
2679
|
+
"github_list_pr_files",
|
|
2680
|
+
"github_list_pr_commits",
|
|
2681
|
+
"github_list_pr_reviews",
|
|
2682
|
+
"github_create_pr_review",
|
|
2683
|
+
"github_list_pr_review_comments",
|
|
2684
|
+
"github_get_file_contents",
|
|
2685
|
+
"github_create_or_update_file",
|
|
2686
|
+
"github_delete_file",
|
|
2687
|
+
"github_list_releases",
|
|
2688
|
+
"github_get_release",
|
|
2689
|
+
"github_get_latest_release",
|
|
2690
|
+
"github_create_release",
|
|
2691
|
+
"github_list_labels",
|
|
2692
|
+
"github_create_label",
|
|
2693
|
+
"github_add_issue_labels",
|
|
2694
|
+
"github_list_collaborators",
|
|
2695
|
+
"github_fork_repo",
|
|
2696
|
+
"github_search_repos",
|
|
2697
|
+
"github_search_issues",
|
|
2698
|
+
"github_search_code",
|
|
2699
|
+
"github_list_workflows",
|
|
2700
|
+
"github_list_workflow_runs",
|
|
2701
|
+
"github_trigger_workflow",
|
|
2702
|
+
"github_list_milestones",
|
|
2703
|
+
"github_create_milestone"
|
|
2675
2704
|
];
|
|
2676
2705
|
});
|
|
2677
2706
|
|
|
@@ -10102,6 +10131,16 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10102
10131
|
stepError = err.message || "Tool execution failed";
|
|
10103
10132
|
logger30.error(`[Trigger ${trigger.id}] Step ${stepIndex} failed:`, err);
|
|
10104
10133
|
}
|
|
10134
|
+
if (stepSuccess && toolResult) {
|
|
10135
|
+
if (toolResult.isError === true) {
|
|
10136
|
+
stepSuccess = false;
|
|
10137
|
+
const errText = toolResult.content?.find((c) => c.type === "text")?.text;
|
|
10138
|
+
stepError = errText || "Tool returned an error response";
|
|
10139
|
+
} else if (toolResult.structuredContent?.success === false) {
|
|
10140
|
+
stepSuccess = false;
|
|
10141
|
+
stepError = toolResult.structuredContent?.error || "Tool returned success: false";
|
|
10142
|
+
}
|
|
10143
|
+
}
|
|
10105
10144
|
const duration = Date.now() - startTime;
|
|
10106
10145
|
const executedAt = new Date().toISOString();
|
|
10107
10146
|
steps.push({
|
|
@@ -10129,7 +10168,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10129
10168
|
updates.status = "failed";
|
|
10130
10169
|
}
|
|
10131
10170
|
await config.triggers.update(trigger.id, updates, context);
|
|
10132
|
-
return { success:
|
|
10171
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10133
10172
|
}
|
|
10134
10173
|
const completeRequest = {
|
|
10135
10174
|
success: stepSuccess,
|
|
@@ -10180,7 +10219,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10180
10219
|
};
|
|
10181
10220
|
deliverWebhooks(completeResponse.webhooks, payload, WEBHOOK_DELIVERY_TIMEOUT_MS).catch(() => {});
|
|
10182
10221
|
}
|
|
10183
|
-
return { success:
|
|
10222
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10184
10223
|
}
|
|
10185
10224
|
const limitError = `Trigger execution exceeded maximum of ${MAX_TRIGGER_STEPS} steps`;
|
|
10186
10225
|
logger30.error(`[Trigger ${trigger.id}] ${limitError}`);
|
|
@@ -11636,8 +11675,11 @@ class OAuthHandler {
|
|
|
11636
11675
|
const headers = this.getHeaders({
|
|
11637
11676
|
"Content-Type": "application/json"
|
|
11638
11677
|
});
|
|
11639
|
-
if (authHeader
|
|
11640
|
-
|
|
11678
|
+
if (authHeader) {
|
|
11679
|
+
const normalized = authHeader.replace(/^bearer\s+/i, "Bearer ");
|
|
11680
|
+
if (normalized.startsWith("Bearer ")) {
|
|
11681
|
+
headers["Authorization"] = normalized;
|
|
11682
|
+
}
|
|
11641
11683
|
}
|
|
11642
11684
|
if (integrationsHeader) {
|
|
11643
11685
|
headers["X-Integrations"] = integrationsHeader;
|
|
@@ -2671,7 +2671,36 @@ var init_github = __esm(() => {
|
|
|
2671
2671
|
"github_create_branch",
|
|
2672
2672
|
"github_get_user",
|
|
2673
2673
|
"github_list_commits",
|
|
2674
|
-
"github_get_commit"
|
|
2674
|
+
"github_get_commit",
|
|
2675
|
+
"github_list_issue_comments",
|
|
2676
|
+
"github_add_issue_comment",
|
|
2677
|
+
"github_update_issue_comment",
|
|
2678
|
+
"github_delete_issue_comment",
|
|
2679
|
+
"github_list_pr_files",
|
|
2680
|
+
"github_list_pr_commits",
|
|
2681
|
+
"github_list_pr_reviews",
|
|
2682
|
+
"github_create_pr_review",
|
|
2683
|
+
"github_list_pr_review_comments",
|
|
2684
|
+
"github_get_file_contents",
|
|
2685
|
+
"github_create_or_update_file",
|
|
2686
|
+
"github_delete_file",
|
|
2687
|
+
"github_list_releases",
|
|
2688
|
+
"github_get_release",
|
|
2689
|
+
"github_get_latest_release",
|
|
2690
|
+
"github_create_release",
|
|
2691
|
+
"github_list_labels",
|
|
2692
|
+
"github_create_label",
|
|
2693
|
+
"github_add_issue_labels",
|
|
2694
|
+
"github_list_collaborators",
|
|
2695
|
+
"github_fork_repo",
|
|
2696
|
+
"github_search_repos",
|
|
2697
|
+
"github_search_issues",
|
|
2698
|
+
"github_search_code",
|
|
2699
|
+
"github_list_workflows",
|
|
2700
|
+
"github_list_workflow_runs",
|
|
2701
|
+
"github_trigger_workflow",
|
|
2702
|
+
"github_list_milestones",
|
|
2703
|
+
"github_create_milestone"
|
|
2675
2704
|
];
|
|
2676
2705
|
});
|
|
2677
2706
|
|
|
@@ -10102,6 +10131,16 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10102
10131
|
stepError = err.message || "Tool execution failed";
|
|
10103
10132
|
logger30.error(`[Trigger ${trigger.id}] Step ${stepIndex} failed:`, err);
|
|
10104
10133
|
}
|
|
10134
|
+
if (stepSuccess && toolResult) {
|
|
10135
|
+
if (toolResult.isError === true) {
|
|
10136
|
+
stepSuccess = false;
|
|
10137
|
+
const errText = toolResult.content?.find((c) => c.type === "text")?.text;
|
|
10138
|
+
stepError = errText || "Tool returned an error response";
|
|
10139
|
+
} else if (toolResult.structuredContent?.success === false) {
|
|
10140
|
+
stepSuccess = false;
|
|
10141
|
+
stepError = toolResult.structuredContent?.error || "Tool returned success: false";
|
|
10142
|
+
}
|
|
10143
|
+
}
|
|
10105
10144
|
const duration = Date.now() - startTime;
|
|
10106
10145
|
const executedAt = new Date().toISOString();
|
|
10107
10146
|
steps.push({
|
|
@@ -10129,7 +10168,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10129
10168
|
updates.status = "failed";
|
|
10130
10169
|
}
|
|
10131
10170
|
await config.triggers.update(trigger.id, updates, context);
|
|
10132
|
-
return { success:
|
|
10171
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10133
10172
|
}
|
|
10134
10173
|
const completeRequest = {
|
|
10135
10174
|
success: stepSuccess,
|
|
@@ -10180,7 +10219,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10180
10219
|
};
|
|
10181
10220
|
deliverWebhooks(completeResponse.webhooks, payload, WEBHOOK_DELIVERY_TIMEOUT_MS).catch(() => {});
|
|
10182
10221
|
}
|
|
10183
|
-
return { success:
|
|
10222
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10184
10223
|
}
|
|
10185
10224
|
const limitError = `Trigger execution exceeded maximum of ${MAX_TRIGGER_STEPS} steps`;
|
|
10186
10225
|
logger30.error(`[Trigger ${trigger.id}] ${limitError}`);
|
|
@@ -11636,8 +11675,11 @@ class OAuthHandler {
|
|
|
11636
11675
|
const headers = this.getHeaders({
|
|
11637
11676
|
"Content-Type": "application/json"
|
|
11638
11677
|
});
|
|
11639
|
-
if (authHeader
|
|
11640
|
-
|
|
11678
|
+
if (authHeader) {
|
|
11679
|
+
const normalized = authHeader.replace(/^bearer\s+/i, "Bearer ");
|
|
11680
|
+
if (normalized.startsWith("Bearer ")) {
|
|
11681
|
+
headers["Authorization"] = normalized;
|
|
11682
|
+
}
|
|
11641
11683
|
}
|
|
11642
11684
|
if (integrationsHeader) {
|
|
11643
11685
|
headers["X-Integrations"] = integrationsHeader;
|
package/dist/index.js
CHANGED
|
@@ -3062,7 +3062,36 @@ var init_github = __esm(() => {
|
|
|
3062
3062
|
"github_create_branch",
|
|
3063
3063
|
"github_get_user",
|
|
3064
3064
|
"github_list_commits",
|
|
3065
|
-
"github_get_commit"
|
|
3065
|
+
"github_get_commit",
|
|
3066
|
+
"github_list_issue_comments",
|
|
3067
|
+
"github_add_issue_comment",
|
|
3068
|
+
"github_update_issue_comment",
|
|
3069
|
+
"github_delete_issue_comment",
|
|
3070
|
+
"github_list_pr_files",
|
|
3071
|
+
"github_list_pr_commits",
|
|
3072
|
+
"github_list_pr_reviews",
|
|
3073
|
+
"github_create_pr_review",
|
|
3074
|
+
"github_list_pr_review_comments",
|
|
3075
|
+
"github_get_file_contents",
|
|
3076
|
+
"github_create_or_update_file",
|
|
3077
|
+
"github_delete_file",
|
|
3078
|
+
"github_list_releases",
|
|
3079
|
+
"github_get_release",
|
|
3080
|
+
"github_get_latest_release",
|
|
3081
|
+
"github_create_release",
|
|
3082
|
+
"github_list_labels",
|
|
3083
|
+
"github_create_label",
|
|
3084
|
+
"github_add_issue_labels",
|
|
3085
|
+
"github_list_collaborators",
|
|
3086
|
+
"github_fork_repo",
|
|
3087
|
+
"github_search_repos",
|
|
3088
|
+
"github_search_issues",
|
|
3089
|
+
"github_search_code",
|
|
3090
|
+
"github_list_workflows",
|
|
3091
|
+
"github_list_workflow_runs",
|
|
3092
|
+
"github_trigger_workflow",
|
|
3093
|
+
"github_list_milestones",
|
|
3094
|
+
"github_create_milestone"
|
|
3066
3095
|
];
|
|
3067
3096
|
});
|
|
3068
3097
|
|
|
@@ -10481,6 +10510,16 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10481
10510
|
stepError = err.message || "Tool execution failed";
|
|
10482
10511
|
logger31.error(`[Trigger ${trigger.id}] Step ${stepIndex} failed:`, err);
|
|
10483
10512
|
}
|
|
10513
|
+
if (stepSuccess && toolResult) {
|
|
10514
|
+
if (toolResult.isError === true) {
|
|
10515
|
+
stepSuccess = false;
|
|
10516
|
+
const errText = toolResult.content?.find((c) => c.type === "text")?.text;
|
|
10517
|
+
stepError = errText || "Tool returned an error response";
|
|
10518
|
+
} else if (toolResult.structuredContent?.success === false) {
|
|
10519
|
+
stepSuccess = false;
|
|
10520
|
+
stepError = toolResult.structuredContent?.error || "Tool returned success: false";
|
|
10521
|
+
}
|
|
10522
|
+
}
|
|
10484
10523
|
const duration = Date.now() - startTime;
|
|
10485
10524
|
const executedAt = new Date().toISOString();
|
|
10486
10525
|
steps.push({
|
|
@@ -10508,7 +10547,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10508
10547
|
updates.status = "failed";
|
|
10509
10548
|
}
|
|
10510
10549
|
await config.triggers.update(trigger.id, updates, context);
|
|
10511
|
-
return { success:
|
|
10550
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10512
10551
|
}
|
|
10513
10552
|
const completeRequest = {
|
|
10514
10553
|
success: stepSuccess,
|
|
@@ -10559,7 +10598,7 @@ async function executeTrigger(trigger, config, context) {
|
|
|
10559
10598
|
};
|
|
10560
10599
|
deliverWebhooks(completeResponse.webhooks, payload, WEBHOOK_DELIVERY_TIMEOUT_MS).catch(() => {});
|
|
10561
10600
|
}
|
|
10562
|
-
return { success:
|
|
10601
|
+
return { success: steps.every((s) => s.success), steps, error: stepError };
|
|
10563
10602
|
}
|
|
10564
10603
|
const limitError = `Trigger execution exceeded maximum of ${MAX_TRIGGER_STEPS} steps`;
|
|
10565
10604
|
logger31.error(`[Trigger ${trigger.id}] ${limitError}`);
|
|
@@ -12015,8 +12054,11 @@ class OAuthHandler {
|
|
|
12015
12054
|
const headers = this.getHeaders({
|
|
12016
12055
|
"Content-Type": "application/json"
|
|
12017
12056
|
});
|
|
12018
|
-
if (authHeader
|
|
12019
|
-
|
|
12057
|
+
if (authHeader) {
|
|
12058
|
+
const normalized = authHeader.replace(/^bearer\s+/i, "Bearer ");
|
|
12059
|
+
if (normalized.startsWith("Bearer ")) {
|
|
12060
|
+
headers["Authorization"] = normalized;
|
|
12061
|
+
}
|
|
12020
12062
|
}
|
|
12021
12063
|
if (integrationsHeader) {
|
|
12022
12064
|
headers["X-Integrations"] = integrationsHeader;
|