@getpaseo/cli 0.11.0-beta.5 → 0.11.0

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,7 +1,9 @@
1
+ import path from "node:path";
2
+ import { expandUserPath } from "../../classify.js";
1
3
  import { createInterface } from "node:readline/promises";
2
4
  import { reviewPluginUpdates } from "./update.js";
3
5
  import { Command } from "commander";
4
- import { formatPluginSourceReference, formatPluginIdentity, } from "@getpaseo/protocol/plugin-source-reference";
6
+ import { formatPluginSourceReference, parsePluginSourceReference, formatPluginIdentity, } from "@getpaseo/protocol/plugin-source-reference";
5
7
  import { withOutput } from "../../output/index.js";
6
8
  import { addJsonAndDaemonHostOptions, addJsonOption } from "../../utils/command-options.js";
7
9
  import { scaffoldPluginDirectory } from "./scaffold.js";
@@ -73,7 +75,17 @@ export async function runPluginLogsCommand(pluginId, options, _command) {
73
75
  }
74
76
  export async function runPluginInstallCommand(source, options, _command) {
75
77
  process.stderr.write("Trusting plugin code: server code and preparation commands run unsandboxed on the daemon host; client code runs inside Paseo. Dependencies and future updates are part of the codebase you trust.\n");
76
- const sourceReference = formatPluginSourceReference(source, options.path);
78
+ const reference = parsePluginSourceReference(source);
79
+ let resolvedSource = source;
80
+ if (reference.kind === "directory") {
81
+ const directory = expandUserPath(reference.source);
82
+ // An absolute path can target a daemon on a different operating system.
83
+ const absoluteDirectory = path.posix.isAbsolute(directory) || path.win32.isAbsolute(directory)
84
+ ? directory
85
+ : path.resolve(directory);
86
+ resolvedSource = formatPluginSourceReference(absoluteDirectory, reference.pluginPath);
87
+ }
88
+ const sourceReference = formatPluginSourceReference(resolvedSource, options.path);
77
89
  const data = await withPluginSourceClient(options.daemonTarget, (client) => client.installPluginSource({
78
90
  source: sourceReference,
79
91
  ...(options.id ? { id: options.id } : {}),
@@ -131,8 +143,8 @@ export function createPluginCommand() {
131
143
  addJsonAndDaemonHostOptions(plugin
132
144
  .command("install")
133
145
  .alias("add")
134
- .description("Trust and install a plugin from a directory, Git repository, or npm package")
135
- .argument("<source>", "Host directory, GitHub owner/repo, git: or npm: source, optionally followed by :plugin/path")
146
+ .description("Trust and install a plugin from a registry, directory, Git repository, or npm package")
147
+ .argument("<source>", "Registry owner/slug or host/owner/slug, host directory, explicit git:owner/repo or Git URL, or npm: source")
136
148
  .option("--id <id>", "Runtime plugin ID (defaults to paseo-plugin.json id)")
137
149
  .option("--ref <ref>", "Git branch, tag, or commit")
138
150
  .option("--path <path>", "Legacy form of the :plugin/path source suffix")).action(withOutput(runPluginInstallCommand));
@@ -2,6 +2,33 @@ import { mkdir, readdir, writeFile } from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import { PluginIdSchema } from "@getpaseo/protocol/messages";
4
4
  import { resolveCliVersion } from "../../version.js";
5
+ const OVERVIEW = `<!--
6
+ OVERVIEW.md is required to list your plugin in the registry. Keep it beside
7
+ paseo-plugin.json in your repository at the pinned commit and in your npm package.
8
+ Replace this comment with useful facts before publishing.
9
+
10
+ This overview is for people choosing a plugin in Paseo, on the plugin page under
11
+ its install command. README assumes a GitHub audience and includes technical
12
+ details, installation instructions, and badges. Long, AI-generated READMEs leave
13
+ people reading past that material to understand what the plugin does.
14
+
15
+ Write these parts in order, including only what helps someone decide to install:
16
+
17
+ 1. Describe what your plugin is and does in plain terms first.
18
+ 2. Explain how it works only when it is not obvious.
19
+ 3. Explain setup when needed: settings, accounts, tokens, providers, tools, or
20
+ other plugins. Include applicable daemon version and operating system
21
+ requirements. Setup guidance is allowed; installation instructions are not.
22
+ 4. Explain capabilities and settings worth understanding, what each option does,
23
+ what the plugin reads or sends and where, permissions, and known limits.
24
+
25
+ Length follows complexity; a theme needs one paragraph. Choose headings only
26
+ when they help. Use sentence case and plain factual language, with no em dashes.
27
+ Omit installation commands, badges, changelog, contributing or license sections,
28
+ marketing, and unsupported claims. Avoid implementation filler such as empty
29
+ cleanup functions, theme-token field lists, or lists of absent features.
30
+ -->
31
+ `;
5
32
  const TSCONFIG = {
6
33
  compilerOptions: {
7
34
  target: "ES2020",
@@ -138,6 +165,7 @@ export async function scaffoldPluginDirectory(targetDirectory, requestedId) {
138
165
  version: "0.0.0",
139
166
  files: [
140
167
  "paseo-plugin.json",
168
+ "OVERVIEW.md",
141
169
  "index.client.ts",
142
170
  "index.client.tsx",
143
171
  "index.server.ts",
@@ -160,8 +188,14 @@ export async function scaffoldPluginDirectory(targetDirectory, requestedId) {
160
188
  const files = new Map([
161
189
  [
162
190
  "paseo-plugin.json",
163
- `${JSON.stringify({ id, requirements: { paseo: `>=${version}` } }, null, 2)}\n`,
191
+ `${JSON.stringify({
192
+ id,
193
+ $comment: 'Add "name": "My plugin" to set a display name. Add "icon": "assets/icon.png" for a PNG inside the package. Add image or video paths (relative to this manifest) or HTTPS URLs to media. Include local assets in package.json files.',
194
+ media: [],
195
+ requirements: { paseo: `>=${version}` },
196
+ }, null, 2)}\n`,
164
197
  ],
198
+ ["OVERVIEW.md", OVERVIEW],
165
199
  ["package.json", `${JSON.stringify(packageJson, null, 2)}\n`],
166
200
  ["tsconfig.json", `${JSON.stringify(TSCONFIG, null, 2)}\n`],
167
201
  ["index.client.tsx", CLIENT_ENTRY],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/cli",
3
- "version": "0.11.0-beta.5",
3
+ "version": "0.11.0",
4
4
  "description": "Paseo CLI - control your AI coding agents from the command line",
5
5
  "bin": {
6
6
  "paseo": "bin/paseo"
@@ -28,9 +28,9 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@clack/prompts": "^1.0.0",
31
- "@getpaseo/client": "0.11.0-beta.5",
32
- "@getpaseo/protocol": "0.11.0-beta.5",
33
- "@getpaseo/server": "0.11.0-beta.5",
31
+ "@getpaseo/client": "0.11.0",
32
+ "@getpaseo/protocol": "0.11.0",
33
+ "@getpaseo/server": "0.11.0",
34
34
  "chalk": "^5.3.0",
35
35
  "commander": "^12.0.0",
36
36
  "mime-types": "^2.1.35",