@jskit-ai/agent-docs 0.1.270 → 0.1.272

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 (48) hide show
  1. package/guide/agent/app-extras/assistant-conversation.md +3 -2
  2. package/guide/agent/app-extras/assistant.md +35 -0
  3. package/guide/agent/app-setup/authentication.md +149 -0
  4. package/guide/agent/app-setup/database-layer.md +4 -0
  5. package/guide/agent/app-setup/initial-scaffolding.md +76 -0
  6. package/guide/agent/framework/typed-features.md +5 -0
  7. package/package.json +1 -1
  8. package/patterns/feature-package/example/booking-engine/package.json +1 -1
  9. package/patterns/minimal-foundation/PATTERN.md +3 -1
  10. package/patterns/minimal-foundation/example/package.json +4 -4
  11. package/patterns/minimal-foundation/example/server.js +9 -6
  12. package/patterns/minimal-foundation/example/tests/server/smoke.test.js +3 -4
  13. package/patterns/shell-foundation/example/package.json +5 -5
  14. package/patterns/shell-foundation/example/packages/main/package.json +1 -1
  15. package/patterns/shell-foundation/example/server.js +9 -6
  16. package/patterns/shell-foundation/example/tests/server/smoke.test.js +3 -4
  17. package/reference/autogen/PATTERN_INDEX.md +37 -37
  18. package/reference/autogen/packages/agent.md +1 -1
  19. package/reference/autogen/packages/assistant-runtime.md +1 -0
  20. package/reference/autogen/packages/auth-core.md +9 -2
  21. package/reference/autogen/packages/auth-provider-local-core.md +85 -21
  22. package/reference/autogen/packages/auth-provider-local-db-core.md +7 -0
  23. package/reference/autogen/packages/auth-web.md +13 -2
  24. package/reference/autogen/packages/crud-core.md +3 -2
  25. package/reference/autogen/packages/kernel.md +39 -1
  26. package/skills/jskit/references/pattern-index.md +37 -37
  27. package/skills/jskit/references/patterns/app/minimal-foundation/PATTERN.md +3 -1
  28. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +4 -4
  29. package/skills/jskit/references/patterns/app/minimal-foundation/example/server.js +9 -6
  30. package/skills/jskit/references/patterns/app/minimal-foundation/example/tests/server/smoke.test.js +3 -4
  31. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +5 -5
  32. package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
  33. package/skills/jskit/references/patterns/app/shell-foundation/example/server.js +9 -6
  34. package/skills/jskit/references/patterns/app/shell-foundation/example/tests/server/smoke.test.js +3 -4
  35. package/skills/jskit/references/patterns/assistant/assistant-surface/PATTERN.md +5 -0
  36. package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +2 -2
  37. package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
  38. package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
  39. package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
  40. package/skills/jskit/references/patterns/crud/json-api-resource-package/PATTERN.md +11 -0
  41. package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/package.json +2 -2
  42. package/skills/jskit/references/patterns/database/mysql-application/example/package.json +1 -1
  43. package/skills/jskit/references/patterns/database/postgres-application/example/package.json +1 -1
  44. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  45. package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
  46. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
  47. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +3 -3
  48. package/skills/jskit/references/typed-features.md +5 -0
@@ -2,6 +2,6 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/auth-provider-supabase-core": "0.2.9"
5
+ "@jskit-ai/auth-provider-supabase-core": "0.2.11"
6
6
  }
7
7
  }
@@ -7,10 +7,10 @@
7
7
  "db:migrate:status": "knex --knexfile ./knexfile.js migrate:list"
8
8
  },
9
9
  "dependencies": {
10
- "@jskit-ai/connectors-core": "0.2.8",
11
- "@jskit-ai/connector-google-calendar": "0.2.8",
12
- "@jskit-ai/database-runtime": "0.1.256",
13
- "@jskit-ai/database-runtime-mysql": "0.1.254",
10
+ "@jskit-ai/connectors-core": "0.2.10",
11
+ "@jskit-ai/connector-google-calendar": "0.2.10",
12
+ "@jskit-ai/database-runtime": "0.1.258",
13
+ "@jskit-ai/database-runtime-mysql": "0.1.256",
14
14
  "knex": "^3.1.0"
15
15
  }
16
16
  }
@@ -120,6 +120,17 @@ surface further; do not register unused mutation actions and routes. Use
120
120
  `routes: false` only for an internal
