@sideboard-ai/core 0.1.77 → 0.1.79
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/{agents-XJV6J3K2.js → agents-EWPHOM6Y.js} +6 -6
- package/dist/{agents-LKUHPPEQ.js → agents-GRAPUXWW.js} +5 -5
- package/dist/{app-settings-3TLA2EJ7.js → app-settings-6IOQYGBK.js} +7 -1
- package/dist/{app-settings-P42Z3VOB.js → app-settings-NILNWNNQ.js} +7 -1
- package/dist/{chunk-VERLUKN2.js → chunk-5LXWTU3J.js} +6 -6
- package/dist/{chunk-2ZIPJRJE.js → chunk-5VTWBI3I.js} +2 -2
- package/dist/{chunk-GWTLKXXP.js → chunk-6T2SKGCS.js} +3 -3
- package/dist/{chunk-OE7YBB5X.js → chunk-FUUVPN4A.js} +108 -3
- package/dist/{chunk-EEKSZTMU.js → chunk-HCGEFU3J.js} +5 -5
- package/dist/{chunk-XJNCWYFR.js → chunk-HSLQXL6M.js} +3 -3
- package/dist/{chunk-W7YOTDVO.js → chunk-IFPN6TER.js} +47 -2
- package/dist/{chunk-2FJI5JXX.js → chunk-P33ZQ7ZC.js} +3 -3
- package/dist/{chunk-75U65MBE.js → chunk-PW5YHHP3.js} +2 -2
- package/dist/{chunk-QD37IILI.js → chunk-SHCR6RPU.js} +3 -3
- package/dist/{chunk-PTJJIQK7.js → chunk-XKNBSYA7.js} +47 -2
- package/dist/{chunk-MF2YMEGD.js → chunk-YVVXWWCC.js} +110 -3
- package/dist/{coordinator-prompt-LLFJUO2R.js → coordinator-prompt-2OVON2LQ.js} +4 -4
- package/dist/{coordinator-prompt-MRCMMRSF.js → coordinator-prompt-K2R34A5T.js} +3 -3
- package/dist/{global-workspace-TWHMYLTZ.js → global-workspace-RI367AM6.js} +4 -4
- package/dist/{global-workspace-YNMNO4CL.js → global-workspace-VG44RZUH.js} +5 -5
- package/dist/index.cjs +500 -178
- package/dist/index.d.cts +83 -8
- package/dist/index.d.ts +83 -8
- package/dist/index.js +344 -179
- package/dist/mcp/run-stdio.cjs +2439 -2228
- package/dist/mcp/run-stdio.js +156 -100
- package/dist/{workspaces-GQ4XKBD3.js → workspaces-BQWQEZWE.js} +5 -5
- package/dist/{workspaces-O3U5BENH.js → workspaces-TYPJNUSM.js} +6 -6
- package/dist/{worktree-VOCH3WS3.js → worktree-5VLLFI5W.js} +5 -1
- package/dist/{worktree-KWXHMKRN.js → worktree-UNSOCYZU.js} +5 -1
- package/package.json +1 -1
|
@@ -28,23 +28,23 @@ import {
|
|
|
28
28
|
resolveCursorModelId,
|
|
29
29
|
resolveLoginCommand,
|
|
30
30
|
resolveQuotaFallbackAgent
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-SHCR6RPU.js";
|
|
32
32
|
import {
|
|
33
33
|
ORCHESTRATOR_AGENT_KINDS,
|
|
34
34
|
assertOrchestratorCapableAgent,
|
|
35
35
|
coerceOrchestratorAgent,
|
|
36
36
|
isOrchestratorCapableAgent
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-5LXWTU3J.js";
|
|
38
|
+
import "./chunk-HCGEFU3J.js";
|
|
39
39
|
import "./chunk-BTL7EMGT.js";
|
|
40
40
|
import {
|
|
41
41
|
cursorSdkMessageToEvents,
|
|
42
42
|
parseCursorRunnerLine
|
|
43
43
|
} from "./chunk-SEOICVGB.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-JT7R45JB.js";
|
|
46
|
-
import "./chunk-MF2YMEGD.js";
|
|
44
|
+
import "./chunk-YVVXWWCC.js";
|
|
47
45
|
import "./chunk-FKOIHGKV.js";
|
|
46
|
+
import "./chunk-IFPN6TER.js";
|
|
47
|
+
import "./chunk-JT7R45JB.js";
|
|
48
48
|
import "./chunk-FWJYLBO6.js";
|
|
49
49
|
import "./chunk-77WWLBCI.js";
|
|
50
50
|
import "./chunk-M37RITA6.js";
|
|
@@ -32,16 +32,16 @@ import {
|
|
|
32
32
|
resolveCursorModelId,
|
|
33
33
|
resolveLoginCommand,
|
|
34
34
|
resolveQuotaFallbackAgent
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-P33ZQ7ZC.js";
|
|
36
36
|
import "./chunk-VROPG6QF.js";
|
|
37
37
|
import {
|
|
38
38
|
ORCHESTRATOR_AGENT_KINDS,
|
|
39
39
|
assertOrchestratorCapableAgent,
|
|
40
40
|
coerceOrchestratorAgent,
|
|
41
41
|
isOrchestratorCapableAgent
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
42
|
+
} from "./chunk-6T2SKGCS.js";
|
|
43
|
+
import "./chunk-HSLQXL6M.js";
|
|
44
|
+
import "./chunk-FUUVPN4A.js";
|
|
45
45
|
import "./chunk-B3SJXYIJ.js";
|
|
46
46
|
import "./chunk-7FD7COKE.js";
|
|
47
47
|
import {
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
resolveCommandBinarySync,
|
|
54
54
|
withExportedPath
|
|
55
55
|
} from "./chunk-AE5VBOFE.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-XKNBSYA7.js";
|
|
57
57
|
import "./chunk-NSTQ6QKD.js";
|
|
58
58
|
import "./chunk-KGZBYWZ3.js";
|
|
59
59
|
import "./chunk-7MV3RXSC.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
GITHUB_GIT_AUTH_MODES,
|
|
2
3
|
HARNESS_ENV_KEYS,
|
|
3
4
|
appSettingsPath,
|
|
4
5
|
applyAppEnvironment,
|
|
@@ -22,6 +23,8 @@ import {
|
|
|
22
23
|
getDefaultEffort,
|
|
23
24
|
getDefaultFast,
|
|
24
25
|
getDefaultModel,
|
|
26
|
+
getGithubGitAuthMode,
|
|
27
|
+
getGithubPat,
|
|
25
28
|
getIssueSource,
|
|
26
29
|
getLinearApiKey,
|
|
27
30
|
harnessEnvKey,
|
|
@@ -49,11 +52,12 @@ import {
|
|
|
49
52
|
updateDefaultsSettings,
|
|
50
53
|
updateIntegrationsSettings,
|
|
51
54
|
updateOpencodeSettings
|
|
52
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-IFPN6TER.js";
|
|
53
56
|
import "./chunk-JT7R45JB.js";
|
|
54
57
|
import "./chunk-77WWLBCI.js";
|
|
55
58
|
import "./chunk-M37RITA6.js";
|
|
56
59
|
export {
|
|
60
|
+
GITHUB_GIT_AUTH_MODES,
|
|
57
61
|
HARNESS_ENV_KEYS,
|
|
58
62
|
appSettingsPath,
|
|
59
63
|
applyAppEnvironment,
|
|
@@ -77,6 +81,8 @@ export {
|
|
|
77
81
|
getDefaultEffort,
|
|
78
82
|
getDefaultFast,
|
|
79
83
|
getDefaultModel,
|
|
84
|
+
getGithubGitAuthMode,
|
|
85
|
+
getGithubPat,
|
|
80
86
|
getIssueSource,
|
|
81
87
|
getLinearApiKey,
|
|
82
88
|
harnessEnvKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
+
GITHUB_GIT_AUTH_MODES,
|
|
4
5
|
HARNESS_ENV_KEYS,
|
|
5
6
|
appSettingsPath,
|
|
6
7
|
applyAppEnvironment,
|
|
@@ -24,6 +25,8 @@ import {
|
|
|
24
25
|
getDefaultEffort,
|
|
25
26
|
getDefaultFast,
|
|
26
27
|
getDefaultModel,
|
|
28
|
+
getGithubGitAuthMode,
|
|
29
|
+
getGithubPat,
|
|
27
30
|
getIssueSource,
|
|
28
31
|
getLinearApiKey,
|
|
29
32
|
harnessEnvKey,
|
|
@@ -51,11 +54,12 @@ import {
|
|
|
51
54
|
updateDefaultsSettings,
|
|
52
55
|
updateIntegrationsSettings,
|
|
53
56
|
updateOpencodeSettings
|
|
54
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-XKNBSYA7.js";
|
|
55
58
|
import "./chunk-NSTQ6QKD.js";
|
|
56
59
|
import "./chunk-KGZBYWZ3.js";
|
|
57
60
|
import "./chunk-7MV3RXSC.js";
|
|
58
61
|
export {
|
|
62
|
+
GITHUB_GIT_AUTH_MODES,
|
|
59
63
|
HARNESS_ENV_KEYS,
|
|
60
64
|
appSettingsPath,
|
|
61
65
|
applyAppEnvironment,
|
|
@@ -79,6 +83,8 @@ export {
|
|
|
79
83
|
getDefaultEffort,
|
|
80
84
|
getDefaultFast,
|
|
81
85
|
getDefaultModel,
|
|
86
|
+
getGithubGitAuthMode,
|
|
87
|
+
getGithubPat,
|
|
82
88
|
getIssueSource,
|
|
83
89
|
getLinearApiKey,
|
|
84
90
|
harnessEnvKey,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureGlobalCoordinatorCwd
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
resolveNewThreadOptions,
|
|
6
|
-
resolveThreadDefaults
|
|
7
|
-
} from "./chunk-W7YOTDVO.js";
|
|
3
|
+
} from "./chunk-HCGEFU3J.js";
|
|
8
4
|
import {
|
|
9
5
|
allocateTeamName,
|
|
10
6
|
takenSlugsFromThread,
|
|
11
7
|
teamSlugFromName
|
|
12
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YVVXWWCC.js";
|
|
9
|
+
import {
|
|
10
|
+
resolveNewThreadOptions,
|
|
11
|
+
resolveThreadDefaults
|
|
12
|
+
} from "./chunk-IFPN6TER.js";
|
|
13
13
|
import {
|
|
14
14
|
createEmptyThread,
|
|
15
15
|
listThreads,
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
isGlobalRepoPath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6T2SKGCS.js";
|
|
6
6
|
import {
|
|
7
7
|
ensureGhPreferOrigin,
|
|
8
8
|
resolveRepoRoot
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FUUVPN4A.js";
|
|
10
10
|
import {
|
|
11
11
|
appDataDir
|
|
12
12
|
} from "./chunk-7MV3RXSC.js";
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
ensureGlobalCoordinatorCwd
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HSLQXL6M.js";
|
|
6
6
|
import {
|
|
7
7
|
allocateTeamName,
|
|
8
8
|
takenSlugsFromThread,
|
|
9
9
|
teamSlugFromName
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FUUVPN4A.js";
|
|
11
11
|
import {
|
|
12
12
|
createEmptyThread,
|
|
13
13
|
listThreads,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
resolveNewThreadOptions,
|
|
19
19
|
resolveThreadDefaults
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XKNBSYA7.js";
|
|
21
21
|
import {
|
|
22
22
|
globalAgentCwd
|
|
23
23
|
} from "./chunk-7MV3RXSC.js";
|
|
@@ -11,6 +11,10 @@ import {
|
|
|
11
11
|
git,
|
|
12
12
|
resolveGhAuthToken
|
|
13
13
|
} from "./chunk-AE5VBOFE.js";
|
|
14
|
+
import {
|
|
15
|
+
getGithubGitAuthMode,
|
|
16
|
+
getGithubPat
|
|
17
|
+
} from "./chunk-XKNBSYA7.js";
|
|
14
18
|
import {
|
|
15
19
|
worktreesRoot
|
|
16
20
|
} from "./chunk-7MV3RXSC.js";
|
|
@@ -881,6 +885,74 @@ function formatGhLandError(raw, opts) {
|
|
|
881
885
|
return detail || "Failed to create or update pull request";
|
|
882
886
|
}
|
|
883
887
|
|
|
888
|
+
// src/git/git-auth-mode.ts
|
|
889
|
+
var HTTPS_REWRITE = [
|
|
890
|
+
{ key: "url.https://github.com/.insteadOf", value: "git@github.com:" },
|
|
891
|
+
{ key: "url.https://github.com/.insteadOf", value: "ssh://git@github.com/" },
|
|
892
|
+
{ key: "credential.https://github.com.helper", value: "!gh auth git-credential" }
|
|
893
|
+
];
|
|
894
|
+
function appendIndexedGitConfig(existing, entries) {
|
|
895
|
+
const start = Number.parseInt(String(existing?.GIT_CONFIG_COUNT ?? "0"), 10);
|
|
896
|
+
const count = Number.isFinite(start) && start > 0 ? start : 0;
|
|
897
|
+
const out = {};
|
|
898
|
+
entries.forEach((entry, i) => {
|
|
899
|
+
const n = count + i;
|
|
900
|
+
out[`GIT_CONFIG_KEY_${n}`] = entry.key;
|
|
901
|
+
out[`GIT_CONFIG_VALUE_${n}`] = entry.value;
|
|
902
|
+
});
|
|
903
|
+
out.GIT_CONFIG_COUNT = String(count + entries.length);
|
|
904
|
+
return out;
|
|
905
|
+
}
|
|
906
|
+
function githubAgentGitEnv(existing) {
|
|
907
|
+
return appendIndexedGitConfig(existing, HTTPS_REWRITE);
|
|
908
|
+
}
|
|
909
|
+
function applyGithubGitAuthEnv(existing, opts) {
|
|
910
|
+
const out = {};
|
|
911
|
+
if (opts.mode === "gh" || opts.mode === "token") {
|
|
912
|
+
Object.assign(out, githubAgentGitEnv(existing));
|
|
913
|
+
}
|
|
914
|
+
if (opts.mode === "token") {
|
|
915
|
+
const token = opts.token?.trim();
|
|
916
|
+
if (token && !existing?.GH_TOKEN?.trim()) {
|
|
917
|
+
out.GH_TOKEN = token;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
return out;
|
|
921
|
+
}
|
|
922
|
+
function formatGitAuthModeDirective(mode) {
|
|
923
|
+
switch (mode) {
|
|
924
|
+
case "gh":
|
|
925
|
+
return [
|
|
926
|
+
"Git authentication (Account \u2192 GitHub mode: gh CLI):",
|
|
927
|
+
"- This process rewrites `git@github.com:` and `ssh://git@github.com/` to HTTPS.",
|
|
928
|
+
"- `gh` supplies credentials (`gh auth git-credential`). Do not switch remotes to SSH.",
|
|
929
|
+
"- Push with `git push -u origin HEAD`. Create/update PRs with `gh` as below."
|
|
930
|
+
].join("\n");
|
|
931
|
+
case "ssh":
|
|
932
|
+
return [
|
|
933
|
+
"Git authentication (Account \u2192 GitHub mode: SSH):",
|
|
934
|
+
"- Keep SSH remotes (`git@github.com:\u2026`). Do not rewrite them to HTTPS.",
|
|
935
|
+
"- Use this Mac\u2019s SSH agent / keys. If push fails with `Permission denied (publickey)`, tell the user to start ssh-agent or switch Account \u2192 GitHub to Auto / gh CLI \u2014 do not rewrite remotes yourself.",
|
|
936
|
+
"- Push with `git push -u origin HEAD`. Create/update PRs with `gh` as below (API still uses `gh`)."
|
|
937
|
+
].join("\n");
|
|
938
|
+
case "token":
|
|
939
|
+
return [
|
|
940
|
+
"Git authentication (Account \u2192 GitHub mode: personal access token):",
|
|
941
|
+
"- This process rewrites GitHub SSH remotes to HTTPS.",
|
|
942
|
+
"- `GH_TOKEN` is set in the environment. Use HTTPS git and `gh`; do not paste the token into commands or chat.",
|
|
943
|
+
"- Push with `git push -u origin HEAD`. Create/update PRs with `gh` as below."
|
|
944
|
+
].join("\n");
|
|
945
|
+
case "auto":
|
|
946
|
+
default:
|
|
947
|
+
return [
|
|
948
|
+
"Git authentication (Account \u2192 GitHub mode: auto):",
|
|
949
|
+
"- Prefer the existing remote URL (SSH or HTTPS). Do not rewrite remotes unless a push/fetch fails.",
|
|
950
|
+
'- If `git push` fails with `Permission denied (publickey)`, this shell has no ssh-agent. Retry over HTTPS (do not stop): `git -c url.https://github.com/.insteadOf=git@github.com: -c http.extraHeader="AUTHORIZATION: bearer $(gh auth token)" push -u origin HEAD`.',
|
|
951
|
+
"- Then create/update the PR with `gh` as below."
|
|
952
|
+
].join("\n");
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
|
|
884
956
|
// src/git/pr-gates.ts
|
|
885
957
|
function prIsInMergeQueue(gate) {
|
|
886
958
|
if (gate.isInMergeQueue) return true;
|
|
@@ -1253,10 +1325,15 @@ ${view.stderr}`;
|
|
|
1253
1325
|
timeoutMs: 15e3
|
|
1254
1326
|
});
|
|
1255
1327
|
}
|
|
1256
|
-
async function originGhRepoEnv(cwd) {
|
|
1328
|
+
async function originGhRepoEnv(cwd, opts) {
|
|
1257
1329
|
await ensureGhPreferOrigin(cwd);
|
|
1258
1330
|
const slug = await resolveGithubRepoSlug(cwd);
|
|
1259
|
-
|
|
1331
|
+
const mode = opts?.mode ?? getGithubGitAuthMode();
|
|
1332
|
+
const token = mode === "token" ? getGithubPat() : null;
|
|
1333
|
+
return {
|
|
1334
|
+
...applyGithubGitAuthEnv(opts?.env, { mode, token }),
|
|
1335
|
+
...slug ? { GH_REPO: slug } : {}
|
|
1336
|
+
};
|
|
1260
1337
|
}
|
|
1261
1338
|
async function resolveDefaultBranch(repoPath, opts) {
|
|
1262
1339
|
const viaOrigin = await git(
|
|
@@ -2005,7 +2082,33 @@ async function commitAll(worktreePath, message) {
|
|
|
2005
2082
|
return true;
|
|
2006
2083
|
}
|
|
2007
2084
|
async function pushBranch(worktreePath, branchName) {
|
|
2008
|
-
await git(["push", "-u", "origin", branchName], worktreePath
|
|
2085
|
+
const ssh = await git(["push", "-u", "origin", branchName], worktreePath, {
|
|
2086
|
+
reject: false
|
|
2087
|
+
});
|
|
2088
|
+
if (ssh.exitCode === 0) return;
|
|
2089
|
+
const sshErr = (ssh.stderr || ssh.stdout).trim();
|
|
2090
|
+
const slug = await resolveGithubRepoSlug(worktreePath);
|
|
2091
|
+
const token = await resolveGhAuthToken(worktreePath);
|
|
2092
|
+
if (!slug || !token) {
|
|
2093
|
+
throw new Error(
|
|
2094
|
+
sshErr || `git push origin ${branchName} failed` + (!token ? " (no SSH agent and gh auth token unavailable \u2014 run: gh auth login)" : "")
|
|
2095
|
+
);
|
|
2096
|
+
}
|
|
2097
|
+
const tryHttps = async (header) => git(["push", "-u", "origin", branchName], worktreePath, {
|
|
2098
|
+
reject: false,
|
|
2099
|
+
env: { GIT_TERMINAL_PROMPT: "0" },
|
|
2100
|
+
config: {
|
|
2101
|
+
"url.https://github.com/.insteadOf": "git@github.com:",
|
|
2102
|
+
"http.extraHeader": header
|
|
2103
|
+
}
|
|
2104
|
+
});
|
|
2105
|
+
const bearer = await tryHttps(`AUTHORIZATION: bearer ${token}`);
|
|
2106
|
+
if (bearer.exitCode === 0) return;
|
|
2107
|
+
const basic = Buffer.from(`x-access-token:${token}`, "utf8").toString("base64");
|
|
2108
|
+
const basicPush = await tryHttps(`Authorization: Basic ${basic}`);
|
|
2109
|
+
if (basicPush.exitCode === 0) return;
|
|
2110
|
+
const httpsErr = (basicPush.stderr || bearer.stderr || bearer.stdout).trim();
|
|
2111
|
+
throw new Error(httpsErr || sshErr || `git push origin ${branchName} failed`);
|
|
2009
2112
|
}
|
|
2010
2113
|
async function mergePr(cwd, selector, opts) {
|
|
2011
2114
|
const slug = await resolveGithubRepoSlug(cwd);
|
|
@@ -2214,6 +2317,8 @@ export {
|
|
|
2214
2317
|
worktreeDisplayLabel,
|
|
2215
2318
|
worktreeDisplayLabelForGroup,
|
|
2216
2319
|
formatGhLandError,
|
|
2320
|
+
githubAgentGitEnv,
|
|
2321
|
+
formatGitAuthModeDirective,
|
|
2217
2322
|
detectGhStack,
|
|
2218
2323
|
getPrStack,
|
|
2219
2324
|
initPrStack,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveThreadDefaults
|
|
3
|
-
} from "./chunk-W7YOTDVO.js";
|
|
4
1
|
import {
|
|
5
2
|
resolveGithubRepoSlug
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YVVXWWCC.js";
|
|
4
|
+
import {
|
|
5
|
+
resolveThreadDefaults
|
|
6
|
+
} from "./chunk-IFPN6TER.js";
|
|
7
7
|
import {
|
|
8
8
|
globalAgentCwd,
|
|
9
9
|
sideboardReposDir
|
|
@@ -68,7 +68,7 @@ var COORDINATOR_TOOL_PLAYBOOK = [
|
|
|
68
68
|
"Inspect / review / PRs:",
|
|
69
69
|
"- get_diff \u2014 compact diff summary",
|
|
70
70
|
'- request_review \u2014 open a Review chat tab on a worktree thread (attaches .sideboard/review.md when present, else local guidelines; sends "Review changes in this workspace."); then wait_for_turn / get_turn_result on the returned id',
|
|
71
|
-
"- ask_git \u2014
|
|
71
|
+
"- ask_git \u2014 commit & push, open a draft PR, resolve conflicts, or merge. When the worktree is clean, Sideboard pushes / opens the PR itself. When dirty, it queues the worktree agent \u2014 then wait_for_turn. Prefer this over paraphrasing.",
|
|
72
72
|
'- Or send_to_thread with those exact phrases: "Commit and push.", "Commit, push, and open a draft PR.", "Fix merge conflicts.", "Merge PR." (draft PRs: `gh pr create --draft -R <origin-owner/name>` using the workspace `github:` slug \u2014 never upstream). Never run git/gh from this orchestration cwd, and never merge the PR yourself.',
|
|
73
73
|
"Human-only (do not attempt): ready-for-review land (confirm_land), purge_thread.",
|
|
74
74
|
"Thread links in replies: when mentioning a chat/thread for the user, include a markdown link `[Title](sideboard://thread/<id>)` using the full id (or the link field from create_thread / list_threads). Sideboard renders these as clickable opens.",
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
resolveGithubRepoSlug
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FUUVPN4A.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveThreadDefaults
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XKNBSYA7.js";
|
|
9
9
|
import {
|
|
10
10
|
globalAgentCwd,
|
|
11
11
|
sideboardReposDir
|
|
@@ -70,7 +70,7 @@ var COORDINATOR_TOOL_PLAYBOOK = [
|
|
|
70
70
|
"Inspect / review / PRs:",
|
|
71
71
|
"- get_diff \u2014 compact diff summary",
|
|
72
72
|
'- request_review \u2014 open a Review chat tab on a worktree thread (attaches .sideboard/review.md when present, else local guidelines; sends "Review changes in this workspace."); then wait_for_turn / get_turn_result on the returned id',
|
|
73
|
-
"- ask_git \u2014
|
|
73
|
+
"- ask_git \u2014 commit & push, open a draft PR, resolve conflicts, or merge. When the worktree is clean, Sideboard pushes / opens the PR itself. When dirty, it queues the worktree agent \u2014 then wait_for_turn. Prefer this over paraphrasing.",
|
|
74
74
|
'- Or send_to_thread with those exact phrases: "Commit and push.", "Commit, push, and open a draft PR.", "Fix merge conflicts.", "Merge PR." (draft PRs: `gh pr create --draft -R <origin-owner/name>` using the workspace `github:` slug \u2014 never upstream). Never run git/gh from this orchestration cwd, and never merge the PR yourself.',
|
|
75
75
|
"Human-only (do not attempt): ready-for-review land (confirm_land), purge_thread.",
|
|
76
76
|
"Thread links in replies: when mentioning a chat/thread for the user, include a markdown link `[Title](sideboard://thread/<id>)` using the full id (or the link field from create_thread / list_threads). Sideboard renders these as clickable opens.",
|
|
@@ -187,6 +187,9 @@ function normalizeVault(raw) {
|
|
|
187
187
|
if (typeof raw.slackAppToken === "string" && raw.slackAppToken.trim()) {
|
|
188
188
|
out.slackAppToken = raw.slackAppToken.trim();
|
|
189
189
|
}
|
|
190
|
+
if (typeof raw.githubPat === "string" && raw.githubPat.trim()) {
|
|
191
|
+
out.githubPat = raw.githubPat.trim();
|
|
192
|
+
}
|
|
190
193
|
if (raw.environment && typeof raw.environment === "object") {
|
|
191
194
|
const environment = {};
|
|
192
195
|
for (const [key, value] of Object.entries(raw.environment)) {
|
|
@@ -214,6 +217,7 @@ var DEFAULT_AGENTS = /* @__PURE__ */ new Set([
|
|
|
214
217
|
"brightsy",
|
|
215
218
|
"cursor"
|
|
216
219
|
]);
|
|
220
|
+
var GITHUB_GIT_AUTH_MODES = ["auto", "gh", "ssh", "token"];
|
|
217
221
|
function hasLinearOAuth(integrations) {
|
|
218
222
|
return Boolean(
|
|
219
223
|
integrations.linearAccessToken?.trim() || integrations.linearRefreshToken?.trim()
|
|
@@ -230,12 +234,14 @@ function toPublicAppSettings(settings) {
|
|
|
230
234
|
const integrations = { ...settings.integrations };
|
|
231
235
|
const slackClientSecret = integrations.slackClientSecret;
|
|
232
236
|
const slackAppToken = integrations.slackAppToken;
|
|
237
|
+
const githubPat = integrations.githubPat;
|
|
233
238
|
delete integrations.linearApiKey;
|
|
234
239
|
delete integrations.linearAccessToken;
|
|
235
240
|
delete integrations.linearRefreshToken;
|
|
236
241
|
delete integrations.linearClientSecret;
|
|
237
242
|
delete integrations.slackClientSecret;
|
|
238
243
|
delete integrations.slackAppToken;
|
|
244
|
+
delete integrations.githubPat;
|
|
239
245
|
return {
|
|
240
246
|
...settings,
|
|
241
247
|
environment,
|
|
@@ -244,7 +250,8 @@ function toPublicAppSettings(settings) {
|
|
|
244
250
|
hasLinearApiKey: hasLinearCredentials(settings.integrations),
|
|
245
251
|
hasLinearOAuth: hasLinearOAuth(settings.integrations),
|
|
246
252
|
hasSlackClientSecret: Boolean(slackClientSecret?.trim()),
|
|
247
|
-
hasSlackAppToken: Boolean(slackAppToken?.trim())
|
|
253
|
+
hasSlackAppToken: Boolean(slackAppToken?.trim()),
|
|
254
|
+
hasGithubPat: Boolean(githubPat?.trim())
|
|
248
255
|
}
|
|
249
256
|
};
|
|
250
257
|
}
|
|
@@ -303,6 +310,7 @@ function normalizeBrightsy(raw) {
|
|
|
303
310
|
return out;
|
|
304
311
|
}
|
|
305
312
|
var ISSUE_SOURCES = /* @__PURE__ */ new Set(["linear", "github"]);
|
|
313
|
+
var GIT_AUTH_MODES = new Set(GITHUB_GIT_AUTH_MODES);
|
|
306
314
|
function normalizeIntegrations(raw) {
|
|
307
315
|
if (!raw || typeof raw !== "object") return {};
|
|
308
316
|
const source = raw;
|
|
@@ -367,6 +375,13 @@ function normalizeIntegrations(raw) {
|
|
|
367
375
|
const label = source.slackDeviceLabel.trim().slice(0, 64);
|
|
368
376
|
if (label) out.slackDeviceLabel = label;
|
|
369
377
|
}
|
|
378
|
+
if (typeof source.githubGitAuthMode === "string" && GIT_AUTH_MODES.has(source.githubGitAuthMode)) {
|
|
379
|
+
out.githubGitAuthMode = source.githubGitAuthMode;
|
|
380
|
+
}
|
|
381
|
+
if (typeof source.githubPat === "string") {
|
|
382
|
+
const pat = source.githubPat.trim();
|
|
383
|
+
if (pat) out.githubPat = pat;
|
|
384
|
+
}
|
|
370
385
|
return out;
|
|
371
386
|
}
|
|
372
387
|
function normalizeDefaults(raw) {
|
|
@@ -516,7 +531,7 @@ function readSettingsFile() {
|
|
|
516
531
|
}
|
|
517
532
|
function diskHoldsSecrets(disk) {
|
|
518
533
|
return Boolean(
|
|
519
|
-
disk.integrations.linearApiKey || disk.integrations.linearAccessToken || disk.integrations.linearRefreshToken || disk.integrations.linearClientSecret || disk.integrations.slackClientSecret || disk.integrations.slackAppToken || Object.keys(disk.environment).length > 0
|
|
534
|
+
disk.integrations.linearApiKey || disk.integrations.linearAccessToken || disk.integrations.linearRefreshToken || disk.integrations.linearClientSecret || disk.integrations.slackClientSecret || disk.integrations.slackAppToken || disk.integrations.githubPat || Object.keys(disk.environment).length > 0
|
|
520
535
|
);
|
|
521
536
|
}
|
|
522
537
|
function mergeVault(disk) {
|
|
@@ -541,6 +556,9 @@ function mergeVault(disk) {
|
|
|
541
556
|
if (vault.slackAppToken && !integrations.slackAppToken) {
|
|
542
557
|
integrations.slackAppToken = vault.slackAppToken;
|
|
543
558
|
}
|
|
559
|
+
if (vault.githubPat && !integrations.githubPat) {
|
|
560
|
+
integrations.githubPat = vault.githubPat;
|
|
561
|
+
}
|
|
544
562
|
return { ...disk, environment, integrations };
|
|
545
563
|
}
|
|
546
564
|
function persistSplit(settings) {
|
|
@@ -551,12 +569,14 @@ function persistSplit(settings) {
|
|
|
551
569
|
const linearClientSecret = integrations.linearClientSecret;
|
|
552
570
|
const slackClientSecret = integrations.slackClientSecret;
|
|
553
571
|
const slackAppToken = integrations.slackAppToken;
|
|
572
|
+
const githubPat = integrations.githubPat;
|
|
554
573
|
delete integrations.linearApiKey;
|
|
555
574
|
delete integrations.linearAccessToken;
|
|
556
575
|
delete integrations.linearRefreshToken;
|
|
557
576
|
delete integrations.linearClientSecret;
|
|
558
577
|
delete integrations.slackClientSecret;
|
|
559
578
|
delete integrations.slackAppToken;
|
|
579
|
+
delete integrations.githubPat;
|
|
560
580
|
writePrivateFile(
|
|
561
581
|
appSettingsPath(),
|
|
562
582
|
`${JSON.stringify({ ...settings, environment: {}, integrations }, null, 2)}
|
|
@@ -569,6 +589,7 @@ function persistSplit(settings) {
|
|
|
569
589
|
linearClientSecret,
|
|
570
590
|
slackClientSecret,
|
|
571
591
|
slackAppToken,
|
|
592
|
+
githubPat,
|
|
572
593
|
environment: settings.environment
|
|
573
594
|
});
|
|
574
595
|
}
|
|
@@ -734,6 +755,20 @@ function updateIntegrationsSettings(patch) {
|
|
|
734
755
|
integrations.slackDeviceLabel = patch.slackDeviceLabel.trim().slice(0, 64);
|
|
735
756
|
}
|
|
736
757
|
}
|
|
758
|
+
if ("githubGitAuthMode" in patch) {
|
|
759
|
+
if (patch.githubGitAuthMode == null) {
|
|
760
|
+
delete integrations.githubGitAuthMode;
|
|
761
|
+
} else if (GIT_AUTH_MODES.has(patch.githubGitAuthMode)) {
|
|
762
|
+
integrations.githubGitAuthMode = patch.githubGitAuthMode;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
if ("githubPat" in patch) {
|
|
766
|
+
if (patch.githubPat == null || patch.githubPat.trim() === "") {
|
|
767
|
+
delete integrations.githubPat;
|
|
768
|
+
} else {
|
|
769
|
+
integrations.githubPat = patch.githubPat.trim();
|
|
770
|
+
}
|
|
771
|
+
}
|
|
737
772
|
return saveAppSettings({ ...current, integrations });
|
|
738
773
|
}
|
|
739
774
|
function updateDefaultsSettings(patch) {
|
|
@@ -841,6 +876,13 @@ function disconnectLinearConnection() {
|
|
|
841
876
|
function getIssueSource(settings = loadAppSettings()) {
|
|
842
877
|
return settings.integrations.issueSource ?? "github";
|
|
843
878
|
}
|
|
879
|
+
function getGithubGitAuthMode(settings = loadAppSettings()) {
|
|
880
|
+
return settings.integrations.githubGitAuthMode ?? "auto";
|
|
881
|
+
}
|
|
882
|
+
function getGithubPat(settings = loadAppSettings()) {
|
|
883
|
+
const pat = settings.integrations.githubPat?.trim();
|
|
884
|
+
return pat || null;
|
|
885
|
+
}
|
|
844
886
|
function resolveEffectiveIssueSource(settings = loadAppSettings()) {
|
|
845
887
|
const preferred = getIssueSource(settings);
|
|
846
888
|
if (preferred === "linear" && !isLinearConnected(settings)) return "github";
|
|
@@ -1058,6 +1100,7 @@ export {
|
|
|
1058
1100
|
isSecureFileEncrypted,
|
|
1059
1101
|
secureFileUnlocksWith,
|
|
1060
1102
|
HARNESS_ENV_KEYS,
|
|
1103
|
+
GITHUB_GIT_AUTH_MODES,
|
|
1061
1104
|
toPublicAppSettings,
|
|
1062
1105
|
appSettingsPath,
|
|
1063
1106
|
claudeUserSettingsPath,
|
|
@@ -1080,6 +1123,8 @@ export {
|
|
|
1080
1123
|
saveLinearOAuth,
|
|
1081
1124
|
disconnectLinearConnection,
|
|
1082
1125
|
getIssueSource,
|
|
1126
|
+
getGithubGitAuthMode,
|
|
1127
|
+
getGithubPat,
|
|
1083
1128
|
resolveEffectiveIssueSource,
|
|
1084
1129
|
getLinearApiKey,
|
|
1085
1130
|
brightsyCloudConnectEnabled,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-VROPG6QF.js";
|
|
10
10
|
import {
|
|
11
11
|
isOrchestratorThread
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6T2SKGCS.js";
|
|
13
13
|
import {
|
|
14
14
|
enrichPathWithNpmGlobalBin,
|
|
15
15
|
isConductorBundledCli,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
loadAppSettings,
|
|
23
23
|
resolveAgentExecutable,
|
|
24
24
|
resolveClaudeExecutable
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-XKNBSYA7.js";
|
|
26
26
|
import {
|
|
27
27
|
appDataDir
|
|
28
28
|
} from "./chunk-7MV3RXSC.js";
|
|
@@ -1009,7 +1009,7 @@ var claudeAdapter = {
|
|
|
1009
1009
|
);
|
|
1010
1010
|
}
|
|
1011
1011
|
const mode = permissionMode(thread);
|
|
1012
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
1012
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-RI367AM6.js");
|
|
1013
1013
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
1014
1014
|
const injectedServers = await buildInjectedMcpServers({
|
|
1015
1015
|
includeSideboard: true,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isGlobalRepoPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5LXWTU3J.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureGhPreferOrigin,
|
|
6
6
|
resolveRepoRoot
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YVVXWWCC.js";
|
|
8
8
|
import {
|
|
9
9
|
appDataDir
|
|
10
10
|
} from "./chunk-M37RITA6.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isOrchestratorThread
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5LXWTU3J.js";
|
|
4
4
|
import {
|
|
5
5
|
applyConnectedTeamToCli,
|
|
6
6
|
brightsyMcpServerName,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
loadAppSettings,
|
|
20
20
|
resolveAgentExecutable,
|
|
21
21
|
resolveClaudeExecutable
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-IFPN6TER.js";
|
|
23
23
|
import {
|
|
24
24
|
appDataDir
|
|
25
25
|
} from "./chunk-M37RITA6.js";
|
|
@@ -949,7 +949,7 @@ var claudeAdapter = {
|
|
|
949
949
|
);
|
|
950
950
|
}
|
|
951
951
|
const mode = permissionMode(thread);
|
|
952
|
-
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-
|
|
952
|
+
const { isOrchestratorThread: isOrchestratorThread2 } = await import("./global-workspace-VG44RZUH.js");
|
|
953
953
|
const isOrchestrator = isOrchestratorThread2(thread);
|
|
954
954
|
const injectedServers = await buildInjectedMcpServers({
|
|
955
955
|
includeSideboard: true,
|