@phnx-labs/agents-cli 1.23.42 → 1.23.44
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/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/dist/commands/cloud-transcripts.js +31 -12
- package/dist/commands/cloud.js +6 -17
- package/dist/commands/exec.js +2 -1
- package/dist/lib/agent-modes.js +1 -0
- package/dist/lib/agent-spec/agents.js +1 -1
- package/dist/lib/cloud/dispatch.d.ts +1 -1
- package/dist/lib/cloud/dispatch.js +3 -10
- package/dist/lib/cloud/registry.d.ts +2 -0
- package/dist/lib/cloud/registry.js +7 -1
- package/dist/lib/cloud/rush.d.ts +10 -33
- package/dist/lib/cloud/rush.js +151 -300
- package/dist/lib/cloud/stream.js +8 -6
- package/dist/lib/cloud/types.d.ts +4 -6
- package/dist/lib/cloud/types.js +4 -1
- package/dist/lib/daemon/session-state-service.d.ts +6 -1
- package/dist/lib/daemon/session-state-service.js +38 -1
- package/dist/lib/devices/connect.d.ts +1 -0
- package/dist/lib/devices/connect.js +3 -1
- package/dist/lib/devices/health.d.ts +3 -0
- package/dist/lib/devices/health.js +14 -2
- package/dist/lib/exec.d.ts +1 -1
- package/dist/lib/exec.js +2 -1
- package/dist/lib/github/project-prs.d.ts +1 -0
- package/dist/lib/github/project-prs.js +44 -8
- package/dist/lib/identity/client.d.ts +1 -1
- package/dist/lib/identity/client.js +1 -1
- package/dist/lib/session/discover.d.ts +4 -0
- package/dist/lib/session/discover.js +39 -1
- package/dist/lib/session/presentation.d.ts +3 -0
- package/dist/lib/session/presentation.js +4 -1
- package/dist/lib/ssh-exec.d.ts +2 -0
- package/dist/lib/ssh-exec.js +12 -2
- package/package.json +1 -1
- package/dist/lib/rush-session.d.ts +0 -1
- package/dist/lib/rush-session.js +0 -5
- package/dist/lib/session/cloud.d.ts +0 -5
- package/dist/lib/session/cloud.js +0 -89
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.23.44
|
|
4
|
+
|
|
5
|
+
- **Phoenix ID's default host is now `id.phoenix.so` (PHNX-4424).** `agents auth login`, `whoami` and `logout`, and a session-backup Worker set up from now on, talk to `https://id.phoenix.so` unless `PHOENIX_ID_BASE` says otherwise; a Worker set up earlier keeps checking `id.byphoenix.com`, which still serves. `id.byphoenix.com` keeps serving, and a session signed in through either host is valid at both, so existing sign-ins keep working. Source: `cli/src/lib/identity/client.ts`.
|
|
6
|
+
|
|
7
|
+
- **Far devices are no longer marked unreachable.** The device probe opened a new SSH connection every time, and a cold handshake to a peer 300 ms away takes 3.4–3.8 s, past its 2.5 s budget. `agents devices status`, AGI EXT's device list and `--device auto` therefore treated such boxes as unreachable and placed runs on the launching machine. The load probe now reuses the shared SSH connection other fleet commands keep open, which answers in 0.6–0.9 s, and a timed-out probe warms that connection in the background for the next one. The budgets are unchanged. Source: `cli/src/lib/devices/health.ts`, `cli/src/lib/devices/connect.ts`.
|
|
8
|
+
|
|
9
|
+
- **`agents projects prs list <project>` returns in about half the time on a repository with many open PRs.** GitHub works out each PR's merge state (`mergeStateStatus`) when asked, so the one paginated GraphQL list of 100 PRs a page spent about 3 s per page on that field alone, one page after another. The list now asks only for the open PR numbers, then reads the PRs 10 to a query, at most 12 queries at a time across every repository the process reads (each costs 1 GraphQL point). On `phnx-labs/agents` (115 open PRs) the command went from 5.9 s to 3.0 s (median of 5 runs each), and the JSON is byte-identical. Source: `cli/src/lib/github/project-prs.ts` (`listOpenPrs`).
|
|
10
|
+
|
|
11
|
+
## 1.23.43
|
|
12
|
+
|
|
13
|
+
- **`agents cloud --provider rush` uses a Rush API key, not the deprecated `rush login` (PHNX-4381).** The provider and `agents cloud transcripts` now call the Rush developer API (`/o/{org}/sessions`: start, read, list, `…/events`, `…/messages`, `…/cancel`) with `RUSH_API_KEY` and `RUSH_ORG`, read from the secrets bundle named in `cloud.providers.rush.secretsBundle` or from the environment (`secrets exec getrush.ai -- agents cloud run …`). Nothing reads `~/.rush/user.yaml` any more. A run no longer needs `--repo`; it takes one repository (sent with `--branch` as a `tree/<branch>` resource), and two `--repo` flags are refused. `--skill` takes a public skill URL. `agents cloud run` loses `--mode`, `-b/--balanced` and `--strategy`, which only the old Rush path read: a key run uses the key creator's own model accounts, and `agents run --cloud --mode …` to Rush is refused. Source: `cli/src/lib/cloud/rush.ts`, `cli/src/commands/cloud-transcripts.ts`.
|
|
14
|
+
|
|
15
|
+
- **`--mode auto` on Grok runs Grok's own auto mode instead of a flagless run that dies headless.** Grok's spec listed no `auto` mode, so `resolveMode` turned `auto` into `edit`, which passes Grok no permission flag. A headless `grok -p` run then asked before most shell commands, had nobody to answer, and got "User cancelled" on the first one, cancelling every later tool and exiting 0 about a minute in. Every Finder "Variations · Soft" run since the action moved to `grok#socials` ended this way. `auto` now passes Grok's native `--permission-mode auto` (the flag string Claude's `auto` also gets), which runs ordinary shell commands headless, and a headless `plan` request for Grok downgrades to that `auto` rather than to `edit`. Source: `cli/src/lib/agent-spec/agents.ts`, `cli/src/lib/exec.ts`.
|
|
16
|
+
|
|
3
17
|
## 1.23.42
|
|
4
18
|
|
|
5
19
|
- **A session that reconnects after an ssh drop keeps its editor tab.** `agents run --device` exports `AGENT_TERMINAL_ID`, `AGENTS_ORIGIN_TERMINAL_ID` and `AGENTS_ORIGIN_DEVICE` so the remote session's row links back to the tab it was launched from. The automatic reattach after a dropped connection (`agents ps focus --reconnect-reattach`) ran without them, so the reattached session had no tab. The extension then saw a running session with no tab here, resumed it, and started a second Claude on the same conversation (owner video, 2026-10-19). The reattach now runs behind the same `remoteRunShellPrelude` as the launch. Source: `cli/src/lib/hosts/reconnect.ts`, `cli/src/commands/exec.ts`.
|
package/README.md
CHANGED
|
@@ -243,7 +243,7 @@ Supports plan (read-only), edit, auto, and skip modes, effort levels, JSON outpu
|
|
|
243
243
|
Treat `skip` as a last-resort escape hatch. In direct-exec runs (without `--acp`),
|
|
244
244
|
agi-cli forwards the harness's native no-prompt flag; it does not add another
|
|
245
245
|
safety layer. Prefer `auto` where it adds a safer automatic policy (smart classifier
|
|
246
|
-
on Claude/Copilot, never-prompt over a sandbox on Codex, native high-auto mode on
|
|
246
|
+
on Claude/Copilot, Grok's native auto mode, never-prompt over a sandbox on Codex, native high-auto mode on
|
|
247
247
|
Droid, or interactive Kimi), or `edit` everywhere else. For headless Kimi, `edit`, `auto`, and `skip` all use the same
|
|
248
248
|
already-auto-approved `-p` behavior, so prefer `edit` rather than signaling a blanket
|
|
249
249
|
bypass. Harnesses without a native bypass flag reject direct-exec `skip`.
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { setHelpSections } from '../lib/help.js';
|
|
3
3
|
import { interruptibleSpinner } from '../lib/spinner.js';
|
|
4
|
+
import { deriveShortId } from '../lib/text/short-id.js';
|
|
4
5
|
const DEFAULT_LIMIT = '50';
|
|
6
|
+
function cloudTaskSessionMeta(task) {
|
|
7
|
+
if (task.agent !== 'claude' && task.agent !== 'codex' && task.agent !== 'opencode')
|
|
8
|
+
return null;
|
|
9
|
+
return {
|
|
10
|
+
id: task.id,
|
|
11
|
+
shortId: deriveShortId(task.id),
|
|
12
|
+
agent: task.agent,
|
|
13
|
+
timestamp: task.createdAt,
|
|
14
|
+
project: task.repo,
|
|
15
|
+
filePath: '',
|
|
16
|
+
topic: task.prompt.split('\n')[0]?.slice(0, 120) || undefined,
|
|
17
|
+
label: `[cloud/${task.status}]${task.branch ? ` ${task.branch}` : ''}`,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
5
20
|
async function runCloudTranscripts(query, options) {
|
|
6
|
-
const {
|
|
7
|
-
const { buildFilterOptions, printSessionTable, resolveViewMode,
|
|
21
|
+
const { getRushProvider } = await import('../lib/cloud/registry.js');
|
|
22
|
+
const { buildFilterOptions, printSessionTable, resolveViewMode, renderSessionEvents } = await import('../lib/session/presentation.js');
|
|
23
|
+
const rush = getRushProvider();
|
|
8
24
|
let filterOpts;
|
|
9
25
|
try {
|
|
10
26
|
filterOpts = buildFilterOptions(options);
|
|
@@ -17,7 +33,10 @@ async function runCloudTranscripts(query, options) {
|
|
|
17
33
|
const spinner = options.json ? null : interruptibleSpinner('Loading cloud sessions...').start();
|
|
18
34
|
let sessions;
|
|
19
35
|
try {
|
|
20
|
-
sessions = await
|
|
36
|
+
sessions = (await rush.list())
|
|
37
|
+
.map(cloudTaskSessionMeta)
|
|
38
|
+
.filter((s) => s !== null)
|
|
39
|
+
.slice(0, parseInt(options.limit || DEFAULT_LIMIT, 10));
|
|
21
40
|
}
|
|
22
41
|
catch (err) {
|
|
23
42
|
spinner?.stop();
|
|
@@ -31,7 +50,7 @@ async function runCloudTranscripts(query, options) {
|
|
|
31
50
|
return;
|
|
32
51
|
}
|
|
33
52
|
if (sessions.length === 0) {
|
|
34
|
-
console.log(chalk.gray('No cloud sessions
|
|
53
|
+
console.log(chalk.gray('No cloud sessions yet.'));
|
|
35
54
|
return;
|
|
36
55
|
}
|
|
37
56
|
printSessionTable(sessions);
|
|
@@ -50,18 +69,18 @@ async function runCloudTranscripts(query, options) {
|
|
|
50
69
|
process.exit(1);
|
|
51
70
|
}
|
|
52
71
|
const meta = matches[0];
|
|
53
|
-
const
|
|
54
|
-
let
|
|
72
|
+
const fetchSpinner = options.json ? null : interruptibleSpinner('Fetching session...').start();
|
|
73
|
+
let events;
|
|
55
74
|
try {
|
|
56
|
-
|
|
75
|
+
events = await rush.transcript({ id: meta.id, createdAt: meta.timestamp }, meta.agent);
|
|
57
76
|
}
|
|
58
77
|
catch (err) {
|
|
59
|
-
|
|
78
|
+
fetchSpinner?.stop();
|
|
60
79
|
console.error(chalk.red(`Failed to fetch session: ${err?.message || err}`));
|
|
61
80
|
process.exit(1);
|
|
62
81
|
}
|
|
63
|
-
|
|
64
|
-
|
|
82
|
+
fetchSpinner?.stop();
|
|
83
|
+
renderSessionEvents(meta, events, mode, filterOpts, options);
|
|
65
84
|
}
|
|
66
85
|
export function registerCloudTranscriptsCommand(cloud) {
|
|
67
86
|
const cmd = cloud
|
|
@@ -91,8 +110,8 @@ export function registerCloudTranscriptsCommand(cloud) {
|
|
|
91
110
|
agents cloud transcripts 3f2a9c1e --include tools --last 2 --json
|
|
92
111
|
`,
|
|
93
112
|
notes: `
|
|
94
|
-
- Reads Rush Cloud runs
|
|
95
|
-
- Every render fetches the run's transcript again
|
|
113
|
+
- Reads Rush Cloud runs with your Rush API key (RUSH_API_KEY and RUSH_ORG, from the bundle named in cloud.providers.rush.secretsBundle or the environment). A missing or rejected key, or an unmatched or ambiguous selector, exits 1; it never falls back to local sessions.
|
|
114
|
+
- Every render fetches the run's transcript again from the developer API (\`GET /o/{org}/sessions/{id}/messages\`).
|
|
96
115
|
- \`agents cloud list/status/logs\` cover the run jobs, not their transcripts.
|
|
97
116
|
`,
|
|
98
117
|
});
|
package/dist/commands/cloud.js
CHANGED
|
@@ -29,7 +29,7 @@ Each agent runs in its own cloud. Pass --agent and the provider is auto-selected
|
|
|
29
29
|
(claude→rush, codex→codex, cursor→cursor, droid→factory, antigravity→antigravity); --provider overrides.
|
|
30
30
|
|
|
31
31
|
Providers:
|
|
32
|
-
rush Rush Cloud — Claude
|
|
32
|
+
rush Rush Cloud — Claude, Codex or OpenCode via the developer API (API key), optional repo → PR
|
|
33
33
|
codex Codex Cloud — runs in a pre-built Codex environment (--env)
|
|
34
34
|
cursor Cursor Cloud Agents — v1 REST API, with optional GitHub repos
|
|
35
35
|
factory Factory Droid Computer — droid exec on a cloud VM (--computer)
|
|
@@ -42,9 +42,6 @@ Examples:
|
|
|
42
42
|
# Fire-and-forget (returns the task id, no streaming)
|
|
43
43
|
agents cloud run "bump tailwind to v4 and fix the breaks" --provider rush --repo acme/example --no-follow
|
|
44
44
|
|
|
45
|
-
# Multi-repo dispatch: touch both rush and rush-extension in one task
|
|
46
|
-
agents cloud run "rename POST /v1/charge -> /v2/charge across server + extension" --provider rush --repo acme/example --repo acme/example-extension
|
|
47
|
-
|
|
48
45
|
# Codex Cloud against a saved environment
|
|
49
46
|
agents cloud run "add pytest fixtures for the new billing module" --provider codex --env env_a1b2c3 --agent codex --timeout 30m
|
|
50
47
|
|
|
@@ -80,7 +77,7 @@ Examples:
|
|
|
80
77
|
.description('Dispatch a task to a cloud agent.')
|
|
81
78
|
.option('--provider <id>', 'Cloud backend: rush, codex, cursor, factory, antigravity, host (overrides agent auto-routing)')
|
|
82
79
|
.option('--agent <name>', 'Agent to run: claude, codex, cursor, droid, antigravity (auto-routes to its native cloud)')
|
|
83
|
-
.option('--repo <owner/repo>', 'GitHub repository. Repeatable for multi-repo dispatch (Rush
|
|
80
|
+
.option('--repo <owner/repo>', 'GitHub repository. Repeatable for multi-repo dispatch (Cursor Cloud); Rush Cloud takes one.', (value, previous) => {
|
|
84
81
|
const acc = Array.isArray(previous) ? previous : [];
|
|
85
82
|
acc.push(value);
|
|
86
83
|
return acc;
|
|
@@ -95,19 +92,16 @@ Examples:
|
|
|
95
92
|
.option('--remote-cwd <dir>', 'Working directory on the device (--provider host only)')
|
|
96
93
|
.option('--any', 'With --device <cap> (a capability tag), pick any matching device instead of erroring when several match')
|
|
97
94
|
.option('--autonomy <level>', 'Factory/Droid autonomy: low, medium, high (default high)')
|
|
98
|
-
.option('--mode <mode>', 'Execution mode (e.g., plan, edit, full)')
|
|
99
95
|
.option('--image <path>', `Attach an image (.png/.jpg/.webp) for vision dispatch. Repeatable, up to ${MAX_IMAGES_PER_DISPATCH} (Rush Cloud only).`, (value, previous) => {
|
|
100
96
|
const acc = Array.isArray(previous) ? previous : [];
|
|
101
97
|
acc.push(value);
|
|
102
98
|
return acc;
|
|
103
99
|
})
|
|
104
|
-
.option('--skill <
|
|
100
|
+
.option('--skill <url>', 'Skill by public URL: a GitHub tree URL to a directory with SKILL.md, a SKILL.md file, or a .zip. Repeatable (Rush Cloud only).', (value, previous) => {
|
|
105
101
|
const acc = Array.isArray(previous) ? previous : [];
|
|
106
102
|
acc.push(value);
|
|
107
103
|
return acc;
|
|
108
104
|
})
|
|
109
|
-
.option('-b, --balanced', 'Shortcut for --strategy balanced. Route the factory run across all healthy accounts.')
|
|
110
|
-
.option('--strategy <strategy>', 'Account selection strategy for the factory: balanced. Sends all healthy accounts so the factory pod rotates between them on rate-limit.')
|
|
111
105
|
.option('--json', 'Structured JSON output')
|
|
112
106
|
.option('--no-follow', 'Dispatch and exit without streaming output')
|
|
113
107
|
.addHelpText('after', `
|
|
@@ -116,8 +110,8 @@ Examples:
|
|
|
116
110
|
agents cloud run "fix the flaky test" --provider rush --repo user/repo
|
|
117
111
|
agents cloud run task.md --provider rush --repo org/project --agent codex
|
|
118
112
|
|
|
119
|
-
# Rush Cloud
|
|
120
|
-
agents cloud run "
|
|
113
|
+
# Rush Cloud with no repository
|
|
114
|
+
agents cloud run "summarize the attached screenshot" --provider rush --image shot.png
|
|
121
115
|
|
|
122
116
|
# Codex Cloud
|
|
123
117
|
agents cloud run "add auth tests" --provider codex --env env_abc123
|
|
@@ -169,16 +163,11 @@ Examples:
|
|
|
169
163
|
dispatchOptions.providerOptions.any = true;
|
|
170
164
|
if (options.autonomy)
|
|
171
165
|
dispatchOptions.providerOptions.autonomy = options.autonomy;
|
|
172
|
-
if (options.mode)
|
|
173
|
-
dispatchOptions.providerOptions.mode = options.mode;
|
|
174
|
-
if (options.balanced || options.strategy === 'balanced') {
|
|
175
|
-
dispatchOptions.providerOptions.strategy = 'balanced';
|
|
176
|
-
}
|
|
177
166
|
await executeCloudDispatch({
|
|
178
167
|
provider,
|
|
179
168
|
dispatchOptions,
|
|
180
169
|
imagePaths: Array.isArray(options.image) ? options.image : [],
|
|
181
|
-
|
|
170
|
+
skillUrls: Array.isArray(options.skill) ? options.skill : [],
|
|
182
171
|
follow: options.follow !== false,
|
|
183
172
|
json,
|
|
184
173
|
});
|
package/dist/commands/exec.js
CHANGED
|
@@ -406,7 +406,7 @@ export function registerRunCommand(program) {
|
|
|
406
406
|
const runCmd = program
|
|
407
407
|
.command('run [agent] [prompt]')
|
|
408
408
|
.description('Execute an agent. Pass a prompt for headless runs; omit it to launch the agent interactively. With --broadcast, run the same prompt/task across an agent × model matrix.')
|
|
409
|
-
.option('-m, --mode <mode>', 'How much the agent can do: plan (read-only), edit (can write files), auto (more autonomous than edit, mechanism per-harness: smart classifier auto-approves safe ops and still prompts for risky ones on Claude/Copilot; approval_policy=never over the edit sandbox on Codex, which never prompts), skip (bypass all permission prompts). Omitted, no permission flag is passed and the harness\'s own settings decide (Codex\'s launcher applies its edit policy); set a default with agents config set run.<agent>@*.mode <mode>. \'full\' accepted as alias for skip.', 'plan')
|
|
409
|
+
.option('-m, --mode <mode>', 'How much the agent can do: plan (read-only), edit (can write files), auto (more autonomous than edit, mechanism per-harness: smart classifier auto-approves safe ops and still prompts for risky ones on Claude/Copilot; approval_policy=never over the edit sandbox on Codex, which never prompts; Grok\'s native --permission-mode auto), skip (bypass all permission prompts). Omitted, no permission flag is passed and the harness\'s own settings decide (Codex\'s launcher applies its edit policy); set a default with agents config set run.<agent>@*.mode <mode>. \'full\' accepted as alias for skip.', 'plan')
|
|
410
410
|
.option('-e, --effort <effort>', 'Reasoning effort: low | medium | high | xhigh | max | auto (claude and codex only)', 'auto')
|
|
411
411
|
.option('--model <model>', 'Cost tier (cheap|default|best|ultra) or a concrete model id; tiers resolve per harness+version to a supported model')
|
|
412
412
|
.option('--env <key=value>', 'Pass environment variable to the agent (repeatable, e.g., --env DEBUG=1 --env API_KEY=xyz)', (val, prev) => [...prev, val], [])
|
|
@@ -559,6 +559,7 @@ agents run auto --device yosemite-s0 "fix the flaky test" # pin the device
|
|
|
559
559
|
STILL PROMPTS for risky ones
|
|
560
560
|
codex: approval_policy=never over the edit sandbox; never
|
|
561
561
|
prompts at all, and a denied command fails instead
|
|
562
|
+
grok: grok's native --permission-mode auto
|
|
562
563
|
skip bypass every permission prompt (dangerously-skip-permissions)
|
|
563
564
|
Legacy 'full' is silently rewritten to 'skip'.
|
|
564
565
|
Unsupported requests degrade: auto falls back to edit, plan to the
|
package/dist/lib/agent-modes.js
CHANGED
|
@@ -15,6 +15,7 @@ const AUTO_SEMANTICS = {
|
|
|
15
15
|
muse: 'runs --disable-approval, which turns approvals off while keeping the sandbox — like codex, it never prompts and a denied command fails.',
|
|
16
16
|
droid: 'runs --auto high, droid\'s full-autonomy setting.',
|
|
17
17
|
kimi: "runs kimi's native --auto.",
|
|
18
|
+
grok: "runs grok's native --permission-mode auto.",
|
|
18
19
|
};
|
|
19
20
|
export function getAgentModesCatalog(agent, version, cwd = process.cwd()) {
|
|
20
21
|
const supported = AGENTS[agent].capabilities.modes;
|
|
@@ -484,7 +484,7 @@ export const AGENTS = {
|
|
|
484
484
|
rules: { file: 'AGENTS.md' },
|
|
485
485
|
workflows: { since: '0.2.111' },
|
|
486
486
|
memory: true,
|
|
487
|
-
modes: ['plan', 'edit', 'skip'],
|
|
487
|
+
modes: ['plan', 'edit', 'auto', 'skip'],
|
|
488
488
|
headlessPlan: false,
|
|
489
489
|
rulesImports: true,
|
|
490
490
|
interactiveRepl: true,
|
|
@@ -25,13 +25,6 @@ function readImageAttachment(file) {
|
|
|
25
25
|
const mimeType = imageMimeFromPath(file);
|
|
26
26
|
return { data: fs.readFileSync(file).toString('base64'), mimeType };
|
|
27
27
|
}
|
|
28
|
-
function parseSkillRef(raw) {
|
|
29
|
-
const at = raw.lastIndexOf('@');
|
|
30
|
-
if (at > 0) {
|
|
31
|
-
return { id: raw.slice(0, at), version: raw.slice(at + 1) };
|
|
32
|
-
}
|
|
33
|
-
return { id: raw };
|
|
34
|
-
}
|
|
35
28
|
export function resolveCloudPrompt(raw, opts) {
|
|
36
29
|
let prompt = raw;
|
|
37
30
|
if (!prompt)
|
|
@@ -79,7 +72,7 @@ async function pickMissingTarget(provider, err, json) {
|
|
|
79
72
|
export async function executeCloudDispatch(params) {
|
|
80
73
|
const { provider, dispatchOptions, follow, json } = params;
|
|
81
74
|
const imagePaths = params.imagePaths ?? [];
|
|
82
|
-
const
|
|
75
|
+
const skillUrls = params.skillUrls ?? [];
|
|
83
76
|
const shareEnv = shareRuntimeEnv();
|
|
84
77
|
if (shareEnv)
|
|
85
78
|
dispatchOptions.env = shareEnv;
|
|
@@ -92,10 +85,10 @@ export async function executeCloudDispatch(params) {
|
|
|
92
85
|
}
|
|
93
86
|
dispatchOptions.images = imagePaths.map(readImageAttachment);
|
|
94
87
|
}
|
|
95
|
-
if (
|
|
88
|
+
if (skillUrls.length > 0) {
|
|
96
89
|
if (!caps.skills)
|
|
97
90
|
die(`${provider.name} does not support ride-along skills.`, 1, { json });
|
|
98
|
-
dispatchOptions.skills =
|
|
91
|
+
dispatchOptions.skills = skillUrls;
|
|
99
92
|
}
|
|
100
93
|
const dispatchOnce = async () => {
|
|
101
94
|
const spinner = ora({ text: `Dispatching to ${provider.name}...`, stream: process.stderr }).start();
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { CloudProvider, CloudProviderId } from './types.js';
|
|
2
|
+
import { RushCloudProvider } from './rush.js';
|
|
2
3
|
export declare function nativeProviderForAgent(agentId: string): CloudProviderId | undefined;
|
|
3
4
|
export declare function getProvider(id: CloudProviderId): CloudProvider;
|
|
5
|
+
export declare function getRushProvider(): RushCloudProvider;
|
|
4
6
|
export declare function getDefaultProviderId(): CloudProviderId;
|
|
5
7
|
export declare function getAllProviders(): CloudProvider[];
|
|
6
8
|
export declare function resolveProvider(explicit?: string, agentId?: string): CloudProvider;
|
|
@@ -29,11 +29,13 @@ function loadCloudConfig() {
|
|
|
29
29
|
return _config;
|
|
30
30
|
}
|
|
31
31
|
const providers = new Map();
|
|
32
|
+
let rush = null;
|
|
32
33
|
function initProviders() {
|
|
33
34
|
if (providers.size > 0)
|
|
34
35
|
return;
|
|
35
36
|
const config = loadCloudConfig();
|
|
36
|
-
|
|
37
|
+
rush = new RushCloudProvider(config.providers?.rush);
|
|
38
|
+
providers.set('rush', rush);
|
|
37
39
|
providers.set('codex', new CodexCloudProvider(config.providers?.codex));
|
|
38
40
|
providers.set('factory', new FactoryCloudProvider(config.providers?.factory));
|
|
39
41
|
providers.set('antigravity', new AntigravityCloudProvider(config.providers?.antigravity));
|
|
@@ -52,6 +54,10 @@ export function getProvider(id) {
|
|
|
52
54
|
}
|
|
53
55
|
return provider;
|
|
54
56
|
}
|
|
57
|
+
export function getRushProvider() {
|
|
58
|
+
initProviders();
|
|
59
|
+
return rush;
|
|
60
|
+
}
|
|
55
61
|
export function getDefaultProviderId() {
|
|
56
62
|
const config = loadCloudConfig();
|
|
57
63
|
return config.default_provider ?? 'rush';
|
package/dist/lib/cloud/rush.d.ts
CHANGED
|
@@ -1,38 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export interface RushOrg {
|
|
5
|
-
slug?: string;
|
|
6
|
-
kind?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function rushOrgHandle(token: string, yamlPath?: string): Promise<string>;
|
|
9
|
-
export declare function personalOrgHandle(orgs: RushOrg[]): string | undefined;
|
|
10
|
-
interface AccountManifestEntry {
|
|
11
|
-
version: string;
|
|
12
|
-
email: string;
|
|
13
|
-
}
|
|
14
|
-
interface AccountManifest {
|
|
15
|
-
fp: string;
|
|
16
|
-
versions: AccountManifestEntry[];
|
|
17
|
-
}
|
|
18
|
-
export declare function buildDispatchBody(input: {
|
|
19
|
-
agent?: string;
|
|
20
|
-
prompt: string;
|
|
21
|
-
mode?: string;
|
|
22
|
-
strategy?: string;
|
|
23
|
-
resolvedRepos: Array<{
|
|
24
|
-
installation_id: number;
|
|
25
|
-
repo_owner: string;
|
|
26
|
-
repo_name: string;
|
|
27
|
-
}>;
|
|
28
|
-
accountManifest?: AccountManifest | null;
|
|
29
|
-
skills?: SkillRef[] | null;
|
|
30
|
-
images?: ImageAttachment[] | null;
|
|
31
|
-
env?: Record<string, string> | null;
|
|
32
|
-
}): Record<string, unknown>;
|
|
1
|
+
import type { SessionAgentId, SessionEvent } from '@phnx-labs/sessions-cli/reader';
|
|
2
|
+
import type { CloudProvider, CloudTask, CloudTaskStatus, CloudEvent, DispatchOptions, ProviderCapabilities } from './types.js';
|
|
3
|
+
export declare function buildSessionCreateBody(options: DispatchOptions): Record<string, unknown>;
|
|
33
4
|
export declare class RushCloudProvider implements CloudProvider {
|
|
34
5
|
id: "rush";
|
|
35
6
|
name: string;
|
|
7
|
+
private secretsBundle?;
|
|
8
|
+
constructor(config?: {
|
|
9
|
+
secretsBundle?: string;
|
|
10
|
+
});
|
|
11
|
+
private credential;
|
|
12
|
+
private request;
|
|
36
13
|
capabilities(): ProviderCapabilities;
|
|
37
14
|
dispatch(options: DispatchOptions): Promise<CloudTask>;
|
|
38
15
|
status(taskId: string): Promise<CloudTask>;
|
|
@@ -42,5 +19,5 @@ export declare class RushCloudProvider implements CloudProvider {
|
|
|
42
19
|
stream(taskId: string): AsyncIterable<CloudEvent>;
|
|
43
20
|
cancel(taskId: string): Promise<void>;
|
|
44
21
|
message(taskId: string, content: string): Promise<void>;
|
|
22
|
+
transcript(task: Pick<CloudTask, 'id' | 'createdAt'>, agent: SessionAgentId): Promise<SessionEvent[]>;
|
|
45
23
|
}
|
|
46
|
-
export {};
|