@workser/cli 0.6.22 → 0.6.23
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/dist/index.js
CHANGED
|
@@ -4575,7 +4575,7 @@ forever; if it does, carry on and state clearly what you assumed.
|
|
|
4575
4575
|
## Asking for an app that does not exist yet
|
|
4576
4576
|
|
|
4577
4577
|
The project needs a kind of app it does not have \u2014 a backend for the phone app, a
|
|
4578
|
-
|
|
4578
|
+
phone version of the website. **You cannot create one yourself**, by design: apps
|
|
4579
4579
|
are real infrastructure on the owner's account. Ask, and their click creates it.
|
|
4580
4580
|
The answer gives you the new app's id.
|
|
4581
4581
|
|
|
@@ -4590,15 +4590,19 @@ workser ask "The phone app needs an API to hold its data. Add one?" \\
|
|
|
4590
4590
|
|---|---|
|
|
4591
4591
|
| \`web\` | Next.js site on Workser hosting |
|
|
4592
4592
|
| \`mobile\` | Expo / React Native phone app |
|
|
4593
|
-
| \`desktop\` | Next.js + Electron, installs on a Mac or PC |
|
|
4594
4593
|
| \`api\` | backend service \u2014 \`api-hono\` (TypeScript) or \`api-python\` (FastAPI) |
|
|
4595
4594
|
|
|
4596
4595
|
**Name the kind you actually mean.** Asking for \`web\` because you are unsure is
|
|
4597
|
-
how a
|
|
4596
|
+
how a phone app gets created as a website: the card shows the owner the kind
|
|
4598
4597
|
you named, they approve THAT, and the wrong app is provisioned under your own
|
|
4599
4598
|
sentence asking for the right one. An unknown kind is refused with the list
|
|
4600
4599
|
above rather than guessed at \u2014 read it and ask again.
|
|
4601
4600
|
|
|
4601
|
+
**There is no desktop app type.** Workser builds websites, phone apps and
|
|
4602
|
+
backend services. If the owner asks for a Mac or Windows app, say plainly that
|
|
4603
|
+
Workser cannot make one yet \u2014 do not offer a web app dressed as a window, and
|
|
4604
|
+
do not build a "desktop-style" page instead. That is not what they asked for.
|
|
4605
|
+
|
|
4602
4606
|
**Never ask for a secret value this way** \u2014 the answer is stored and displayed. Ask
|
|
4603
4607
|
*where* a key should go, then have the user set it (\`workser env set\` writes it
|
|
4604
4608
|
without you ever seeing it).
|
|
@@ -4674,105 +4678,6 @@ workser artifact add --url https://acme.workser.app --kind app -t "Storefront"
|
|
|
4674
4678
|
\`\`\`
|
|
4675
4679
|
|
|
4676
4680
|
See \`reference/deliverables.md\`.
|
|
4677
|
-
`
|
|
4678
|
-
},
|
|
4679
|
-
{
|
|
4680
|
-
topic: "desktop",
|
|
4681
|
-
title: "Desktop apps \u2014 one codebase, a window, and an installer",
|
|
4682
|
-
summary: "How a Workser desktop app is built, what breaks only after it is installed, and how to produce and publish a signed installer.",
|
|
4683
|
-
commands: ["project", "env", "deploy"],
|
|
4684
|
-
source: "skills/workser/reference/desktop.md",
|
|
4685
|
-
body: `# Desktop apps
|
|
4686
|
-
|
|
4687
|
-
A Workser desktop app is **one Next.js codebase with two ways to run**: a normal
|
|
4688
|
-
web build for development and preview, and an Electron shell that loads the
|
|
4689
|
-
static export from disk and gets packaged into an installer.
|
|
4690
|
-
|
|
4691
|
-
There is no deploy. A desktop app has no Vercel project and no URL \u2014 its
|
|
4692
|
-
preview is the app running locally, and its deliverable is a file someone
|
|
4693
|
-
double-clicks.
|
|
4694
|
-
|
|
4695
|
-
## The rule that breaks everything, and only after install
|
|
4696
|
-
|
|
4697
|
-
**The app must stay statically exportable.** A packaged Electron app loads from
|
|
4698
|
-
\`file://\` and has **no Node server**. So none of this exists once it is
|
|
4699
|
-
installed:
|
|
4700
|
-
|
|
4701
|
-
- server components that fetch at request time
|
|
4702
|
-
- server actions (\`"use server"\`)
|
|
4703
|
-
- route handlers under \`app/api/*\`
|
|
4704
|
-
- \`next/image\` optimisation
|
|
4705
|
-
|
|
4706
|
-
Every one of them works in \`npm run dev\` **and** in the local preview, and fails
|
|
4707
|
-
only on the owner's machine. That is the one direction of error nobody catches,
|
|
4708
|
-
so \`next.config.mjs\` keeps \`output: "export"\` to make the build fail loudly
|
|
4709
|
-
instead. Do not remove it to "fix" an import.
|
|
4710
|
-
|
|
4711
|
-
Need a server? Use the project's api app \u2014 \`workser project apps\` to find it,
|
|
4712
|
-
then read its URL and set \`NEXT_PUBLIC_API_URL\`. See \`workser help apps\`.
|
|
4713
|
-
|
|
4714
|
-
## Secrets: this is a public client
|
|
4715
|
-
|
|
4716
|
-
Anyone who installs the app can read every string inside it. So:
|
|
4717
|
-
|
|
4718
|
-
- \`NEXT_PUBLIC_*\` only, and nothing behind that prefix is private
|
|
4719
|
-
- never a database URL, an API key, or a \`wsgw_\` gateway key
|
|
4720
|
-
- anything privileged lives in the api app and is reached over HTTP
|
|
4721
|
-
|
|
4722
|
-
The manifest deliberately does not declare \`AI_GATEWAY_API_KEY\` for this type,
|
|
4723
|
-
which is what stops Workser seeding one. Do not add it.
|
|
4724
|
-
|
|
4725
|
-
## The two processes
|
|
4726
|
-
|
|
4727
|
-
| File | Runs where | May do |
|
|
4728
|
-
| --- | --- | --- |
|
|
4729
|
-
| \`electron/main.js\` | Node, on the machine | files, tray, windows, updates |
|
|
4730
|
-
| \`app/**\` | the renderer, sandboxed | ordinary web code, no Node |
|
|
4731
|
-
| \`electron/preload.js\` | the bridge | expose **named functions** only |
|
|
4732
|
-
|
|
4733
|
-
\`contextIsolation: true\` and \`nodeIntegration: false\` are not defaults to tidy
|
|
4734
|
-
up \u2014 turning either off hands full filesystem and process access to page code.
|
|
4735
|
-
Add a capability by exporting one named function from preload, never by handing
|
|
4736
|
-
the renderer \`ipcRenderer\`.
|
|
4737
|
-
|
|
4738
|
-
## Building and shipping
|
|
4739
|
-
|
|
4740
|
-
\`\`\`bash
|
|
4741
|
-
npm run dev # browser only, fastest loop
|
|
4742
|
-
npm run dev:desktop # the same app inside a real Electron window
|
|
4743
|
-
npm run build # static export -> out/
|
|
4744
|
-
npm run dist:desktop # the installer -> release/
|
|
4745
|
-
\`\`\`
|
|
4746
|
-
|
|
4747
|
-
In the app, **Publish \u2192 Your installer** does the same thing with a target
|
|
4748
|
-
picker, progress, and a download link at the end.
|
|
4749
|
-
|
|
4750
|
-
## Signing \u2014 the owner's certificate, never Workser's
|
|
4751
|
-
|
|
4752
|
-
An unsigned build runs perfectly on the machine that made it and tells every
|
|
4753
|
-
other machine the app is damaged (macOS) or trips SmartScreen (Windows). That
|
|
4754
|
-
is the failure an owner cannot diagnose, so say it before they send the file.
|
|
4755
|
-
|
|
4756
|
-
\`electron-builder\` reads these from the environment; set them with
|
|
4757
|
-
\`workser env set --app <id>\`:
|
|
4758
|
-
|
|
4759
|
-
| Platform | Keys |
|
|
4760
|
-
| --- | --- |
|
|
4761
|
-
| macOS | \`CSC_LINK\`, \`CSC_KEY_PASSWORD\` |
|
|
4762
|
-
| macOS notarize | \`APPLE_ID\`, \`APPLE_APP_SPECIFIC_PASSWORD\`, \`APPLE_TEAM_ID\` |
|
|
4763
|
-
| Windows | \`WIN_CSC_LINK\`, \`WIN_CSC_KEY_PASSWORD\` |
|
|
4764
|
-
|
|
4765
|
-
A Mac app can only be built on a Mac \u2014 \`codesign\` and \`hdiutil\` are Apple's and
|
|
4766
|
-
have no substitute.
|
|
4767
|
-
|
|
4768
|
-
## Auto-update
|
|
4769
|
-
|
|
4770
|
-
Publishing uploads the installer **and** the update metadata
|
|
4771
|
-
(\`latest-mac.yml\` / \`latest.yml\`) beside it. \`electron-updater\` reads only that
|
|
4772
|
-
metadata, so an installer published alone gives you a download that works once
|
|
4773
|
-
and an app that can never update itself \u2014 and nobody notices until release two.
|
|
4774
|
-
Keep \`publish.url\` in \`electron-builder.yml\` pointed at the prefix the publish
|
|
4775
|
-
step reports back.
|
|
4776
4681
|
`
|
|
4777
4682
|
},
|
|
4778
4683
|
{
|
|
@@ -9291,7 +9196,10 @@ var TYPES = [
|
|
|
9291
9196
|
var APP_TYPES = [
|
|
9292
9197
|
"web",
|
|
9293
9198
|
"mobile",
|
|
9294
|
-
|
|
9199
|
+
// NOT OFFERED AT FIRST LAUNCH (2026-09-05) — `desktop` is `creatable: false`
|
|
9200
|
+
// in core-api, so the card would error on the owner's click. Re-enable
|
|
9201
|
+
// together with that flag; grep the marker.
|
|
9202
|
+
// "desktop",
|
|
9295
9203
|
// `api` is the shorthand; the two concrete spellings pick the runtime and
|
|
9296
9204
|
// are accepted at this boundary for an agent that knows which one it wants.
|
|
9297
9205
|
"api",
|
|
@@ -12445,7 +12353,7 @@ function colour(d) {
|
|
|
12445
12353
|
|
|
12446
12354
|
// src/index.ts
|
|
12447
12355
|
var pkg = {
|
|
12448
|
-
version: true ? "0.6.
|
|
12356
|
+
version: true ? "0.6.23" : "0.0.0-dev"
|
|
12449
12357
|
};
|
|
12450
12358
|
var program2 = new Command();
|
|
12451
12359
|
program2.name("workser").description(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workser/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.23",
|
|
4
4
|
"description": "Workser CLI — give your local AI agent native DevOps & infrastructure on Workser. The agent runs `workser …` to provision, deploy, and manage real apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/skills/workser/SKILL.md
CHANGED
|
@@ -22,7 +22,6 @@ screen long. Find your row, run that **one** command — every line costs you.
|
|
|
22
22
|
| Follow the project's brand — colours, fonts, logo | `design …` | `workser help brand` |
|
|
23
23
|
| Provision or query Postgres; list end users | `db …`, `auth …` | `workser help database` |
|
|
24
24
|
| See the project's other apps, and wire one to another | `project …`, `env … --app` | `workser help apps` |
|
|
25
|
-
| Build a desktop app, sign it, ship an installer | `deploy`, `env …` | `workser help desktop` |
|
|
26
25
|
| Deploy, set env vars, read logs, check a domain | `deploy`, `env …`, `logs`, `versions`, `domain`, `open` | `workser help deploy` |
|
|
27
26
|
| Save work before a risky change, undo it, sync this folder | `checkpoint`, `restore`, `sync` | `workser help version-control` |
|
|
28
27
|
| Put files in the project's bucket | `storage …` | `workser help storage` |
|
|
@@ -101,7 +101,7 @@ forever; if it does, carry on and state clearly what you assumed.
|
|
|
101
101
|
## Asking for an app that does not exist yet
|
|
102
102
|
|
|
103
103
|
The project needs a kind of app it does not have — a backend for the phone app, a
|
|
104
|
-
|
|
104
|
+
phone version of the website. **You cannot create one yourself**, by design: apps
|
|
105
105
|
are real infrastructure on the owner's account. Ask, and their click creates it.
|
|
106
106
|
The answer gives you the new app's id.
|
|
107
107
|
|
|
@@ -116,15 +116,19 @@ workser ask "The phone app needs an API to hold its data. Add one?" \
|
|
|
116
116
|
|---|---|
|
|
117
117
|
| `web` | Next.js site on Workser hosting |
|
|
118
118
|
| `mobile` | Expo / React Native phone app |
|
|
119
|
-
| `desktop` | Next.js + Electron, installs on a Mac or PC |
|
|
120
119
|
| `api` | backend service — `api-hono` (TypeScript) or `api-python` (FastAPI) |
|
|
121
120
|
|
|
122
121
|
**Name the kind you actually mean.** Asking for `web` because you are unsure is
|
|
123
|
-
how a
|
|
122
|
+
how a phone app gets created as a website: the card shows the owner the kind
|
|
124
123
|
you named, they approve THAT, and the wrong app is provisioned under your own
|
|
125
124
|
sentence asking for the right one. An unknown kind is refused with the list
|
|
126
125
|
above rather than guessed at — read it and ask again.
|
|
127
126
|
|
|
127
|
+
**There is no desktop app type.** Workser builds websites, phone apps and
|
|
128
|
+
backend services. If the owner asks for a Mac or Windows app, say plainly that
|
|
129
|
+
Workser cannot make one yet — do not offer a web app dressed as a window, and
|
|
130
|
+
do not build a "desktop-style" page instead. That is not what they asked for.
|
|
131
|
+
|
|
128
132
|
**Never ask for a secret value this way** — the answer is stored and displayed. Ask
|
|
129
133
|
*where* a key should go, then have the user set it (`workser env set` writes it
|
|
130
134
|
without you ever seeing it).
|
|
File without changes
|