@jskit-ai/agent-docs 0.1.339 → 0.1.341

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.
Files changed (46) hide show
  1. package/guide/agent/app-setup/authentication.md +5 -5
  2. package/guide/agent/app-setup/database-layer.md +8 -6
  3. package/guide/agent/app-setup/multi-homing.md +3 -3
  4. package/guide/agent/app-setup/run-an-accounts-hub.md +9 -9
  5. package/guide/agent/app-setup/sign-in-through-oidc-issuer.md +8 -6
  6. package/guide/agent/app-setup/upgrading-jskit.md +29 -4
  7. package/guide/agent/framework/environments.md +21 -9
  8. package/guide/agent/framework/sanity-checks.md +11 -11
  9. package/guide/agent/framework/security-pass.md +12 -12
  10. package/package.json +1 -1
  11. package/patterns/feature-package/example/booking-engine/package.json +1 -1
  12. package/patterns/minimal-foundation/example/package.json +3 -3
  13. package/patterns/shell-foundation/example/package.json +4 -4
  14. package/patterns/shell-foundation/example/packages/main/package.json +1 -1
  15. package/reference/autogen/KERNEL_MAP.md +1 -1
  16. package/reference/autogen/PATTERN_INDEX.md +38 -38
  17. package/reference/autogen/packages/auth-provider-local-core.md +8 -8
  18. package/reference/autogen/packages/auth-provider-oidc-core.md +1 -1
  19. package/reference/autogen/packages/auth-provider-supabase-core.md +2 -2
  20. package/reference/autogen/packages/kernel.md +2 -1
  21. package/reference/autogen/packages/oidc-issuer-core.md +3 -3
  22. package/skills/jskit/references/database-layer.md +8 -6
  23. package/skills/jskit/references/environments.md +21 -9
  24. package/skills/jskit/references/multi-homing.md +3 -3
  25. package/skills/jskit/references/pattern-index.md +38 -38
  26. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +3 -3
  27. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +4 -4
  28. package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
  29. package/skills/jskit/references/patterns/auth/accounts-hub/PATTERN.md +2 -2
  30. package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +3 -3
  31. package/skills/jskit/references/patterns/auth/oidc-sign-in/example/.env.example +1 -1
  32. package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
  33. package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
  34. package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +5 -5
  35. package/skills/jskit/references/patterns/connectors/event-delivery/PATTERN.md +1 -1
  36. package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +3 -3
  37. package/skills/jskit/references/patterns/database/mysql-application/PATTERN.md +3 -3
  38. package/skills/jskit/references/patterns/database/mysql-application/example/package.json +2 -2
  39. package/skills/jskit/references/patterns/database/postgres-application/example/package.json +2 -2
  40. package/skills/jskit/references/patterns/realtime/realtime-application/PATTERN.md +2 -2
  41. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  42. package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
  43. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +3 -3
  44. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +6 -6
  45. package/skills/jskit/references/sanity-checks.md +11 -11
  46. package/skills/jskit/references/security-pass.md +12 -12
@@ -165,22 +165,22 @@ A consolidation drops behaviour there without a failing build.
165
165
  `router.back()` and hand-made back controls, so Up lands inside the app
166
166
  even on a page opened from a link.
167
167
 
