@jskit-ai/agent-docs 0.1.63 → 0.1.64
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/guide/agent/app-setup/authentication.md +6 -5
- package/guide/agent/app-setup/initial-scaffolding.md +2 -1
- package/guide/agent/app-setup/quickstart.md +3 -2
- package/guide/agent/app-setup/working-with-the-jskit-cli.md +26 -32
- package/package.json +1 -1
- package/reference/autogen/packages/auth-core.md +1 -0
|
@@ -18,7 +18,7 @@ If you are already continuing from the previous chapter, you are already in the
|
|
|
18
18
|
|
|
19
19
|
**Default: Start With Local Auth**
|
|
20
20
|
|
|
21
|
-
The default auth path does not require a Supabase project or a database. It uses `auth-local`,
|
|
21
|
+
The default auth path does not require a Supabase project or a database. It uses the local provider package, `auth-provider-local-core`, together with `auth-web`. The local provider stores credentials and sessions in `.jskit/auth/` by default.
|
|
22
22
|
|
|
23
23
|
That is the recommended first step for most apps. After the app's core flow is working, switch to Supabase or add richer auth methods only if the product needs them.
|
|
24
24
|
|
|
@@ -27,11 +27,12 @@ That is the recommended first step for most apps. After the app's core flow is w
|
|
|
27
27
|
From inside `exampleapp`, run:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
npx jskit add
|
|
30
|
+
npx jskit add package auth-provider-local-core
|
|
31
|
+
npx jskit add package auth-web
|
|
31
32
|
npm install
|
|
32
33
|
```
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
These package installs add the provider-neutral auth core, the auth web layer, and the local provider. They give the app working register, login, logout, session, and password recovery flows without requiring an external auth service.
|
|
35
36
|
|
|
36
37
|
The final `npm install` matters for the same reason it did in the shell chapter: `jskit add` rewrites the scaffold and updates `package.json`, but `npm install` is what actually downloads the newly referenced runtime packages.
|
|
37
38
|
|
|
@@ -468,7 +469,7 @@ At this point the guide has shown three distinct layers of client state:
|
|
|
468
469
|
|
|
469
470
|
That progression is intentional. Packages keep their operational runtimes internally, but the app-facing shared state they surface to Vue code is store-based.
|
|
470
471
|
|
|
471
|
-
## What
|
|
472
|
+
## What the local auth install adds to the app
|
|
472
473
|
|
|
473
474
|
The interesting part of this chapter is that authentication appears in several different layers at once: environment config, public routing config, shell placements, and app-owned view wrappers.
|
|
474
475
|
|
|
@@ -527,7 +528,7 @@ config.surfaceDefinitions.auth = {
|
|
|
527
528
|
|
|
528
529
|
That `requiresAuth: false` line is important. The auth surface must stay public, otherwise users would need to be logged in before they could reach the login page.
|
|
529
530
|
|
|
530
|
-
The local provider does not need an app database profile mode or OAuth config. The stock login UI asks `/api/session` for the active provider capabilities and renders only what the selected provider actually supports. With
|
|
531
|
+
The local provider does not need an app database profile mode or OAuth config. The stock login UI asks `/api/session` for the active provider capabilities and renders only what the selected provider actually supports. With the local provider, that means email/password login, registration, sign-out, session refresh, and password recovery when recovery is configured.
|
|
531
532
|
|
|
532
533
|
Later, if you switch to Supabase, the Supabase provider can append the app-owned OAuth visibility config and profile mode settings it needs.
|
|
533
534
|
|
|
@@ -53,7 +53,8 @@ npx @jskit-ai/create-app exampleapp --tenancy-mode none
|
|
|
53
53
|
cd exampleapp
|
|
54
54
|
npm install
|
|
55
55
|
|
|
56
|
-
npx jskit add
|
|
56
|
+
npx jskit add package auth-provider-local-core
|
|
57
|
+
npx jskit add package auth-web
|
|
57
58
|
|
|
58
59
|
npx jskit add package database-runtime-mysql \
|
|
59
60
|
--db-host "$DB_HOST" \
|
|
@@ -48,7 +48,8 @@ npx @jskit-ai/create-app testapp --tenancy-mode personal
|
|
|
48
48
|
cd testapp
|
|
49
49
|
npm install
|
|
50
50
|
|
|
51
|
-
npx jskit add
|
|
51
|
+
npx jskit add package auth-provider-local-core
|
|
52
|
+
npx jskit add package auth-web
|
|
52
53
|
|
|
53
54
|
npx jskit add package database-runtime-mysql \
|
|
54
55
|
--db-host "$DB_HOST" \
|
|
@@ -82,7 +83,7 @@ npm install
|
|
|
82
83
|
npm run db:migrate
|
|
83
84
|
```
|
|
84
85
|
|
|
85
|
-
Keep authentication deliberately basic while the product is still taking shape. Start with `auth-
|
|
86
|
+
Keep authentication deliberately basic while the product is still taking shape. Start with the local provider and `auth-web`, build the app's core workflows, then add Supabase, OAuth, OTP, provider linking, app-user projection, or workspace/account complexity when the product actually needs those features.
|
|
86
87
|
|
|
87
88
|
At this point you have:
|
|
88
89
|
|
|
@@ -9,7 +9,7 @@ This chapter steps back and treats the CLI as a subject in its own right.
|
|
|
9
9
|
That matters because `jskit` is not just "the thing that installs packages". It is the tool that helps you:
|
|
10
10
|
|
|
11
11
|
- discover what JSKIT can do
|
|
12
|
-
- inspect
|
|
12
|
+
- inspect packages, generators, and any catalog shortcuts before using them
|
|
13
13
|
- apply and re-apply JSKIT-managed mutations to your app
|
|
14
14
|
- keep managed files and lock state healthy
|
|
15
15
|
- create your own app-local runtime packages
|
|
@@ -28,7 +28,7 @@ The easiest way to understand `jskit` is to separate it from the other tools in
|
|
|
28
28
|
|
|
29
29
|
That separation is crucial.
|
|
30
30
|
|
|
31
|
-
When you run a command such as `npx jskit add
|
|
31
|
+
When you run a command such as `npx jskit add package auth-provider-local-core`, JSKIT updates app-owned files and records what it changed. It does **not** replace npm, Vite, or Knex.
|
|
32
32
|
|
|
33
33
|
The most important record of that managed state lives here:
|
|
34
34
|
|
|
@@ -151,9 +151,7 @@ That distinction matters.
|
|
|
151
151
|
|
|
152
152
|
#### Bundles
|
|
153
153
|
|
|
154
|
-
A bundle is a curated install shortcut for several runtime packages that are meant to go together.
|
|
155
|
-
|
|
156
|
-
In the current catalog, `auth-local` is the obvious example. It is a single bundle id, but it expands to several real runtime packages.
|
|
154
|
+
A bundle is a curated install shortcut for several runtime packages that are meant to go together. Bundles can still appear in the catalog for compatibility and quick inspection, but the guide uses explicit package installs so the real runtime packages stay visible.
|
|
157
155
|
|
|
158
156
|
#### Runtime packages
|
|
159
157
|
|
|
@@ -188,7 +186,7 @@ npx jskit list generators
|
|
|
188
186
|
|
|
189
187
|
Those two commands are especially useful later in the guide, once you already know roughly what kind of thing you are looking for.
|
|
190
188
|
|
|
191
|
-
If you want bundle members printed inline too, `npx jskit list --full` expands the bundle view. That is useful when you
|
|
189
|
+
If you want bundle members printed inline too, `npx jskit list --full` expands the bundle view. That is useful when you are auditing a shortcut, but package ids are still the normal install vocabulary in this guide.
|
|
192
190
|
|
|
193
191
|
One more detail is worth noticing. In repos that contain local package descriptors, `list packages` can also show app-local or repo-local packages in addition to the published catalog. So `list` is not only a remote catalog browser. It is also a view of what this app can currently see.
|
|
194
192
|
|
|
@@ -208,7 +206,7 @@ And the more useful inspection form is:
|
|
|
208
206
|
npx jskit show <id> --details
|
|
209
207
|
```
|
|
210
208
|
|
|
211
|
-
This command is unusually valuable in JSKIT because packages and
|
|
209
|
+
This command is unusually valuable in JSKIT because packages and catalog shortcuts do more than "add a dependency". They can:
|
|
212
210
|
|
|
213
211
|
- provide or require capabilities
|
|
214
212
|
- register runtime providers
|
|
@@ -230,39 +228,42 @@ The plain form is useful when you only want to identify something quickly. `--de
|
|
|
230
228
|
|
|
231
229
|
There are two especially common cases:
|
|
232
230
|
|
|
233
|
-
- you found a
|
|
231
|
+
- you found a package or shortcut in `jskit list` and want to know what it really does before you install it
|
|
234
232
|
- you already know a package changed the shell, the runtime graph, or the app tree, and you want to see *how*
|
|
235
233
|
|
|
236
234
|
That second case matters just as much as the first one. Later in the guide, chapters explain package behavior one feature at a time. `show --details` is the generic command that lets you inspect those same package contracts directly.
|
|
237
235
|
|
|
238
|
-
### A first example:
|
|
236
|
+
### A first example: inspect the local auth provider
|
|
239
237
|
|
|
240
238
|
Run:
|
|
241
239
|
|
|
242
240
|
```bash
|
|
243
|
-
npx jskit show auth-local --details
|
|
241
|
+
npx jskit show auth-provider-local-core --details
|
|
244
242
|
```
|
|
245
243
|
|
|
246
244
|
This output is short, but it already teaches something important:
|
|
247
245
|
|
|
248
|
-
- `auth-local` is a **
|
|
249
|
-
- it
|
|
246
|
+
- `auth-provider-local-core` is a **runtime package**
|
|
247
|
+
- it selects the local auth provider
|
|
248
|
+
- it depends on the provider-neutral `auth-core`
|
|
250
249
|
|
|
251
|
-
|
|
250
|
+
The default local auth install uses two direct package commands:
|
|
252
251
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
252
|
+
```bash
|
|
253
|
+
npx jskit add package auth-provider-local-core
|
|
254
|
+
npx jskit add package auth-web
|
|
255
|
+
```
|
|
256
256
|
|
|
257
|
-
That is exactly the kind of thing you want to know before you mutate the app
|
|
257
|
+
That is exactly the kind of thing you want to know before you mutate the app:
|
|
258
258
|
|
|
259
|
-
-
|
|
259
|
+
- which package selects the active provider?
|
|
260
|
+
- which package adds the web auth routes and login UI?
|
|
260
261
|
|
|
261
|
-
|
|
262
|
+
It also helps you keep the mental model straight:
|
|
262
263
|
|
|
263
|
-
- bundles are install shortcuts
|
|
264
264
|
- runtime packages are the things that actually provide capabilities
|
|
265
|
-
- provider
|
|
265
|
+
- `auth-provider-local-core` provides the selected `auth.provider`
|
|
266
|
+
- `auth-web` consumes the selected provider and adds the web surface
|
|
266
267
|
|
|
267
268
|
### A richer example: what does `workspaces-web` contribute?
|
|
268
269
|
|
|
@@ -475,14 +476,13 @@ This is not required, but it is genuinely useful once you start using commands s
|
|
|
475
476
|
|
|
476
477
|
## Installing runtime capability: `add`
|
|
477
478
|
|
|
478
|
-
The install command
|
|
479
|
+
The install command you will use most often is:
|
|
479
480
|
|
|
480
481
|
```bash
|
|
481
482
|
npx jskit add package users-web
|
|
482
|
-
npx jskit add bundle auth-local
|
|
483
483
|
```
|
|
484
484
|
|
|
485
|
-
|
|
485
|
+
That command installs one runtime package and its dependency chain.
|
|
486
486
|
|
|
487
487
|
### `add package`
|
|
488
488
|
|
|
@@ -518,15 +518,9 @@ npm run devlinks
|
|
|
518
518
|
|
|
519
519
|
### `add bundle`
|
|
520
520
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
```bash
|
|
524
|
-
npx jskit add bundle auth-local
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
Bundles are a convenience layer. They save you from having to remember and install several related runtime packages one by one.
|
|
521
|
+
Bundles are a convenience layer for catalog shortcuts. Prefer package commands in setup docs and normal app work, especially for auth, because provider ownership is clearer when the selected provider package is installed explicitly.
|
|
528
522
|
|
|
529
|
-
|
|
523
|
+
If you do use a bundle shortcut, inspect it first with `npx jskit show <bundle-id> --details` so you can see the real packages and capabilities it will install.
|
|
530
524
|
|
|
531
525
|
### Generator packages are different
|
|
532
526
|
|
package/package.json
CHANGED
|
@@ -312,6 +312,7 @@ Exports
|
|
|
312
312
|
- `logoutOutputValidator`
|
|
313
313
|
- `oauthProviderCatalogEntryOutputValidator`
|
|
314
314
|
- `authDeniedOutputSchema`
|
|
315
|
+
- `authCapabilitiesOutputSchema`
|
|
315
316
|
- `sessionOutputValidator`
|
|
316
317
|
- `sessionUnavailableOutputValidator`
|
|
317
318
|
- `createCommandMessages({ fields = {}, defaultMessage = "Invalid value." } = {})`
|