steno-paseo 0.1.3 → 0.1.4
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 +5 -2
- package/package.json +4 -4
- package/server/programs.ts +6 -4
- package/server/vendor/host.mjs +34 -8
- package/server/vendor/programs.ts +3 -3
package/README.md
CHANGED
|
@@ -106,8 +106,10 @@ When a row has more actions than fit as buttons, the rest are behind its **more*
|
|
|
106
106
|
| Turn it off for a while | `paseo plugin disable steno` (and `enable` to bring it back) |
|
|
107
107
|
| Uninstall | `paseo plugin remove steno` |
|
|
108
108
|
|
|
109
|
-
The plugin unpacks its programs into `~/.paseo/plugin-data/steno
|
|
110
|
-
the
|
|
109
|
+
The plugin unpacks its programs into `~/.paseo/plugin-data/steno/` (under `$PASEO_HOME` when set),
|
|
110
|
+
one folder per version. Only the daemon's user can open that folder, and each file is checked against the
|
|
111
|
+
plugin's own copy before it runs. Removing the plugin leaves the folder behind, so delete it by hand if you
|
|
112
|
+
want the space back.
|
|
111
113
|
|
|
112
114
|
## Troubleshooting
|
|
113
115
|
|
|
@@ -130,6 +132,7 @@ steno: language server started: <name> <version>
|
|
|
130
132
|
| steno is missing from `paseo plugin ls` | Turn plugins on in Settings → Plugins, then install it again. |
|
|
131
133
|
| `cli failed` or `language server failed` in the log | Run `paseo plugin update steno`, then `paseo plugin reload steno`. If it keeps happening, [open an issue](https://github.com/rizanw/steno-spec/issues) and attach the log. |
|
|
132
134
|
| `could not unpack the bundled programs` | Make sure `~/.paseo/plugin-data/` is writable. |
|
|
135
|
+
| `… is not a folder owned by this user` | Another account owns `~/.paseo/plugin-data/steno/`. Remove it, or set `PASEO_HOME` to a folder the daemon's user owns. |
|
|
133
136
|
| A warning bar naming `npm install -g steno-spec@<version>` | Your agents' `steno` is missing, older than the plugin's or speaks a different protocol. Run that command on the machine where the daemon runs. |
|
|
134
137
|
| The panel says the steno server stopped | It crashed five times in a row. Choose **Restart steno Server**, and check the log if it stops again. |
|
|
135
138
|
| The install fails on `npm:` | npm must be on the daemon's `PATH` and able to reach the npm registry. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "steno-paseo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Shorthand specs in your agent panel: spec-driven development that is agent-agnostic and token-efficient.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"paseo",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
],
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@getpaseo/plugin": "0.16.2",
|
|
38
|
-
"@steno/core": "0.1.
|
|
39
|
-
"@steno/host": "0.1.
|
|
38
|
+
"@steno/core": "0.1.4",
|
|
39
|
+
"@steno/host": "0.1.4",
|
|
40
40
|
"@tanstack/react-query": "^5.90.11",
|
|
41
41
|
"@types/react": "~19.2.0",
|
|
42
42
|
"esbuild": "^0.28.2",
|
|
43
43
|
"react": "19.1.0",
|
|
44
44
|
"react-native": "0.81.5",
|
|
45
|
-
"steno-spec": "0.1.
|
|
45
|
+
"steno-spec": "0.1.4",
|
|
46
46
|
"vscode-jsonrpc": "^10.0.0",
|
|
47
47
|
"zod": "^4.4.3"
|
|
48
48
|
},
|
package/server/programs.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
// The bundled language server and CLI, embedded as text in server/vendor/programs.ts because Paseo evaluates the
|
|
2
2
|
// compiled server with no file path. @steno/host writes them to Paseo's data folder before the first start.
|
|
3
3
|
import type { ChildProcess, SpawnOptions } from 'node:child_process';
|
|
4
|
-
import {
|
|
4
|
+
import { homedir } from 'node:os';
|
|
5
5
|
import { join } from 'node:path';
|
|
6
6
|
import { programsDir, runProgram as runFrom, runToEnd as runToEndFrom, type CliExit, type ProgramSource } from './vendor/host.mjs';
|
|
7
7
|
import { HASH, PROGRAMS, SKILLS } from './vendor/programs';
|
|
8
8
|
|
|
9
9
|
type Program = keyof typeof PROGRAMS;
|
|
10
10
|
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Where the programs are written: beside Paseo's other plugin data, in Paseo's default home when PASEO_HOME is unset.
|
|
13
|
+
* Never the shared temp folder, where another local account could create the folder first.
|
|
14
|
+
*/
|
|
12
15
|
function dataDir(): string {
|
|
13
|
-
|
|
14
|
-
return home ? join(home, 'plugin-data', 'steno') : join(tmpdir(), 'steno-paseo');
|
|
16
|
+
return join(process.env.PASEO_HOME || join(homedir(), '.paseo'), 'plugin-data', 'steno');
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
/** The embedded programs, read from the environment each time so a changed PASEO_HOME is followed. */
|
package/server/vendor/host.mjs
CHANGED
|
@@ -3960,6 +3960,9 @@ var REVIEWABLE = ["requirements", "design", "tasks", "done"];
|
|
|
3960
3960
|
function canApprove(spec) {
|
|
3961
3961
|
return !unusable(spec) && spec.mode === "gated" && spec.phase !== void 0 && APPROVABLE.includes(spec.phase);
|
|
3962
3962
|
}
|
|
3963
|
+
function canApproveDocument(spec, document) {
|
|
3964
|
+
return canApprove(spec) && DOCUMENT_PHASE[document] === spec.phase;
|
|
3965
|
+
}
|
|
3963
3966
|
function specActions(spec) {
|
|
3964
3967
|
if (unusable(spec))
|
|
3965
3968
|
return [];
|
|
@@ -4023,7 +4026,7 @@ function act(actions, preferred) {
|
|
|
4023
4026
|
return { actions, primary: preferred.find((a) => actions.includes(a)) };
|
|
4024
4027
|
}
|
|
4025
4028
|
function documentActions(spec, document) {
|
|
4026
|
-
return
|
|
4029
|
+
return canApproveDocument(spec, document) ? ["approve", "open"] : ["open"];
|
|
4027
4030
|
}
|
|
4028
4031
|
function taskRowsOf(spec, parent, depth, rows) {
|
|
4029
4032
|
return rows.flatMap((task) => {
|
|
@@ -4432,19 +4435,41 @@ function atLeast(version, lowest) {
|
|
|
4432
4435
|
|
|
4433
4436
|
// ../host/dist/programs.js
|
|
4434
4437
|
import { spawn } from "node:child_process";
|
|
4435
|
-
import {
|
|
4438
|
+
import { chmodSync, lstatSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
4436
4439
|
import { dirname, join } from "node:path";
|
|
4440
|
+
function privateDir(dir) {
|
|
4441
|
+
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
4442
|
+
if (process.platform === "win32")
|
|
4443
|
+
return;
|
|
4444
|
+
const stat = lstatSync(dir);
|
|
4445
|
+
if (!stat.isDirectory() || stat.uid !== process.getuid?.())
|
|
4446
|
+
throw new Error(`${dir} is not a folder owned by this user`);
|
|
4447
|
+
if (stat.mode & 63)
|
|
4448
|
+
chmodSync(dir, 448);
|
|
4449
|
+
}
|
|
4450
|
+
function holdsBundle(root, embedded) {
|
|
4451
|
+
const same = (file, text2) => {
|
|
4452
|
+
try {
|
|
4453
|
+
return readFileSync(file, "utf8") === text2;
|
|
4454
|
+
} catch {
|
|
4455
|
+
return false;
|
|
4456
|
+
}
|
|
4457
|
+
};
|
|
4458
|
+
return Object.entries(embedded.programs).every(([name, text2]) => same(join(root, "vendor", name), text2)) && Object.entries(embedded.skills).every(([name, text2]) => same(join(root, "skills", ...name.split("/")), text2));
|
|
4459
|
+
}
|
|
4437
4460
|
function programsDir(source) {
|
|
4438
4461
|
if ("files" in source)
|
|
4439
4462
|
return source.files;
|
|
4440
4463
|
const { embedded, dataDir } = source;
|
|
4464
|
+
privateDir(dataDir);
|
|
4441
4465
|
const dir = join(dataDir, embedded.hash);
|
|
4442
|
-
if (!
|
|
4466
|
+
if (!holdsBundle(dir, embedded)) {
|
|
4467
|
+
rmSync(dir, { recursive: true, force: true });
|
|
4443
4468
|
const staging = `${dir}.${process.pid}.tmp`;
|
|
4444
4469
|
rmSync(staging, { recursive: true, force: true });
|
|
4445
4470
|
const put = (file, text2) => {
|
|
4446
|
-
mkdirSync(dirname(file), { recursive: true });
|
|
4447
|
-
writeFileSync(file, text2);
|
|
4471
|
+
mkdirSync(dirname(file), { recursive: true, mode: 448 });
|
|
4472
|
+
writeFileSync(file, text2, { mode: 384 });
|
|
4448
4473
|
};
|
|
4449
4474
|
try {
|
|
4450
4475
|
for (const [name, text2] of Object.entries(embedded.programs))
|
|
@@ -4454,7 +4479,7 @@ function programsDir(source) {
|
|
|
4454
4479
|
renameSync(staging, dir);
|
|
4455
4480
|
} catch (err) {
|
|
4456
4481
|
rmSync(staging, { recursive: true, force: true });
|
|
4457
|
-
if (!
|
|
4482
|
+
if (!holdsBundle(dir, embedded))
|
|
4458
4483
|
throw err;
|
|
4459
4484
|
}
|
|
4460
4485
|
}
|
|
@@ -4495,7 +4520,7 @@ function runToEnd(source, program, args, options = {}) {
|
|
|
4495
4520
|
|
|
4496
4521
|
// ../host/dist/agent-steno.js
|
|
4497
4522
|
import { spawn as spawn2 } from "node:child_process";
|
|
4498
|
-
import { existsSync
|
|
4523
|
+
import { existsSync } from "node:fs";
|
|
4499
4524
|
var VERSION_TIMEOUT_MS = 5e3;
|
|
4500
4525
|
function versionProtocol(text2) {
|
|
4501
4526
|
const m = /\(protocol (\d+)\)/.exec(text2);
|
|
@@ -4528,7 +4553,7 @@ function runLaunch(launch) {
|
|
|
4528
4553
|
async function checkAgentSteno(options) {
|
|
4529
4554
|
const { env, bundled } = options;
|
|
4530
4555
|
const expected = options.protocol ?? PROTOCOL_VERSION;
|
|
4531
|
-
const program = findOnPath("steno", env, options.exists ??
|
|
4556
|
+
const program = findOnPath("steno", env, options.exists ?? existsSync);
|
|
4532
4557
|
if (!program)
|
|
4533
4558
|
return { found: false, matches: false, bundled };
|
|
4534
4559
|
const launch = versionLaunch(program, env.windows);
|
|
@@ -4916,6 +4941,7 @@ export {
|
|
|
4916
4941
|
bareName,
|
|
4917
4942
|
callForm,
|
|
4918
4943
|
canApprove,
|
|
4944
|
+
canApproveDocument,
|
|
4919
4945
|
checkAgentSteno,
|
|
4920
4946
|
cmdLine,
|
|
4921
4947
|
convertDiagnostics,
|