168
- ### Production settings
169
-
170
- - A deployed server sets `APP_ENV=staging` or `production` and
171
- `NODE_ENV=production` ([Environments](environments.md)); only
172
- then does local auth ask for a setup code and refuse development settings.
173
- - On an empty production database, local auth asks for the first account's
174
- setup code, so whoever reaches a new deployment first cannot own it ([The
175
- first account in
176
- production](/guide/app-setup/authentication#the-first-account-in-production-local-auth)).
168
+ ### Staging and production settings
169
+
170
+ - A server sets `APP_ENV=staging` or `production` and `NODE_ENV=production`
171
+ ([Environments](environments.md)); only then does local auth
172
+ ask for a setup code and refuse development settings.
173
+ - On an empty database there, local auth asks for the first account's setup
174
+ code, so whoever reaches a new server first cannot own it ([The first account
175
+ in staging and
176
+ production](/guide/app-setup/authentication#the-first-account-in-staging-and-production-local-auth)).
177
177
  Give any registration of your own the same protection.
178
178
  - `config.securityHeaders` sends the security headers, with the content
179
179
  security policy reported, not enforced, by default; read them on a
180
180
  production build ([Security
181
181
  headers](/guide/app-setup/initial-scaffolding#security-headers)).
182
- - Email confirmation needs `auth.local.confirmation-sender` in production, or
183
- the server refuses to start while anyone may register ([Email
182
+ - Email confirmation needs `auth.local.confirmation-sender` there, or the
183
+ server refuses to start while anyone may register ([Email
184
184
  confirmation](/guide/app-setup/authentication#email-confirmation-local-auth)).
185
185
  - Changing the assistant's instructions needs `assistant.settings.update` or
186
186
  the surface's own permission ([Who may change the
@@ -4,7 +4,7 @@
4
4
 
5
5
  A security pass makes an app refuse what it should. Genesis's security pass
6
6
  skill (`genesis-security-pass`) holds the method: map every way in, work
7
- through authorization, sign-in, input, secrets, production settings and
7
+ through authorization, sign-in, input, secrets, staging and production settings and
8
8
  dependencies, prove each finding by sending the input that breaks it, and keep
9
9
  a test that fails without each fix. This page says where each of those lives in
10
10
  a JSKIT app. The rules it applies are already in [Typed features](typed-features.md),
@@ -75,7 +75,7 @@ a JSKIT app. The rules it applies are already in [Typed features](typed-features
75
75
  invitations, costly reads, calls to a paid service) declares
76
76
  `rateLimit: { max, timeWindow }`, refused with 429 `kernel.http.rateLimited`.
77
77
  Each limit gets a test expecting the 429.
78
- - Sign-in cookies are httpOnly, and in production `Secure` with the `__Host-`
78
+ - Sign-in cookies are httpOnly, and in staging and production `Secure` with the `__Host-`
79
79
  prefix; `AUTH_COOKIE_SAME_SITE` is `lax` or `strict`
80
80
  ([Sign-in cookies and SameSite](/guide/app-setup/authentication#sign-in-cookies-and-samesite)).
81
81
  Every unsafe `/api` method checks its CSRF token unless the route sets
@@ -89,20 +89,20 @@ a JSKIT app. The rules it applies are already in [Typed features](typed-features
89
89
  an account exists. Give the app's own invitation, lookup and sign-up routes
90
90
  the same answer.
91
91
 
92
- ## Production settings and secrets
92
+ ## Staging and production settings and secrets
93
93
 
94
94
  - `APP_ENV=staging` or `APP_ENV=production`, with `NODE_ENV=production`, set by
95
- the Deployment's Serve step, makes a server deployed
95
+ the Deployment's Serve step, makes a server a staging or production server
96
96
  ([Environments](environments.md)). There local auth requires
97
97
  `AUTH_LOCAL_SESSION_SECRET`, refuses `AUTH_DEV_BYPASS_ENABLED` and
98
98
  `AUTH_LOCAL_RECOVERY_DEV_OUTPUT`, and refuses to start without a confirmation
99
99
  sender while anyone may register
100
- ([Production settings](sanity-checks.md#production-settings)).
101
- - On an empty production database the first account needs the setup code
102
- (403 `auth.local.setup.codeRequired`), so whoever reaches a new deployment
103
- first cannot own it. A registration or admin bootstrap of the app's own
100
+ ([Staging and production settings](sanity-checks.md#staging-and-production-settings)).
101
+ - On an empty staging or production database the first account needs the
102
+ setup code (403 `auth.local.setup.codeRequired`), so whoever reaches a new
103
+ staging or production server first cannot own it. A registration or admin bootstrap of the app's own
104
104
  needs the same protection
105
- ([The first account in production](/guide/app-setup/authentication#the-first-account-in-production-local-auth)).
105
+ ([The first account in staging and production](/guide/app-setup/authentication#the-first-account-in-staging-and-production-local-auth)).
106
106
  - `AUTH_LOCAL_SESSION_SECRET` and every other secret live in private Env, read
107
107
  on the server, and the Deployment generates the session secret. Nothing
108
108
  secret goes in `config/public.js`, which the browser imports, or in a
@@ -111,8 +111,8 @@ a JSKIT app. The rules it applies are already in [Typed features](typed-features
111
111
  server error."; an `AppError`'s message is shown at any status, so it never
112
112
  carries internals
113
113
  ([Internal failures are plain errors](typed-features.md#internal-failures-are-plain-errors)).
114
- - `config.securityHeaders` sets the security headers. Production adds
115
- transport security, framing protection and a content security policy that is
114
+ - `config.securityHeaders` sets the security headers. Staging and production
115
+ add transport security, framing protection and a content security policy that is
116
116
  reported, not enforced, by default; enforce it once the pages run without
117
117
  violations, and read the headers on a production build
118
118
  ([Security headers](/guide/app-setup/initial-scaffolding#security-headers)).
@@ -129,7 +129,7 @@ a JSKIT app. The rules it applies are already in [Typed features](typed-features
129
129
  workspace), a write without `csrf-token`, and one request past each
130
130
  `rateLimit` (429). A body that does not validate, sent without a session,
131
131
  must get the refusal, not field errors.
132
- - Production settings: start the server with `APP_ENV=staging`, `NODE_ENV=production` and the
132
+ - Staging and production settings: start the server with `APP_ENV=staging`, `NODE_ENV=production` and the
133
133
  test database, and check that it stops without `AUTH_LOCAL_SESSION_SECRET`,
134
134
  that registering asks for the setup code, and the response headers.
135
135
  - Run `npm audit` and `npm run verify`.