121
121
  capability/action surface that deliberately has no HTTP API.
122
122
 
123
+ The assistant runs actions on the `automation` channel as the signed-in user,
124
+ so an action without an HTTP route would otherwise reach records that no route
125
+ shows the user. The actions of an `internal: true` or `routes: false` feature
126
+ therefore stay off `automation` (the assistant cannot call them) unless their
127
+ permission names a permission (`require: "all"` or `"any"`), as the workspace
128
+ scope's default `crud.<namespace>.<operation>` permissions do. Give such a
129
+ feature explicit `permissions` when the assistant should read it for the users
130
+ who hold them; the default for other surfaces, `require: "authenticated"`,
131
+ would admit every signed-in user. An additional action's own `channels`
132
+ decide for it.
133
+
123
134
  Create, update, and delete publish `<namespace>.record.changed` to the
124
135
  `event_scope` realtime audience, which reaches only the room of the action's
125
136
  user, workspace, or workspace-user scope. Set `realtimeAudience` to another
@@ -9,8 +9,8 @@
9
9
  "./shared": "./src/shared/index.js"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/crud-core": "0.2.8",
13
- "@jskit-ai/resource-crud-core": "0.1.198"
12
+ "@jskit-ai/crud-core": "0.2.10",
13
+ "@jskit-ai/resource-crud-core": "0.1.200"
14
14
  },
15
15
  "jskit": {
16
16
  "kind": "runtime",
@@ -8,6 +8,6 @@
8
8
  "db:migrate:status": "knex --knexfile ./knexfile.js migrate:list"
9
9
  },
10
10
  "dependencies": {
11
- "@jskit-ai/database-runtime-mysql": "0.1.254"
11
+ "@jskit-ai/database-runtime-mysql": "0.1.256"
12
12
  }
13
13
  }
@@ -8,6 +8,6 @@
8
8
  "db:migrate:status": "knex --knexfile ./knexfile.js migrate:list"
9
9
  },
10
10
  "dependencies": {
11
- "@jskit-ai/database-runtime-postgres": "0.1.253"
11
+ "@jskit-ai/database-runtime-postgres": "0.1.255"
12
12
  }
13
13
  }
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/realtime": "0.2.11",
6
- "@jskit-ai/shell-web": "0.2.8"
5
+ "@jskit-ai/realtime": "0.2.13",
6
+ "@jskit-ai/shell-web": "0.2.10"
7
7
  }
8
8
  }
@@ -5,7 +5,7 @@
5
5
  "private": true,
6
6
  "type": "module",
7
7
  "dependencies": {
8
- "@jskit-ai/kernel": "0.2.7",
8
+ "@jskit-ai/kernel": "0.2.9",
9
9
  "json-rest-schema": "^1.0.17"
10
10
  },
11
11
  "exports": {
@@ -10,8 +10,8 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.8",
14
- "@jskit-ai/resource-crud-core": "0.1.198"
13
+ "@jskit-ai/crud-core": "0.2.10",
14
+ "@jskit-ai/resource-crud-core": "0.1.200"
15
15
  },
16
16
  "jskit": {
17
17
  "kind": "runtime",
@@ -10,9 +10,9 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.8",
14
- "@jskit-ai/resource-crud-core": "0.1.198",
15
- "@jskit-ai/workspaces-core": "0.2.9"
13
+ "@jskit-ai/crud-core": "0.2.10",
14
+ "@jskit-ai/resource-crud-core": "0.1.200",
15
+ "@jskit-ai/workspaces-core": "0.2.11"
16
16
  },
17
17
  "jskit": {
18
18
  "kind": "runtime",
@@ -730,6 +730,11 @@ for anything that reads or writes the domain.**
730
730
  `request.executeAction({ actionId: ACTION_X, input })` returns.
731
731
  - A route that bypasses actions (a provider's callback) gets its own named
732
732
  registrar. Summaries are sentences.
733
+ - A route that repetition can abuse (sign-in, codes, sending email) declares
734
+ `rateLimit: { max, timeWindow }`, which the kernel enforces per client
735
+ address and refuses with 429, `kernel.http.rateLimited` and `Retry-After`.
736
+ A limit worth changing per application is read from its config, as
737
+ `config.auth.rateLimits` is.
733
738
 
734
739
  Why: an action is the one place a domain operation's policy, input and
735
740
  events are declared.