@staff0rd/assist 0.1236.2 → 0.1239.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/allowed.cli-reads +2 -0
- package/dist/.build-files +27 -17
- package/dist/allowed.cli-reads +2 -0
- package/dist/built-version +1 -1
- package/dist/chunk-2ZTFSV2Z.js +50 -0
- package/dist/chunk-4CJXCOZS.js +39 -0
- package/dist/{chunk-HNLG7EJC.js → chunk-6AGXBSZL.js} +1 -1
- package/dist/chunk-7NVNACAR.js +35 -0
- package/dist/{chunk-WDSOVOXJ.js → chunk-HZDILABA.js} +1 -1
- package/dist/{chunk-S5IM25QR.js → chunk-JJOJ6NNT.js} +1 -1
- package/dist/chunk-W356VDGY.js +23 -0
- package/dist/{chunk-77KP3CTK.js → chunk-WEPXPOIF.js} +1 -1
- package/dist/chunk-XRWFZJJI.js +17 -0
- package/dist/{chunk-FVCGWLR4.js → chunk-ZHJV36LY.js} +1 -1
- package/dist/{chunk-NX2KZ5RW.js → chunk-ZONDAPT5.js} +2 -2
- package/dist/closeSession-CBSNK2SH.js +22 -0
- package/dist/commands/sessions/web/bundle.js +1 -1
- package/dist/{daemonStatus-EAZHBC6O.js → daemonStatus-AUHBSCVE.js} +3 -36
- package/dist/decideSession-QROGLJD6.js +132 -0
- package/dist/{doctorNodes-WP5YWRXP.js → doctorNodes-GLIMPERP.js} +3 -3
- package/dist/index.js +84 -25
- package/dist/interruptSession-B56EN6OH.js +27 -0
- package/dist/listSessions-7JRA3SZY.js +133 -0
- package/dist/renameSession-ZLYZCMBB.js +22 -0
- package/dist/{restartNode-YPEEQ7J6.js → restartNode-6R435AUB.js} +5 -5
- package/dist/{runDaemon-HT3DTL32.js → runDaemon-L2ZIIRVP.js} +69 -24
- package/dist/sendToSession-X4TGJVZY.js +61 -0
- package/dist/{sessionOutput-FHXQCMVC.js → sessionOutput-3QXHREND.js} +6 -14
- package/dist/sessionPreviews-KLHCZ2TA.js +77 -0
- package/dist/{signExtension-MVO3U3DE.js → signExtension-RDBHLWQM.js} +1 -1
- package/dist/{updateNode-35GYVT4L.js → updateNode-O7N2QLQM.js} +5 -5
- package/dist/{web-RFYNPA2L.js → web-TNX4IOCH.js} +5 -5
- package/dist/{web-QJUR24JS.js → web-WY2S2A24.js} +5 -5
- package/package.json +1 -1
- package/dist/closeSession-ECJ6TFRX.js +0 -30
- package/dist/renameSession-6OCEPFKV.js +0 -30
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parseQuestions
|
|
3
|
+
} from "./chunk-XRWFZJJI.js";
|
|
1
4
|
import {
|
|
2
5
|
cleanLeftoversEnabled,
|
|
3
6
|
currentDeclared,
|
|
@@ -131,7 +134,7 @@ import {
|
|
|
131
134
|
isHello,
|
|
132
135
|
linkVersionCheck,
|
|
133
136
|
negotiateProtocol
|
|
134
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-6AGXBSZL.js";
|
|
135
138
|
import {
|
|
136
139
|
loadLinkSpecs
|
|
137
140
|
} from "./chunk-P7QEHVJJ.js";
|
|
@@ -274,7 +277,7 @@ import {
|
|
|
274
277
|
import "./chunk-APZ6ZTDA.js";
|
|
275
278
|
import "./chunk-K4DJEFDZ.js";
|
|
276
279
|
import "./chunk-D7UZLH36.js";
|
|
277
|
-
import "./chunk-
|
|
280
|
+
import "./chunk-HZDILABA.js";
|
|
278
281
|
import "./chunk-EW2ZM2PC.js";
|
|
279
282
|
import "./chunk-OTSOBFW2.js";
|
|
280
283
|
import {
|
|
@@ -2988,6 +2991,18 @@ function flushPendingPrompts(session, write) {
|
|
|
2988
2991
|
return true;
|
|
2989
2992
|
}
|
|
2990
2993
|
|
|
2994
|
+
// src/commands/sessions/daemon/typeKeysIntoSession.ts
|
|
2995
|
+
function typeKeysIntoSession(sessions, id, keys, write) {
|
|
2996
|
+
const session = sessions.get(id);
|
|
2997
|
+
if (!session)
|
|
2998
|
+
return { ok: false, message: `assist session ${id} was not found` };
|
|
2999
|
+
if (session.status === "done" || !session.pty)
|
|
3000
|
+
return { ok: false, message: `assist session ${id} has ended` };
|
|
3001
|
+
write(id, keys);
|
|
3002
|
+
daemonLog(`session ${id} typed keys: ${JSON.stringify(keys)}`);
|
|
3003
|
+
return { ok: true, message: `Sent keys to assist session ${id}` };
|
|
3004
|
+
}
|
|
3005
|
+
|
|
2991
3006
|
// src/commands/sessions/daemon/typePromptIntoSession.ts
|
|
2992
3007
|
function typePromptIntoSession(sessions, id, text, write) {
|
|
2993
3008
|
const session = sessions.get(id);
|
|
@@ -3216,6 +3231,9 @@ var SessionIo = class {
|
|
|
3216
3231
|
if ("queued" in result && result.queued) this.notify();
|
|
3217
3232
|
return typePromptReply(id, result);
|
|
3218
3233
|
}
|
|
3234
|
+
typeKeys(id, keys) {
|
|
3235
|
+
return typeKeysIntoSession(this.sessions, id, keys, this.writeAsDaemon);
|
|
3236
|
+
}
|
|
3219
3237
|
async typePromptToLastWriter(target, text) {
|
|
3220
3238
|
const id = await findDocsSession(this.sessions, target);
|
|
3221
3239
|
if (!id)
|
|
@@ -5186,14 +5204,6 @@ function midPlanCheckAnswers(body) {
|
|
|
5186
5204
|
|
|
5187
5205
|
// src/commands/sessions/daemon/recommendedAnswers.ts
|
|
5188
5206
|
var RECOMMENDED = "(Recommended)";
|
|
5189
|
-
function parseQuestions(body) {
|
|
5190
|
-
try {
|
|
5191
|
-
const parsed = askQuestionInputSchema.safeParse(JSON.parse(body));
|
|
5192
|
-
return parsed.success ? parsed.data.questions : void 0;
|
|
5193
|
-
} catch {
|
|
5194
|
-
return void 0;
|
|
5195
|
-
}
|
|
5196
|
-
}
|
|
5197
5207
|
function recommendedAnswers(body) {
|
|
5198
5208
|
const questions = parseQuestions(body);
|
|
5199
5209
|
if (!questions) return void 0;
|
|
@@ -8436,6 +8446,7 @@ var relays = {
|
|
|
8436
8446
|
"session-transcript": relayWithNodeSessionId,
|
|
8437
8447
|
transcript: relayReply,
|
|
8438
8448
|
dequeued: relayReply,
|
|
8449
|
+
"type-prompt-result": relayReply,
|
|
8439
8450
|
limits: (state, msg) => state.onLimits(
|
|
8440
8451
|
msg.harness,
|
|
8441
8452
|
msg.rateLimits
|
|
@@ -9972,7 +9983,7 @@ var handleDismiss = routed((_client, m, d) => {
|
|
|
9972
9983
|
m.dismissSession(d.sessionId, closeServerRuns);
|
|
9973
9984
|
});
|
|
9974
9985
|
|
|
9975
|
-
// src/commands/sessions/daemon/links/
|
|
9986
|
+
// src/commands/sessions/daemon/links/routeToLinkedSession.ts
|
|
9976
9987
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
9977
9988
|
function unavailable(links, node) {
|
|
9978
9989
|
const status = links.nodes().links.find((link) => link.name === node);
|
|
@@ -9982,25 +9993,31 @@ function unavailable(links, node) {
|
|
|
9982
9993
|
const detail = status.error ? `: ${status.error}` : "";
|
|
9983
9994
|
return `${node} link is ${status.state}${detail}; run assist sessions nodes doctor ${node}`;
|
|
9984
9995
|
}
|
|
9985
|
-
function
|
|
9996
|
+
function routeToLinkedSession(client, links, data, refusal) {
|
|
9986
9997
|
const sessionId = data.sessionId;
|
|
9987
|
-
|
|
9998
|
+
if (typeof sessionId !== "string") return data;
|
|
9999
|
+
const split = splitNodeSessionId(sessionId);
|
|
9988
10000
|
if (!split) return data;
|
|
9989
10001
|
if (split.node === links.localNode()) return { ...data, sessionId: split.id };
|
|
9990
10002
|
const reason6 = unavailable(links, split.node);
|
|
9991
10003
|
if (reason6) {
|
|
9992
|
-
daemonLog(
|
|
9993
|
-
sendTo(client,
|
|
9994
|
-
type: "session-output",
|
|
9995
|
-
sessionId,
|
|
9996
|
-
error: `Cannot read session ${sessionId}: ${reason6}`
|
|
9997
|
-
});
|
|
10004
|
+
daemonLog(`${data.type} requested: id=${sessionId} ${reason6}`);
|
|
10005
|
+
sendTo(client, refusal(sessionId, reason6));
|
|
9998
10006
|
return void 0;
|
|
9999
10007
|
}
|
|
10000
10008
|
links.route(client, { ...data, requestId: data.requestId ?? randomUUID2() });
|
|
10001
10009
|
return void 0;
|
|
10002
10010
|
}
|
|
10003
10011
|
|
|
10012
|
+
// src/commands/sessions/daemon/links/routeOutputToLink.ts
|
|
10013
|
+
function routeOutputToLink(client, links, data) {
|
|
10014
|
+
return routeToLinkedSession(client, links, data, (sessionId, reason6) => ({
|
|
10015
|
+
type: "session-output",
|
|
10016
|
+
sessionId,
|
|
10017
|
+
error: `Cannot read session ${sessionId}: ${reason6}`
|
|
10018
|
+
}));
|
|
10019
|
+
}
|
|
10020
|
+
|
|
10004
10021
|
// src/commands/sessions/daemon/latestServerRun.ts
|
|
10005
10022
|
function latestServerRun(sessions, origin, group) {
|
|
10006
10023
|
const live = liveServerRun(sessions, { server: true, origin, group });
|
|
@@ -10113,12 +10130,39 @@ function handleSetStatus(client, m, d) {
|
|
|
10113
10130
|
// src/commands/sessions/daemon/handleSubscribeLogs.ts
|
|
10114
10131
|
var handleSubscribeLogs = (client, m, d) => m.clients.subscribeLogs(client, d.replay !== false, d.webServer === true);
|
|
10115
10132
|
|
|
10133
|
+
// src/commands/sessions/daemon/typeIntoSessionHandler.ts
|
|
10134
|
+
function typeIntoSessionHandler(label, typeInto) {
|
|
10135
|
+
return (client, m, request) => {
|
|
10136
|
+
const requestId = request.requestId;
|
|
10137
|
+
const d = routeToLinkedSession(
|
|
10138
|
+
client,
|
|
10139
|
+
m.links,
|
|
10140
|
+
request,
|
|
10141
|
+
(sessionId, reason6) => ({
|
|
10142
|
+
type: "type-prompt-result",
|
|
10143
|
+
ok: false,
|
|
10144
|
+
message: `Cannot reach session ${sessionId}: ${reason6}`,
|
|
10145
|
+
requestId
|
|
10146
|
+
})
|
|
10147
|
+
);
|
|
10148
|
+
if (!d) return;
|
|
10149
|
+
const reply = typeInto(m, String(d.sessionId), String(d.text ?? ""));
|
|
10150
|
+
if (!reply.ok) daemonLog(`${label} refused: ${reply.message}`);
|
|
10151
|
+
sendTo(client, { type: "type-prompt-result", ...reply, requestId });
|
|
10152
|
+
};
|
|
10153
|
+
}
|
|
10154
|
+
|
|
10155
|
+
// src/commands/sessions/daemon/handleTypeKeys.ts
|
|
10156
|
+
var handleTypeKeys = typeIntoSessionHandler(
|
|
10157
|
+
"type-keys",
|
|
10158
|
+
(m, id, keys) => m.io.typeKeys(id, keys)
|
|
10159
|
+
);
|
|
10160
|
+
|
|
10116
10161
|
// src/commands/sessions/daemon/handleTypePrompt.ts
|
|
10117
|
-
var handleTypePrompt = (
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
};
|
|
10162
|
+
var handleTypePrompt = typeIntoSessionHandler(
|
|
10163
|
+
"type-prompt",
|
|
10164
|
+
(m, id, text) => m.io.typePrompt(id, text)
|
|
10165
|
+
);
|
|
10122
10166
|
|
|
10123
10167
|
// src/commands/sessions/daemon/handleTypePromptToWriter.ts
|
|
10124
10168
|
var handleTypePromptToWriter = (client, m, d) => {
|
|
@@ -11080,6 +11124,7 @@ var messageHandlers = {
|
|
|
11080
11124
|
...viewerHandlers,
|
|
11081
11125
|
...pinHandlers,
|
|
11082
11126
|
"type-prompt": handleTypePrompt,
|
|
11127
|
+
"type-keys": handleTypeKeys,
|
|
11083
11128
|
"sdk-launch": handleSdkLaunch,
|
|
11084
11129
|
"sdk-shell": handleSdkShell,
|
|
11085
11130
|
"sdk-shell-stop": handleSdkShellStop,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withDaemonConnection
|
|
3
|
+
} from "./chunk-W356VDGY.js";
|
|
4
|
+
import {
|
|
5
|
+
readDaemonMessage
|
|
6
|
+
} from "./chunk-NH33OKZQ.js";
|
|
7
|
+
import "./chunk-Q6PZLPK4.js";
|
|
8
|
+
import "./chunk-JJKKIBF5.js";
|
|
9
|
+
|
|
10
|
+
// src/commands/sessions/daemon/requestTypeIntoSession.ts
|
|
11
|
+
import { randomUUID } from "crypto";
|
|
12
|
+
var TYPE_TIMEOUT_MS = 1e4;
|
|
13
|
+
function requestTypeIntoSession(request) {
|
|
14
|
+
return withDaemonConnection((socket, lines) => {
|
|
15
|
+
const requestId = randomUUID();
|
|
16
|
+
const reply = readDaemonMessage(
|
|
17
|
+
lines,
|
|
18
|
+
TYPE_TIMEOUT_MS,
|
|
19
|
+
{ ok: false, message: "Timed out waiting for the sessions daemon" },
|
|
20
|
+
(data) => data.type === "type-prompt-result" && data.requestId === requestId ? { ok: data.ok === true, message: String(data.message ?? "") } : void 0
|
|
21
|
+
);
|
|
22
|
+
socket.write(`${JSON.stringify({ ...request, requestId })}
|
|
23
|
+
`);
|
|
24
|
+
return reply;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// src/commands/sessions/send/decodeKeys.ts
|
|
29
|
+
var NAMED = {
|
|
30
|
+
r: "\r",
|
|
31
|
+
n: "\n",
|
|
32
|
+
t: " ",
|
|
33
|
+
e: "\x1B",
|
|
34
|
+
"\\": "\\"
|
|
35
|
+
};
|
|
36
|
+
function decodeKeys(keys) {
|
|
37
|
+
return keys.replace(
|
|
38
|
+
/\\(x[0-9a-fA-F]{2}|[rnte\\])/g,
|
|
39
|
+
(_, code) => code.startsWith("x") ? String.fromCharCode(Number.parseInt(code.slice(1), 16)) : NAMED[code]
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// src/commands/sessions/send/sendToSession.ts
|
|
44
|
+
async function sendToSession(sessionId, text, options) {
|
|
45
|
+
try {
|
|
46
|
+
const reply = await requestTypeIntoSession(
|
|
47
|
+
options.keys ? { type: "type-keys", sessionId, text: decodeKeys(text) } : { type: "type-prompt", sessionId, text }
|
|
48
|
+
);
|
|
49
|
+
if (reply.ok) console.log(reply.message);
|
|
50
|
+
else fail(reply.message);
|
|
51
|
+
} catch (error) {
|
|
52
|
+
fail(error instanceof Error ? error.message : String(error));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function fail(message) {
|
|
56
|
+
console.error(message);
|
|
57
|
+
process.exitCode = 1;
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
sendToSession
|
|
61
|
+
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withDaemonConnection
|
|
3
|
+
} from "./chunk-W356VDGY.js";
|
|
1
4
|
import {
|
|
2
5
|
readDaemonMessage
|
|
3
6
|
} from "./chunk-NH33OKZQ.js";
|
|
@@ -9,22 +12,13 @@ import {
|
|
|
9
12
|
} from "./chunk-GRXFWFGP.js";
|
|
10
13
|
import "./chunk-TVQY3HPZ.js";
|
|
11
14
|
import "./chunk-WXQ3EA5H.js";
|
|
12
|
-
import
|
|
13
|
-
connectToDaemon
|
|
14
|
-
} from "./chunk-Q6PZLPK4.js";
|
|
15
|
+
import "./chunk-Q6PZLPK4.js";
|
|
15
16
|
import "./chunk-JJKKIBF5.js";
|
|
16
17
|
|
|
17
18
|
// src/commands/sessions/daemon/requestSessionOutput.ts
|
|
18
|
-
import { createInterface } from "readline";
|
|
19
19
|
var OUTPUT_TIMEOUT_MS = 5e3;
|
|
20
20
|
async function requestSessionOutput(target) {
|
|
21
|
-
|
|
22
|
-
throw new Error("No sessions daemon is running");
|
|
23
|
-
});
|
|
24
|
-
try {
|
|
25
|
-
const lines = createInterface({ input: socket });
|
|
26
|
-
lines.on("error", () => {
|
|
27
|
-
});
|
|
21
|
+
return withDaemonConnection(async (socket, lines) => {
|
|
28
22
|
const reply = readDaemonMessage(
|
|
29
23
|
lines,
|
|
30
24
|
OUTPUT_TIMEOUT_MS,
|
|
@@ -36,9 +30,7 @@ async function requestSessionOutput(target) {
|
|
|
36
30
|
const { sessionId, scrollback, exited, error } = await reply;
|
|
37
31
|
if (scrollback === void 0) throw new Error(error);
|
|
38
32
|
return { sessionId, scrollback, exited };
|
|
39
|
-
}
|
|
40
|
-
socket.destroy();
|
|
41
|
-
}
|
|
33
|
+
});
|
|
42
34
|
}
|
|
43
35
|
|
|
44
36
|
// src/commands/sessions/lastLines.ts
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import {
|
|
2
|
+
failWith,
|
|
3
|
+
findDaemonSession
|
|
4
|
+
} from "./chunk-7NVNACAR.js";
|
|
5
|
+
import {
|
|
6
|
+
parseQuestions
|
|
7
|
+
} from "./chunk-XRWFZJJI.js";
|
|
8
|
+
import "./chunk-4CJXCOZS.js";
|
|
9
|
+
import {
|
|
10
|
+
askCheckInputSchema
|
|
11
|
+
} from "./chunk-OLE7XSNB.js";
|
|
12
|
+
import "./chunk-2MG2THMQ.js";
|
|
13
|
+
import "./chunk-Q6PZLPK4.js";
|
|
14
|
+
import "./chunk-JJKKIBF5.js";
|
|
15
|
+
|
|
16
|
+
// src/commands/sessions/previews/formatPreview.ts
|
|
17
|
+
function questionLines(body) {
|
|
18
|
+
const questions = parseQuestions(body);
|
|
19
|
+
if (!questions) return void 0;
|
|
20
|
+
return questions.flatMap((q, i) => [
|
|
21
|
+
`${i + 1}. [${q.header}] ${q.question}${q.multiSelect ? " (choose any)" : ""}`,
|
|
22
|
+
...q.context ? [` ${q.context}`] : [],
|
|
23
|
+
...q.options.map(
|
|
24
|
+
(o) => ` - ${o.label}${o.description ? `: ${o.description}` : ""}`
|
|
25
|
+
)
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
function checkLines(body) {
|
|
29
|
+
try {
|
|
30
|
+
const parsed = askCheckInputSchema.safeParse(JSON.parse(body));
|
|
31
|
+
if (!parsed.success) return void 0;
|
|
32
|
+
const { before, steps, changed } = parsed.data;
|
|
33
|
+
return [
|
|
34
|
+
...changed ? [`Changed: ${changed}`] : [],
|
|
35
|
+
...before?.length ? [`Before: ${before.join("; ")}`] : [],
|
|
36
|
+
...steps.map((step, i) => `${i + 1}. ${step}`)
|
|
37
|
+
];
|
|
38
|
+
} catch {
|
|
39
|
+
return void 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function bodyLines(preview) {
|
|
43
|
+
if (preview.kind === "question")
|
|
44
|
+
return questionLines(preview.body) ?? [preview.body];
|
|
45
|
+
if (preview.kind === "check")
|
|
46
|
+
return checkLines(preview.body) ?? [preview.body];
|
|
47
|
+
return [preview.body];
|
|
48
|
+
}
|
|
49
|
+
function formatPreview(preview) {
|
|
50
|
+
return [
|
|
51
|
+
`Kind: ${preview.kind ?? "pr"}`,
|
|
52
|
+
`Title: ${preview.title}`,
|
|
53
|
+
"",
|
|
54
|
+
...bodyLines(preview)
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// src/commands/sessions/previews/sessionPreviews.ts
|
|
59
|
+
async function sessionPreviews(sessionId, options) {
|
|
60
|
+
try {
|
|
61
|
+
const preview = (await findDaemonSession(sessionId)).pendingPrPreview;
|
|
62
|
+
if (options.json) {
|
|
63
|
+
console.log(JSON.stringify(preview ?? null, null, 2));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (!preview) {
|
|
67
|
+
console.log(`Session ${sessionId} has no pending preview.`);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
for (const line of formatPreview(preview)) console.log(line);
|
|
71
|
+
} catch (error) {
|
|
72
|
+
failWith(error);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
sessionPreviews
|
|
77
|
+
};
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
linkStatus,
|
|
3
3
|
postToPeer,
|
|
4
4
|
startPeerAction
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-JJOJ6NNT.js";
|
|
6
|
+
import "./chunk-WEPXPOIF.js";
|
|
7
|
+
import "./chunk-ZHJV36LY.js";
|
|
8
8
|
import "./chunk-VABNWHSE.js";
|
|
9
9
|
import "./chunk-DS2YJZZY.js";
|
|
10
10
|
import "./chunk-4HKB2TAG.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-6AGXBSZL.js";
|
|
12
12
|
import "./chunk-P7QEHVJJ.js";
|
|
13
13
|
import "./chunk-MKBZCWWG.js";
|
|
14
14
|
import "./chunk-B7VOTF5Q.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-A7ONLVZD.js";
|
|
20
20
|
import "./chunk-GIHVMELY.js";
|
|
21
21
|
import "./chunk-2EW62DM5.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-HZDILABA.js";
|
|
23
23
|
import "./chunk-XNIKOBRH.js";
|
|
24
24
|
import "./chunk-LU67AKT5.js";
|
|
25
25
|
import "./chunk-GRXFWFGP.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
web
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZONDAPT5.js";
|
|
4
4
|
import "./chunk-SURCYYQ6.js";
|
|
5
5
|
import "./chunk-JNCFHWBK.js";
|
|
6
6
|
import "./chunk-JM57BCD6.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-WEPXPOIF.js";
|
|
8
|
+
import "./chunk-ZHJV36LY.js";
|
|
9
9
|
import "./chunk-VABNWHSE.js";
|
|
10
10
|
import "./chunk-DS2YJZZY.js";
|
|
11
11
|
import "./chunk-6Y6FYABI.js";
|
|
12
12
|
import "./chunk-3ZHTSOYH.js";
|
|
13
13
|
import "./chunk-4HKB2TAG.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-6AGXBSZL.js";
|
|
15
15
|
import "./chunk-P7QEHVJJ.js";
|
|
16
16
|
import "./chunk-MKBZCWWG.js";
|
|
17
17
|
import "./chunk-B7VOTF5Q.js";
|
|
@@ -140,7 +140,7 @@ import "./chunk-E577GGQS.js";
|
|
|
140
140
|
import "./chunk-APZ6ZTDA.js";
|
|
141
141
|
import "./chunk-K4DJEFDZ.js";
|
|
142
142
|
import "./chunk-D7UZLH36.js";
|
|
143
|
-
import "./chunk-
|
|
143
|
+
import "./chunk-HZDILABA.js";
|
|
144
144
|
import "./chunk-LPJWLKEX.js";
|
|
145
145
|
import "./chunk-YVL3NXEB.js";
|
|
146
146
|
import "./chunk-UEWARAPX.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
web
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZONDAPT5.js";
|
|
4
4
|
import "./chunk-SURCYYQ6.js";
|
|
5
5
|
import "./chunk-JNCFHWBK.js";
|
|
6
6
|
import "./chunk-JM57BCD6.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-WEPXPOIF.js";
|
|
8
|
+
import "./chunk-ZHJV36LY.js";
|
|
9
9
|
import "./chunk-VABNWHSE.js";
|
|
10
10
|
import "./chunk-DS2YJZZY.js";
|
|
11
11
|
import "./chunk-6Y6FYABI.js";
|
|
12
12
|
import "./chunk-3ZHTSOYH.js";
|
|
13
13
|
import "./chunk-4HKB2TAG.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-6AGXBSZL.js";
|
|
15
15
|
import "./chunk-P7QEHVJJ.js";
|
|
16
16
|
import "./chunk-MKBZCWWG.js";
|
|
17
17
|
import "./chunk-B7VOTF5Q.js";
|
|
@@ -140,7 +140,7 @@ import "./chunk-E577GGQS.js";
|
|
|
140
140
|
import "./chunk-APZ6ZTDA.js";
|
|
141
141
|
import "./chunk-K4DJEFDZ.js";
|
|
142
142
|
import "./chunk-D7UZLH36.js";
|
|
143
|
-
import "./chunk-
|
|
143
|
+
import "./chunk-HZDILABA.js";
|
|
144
144
|
import "./chunk-LPJWLKEX.js";
|
|
145
145
|
import "./chunk-YVL3NXEB.js";
|
|
146
146
|
import "./chunk-UEWARAPX.js";
|
package/package.json
CHANGED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
sendToDaemon
|
|
3
|
-
} from "./chunk-V3AWLJ7P.js";
|
|
4
|
-
import {
|
|
5
|
-
inWebSession
|
|
6
|
-
} from "./chunk-HKGCLAZ7.js";
|
|
7
|
-
import {
|
|
8
|
-
appendDaemonLog
|
|
9
|
-
} from "./chunk-5H7EHZ3J.js";
|
|
10
|
-
import "./chunk-Q6PZLPK4.js";
|
|
11
|
-
import "./chunk-JJKKIBF5.js";
|
|
12
|
-
|
|
13
|
-
// src/commands/sessions/closeSession.ts
|
|
14
|
-
async function closeSession() {
|
|
15
|
-
if (!inWebSession()) {
|
|
16
|
-
console.log("No daemon-managed session to close.");
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
20
|
-
try {
|
|
21
|
-
await sendToDaemon({ type: "dismiss", sessionId, closeServerRuns: true });
|
|
22
|
-
} catch (error) {
|
|
23
|
-
appendDaemonLog(
|
|
24
|
-
`close send failed: id=${sessionId}: ${error instanceof Error ? error.message : String(error)}`
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
closeSession
|
|
30
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
sendToDaemon
|
|
3
|
-
} from "./chunk-V3AWLJ7P.js";
|
|
4
|
-
import {
|
|
5
|
-
inWebSession
|
|
6
|
-
} from "./chunk-HKGCLAZ7.js";
|
|
7
|
-
import {
|
|
8
|
-
appendDaemonLog
|
|
9
|
-
} from "./chunk-5H7EHZ3J.js";
|
|
10
|
-
import "./chunk-Q6PZLPK4.js";
|
|
11
|
-
import "./chunk-JJKKIBF5.js";
|
|
12
|
-
|
|
13
|
-
// src/commands/sessions/renameSession.ts
|
|
14
|
-
async function renameSession(title) {
|
|
15
|
-
if (!inWebSession()) {
|
|
16
|
-
console.log("No daemon-managed session to rename.");
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
20
|
-
try {
|
|
21
|
-
await sendToDaemon({ type: "rename", sessionId, title });
|
|
22
|
-
} catch (error) {
|
|
23
|
-
appendDaemonLog(
|
|
24
|
-
`rename send failed: id=${sessionId}: ${error instanceof Error ? error.message : String(error)}`
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
renameSession
|
|
30
|
-
};
|