@edspencer/paddock 0.81.0 → 0.82.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/package.json +1 -1
- package/packages/server/dist/cli/args.d.ts +56 -31
- package/packages/server/dist/cli/args.js +210 -24
- package/packages/server/dist/cli/busy-command.js +1 -1
- package/packages/server/dist/cli/busy.js +10 -12
- package/packages/server/dist/cli/exit-codes.d.ts +21 -45
- package/packages/server/dist/cli/exit-codes.js +42 -45
- package/packages/server/dist/cli/output.js +5 -6
- package/packages/server/dist/cli/paddock.js +60 -30
- package/packages/server/dist/cli/service/index.d.ts +54 -2
- package/packages/server/dist/cli/service/index.js +198 -25
- package/packages/server/dist/cli/service/launchd.d.ts +31 -84
- package/packages/server/dist/cli/service/launchd.js +104 -304
- package/packages/server/dist/cli/service/logs.d.ts +9 -28
- package/packages/server/dist/cli/service/logs.js +33 -75
- package/packages/server/dist/cli/service/manager.d.ts +93 -0
- package/packages/server/dist/cli/service/manager.js +21 -0
- package/packages/server/dist/cli/service/path-env.d.ts +7 -18
- package/packages/server/dist/cli/service/path-env.js +30 -81
- package/packages/server/dist/cli/service/ready.d.ts +30 -0
- package/packages/server/dist/cli/service/ready.js +35 -0
- package/packages/server/dist/cli/service/spec.d.ts +4 -31
- package/packages/server/dist/cli/service/spec.js +9 -0
- package/packages/server/dist/cli/service/systemd.d.ts +27 -101
- package/packages/server/dist/cli/service/systemd.js +106 -235
- package/packages/server/dist/cli/update/health.d.ts +48 -0
- package/packages/server/dist/cli/update/health.js +64 -0
- package/packages/server/dist/cli/update/install-method.d.ts +84 -0
- package/packages/server/dist/cli/update/install-method.js +183 -0
- package/packages/server/dist/cli/update/lock.d.ts +35 -0
- package/packages/server/dist/cli/update/lock.js +74 -0
- package/packages/server/dist/cli/update/package-manager.d.ts +74 -0
- package/packages/server/dist/cli/update/package-manager.js +156 -0
- package/packages/server/dist/cli/update/registry.d.ts +52 -0
- package/packages/server/dist/cli/update/registry.js +102 -0
- package/packages/server/dist/cli/update/semver.d.ts +45 -0
- package/packages/server/dist/cli/update/semver.js +182 -0
- package/packages/server/dist/cli/update/update-check.d.ts +69 -0
- package/packages/server/dist/cli/update/update-check.js +86 -0
- package/packages/server/dist/cli/update/update.d.ts +126 -0
- package/packages/server/dist/cli/update/update.js +408 -0
- package/packages/server/dist/cli/update-command.d.ts +20 -0
- package/packages/server/dist/cli/update-command.js +111 -0
- package/packages/server/package.json +1 -1
- package/packages/web/dist/assets/{DeleteProjectDialog-D8oIJ8HC.js → DeleteProjectDialog-CgHpQctt.js} +1 -1
- package/packages/web/dist/assets/DiscoverPage-CG6cf-0i.js +2 -0
- package/packages/web/dist/assets/{DiscoverView-o0KCr3aB.js → DiscoverView-BKqI0I1E.js} +1 -1
- package/packages/web/dist/assets/{InstanceConfigPage-RSJz7oL3.js → InstanceConfigPage-DL3raCK1.js} +1 -1
- package/packages/web/dist/assets/{MarkdownRenderer-39mafH8b.js → MarkdownRenderer-DcjEuf3s.js} +1 -1
- package/packages/web/dist/assets/{ProjectRedirect-Bq7GVguY.js → ProjectRedirect-DerkA-nE.js} +1 -1
- package/packages/web/dist/assets/{ProjectView-BoBIru1g.js → ProjectView-NwfC3_w7.js} +3 -3
- package/packages/web/dist/assets/{ProjectsGrid-mJ4gqbr6.js → ProjectsGrid-BeORa0UH.js} +1 -1
- package/packages/web/dist/assets/{RootHome-C0kwFyYp.js → RootHome-BYJs8qJ6.js} +1 -1
- package/packages/web/dist/assets/{Surfaces-MkhXlB8z.js → Surfaces-w-kEaAYU.js} +1 -1
- package/packages/web/dist/assets/{arc-DExlwAwO.js → arc-Bv56hasM.js} +1 -1
- package/packages/web/dist/assets/{architectureDiagram-3BPJPVTR-CZly3W79.js → architectureDiagram-3BPJPVTR-BHEknx9i.js} +1 -1
- package/packages/web/dist/assets/{blockDiagram-GPEHLZMM-AgES73i3.js → blockDiagram-GPEHLZMM-DtxTMrPX.js} +1 -1
- package/packages/web/dist/assets/{c4Diagram-AAUBKEIU-N9mD8Pfk.js → c4Diagram-AAUBKEIU-DRpEYOlM.js} +1 -1
- package/packages/web/dist/assets/channel-CdIiAqY2.js +2 -0
- package/packages/web/dist/assets/{chunk-2J33WTMH-Dsx_kfUl.js → chunk-2J33WTMH-S4s7GCg7.js} +1 -1
- package/packages/web/dist/assets/{chunk-4BX2VUAB-BQjqcjPj.js → chunk-4BX2VUAB-BkWVPLf1.js} +1 -1
- package/packages/web/dist/assets/{chunk-55IACEB6-CCxpYQpY.js → chunk-55IACEB6-4-FQp01F.js} +1 -1
- package/packages/web/dist/assets/{chunk-727SXJPM-DpFRdnUa.js → chunk-727SXJPM-BeyDWdIb.js} +1 -1
- package/packages/web/dist/assets/{chunk-AQP2D5EJ-D2BAlzoO.js → chunk-AQP2D5EJ-ZSxKy745.js} +1 -1
- package/packages/web/dist/assets/{chunk-FMBD7UC4-BFaMRzUF.js → chunk-FMBD7UC4-Bq8uV9j-.js} +1 -1
- package/packages/web/dist/assets/{chunk-ND2GUHAM-B9NGJ9xZ.js → chunk-ND2GUHAM-BOFsRyHk.js} +1 -1
- package/packages/web/dist/assets/{chunk-QZHKN3VN-CF1IHyMS.js → chunk-QZHKN3VN-uZ6oNc4m.js} +1 -1
- package/packages/web/dist/assets/classDiagram-4FO5ZUOK-DCCUHba0.js +2 -0
- package/packages/web/dist/assets/classDiagram-v2-Q7XG4LA2-DCCUHba0.js +2 -0
- package/packages/web/dist/assets/{core-XjElsvQ7.js → core-CYuJAM2U.js} +1 -1
- package/packages/web/dist/assets/{cose-bilkent-S5V4N54A-CF972Flx.js → cose-bilkent-S5V4N54A-DIzkVSFb.js} +1 -1
- package/packages/web/dist/assets/{dagre-BM42HDAG-DsneI8YE.js → dagre-BM42HDAG-CHR6jJBv.js} +1 -1
- package/packages/web/dist/assets/{diagram-2AECGRRQ-BHyrVzIk.js → diagram-2AECGRRQ-BAFXCH8Q.js} +1 -1
- package/packages/web/dist/assets/{diagram-5GNKFQAL-Dj4q8xEi.js → diagram-5GNKFQAL-BJ5t5gbz.js} +1 -1
- package/packages/web/dist/assets/{diagram-KO2AKTUF-BHe3Puv_.js → diagram-KO2AKTUF-D9Xt0IVg.js} +1 -1
- package/packages/web/dist/assets/{diagram-LMA3HP47-wzt6G2FE.js → diagram-LMA3HP47-Bq38u6sy.js} +1 -1
- package/packages/web/dist/assets/{diagram-OG6HWLK6-CZMbMRJq.js → diagram-OG6HWLK6-CMQVqkpi.js} +1 -1
- package/packages/web/dist/assets/{documentTitle-BwTIA8rI.js → documentTitle-M1lrfXRU.js} +1 -1
- package/packages/web/dist/assets/{erDiagram-TEJ5UH35-Dtu14BL1.js → erDiagram-TEJ5UH35-C63M1g9b.js} +1 -1
- package/packages/web/dist/assets/{flowDiagram-I6XJVG4X-T34ql9j0.js → flowDiagram-I6XJVG4X-D3j8ACN7.js} +1 -1
- package/packages/web/dist/assets/{ganttDiagram-6RSMTGT7-DQLOeCXK.js → ganttDiagram-6RSMTGT7-B1Fd1A2Y.js} +1 -1
- package/packages/web/dist/assets/{gitGraphDiagram-PVQCEYII-Bk11zea6.js → gitGraphDiagram-PVQCEYII-CEhZhDdR.js} +1 -1
- package/packages/web/dist/assets/{index-CvaWErFv.js → index-1E9yHciS.js} +2 -2
- package/packages/web/dist/assets/{infoDiagram-5YYISTIA-CsE83lu0.js → infoDiagram-5YYISTIA-Ctquaew6.js} +1 -1
- package/packages/web/dist/assets/{ishikawaDiagram-YF4QCWOH-DNVgA93n.js → ishikawaDiagram-YF4QCWOH-DV4GvA1R.js} +1 -1
- package/packages/web/dist/assets/{journeyDiagram-JHISSGLW-CLpSNjM3.js → journeyDiagram-JHISSGLW-C_Cy9waA.js} +1 -1
- package/packages/web/dist/assets/{kanban-definition-UN3LZRKU-BRzuXcKr.js → kanban-definition-UN3LZRKU-CGr9ctEf.js} +1 -1
- package/packages/web/dist/assets/{linear-BxOawONt.js → linear-D3U8NOkt.js} +1 -1
- package/packages/web/dist/assets/{mermaid.core-Dvs1QCcz.js → mermaid.core-BiArdWKV.js} +4 -4
- package/packages/web/dist/assets/{mindmap-definition-RKZ34NQL-Dmt7pYwF.js → mindmap-definition-RKZ34NQL-CZIpzj8Z.js} +1 -1
- package/packages/web/dist/assets/{pieDiagram-4H26LBE5-BHiZaJD-.js → pieDiagram-4H26LBE5-1MaeS3rt.js} +1 -1
- package/packages/web/dist/assets/{quadrantDiagram-W4KKPZXB-U0A1noRE.js → quadrantDiagram-W4KKPZXB-B5pgQ54e.js} +1 -1
- package/packages/web/dist/assets/{requirementDiagram-4Y6WPE33-CZLsr6yi.js → requirementDiagram-4Y6WPE33-BNnxrpGr.js} +1 -1
- package/packages/web/dist/assets/{sankeyDiagram-5OEKKPKP-BTlLGILU.js → sankeyDiagram-5OEKKPKP-DsxVH-hM.js} +1 -1
- package/packages/web/dist/assets/{sequenceDiagram-3UESZ5HK-DpSS_Gb1.js → sequenceDiagram-3UESZ5HK-Ke9LcFZI.js} +1 -1
- package/packages/web/dist/assets/{stateDiagram-AJRCARHV-D9srE-tV.js → stateDiagram-AJRCARHV-UJzmflND.js} +1 -1
- package/packages/web/dist/assets/stateDiagram-v2-BHNVJYJU-DgUc3HkP.js +2 -0
- package/packages/web/dist/assets/{timeline-definition-PNZ67QCA-BYQ5CKab.js → timeline-definition-PNZ67QCA-BRjNALVI.js} +1 -1
- package/packages/web/dist/assets/{vennDiagram-CIIHVFJN-B4W2CtSV.js → vennDiagram-CIIHVFJN-ClMAspxz.js} +1 -1
- package/packages/web/dist/assets/{wardley-L42UT6IY--XUV7GvD.js → wardley-L42UT6IY-UPv4JEmz.js} +1 -1
- package/packages/web/dist/assets/{wardleyDiagram-YWT4CUSO-Bl2VIEGY.js → wardleyDiagram-YWT4CUSO-BgYJbdEx.js} +1 -1
- package/packages/web/dist/assets/{xychartDiagram-2RQKCTM6-Bj2H9Rcf.js → xychartDiagram-2RQKCTM6-Bfk5HjGx.js} +1 -1
- package/packages/web/dist/index.html +1 -1
- package/packages/web/dist/sw.js +1 -1
- package/packages/server/dist/cli/service/backend.d.ts +0 -115
- package/packages/server/dist/cli/service/backend.js +0 -19
- package/packages/web/dist/assets/DiscoverPage-CQlzxsn4.js +0 -2
- package/packages/web/dist/assets/channel-ExsAG7qT.js +0 -2
- package/packages/web/dist/assets/classDiagram-4FO5ZUOK-si7g9okq.js +0 -2
- package/packages/web/dist/assets/classDiagram-v2-Q7XG4LA2-si7g9okq.js +0 -2
- package/packages/web/dist/assets/stateDiagram-v2-BHNVJYJU-AxWqsDh-.js +0 -2
package/package.json
CHANGED
|
@@ -77,10 +77,41 @@ export interface CliOptions {
|
|
|
77
77
|
*
|
|
78
78
|
* The refusal it skips is the only thing it skips. It does not change what the
|
|
79
79
|
* busy check printed — a forced stop prints the same sentence, prefixed
|
|
80
|
-
* `Overriding:` — and
|
|
81
|
-
*
|
|
80
|
+
* `Overriding:` — and on `update` it skips the busy check and nothing else:
|
|
81
|
+
* the health check and the rollback still run (SPEC §1).
|
|
82
82
|
*/
|
|
83
83
|
force?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* `update`: report what a new version would be, and change nothing
|
|
86
|
+
* (SPEC §1, §5 step 4).
|
|
87
|
+
*
|
|
88
|
+
* Named `checkOnly` rather than `check` because `check` reads as a verb in a
|
|
89
|
+
* bag of flags that also carries `write` and `follow`; `update-command.ts`
|
|
90
|
+
* maps it back to the contract's `--check` at the one seam.
|
|
91
|
+
*/
|
|
92
|
+
checkOnly?: boolean;
|
|
93
|
+
/** `update --to <version|tag>`: the only way to move to a LOWER version. */
|
|
94
|
+
to?: string;
|
|
95
|
+
/**
|
|
96
|
+
* `update --yes`: do not ask.
|
|
97
|
+
*
|
|
98
|
+
* Required when there is no TTY, where a command that would have asked exits
|
|
99
|
+
* 2 instead of guessing (SPEC §1, §3). That asymmetry is deliberate: a
|
|
100
|
+
* scripted update that silently assumed yes would be a restart nobody asked
|
|
101
|
+
* for, and one that silently assumed no would be a no-op reported as success.
|
|
102
|
+
*/
|
|
103
|
+
yes?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* `service install --refresh`: re-render the unit, keeping the settings the
|
|
106
|
+
* EXISTING one carries (SPEC §1, §5 step 11).
|
|
107
|
+
*
|
|
108
|
+
* This is the hand-over `update` performs: the NEW version writes the unit,
|
|
109
|
+
* in its own format, with the port and data dir the OLD one recorded. It
|
|
110
|
+
* needs an installed unit — with nothing to refresh it exits 4 rather than
|
|
111
|
+
* quietly performing a first install with defaults, which is how a
|
|
112
|
+
* `--port 9000` service comes back on 7233.
|
|
113
|
+
*/
|
|
114
|
+
refresh?: boolean;
|
|
84
115
|
}
|
|
85
116
|
/**
|
|
86
117
|
* A failure with an exit code attached (SPEC §2).
|
|
@@ -135,7 +166,7 @@ export type ConfigAction = (typeof CONFIG_ACTIONS)[number];
|
|
|
135
166
|
* Paddock and Managers, every existing service unit's `ExecStart` names it, and
|
|
136
167
|
* it is in two years of other people's scripts. They parse to the same command.
|
|
137
168
|
*/
|
|
138
|
-
export declare const VERBS: readonly ["serve", "start", "service", "config", "busy"];
|
|
169
|
+
export declare const VERBS: readonly ["serve", "start", "service", "config", "busy", "update", "upgrade"];
|
|
139
170
|
/**
|
|
140
171
|
* A parsed invocation: which verb, plus the flags that followed it.
|
|
141
172
|
*
|
|
@@ -159,33 +190,17 @@ export type Command = {
|
|
|
159
190
|
| {
|
|
160
191
|
verb: "busy";
|
|
161
192
|
opts: CliOptions;
|
|
162
|
-
}
|
|
193
|
+
}
|
|
163
194
|
/**
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* fall out of that, both of which matter more than the flexibility given up:
|
|
169
|
-
*
|
|
170
|
-
* - **Bare `paddock` is untouched.** No verb means the whole argv goes to
|
|
171
|
-
* {@link parseArgs} exactly as before, so the demo path cannot change
|
|
172
|
-
* behaviour, and an unrecognised leading token still produces `unknown
|
|
173
|
-
* option:` from the flag loop rather than a new and different error.
|
|
174
|
-
* - **Flags parse after a verb**, so `paddock start --port 7299` and
|
|
175
|
-
* `paddock service install --port 7299` both work, and the flag grammar is
|
|
176
|
-
* the same one in every position.
|
|
177
|
-
*
|
|
178
|
-
* A verb is only a verb in first position: `paddock --port start` is an error
|
|
179
|
-
* from `--port`, not a `start` invocation, and `paddock start start` is still
|
|
180
|
-
* `unknown option`.
|
|
181
|
-
*
|
|
182
|
-
* That first half used to claim a *missing-value* error, which was wrong (#823):
|
|
183
|
-
* `next()` only rejects `undefined`, so `start` was happily consumed as the port
|
|
184
|
-
* and became `NaN` in `config.ts`. It is now a **value** error — `--port needs a
|
|
185
|
-
* number between 1 and 65535` — which is the behaviour the claim was reaching
|
|
186
|
-
* for. Corrected rather than deleted because the grammar it documents is real
|
|
187
|
-
* and load-bearing; it was only the example's error that was misdescribed.
|
|
195
|
+
* `update` (SPEC §1, §5). `upgrade` is a HIDDEN alias: the spec requires it
|
|
196
|
+
* be accepted, and deliberately does not list it in the help — one name in
|
|
197
|
+
* the documentation, two that work, so nobody has to remember which word this
|
|
198
|
+
* tool chose.
|
|
188
199
|
*/
|
|
200
|
+
| {
|
|
201
|
+
verb: "update";
|
|
202
|
+
opts: CliOptions;
|
|
203
|
+
};
|
|
189
204
|
export declare function parseCommand(argv: string[]): Command;
|
|
190
205
|
export declare function parseArgs(argv: string[]): CliOptions;
|
|
191
206
|
/**
|
|
@@ -211,8 +226,18 @@ export declare function explainListenError(err: unknown, host: string, port: str
|
|
|
211
226
|
* bury the one line explaining what went wrong. The full text is one
|
|
212
227
|
* `--help` away, and the last line here says so.
|
|
213
228
|
*/
|
|
214
|
-
export declare const USAGE_SYNOPSIS = "Usage\n paddock [serve] [options] run the server in this terminal\n paddock service <action> [options] install|uninstall|status|start|stop|restart|logs\n paddock busy [--json] is the running instance busy?\n paddock config <show|eject> [options] what this instance's config resolved to\n paddock -v | --version print the version and exit\n paddock -h | --help the full help";
|
|
215
|
-
export declare const USAGE = "paddock \u2014 run a Paddock instance locally\n\nUsage\n npx @edspencer/paddock [options] run the server (the default)\n paddock serve [options] the same thing, said out loud\n (`paddock start` is a permanent alias)\n paddock service install [options] run it in the background from login\n paddock service uninstall stop it and remove the unit\n paddock service status [--json] installed? running? which version?\n paddock service start start an installed service\n paddock service stop [--force] stop it, leave it installed\n paddock service restart [--force] stop it and start it again\n paddock service logs [-f] [-n <lines>] the service's log\n (`paddock service --help`)\n paddock busy [--json] is it busy? exit 0 no, 75 yes, 3\n nothing answering\n (`paddock busy --help`)\n paddock config show [--resolved] what this instance's config resolved\n to, and where each value came from\n paddock config eject [--write] freeze that resolution into\n paddock.config.yaml\n (`paddock config --help`)\n\nOptions\n -p, --port <port> HTTP/WS port (default 7233, or $PORT)\n --host <host> Bind address (default 127.0.0.1)\n -d, --data-dir <path> Projects + state (default ~/.paddock, or $PADDOCK_DATA_DIR)\n -o, --open Open the app in your browser once it is listening\n --verbose Show the server's own logs (quiet by default)\n -v, --version Print the Paddock version and exit\n -h, --help Show this help\n\nExit codes\n 0 done; running and answering; not busy\n 1 failed\n 2 usage: an unknown command or flag, or a bad value\n 3 not running: installed, but not running or not answering; nothing answers\n 4 not installed: there is no service unit\n 75 busy: refused, and why was printed. Try later, or use --force\n\nOpening your own directories\n Where you run this from does not matter \u2014 the instance is decided by its data\n dir alone. Directories are added inside the app, on the Discover screen: it\n reads your Claude Code history, lists the directories you have worked in, and\n links the ones you tick as projects. A new instance opens on it.\n\n Importing a directory does not write into it. No .paddock/, no .chats/, no\n .gitignore edits, no CLAUDE.md \u2014 the project record and the copied transcripts\n both live in the data dir, and the project just points at the path. Your own\n ~/.claude transcripts are copied, never moved or deleted, so your terminal\n `claude` keeps working exactly as before.\n\nCredentials\n Paddock drives Claude Code, so it needs Claude credentials \u2014 and if you\n already use Claude Code on this machine, it uses the login you already have.\n That is a macOS Keychain entry on a Mac, or your ~/.claude/.credentials.json\n elsewhere (symlinked in, never copied). Reading a login writes nothing.\n\n Otherwise: a CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY in the environment,\n or a one-off `CLAUDE_CONFIG_DIR=<data-dir>/claude-home claude login`. With no\n login at all anywhere, run `claude setup-token`. Paddock says at startup when\n it can find none.\n\nPosture profiles\n One key picks how much Paddock shares and how much its agents may do:\n\n profile: balanced # paranoid | balanced | yolo (PADDOCK_PROFILE)\n\n paranoid shares nothing but the login and turns every capability off \u2014 the\n behaviour Paddock had before profiles existed. balanced (the default)\n inherits the CAPABILITIES your CLI already has \u2014 instructions, MCP servers,\n plugins \u2014 and adds the read-only self-management tools, while keeping your\n chat history Paddock's own. yolo turns the rest on: your transcripts, host\n hooks, the write and project tools, schedule mutation, deeper spawning, the\n browser.\n\n A profile only sets defaults \u2014 any single key still overrides it, and an\n individual key in the config file beats PADDOCK_PROFILE in the environment.\n Profiles never touch your port, bind address, auth or model list: yolo does\n NOT open the bind or relax auth, which stay a separate, explicit decision.\n\n What host actually reaches depends on the machine \u2014 a workstation has a real\n ~/.claude, a container usually has none. The profile sets the levers, the\n environment sets the blast radius.\n\n To see what your profile actually expanded to on THIS machine, with the layer\n each value came from: paddock config show --resolved\n\nSharing your Claude Code state\n Apart from that login, Paddock writes nothing outside its data dir by\n default: transcripts go to each project's .chats/, and your ~/.claude is read\n for config only. Each thing it can share is one key in\n <data-dir>/paddock.config.yaml, and each defaults to whatever your profile\n says (see Posture profiles below):\n\n claude:\n transcripts: host # own | host host on yolo only\n credentials: host # own | host host on every profile\n instructions: host # own | host own on paranoid, else host\n hooks: host # own | host host on yolo only\n mcpServers: host # own | host own on paranoid, else host\n\n transcripts: host makes a chat and a `claude --resume` in the same directory\n the same file, live in both directions; deleting such a chat in Paddock\n releases it rather than removing it, because it is your history rather than\n Paddock's copy. credentials: own is the opt-out from sharing the login above.\n\n instructions: host loads your ~/.claude CLAUDE.md, agents/, commands/ and\n plugins/. On from balanced up, so your curated CLAUDE.md does reach Paddock's\n agents; profile: paranoid or instructions: own keeps it out. Each project's\n own CLAUDE.md applies either way.\n\n hooks: host runs the shell commands your ~/.claude/settings.json binds to\n tool use. Off by default \u2014 inheriting someone's hooks is not something to\n discover after the fact. Its other keys (permissions, model, statusline)\n apply either way: under hooks: own Paddock writes its own settings.json\n carrying them with hooks dropped, regenerated at startup.\n\n mcpServers: host attaches the MCP servers declared in your ~/.claude.json \u2014\n the top-level ones, plus a project's own when its directory matches. To give\n this instance a server your machine doesn't have, declare it instead in a\n sibling mcpServers: block of the same file; use env:VAR_NAME anywhere a\n string goes so tokens stay out of it. That keeps a token out of the file, not\n out of `ps`: leave driveMode on its default (session) for a server holding\n one, since batch passes the definition to claude as a command-line argument.\n\nYour data\n Everything lives in one directory \u2014 ~/.paddock unless you pass --data-dir.\n Projects, chat transcripts and settings all persist there between runs. Move\n that directory to move your instance; delete it to start over. Nothing is\n stored anywhere else.\n\nNotes\n Binds loopback with authentication disabled, which is safe for a laptop. To\n expose it on a network, set PADDOCK_AUTH_MODE first \u2014 Paddock refuses to bind\n a routable interface wide open. See AUTH.md.\n\nDocs: https://github.com/edspencer/paddock";
|
|
216
|
-
export declare const SERVICE_USAGE = "paddock service \u2014 keep Paddock running in the background\n\nUsage\n paddock service install [options] register it and start it now\n paddock service uninstall stop it and deregister it\n paddock service status [--json] is it registered, is it running, which\n version, where are the logs\n paddock service start start an installed service that is stopped\n paddock service stop [--force] stop it, and leave it installed\n paddock service restart [--force] stop it and start it again, re-reading config\n paddock service logs [-f] [-n <n>] the service's log (the last 50 lines)\n\nOptions (logs)\n -f, --follow keep printing what gets appended, until Ctrl-C\n -n, --lines <n> how many lines to print first (default 50)\n\nOptions (stop, restart)\n --force stop it even though it is busy\n\nBusy\n `stop` and `restart` ask the running instance whether it is busy first, and\n refuse with exit 75 if it is \u2014 a chat turn in flight, a background task, a\n scheduled job. `paddock busy` asks the same question on its own.\n\n Being refused is the useful case: a restart kills a chat turn mid-sentence,\n and the turn cannot be resumed from where it was. Wait, or --force.\n\n `uninstall` does not ask. Removing the service is an explicit act, and\n someone uninstalling it has already decided.\n\nOptions (install only \u2014 recorded in the generated unit)\n -p, --port <port> HTTP/WS port (default 7233)\n --host <host> Bind address (default 127.0.0.1)\n -d, --data-dir <path> Only if you want an instance SEPARATE from your\n terminal one. Left out of the unit when you omit it\n AND `PADDOCK_DATA_DIR` is unset in this shell, so\n `paddock service` and a bare `paddock` are the same\n ~/.paddock instance reached two ways. If\n `PADDOCK_DATA_DIR` IS set here, that path is recorded\n in the unit \u2014 the service would otherwise point\n somewhere your terminal does not.\n --verbose Record the server's own logs, not just warnings\n\nAt login, not at boot\n This registers a per-USER service \u2014 a launchd LaunchAgent on macOS, a\n `systemd --user` unit on Linux \u2014 so it runs as you, with your own Claude\n login. That is not incidental: on macOS your Claude login is a Keychain item\n that only a logged-in user session can read. A boot-time system daemon has no\n such session and could not use it.\n\n So Paddock starts when you LOG IN, not when the machine boots. After a\n restart that nobody logs into, Paddock is not running. That is the design, not\n a fault.\n\n On Linux, a user service is also stopped when you log out. To keep it up:\n\n loginctl enable-linger $USER\n\nWhere it lives\n macOS ~/Library/LaunchAgents/net.edspencer.paddock.plist\n Linux ~/.config/systemd/user/paddock.service\n\n Both write stdout and stderr to ONE file, <data-dir>/logs/service.log, which\n is what `paddock service logs` reads. Not the journal on Linux: a volatile\n journal has nothing in it after the reboot you are asking about, and one file\n means one answer to \"where are the logs\" on every OS. Paddock rotates it\n itself at 8 MB, keeping three older generations beside it.\n\nExit codes\n 0 it is installed, running and answering\n 3 installed, but not running or not answering\n 4 not installed: there is no unit (status, logs, start, stop, restart)\n 1 something failed\n 2 usage: an unknown action or flag, or a bad value\n 75 busy, and --force was not given (stop, restart)\n\nInstalled from npx?\n `service install` refuses. An npx cache path is hash-keyed and npm may prune\n it, so the unit would work until it silently didn't, at some future login.\n Install properly first:\n\n npm i -g @edspencer/paddock && paddock service install\n\nA note on access\n Paddock binds loopback with authentication off, which is right for a laptop.\n A service is up for as long as you are logged in rather than as long as a\n terminal tab, so that window is longer \u2014 but it is not wider: any local\n process that could reach the port could already read the same Claude login as\n you. Set PADDOCK_AUTH_MODE if you want a credential on it anyway.\n\nDocs: https://github.com/edspencer/paddock";
|
|
229
|
+
export declare const USAGE_SYNOPSIS = "Usage\n paddock [serve] [options] run the server in this terminal\n paddock service <action> [options] install|uninstall|status|start|stop|restart|logs\n paddock busy [--json] is the running instance busy?\n paddock update [--check] [--to <v>] install a newer Paddock\n paddock config <show|eject> [options] what this instance's config resolved to\n paddock -v | --version print the version and exit\n paddock -h | --help the full help";
|
|
230
|
+
export declare const USAGE = "paddock \u2014 run a Paddock instance locally\n\nUsage\n npx @edspencer/paddock [options] run the server (the default)\n paddock serve [options] the same thing, said out loud\n (`paddock start` is a permanent alias)\n paddock service install [options] run it in the background from login\n paddock service uninstall stop it and remove the unit\n paddock service status [--json] installed? running? which version?\n paddock service start start an installed service\n paddock service stop [--force] stop it, leave it installed\n paddock service restart [--force] stop it and start it again\n paddock service logs [-f] [-n <lines>] the service's log\n (`paddock service --help`)\n paddock busy [--json] is it busy? exit 0 no, 75 yes, 3\n nothing answering\n (`paddock busy --help`)\n paddock update [--check] [--to <v>] install a newer Paddock and restart\n the service\n (`paddock update --help`)\n paddock config show [--resolved] what this instance's config resolved\n to, and where each value came from\n paddock config eject [--write] freeze that resolution into\n paddock.config.yaml\n (`paddock config --help`)\n\nOptions\n -p, --port <port> HTTP/WS port (default 7233, or $PORT)\n --host <host> Bind address (default 127.0.0.1)\n -d, --data-dir <path> Projects + state (default ~/.paddock, or $PADDOCK_DATA_DIR)\n -o, --open Open the app in your browser once it is listening\n --verbose Show the server's own logs (quiet by default)\n -v, --version Print the Paddock version and exit\n -h, --help Show this help\n\nExit codes\n 0 done; running and answering; up to date; not busy\n 1 failed\n 2 usage: an unknown command or flag, or a bad value\n 3 not running: installed, but not running or not answering; nothing answers\n 4 not installed: there is no service unit\n 5 this install cannot update itself; the right command was printed (update)\n 6 the update failed and was rolled back; the old version is back (update)\n 7 the update failed and could not be rolled back; a person is needed\n 75 busy: refused, and why was printed. Try later, or use --force\n\nOpening your own directories\n Where you run this from does not matter \u2014 the instance is decided by its data\n dir alone. Directories are added inside the app, on the Discover screen: it\n reads your Claude Code history, lists the directories you have worked in, and\n links the ones you tick as projects. A new instance opens on it.\n\n Importing a directory does not write into it. No .paddock/, no .chats/, no\n .gitignore edits, no CLAUDE.md \u2014 the project record and the copied transcripts\n both live in the data dir, and the project just points at the path. Your own\n ~/.claude transcripts are copied, never moved or deleted, so your terminal\n `claude` keeps working exactly as before.\n\nCredentials\n Paddock drives Claude Code, so it needs Claude credentials \u2014 and if you\n already use Claude Code on this machine, it uses the login you already have.\n That is a macOS Keychain entry on a Mac, or your ~/.claude/.credentials.json\n elsewhere (symlinked in, never copied). Reading a login writes nothing.\n\n Otherwise: a CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY in the environment,\n or a one-off `CLAUDE_CONFIG_DIR=<data-dir>/claude-home claude login`. With no\n login at all anywhere, run `claude setup-token`. Paddock says at startup when\n it can find none.\n\nPosture profiles\n One key picks how much Paddock shares and how much its agents may do:\n\n profile: balanced # paranoid | balanced | yolo (PADDOCK_PROFILE)\n\n paranoid shares nothing but the login and turns every capability off \u2014 the\n behaviour Paddock had before profiles existed. balanced (the default)\n inherits the CAPABILITIES your CLI already has \u2014 instructions, MCP servers,\n plugins \u2014 and adds the read-only self-management tools, while keeping your\n chat history Paddock's own. yolo turns the rest on: your transcripts, host\n hooks, the write and project tools, schedule mutation, deeper spawning, the\n browser.\n\n A profile only sets defaults \u2014 any single key still overrides it, and an\n individual key in the config file beats PADDOCK_PROFILE in the environment.\n Profiles never touch your port, bind address, auth or model list: yolo does\n NOT open the bind or relax auth, which stay a separate, explicit decision.\n\n What host actually reaches depends on the machine \u2014 a workstation has a real\n ~/.claude, a container usually has none. The profile sets the levers, the\n environment sets the blast radius.\n\n To see what your profile actually expanded to on THIS machine, with the layer\n each value came from: paddock config show --resolved\n\nSharing your Claude Code state\n Apart from that login, Paddock writes nothing outside its data dir by\n default: transcripts go to each project's .chats/, and your ~/.claude is read\n for config only. Each thing it can share is one key in\n <data-dir>/paddock.config.yaml, and each defaults to whatever your profile\n says (see Posture profiles below):\n\n claude:\n transcripts: host # own | host host on yolo only\n credentials: host # own | host host on every profile\n instructions: host # own | host own on paranoid, else host\n hooks: host # own | host host on yolo only\n mcpServers: host # own | host own on paranoid, else host\n\n transcripts: host makes a chat and a `claude --resume` in the same directory\n the same file, live in both directions; deleting such a chat in Paddock\n releases it rather than removing it, because it is your history rather than\n Paddock's copy. credentials: own is the opt-out from sharing the login above.\n\n instructions: host loads your ~/.claude CLAUDE.md, agents/, commands/ and\n plugins/. On from balanced up, so your curated CLAUDE.md does reach Paddock's\n agents; profile: paranoid or instructions: own keeps it out. Each project's\n own CLAUDE.md applies either way.\n\n hooks: host runs the shell commands your ~/.claude/settings.json binds to\n tool use. Off by default \u2014 inheriting someone's hooks is not something to\n discover after the fact. Its other keys (permissions, model, statusline)\n apply either way: under hooks: own Paddock writes its own settings.json\n carrying them with hooks dropped, regenerated at startup.\n\n mcpServers: host attaches the MCP servers declared in your ~/.claude.json \u2014\n the top-level ones, plus a project's own when its directory matches. To give\n this instance a server your machine doesn't have, declare it instead in a\n sibling mcpServers: block of the same file; use env:VAR_NAME anywhere a\n string goes so tokens stay out of it. That keeps a token out of the file, not\n out of `ps`: leave driveMode on its default (session) for a server holding\n one, since batch passes the definition to claude as a command-line argument.\n\nYour data\n Everything lives in one directory \u2014 ~/.paddock unless you pass --data-dir.\n Projects, chat transcripts and settings all persist there between runs. Move\n that directory to move your instance; delete it to start over. Nothing is\n stored anywhere else.\n\nNotes\n Binds loopback with authentication disabled, which is safe for a laptop. To\n expose it on a network, set PADDOCK_AUTH_MODE first \u2014 Paddock refuses to bind\n a routable interface wide open. See AUTH.md.\n\nDocs: https://github.com/edspencer/paddock";
|
|
231
|
+
export declare const SERVICE_USAGE = "paddock service \u2014 keep Paddock running in the background\n\nUsage\n paddock service install [options] register it and start it now\n paddock service install --refresh re-write the unit, keeping its settings\n paddock service uninstall stop it and deregister it\n paddock service status [--json] is it registered, is it running, which\n version, where are the logs\n paddock service start start an installed service that is stopped\n paddock service stop [--force] stop it, and leave it installed\n paddock service restart [--force] stop it and start it again, re-reading config\n paddock service logs [-f] [-n <n>] the service's log (the last 50 lines)\n\nOptions (logs)\n -f, --follow keep printing what gets appended, until Ctrl-C\n -n, --lines <n> how many lines to print first (default 50)\n\nOptions (stop, restart)\n --force stop it even though it is busy\n\nOptions (install)\n --refresh Re-render the unit from the settings the EXISTING one\n carries \u2014 its port, host, data dir and verbosity \u2014\n rather than from this shell's flags and environment.\n This is what `paddock update` runs, through the new\n version's CLI, so the unit is written in the format\n that version writes. Exit 4 with nothing installed:\n there is no unit to refresh, and doing a first\n install with defaults instead is how a --port 9000\n service comes back on 7233.\n\nBusy\n `stop` and `restart` ask the running instance whether it is busy first, and\n refuse with exit 75 if it is \u2014 a chat turn in flight, a background task, a\n scheduled job. `paddock busy` asks the same question on its own.\n\n Being refused is the useful case: a restart kills a chat turn mid-sentence,\n and the turn cannot be resumed from where it was. Wait, or --force.\n\n `uninstall` does not ask. Removing the service is an explicit act, and\n someone uninstalling it has already decided.\n\nOptions (install only \u2014 recorded in the generated unit)\n -p, --port <port> HTTP/WS port (default 7233)\n --host <host> Bind address (default 127.0.0.1)\n -d, --data-dir <path> Only if you want an instance SEPARATE from your\n terminal one. Left out of the unit when you omit it\n AND `PADDOCK_DATA_DIR` is unset in this shell, so\n `paddock service` and a bare `paddock` are the same\n ~/.paddock instance reached two ways. If\n `PADDOCK_DATA_DIR` IS set here, that path is recorded\n in the unit \u2014 the service would otherwise point\n somewhere your terminal does not.\n --verbose Record the server's own logs, not just warnings\n\nAt login, not at boot\n This registers a per-USER service \u2014 a launchd LaunchAgent on macOS, a\n `systemd --user` unit on Linux \u2014 so it runs as you, with your own Claude\n login. That is not incidental: on macOS your Claude login is a Keychain item\n that only a logged-in user session can read. A boot-time system daemon has no\n such session and could not use it.\n\n So Paddock starts when you LOG IN, not when the machine boots. After a\n restart that nobody logs into, Paddock is not running. That is the design, not\n a fault.\n\n On Linux, a user service is also stopped when you log out. To keep it up:\n\n loginctl enable-linger $USER\n\nWhere it lives\n macOS ~/Library/LaunchAgents/net.edspencer.paddock.plist\n Linux ~/.config/systemd/user/paddock.service\n\n Both write stdout and stderr to ONE file, <data-dir>/logs/service.log, which\n is what `paddock service logs` reads. Not the journal on Linux: a volatile\n journal has nothing in it after the reboot you are asking about, and one file\n means one answer to \"where are the logs\" on every OS. Paddock rotates it\n itself at 8 MB, keeping three older generations beside it.\n\nExit codes\n 0 it is installed, running and answering\n 3 installed, but not running or not answering\n 4 not installed: there is no unit (status, logs, start, stop, restart)\n 1 something failed\n 2 usage: an unknown action or flag, or a bad value\n 75 busy, and --force was not given (stop, restart)\n\nInstalled from npx?\n `service install` refuses. An npx cache path is hash-keyed and npm may prune\n it, so the unit would work until it silently didn't, at some future login.\n Install properly first:\n\n npm i -g @edspencer/paddock && paddock service install\n\nA note on access\n Paddock binds loopback with authentication off, which is right for a laptop.\n A service is up for as long as you are logged in rather than as long as a\n terminal tab, so that window is longer \u2014 but it is not wider: any local\n process that could reach the port could already read the same Claude login as\n you. Set PADDOCK_AUTH_MODE if you want a credential on it anyway.\n\nDocs: https://github.com/edspencer/paddock";
|
|
217
232
|
export declare const BUSY_USAGE = "paddock busy \u2014 is the running instance in the middle of something?\n\nUsage\n paddock busy ask, and say so in a sentence\n paddock busy --json the same answer as one JSON document\n paddock busy -d <path> ask a particular instance\n\nExit codes \u2014 this command is FOR its exit code\n 0 not busy. Nothing a restart would cut short.\n 75 busy. What is running was printed.\n 3 nothing answered. No instance is running, so there is nothing to wait for.\n 1 something answered, but not as Paddock's busy check.\n\nOptions\n -d, --data-dir <path> Which instance to ask (default ~/.paddock, or\n $PADDOCK_DATA_DIR) \u2014 the same rule `paddock serve`\n uses, so the two always mean the same instance\n --json One JSON document on stdout: running, busy, url,\n version, counts. Prose goes to stderr\n -h, --help Show this help\n\nWhat counts as busy\n Only work a restart would LOSE or cut short:\n\n chat a chat turn running \u2014 a human turn, a fired trigger, a cron\n fire. A turn is a live claude subprocess writing a transcript,\n and it cannot be resumed from where it was interrupted.\n background a background task a live session is still holding after its\n turn ended: a background shell, a sub-agent, a Monitor.\n job a scheduled job herdctl is running.\n\n Not busy: an idle session (it resumes), an open browser tab (it reconnects),\n a pending curation sweep (it re-runs from its watermark).\n\nWhere to run it from\n From a terminal. A Paddock chat that runs this is itself one of the chat turns\n it counts, so it will always see itself as busy \u2014 and `service stop --force`\n from inside a chat stops the service that is running the chat, which does not\n come back with an explanation. That is why the refusal says so.\n\nFor scripts, containers and Watchtower\n `busy` is there for callers with no service to ask. 75 is EX_TEMPFAIL, which\n is the code Watchtower's pre-update hook reads as \"skip this one\":\n\n labels:\n com.centurylinklabs.watchtower.lifecycle.pre-update: paddock busy\n\n An Ansible task does the same thing with a retry. Nothing here contacts the\n network or the npm registry, and the question is answered from memory \u2014 it is\n cheap enough to ask in a loop.\n\nHow it finds the instance\n `<data-dir>/runtime.json`, written 0600 when the server starts listening and\n removed when it stops. There is no fallback to a default port: guessing one\n would ask whatever else happened to be listening there, and get an answer.\n\n A Paddock from before this feature shipped writes no such file, so it reads as\n not running (exit 3). Upgrade it and restart it once.\n\nDocs: https://github.com/edspencer/paddock";
|
|
218
233
|
export declare const CONFIG_USAGE = "paddock config \u2014 what this instance's configuration actually resolved to\n\nUsage\n paddock config show the decisions: your profile, the keys your\n config file sets, the variables your\n environment sets\n paddock config show --resolved EVERY effective value, and which layer it\n came from\n paddock config show --json the same report as JSON, long values in\n full (sensitive ones still hidden)\n paddock config eject what freezing that resolution into\n paddock.config.yaml would write \u2014 a\n preview; writes nothing\n paddock config eject --write actually write it\n\nOptions\n -d, --data-dir <path> Which instance to inspect (default ~/.paddock, or\n $PADDOCK_DATA_DIR) \u2014 the same rule `paddock start`\n uses, so the two always read the same instance\n --resolved show: every field, not just the ones someone set\n --json show: the whole report as JSON (implies --resolved's\n scope)\n --show-sensitive show: print the values of fields marked sensitive\n --write eject: apply the plan. Without it, eject only prints\n --include-env eject: also freeze values an environment variable\n currently supplies (see below \u2014 off by default)\n -h, --help Show this help\n\nWhere a value can come from\n Config resolves in four layers, and each row of --resolved names the one that\n won:\n\n default Paddock's built-in default.\n profile (<name>) Your posture profile. The twelve levers a profile governs\n have no code default of their own any more \u2014 the profile\n IS their default \u2014 so this is a distinct answer from\n \"default\", and switching profile would change it.\n file A key in paddock.config.yaml.\n env <NAME> An environment variable, which beats the file for the\n same key.\n\n One wrinkle worth knowing, and the command shows it plainly: an individual key\n in the FILE beats PADDOCK_PROFILE in the environment. Specific beats general \u2014\n PADDOCK_PROFILE speaks for the levers you did not mention.\n\nWhy show, and not just write it all into the file\n `show` is computed by the loader the server boots with, so it cannot drift\n from what the process would actually do. A materialized file can: it stops\n inheriting improved defaults, says nothing about the variables your container\n sets on top, and no longer describes the whole surface the day a lever is\n added. That is why the thin file is the default and `show` is the answer to\n \"what am I actually running?\".\n\n `eject` is there for when you want it written down anyway \u2014 frozen, in the\n file, reviewable in git. It is a real tradeoff rather than a better `show`,\n so it prints what it would cost you and writes nothing until you pass --write.\n\nWhat eject writes, and what it leaves alone\n It writes the posture levers your profile expanded to, plus the behavioural\n settings the Config screen already round-trips through this file. It does NOT\n write:\n\n the bindings port, host, data dir, projects root, state dir, web dist.\n These resolve to absolute paths on THIS machine, and the\n data dir resolves to the directory holding the file \u2014 so\n ejecting them makes the file unportable and unmountable.\n sensitive keys transcription.endpoint can carry credentials in its URL.\n Bulk-writing a secret-shaped value to disk should not be\n one keystroke away; write that key by hand.\n env-owned keys by default. An environment variable BEATS the file, so\n writing its value in changes nothing today and everything\n the day the variable goes away \u2014 a deferred, silent change\n of provenance. eject names each one it skipped instead.\n --include-env writes them, which is the right flag if you\n are deliberately migrating from env vars to a file.\n\n It always writes `profile:` as well, even though every key that profile\n governs is now explicit. That line is what a lever added in a FUTURE release\n falls back to: without it, a new capability toggle would resolve against the\n built-in default profile rather than the posture you actually ejected from.\n\n Your comments and any keys Paddock does not manage survive \u2014 the file is\n round-tripped, not regenerated \u2014 and the write is atomic.\n\nReading nothing, writing nothing\n `show` resolves config and prints it. It starts no server, contacts nothing,\n and writes no file \u2014 including the data dir itself, which it will report as\n missing rather than create. `eject` writes exactly one file, and only with\n --write.\n\n Values are printed to a terminal that often ends up pasted into an issue, so\n fields marked sensitive are shown as (hidden). None of them is a secret \u2014\n Paddock keeps secrets out of this surface entirely, so there is no API key or\n JWT signing material here to hide or reveal.\n\nDocs: https://github.com/edspencer/paddock";
|
|
234
|
+
/**
|
|
235
|
+
* `update`'s own synopsis, printed after a usage error from it (SPEC §2).
|
|
236
|
+
*
|
|
237
|
+
* `update` has one usage error of its own — "there is no terminal to ask, so
|
|
238
|
+
* `--yes` is required" — and the contract says the usage follows the message.
|
|
239
|
+
* {@link USAGE_SYNOPSIS} is the wrong text there: it lists every command, and
|
|
240
|
+
* the reader's problem is one flag on the command they already typed.
|
|
241
|
+
*/
|
|
242
|
+
export declare const UPDATE_SYNOPSIS = "Usage\n paddock update [--yes] install the latest release\n paddock update --check [--json] what a new version would be; changes nothing\n paddock update --to <version|tag> a particular version, or a dist-tag\n paddock update --force skip the busy check, and nothing else\n paddock update --help the full help";
|
|
243
|
+
export declare const UPDATE_USAGE = "paddock update \u2014 install a newer Paddock, and put the service back up\n\nUsage\n paddock update update to the latest release, asking first\n paddock update --check what a new version would be; changes nothing\n paddock update --yes do not ask (required when there is no terminal)\n paddock update --to 0.79.1 a particular version \u2014 the only way to go BACK\n paddock update --to next a dist-tag\n paddock update --json one JSON document on stdout\n\nOptions\n --check Ask the registry, report, and change nothing. Exits 0\n whether or not there is an update \u2014 scripts read\n `updateAvailable` from --json\n --to <version|tag> Install this version or dist-tag instead of latest.\n Required to move to a LOWER version: an update never\n goes backwards by accident\n --yes, -y Skip the question. Required when stdin is not a\n terminal, where a command that would have asked exits\n 2 rather than guessing\n --force Skip the busy check, and nothing else \u2014 the health\n check and the rollback still run\n --json One JSON document on stdout; all prose on stderr\n -h, --help Show this help\n\nWhat it does, in order\n 1 takes <data-dir>/update.lock, so two updates cannot interleave\n 2 works out how this copy was installed (see \"Installs that cannot update\n themselves\" below)\n 3 asks the registry for the target version and its `engines.node`\n 4 compares, and stops here with --check\n 5 checks the global folder is writable, and prints a sudo line if not.\n It never runs sudo itself\n 6 asks the running instance whether it is BUSY \u2014 before anything is stopped\n 7 asks you, unless --yes\n 8 fetches both the new and the current version into the npm cache, while\n the old version is still serving, so a rollback has its package to hand\n 9 stops the service\n 10 installs with the package manager this copy came from\n 11 hands over to the NEW CLI, which re-writes the service unit\n (`service install --refresh`) and starts it\n 12 waits for /api/health to report the version it just installed\n 13 and if any of 10\u201312 fails, puts the old version back\n\nExit codes \u2014 this command is FOR its exit code\n 0 updated, or already up to date, or --check reported\n 1 something failed, and nothing had been stopped yet\n 2 usage \u2014 including \"there is no terminal to ask, so --yes is required\"\n 5 this install cannot update itself. The right command was printed\n 6 the new version did not start; the old one is running again\n 7 the new version did not start and the old one could not be restored.\n The commands to run by hand were printed\n 75 busy: a chat turn, a background task or a scheduled job is running.\n Wait, or --force\n\nInstalls that cannot update themselves (exit 5)\n Paddock reads where it is running from, and five layouts are not ours to\n replace. Each prints the command that WOULD work:\n\n a container image docker compose pull && docker compose up -d\n a managed install whatever PADDOCK_UPDATE_HINT says\n npx / pnpm dlx npx @edspencer/paddock@latest already runs the latest\n a checkout git pull && npm install && npm run build\n a project dependency update it in that project\n a yarn classic global yarn global add @edspencer/paddock\n\n A global npm, pnpm, bun or volta install updates in place.\n\nWhere it runs from\n From a terminal, never from inside the service. An updater the service\n started \u2014 a Paddock chat, say \u2014 is in the service's own process group, so\n stopping the service kills the updater half way through step 9. The busy\n check refuses first and says so; --force from inside a chat would stop the\n service running that chat, which then never gets to report what happened.\n\nAsking the registry\n Only `update`, `update --check` and `doctor` ever contact the npm\n registry, and only when you run them. There is no background check and no\n check at startup; the server never asks. What the last check found is cached\n in <data-dir>/update-check.json, which is what `paddock service status`\n repeats \u2014 it never asks itself.\n\n The registry is `npm_config_registry`, else `npm config get registry`,\n else https://registry.npmjs.org.\n\nDocs: https://github.com/edspencer/paddock";
|
|
@@ -34,7 +34,7 @@ import { EXIT } from "./exit-codes.js";
|
|
|
34
34
|
*/
|
|
35
35
|
export class CliError extends Error {
|
|
36
36
|
exitCode;
|
|
37
|
-
constructor(message, exitCode = EXIT.
|
|
37
|
+
constructor(message, exitCode = EXIT.FAILED) {
|
|
38
38
|
super(message);
|
|
39
39
|
this.exitCode = exitCode;
|
|
40
40
|
}
|
|
@@ -49,7 +49,7 @@ export class CliError extends Error {
|
|
|
49
49
|
*/
|
|
50
50
|
export class UsageError extends CliError {
|
|
51
51
|
constructor(message) {
|
|
52
|
-
super(message, EXIT.
|
|
52
|
+
super(message, EXIT.USAGE);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
export const MIN_NODE_MAJOR = 22;
|
|
@@ -88,7 +88,7 @@ export const CONFIG_ACTIONS = ["show", "eject"];
|
|
|
88
88
|
* Paddock and Managers, every existing service unit's `ExecStart` names it, and
|
|
89
89
|
* it is in two years of other people's scripts. They parse to the same command.
|
|
90
90
|
*/
|
|
91
|
-
export const VERBS = ["serve", "start", "service", "config", "busy"];
|
|
91
|
+
export const VERBS = ["serve", "start", "service", "config", "busy", "update", "upgrade"];
|
|
92
92
|
/**
|
|
93
93
|
* Split an action off a verb's argv, then parse what follows as flags.
|
|
94
94
|
*
|
|
@@ -141,27 +141,70 @@ function parseAction(verb, actions, rest) {
|
|
|
141
141
|
* for. Corrected rather than deleted because the grammar it documents is real
|
|
142
142
|
* and load-bearing; it was only the example's error that was misdescribed.
|
|
143
143
|
*/
|
|
144
|
+
/**
|
|
145
|
+
* Flags that mean something on SOME commands only, and the commands they mean
|
|
146
|
+
* it on.
|
|
147
|
+
*
|
|
148
|
+
* Rejecting a flag the command cannot act on, rather than parsing and dropping
|
|
149
|
+
* it, is the difference between being told and guessing: the two readings of a
|
|
150
|
+
* quiet `service uninstall --force` are "it overrode something" and "it did
|
|
151
|
+
* nothing", and the exit code is 0 either way. The same trap sits under
|
|
152
|
+
* `service status --refresh` and `serve --check`.
|
|
153
|
+
*
|
|
154
|
+
* One table, checked once in {@link parseCommand}, rather than a rule per
|
|
155
|
+
* command — a second copy of this logic is a second chance for the two to
|
|
156
|
+
* disagree about where a flag applies. `where` is matched against the
|
|
157
|
+
* invocation as the user would write it (`service stop`, `update`).
|
|
158
|
+
*/
|
|
159
|
+
const SCOPED_FLAGS = [
|
|
160
|
+
{
|
|
161
|
+
flag: "--force",
|
|
162
|
+
read: (o) => o.force === true,
|
|
163
|
+
where: ["service stop", "service restart", "update"],
|
|
164
|
+
why: "It overrides the busy check, and those are the commands that run one.",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
flag: "--check",
|
|
168
|
+
read: (o) => o.checkOnly === true,
|
|
169
|
+
where: ["update"],
|
|
170
|
+
why: "It reports what an update would do, and changes nothing.",
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
flag: "--to",
|
|
174
|
+
read: (o) => o.to !== undefined,
|
|
175
|
+
where: ["update"],
|
|
176
|
+
why: "It names the version or dist-tag to move to.",
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
flag: "--yes",
|
|
180
|
+
read: (o) => o.yes === true,
|
|
181
|
+
where: ["update"],
|
|
182
|
+
why: "`update` is the only command that asks a question.",
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
flag: "--refresh",
|
|
186
|
+
read: (o) => o.refresh === true,
|
|
187
|
+
where: ["service install"],
|
|
188
|
+
why: "It re-renders an existing unit, keeping the settings it carries.",
|
|
189
|
+
},
|
|
190
|
+
];
|
|
144
191
|
export function parseCommand(argv) {
|
|
145
192
|
const command = dispatch(argv);
|
|
146
|
-
// `--
|
|
147
|
-
//
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
? `\`service ${command.action}\``
|
|
162
|
-
: `\`${command.verb}\``;
|
|
163
|
-
throw new UsageError(`--force applies to \`service stop\` and \`service restart\` only, not ${what}.\n` +
|
|
164
|
-
"It overrides the busy check, and those are the two commands that run one.");
|
|
193
|
+
// `--help` wins over every rule below, the same way it wins over a missing
|
|
194
|
+
// action above: asking for the usage is not a usage error.
|
|
195
|
+
if (command.opts.help)
|
|
196
|
+
return command;
|
|
197
|
+
const said = "action" in command && command.action !== undefined
|
|
198
|
+
? `${command.verb} ${command.action}`
|
|
199
|
+
: command.verb;
|
|
200
|
+
for (const rule of SCOPED_FLAGS) {
|
|
201
|
+
if (!rule.read(command.opts))
|
|
202
|
+
continue;
|
|
203
|
+
if (rule.where.includes(said))
|
|
204
|
+
continue;
|
|
205
|
+
const quoted = rule.where.map((w) => `\`${w}\``);
|
|
206
|
+
const list = quoted.length === 1 ? quoted[0] : `${quoted.slice(0, -1).join(", ")} and ${quoted.at(-1)}`;
|
|
207
|
+
throw new UsageError(`${rule.flag} applies to ${list} only, not \`${said}\`.\n${rule.why}`);
|
|
165
208
|
}
|
|
166
209
|
return command;
|
|
167
210
|
}
|
|
@@ -178,6 +221,9 @@ function dispatch(argv) {
|
|
|
178
221
|
// a Docker container, a Watchtower pre-update hook, an Ansible task.
|
|
179
222
|
if (first === "busy")
|
|
180
223
|
return { verb: "busy", opts: parseArgs(rest) };
|
|
224
|
+
// `update`, with `upgrade` accepted and undocumented (SPEC §1).
|
|
225
|
+
if (first === "update" || first === "upgrade")
|
|
226
|
+
return { verb: "update", opts: parseArgs(rest) };
|
|
181
227
|
// `serve` and `start` are one command: see VERBS.
|
|
182
228
|
if (first === "serve" || first === "start")
|
|
183
229
|
return { verb: "serve", opts: parseArgs(rest) };
|
|
@@ -249,10 +295,31 @@ export function parseArgs(argv) {
|
|
|
249
295
|
case "--include-env":
|
|
250
296
|
opts.includeEnv = true;
|
|
251
297
|
break;
|
|
252
|
-
// `service stop` / `service restart`: override the busy check
|
|
298
|
+
// `service stop` / `service restart` / `update`: override the busy check
|
|
299
|
+
// (SPEC §4).
|
|
253
300
|
case "--force":
|
|
254
301
|
opts.force = true;
|
|
255
302
|
break;
|
|
303
|
+
// `update` flags (SPEC §1).
|
|
304
|
+
case "--check":
|
|
305
|
+
opts.checkOnly = true;
|
|
306
|
+
break;
|
|
307
|
+
case "--to": {
|
|
308
|
+
const v = next();
|
|
309
|
+
if (v === "" || v.startsWith("-")) {
|
|
310
|
+
throw new UsageError(`${arg} needs a version or a dist-tag, got: ${JSON.stringify(v)}`);
|
|
311
|
+
}
|
|
312
|
+
opts.to = v;
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
case "-y":
|
|
316
|
+
case "--yes":
|
|
317
|
+
opts.yes = true;
|
|
318
|
+
break;
|
|
319
|
+
// `service install --refresh` (SPEC §5 step 11).
|
|
320
|
+
case "--refresh":
|
|
321
|
+
opts.refresh = true;
|
|
322
|
+
break;
|
|
256
323
|
// `service logs` flags, the names `tail`, `journalctl` and every other
|
|
257
324
|
// log reader uses — this is not the place to be original.
|
|
258
325
|
case "-f":
|
|
@@ -327,6 +394,7 @@ export const USAGE_SYNOPSIS = `Usage
|
|
|
327
394
|
paddock [serve] [options] run the server in this terminal
|
|
328
395
|
paddock service <action> [options] install|uninstall|status|start|stop|restart|logs
|
|
329
396
|
paddock busy [--json] is the running instance busy?
|
|
397
|
+
paddock update [--check] [--to <v>] install a newer Paddock
|
|
330
398
|
paddock config <show|eject> [options] what this instance's config resolved to
|
|
331
399
|
paddock -v | --version print the version and exit
|
|
332
400
|
paddock -h | --help the full help`;
|
|
@@ -347,6 +415,9 @@ Usage
|
|
|
347
415
|
paddock busy [--json] is it busy? exit 0 no, 75 yes, 3
|
|
348
416
|
nothing answering
|
|
349
417
|
(\`paddock busy --help\`)
|
|
418
|
+
paddock update [--check] [--to <v>] install a newer Paddock and restart
|
|
419
|
+
the service
|
|
420
|
+
(\`paddock update --help\`)
|
|
350
421
|
paddock config show [--resolved] what this instance's config resolved
|
|
351
422
|
to, and where each value came from
|
|
352
423
|
paddock config eject [--write] freeze that resolution into
|
|
@@ -363,11 +434,14 @@ Options
|
|
|
363
434
|
-h, --help Show this help
|
|
364
435
|
|
|
365
436
|
Exit codes
|
|
366
|
-
0 done; running and answering; not busy
|
|
437
|
+
0 done; running and answering; up to date; not busy
|
|
367
438
|
1 failed
|
|
368
439
|
2 usage: an unknown command or flag, or a bad value
|
|
369
440
|
3 not running: installed, but not running or not answering; nothing answers
|
|
370
441
|
4 not installed: there is no service unit
|
|
442
|
+
5 this install cannot update itself; the right command was printed (update)
|
|
443
|
+
6 the update failed and was rolled back; the old version is back (update)
|
|
444
|
+
7 the update failed and could not be rolled back; a person is needed
|
|
371
445
|
75 busy: refused, and why was printed. Try later, or use --force
|
|
372
446
|
|
|
373
447
|
Opening your own directories
|
|
@@ -472,6 +546,7 @@ export const SERVICE_USAGE = `paddock service — keep Paddock running in the ba
|
|
|
472
546
|
|
|
473
547
|
Usage
|
|
474
548
|
paddock service install [options] register it and start it now
|
|
549
|
+
paddock service install --refresh re-write the unit, keeping its settings
|
|
475
550
|
paddock service uninstall stop it and deregister it
|
|
476
551
|
paddock service status [--json] is it registered, is it running, which
|
|
477
552
|
version, where are the logs
|
|
@@ -487,6 +562,17 @@ Options (logs)
|
|
|
487
562
|
Options (stop, restart)
|
|
488
563
|
--force stop it even though it is busy
|
|
489
564
|
|
|
565
|
+
Options (install)
|
|
566
|
+
--refresh Re-render the unit from the settings the EXISTING one
|
|
567
|
+
carries — its port, host, data dir and verbosity —
|
|
568
|
+
rather than from this shell's flags and environment.
|
|
569
|
+
This is what \`paddock update\` runs, through the new
|
|
570
|
+
version's CLI, so the unit is written in the format
|
|
571
|
+
that version writes. Exit 4 with nothing installed:
|
|
572
|
+
there is no unit to refresh, and doing a first
|
|
573
|
+
install with defaults instead is how a --port 9000
|
|
574
|
+
service comes back on 7233.
|
|
575
|
+
|
|
490
576
|
Busy
|
|
491
577
|
\`stop\` and \`restart\` ask the running instance whether it is busy first, and
|
|
492
578
|
refuse with exit 75 if it is — a chat turn in flight, a background task, a
|
|
@@ -715,3 +801,103 @@ Reading nothing, writing nothing
|
|
|
715
801
|
JWT signing material here to hide or reveal.
|
|
716
802
|
|
|
717
803
|
Docs: https://github.com/edspencer/paddock`;
|
|
804
|
+
/**
|
|
805
|
+
* `update`'s own synopsis, printed after a usage error from it (SPEC §2).
|
|
806
|
+
*
|
|
807
|
+
* `update` has one usage error of its own — "there is no terminal to ask, so
|
|
808
|
+
* `--yes` is required" — and the contract says the usage follows the message.
|
|
809
|
+
* {@link USAGE_SYNOPSIS} is the wrong text there: it lists every command, and
|
|
810
|
+
* the reader's problem is one flag on the command they already typed.
|
|
811
|
+
*/
|
|
812
|
+
export const UPDATE_SYNOPSIS = `Usage
|
|
813
|
+
paddock update [--yes] install the latest release
|
|
814
|
+
paddock update --check [--json] what a new version would be; changes nothing
|
|
815
|
+
paddock update --to <version|tag> a particular version, or a dist-tag
|
|
816
|
+
paddock update --force skip the busy check, and nothing else
|
|
817
|
+
paddock update --help the full help`;
|
|
818
|
+
export const UPDATE_USAGE = `paddock update — install a newer Paddock, and put the service back up
|
|
819
|
+
|
|
820
|
+
Usage
|
|
821
|
+
paddock update update to the latest release, asking first
|
|
822
|
+
paddock update --check what a new version would be; changes nothing
|
|
823
|
+
paddock update --yes do not ask (required when there is no terminal)
|
|
824
|
+
paddock update --to 0.79.1 a particular version — the only way to go BACK
|
|
825
|
+
paddock update --to next a dist-tag
|
|
826
|
+
paddock update --json one JSON document on stdout
|
|
827
|
+
|
|
828
|
+
Options
|
|
829
|
+
--check Ask the registry, report, and change nothing. Exits 0
|
|
830
|
+
whether or not there is an update — scripts read
|
|
831
|
+
\`updateAvailable\` from --json
|
|
832
|
+
--to <version|tag> Install this version or dist-tag instead of latest.
|
|
833
|
+
Required to move to a LOWER version: an update never
|
|
834
|
+
goes backwards by accident
|
|
835
|
+
--yes, -y Skip the question. Required when stdin is not a
|
|
836
|
+
terminal, where a command that would have asked exits
|
|
837
|
+
2 rather than guessing
|
|
838
|
+
--force Skip the busy check, and nothing else — the health
|
|
839
|
+
check and the rollback still run
|
|
840
|
+
--json One JSON document on stdout; all prose on stderr
|
|
841
|
+
-h, --help Show this help
|
|
842
|
+
|
|
843
|
+
What it does, in order
|
|
844
|
+
1 takes <data-dir>/update.lock, so two updates cannot interleave
|
|
845
|
+
2 works out how this copy was installed (see "Installs that cannot update
|
|
846
|
+
themselves" below)
|
|
847
|
+
3 asks the registry for the target version and its \`engines.node\`
|
|
848
|
+
4 compares, and stops here with --check
|
|
849
|
+
5 checks the global folder is writable, and prints a sudo line if not.
|
|
850
|
+
It never runs sudo itself
|
|
851
|
+
6 asks the running instance whether it is BUSY — before anything is stopped
|
|
852
|
+
7 asks you, unless --yes
|
|
853
|
+
8 fetches both the new and the current version into the npm cache, while
|
|
854
|
+
the old version is still serving, so a rollback has its package to hand
|
|
855
|
+
9 stops the service
|
|
856
|
+
10 installs with the package manager this copy came from
|
|
857
|
+
11 hands over to the NEW CLI, which re-writes the service unit
|
|
858
|
+
(\`service install --refresh\`) and starts it
|
|
859
|
+
12 waits for /api/health to report the version it just installed
|
|
860
|
+
13 and if any of 10–12 fails, puts the old version back
|
|
861
|
+
|
|
862
|
+
Exit codes — this command is FOR its exit code
|
|
863
|
+
0 updated, or already up to date, or --check reported
|
|
864
|
+
1 something failed, and nothing had been stopped yet
|
|
865
|
+
2 usage — including "there is no terminal to ask, so --yes is required"
|
|
866
|
+
5 this install cannot update itself. The right command was printed
|
|
867
|
+
6 the new version did not start; the old one is running again
|
|
868
|
+
7 the new version did not start and the old one could not be restored.
|
|
869
|
+
The commands to run by hand were printed
|
|
870
|
+
75 busy: a chat turn, a background task or a scheduled job is running.
|
|
871
|
+
Wait, or --force
|
|
872
|
+
|
|
873
|
+
Installs that cannot update themselves (exit 5)
|
|
874
|
+
Paddock reads where it is running from, and five layouts are not ours to
|
|
875
|
+
replace. Each prints the command that WOULD work:
|
|
876
|
+
|
|
877
|
+
a container image docker compose pull && docker compose up -d
|
|
878
|
+
a managed install whatever PADDOCK_UPDATE_HINT says
|
|
879
|
+
npx / pnpm dlx npx @edspencer/paddock@latest already runs the latest
|
|
880
|
+
a checkout git pull && npm install && npm run build
|
|
881
|
+
a project dependency update it in that project
|
|
882
|
+
a yarn classic global yarn global add @edspencer/paddock
|
|
883
|
+
|
|
884
|
+
A global npm, pnpm, bun or volta install updates in place.
|
|
885
|
+
|
|
886
|
+
Where it runs from
|
|
887
|
+
From a terminal, never from inside the service. An updater the service
|
|
888
|
+
started — a Paddock chat, say — is in the service's own process group, so
|
|
889
|
+
stopping the service kills the updater half way through step 9. The busy
|
|
890
|
+
check refuses first and says so; --force from inside a chat would stop the
|
|
891
|
+
service running that chat, which then never gets to report what happened.
|
|
892
|
+
|
|
893
|
+
Asking the registry
|
|
894
|
+
Only \`update\`, \`update --check\` and \`doctor\` ever contact the npm
|
|
895
|
+
registry, and only when you run them. There is no background check and no
|
|
896
|
+
check at startup; the server never asks. What the last check found is cached
|
|
897
|
+
in <data-dir>/update-check.json, which is what \`paddock service status\`
|
|
898
|
+
repeats — it never asks itself.
|
|
899
|
+
|
|
900
|
+
The registry is \`npm_config_registry\`, else \`npm config get registry\`,
|
|
901
|
+
else https://registry.npmjs.org.
|
|
902
|
+
|
|
903
|
+
Docs: https://github.com/edspencer/paddock`;
|
|
@@ -104,5 +104,5 @@ export async function guardServiceBusy(action, home, opts) {
|
|
|
104
104
|
return null;
|
|
105
105
|
// Spell out the way past it, after the hint about where to run it from.
|
|
106
106
|
out.warn(`\n paddock service ${action} --force ${action} it anyway\n`);
|
|
107
|
-
return EXIT.
|
|
107
|
+
return EXIT.BUSY;
|
|
108
108
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
// From edspencer/cli-contract reference/busy-client.ts @
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// Paddock's keeper-chat trap (ROADMAP "Busy, per tool"), where the line to print depends on WHICH counts are
|
|
7
|
-
// non-zero, so a fixed string could not say it.
|
|
1
|
+
// From edspencer/cli-contract reference/busy-client.ts @ 0.2; local changes: `.ts` import specifiers → `.js` and
|
|
2
|
+
// `../runtime-file.js` (the writer lives server-side, next to the boot path that writes the file); and `hint` widened
|
|
3
|
+
// from a string to `string | ((result) => string | undefined)`, with {@link runBusyCommand} printing it too — that is
|
|
4
|
+
// what carries Paddock's keeper-chat trap (ROADMAP "Busy, per tool"), where the line to print depends on WHICH counts
|
|
5
|
+
// are non-zero, so a fixed string could not say it.
|
|
8
6
|
//
|
|
9
7
|
// The CLI's side of the busy check (SPEC §4): find the running instance through `<home>/runtime.json`, ask its
|
|
10
8
|
// `/api/busy`, and map the answer to exit 0 (idle), 75 (busy) or 3 (nothing answers), with §4's messages.
|
|
@@ -88,13 +86,13 @@ export function busyMessage(name, result, nouns = {}) {
|
|
|
88
86
|
export function busyExitCode(result) {
|
|
89
87
|
switch (result.state) {
|
|
90
88
|
case "idle":
|
|
91
|
-
return EXIT.
|
|
89
|
+
return EXIT.OK;
|
|
92
90
|
case "busy":
|
|
93
|
-
return EXIT.
|
|
91
|
+
return EXIT.BUSY;
|
|
94
92
|
case "not-running":
|
|
95
|
-
return EXIT.
|
|
93
|
+
return EXIT.NOT_RUNNING;
|
|
96
94
|
case "unknown":
|
|
97
|
-
return EXIT.
|
|
95
|
+
return EXIT.FAILED;
|
|
98
96
|
}
|
|
99
97
|
}
|
|
100
98
|
/** What `<tool> busy --json` prints: valid against `schemas/busy.schema.json`. */
|
|
@@ -146,5 +144,5 @@ export async function guardBusy(o) {
|
|
|
146
144
|
return null;
|
|
147
145
|
}
|
|
148
146
|
const hint = resolveHint(o.hint, result) ?? "Try again once it has finished, or use --force.";
|
|
149
|
-
return o.out.error(`${message} ${hint}`, EXIT.
|
|
147
|
+
return o.out.error(`${message} ${hint}`, EXIT.BUSY);
|
|
150
148
|
}
|