Add Ultraplan Feature for Advanced Multi-Agent Planning (#232)

* feat: add ultraplan feature for advanced multi-agent planning

Implement ultraplan command with web-based planning interface,
supporting multiple prompt modes and interactive plan approval.

* chore: add semi

* chore: add semi
This commit is contained in:
sobird
2026-04-10 22:17:00 +08:00
committed by GitHub
parent 8137b66a46
commit 9da7345f8e
11 changed files with 292 additions and 144 deletions

View File

@@ -988,6 +988,8 @@ export async function teleportToRemote(options: {
* capture it to include in their throw (in-REPL, Ink-rendered).
*/
onBundleFail?: (message: string) => void
onCreateFail?: (message: string) => void
/**
* When true, disables the git-bundle fallback entirely. Use for flows like
* autofix where CCR must push to GitHub — a bundle can't do that.
@@ -1445,7 +1447,7 @@ export async function teleportToRemote(options: {
)
// Make API call
const response = await axios.post(url, requestBody, { headers, signal })
const response = await axios.post(url, requestBody, { headers, signal, validateStatus: (status) => status < 500 })
const isSuccess = response.status === 200 || response.status === 201
if (!isSuccess) {
@@ -1454,6 +1456,8 @@ export async function teleportToRemote(options: {
`API request failed with status ${response.status}: ${response.statusText}\n\nResponse data: ${jsonStringify(response.data, null, 2)}`,
),
)
options.onCreateFail?.(`${response.status} ${response.statusText}: ${jsonStringify(response.data)}`);
return null
}
@@ -1488,7 +1492,7 @@ export async function teleportToRemote(options: {
* success. Fire-and-forget; failure leaks a visible session until the
* reaper collects it.
*/
export async function archiveRemoteSession(sessionId: string): Promise<void> {
export async function archiveRemoteSession(sessionId: string, timeout = 10_000): Promise<void> {
const accessToken = getClaudeAIOAuthTokens()?.accessToken
if (!accessToken) return
const orgUUID = await getOrganizationUUID()
@@ -1503,7 +1507,7 @@ export async function archiveRemoteSession(sessionId: string): Promise<void> {
const resp = await axios.post(
url,
{},
{ headers, timeout: 10000, validateStatus: s => s < 500 },
{ headers, timeout, validateStatus: s => s < 500 },
)
if (resp.status === 200 || resp.status === 409) {
logForDebugging(`[archiveRemoteSession] archived ${sessionId}`)