@agimon-ai/po-git 0.0.0-alpha.93 → 0.0.0-alpha.95

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.
@@ -1,4 +1,4 @@
1
- import { C as READ_TIMEOUT_MS, E as runGit, S as NETWORK_TIMEOUT_MS, T as createWorktreeGit, a as GIT_WORKTREE_LIFECYCLE_EVENT, c as isWorktreeLifecycleEvent, d as registryFile, f as readJson, g as invalidRequest, h as PoGitExpectedError, i as GIT_SESSION_CHANGED_EVENT, l as credentialsFile, m as HubUnavailableError, n as createWorktreeRegistry, o as createWorktreeMessageInbox, p as writeJsonAtomic, r as validRefName, s as isSessionChangedEvent, t as createWorktreeOperations, u as poGitRoot, w as REBASE_TIMEOUT_MS } from "../worktreeOperations-B3E4JY4H.mjs";
1
+ import { C as READ_TIMEOUT_MS, E as runGit, S as NETWORK_TIMEOUT_MS, T as createWorktreeGit, a as GIT_WORKTREE_LIFECYCLE_EVENT, c as isWorktreeLifecycleEvent, d as registryFile, f as readJson, g as invalidRequest, h as PoGitExpectedError, i as GIT_SESSION_CHANGED_EVENT, l as credentialsFile, m as HubUnavailableError, n as createWorktreeRegistry, o as createWorktreeMessageInbox, p as writeJsonAtomic, r as validRefName, s as isSessionChangedEvent, t as createWorktreeOperations, u as poGitRoot, w as REBASE_TIMEOUT_MS } from "../worktreeOperations-DA_dbDv8.mjs";
2
2
  import fs from "node:fs/promises";
3
3
  import path from "node:path";
4
4
  import os from "node:os";
@@ -9,6 +9,7 @@ import { readPoSessionDelivery } from "@agimon-ai/po-session";
9
9
  import { Type } from "typebox";
10
10
  import { BACKGROUND_CONTEXT, PO_SHELL_SERVICE, requirePoShell, withAbortSignal } from "@agimon-ai/po-core/platform";
11
11
  import { poApiCallerFrom } from "@agimon-ai/po-core/packageApi";
12
+ import { parseLaunchSelection } from "@agimon-ai/po-core/hubChannel";
12
13
  //#region src/schemas/runWorktreeTool.ts
13
14
  /**
14
15
  * The tool's action vocabulary.
@@ -1241,7 +1242,13 @@ function newSessionRequest(body) {
1241
1242
  if (branch === void 0 || branch === false || !validRefName(branch)) return { error: "A valid branch name is required." };
1242
1243
  const name = optionalText(record.name);
1243
1244
  if (name === false || name !== void 0 && name.length > MAX_NAME_LENGTH) return { error: `The session name must be text of up to ${String(MAX_NAME_LENGTH)} characters.` };
1244
- const named = name === void 0 ? {} : { name };
1245
+ const chosen = record.selection === void 0 ? {} : parseLaunchSelection(record.selection);
1246
+ if ("error" in chosen) return chosen;
1247
+ const profile = chosen.selection?.profile;
1248
+ const named = {
1249
+ ...name === void 0 ? {} : { name },
1250
+ ...profile === void 0 ? {} : { selection: { profile } }
1251
+ };
1245
1252
  if (record.mode === "existing-branch") {
1246
1253
  const remote = optionalText(record.remote);
1247
1254
  if (remote === false || remote !== void 0 && !validRefName(remote)) return { error: "That remote name is not valid." };
@@ -1364,7 +1371,8 @@ function createGitApi(openDirectory) {
1364
1371
  checkout: parsed.mode === "existing-branch" ? "existing" : "new",
1365
1372
  ...parsed.mode === "existing-branch" && parsed.remote !== void 0 ? { remote: parsed.remote } : {},
1366
1373
  ...parsed.mode === "new-branch" && parsed.baseRef !== void 0 ? { baseRef: parsed.baseRef } : {},
1367
- ...parsed.name === void 0 ? {} : { name: parsed.name }
1374
+ ...parsed.name === void 0 ? {} : { name: parsed.name },
1375
+ ...parsed.selection === void 0 ? {} : { selection: parsed.selection }
1368
1376
  });
1369
1377
  publishLifecycle(record.sessionId, record.repositoryRoot);
1370
1378
  const created = {