send-to-paseo 1.3.0 → 1.4.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/README.md CHANGED
@@ -25,9 +25,9 @@ except `git`** — with no `gh` at all you can still open the popover, pick a
25
25
  workspace and start an agent, because Paseo checks the pull request out itself
26
26
  through its own forge credentials. `gh` only supplies metadata.
27
27
 
28
- | | Required? | Minimum verified | What it is used for | What breaks without it |
28
+ | | Required? | Version | What it is used for | What breaks without it |
29
29
  | --- | --- | --- | --- | --- |
30
- | **Paseo** | yes | `0.9.0` | Everything. The surface uses Paseo 0.9's configured-host discovery and host-targeted client APIs. | The plugin does not load. |
30
+ | **Paseo** | yes | Latest release | Everything. The surface uses configured-host discovery and host-targeted client APIs. | The plugin does not load. |
31
31
  | **`git`** | yes | `2.51.2` | Reading the branch a workspace is on, and the repository's `origin`. Paseo itself needs it to create a worktree. | Creating a worktree fails with a message naming `git`. Workspace branches read as unknown, so nothing is ranked as an exact or stack match — everything falls back to "create". |
32
32
  | **`gh`** | **no** | `2.98.0` | PR title, head and base branch names, and stack discovery (`gh pr list` rebuilds the whole Graphite stack, including its merged and closed members). | Sending still works. You lose the PR title, the branch names, exact/stack candidate ranking, and the `Title:`/`Branch:` lines in the agent's prompt. Stack detection is lost **entirely**, local git ancestry included: that check proves "this branch is an ancestor of a branch in the stack", and without `gh` there is no stack and no PR head branch to compare against. The bridge says so in the target picker, in the agent's prompt and in the log. |
33
33
 
@@ -112,19 +112,17 @@ before installing it.
112
112
  One command from npm. No clone or build step:
113
113
 
114
114
  ```sh
115
- paseo plugin install npm:send-to-paseo@1.3.0
115
+ paseo plugin install send-to-paseo
116
116
  paseo plugin ls # expect: send-to-paseo running yes
117
117
  paseo plugin logs send-to-paseo
118
118
  ```
119
119
 
120
- The same release is available directly from Git with
121
- `paseo plugin add tomgrin10/send-to-paseo --path plugin --ref v1.3.0`.
122
120
  `pluginsEnabled` must already be `true` in the daemon's `config.json`.
123
121
 
124
122
  There is nothing to install because the plugin imports nothing at runtime that
125
123
  the Paseo host does not already provide — see
126
- [No runtime dependencies, ever](#no-runtime-dependencies-ever). To upgrade a
127
- Git-managed install, run `paseo plugin update send-to-paseo`; for a checkout,
124
+ [No runtime dependencies, ever](#no-runtime-dependencies-ever). To update an
125
+ installed plugin, run `paseo plugin update send-to-paseo`; for a checkout,
128
126
  run `paseo plugin reload send-to-paseo`.
129
127
 
130
128
  ### From a checkout (contributors)
@@ -197,7 +195,7 @@ All of it lives in the Paseo surface; there is no config file to hunt for.
197
195
  | --- | --- | --- |
198
196
  | Port | `7788` | Saving rebinds the listener straight away. Bind address is always `127.0.0.1`. |
199
197
  | Private bridge address (`externalBridgeUrl`) | none | Optional HTTPS origin for a reverse proxy such as Tailscale Serve. Saving explicitly allowlists only that origin's Host header; the listener remains loopback-only. |
200
- | Paseo host discovery | automatic | Paseo 0.9 supplies every configured host and live status, including offline hosts. “Check Paseo access” always calls `getPaseoClient(serverId)` for that exact row. |
198
+ | Paseo host discovery | automatic | Paseo supplies every configured host and live status, including offline hosts. “Check Paseo access” always calls `getPaseoClient(serverId)` for that exact row. |
201
199
  | Additional browser routes | none | Connections imported from `stp1_…` codes. These remain necessary only because host discovery exposes neither a private bridge URL nor its token; the Primary plugin resolves and sends through these bridges. |
202
200
  | Pairing token | generated on first run | 32 random bytes, base64url. |
203
201
  | Agent destination | `New agent` | Start a fresh agent, or reuse the best non-archived root agent in an existing target workspace. A create target and a workspace with no eligible root still start a new agent. |
@@ -483,12 +481,15 @@ curl -s -X POST http://127.0.0.1:7788/v1/send \
483
481
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
484
482
  -d '{"forge":"github","owner":"acmegizmos","repo":"gizmo-poc","number":942,
485
483
  "prompt":"Fix merge conflicts","target":{"kind":"create"},
486
- "modeId":"auto"}'
484
+ "agentDispatch":"new","modeId":"auto"}'
487
485
  ```
488
486
 
489
487
  For a new-agent send, `/v1/resolve` reports the mode it would actually use, so the popover can
490
- preselect what will happen rather than guess. In main-agent mode the popover hides model/mode
491
- controls because they cannot change an existing agent:
488
+ preselect what will happen rather than guess. The resolve response also supplies the saved
489
+ agent-destination preference and reusable-agent previews. The popover initializes its Agent
490
+ dropdown from that preference, then sends `agentDispatch` as a per-request override. When the
491
+ user chooses **Use main agent**, it hides model/mode controls because they cannot change an
492
+ existing agent:
492
493
 
493
494
  ```sh
