@skillcdn/console 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -11
- package/SKILLCDN.md +3 -3
- package/dist/agent-page.d.ts.map +1 -1
- package/dist/agent-page.js +3 -2
- package/dist/agent-page.js.map +1 -1
- package/dist/api.d.ts +7 -6
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +6 -5
- package/dist/api.js.map +1 -1
- package/dist/charts.d.ts +103 -0
- package/dist/charts.d.ts.map +1 -0
- package/dist/charts.js +182 -0
- package/dist/charts.js.map +1 -0
- package/dist/cli/cli.d.ts +26 -2
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +1304 -383
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/command-words.d.ts +20 -0
- package/dist/cli/command-words.d.ts.map +1 -0
- package/dist/cli/command-words.js +51 -0
- package/dist/cli/command-words.js.map +1 -0
- package/dist/cli/credentials.d.ts +54 -5
- package/dist/cli/credentials.d.ts.map +1 -1
- package/dist/cli/credentials.js +126 -20
- package/dist/cli/credentials.js.map +1 -1
- package/dist/cli/directory.d.ts +19 -4
- package/dist/cli/directory.d.ts.map +1 -1
- package/dist/cli/directory.js +16 -8
- package/dist/cli/directory.js.map +1 -1
- package/dist/cli/format.d.ts +65 -8
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +242 -37
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts +13 -4
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +92 -54
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/main.js +76 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/pack.d.ts +69 -60
- package/dist/cli/pack.d.ts.map +1 -1
- package/dist/cli/pack.js +241 -270
- package/dist/cli/pack.js.map +1 -1
- package/dist/cli/plugin-check.d.ts +42 -0
- package/dist/cli/plugin-check.d.ts.map +1 -1
- package/dist/cli/plugin-check.js +221 -36
- package/dist/cli/plugin-check.js.map +1 -1
- package/dist/cli/plugin-cli.d.ts +6 -1
- package/dist/cli/plugin-cli.d.ts.map +1 -1
- package/dist/cli/plugin-cli.js +21 -4
- package/dist/cli/plugin-cli.js.map +1 -1
- package/dist/cli/plugin-main.js +1 -0
- package/dist/cli/plugin-main.js.map +1 -1
- package/dist/cli/serve.d.ts +33 -1
- package/dist/cli/serve.d.ts.map +1 -1
- package/dist/cli/serve.js +252 -3
- package/dist/cli/serve.js.map +1 -1
- package/dist/client.d.ts +48 -9
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +72 -80
- package/dist/client.js.map +1 -1
- package/dist/components/agent-page.d.ts +64 -1
- package/dist/components/agent-page.d.ts.map +1 -1
- package/dist/components/agent-page.js +244 -96
- package/dist/components/agent-page.js.map +1 -1
- package/dist/components/charts.d.ts +157 -0
- package/dist/components/charts.d.ts.map +1 -0
- package/dist/components/charts.js +182 -0
- package/dist/components/charts.js.map +1 -0
- package/dist/components/desk-records.d.ts +102 -0
- package/dist/components/desk-records.d.ts.map +1 -0
- package/dist/components/desk-records.js +221 -0
- package/dist/components/desk-records.js.map +1 -0
- package/dist/components/desk.d.ts +85 -0
- package/dist/components/desk.d.ts.map +1 -0
- package/dist/components/desk.js +135 -0
- package/dist/components/desk.js.map +1 -0
- package/dist/components/event-feed.d.ts.map +1 -1
- package/dist/components/event-feed.js +4 -1
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/home.d.ts.map +1 -1
- package/dist/components/home.js +4 -2
- package/dist/components/home.js.map +1 -1
- package/dist/components/plugin-settings.d.ts.map +1 -1
- package/dist/components/plugin-settings.js +54 -3
- package/dist/components/plugin-settings.js.map +1 -1
- package/dist/components/projects.d.ts.map +1 -1
- package/dist/components/projects.js +27 -7
- package/dist/components/projects.js.map +1 -1
- package/dist/components/rules.d.ts +8 -10
- package/dist/components/rules.d.ts.map +1 -1
- package/dist/components/rules.js +35 -13
- package/dist/components/rules.js.map +1 -1
- package/dist/components/setup.d.ts +9 -3
- package/dist/components/setup.d.ts.map +1 -1
- package/dist/components/setup.js +10 -4
- package/dist/components/setup.js.map +1 -1
- package/dist/console.css +677 -7
- package/dist/console.d.ts +5 -0
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +14 -8
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +32 -33
- package/dist/data.js.map +1 -1
- package/dist/desk-page.d.ts +38 -0
- package/dist/desk-page.d.ts.map +1 -0
- package/dist/desk-page.js +184 -0
- package/dist/desk-page.js.map +1 -0
- package/dist/desk-records-page.d.ts +18 -0
- package/dist/desk-records-page.d.ts.map +1 -0
- package/dist/desk-records-page.js +130 -0
- package/dist/desk-records-page.js.map +1 -0
- package/dist/desk-records.d.ts +247 -0
- package/dist/desk-records.d.ts.map +1 -0
- package/dist/desk-records.js +543 -0
- package/dist/desk-records.js.map +1 -0
- package/dist/desk.d.ts +122 -0
- package/dist/desk.d.ts.map +1 -0
- package/dist/desk.js +211 -0
- package/dist/desk.js.map +1 -0
- package/dist/feed-stream.d.ts +39 -0
- package/dist/feed-stream.d.ts.map +1 -0
- package/dist/feed-stream.js +117 -0
- package/dist/feed-stream.js.map +1 -0
- package/dist/home-tiles.d.ts +10 -3
- package/dist/home-tiles.d.ts.map +1 -1
- package/dist/home-tiles.js +54 -31
- package/dist/home-tiles.js.map +1 -1
- package/dist/i18n/en.d.ts +180 -5
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +184 -7
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +169 -6
- package/dist/i18n/ko.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +11 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +11 -0
- package/dist/limits.js.map +1 -1
- package/dist/onboarding.d.ts +6 -0
- package/dist/onboarding.d.ts.map +1 -1
- package/dist/onboarding.js +3 -3
- package/dist/onboarding.js.map +1 -1
- package/dist/plugin/context.d.ts +42 -11
- package/dist/plugin/context.d.ts.map +1 -1
- package/dist/plugin/limits.d.ts +2 -0
- package/dist/plugin/limits.d.ts.map +1 -1
- package/dist/plugin/limits.js +2 -0
- package/dist/plugin/limits.js.map +1 -1
- package/dist/plugin/manifest.d.ts +13 -0
- package/dist/plugin/manifest.d.ts.map +1 -1
- package/dist/plugin/manifest.js +30 -3
- package/dist/plugin/manifest.js.map +1 -1
- package/dist/plugin/rest-schemas.d.ts +55 -0
- package/dist/plugin/rest-schemas.d.ts.map +1 -1
- package/dist/plugin/rest-schemas.js +37 -0
- package/dist/plugin/rest-schemas.js.map +1 -1
- package/dist/plugin/sandbox.d.ts.map +1 -1
- package/dist/plugin/sandbox.js +4 -1
- package/dist/plugin/sandbox.js.map +1 -1
- package/dist/plugin/testing.d.ts +6 -2
- package/dist/plugin/testing.d.ts.map +1 -1
- package/dist/plugin/testing.js +52 -10
- package/dist/plugin/testing.js.map +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/records.d.ts +283 -0
- package/dist/records.d.ts.map +1 -0
- package/dist/records.js +543 -0
- package/dist/records.js.map +1 -0
- package/dist/routes.d.ts +3 -1
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +3 -1
- package/dist/routes.js.map +1 -1
- package/dist/rules.d.ts +30 -11
- package/dist/rules.d.ts.map +1 -1
- package/dist/rules.js +98 -45
- package/dist/rules.js.map +1 -1
- package/dist/runner/acp.d.ts +1 -1
- package/dist/runner/acp.d.ts.map +1 -1
- package/dist/runner/acp.js +31 -20
- package/dist/runner/acp.js.map +1 -1
- package/dist/runner/claude.d.ts +1 -1
- package/dist/runner/claude.d.ts.map +1 -1
- package/dist/runner/claude.js +85 -15
- package/dist/runner/claude.js.map +1 -1
- package/dist/runner/codex.d.ts +1 -1
- package/dist/runner/codex.d.ts.map +1 -1
- package/dist/runner/codex.js +19 -16
- package/dist/runner/codex.js.map +1 -1
- package/dist/runner/desk.d.ts +43 -2
- package/dist/runner/desk.d.ts.map +1 -1
- package/dist/runner/desk.js +166 -10
- package/dist/runner/desk.js.map +1 -1
- package/dist/runner/process.d.ts.map +1 -1
- package/dist/runner/process.js +11 -4
- package/dist/runner/process.js.map +1 -1
- package/dist/runner/redact.d.ts +39 -4
- package/dist/runner/redact.d.ts.map +1 -1
- package/dist/runner/redact.js +81 -5
- package/dist/runner/redact.js.map +1 -1
- package/dist/runner/runner.d.ts +15 -1
- package/dist/runner/runner.d.ts.map +1 -1
- package/dist/runner/runner.js +231 -33
- package/dist/runner/runner.js.map +1 -1
- package/dist/runner/task-scheduler.d.ts +20 -0
- package/dist/runner/task-scheduler.d.ts.map +1 -1
- package/dist/runner/task-scheduler.js +34 -4
- package/dist/runner/task-scheduler.js.map +1 -1
- package/dist/runner/types.d.ts +36 -1
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/types.js +17 -0
- package/dist/runner/types.js.map +1 -1
- package/dist/runner.d.ts +6 -6
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +5 -5
- package/dist/runner.js.map +1 -1
- package/dist/schemas.d.ts +509 -5
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +76 -16
- package/dist/schemas.js.map +1 -1
- package/dist/services.d.ts +22 -5
- package/dist/services.d.ts.map +1 -1
- package/dist/services.js +35 -15
- package/dist/services.js.map +1 -1
- package/dist/setup-guide.d.ts +3 -1
- package/dist/setup-guide.d.ts.map +1 -1
- package/dist/setup-guide.js +7 -4
- package/dist/setup-guide.js.map +1 -1
- package/dist/vocabulary.d.ts +14 -3
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +13 -3
- package/dist/vocabulary.js.map +1 -1
- package/docs/specs/cli.md +64 -38
- package/docs/specs/plugins.md +27 -20
- package/docs/specs/records.md +113 -0
- package/docs/specs/rest.md +20 -13
- package/docs/specs/runner.md +23 -17
- package/package.json +7 -2
- package/skills/building-a-console/SKILL.md +4 -4
- package/skills/building-a-plugin/SKILL.md +6 -6
- package/skills/deploying-a-console/SKILL.md +4 -4
- package/skills/deploying-a-console/references/resources.md +41 -4
- package/skills/deploying-a-console/references/running-it-again.md +3 -2
- package/skills/keeping-a-desk/SKILL.md +133 -0
- package/skills/keeping-a-desk/collections.md +96 -0
- package/skills/planning-the-board/SKILL.md +14 -18
- package/skills/planning-the-board/references/a-task.md +2 -2
- package/skills/planning-the-board/references/project-rules.md +13 -14
- package/skills/planning-the-board/references/setting-up.md +15 -13
- package/skills/running-an-agent/SKILL.md +10 -9
- package/skills/working-the-board/SKILL.md +62 -44
- package/skills/working-the-board/references/terms.md +9 -5
- package/skills/working-the-board/references/the-pack.md +12 -10
- package/skills/working-the-board/references/the-sentence.md +2 -2
- package/src/agent-page.tsx +3 -1
- package/src/api.ts +77 -2
- package/src/charts.ts +250 -0
- package/src/cli/cli.ts +1698 -476
- package/src/cli/command-words.ts +56 -0
- package/src/cli/credentials.ts +181 -20
- package/src/cli/directory.ts +28 -10
- package/src/cli/format.ts +301 -46
- package/src/cli/help.ts +102 -54
- package/src/cli/main.ts +72 -2
- package/src/cli/pack.ts +333 -372
- package/src/cli/plugin-check.ts +275 -34
- package/src/cli/plugin-cli.ts +28 -4
- package/src/cli/plugin-main.ts +1 -0
- package/src/cli/serve.ts +295 -2
- package/src/client.ts +192 -177
- package/src/components/agent-page.tsx +489 -243
- package/src/components/charts.tsx +680 -0
- package/src/components/desk-records.tsx +724 -0
- package/src/components/desk.tsx +471 -0
- package/src/components/event-feed.tsx +5 -1
- package/src/components/home.tsx +12 -0
- package/src/components/plugin-settings.tsx +171 -12
- package/src/components/projects.tsx +29 -12
- package/src/components/rules.tsx +94 -34
- package/src/components/setup.tsx +18 -3
- package/src/console.tsx +17 -9
- package/src/data.ts +37 -34
- package/src/desk-page.tsx +332 -0
- package/src/desk-records-page.tsx +256 -0
- package/src/desk-records.ts +808 -0
- package/src/desk.ts +329 -0
- package/src/feed-stream.ts +144 -0
- package/src/home-tiles.ts +55 -35
- package/src/i18n/en.ts +196 -9
- package/src/i18n/ko.ts +178 -8
- package/src/index.ts +118 -0
- package/src/limits.ts +11 -0
- package/src/onboarding.ts +12 -4
- package/src/plugin/context.ts +55 -12
- package/src/plugin/limits.ts +2 -0
- package/src/plugin/manifest.ts +38 -2
- package/src/plugin/rest-schemas.ts +41 -0
- package/src/plugin/sandbox.ts +4 -1
- package/src/plugin/testing.ts +63 -12
- package/src/plugin.ts +2 -0
- package/src/records.ts +702 -0
- package/src/routes.ts +3 -1
- package/src/rules.ts +108 -47
- package/src/runner/acp.ts +47 -29
- package/src/runner/claude.ts +113 -23
- package/src/runner/codex.ts +35 -25
- package/src/runner/desk.ts +198 -12
- package/src/runner/process.ts +11 -4
- package/src/runner/redact.ts +92 -6
- package/src/runner/runner.ts +275 -34
- package/src/runner/task-scheduler.ts +36 -4
- package/src/runner/types.ts +47 -1
- package/src/runner.ts +27 -2
- package/src/schemas.ts +83 -15
- package/src/services.ts +49 -14
- package/src/setup-guide.ts +6 -2
- package/src/styles/README.md +11 -1
- package/src/styles/console.css +9 -0
- package/src/styles/pages/desk.css +126 -0
- package/src/styles/pages/documents.css +5 -0
- package/src/styles/parts/bars.css +80 -0
- package/src/styles/parts/chart.css +173 -0
- package/src/styles/parts/figures.css +65 -0
- package/src/styles/parts/legend.css +48 -0
- package/src/styles/parts/series.css +32 -0
- package/src/styles/parts/share.css +25 -0
- package/src/styles/parts/spark.css +23 -0
- package/src/styles/parts/stat.css +69 -0
- package/src/styles/tokens.css +13 -7
- package/src/vocabulary.ts +16 -3
- package/template/desk-web/README.md +8 -0
- package/template/desk-web/index.html +13 -0
- package/template/desk-web/package.json +25 -0
- package/template/desk-web/src/main.tsx +24 -0
- package/template/desk-web/src/page.tsx +51 -0
- package/template/desk-web/tsconfig.json +16 -0
- package/template/desk-web/vite.config.ts +15 -0
|
@@ -5,7 +5,7 @@ license: MIT
|
|
|
5
5
|
compatibility: A shell with Node.js 24 or newer and npm or pnpm, and an agent that reads and writes files. For looking at the pages against a board, the console command signed in by a person. A browser the agent can drive is optional. No key of the agent's own is needed, and it never sees a token.
|
|
6
6
|
metadata:
|
|
7
7
|
author: skillcdn
|
|
8
|
-
version: "1.
|
|
8
|
+
version: "1.11"
|
|
9
9
|
skillcdn:
|
|
10
10
|
translations:
|
|
11
11
|
ko:
|
|
@@ -38,7 +38,7 @@ Nothing here restates them: they are the contract, current at the version instal
|
|
|
38
38
|
|
|
39
39
|
1. **The package's README**: `node_modules/@skillcdn/console/README.md` once installed, [`packages/console/README.md`](/packages/console/README.md) in the console's repository. Every export by layer and what each takes, the styles, the languages, and "A console of your own" with two of the four files to write.
|
|
40
40
|
2. **The types**: `node_modules/@skillcdn/console/dist/index.d.ts`, `api.d.ts`, `cli/cli.d.ts` and `web.d.ts`: the exact props of every component and the shape of every answer, with the comment that says what each is for.
|
|
41
|
-
3. **The sources**, shipped with the package under `src/`: `console.tsx` (how the default console composes the pages from the components, routes, and loads its data), `components/*.tsx` (each component and what it renders), `data.ts` (how the workspace and a project are loaded and kept current by the stream), `styles/` (the tokens, `--sc-*`, in `tokens.css`; every class, `sc`-prefixed, a part each under `parts/` with the catalogue of them in `README.md`, and the pages' own under `pages/`; `styles/console.css` is their order, joined into the one `console.css` a console loads), `i18n/en.ts` (every word the pages show, keyed as a pack is). The repository's tests (`packages/console/src/components/components.test.tsx`, `src/console.test.tsx`), not shipped in the package, show what each piece renders, for tests of one's own.
|
|
41
|
+
3. **The sources**, shipped with the package under `src/`: `console.tsx` (how the default console composes the pages from the components, routes, and loads its data), `components/*.tsx` (each component and what it renders), `data.ts` (how the workspace and a project are loaded and kept current by the stream), `styles/` (the tokens, `--sc-*`, in `tokens.css`; every class, `sc`-prefixed, a part each under `parts/` with the catalogue of them in `README.md`, the charts for figures among them, and the pages' own under `pages/`; `styles/console.css` is their order, joined into the one `console.css` a console loads), `i18n/en.ts` (every word the pages show, keyed as a pack is). The repository's tests (`packages/console/src/components/components.test.tsx`, `src/console.test.tsx`), not shipped in the package, show what each piece renders, for tests of one's own.
|
|
42
42
|
4. **The REST API**: [docs/specs/rest.md](/docs/specs/rest.md), in the package at `docs/specs/rest.md`: every route, what it takes and answers, who may ask, and the codes of its refusals; for a script. **The command line**: [docs/specs/cli.md](/docs/specs/cli.md), for `console serve`.
|
|
43
43
|
5. **The default console itself**, `apps/console/web/` in the console's repository: the page, the script, the build and the compiler's settings, with the brand, the fonts and the icons wired in. Its four files are quoted in [the-default-console.md](references/the-default-console.md), kept identical to them by the repository's check, for an agent that has the skill and not the repository; a console of one's own copies their shape.
|
|
44
44
|
6. **The architecture**: [docs/architecture.md](/docs/architecture.md) for how the parts fit, and the [decisions](/docs/adr/README.md), both documents of the console's repository, read through the connection that served this skill and not in the package; ADR-0014 says how a person's own console reaches the organization's. Not needed for a re-skin.
|
|
@@ -61,7 +61,7 @@ Each phase produces something the person can look at and ends with one line to t
|
|
|
61
61
|
|
|
62
62
|
### Phase 1: Start from the default console
|
|
63
63
|
|
|
64
|
-
Produces the **plan** and the first build. Install first, in the new folder, or in `console-ui/` of the deployment repository, so that the README, the types and the sources are at hand for the plan: the install writes only `package.json`, the lockfile and `node_modules`, and the plan is shown before any file of the console is written. For the organization's console the package is installed at the version the deployment pins: `CONSOLE_REF` in `deploy/console.env` of the deployment repository is the commit of a release tag `@skillcdn/console@<version>`, and `npm install @skillcdn/console@<version>` takes that one, so that the README, the types and the sources are the deployment's own, and the pages and the server are one release. A console is four files and a configuration: `index.html` with a `#root`, `src/main.tsx` that calls `createConsole({ ... }).mount(root)` and imports `@skillcdn/console/console.css`, `vite.config.ts` with the React plugin and, for building against the real board, `/api` sent to `console serve` with `changeOrigin`, and `tsconfig.json` with `jsx`, `moduleResolution: "Bundler"` and the `vite/client` types that make an imported picture a module. The README's "A console of your own" shows two of them, the-default-console.md all four with the marks, the icons and a face wired in. Write the plan (the kind, where the build goes, the files, what is configured, what is replaced, the colours and the marks) and stop for the checkpoint; then write the files and build: `npx vite build` makes `dist/` with its `index.html`. A script instead imports `createClient` from `@skillcdn/console/api`, which brings no React.
|
|
64
|
+
Produces the **plan** and the first build. Install first, in the new folder, or in `console-ui/` of the deployment repository, so that the README, the types and the sources are at hand for the plan: the install writes only `package.json`, the lockfile and `node_modules`, and the plan is shown before any file of the console is written. For the organization's console the package is installed at the version the deployment pins: `CONSOLE_REF` in `deploy/console.env` of the deployment repository is the commit of a release tag `@skillcdn/console@<version>`, and `npm install @skillcdn/console@<version>` takes that one, so that the README, the types and the sources are the deployment's own, and the pages and the server are one release. A console is four files and a configuration: `index.html` with a `#root`, `src/main.tsx` that calls `createConsole({ ... }).mount(root)` and imports `@skillcdn/console/console.css`, `vite.config.ts` with the React plugin and, for building against the real board, `/api` sent to `console serve` with `changeOrigin`, and `tsconfig.json` with `jsx`, `moduleResolution: "Bundler"` and the `vite/client` types that make an imported picture a module. The README's "A console of your own" shows two of them, the-default-console.md all four with the marks, the icons and a face wired in. A person's own console that is to show what they made, with their own work on the board beside it, starts from the shell the package ships for a desk's pages, `template/desk-web` in the package, which `console desk --web` writes into a desk's `web/`: the four files with one empty page of the member's own (`src/page.tsx`, at `/pages/mine`), as the README's "A desk's pages" says. Write the plan (the kind, where the build goes, the files, what is configured, what is replaced, the colours and the marks) and stop for the checkpoint; then write the files and build: `npx vite build` makes `dist/` with its `index.html`. A script instead imports `createClient` from `@skillcdn/console/api`, which brings no React.
|
|
65
65
|
|
|
66
66
|
### Phase 2: Configure before replacing
|
|
67
67
|
|
|
@@ -69,7 +69,7 @@ Produces the **configuration**, as [configuring.md](references/configuring.md) l
|
|
|
69
69
|
|
|
70
70
|
### Phase 3: Compose pages of one's own
|
|
71
71
|
|
|
72
|
-
Produces the **pages**. For a page the default console lacks: `useConsoleData(client, projectKey)` answers the workspace and the project the page is on, kept current by the project's stream, with the actions; the components take their data as props and nothing from the network; `matchRoute`, `PATHS`, `projectHref`, `taskHref`, `decisionHref` and `docHref` name the addresses; `Shell` is the header with the tabs and the person's menu. A page as a tab is `pages` in the configuration, its `render` composing the components over what it is given; a composition of one's own is `src/console.tsx` with pages added or taken away (configuring.md "A page of one's own"). A page composes the board's own data and holds none of its own: a page that would keep records, run logic or reach outside is a feature of the organization's work, which is a plugin, not a page ([building-a-plugin](/skills/building-a-plugin/SKILL.md)); a plugin's pages come in its package and run in frames the console serves, drawn into the tabs by the console itself, so that a console's pages need no build and no change for one. A request without a page of its own skips this phase.
|
|
72
|
+
Produces the **pages**. For a page the default console lacks: `useConsoleData(client, projectKey)` answers the workspace and the project the page is on, kept current by the project's stream, with the actions; the components take their data as props and nothing from the network; `matchRoute`, `PATHS`, `projectHref`, `taskHref`, `decisionHref` and `docHref` name the addresses; `Shell` is the header with the tabs and the person's menu. A page as a tab is `pages` in the configuration, its `render` composing the components over what it is given (the README's "Pages of your own" says what that is), with figures drawn by the charts (the README's "Charts" says which is for what); a composition of one's own is `src/console.tsx` with pages added or taken away (configuring.md "A page of one's own"). A page composes the board's own data and holds none of its own: a page that would keep records, run logic or reach outside is a feature of the organization's work, which is a plugin, not a page ([building-a-plugin](/skills/building-a-plugin/SKILL.md)); a plugin's pages come in its package and run in frames the console serves, drawn into the tabs by the console itself, so that a console's pages need no build and no change for one. A request without a page of its own skips this phase.
|
|
73
73
|
|
|
74
74
|
### Phase 4: Run it against the board
|
|
75
75
|
|
|
@@ -5,7 +5,7 @@ license: MIT
|
|
|
5
5
|
compatibility: A shell with Node.js 24 or newer, npm and git, and an agent that reads and writes files. For running the plugin on a local console, Docker for the database and a checkout of the console's repository, where signing in needs a GitHub OAuth app of the person's own, as the console's README says. The console command is optional, for running the plugin's commands as an agent would. No key of the agent's own is needed, and it never sees a token.
|
|
6
6
|
metadata:
|
|
7
7
|
author: skillcdn
|
|
8
|
-
version: "1.
|
|
8
|
+
version: "1.9"
|
|
9
9
|
skillcdn:
|
|
10
10
|
translations:
|
|
11
11
|
ko:
|
|
@@ -77,12 +77,12 @@ Produces the **design**: one table, a row per thing the feature does, saying who
|
|
|
77
77
|
| Another plugin must tell it | A **hook** on `plugin:<key>:<kind>` (`events:plugins`), or a call on the other's `api` (`plugins:<key>`). |
|
|
78
78
|
| Time passes | A **job** (`jobs`), `every` or `at` in the workspace's time zone, never two at once; what it did goes into records and, where people should know, a task or a decision. |
|
|
79
79
|
| An outside service calls in | An **endpoint** (`endpoints`): a `person` endpoint for whoever holds a role, a `webhook` for nobody, verified with `ctx.secrets.verify` against a secret setting. |
|
|
80
|
-
| The plugin must call out | `ctx.fetch` to a host the manifest names (`outbound:<host>`), with `GET`, `HEAD`, `POST`, `PUT`, `PATCH`, `DELETE` or `OPTIONS`, the secrets put in by the console from `secret` settings (`secret` or `secrets`, each `as` a header, `bearer`, a query parameter, `basic` or `body:<field>`), never read by the plugin, nor in an answer that sends them back; what an answer gives back that is secret, the tokens of an exchange, sealed by the console into `secret` settings with `seal` before the plugin reads the answer, with their expiry, the answer's `sealed` saying what became of each (a token endpoint is asked for JSON, since the body of an answer that is no JSON is withheld), and sealed again by a job that reads `ctx.secrets.status(name)`; a callback the service is to call is `ctx.endpoints.url(name)`, the full address of one of the plugin's endpoints, and a link back to the console starts from `ctx.console.workspace().url`. |
|
|
80
|
+
| The plugin must call out | `ctx.fetch` to a host the manifest names (`outbound:<host>`), with `GET`, `HEAD`, `POST`, `PUT`, `PATCH`, `DELETE` or `OPTIONS`, the secrets put in by the console from `secret` settings (`secret` or `secrets`, each `as` a header, `bearer`, a query parameter, `basic` or `body:<field>`), never read by the plugin, nor in an answer that sends them back; what an answer gives back that is secret, the tokens of an exchange, sealed by the console into `secret` settings with `seal` before the plugin reads the answer, with their expiry, the answer's `sealed` saying what became of each (a token endpoint is asked for JSON, since the body of an answer that is no JSON is withheld), and sealed again by a job that reads `ctx.secrets.status(name)`; a token per installation of a service, one for each workspace an app is installed in, a `secret` setting declared `keyed: { max }`, sealed under the key the same answer names (`seal: { <setting>: { path, key: "$.team.id" } }`), put in by its key (`secret: { name, key, as }`), listed with `ctx.secrets.keys(name)`, forgotten with `forget(name, key)` when the installation is gone, and an upgrade's `move(name, key)` keeping the one value of before under a key ([ADR-0111](/docs/adr/0111-a-secret-setting-may-keep-one-value-per-key.md)); a callback the service is to call is `ctx.endpoints.url(name)`, the full address of one of the plugin's endpoints, and a link back to the console starts from `ctx.console.workspace().url`. |
|
|
81
81
|
| It acts for a person who did something elsewhere, or reads another plugin as itself | `people:act`, then `ctx.plugins.get(key).for(personId)` for the other plugin's api as the person, or `ctx.console.decisions.answer(id, answer, { for })` for a decision the person answered elsewhere, one on their own plate (addressed to them, or a plugin's addressed to someone they manage): the person's standing as a member decides, never their administration, and the record is theirs through the plugin. A role of another plugin, asked in the manifest's `grants` with why, is held as itself from a job or a hook, with `ctx.plugin.grants` saying what was granted ([ADR-0072](/docs/adr/0072-a-plugin-is-a-principal-it-holds-roles-granted-to-it-calls-as-itself-and-acts-for-a-person-within-what-both-may-do.md)). |
|
|
82
82
|
| People look at it, or fill a form (a calendar starts its week on `frame.context.workspace.firstDay`, the day the workspace's setting says, and reads `timeZone` beside it; faces come from `frame.people.picture(id)`, since a frame loads no image from elsewhere) | A **page** (level `workspace` or `project`) or a **widget** on the front page, which declares the `sizes` it comes in, at least one of them no wider than four cells, which is all a phone has (`small` 2×2, `medium` 4×2, `large` 4×4, `wide` 8×2, `full` 8×4, square cells of the page's grid) and lays itself out for the one it has (`frame.context.size`, `frame.onSize`), since the person arranges the page ([ADR-0061](/docs/adr/0061-the-front-page-is-one-grid-of-tiles-a-person-arranges-by-hand.md)): it shows records and calls commands and queries through the bridge; the logic stays in the server module, so that the command line and the pages do the same thing. |
|
|
83
83
|
| An agent must know how | A **skill** in the package, one per kind of work, naming the commands as `console plugin <key> <command>`, with the rules of that work; `SKILLCDN.md` at the root. The agent note of the manifest is the one line that sends an agent to them. |
|
|
84
84
|
|
|
85
|
-
Then the data. Records, unless the feature needs what records do not give: joins across many collections, more rows than a plugin's records may hold, or figures beyond counting, summing, the least and the most; then `storage:sql`, a schema and a role of the plugin's own with migrations under `migrations/`, which needs the deployment's database user to hold `CREATEROLE` and is said in the hand-over. Records are the default: the console keeps them with versions, files, links, search and aggregates, exports and purges them, and shows them to people by role; a schema is the plugin's to keep.
|
|
85
|
+
Then the data. Records, unless the feature needs what records do not give: joins across many collections, more rows than a plugin's records may hold, or figures beyond counting, summing, the least and the most; then `storage:sql`, a schema and a role of the plugin's own with migrations under `migrations/`, which needs the deployment's database user to hold `CREATEROLE` and to own the database, closes the console's schemas to every other role not granted them by name, and is said in the hand-over. The role reaches its own schema alone: a statement that names a table of the console's is refused. Records are the default: the console keeps them with versions, files, links, search and aggregates, exports and purges them, and shows them to people by role; a schema is the plugin's to keep.
|
|
86
86
|
|
|
87
87
|
Then the capabilities: the list the split needs, each read as the sentence the administrator will consent to (the specification's catalogue says what each opens and what a malicious plugin could do with it). A capability no row needs is dropped; `people:read:all`, `people:read:email` (the work email, to match a person to an account elsewhere), `projects:read:all`, `storage:sql` and every `outbound:<host>` are asked for only where the design shows the row that needs them. Write the design: the table, the collections with their fields, the roles, the settings, the board (`needs`, the defaults), the menu group, the pages and the widgets, and the capabilities with their sentences; stop for the checkpoint.
|
|
88
88
|
|
|
@@ -90,7 +90,7 @@ Then the capabilities: the list the split needs, each read as the sentence the a
|
|
|
90
90
|
|
|
91
91
|
Produces the **plugin as source**. `console-plugin init <dir> --key <key> --name "<Name>"` writes the smallest complete plugin: the manifest, a server module with one collection, one command and one query, a web bundle with one page and one widget, one skill with its `SKILLCDN.md`, the tests, the build and a README that says where things are; `--console` names the version of `@skillcdn/console` it depends on, the command's own unless said, and for a plugin written for a deployed console, the version that console runs (`console whoami` says it), and the manifest's `console` is written from it, the line of that version (`>=0.4.3 <0.5.0`): the consoles the plugin runs on, which the console checks when it reads the plugin and `console-plugin check` holds the dependency to; narrow it to the patch that brought what the plugin depends on, and widen it to the next line once the plugin is built against it; `--package <name>` the package's name where it is not `console-plugin-<key>`, a scoped one (`@<scope>/console-plugin-<key>`) for a repository of several plugins, published as public; `--repository <url>` with `--directory <path>` where the plugin lives in a repository, which fill `repository`, `homepage` and `bugs` and the manifest's `store`; and `--languages en,ko` the languages of its words, `en` first, which gives every language map and both manifests' translations the others as English words to translate, of which `console-plugin check` warns while they stay English. Then, in `<dir>`: `npm install`, `npm run build`, `npm test`, `npm run check`, all green before a line is changed, and `git init`.
|
|
92
92
|
|
|
93
|
-
Then the design goes in, file by file: the manifest `console-plugin.json` from the design, its `key`, names and descriptions per language (a name of a word or two, which a tab shows and stops short with an ellipsis past about 28 characters; the description is what the plugin's settings page says of it, and what an agent reads in the rules where there is no `agentNote`), `agentNote`, `capabilities`, `roles` (a role for managers is `follows: "reports"`, held by whoever someone reports to and granted by nobody) and `defaultRole`, `board`, `settings`, `menu`, `pages`, `widgets`, `dataVersion`; the server module `src/server/index.ts`, one `defineCollection` per collection, one `defineCommand` or `defineQuery` per row, `endpoints`, `on`, `jobs`, `api`, `onEnable` and `onDisable` where the design has them, exported by name for the tests and gathered in `definePlugin(...)` as the default export; the web bundle `src/web/index.ts` and `index.css`, where `connect()` gives the page the context (who looks, at what, in which language), `command`, `query`, `records`, `files`, `navigate` (a path of the console's), `open` (a link to the web or to mail, from the press itself, which the console's page opens in a new tab), `download`, `setTitle` and the events, every class prefixed `pl-<key>-`, the console's `sc-` classes and `--sc-*` tokens for the look, and every word a person wrote put in as text; the skills under `skills/<name>/SKILL.md`, one per kind of work, in the SkillCDN Format, and the README of the package. The server module imports only what the host allows and bundles everything it imports; it keeps no state between calls but in records, since its thread is started afresh after a fault. Where the design has `storage:sql`, `migrations/0001-<words>.sql` makes the tables, and `manifest.migrations` names the directory.
|
|
93
|
+
Then the design goes in, file by file: the manifest `console-plugin.json` from the design, its `key`, names and descriptions per language (a name of a word or two, which a tab shows and stops short with an ellipsis past about 28 characters; the description is what the plugin's settings page says of it, and what an agent reads in the rules where there is no `agentNote`), `agentNote`, `capabilities`, `roles` (a role for managers is `follows: "reports"`, held by whoever someone reports to and granted by nobody) and `defaultRole`, `board`, `settings`, `menu`, `pages`, `widgets`, `dataVersion`; the server module `src/server/index.ts`, one `defineCollection` per collection, one `defineCommand` or `defineQuery` per row, `endpoints`, `on`, `jobs`, `api`, `onEnable` and `onDisable` where the design has them, exported by name for the tests and gathered in `definePlugin(...)` as the default export; the web bundle `src/web/index.ts` and `index.css`, where `connect()` gives the page the context (who looks, at what, in which language), `command`, `query`, `records`, `files`, `navigate` (a path of the console's), `open` (a link to the web or to mail, from the press itself, which the console's page opens in a new tab), `download`, `setTitle` and the events, every class prefixed `pl-<key>-`, the console's `sc-` classes and `--sc-*` tokens for the look, the classes being the parts of the console's catalogue (`src/styles/README.md` in the package) and never a class of one of the console's own pages, which `check` refuses, figures drawn with the console's charts (a figure, a list of bars, a chart over time, a share, a table of figures: the package's README, "Charts", says which is for what; their classes are in the frame's stylesheet, their measures are attributes from `@skillcdn/console/charts` and never a style, which a frame refuses, and a bundle of React takes the components from `@skillcdn/console`), and every word a person wrote put in as text; the skills under `skills/<name>/SKILL.md`, one per kind of work, in the SkillCDN Format, and the README of the package. The server module imports only what the host allows and bundles everything it imports; it keeps no state between calls but in records, since its thread is started afresh after a fault. Where the design has `storage:sql`, `migrations/0001-<words>.sql` makes the tables, and `manifest.migrations` names the directory.
|
|
94
94
|
|
|
95
95
|
### Phase 3: Test it as the console runs it
|
|
96
96
|
|
|
@@ -98,13 +98,13 @@ Produces the **tests**, green. `src/server/index.test.ts` runs each command, que
|
|
|
98
98
|
|
|
99
99
|
### Phase 4: Run it on a local console
|
|
100
100
|
|
|
101
|
-
Produces the **plugin running**, enabled, with its commands tried and its pages shown. The console from its checkout, as the console's README's "Install" says, with one difference: before the api starts, `.env` sets `PLUGINS_DIR` to a directory made for the purpose, whose `package.json` is `{ "private": true, "dependencies": {} }` and in which `npm install --ignore-scripts <path to the plugin>` writes the plugin as a `file:` dependency and links `node_modules/<its name>` to the checkout, built; the console reads the link where it points, so the checkout is the plugin, and `npm run build` in it followed by a restart of the api is a new version. The person signs in on the local console as its administrator (`ADMINS` in `.env`, a GitHub OAuth app registered for the local address, as `apps/console/README.md` of the console says), opens the plugins' settings page, where the plugin is listed as installed with any reason it failed to load, and enables it: the consent to each capability, the board project made from the manifest's defaults or chosen, the projects it is on, the settings; or their agent does the same with `console plugin <key> enable` ([setting-up.md](/skills/planning-the-board/references/setting-up.md), "A plugin's board project"), signed in there with `console login`. The compose database's user owns the database, so `storage:sql` is available locally. Then the tabs appear where the manifest put them, and the plugin is worked as an agent works it ([working-the-board](/skills/working-the-board/SKILL.md)): `console plugin <key>` lists the commands, `console plugin <key> <command> ...` runs one, a decision raised is answered on the pages, a hook runs, a job runs at its time (the worker inside the api, locally), and the pages are looked at with a browser the agent can drive, else by the person. What is seen is shown at the checkpoint; what could not run is reported as not run. Without a provider to register: in the console's checkout, `pnpm dev:plugins --plugin <path to the built plugin>` runs the console on this machine with the fixture's people signing in from the browser at the addresses it prints, the plugin installed beside the fixtures and not enabled, and the plugin's hooks and jobs running in that process, so that a decision answered there reaches the hook within seconds and a job runs at its time; the administrator among them enables it on the settings page, and the pages and `console plugin <key>` are looked at as above. The directory is read as the image lays a plugin out, so a checkout is built first (`npm run build`), and a directory that is not a built plugin stops the console with the reason.
|
|
101
|
+
Produces the **plugin running**, enabled, with its commands tried and its pages shown. The console from its checkout, as the console's README's "Install" says, with one difference: before the api starts, `.env` sets `PLUGINS_DIR` to a directory made for the purpose, whose `package.json` is `{ "private": true, "dependencies": {} }` and in which `npm install --ignore-scripts <path to the plugin>` writes the plugin as a `file:` dependency and links `node_modules/<its name>` to the checkout, built; the console reads the link where it points, so the checkout is the plugin, and `npm run build` in it followed by a restart of the api is a new version. The person signs in on the local console as its administrator (`ADMINS` in `.env`, a GitHub OAuth app registered for the local address, as `apps/console/README.md` of the console says), opens the plugins' settings page, where the plugin is listed as installed with any reason it failed to load, and enables it: the consent to each capability, the board project made from the manifest's defaults or chosen, the projects it is on, the settings; or their agent does the same with `console plugin <key> enable` ([setting-up.md](/skills/planning-the-board/references/setting-up.md), "A plugin's board project"), signed in there with `console login`. The compose database's user owns the database, so `storage:sql` is available locally. Then the tabs appear where the manifest put them, and the plugin is worked as an agent works it ([working-the-board](/skills/working-the-board/SKILL.md)): `console plugin <key>` lists the commands, `console plugin <key> <command> ...` runs one, a decision raised is answered on the pages, a hook runs, a job runs at its time (the worker inside the api, locally; `console plugin <key>` says how each job's last run went and when it runs next, and `console plugin <key> events --kind plugin.failed` why one failed), and the pages are looked at with a browser the agent can drive, else by the person. What is seen is shown at the checkpoint; what could not run is reported as not run. Without a provider to register: in the console's checkout, `pnpm dev:plugins --plugin <path to the built plugin>` runs the console on this machine with the fixture's people signing in from the browser at the addresses it prints, the plugin installed beside the fixtures and not enabled, and the plugin's hooks and jobs running in that process, so that a decision answered there reaches the hook within seconds and a job runs at its time; the administrator among them enables it on the settings page, and the pages and `console plugin <key>` are looked at as above. The directory is read as the image lays a plugin out, so a checkout is built first (`npm run build`), and a directory that is not a built plugin stops the console with the reason.
|
|
102
102
|
|
|
103
103
|
### Phase 5: Ship, and hand the install to the deployment
|
|
104
104
|
|
|
105
105
|
Produces the **release** and the **hand-over**. The version in `package.json` moves as semver says, `dataVersion` moves with an entry in `upgrades` whenever the shape of a record changed: an upgrade reaches its records through `ctx` as a job does, and the code reads a record of the version before as well, since a plugin whose upgrade did not go through on a deployment is loaded all the same and said to be behind; `npm run build`, `npm test` and `npm run check` pass; a commit, and a push of the repository. Then one of two, confirmed with its consequence: `npm publish` (`--access public` for a scoped name), which puts the package on the registry under that name for good, and is done by the person or with their word; or a tag `v<version>` whose tree carries the built package (the template's `.gitignore` leaves `dist/` out of git, so a release commit adds it with `git add -f dist` before the tag), since the deployment installs with no scripts and runs no build. The deployment then names the plugin as `"<name>": "<version>"` or, for a repository of one plugin alone, `"github:<owner>/<repo>#v<version>"`.
|
|
106
106
|
|
|
107
|
-
The hand-over is a task on the deployment's board, written as [planning-the-board](/skills/planning-the-board/SKILL.md) writes one, or the same words in chat where there is no board: the package and its version, the consoles it runs on (the manifest's `console`, which must admit the deployment's console: `console whoami` says its version, and a console outside the range lists the plugin as failed with the reason), and how it is installed ([deploy/README.md, "Plugins in the image"](/deploy/README.md#plugins-in-the-image), a row of deploying-a-console's [running-it-again.md](/skills/deploying-a-console/references/running-it-again.md)); what the deployment must provide, where the plugin asks it (
|
|
107
|
+
The hand-over is a task on the deployment's board, written as [planning-the-board](/skills/planning-the-board/SKILL.md) writes one, or the same words in chat where there is no board: the package and its version, the consoles it runs on (the manifest's `console`, which must admit the deployment's console: `console whoami` says its version, and a console outside the range lists the plugin as failed with the reason), and how it is installed ([deploy/README.md, "Plugins in the image"](/deploy/README.md#plugins-in-the-image), a row of deploying-a-console's [running-it-again.md](/skills/deploying-a-console/references/running-it-again.md)); what the deployment must provide, where the plugin asks it (for `storage:sql`, a database user that holds `CREATEROLE` and owns the database, and a grant by name of the schema `public` to any other role that reads the console's tables, since its first provisioning takes from every role what it held through `PUBLIC`, as [deploy/README.md](/deploy/README.md#plugins-in-the-image) says; the hosts of `outbound`; a bound on the files); what the administrator does when they enable it: the capabilities they consent to, the board project, the projects, the settings to fill and the secrets to set, the roles and who gets them; and where the plugin's skills are once it runs (`console plugin <key> skills`). The deployment's agent installs it as a release of the deployment; the administrator enables it; the plugin is then proven on that console as phase 4 proved it locally, and that is the delivery.
|
|
108
108
|
|
|
109
109
|
## Verdicts
|
|
110
110
|
|
|
@@ -5,7 +5,7 @@ license: MIT
|
|
|
5
5
|
compatibility: Needs a shell with Node.js 24 or newer, git, curl, jq and the AWS CLI v2, the gh command signed in or an empty repository the person made, network access to AWS, Cloudflare, GitHub and npm, an AWS account and a domain on Cloudflare the person can create a key and a token for, and a browser on any device for the few steps only a signed-in person can take. Works in any agent that can run a shell and write files; on Windows, in Git Bash with path conversion off.
|
|
6
6
|
metadata:
|
|
7
7
|
author: skillcdn
|
|
8
|
-
version: "1.
|
|
8
|
+
version: "1.8"
|
|
9
9
|
skillcdn:
|
|
10
10
|
translations:
|
|
11
11
|
ko:
|
|
@@ -48,7 +48,7 @@ Check these before the first message. Without the AWS CLI, offer to install it (
|
|
|
48
48
|
| How people sign in, and who | Asked: "How should people sign in: with GitHub, with Google (Workspace), or both? Who configures the console (you, at least): their GitHub login or Google address. With GitHub, everyone of your organization can be in, as the organization has them: say which organization. With a Google Workspace, everyone of the domain is in. Anyone else, an administrator lets in on the People page once the console runs." |
|
|
49
49
|
| The organization's skills | Asked: "Where are your organization's skills on SkillCDN, if anywhere yet? An address like `/gh/<owner>/<repo>`. Is that repository private?" Default: none; a project names one later on its Settings page. A private one is connected in phase 6, with a code the person approves at SkillCDN ([ADR-0036](/docs/adr/0036-a-private-pack-is-connected-with-a-code-a-person-approves-from-the-projects-settings.md)); nothing of it is needed before. |
|
|
50
50
|
| The organization's website, and the look | Asked: "Does your organization have a website? Its address." With one, the console takes the organization's look by default: the marks, the colours and the type read from the site as building-a-console's [the-look-from-a-website.md](/skills/building-a-console/references/the-look-from-a-website.md) says, mapped onto the pages and shown at the plan, and built into the image as the organization's own console, `console-ui/` of the deployment repository, so that the first deploy already carries it. Without a site, or when the person says the default pages are fine, the image's default pages serve: the board's name alone, and no marks. A look that is wanted later is the same skill, building-a-console, in `console-ui/`, and a push. |
|
|
51
|
-
| The plugins | Asked only when the request names one, or the organization's console is to carry a feature of its work (leave, customers, money): "Should the console carry a plugin? Which package, at which version or tag?" Default: none. A plugin is installed by building it into the image from `plugins/package.json` and its lockfile in the deployment repository, with no install scripts ([deploy/README.md "Plugins in the image"](/deploy/README.md#plugins-in-the-image)), and enabled by the administrator on the console's settings page once it runs, consenting to what it asks; one with `storage:sql` needs the database user to hold `CREATEROLE
|
|
51
|
+
| The plugins | Asked only when the request names one, or the organization's console is to carry a feature of its work (leave, customers, money): "Should the console carry a plugin? Which package, at which version or tag?" Default: none. A plugin is installed by building it into the image from `plugins/package.json` and its lockfile in the deployment repository, with no install scripts ([deploy/README.md "Plugins in the image"](/deploy/README.md#plugins-in-the-image)), and enabled by the administrator on the console's settings page once it runs, consenting to what it asks; one with `storage:sql` needs the database user to hold `CREATEROLE` and to own the database, as the master user of phase 3's database does. One wanted later is a row of [running-it-again.md](references/running-it-again.md); one to be written is [building-a-plugin](/skills/building-a-plugin/SKILL.md). |
|
|
52
52
|
| The AWS account | Asked: "Do you have an AWS account for this, or should the console get an account of its own (the simplest to run and to read the bill of)?" A new account is made by the person, on the paid plan, with the order of cost already in front of them (the second message). |
|
|
53
53
|
| The region | Asked when the organization's country does not say: "Where are most of your people: a country, or a city?" The region is the one nearest them: `ap-northeast-2` (Seoul), `ap-northeast-1` (Tokyo), `ap-southeast-1` (Singapore), `eu-central-1` (Frankfurt), `eu-west-1` (Ireland), `eu-west-2` (London), `us-east-1` (N. Virginia), `us-east-2` (Ohio), `us-west-2` (Oregon); `aws ec2 describe-regions` lists them all, and sizing.md says how a region's prices are read. |
|
|
54
54
|
| The run's folder | Asked with a suggestion: "Which folder should the deployment live in on this machine? I suggest `console-deploy` under your home folder." It is made at once and becomes the deployment repository. |
|
|
@@ -83,7 +83,7 @@ Produces the **live address**. The zone is active (else the wait of "How the per
|
|
|
83
83
|
|
|
84
84
|
### Phase 6: The first people
|
|
85
85
|
|
|
86
|
-
Produces the **first administrator and the first project**. Tell the person: "Open <address> and sign in with <provider>; you are an administrator. Make the first project: Projects, New project, a key such as `general`, its name, and the skills address <address or none>. Tell me the key." Then connect this agent: `console login --url <address> --agent deploying-a-console`, which shows an address and a code; relay them, and the person approves on the console's own pages. `console use <key>` in the run's folder. A private pack: `console project pack-token <key> --connect`, which prints a page at SkillCDN and a code; relay them, and the person, signed in at SkillCDN as someone who may open the repository, checks the code and approves there; the command says when the pack is connected, and `console skills` then lists it. Nothing is pasted.
|
|
86
|
+
Produces the **first administrator and the first project**. Tell the person: "Open <address> and sign in with <provider>; you are an administrator. Make the first project: Projects, New project, a key such as `general`, its name, and the skills address <address or none>. Tell me the key." Then connect this agent: `console login --url <address> --agent deploying-a-console`, which shows an address and a code and ends; relay them, run it once more as it says, and the person approves on the console's own pages. `console use <key>` in the run's folder. A private pack: `console project pack-token <key> --connect`, which prints a page at SkillCDN and a code; relay them, and the person, signed in at SkillCDN as someone who may open the repository, checks the code and approves there; the command says when the pack is connected, and `console skills` then lists it. Nothing is pasted.
|
|
87
87
|
|
|
88
88
|
### Phase 7: Proof
|
|
89
89
|
|
|
@@ -95,7 +95,7 @@ Produces **`DEPLOY.md`** in the repository, from the template in resources.md: w
|
|
|
95
95
|
|
|
96
96
|
### Running it again
|
|
97
97
|
|
|
98
|
-
The same skill, from phase 2, with the plan naming only what changes and its price: a new version of the console or of the connector, a plugin installed, updated or removed, the next size, a person let in or taken out, a secret rotated, a console shared with outside teams or customers, the console paused or removed. What each takes is in [running-it-again.md](references/running-it-again.md); each is confirmed at the plan, and the record is updated with it.
|
|
98
|
+
The same skill, from phase 2, with the plan naming only what changes and its price: a new version of the console or of the connector, a plugin installed, updated or removed, the next size, a person let in or taken out, a secret rotated, the console's own secret replaced, a console shared with outside teams or customers, the console paused or removed. What each takes is in [running-it-again.md](references/running-it-again.md); each is confirmed at the plan, and the record is updated with it.
|
|
99
99
|
|
|
100
100
|
### Verdicts
|
|
101
101
|
|
|
@@ -310,7 +310,7 @@ The same with `"family": "console-worker"`, `"cpu": "256"`, `"memory": "512"`, o
|
|
|
310
310
|
|
|
311
311
|
### `deploy/migrate.task.json`
|
|
312
312
|
|
|
313
|
-
The same with `"family": "console-migrate"`, `"cpu": "256"`, `"memory": "512"`, one container `migrate` with `"command": ["migrate"]` and the read-only root filesystem, `secrets` `DATABASE_URL` and `DATABASE_CA`, no environment, no port, no health check, the log stream prefix `migrate`, and no tunnel: a connector must never start for a one-off task. Where the image carries plugins, the task takes the `environment` and the task role of `api.task.json` as well: the role runs the plugins' upgrades, and an upgrade that reads a file of the plugin's records finds it only in the bucket the `api` wrote it to ([deploy/README.md](/deploy/README.md#plugins-in-the-image)).
|
|
313
|
+
The same with `"family": "console-migrate"`, `"cpu": "256"`, `"memory": "512"`, one container `migrate` with `"command": ["migrate"]` and the read-only root filesystem, `secrets` `DATABASE_URL` and `DATABASE_CA`, no environment, no port, no health check, the log stream prefix `migrate`, and no tunnel: a connector must never start for a one-off task. Where the image carries plugins, the task takes the `environment`, the `secrets` and the task role of `api.task.json` as well: the role runs the plugins' upgrades, and an upgrade that reads a file of the plugin's records finds it only in the bucket the `api` wrote it to ([deploy/README.md](/deploy/README.md#plugins-in-the-image)); the console starts on the whole of signing in or on none of it, so the `secrets` come with the `environment`. The same `environment` and `secrets` are what the step that ends a rotation of the console's own secret runs with ("The console's own secret replaced").
|
|
314
314
|
|
|
315
315
|
**Without a pipeline.** A deployment that is rolled by hand, or on a platform that runs one task definition and nothing before it, can run `migrate` inside the tasks instead of as a one-off: a container `migrate` in `api.task.json`, and at `large` in `worker.task.json` too, from the same image with `"command": ["migrate"]`, `"essential": false` and the `secrets` of the migrate task, and the role's own container with `"dependsOn": [{ "containerName": "migrate", "condition": "SUCCESS" }]` (the tunnel keeps its `dependsOn` on `api`). Every task of every role then migrates before it serves; tasks that start together wait on the advisory lock the migration takes, so none races another; a migration that fails leaves the role's container unstarted and the circuit breaker rolls the deployment back. The contract then holds per task rather than per rollout, which hard rule 8 allows in these words. The one-off task stays the default here because it stops the rollout before a single task is replaced.
|
|
316
316
|
|
|
@@ -445,7 +445,7 @@ aws iam put-role-policy --role-name console-github-deploy --policy-name console-
|
|
|
445
445
|
|
|
446
446
|
### The plugins
|
|
447
447
|
|
|
448
|
-
`plugins/package.json` and `plugins/package-lock.json`, when the plan names a plugin: `dependencies` only, each at an exact version from the registry or a tag of a git host (`github:<owner>/<repo>#<tag>`), written with `npm install --save-exact --package-lock-only --ignore-scripts <package>@<version>` in `plugins/`, which installs nothing on the machine; no scripts, no other field that does anything. The workflow installs them into the image from the lockfile with no install scripts and sets `PLUGINS_DIR`, as [deploy/README.md "Plugins in the image"](/deploy/README.md#plugins-in-the-image) lays it out; the console reads them at boot, and the administrator enables each on the settings page once the console runs. Absent, the console has no plugins. A plugin that asks `storage:sql` needs the database user to hold `CREATEROLE
|
|
448
|
+
`plugins/package.json` and `plugins/package-lock.json`, when the plan names a plugin: `dependencies` only, each at an exact version from the registry or a tag of a git host (`github:<owner>/<repo>#<tag>`), written with `npm install --save-exact --package-lock-only --ignore-scripts <package>@<version>` in `plugins/`, which installs nothing on the machine; no scripts, no other field that does anything. The workflow installs them into the image from the lockfile with no install scripts and sets `PLUGINS_DIR`, as [deploy/README.md "Plugins in the image"](/deploy/README.md#plugins-in-the-image) lays it out; the console reads them at boot, and the administrator enables each on the settings page once the console runs. Absent, the console has no plugins. A plugin that asks `storage:sql` needs the database user to hold `CREATEROLE` and to own the database, as the master user of phase 3's database does; one that keeps files is bounded with `PLUGIN_FILE_BYTES_AT_MOST` in `deploy/console.env` as `PROJECT_FILE_BYTES_AT_MOST` is, and each plugin's thread may hold `PLUGIN_MEMORY_MB_AT_MOST` (256 unless set), which the task's memory leaves room for.
|
|
449
449
|
|
|
450
450
|
### The rest of the repository
|
|
451
451
|
|
|
@@ -484,7 +484,7 @@ aws budgets create-budget --account-id $ACCOUNT --budget file://scratch/budget.j
|
|
|
484
484
|
The person signs in and makes the first project on the pages (the skill's phase 6). Then, in the run's folder:
|
|
485
485
|
|
|
486
486
|
```sh
|
|
487
|
-
console login --url https://<hostname> --agent deploying-a-console # relay the address and the code; the person approves
|
|
487
|
+
console login --url https://<hostname> --agent deploying-a-console # relay the address and the code and run it once more as it says; the person approves
|
|
488
488
|
console use <key>
|
|
489
489
|
printf '# Deployment check\n\nHanded in by the deploying agent on <date> to prove the bucket.\n' > scratch/deployment-check.md
|
|
490
490
|
NUMBER=$(console task new "Deployment check" --body "What this run deployed, in a few lines: the size, the address, what is owed." --json | jq -r .number)
|
|
@@ -528,7 +528,7 @@ Made on <date> with the skill `deploying-a-console` of the SkillCDN Console (ski
|
|
|
528
528
|
- **A new version of the console:** set `CONSOLE_REF` in `deploy/console.env` to the commit of the newest release tag: the last line of `git ls-remote --tags https://github.com/skillcdn/console 'refs/tags/@skillcdn/console@*' | sort -t@ -k3 -V` is the highest version, with the commit in its first column; move `console-ui/` to the same version of the package when there is one; push. **A new connector:** `CLOUDFLARED_VERSION` there, push.
|
|
529
529
|
- **A person added or removed:** with an organization at GitHub (`GITHUB_ORG`), in the organization, which the console reads every ten minutes; otherwise on the People page, or with `console person add <login>` and `console person deactivate <login>`, by an administrator; nothing to push. With a Google Workspace, everyone of `GOOGLE_WORKSPACE_DOMAIN` is in. `ADMINS` in `deploy/api.task.json` names only the first administrators, who make others on the People page.
|
|
530
530
|
- **The next size:** the numbers in `deploy/api.task.json` (and `deploy/worker.task.json` at `large`), `API_COUNT` and `WORKER_COUNT` in `deploy/console.env`, push; to `large`, also `deploy/worker.task.json` written as the skill's resources.md gives it and `WORKER_IN_PROCESS` dropped from the api task; the database: `aws rds modify-db-instance --db-instance-identifier console --db-instance-class <class> --apply-immediately` (a few minutes of unavailability).
|
|
531
|
-
- **A secret rotated:** the new value into a secrets file of the same shape with the skill's script (`set`), then `node <the script> store <file> /console`, which overwrites the parameter in its tier (`$(npm root -g)/@skillcdn/console/skills/deploying-a-console/scripts/store-secrets.mjs`; `DATABASE_CA` is in the advanced tier, which an `aws ssm put-parameter --overwrite` by hand must name with `--tier Advanced`); then `aws ecs update-service --cluster console --service api --force-new-deployment`.
|
|
531
|
+
- **A secret rotated:** the new value into a secrets file of the same shape with the skill's script (`set`), then `node <the script> store <file> /console`, which overwrites the parameter in its tier (`$(npm root -g)/@skillcdn/console/skills/deploying-a-console/scripts/store-secrets.mjs`; `DATABASE_CA` is in the advanced tier, which an `aws ssm put-parameter --overwrite` by hand must name with `--tier Advanced`); then `aws ecs update-service --cluster console --service api --force-new-deployment`. **The console's own secret (`AUTH_SECRET`)** is never overwritten alone: it is replaced with the skill, in three steps that lose nothing it sealed and sign nobody out.
|
|
532
532
|
- **The organization's own console:** its source in `console-ui/` (building-a-console makes it); a push builds it into the image.
|
|
533
533
|
- **Paused:** `aws ecs update-service --cluster console --service api --desired-count 0` (and `worker`), `aws rds stop-db-instance --db-instance-identifier console` (seven days at most); the reverse resumes.
|
|
534
534
|
- **Removed:** the skill's "Removing", resource by resource, confirmed.
|
|
@@ -544,6 +544,43 @@ Made on <date> with the skill `deploying-a-console` of the SkillCDN Console (ski
|
|
|
544
544
|
|
|
545
545
|
A change to `DEPLOY.md` or `README.md` alone does not run the workflow (its `paths`), so the record is pushed without a deployment: `git add DEPLOY.md README.md && git commit -m "The record" && git push`, never `git add -A` here, after `git status --short` shows nothing else of the folder as untracked (`scratch/`, the files and `.skillcdn-console.json` are ignored).
|
|
546
546
|
|
|
547
|
+
## The console's own secret replaced
|
|
548
|
+
|
|
549
|
+
`AUTH_SECRET` keys everything the console seals, so it is never overwritten alone: it is replaced in three steps, and then nothing sealed is lost and nobody is signed out ([deploy/README.md](/deploy/README.md#rotating-the-secret)). The console must be at 0.5.1 or later (`console whoami` says its version); an older one is moved to a new version first. The plan names the three steps and the two pushes.
|
|
550
|
+
|
|
551
|
+
**1. The new secret beside the old one.** In the repository first, without pushing: one line more in the `secrets` of `deploy/api.task.json`, and of every other task definition that carries `AUTH_SECRET`,
|
|
552
|
+
|
|
553
|
+
```json
|
|
554
|
+
{ "name": "AUTH_SECRET_PREVIOUS", "valueFrom": "arn:aws:ssm:<region>:<account>:parameter/console/AUTH_SECRET_PREVIOUS" }
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
and `deploy/migrate.task.json` given the `environment` and the `secrets` of `deploy/api.task.json`, this line among them, where it does not carry them yet; commit. Then the two values, neither ever shown: the old one from its parameter into the secrets file under its new name, a new one generated, both stored:
|
|
558
|
+
|
|
559
|
+
```sh
|
|
560
|
+
aws ssm get-parameter --name /console/AUTH_SECRET --with-decryption --query Parameter.Value --output text | set_secret AUTH_SECRET_PREVIOUS
|
|
561
|
+
node -e "process.stdout.write(require('node:crypto').randomBytes(36).toString('base64url'))" | set_secret AUTH_SECRET
|
|
562
|
+
node scratch/store-secrets.mjs store "$SECRETS" /console
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
Push at once, and watch the run to green: the services roll with both secrets. Check: the `api` says so as it starts, `aws logs tail /console --since 15m --format short --log-stream-name-prefix api | grep 'previous secret'`.
|
|
566
|
+
|
|
567
|
+
**2. What the old one sealed, sealed again.** When the run is green and the services have rolled, the console's own step, as a one-off task from the migrate task definition with its word:
|
|
568
|
+
|
|
569
|
+
```sh
|
|
570
|
+
set -a; . deploy/console.env; set +a
|
|
571
|
+
NETWORK="awsvpcConfiguration={subnets=[$SUBNETS],securityGroups=[$TASKS_SECURITY_GROUP],assignPublicIp=ENABLED}"
|
|
572
|
+
TASK=$(aws ecs run-task --cluster "$ECS_CLUSTER" --task-definition console-migrate --launch-type FARGATE --network-configuration "$NETWORK" --overrides '{"containerOverrides":[{"name":"migrate","command":["migrate","reseal"]}]}' --query 'tasks[0].taskArn' --output text)
|
|
573
|
+
aws ecs wait tasks-stopped --cluster "$ECS_CLUSTER" --tasks "$TASK"
|
|
574
|
+
aws ecs describe-tasks --cluster "$ECS_CLUSTER" --tasks "$TASK" --query 'tasks[0].containers[0].exitCode' --output text
|
|
575
|
+
aws logs tail /console --since 15m --format short --log-stream-name-prefix migrate | grep -E 'sealed again|previous secret opened'
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
The exit code is `0` and the line says `"left":0`: nothing is under the old secret any more. `resealed` is how many values were sealed again; `unopened`, where it is not `0`, is how many were already lost before this, under a secret from an earlier time, which the person is told with their kinds (`kinds` in the line) so that their holders set them again. An exit code of `1` with `left` above `0` means a task of the old definition was still running: wait for the rollout to end and run the step again. An exit code of `78` means the task was not given the two secrets: step 1's lines are missing from `deploy/migrate.task.json`. Where a second line follows on the step's first run, `the previous secret opened no value`, the old secret was not given as it was, whatever `left` says: nothing was changed, step 3 waits, and the person is told that `AUTH_SECRET_PREVIOUS` must hold exactly the old value, given in the same form the old one was (here a parameter, copied from the old one as step 1 copies it), before it is put right and the step run again.
|
|
579
|
+
|
|
580
|
+
**3. The old one taken out.** Only after `"left":0`: the `AUTH_SECRET_PREVIOUS` line out of every task definition, commit, push, the run watched to green. Then, on the person's word, the parameter deleted (`aws ssm delete-parameter --name /console/AUTH_SECRET_PREVIOUS`) and the secrets file deleted again. The record's line, with the date.
|
|
581
|
+
|
|
582
|
+
Where the secret leaked to someone who may hold a copy of the database too, the tokens it sealed are made anew at their sources as well, each by whoever holds it: a pack token at the SkillCDN deployment, a plugin's credential at its service. The person is told this at the plan.
|
|
583
|
+
|
|
547
584
|
## Removing
|
|
548
585
|
|
|
549
586
|
Only on request, each step confirmed, in this order, after a last snapshot of the database: the services (`aws ecs update-service --desired-count 0`, then `delete-service`), the cluster; the hostname (`DELETE /zones/<zone>/dns_records/<id>`), the rules (`DELETE /zones/<zone>/rulesets/<ruleset>/rules/<rule>`, the two ids of the record; a zone-wide always-HTTPS the run turned on is left as it is, since the zone may have come to rely on it) and the tunnel (`DELETE /accounts/<account>/cfd_tunnel/<id>`, after `.../connections` is empty); the database (`modify-db-instance --no-deletion-protection`, then `delete-db-instance --final-db-snapshot-identifier console-final-<date>`); the bucket, emptied first (`aws s3 rm s3://<bucket> --recursive`, then `delete-bucket`); the parameters; the roles' policies and the roles; the log group; the image repository (`--force`); the security groups; the budget. The deployment repository stays, with the record of what was removed and the snapshot's name.
|
|
@@ -5,11 +5,12 @@ A deployment is changed with the same skill, from phase 2: the plan names only w
|
|
|
5
5
|
| What changes | What it takes |
|
|
6
6
|
|---|---|
|
|
7
7
|
| A new version of the console | The next release tag's commit as `CONSOLE_REF` in `deploy/console.env`, found as the Inputs say under "The console's version"; `console-ui/`, where there is one, moved to the same version of the package, so that the pages and the server stay one release; a push, which builds the image and rolls it, `migrate` first. |
|
|
8
|
-
| A plugin installed, updated or removed | The package named in `plugins/package.json` at an exact version or a tag of a git host, and the lockfile written beside it: `cd plugins && npm install --save-exact --package-lock-only --ignore-scripts <package>@<version>` (`npm uninstall --package-lock-only <package>` to remove), as [deploy/README.md "Plugins in the image"](/deploy/README.md#plugins-in-the-image) says; a push, which builds the image with the plugin installed and rolls it, `migrate` first. Then the administrator enables it on the console's settings page, consenting to what it asks, makes or chooses its board project and grants its roles ([planning-the-board](/skills/planning-the-board/references/setting-up.md)); a plugin with `storage:sql` needs the database user to hold `CREATEROLE
|
|
8
|
+
| A plugin installed, updated or removed | The package named in `plugins/package.json` at an exact version or a tag of a git host, and the lockfile written beside it: `cd plugins && npm install --save-exact --package-lock-only --ignore-scripts <package>@<version>` (`npm uninstall --package-lock-only <package>` to remove), as [deploy/README.md "Plugins in the image"](/deploy/README.md#plugins-in-the-image) says; a push, which builds the image with the plugin installed and rolls it, `migrate` first. Then the administrator enables it on the console's settings page, consenting to what it asks, makes or chooses its board project and grants its roles ([planning-the-board](/skills/planning-the-board/references/setting-up.md)); a plugin with `storage:sql` needs the database user to hold `CREATEROLE` and to own the database, as the master user does. The record names the plugin and its version. What a removed plugin stored stays until an administrator purges it. |
|
|
9
9
|
| A new connector | `CLOUDFLARED_VERSION` in `deploy/console.env`, the connector's newest release, which `gh api repos/cloudflare/cloudflared/releases/latest --jq .tag_name` prints; a push. |
|
|
10
10
|
| The next size | The numbers of the task definitions set to the next size's (sizing.md "The sizes"), `API_COUNT` and `WORKER_COUNT` in `deploy/console.env`; to `large`, `deploy/worker.task.json` written as resources.md gives it and `WORKER_IN_PROCESS` dropped from the api task; the database's class changed with one command, when nobody works (sizing.md "Growing"); the estimate of the new size at the plan; a push. |
|
|
11
11
|
| A person let in or taken out | With an organization at GitHub, in the organization, which the console reads on its own; otherwise by an administrator, on the People page or with `console person add <login>` and `console person deactivate <login>`; no push, since nothing of the deployment changes. |
|
|
12
|
-
| A secret rotated | The new value read from a secrets file of the same shape, as in phase 3, never from the chat; the parameter overwritten with the skill's script and the service rolled, so that the tasks start with it (resources.md "Phase 8: the record", "A secret rotated"); the file deleted again on the person's word; the record's line "a secret rotated", with the date. `AUTH_SECRET` is not rotated this way
|
|
12
|
+
| A secret rotated | The new value read from a secrets file of the same shape, as in phase 3, never from the chat; the parameter overwritten with the skill's script and the service rolled, so that the tasks start with it (resources.md "Phase 8: the record", "A secret rotated"); the file deleted again on the person's word; the record's line "a secret rotated", with the date. `AUTH_SECRET` is not rotated this way, since a new value alone opens nothing the console sealed: it has the row below. |
|
|
13
|
+
| The console's own secret replaced (`AUTH_SECRET`) | Three steps, each named in the plan, and nothing the console sealed is lost: the pack tokens, the plugins' secret settings and every value of an agent account's store stay, and nobody is signed out ([deploy/README.md](/deploy/README.md#rotating-the-secret)). The new secret rolled out beside the old one; the console's `migrate reseal` run once, whose answer says that nothing is left under the old one; the old one taken out, and its parameter deleted on the person's word (resources.md "The console's own secret replaced"). Two pushes, each a deployment. The record's line "the console's secret replaced", with the date. |
|
|
13
14
|
| A console shared with outside teams or customers, each in projects of their own | The settings of [deploy/README.md "A shared console"](/deploy/README.md#a-shared-console): who sees whom, the bytes a project's files may hold together, tokens that end; as lines of the task definitions, with a push, or on the Settings page, with none. |
|
|
14
15
|
| The console paused | Both services at zero tasks and the database stopped, which pauses the deployment at the cost of storage alone, for seven days at most, after which the database starts itself (sizing.md "Growing", "Fewer people"); the reverse resumes; the record says since when. |
|
|
15
16
|
| The console removed | A run of its own, asked for and confirmed resource by resource (hard rule 7), as resources.md "Removing" says: a last snapshot of the database first, and the deployment repository kept, with the record of what was removed. |
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: keeping-a-desk
|
|
3
|
+
description: "Shapes a member's desk, their own repository, to what they ask to keep there and to see: what is kept goes under records/ in a shape chosen for it, what is shown is a page of their own under web/, built from the console's package and served from their machine, and the desk's AGENTS.md says both in a line each. Use when a person says 'keep what I make here', 'record this on my desk', 'I want to see that on my desk', 'add a page for it', 'what can I do with my desk?', and after console desk, whose last line names this skill. The repository itself, its remote and its first push are set up by a skill of the organization's pack; a page of the organization's console is building-a-console; a task of the board is working-the-board. Nothing is spent, and nothing leaves the desk but its own push."
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: A shell with git and the console command (npm install -g @skillcdn/console, Node.js 24 or newer), and an agent that reads and writes files. For pages, npm; a browser the agent can drive is optional. The agent never sees a token.
|
|
6
|
+
metadata:
|
|
7
|
+
author: skillcdn
|
|
8
|
+
version: "1.3"
|
|
9
|
+
skillcdn:
|
|
10
|
+
translations:
|
|
11
|
+
ko:
|
|
12
|
+
title: 데스크 가꾸기
|
|
13
|
+
description: "구성원 자신의 레포인 데스크를, 거기에 남기고 싶은 것과 보고 싶은 것에 맞춰 만듭니다. 남길 것은 그에 맞는 모양으로 records/ 아래에 두고, 볼 것은 콘솔 패키지로 만들어 내 PC에서 띄우는 나만의 페이지로 web/ 아래에 두며, 데스크의 AGENTS.md가 그 둘을 한 줄씩 말합니다. '내가 만든 걸 여기에 남겨 줘', '이거 데스크에 기록해 줘', '그걸 데스크에서 보고 싶어', '페이지 하나 추가해 줘', '데스크로 뭘 할 수 있어?'라고 하거나, console desk의 마지막 줄이 이 스킬을 가리킬 때 쓰세요. 레포와 원격, 첫 푸시는 조직 팩의 스킬이 하고, 조직 콘솔의 페이지는 building-a-console, 보드의 작업은 working-the-board입니다. 비용은 들지 않고, 데스크 밖으로 나가는 것은 데스크 자신의 푸시뿐입니다."
|
|
14
|
+
---
|
|
15
|
+
# Keeping a desk
|
|
16
|
+
|
|
17
|
+
A desk is a member's own repository, a person's or an agent account's, at their own git account, private and wholly theirs. It is given its least, its instructions and a structure ([ADR-0122](/docs/adr/0122-a-desk-is-given-its-least-and-grown-by-what-its-member-asks.md)): what it keeps and what it shows is whatever its member asks for. What the member says goes in; the desk shaped to it comes out, with a line in its `AGENTS.md` for each thing it now keeps or shows, checked, committed and pushed. Nothing is made that was not asked for: no kind of record, no page, no folder.
|
|
18
|
+
|
|
19
|
+
## The structure
|
|
20
|
+
|
|
21
|
+
Every desk is these four, and nothing of the last three is there until it is used:
|
|
22
|
+
|
|
23
|
+
| Place | What it is | Who writes it |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| `AGENTS.md` | The instructions of whichever agent works in the desk; under "This desk", what the desk keeps and shows, a line each, in the member's words | `console desk` first, then the member and their agent |
|
|
26
|
+
| `records/` | What the member keeps: plain files in the shape that fits the thing, JSON an agent writes and the files themselves | The agent, as the member asks |
|
|
27
|
+
| `web/` | The member's pages: a console of their own, built from `@skillcdn/console` and served from their machine | `console desk . --web` writes its shell, one empty page, for a person and an agent account alike |
|
|
28
|
+
| `work/` | Checkouts of projects' repositories, each under its own agreement; the desk ignores it | `git clone` |
|
|
29
|
+
|
|
30
|
+
A session begun in a desk works from `AGENTS.md` and what it points to. This skill is read when something is to be kept or shown that the desk does not keep or show yet, and not for one more entry in a shape the desk already has.
|
|
31
|
+
|
|
32
|
+
## How the person is involved
|
|
33
|
+
|
|
34
|
+
- **Questions:** one message, for what the request leaves open: "What do you want to keep here, and what do you want to see of it?" Of a thing to keep: what they want to find again of each one, and what becomes of one afterwards, if anything. Of a thing to see: what a glance at the page should tell them. A member who does not know yet is told the structure in three lines, and nothing is made.
|
|
35
|
+
- **Checkpoints:** the plan, before a file is written: what is kept, where, with one entry as it will be written; what the page shows, from its top down; the line `AGENTS.md` gains. One short message; "OK", in their language, continues. Then the page, at its address with the server left up, for them to look at: "is this what you wanted to see?". The agent's own look does not stand in for theirs.
|
|
36
|
+
- **Go-ahead:** told to go ahead alone, the plan is reported instead of approved; the checks of phase 6 are never skipped.
|
|
37
|
+
- **Changes mid-run:** a shape that changes after things are kept carries them over in the same change, and its line in `AGENTS.md` is written again; a page is changed where it stands, never begun again beside.
|
|
38
|
+
- **An agent account** shapes its own desk: nobody is at its terminal, so it chooses the shape from what its work makes, says it in its `AGENTS.md`, and asks its manager, as a decision, only what is the manager's to choose.
|
|
39
|
+
- **Language:** what the member reads, the questions, the plan, a page's words, a title or a label in a record, is in the language `AGENTS.md` names, and so may be the line `AGENTS.md` gains and a folder's `README.md`; a key and a file's name stay in English.
|
|
40
|
+
|
|
41
|
+
## Requirements
|
|
42
|
+
|
|
43
|
+
| Need | How | When missing |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| The desk is a repository, with a private remote | `git status` and `git remote -v` in the desk | It is set up first, by the skill for that in the organization's pack: `console skills --search "desk setup" --limit 5`. Where the pack has none: `git init`, a private repository at the member's own git account, the first push, each on their word |
|
|
46
|
+
| For pages: Node.js 24 or newer with npm, and the `console` command signed in | `node --version`; `console whoami` says as whom | Say so, and keep what is to be kept: records need neither. Never look for a token |
|
|
47
|
+
|
|
48
|
+
## Workflow
|
|
49
|
+
|
|
50
|
+
Each phase ends with one line to the member; only phase 2 and the member's look at the page in phase 4 stop for them.
|
|
51
|
+
|
|
52
|
+
### Phase 1: Read the desk
|
|
53
|
+
|
|
54
|
+
`AGENTS.md`, "This desk": what the desk keeps and shows now. Then `records/` and `web/` as they are. What is there is kept: a shape is added to, a page is added to, and neither is begun again beside the one that exists.
|
|
55
|
+
|
|
56
|
+
### Phase 2: Ask, and plan
|
|
57
|
+
|
|
58
|
+
Ask what the request leaves open, then show the plan of "How the person is involved". Plan the least that gives the member what they said: one kind kept in one folder, one page for what they asked to see. A wish to keep something is no wish to see it, and a page is planned only where they asked for one.
|
|
59
|
+
|
|
60
|
+
### Phase 3: Keep
|
|
61
|
+
|
|
62
|
+
Choose the shape from what the member wants to find again, not from a form:
|
|
63
|
+
|
|
64
|
+
- **One folder under `records/` for one kind of thing**, named by a key: lowercase letters, digits and hyphens.
|
|
65
|
+
- **JSON an agent writes with its file tools.** A list of entries, an object each: an `id` that never changes, what the member wants to find again as fields, a day written `2026-11-15`, an address that begins with `https://`, a path to each file of its own. Nothing is generated, and git shows what changed.
|
|
66
|
+
- **The shape, said once,** in a `README.md` of that folder: each field, what is needed, one entry as an example. The next session writes the same from it, so it is written before the first entry.
|
|
67
|
+
- **The files themselves** go in a `files/` folder there, of any kind and size, by names with no part that begins with a full stop; a kind that is large is tracked with git LFS before the first is added (`git lfs track`).
|
|
68
|
+
- **Text is text.** What a person wrote is kept and shown as text, never as HTML.
|
|
69
|
+
- **A set of things made, with where each was used and how it did by day,** is a shape the package already has, with a check and a ready page: [collections.md](collections.md). Take it where the member asks for exactly that, and only then.
|
|
70
|
+
|
|
71
|
+
### Phase 4: Show
|
|
72
|
+
|
|
73
|
+
Only where the member asked to see something. Paths below are under the desk's `web/`, and `<package>/` is `node_modules/@skillcdn/console/` there, whose `README.md` is [the package's](/packages/console/README.md).
|
|
74
|
+
|
|
75
|
+
1. **The shell.** `console desk . --web`, run in the desk, writes `web/` where it holds nothing: one empty page of the member's own, on the version of the package the command is. `src/main.tsx` mounts `page` from `src/page.tsx` beside it; the page's key is `mine`, its address `/pages/mine`, and `/` opens on it. Then `npm install` and `npm run build`, which says nothing of its own where it went well and leaves `dist/index.html`; `README.md` says how the pages are built, served and stopped.
|
|
76
|
+
2. **A page** is one entry of the `pages` handed to `createConsole` in `src/main.tsx`: a key, which is its address (`/pages/<key>`), a label, which is its tab, and a function that renders it. What the member asks to see first goes on the empty page; another page is another entry. What the function is given: `<package>/README.md`, "Pages of your own"; what the readers of a collection answer and what the small parts take: the same file, "A desk's pages". Those two sections are read before the page is written, and the package's types are not dug through.
|
|
77
|
+
3. **What a page reads.** The desk's own files, with `fetch` at `/records/<path>`, each read when it is asked for; and the board, as the member, through the client the page is given. Nothing of another origin, and no token. `console serve dist --records ../records` serves both: JSON, pictures, video, sound and PDF are shown in place, anything else is a download ([records.md](/docs/specs/records.md#serving)).
|
|
78
|
+
4. **What a page is built from:** the console's parts, each named with the component that renders it in `<package>/src/styles/README.md`, "The catalogue" ([in the repository](/packages/console/src/styles/README.md)). A page places parts and writes no colour, border or type of its own, so that it looks as the console does. For figures there are the charts, each exported from `@skillcdn/console`, with their props in `<package>/README.md`, "Charts":
|
|
79
|
+
- `Stat`, and `Stats` for a row of them: a figure with its label and, where given, its change and a sparkline.
|
|
80
|
+
- `BarList`: a ranking or a comparison, each a label, a bar and a value.
|
|
81
|
+
- `Chart`: columns or lines over time (`kind: "columns" | "line"`), one to a few series.
|
|
82
|
+
- `Sparkline`: one figure over time, as a small line.
|
|
83
|
+
- `ShareBar`: the parts of a whole in one bar, with its legend.
|
|
84
|
+
- `Legend`: the series by their colours.
|
|
85
|
+
- `FigureTable`: rows by columns, the numbers aligned.
|
|
86
|
+
|
|
87
|
+
A view of figures is laid out in this order: the few numbers that matter first (`Stats`), then one chart, then what breaks them down (`BarList`). No figure stands twice at one level: a chart carries its own figures as a table for a reader who cannot see it, so a `FigureTable` beside it is for figures the chart does not show. Where there is nothing yet, the view says in a sentence what would fill it (`EmptyState`) and draws no empty axis. The ready views below are laid out so.
|
|
88
|
+
5. **What is ready,** for a member who wants exactly that, in `<package>/README.md`, "A desk's pages". Each shows the collections of [collections.md](collections.md) or the member's own work on the board:
|
|
89
|
+
- `deskPage()`: all of the below as one page, one more entry of `pages`, at `/pages/desk` (`DESK_PAGE_KEY`).
|
|
90
|
+
- `DeskRecords`: the collections, read from `/records/` and shown whole, composed of the next four; it opens on the list of collections, and where an item was used is on the item's own view, so a member who asked to see that at a glance wants a page of their own.
|
|
91
|
+
- `DeskCollections`: the collections, each with its items counted by status.
|
|
92
|
+
- `DeskCollectionView`: a collection's items, narrowed by status.
|
|
93
|
+
- `DeskItemView`: an item with its preview, how it did as figures, where it was used, its files, and its figures by day.
|
|
94
|
+
- `DeskCollectionResults`: each metric and each ratio in all, then one metric the member picks: by week as a chart, and the items that did best by it.
|
|
95
|
+
- `DeskStanding`: the decisions that wait, the open runs and the open tasks.
|
|
96
|
+
- `DeskFiguresView`: how many tasks were done and how the runs ended, then what was done by week, by project and by category.
|
|
97
|
+
- `DeskArchive`: the closed tasks and the ended runs, found by words.
|
|
98
|
+
- `readDeskRecords`: reads the collections for a page of one's own, every file bounded and parsed.
|
|
99
|
+
6. **Build, serve, show.** `npm run build`, which went well where it ended in 0 and `dist/index.html` is there, not by what it printed; then `npm run serve` and `http://127.0.0.1:11197/`: the page answers, and `/api/v1/me` there names the member. The page is checked with what the desk keeps, an empty state where it keeps nothing yet: no sample is made to fill it. Then the member is given the address, with the server left up, and asked whether it is what they wanted to see; the run stops there for them, and phases 5 and 6 wait for their answer, so that what is written down and pushed is what they saw. The server is the agent's own to stop, by ending the process it started, once they have looked or said to: say that it was stopped, and how the pages are started again. Whether a server is up is asked of its address before it is said, since a session that comes back may no longer hold the process it started. A look at an empty state is a look at a sentence: once the first entry is kept, the member is offered the look again, at the page with it.
|
|
100
|
+
|
|
101
|
+
Where a page shows what someone else wrote, the hard rules of [building-a-console](/skills/building-a-console/SKILL.md) hold for it.
|
|
102
|
+
|
|
103
|
+
### Phase 5: Write it down
|
|
104
|
+
|
|
105
|
+
`AGENTS.md`, "This desk": one line for each thing the desk now keeps or shows, in the member's words. For what is kept: what, in which folder, and when a new entry is written. For a page: what it shows, and how it is opened; and `web/README.md`, where it still says the page is empty, says what the page shows. A later session records and shows from that line and the folder's `README.md` alone.
|
|
106
|
+
|
|
107
|
+
### Phase 6: Check, commit and push
|
|
108
|
+
|
|
109
|
+
- Every JSON file written is read back, and parses.
|
|
110
|
+
- Collections: `console desk check`, which says each problem with its file and signs in nowhere.
|
|
111
|
+
- Pages: `npm run build` ends in 0 and `web/dist/index.html` is there, written by it.
|
|
112
|
+
- Nothing secret is staged: `git status`, read in a step of its own before the commit. `web/node_modules` and `web/dist` are ignored, by a line added to the desk's `.gitignore` where it has none for them; the lockfile of `web/` is committed.
|
|
113
|
+
- Commit and push, without asking: the desk is the member's own, and its `AGENTS.md` says so. Where the host refuses a git command (it may keep an agent from writing under `.git`), the checks above are run all the same, and the member is told in the chat what is not committed, with the commands left to run written out in order.
|
|
114
|
+
|
|
115
|
+
Then tell the member, in one message: what is kept and where, with one entry; the page's address, and how it is started and stopped; what was left out.
|
|
116
|
+
|
|
117
|
+
## Verdicts
|
|
118
|
+
|
|
119
|
+
| Result | Verdict |
|
|
120
|
+
|---|---|
|
|
121
|
+
| What the member asked to keep is under `records/` in a shape its `README.md` says; what they asked to see is on a page that builds and shows it; `AGENTS.md` has its line for each; the checks of phase 6 passed; pushed | Done |
|
|
122
|
+
| A page could not be looked at with no browser, or `npm` is not there | Done, with what was not seen named |
|
|
123
|
+
| Something was made that the member did not ask for: a kind of record, a page, a folder | Taken out again, and said so |
|
|
124
|
+
| A secret in a file, a record or a commit | Stopped: the member is told, and it is rotated, not only deleted |
|
|
125
|
+
|
|
126
|
+
## What stays true of every desk
|
|
127
|
+
|
|
128
|
+
- **Private.** A desk's repository is private, at the member's own git account.
|
|
129
|
+
- **No secret,** in a file, a record or a commit: no token, key or password.
|
|
130
|
+
- **The pages never see the token.** `console serve` carries it, on the loopback alone, and no page is served anywhere else.
|
|
131
|
+
- **The board is the organization's.** What is done in a desk is its member's own, and is a task only where they put it on the board. Tying a record to a task, or reading the board from a page, is free: nothing asks for it and nothing forbids it. What an organization wants kept out of its members' desks, its rules say (`console rules`).
|
|
132
|
+
- **`/records/` is the files' address,** and no page lives under it.
|
|
133
|
+
- **Nothing is made unasked.** A desk says what it is for by what its member put there.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Collections: things made, where each was used and how it did
|
|
2
|
+
|
|
3
|
+
One shape a desk may take, read when its member wants a set of things they made kept with, for each, whether and where it was used and how it did by day. It is not the shape of a desk: for anything else, choose a shape for that thing ([SKILL.md](SKILL.md), phase 3). The package has this one whole, so nothing of it is built: its schemas ([records.md](/docs/specs/records.md)), `console desk check`, which says each problem of the files with its file and signs in nowhere, and a ready page, `deskPage()`. Which collections a desk keeps is said in the desk's `AGENTS.md`. After writing, run `console desk check` in the desk.
|
|
4
|
+
|
|
5
|
+
## The files
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
records/
|
|
9
|
+
index.json the collections
|
|
10
|
+
<key>/collection.json what the collection is, and how its items are read
|
|
11
|
+
<key>/items.json what was made
|
|
12
|
+
<key>/uses.json where an item was used (optional)
|
|
13
|
+
<key>/metrics.json how an item did, by day (optional)
|
|
14
|
+
<key>/files/ the files themselves
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
A key is lowercase letters, digits and hyphens. A day is written `2026-11-15`. An address begins with `https://`. Everything else is text, and is shown as text.
|
|
18
|
+
|
|
19
|
+
`index.json`, the collections in the order they are shown:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{ "collections": [{ "key": "ad-creatives", "title": "Ad creatives" }] }
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`ad-creatives/collection.json`. Only `title` is needed; the rest says how an item is read:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"title": "Ad creatives",
|
|
30
|
+
"description": "What was made for the ads, and how each did.",
|
|
31
|
+
"statuses": [
|
|
32
|
+
{ "key": "used", "label": "Used" },
|
|
33
|
+
{ "key": "unused", "label": "Not used" }
|
|
34
|
+
],
|
|
35
|
+
"fields": [{ "key": "format", "label": "Format", "kind": "text" }],
|
|
36
|
+
"metrics": [
|
|
37
|
+
{ "key": "impressions", "label": "Impressions", "unit": "count" },
|
|
38
|
+
{ "key": "clicks", "label": "Clicks", "unit": "count" },
|
|
39
|
+
{ "key": "spend", "label": "Spend", "unit": "currency", "currency": "KRW" }
|
|
40
|
+
],
|
|
41
|
+
"ratios": [
|
|
42
|
+
{ "key": "ctr", "label": "Clicks per impression", "of": "clicks", "per": "impressions", "as": "percent" }
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
A field's `kind` is `text`, `number`, `day` or `link`. A metric's `unit` is `count`, `currency`, `percent` or `seconds`. Each state an item can be in is a status, the one it begins in too. A rate of two metrics, such as clicks per impression, is a ratio: the total of `of` for each of `per`, shown `as` `percent` or `number`; a rate that is no ratio is shown nowhere.
|
|
48
|
+
|
|
49
|
+
`ad-creatives/items.json`, a list. `id`, `title` and `madeOn` are needed; an `id` is letters, digits and hyphens, and never changes:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
[
|
|
53
|
+
{
|
|
54
|
+
"id": "c-001",
|
|
55
|
+
"title": "Morning commute, 15 seconds",
|
|
56
|
+
"madeOn": "2026-11-03",
|
|
57
|
+
"status": "used",
|
|
58
|
+
"preview": "files/c-001.png",
|
|
59
|
+
"files": [{ "label": "The video", "path": "files/c-001.mp4" }],
|
|
60
|
+
"links": [{ "label": "Where it runs", "url": "https://ads.example/c-001" }],
|
|
61
|
+
"task": { "project": "ads", "number": 12 },
|
|
62
|
+
"fields": { "format": "9:16" },
|
|
63
|
+
"note": "The first cut."
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`status` is one of the collection's, and where the collection has statuses every item carries one. `preview` is a picture (png, jpg, jpeg, webp, gif, avif, svg). `task` is a task of the board, where the item is tied to one.
|
|
69
|
+
|
|
70
|
+
`ad-creatives/uses.json`, a list: where an item was used, and when.
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
[{ "item": "c-001", "on": "2026-11-06", "where": "The November campaign, feed" }]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`ad-creatives/metrics.json`, a list: a row for an item and a day, with a number for each metric that day has.
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
[{ "item": "c-001", "on": "2026-11-06", "values": { "impressions": 1200, "clicks": 36, "spend": 54000 } }]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## The files themselves
|
|
83
|
+
|
|
84
|
+
`files/` of a collection holds what was made, of any kind and size, and an item names each by its path from the collection: `files/c-001.mp4`. No part of a path begins with a full stop. A large file goes in with git LFS: track its kind (`git lfs track`) before adding it.
|
|
85
|
+
|
|
86
|
+
## Bounds
|
|
87
|
+
|
|
88
|
+
At most 100 collections; in a collection 5,000 items, 20,000 uses and 50,000 rows of figures; 64 characters in a key or an id, 200 in a title, a label or `where`, 2,000 in a description, a note or a field that is text; 8 MiB in a JSON file. A file under `files/` has no bound.
|
|
89
|
+
|
|
90
|
+
## What the check says
|
|
91
|
+
|
|
92
|
+
A problem, with its file, for what does not read: a file that is no JSON or not in this shape, an item a use or a row of figures names that is not there, a preview or a file that is not there, a JSON file over its bound. A note, and no problem, for a file git LFS has not fetched on this machine, a use or a figure dated before its item was made, and an item with no status where its collection names some. With any problem it ends in 1; where a desk keeps no collection it says so and ends in 0, and what else lies under `records/` is not its to read.
|
|
93
|
+
|
|
94
|
+
## What never goes in
|
|
95
|
+
|
|
96
|
+
A secret: a token, a key, a password.
|