cueloop 0.1.0-alpha.39 → 0.1.0-alpha.40
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cueloop",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.40",
|
|
4
4
|
"description": "Terminal review surface for coding agents: annotate plans and diffs, return a verdict, send structured feedback back",
|
|
5
5
|
"homepage": "https://github.com/mmurakaru/cueloop#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@cueloop/adapters": "0.1.0-alpha.
|
|
31
|
-
"@cueloop/client": "0.1.0-alpha.
|
|
32
|
-
"@cueloop/daemon": "0.1.0-alpha.
|
|
33
|
-
"@cueloop/schema": "0.1.0-alpha.
|
|
30
|
+
"@cueloop/adapters": "0.1.0-alpha.40",
|
|
31
|
+
"@cueloop/client": "0.1.0-alpha.40",
|
|
32
|
+
"@cueloop/daemon": "0.1.0-alpha.40",
|
|
33
|
+
"@cueloop/schema": "0.1.0-alpha.40"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
36
|
"bun": ">=1.3.0"
|
package/src/actions-command.ts
CHANGED
|
@@ -17,7 +17,8 @@ export async function actionsCommand(argv: string[]): Promise<number> {
|
|
|
17
17
|
console.error("usage: cueloop actions list [--session <id>]");
|
|
18
18
|
return 2;
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const role = stringFlag(flags, "role") === "agent" ? "agent" : undefined;
|
|
21
|
+
const repoRoot = await repoRootForSession(stringFlag(flags, "session"), role);
|
|
21
22
|
const actions = loadConfig({ repoRoot }).actions;
|
|
22
23
|
const numbered = actions.map((action, index) => ({
|
|
23
24
|
index: index + 1,
|
|
@@ -29,9 +30,12 @@ export async function actionsCommand(argv: string[]): Promise<number> {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
/** The repo the given session lives in, or the caller's cwd when no session is named. */
|
|
32
|
-
async function repoRootForSession(
|
|
33
|
+
async function repoRootForSession(
|
|
34
|
+
sessionId: string | undefined,
|
|
35
|
+
role: "agent" | undefined,
|
|
36
|
+
): Promise<string> {
|
|
33
37
|
if (sessionId === undefined) return process.cwd();
|
|
34
|
-
const client = await DaemonClient.connect({ autostart: true });
|
|
38
|
+
const client = await DaemonClient.connect({ autostart: true, role });
|
|
35
39
|
try {
|
|
36
40
|
return (await client.sessionGet(sessionId)).workspace.repoRoot;
|
|
37
41
|
} finally {
|
package/src/session-commands.ts
CHANGED
|
@@ -22,7 +22,10 @@ function out(value: unknown): void {
|
|
|
22
22
|
export async function sessionCommand(argv: string[]): Promise<number> {
|
|
23
23
|
const { positional, flags } = parseArgs(argv);
|
|
24
24
|
const verb = positional[0];
|
|
25
|
-
|
|
25
|
+
// --role agent (or collaborator) caps this connection to read + annotate; a
|
|
26
|
+
// review-side agent passes it so the daemon rejects any escalation attempt.
|
|
27
|
+
const role = stringFlag(flags, "role") === "agent" ? "agent" : undefined;
|
|
28
|
+
const client = await DaemonClient.connect({ autostart: true, role });
|
|
26
29
|
try {
|
|
27
30
|
switch (verb) {
|
|
28
31
|
case "create": {
|