494
495
  $ curl -s -X POST http://127.0.0.1:7788/v1/resolve \
@@ -695,9 +696,11 @@ When a send creates a new agent, it uses:
695
696
  `paseo://h/<serverId>/agent/<agentId>`.
696
697
  - `dryRun`: always present, `false` on a real send.
697
698
 
698
- If main-agent mode finds no eligible root, it follows that same creation path. A successful reuse
699
- instead returns `agentCreated: false`, `dispatch: "main"`, and the existing agent's title and deep
700
- link. New-agent and fallback paths return `agentCreated: true`, `dispatch: "new"`.
699
+ If a request asks for main-agent reuse but no eligible root exists, it follows that same creation
700
+ path. A successful reuse instead returns `agentCreated: false`, `dispatch: "main"`, and the
701
+ existing agent's title and deep link. New-agent and fallback paths return `agentCreated: true`,
702
+ `dispatch: "new"`. Omitting `agentDispatch` preserves the plugin's saved preference for older
703
+ clients.
701
704
 
702
705
  `prompt` is validated as 1..16000 **Unicode code points after trim**, so an emoji counts once.
703
706
  The 64 KiB byte cap on the body is independent and is applied first, so a prompt inside the
@@ -827,11 +830,11 @@ endpoint and a wrong method on a known endpoint both return
827
830
 
828
831
  ## Layout
829
832
 
830
- Paseo 0.9 uses separate runtime entries and directory boundaries. Client code,
833
+ Paseo uses separate runtime entries and directory boundaries. Client code,
831
834
  server code and shared contracts compile into their matching bundles.
832
835
 
