@sealant/mend 0.36.0-next.721 → 0.36.0-next.761
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/README.md +20 -10
- package/dist/{chunk-GF5A6W2Y.js → chunk-D4JBBLJV.js} +104 -4
- package/dist/{dashboard-MPO6H5YF.js → dashboard-4BJL72T6.js} +16 -27
- package/dist/main.js +3807 -2047
- package/man/mend-accounts.1 +1 -1
- package/man/mend-adopt.1 +1 -1
- package/man/mend-attach.1 +1 -1
- package/man/mend-codex.1 +1 -1
- package/man/mend-completions.1 +1 -1
- package/man/mend-connect-pi.1 +1 -1
- package/man/mend-connect.1 +1 -1
- package/man/mend-continue.1 +1 -1
- package/man/mend-doctor.1 +1 -1
- package/man/mend-dotfiles-repo.1 +1 -1
- package/man/mend-dotfiles-sync.1 +1 -1
- package/man/mend-dotfiles.1 +1 -1
- package/man/mend-env-cluster.1 +1 -1
- package/man/mend-env-load.1 +1 -1
- package/man/mend-env-show.1 +1 -1
- package/man/mend-folder-create.1 +1 -1
- package/man/mend-folder-list.1 +1 -1
- package/man/mend-folder-push.1 +1 -1
- package/man/mend-folder-rm.1 +1 -1
- package/man/mend-git-author.1 +1 -1
- package/man/mend-help.1 +1 -1
- package/man/mend-invite.1 +1 -1
- package/man/mend-keys-init.1 +1 -1
- package/man/mend-keys-mode.1 +1 -1
- package/man/mend-keys-share.1 +1 -1
- package/man/mend-keys-show.1 +1 -1
- package/man/mend-land.1 +1 -1
- package/man/mend-login.1 +1 -1
- package/man/mend-logout.1 +1 -1
- package/man/mend-logs.1 +1 -1
- package/man/mend-man.1 +1 -1
- package/man/mend-members.1 +1 -1
- package/man/mend-memory-import.1 +1 -1
- package/man/mend-memory-rm.1 +1 -1
- package/man/mend-memory-show.1 +1 -1
- package/man/mend-memory.1 +1 -1
- package/man/mend-models.1 +1 -1
- package/man/mend-operator-exposure.1 +1 -1
- package/man/mend-operator-gate.1 +1 -1
- package/man/mend-operator-grant-owner.1 +1 -1
- package/man/mend-operator-org-create.1 +1 -1
- package/man/mend-operator-org-invite-owner.1 +1 -1
- package/man/mend-operator-org-list.1 +1 -1
- package/man/mend-operator-org-rename.1 +1 -1
- package/man/mend-operator-reset-link.1 +1 -1
- package/man/mend-pair.1 +1 -1
- package/man/mend-projects.1 +1 -1
- package/man/mend-pull.1 +6 -3
- package/man/mend-refresh.1 +1 -1
- package/man/mend-rejoin.1 +1 -1
- package/man/mend-resume.1 +1 -1
- package/man/mend-run.1 +4 -2
- package/man/mend-secrets-add.1 +1 -1
- package/man/mend-secrets-rm.1 +1 -1
- package/man/mend-secrets.1 +1 -1
- package/man/mend-server-logs.1 +1 -1
- package/man/mend-server-restart.1 +1 -1
- package/man/mend-server-setup.1 +17 -5
- package/man/mend-server-start.1 +1 -1
- package/man/mend-server-status.1 +1 -1
- package/man/mend-server-stop.1 +1 -1
- package/man/mend-server-upgrade.1 +1 -1
- package/man/mend-server.1 +1 -1
- package/man/mend-service-add.1 +1 -1
- package/man/mend-service-connect.1 +1 -1
- package/man/mend-service-init.1 +1 -1
- package/man/mend-service-list.1 +1 -1
- package/man/mend-service-logs.1 +1 -1
- package/man/mend-service-restart.1 +1 -1
- package/man/mend-service-run.1 +1 -1
- package/man/mend-service-stop.1 +1 -1
- package/man/mend-session-share.1 +1 -1
- package/man/mend-sessions.1 +1 -1
- package/man/mend-shell.1 +1 -1
- package/man/mend-skills-push.1 +1 -1
- package/man/mend-skills.1 +1 -1
- package/man/mend-snake.1 +1 -1
- package/man/mend-ssh-keys-remove.1 +2 -2
- package/man/mend-ssh-keys.1 +1 -1
- package/man/mend-ssh-setup.1 +1 -1
- package/man/mend-ssh.1 +12 -3
- package/man/mend-stop.1 +1 -1
- package/man/mend-ui.1 +1 -1
- package/man/mend-uninstall.1 +9 -3
- package/man/mend-version.1 +1 -1
- package/man/mend-wait.1 +1 -1
- package/man/mend-workspace-replace.1 +1 -1
- package/man/mend-worktrees-rm.1 +1 -1
- package/man/mend-worktrees.1 +1 -1
- package/man/mend.1 +5 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ terminal.
|
|
|
9
9
|
npm install -g @sealant/mend
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Requires Node 22+ and a running Mend server.
|
|
12
|
+
Requires Node 22.13+ and a running Mend server.
|
|
13
13
|
|
|
14
14
|
Run bare `mend` for the interactive dashboard. The session pane takes three quarters of the screen
|
|
15
15
|
and previews the recorded conversation without taking terminal control. The remaining quarter is a
|
|
@@ -170,7 +170,8 @@ mend projects adopted projects and their live sessions
|
|
|
170
170
|
mend refresh [project] fetch origin's branches into the store
|
|
171
171
|
mend land <session> [--branch b] [--no-pr] [--title t] | --check
|
|
172
172
|
push the change to origin, open or update its pull request
|
|
173
|
-
mend pull <session> [--force]
|
|
173
|
+
mend pull <session> [--branch b] [--force]
|
|
174
|
+
fetch the change into this clone as mend/<name>
|
|
174
175
|
mend workspace replace <session> [--yes]
|
|
175
176
|
replace a workspace that started before Mend 0.36
|
|
176
177
|
|
|
@@ -241,6 +242,7 @@ dev instance with `MEND_STATIC_TOKEN` set, `MEND_TOKEN=<that value>` also works.
|
|
|
241
242
|
```sh
|
|
242
243
|
mend ssh # inspect config and this client's key registration
|
|
243
244
|
mend ssh setup # register a key and reconcile this server's Host block
|
|
245
|
+
mend ssh 3f2a9c1e # print the exact ssh command for one session's workspace
|
|
244
246
|
mend ssh setup --key ./my-key # explicitly select private key or its .pub file
|
|
245
247
|
mend ssh setup --host mend.example.com
|
|
246
248
|
mend ssh keys # your registered keys, from every machine; this one is marked
|
|
@@ -248,9 +250,15 @@ mend ssh keys remove SHA256:… # stop the gateway accepting one of them
|
|
|
248
250
|
```
|
|
249
251
|
|
|
250
252
|
Setup puts the managed block before wildcard defaults and restores all-host scope before your
|
|
251
|
-
original configuration. It preserves other servers and hand-written Host/Match rules.
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
original configuration. It preserves other servers and hand-written Host/Match rules. An older
|
|
254
|
+
release's unscoped `Host mend-ws` block is migrated only when it points at this server's gateway
|
|
255
|
+
(the same HostName and Port); one for another server stays.
|
|
256
|
+
|
|
257
|
+
The gateway's user names the workspace, `ws-<workspace id>`, and no other output shows that id: the
|
|
258
|
+
Docker container's name is a different one, and the gateway closes such a connection after its
|
|
259
|
+
banner. `mend ssh <session>` prints the exact command, on stdout alone. If moving an older block
|
|
260
|
+
would change the scope of trailing directives, it refuses the write; put those directives in an
|
|
261
|
+
explicit Host or Match block and rerun setup.
|
|
254
262
|
|
|
255
263
|
Relative `--key` paths resolve against the invoking directory; `~/` resolves against your home.
|
|
256
264
|
Identity paths with spaces, quotes, backslashes and literal `%` are escaped for OpenSSH. Control
|
|
@@ -276,11 +284,13 @@ until it ends. The key file and this server's `~/.ssh/config` block stay on the
|
|
|
276
284
|
registered it; `mend ssh setup` there registers it again.
|
|
277
285
|
|
|
278
286
|
`mend uninstall --home` removes the key this machine registered before it revokes the terminal's
|
|
279
|
-
device token, then deletes the key file and the managed block.
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
287
|
+
device token, then deletes the key file and the signed-in server's managed block. Other servers'
|
|
288
|
+
blocks and an older release's unscoped `Host mend-ws` block stay (uninstall says how to delete the
|
|
289
|
+
latter by hand), and so does the key file while a block that stays signs with it. The key is found
|
|
290
|
+
by its public half, so an encrypted private key or a stopped agent does not hide it. When the server
|
|
291
|
+
refuses the removal, or this machine's public key cannot be read, the uninstall still finishes and
|
|
292
|
+
exits 1, naming the fingerprint that may still be registered and `mend ssh keys remove` to run from
|
|
293
|
+
another signed-in machine.
|
|
284
294
|
|
|
285
295
|
### Gateway host-key rotation
|
|
286
296
|
|
|
@@ -7,6 +7,15 @@ var __export = (target, all3) => {
|
|
|
7
7
|
// ../../packages/domain/src/workbench/harness-launch.ts
|
|
8
8
|
var EFFORT_LEVELS = ["low", "medium", "high", "xhigh", "max", "ultra"];
|
|
9
9
|
var PERMISSION_MODES = ["bypass", "ask"];
|
|
10
|
+
var PROMPTABLE_HARNESSES = /* @__PURE__ */ new Set([
|
|
11
|
+
"claude",
|
|
12
|
+
"codex",
|
|
13
|
+
"opencode",
|
|
14
|
+
"pi"
|
|
15
|
+
]);
|
|
16
|
+
var takesReviewFollowUp = (harness) => PROMPTABLE_HARNESSES.has(harness);
|
|
17
|
+
var noReviewFollowUpLine = (harness) => `This ${harness} session has no agent to send the review to. Start an agent in this worktree, then send it.`;
|
|
18
|
+
var resumesOwnHarness = (harness) => PROMPTABLE_HARNESSES.has(harness) || harness === "shell";
|
|
10
19
|
|
|
11
20
|
// ../../packages/domain/src/workbench/agent-start.ts
|
|
12
21
|
var agentStartingLine = (label, facts, elapsedMs) => `${label} is starting${facts.freshMachine ? " on the new machine" : ""} \xB7 ${Math.max(0, Math.round(elapsedMs / 1e3))}s`;
|
|
@@ -26759,6 +26768,19 @@ var repositoryCloneUrlIssue = (value3) => {
|
|
|
26759
26768
|
if (repositoryUrlHasCredential(value3)) return REPOSITORY_URL_CREDENTIAL_GUIDANCE;
|
|
26760
26769
|
return null;
|
|
26761
26770
|
};
|
|
26771
|
+
var gitRemoteLocation = (value3) => {
|
|
26772
|
+
if (repositoryCloneUrlIssue(value3) !== null) return null;
|
|
26773
|
+
if (!value3.includes("://")) {
|
|
26774
|
+
const hostPart = value3.slice(value3.indexOf("@") + 1, value3.lastIndexOf(":"));
|
|
26775
|
+
const host2 = hostPart.startsWith("[") ? hostPart.slice(1, -1) : hostPart;
|
|
26776
|
+
return { scheme: "ssh", host: host2.toLowerCase(), port: null };
|
|
26777
|
+
}
|
|
26778
|
+
const url = new URL(value3);
|
|
26779
|
+
const scheme = url.protocol.slice(0, -1);
|
|
26780
|
+
if (scheme !== "http" && scheme !== "https" && scheme !== "ssh" && scheme !== "git") return null;
|
|
26781
|
+
const host = url.hostname.startsWith("[") ? url.hostname.slice(1, -1) : url.hostname;
|
|
26782
|
+
return { scheme, host: host.toLowerCase(), port: url.port === "" ? null : Number(url.port) };
|
|
26783
|
+
};
|
|
26762
26784
|
var RepositoryCloneUrl = Schema_exports.String.pipe(
|
|
26763
26785
|
Schema_exports.check(Schema_exports.makeFilter((value3) => repositoryCloneUrlIssue(value3) ?? void 0)),
|
|
26764
26786
|
Schema_exports.brand("RepositoryCloneUrl")
|
|
@@ -26967,6 +26989,20 @@ var agentMemoryNameOf = (filePath) => {
|
|
|
26967
26989
|
}
|
|
26968
26990
|
return null;
|
|
26969
26991
|
};
|
|
26992
|
+
var agentMemoryPathOf = (name) => {
|
|
26993
|
+
if (name.startsWith(".")) return name;
|
|
26994
|
+
const qualified = /^([a-z]+):(.+)$/.exec(name);
|
|
26995
|
+
const harness = qualified?.[1] ?? null;
|
|
26996
|
+
const rest = qualified?.[2] ?? name;
|
|
26997
|
+
const single = AGENT_MEMORY_FILES.find(
|
|
26998
|
+
(file) => (harness === null || file.harness === harness) && file.path.endsWith(`/${rest}`)
|
|
26999
|
+
);
|
|
27000
|
+
if (single !== void 0) return single.path;
|
|
27001
|
+
const root = AGENT_MEMORY_ROOTS.find(
|
|
27002
|
+
(candidate) => candidate.harness === (harness ?? "claude")
|
|
27003
|
+
)?.root;
|
|
27004
|
+
return root === void 0 ? name : `${root}/${rest}`;
|
|
27005
|
+
};
|
|
26970
27006
|
|
|
26971
27007
|
// ../../packages/domain/src/workbench/connected-credential.ts
|
|
26972
27008
|
var CLAUDE_GRANT_SECTION = "claudeAiOauth";
|
|
@@ -28587,6 +28623,20 @@ var HOST_USER_NAMESPACE_FILES = [
|
|
|
28587
28623
|
"/proc/sys/kernel/unprivileged_userns_clone"
|
|
28588
28624
|
];
|
|
28589
28625
|
var HOST_USER_NAMESPACE_SYSCTL_FILE = "/etc/sysctl.d/60-mend-rootless-docker.conf";
|
|
28626
|
+
var HOST_USER_NAMESPACE_SYSCTL_MARKER = "# written by mend server setup; mend uninstall removes it";
|
|
28627
|
+
var PREVIOUS_SETTINGS = {
|
|
28628
|
+
"kernel.apparmor_restrict_unprivileged_userns = 0": "kernel.apparmor_restrict_unprivileged_userns = 1",
|
|
28629
|
+
"kernel.unprivileged_userns_clone = 1": "kernel.unprivileged_userns_clone = 0"
|
|
28630
|
+
};
|
|
28631
|
+
var HOST_USER_NAMESPACE_SYSCTL_PREVIOUS = "# previous: ";
|
|
28632
|
+
var hostUserNamespacesSysctlLines = (setting) => {
|
|
28633
|
+
const previous = PREVIOUS_SETTINGS[setting];
|
|
28634
|
+
return [
|
|
28635
|
+
HOST_USER_NAMESPACE_SYSCTL_MARKER,
|
|
28636
|
+
...previous === void 0 ? [] : [`${HOST_USER_NAMESPACE_SYSCTL_PREVIOUS}${previous}`],
|
|
28637
|
+
setting
|
|
28638
|
+
];
|
|
28639
|
+
};
|
|
28590
28640
|
var hostUserNamespacesOf = (readings) => {
|
|
28591
28641
|
const restrict = readings.apparmorRestrictUnprivilegedUserns?.trim();
|
|
28592
28642
|
const apparmorOff = readings.apparmorEnabled?.trim() === "N";
|
|
@@ -28599,6 +28649,9 @@ var hostUserNamespacesOf = (readings) => {
|
|
|
28599
28649
|
return { allowed: true };
|
|
28600
28650
|
};
|
|
28601
28651
|
var hostUserNamespacesFix = (setting) => `echo '${setting}' | sudo tee ${HOST_USER_NAMESPACE_SYSCTL_FILE} && sudo sysctl --system`;
|
|
28652
|
+
var HOST_USER_NAMESPACES_REFUSED = "the server's host refuses user namespaces \xB7 no workspace can start";
|
|
28653
|
+
var HOST_USER_NAMESPACES_FIX_LEAD = "on the server's host: ";
|
|
28654
|
+
var hostUserNamespacesFixLine = (setting) => `${HOST_USER_NAMESPACES_FIX_LEAD}${hostUserNamespacesFix(setting)}`;
|
|
28602
28655
|
|
|
28603
28656
|
// ../../packages/domain/src/workbench/link.ts
|
|
28604
28657
|
var ProjectLink = class extends Schema_exports.Class("ProjectLink")({
|
|
@@ -28654,7 +28707,7 @@ var ProjectClusterBindingsSnapshot = class extends Schema_exports.Class(
|
|
|
28654
28707
|
}) {
|
|
28655
28708
|
};
|
|
28656
28709
|
|
|
28657
|
-
// ../../node_modules/.pnpm/@sealant+api-contracts-next@0.39.0-next.
|
|
28710
|
+
// ../../node_modules/.pnpm/@sealant+api-contracts-next@0.39.0-next.721_effect@4.0.0-beta.93/node_modules/@sealant/api-contracts-next/dist/workspace-environment.js
|
|
28658
28711
|
var RESERVED_NAMES = new Map([
|
|
28659
28712
|
// Identity/process roots the daemon and shells own.
|
|
28660
28713
|
...[
|
|
@@ -29756,15 +29809,51 @@ var serviceViewStatus = (view) => {
|
|
|
29756
29809
|
};
|
|
29757
29810
|
var serviceViewHostPort = (view) => (view.endpoints.find((candidate) => candidate.scope === "private") ?? view.endpoints[0] ?? null)?.hostPort ?? null;
|
|
29758
29811
|
|
|
29812
|
+
// src/dashboard-adoption.ts
|
|
29813
|
+
var deriveAdoptOffer = (facts) => {
|
|
29814
|
+
if (facts.repoRoot === null || facts.originUrl === null || repositoryCloneUrlIssue(facts.originUrl) !== null)
|
|
29815
|
+
return null;
|
|
29816
|
+
return {
|
|
29817
|
+
source: RepositoryCloneUrl.make(facts.originUrl),
|
|
29818
|
+
name: normalizeProjectName(facts.repoRoot.split("/").at(-1) ?? "project"),
|
|
29819
|
+
modeIndex: 0
|
|
29820
|
+
};
|
|
29821
|
+
};
|
|
29822
|
+
var submitDashboardAdoption = async (api, input) => {
|
|
29823
|
+
const issue = repositoryCloneUrlIssue(input.source);
|
|
29824
|
+
if (issue !== null) return { kind: "invalid-source", message: issue };
|
|
29825
|
+
const project = await api("POST", "/projects", {
|
|
29826
|
+
name: input.name,
|
|
29827
|
+
source: RepositoryCloneUrl.make(input.source),
|
|
29828
|
+
gitAuthMode: input.gitAuthMode
|
|
29829
|
+
});
|
|
29830
|
+
return { kind: "adopted", project };
|
|
29831
|
+
};
|
|
29832
|
+
var adoptedGitAuth = (source, mode) => {
|
|
29833
|
+
if (mode === "ambient") return null;
|
|
29834
|
+
const signer = mode === "mend-key" ? "your Mend key" : "the connected `mend keys share`";
|
|
29835
|
+
const location = gitRemoteLocation(source);
|
|
29836
|
+
if (location !== null && location.scheme !== "ssh") {
|
|
29837
|
+
return {
|
|
29838
|
+
value: location.scheme,
|
|
29839
|
+
note: `cloned over ${location.scheme}, which ${signer} does not sign; it signs ssh remotes`
|
|
29840
|
+
};
|
|
29841
|
+
}
|
|
29842
|
+
return mode === "mend-key" ? { value: "mend key", note: "your Mend key signed this clone" } : { value: "bridge", note: "signed through the connected `mend keys share`" };
|
|
29843
|
+
};
|
|
29844
|
+
|
|
29759
29845
|
// src/server-request.ts
|
|
29760
29846
|
var MendRequestError = class extends Error {
|
|
29761
29847
|
kind;
|
|
29762
29848
|
status;
|
|
29763
|
-
|
|
29849
|
+
/** The refused call and its tag, for code and diagnostics (`MEND_DEBUG`); never in the words. */
|
|
29850
|
+
refused;
|
|
29851
|
+
constructor(kind, message, status = null, refused = null) {
|
|
29764
29852
|
super(message);
|
|
29765
29853
|
this.name = "MendRequestError";
|
|
29766
29854
|
this.kind = kind;
|
|
29767
29855
|
this.status = status;
|
|
29856
|
+
this.refused = refused;
|
|
29768
29857
|
}
|
|
29769
29858
|
};
|
|
29770
29859
|
var TIMEOUT_CODES = /* @__PURE__ */ new Set([
|
|
@@ -29986,18 +30075,20 @@ var eventFamilies = (payload) => {
|
|
|
29986
30075
|
};
|
|
29987
30076
|
|
|
29988
30077
|
export {
|
|
30078
|
+
takesReviewFollowUp,
|
|
30079
|
+
noReviewFollowUpLine,
|
|
30080
|
+
resumesOwnHarness,
|
|
29989
30081
|
agentStartingLine,
|
|
29990
30082
|
agentStartingFacts,
|
|
29991
30083
|
repositoryCloneUrlIssue,
|
|
29992
|
-
RepositoryCloneUrl,
|
|
29993
30084
|
landingFactsFromWire,
|
|
29994
30085
|
landingFactLine,
|
|
29995
30086
|
AGENT_MEMORY_ROOTS,
|
|
29996
|
-
AGENT_MEMORY_FILES,
|
|
29997
30087
|
CODEX_MEMORY_DATABASE,
|
|
29998
30088
|
AGENT_MEMORY_MAX_FILE_BYTES,
|
|
29999
30089
|
AGENT_MEMORY_MAX_DATABASE_BYTES,
|
|
30000
30090
|
agentMemoryNameOf,
|
|
30091
|
+
agentMemoryPathOf,
|
|
30001
30092
|
checkpointSourceWords,
|
|
30002
30093
|
narrowCredential,
|
|
30003
30094
|
claudeGrantFacts,
|
|
@@ -30007,8 +30098,14 @@ export {
|
|
|
30007
30098
|
withoutLaunchPhase,
|
|
30008
30099
|
launchPhaseOf,
|
|
30009
30100
|
HOST_USER_NAMESPACE_FILES,
|
|
30101
|
+
HOST_USER_NAMESPACE_SYSCTL_FILE,
|
|
30102
|
+
HOST_USER_NAMESPACE_SYSCTL_MARKER,
|
|
30103
|
+
HOST_USER_NAMESPACE_SYSCTL_PREVIOUS,
|
|
30104
|
+
hostUserNamespacesSysctlLines,
|
|
30010
30105
|
hostUserNamespacesOf,
|
|
30011
30106
|
hostUserNamespacesFix,
|
|
30107
|
+
HOST_USER_NAMESPACES_REFUSED,
|
|
30108
|
+
hostUserNamespacesFixLine,
|
|
30012
30109
|
PI_PROFILE_AGENT_PATH,
|
|
30013
30110
|
PI_PROFILE_LOCAL_PACKAGES,
|
|
30014
30111
|
PI_PROFILE_MAX_FILE_BYTES,
|
|
@@ -30050,6 +30147,9 @@ export {
|
|
|
30050
30147
|
serviceViewAttempt,
|
|
30051
30148
|
serviceViewStatus,
|
|
30052
30149
|
serviceViewHostPort,
|
|
30150
|
+
deriveAdoptOffer,
|
|
30151
|
+
submitDashboardAdoption,
|
|
30152
|
+
adoptedGitAuth,
|
|
30053
30153
|
MendRequestError,
|
|
30054
30154
|
spoken,
|
|
30055
30155
|
noAnswerError,
|
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HARNESS_COMMANDS,
|
|
3
3
|
LIVE_STATUSES,
|
|
4
|
-
RepositoryCloneUrl,
|
|
5
4
|
agentIsLive,
|
|
6
5
|
agentOutcome,
|
|
7
6
|
captureLineOf,
|
|
8
7
|
checkpointSourceWords,
|
|
9
8
|
createSseParser,
|
|
10
9
|
cwdFacts,
|
|
10
|
+
deriveAdoptOffer,
|
|
11
11
|
eventFamilies,
|
|
12
12
|
hasPersonFacts,
|
|
13
13
|
isPendingId,
|
|
14
14
|
launchPhaseOf,
|
|
15
15
|
matchProjectByCwd,
|
|
16
16
|
mayStillBeWorking,
|
|
17
|
+
noReviewFollowUpLine,
|
|
17
18
|
normalizeProjectName,
|
|
18
19
|
pendingId,
|
|
19
|
-
|
|
20
|
+
resumesOwnHarness,
|
|
20
21
|
serviceViewHostPort,
|
|
21
22
|
serviceViewStatus,
|
|
22
23
|
servicesHoldLine,
|
|
23
24
|
sessionWorkspaceLines,
|
|
25
|
+
submitDashboardAdoption,
|
|
26
|
+
takesReviewFollowUp,
|
|
24
27
|
withoutLaunchPhase,
|
|
25
28
|
workspaceLineList,
|
|
26
29
|
workspaceReadsOf,
|
|
27
30
|
worktreeJoinLine,
|
|
28
31
|
wrapWords
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-D4JBBLJV.js";
|
|
30
33
|
|
|
31
34
|
// src/dashboard.tsx
|
|
32
35
|
import { CliRenderEvents, createCliRenderer } from "@opentui/core";
|
|
@@ -40,27 +43,6 @@ import {
|
|
|
40
43
|
} from "@tanstack/react-query";
|
|
41
44
|
import { useEffect as useEffect3, useMemo as useMemo2, useRef as useRef2, useState as useState3, useSyncExternalStore } from "react";
|
|
42
45
|
|
|
43
|
-
// src/dashboard-adoption.ts
|
|
44
|
-
var deriveAdoptOffer = (facts) => {
|
|
45
|
-
if (facts.repoRoot === null || facts.originUrl === null || repositoryCloneUrlIssue(facts.originUrl) !== null)
|
|
46
|
-
return null;
|
|
47
|
-
return {
|
|
48
|
-
source: RepositoryCloneUrl.make(facts.originUrl),
|
|
49
|
-
name: normalizeProjectName(facts.repoRoot.split("/").at(-1) ?? "project"),
|
|
50
|
-
modeIndex: 0
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
var submitDashboardAdoption = async (api, input) => {
|
|
54
|
-
const issue = repositoryCloneUrlIssue(input.source);
|
|
55
|
-
if (issue !== null) return { kind: "invalid-source", message: issue };
|
|
56
|
-
const project = await api("POST", "/projects", {
|
|
57
|
-
name: input.name,
|
|
58
|
-
source: RepositoryCloneUrl.make(input.source),
|
|
59
|
-
gitAuthMode: input.gitAuthMode
|
|
60
|
-
});
|
|
61
|
-
return { kind: "adopted", project };
|
|
62
|
-
};
|
|
63
|
-
|
|
64
46
|
// src/dashboard-model.ts
|
|
65
47
|
var serviceRowOf = (view) => ({
|
|
66
48
|
id: view.service.id,
|
|
@@ -219,12 +201,15 @@ var pseudoGroup = (session, item) => ({
|
|
|
219
201
|
var deriveHarnesses = (resuming, joining = null) => {
|
|
220
202
|
if (resuming !== null) {
|
|
221
203
|
const others = Object.keys(HARNESS_COMMANDS).filter((h) => h !== resuming.harness);
|
|
222
|
-
|
|
204
|
+
const same2 = resumesOwnHarness(resuming.harness) ? [
|
|
223
205
|
{
|
|
224
206
|
harness: null,
|
|
225
207
|
label: resuming.harness,
|
|
226
208
|
hint: "same harness \xB7 native resume, conversation intact"
|
|
227
|
-
}
|
|
209
|
+
}
|
|
210
|
+
] : [];
|
|
211
|
+
return [
|
|
212
|
+
...same2,
|
|
228
213
|
...others.map(
|
|
229
214
|
(harness) => ({
|
|
230
215
|
harness,
|
|
@@ -1916,6 +1901,10 @@ function ReviewScreen({
|
|
|
1916
1901
|
};
|
|
1917
1902
|
const openSendEditor = () => {
|
|
1918
1903
|
if (data === void 0) return;
|
|
1904
|
+
if (!takesReviewFollowUp(session.harness)) {
|
|
1905
|
+
setStatus(noReviewFollowUpLine(session.harness));
|
|
1906
|
+
return;
|
|
1907
|
+
}
|
|
1919
1908
|
const sendable = data.comments.filter(
|
|
1920
1909
|
(comment) => comment.state === "open" && comment.sentToSessionId === null && !isPendingId(comment.id)
|
|
1921
1910
|
);
|
|
@@ -2375,7 +2364,7 @@ function ReviewScreen({
|
|
|
2375
2364
|
onSubmit: () => void submitEditor()
|
|
2376
2365
|
}
|
|
2377
2366
|
),
|
|
2378
|
-
/* @__PURE__ */ jsx("text", { height: 1, fg: status === "" ? FAINT : INK_2, bg: "transparent", children: status === "" ? ` m read \xB7 g suggest \xB7 t tour \xB7 ,/. tour stops \xB7 s draft review${data.followUp?.status === "pending" ? " \xB7 y deliver & relaunch" : ""} \xB7 o web \xB7 r refresh` : ` ${status}` }),
|
|
2367
|
+
/* @__PURE__ */ jsx("text", { height: 1, fg: status === "" ? FAINT : INK_2, bg: "transparent", children: status === "" ? ` m read \xB7 g suggest \xB7 t tour \xB7 ,/. tour stops${takesReviewFollowUp(session.harness) ? " \xB7 s draft review" : ""}${data.followUp?.status === "pending" ? " \xB7 y deliver & relaunch" : ""} \xB7 o web \xB7 r refresh` : ` ${status}` }),
|
|
2379
2368
|
/* @__PURE__ */ jsx("text", { height: 1, fg: FAINT, bg: "transparent", children: footer })
|
|
2380
2369
|
] })
|
|
2381
2370
|
);
|