833
836
  ```
834
- paseo-plugin.json id and Paseo >=0.9.0 requirement
837
+ paseo-plugin.json id and Paseo version requirement
835
838
  index.client.tsx client contribution wiring
836
839
  index.server.ts RPC handlers and bridge lifecycle
837
840
  client/settings.tsx the Paseo surface
@@ -877,3 +880,12 @@ assembled specifier.
877
880
 
878
881
  The listener cleanup and no-runtime-dependency rules are demonstrated in
879
882
  [`VERIFICATION.md`](VERIFICATION.md) §3, §10 and §18.
883
+
884
+ ## More Paseo plugins
885
+
886
+ Also available from [Tom Gringauz](https://github.com/tomgrin10):
887
+
888
+ - [Defer](https://github.com/tomgrin10/paseo-defer) — Schedule messages to agents for later delivery.
889
+ - [Graphite](https://github.com/tomgrin10/paseo-graphite) — Monitor Graphite stacks and PR action state.
890
+ - [Smart Session](https://github.com/tomgrin10/paseo-smart-session) — Context-aware compaction and usage insights for long-running agents.
891
+ - [Vitals](https://github.com/tomgrin10/paseo-vitals) — Host, Paseo, agent, and Docker health in one dashboard.
@@ -1080,13 +1080,13 @@ export function SendToPaseoSettings({ theme, host, layout, navigation }: PluginS
1080
1080
  </View>
1081
1081
 
1082
1082
  <View style={styles.card}>
1083
- <Text style={styles.heading}>Agent destination</Text>
1083
+ <Text style={styles.heading}>Default agent destination</Text>
1084
1084
  <Text style={styles.muted}>
1085
- Choose whether each send starts fresh or continues the workspace&apos;s main agent.
1085
+ Sets the extension dropdown&apos;s initial choice. You can override it for each send.
1086
1086
  </Text>
1087
1087
  <Pressable
1088
1088
  accessibilityRole="button"
1089
- accessibilityLabel="Start a new agent for every send"
1089
+ accessibilityLabel="Default each send to a new agent"
1090
1090
  onPress={() => saveDispatch.mutate("new")}
1091
1091
  style={(status?.agentDispatch ?? "new") === "new" ? styles.selectedRow : undefined}
1092
1092
  >
@@ -1099,7 +1099,7 @@ export function SendToPaseoSettings({ theme, host, layout, navigation }: PluginS
1099
1099
  </Pressable>
1100
1100
  <Pressable
1101
1101
  accessibilityRole="button"
1102
- accessibilityLabel="Continue the main agent in the target workspace"
1102
+ accessibilityLabel="Default each send to the main agent in the target workspace"
1103
1103
  onPress={() => saveDispatch.mutate("main")}
1104
1104
  style={status?.agentDispatch === "main" ? styles.selectedRow : undefined}
1105
1105
  >
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "send-to-paseo",
3
3
  "type": "module",
4
- "version": "1.3.0",
4
+ "version": "1.4.1",
5
5
  "license": "MIT",
6
6
  "description": "Local HTTP bridge that dispatches PR work to the right Paseo workspace and agent.",
7
7
  "repository": {
package/server/resolve.ts CHANGED
@@ -228,7 +228,6 @@ export async function buildCandidates(input: {
228
228
  stackBranches: Map<string, StackMember>;
229
229
  /** Non-null when `gh` could not be consulted; carried into the create label. */
230
230
  outage?: GhOutage | null;
231
- agentDispatch?: "new" | "main";
232
231
  agents?: readonly ListedAgent[];
233
232
  }): Promise<{ candidates: Candidate[]; defaultCandidateIndex: number }> {
234
233
  const { counts, agents } = await workspaceAgents(
@@ -261,20 +260,18 @@ export async function buildCandidates(input: {
261
260
  cwd: workspace.workspaceDirectory,
262
261
  isolation: isolationOf(workspace),
263
262
  agentCount: counts.get(workspace.id) ?? 0,
264
- ...(input.agentDispatch === "main"
265
- ? (() => {
266
- const main = selectMainAgent(agents, workspace.id);
267
- return main === null
268
- ? {}
269
- : {
270
- mainAgent: {
271
- agentId: main.id,
272
- title: agentDisplayTitle(main),
273
- status: main.status,
274
- },
275
- };
276
- })()
277
- : {}),
263
+ ...(() => {
264
+ const main = selectMainAgent(agents, workspace.id);
265
+ return main === null
266
+ ? {}
267
+ : {
268
+ mainAgent: {
269
+ agentId: main.id,
270
+ title: agentDisplayTitle(main),
271
+ status: main.status,
272
+ },
273
+ };
274
+ })(),
278
275
  };
279
276
  if (branch !== null && branch === input.pr.headBranch) {
280
277
  existing.push({ ...base, rank: 1, reason: "exact" });
@@ -1018,7 +1015,6 @@ export async function handleResolve(request: ResolveRequest): Promise<ResolveRes
1018
1015
  workspaces,
1019
1016
  stackBranches,
1020
1017
  outage,
1021
- agentDispatch: currentSettings.agentDispatch,
1022
1018
  agents: await agentsPromise,
1023
1019
  });
1024
1020
  const { providers } = await providersPromise;
package/server/send.ts CHANGED
@@ -223,7 +223,9 @@ export async function handleSend(request: SendRequest): Promise<SendResponse> {
223
223
  // title, the branches and the stack note in the prompt, not the send.
224
224
  const { pr, outage } = prLookup;
225
225
  const title = buildAgentTitle(ref.number, prompt);
226
- const configuredDispatch = currentSettings.agentDispatch;
226
+ // The composer can override the saved preference for one send. Older
227
+ // extensions omit the field and keep the historical settings-driven path.
228
+ const agentDispatch = request.agentDispatch ?? currentSettings.agentDispatch;
227
229
 
228
230
  let workspaceId: string;
229
231
  let workspaceLabel: string;
@@ -302,7 +304,7 @@ export async function handleSend(request: SendRequest): Promise<SendResponse> {
302
304
  });
303
305
 
304
306
  let mainAgent: ListedAgent | null = null;
305
- if (configuredDispatch === "main" && request.target.kind === "existing") {
307
+ if (agentDispatch === "main" && request.target.kind === "existing") {
306
308
  try {
307
309
  mainAgent = selectMainAgent(
308
310
  await listProjectAgents(paseo, project.projectId),
@@ -9,7 +9,7 @@ import { z } from "zod";
9
9
 
10
10
  /** Advertised in `GET /v1/ping`. Keep in step with `package.json`. */
11
11
  export const PLUGIN_NAME = "send-to-paseo";
12
- export const PLUGIN_VERSION = "1.3.0";
12
+ export const PLUGIN_VERSION = "1.4.1";
13
13
  /** Bumped only for an incompatible bridge API; the paths stay `/v1`. */
14
14
  export const CONTRACT_VERSION = 1;
15
15
 
@@ -131,6 +131,8 @@ export const SendRequestSchema = PrRefSchema.extend({
131
131
  */
132
132
  prompt: z.string(),
133
133
  target: SendTargetSchema,
134
+ /** Per-send override. Missing preserves the plugin's saved preference. */
135
+ agentDispatch: AgentDispatchSchema.optional(),
134
136
  provider: z.string().min(1).max(200).optional(),
135
137
  /**
136
138
  * Permission mode for the new agent, e.g. `auto` or `bypassPermissions`.