@jskit-ai/agent-docs 0.1.292 → 0.1.293
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 +19 -8
- package/guide/agent/app-setup/multi-homing.md +19 -0
- package/guide/agent/app-setup/upgrading-jskit.md +4 -0
- package/guide/agent/framework/client-features.md +26 -1
- package/guide/agent/framework/typed-features.md +33 -2
- package/package.json +1 -1
- package/patterns/feature-package/example/booking-engine/package.json +2 -2
- package/patterns/minimal-foundation/example/AGENTS.md +5 -1
- package/patterns/minimal-foundation/example/package.json +5 -5
- package/patterns/shell-foundation/example/AGENTS.md +5 -1
- package/patterns/shell-foundation/example/package.json +6 -6
- package/patterns/shell-foundation/example/packages/main/package.json +1 -1
- package/reference/autogen/PATTERN_INDEX.md +38 -38
- package/reference/autogen/packages/kernel.md +7 -1
- package/reference/autogen/packages/workspaces-core.md +8 -2
- package/reference/autogen/packages/workspaces-web.md +1 -0
- package/reference/autogen/tooling/config-eslint.md +18 -1
- package/reference/autogen/tooling/jskit-catalog.md +8 -0
- package/skills/jskit/references/client-features.md +26 -1
- package/skills/jskit/references/multi-homing.md +19 -0
- package/skills/jskit/references/pattern-index.md +38 -38
- package/skills/jskit/references/patterns/app/minimal-foundation/example/AGENTS.md +5 -1
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +5 -5
- package/skills/jskit/references/patterns/app/shell-foundation/example/AGENTS.md +5 -1
- package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +6 -6
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
- package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +3 -3
- package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
- package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
- package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
- package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +3 -3
- package/skills/jskit/references/patterns/crud/crud-screen-set/PATTERN.md +3 -1
- package/skills/jskit/references/patterns/database/mysql-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/database/postgres-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +2 -2
- package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsPreferencesSection.vue +7 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +3 -3
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +6 -6
- package/skills/jskit/references/patterns/workspaces/workspace-server/PATTERN.md +9 -0
- package/skills/jskit/references/typed-features.md +33 -2
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"./shared": "./src/shared/index.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@jskit-ai/crud-core": "0.2.
|
|
14
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
15
|
-
"@jskit-ai/users-core": "0.2.
|
|
16
|
-
"@jskit-ai/workspaces-core": "0.2.
|
|
13
|
+
"@jskit-ai/crud-core": "0.2.23",
|
|
14
|
+
"@jskit-ai/resource-crud-core": "0.1.209",
|
|
15
|
+
"@jskit-ai/users-core": "0.2.24",
|
|
16
|
+
"@jskit-ai/workspaces-core": "0.2.24"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@jskit-ai/kernel": "0.2.
|
|
20
|
-
"@jskit-ai/resource-runtime": "0.2.
|
|
19
|
+
"@jskit-ai/kernel": "0.2.18",
|
|
20
|
+
"@jskit-ai/resource-runtime": "0.2.20"
|
|
21
21
|
},
|
|
22
22
|
"jskit": {
|
|
23
23
|
"kind": "runtime",
|
|
@@ -74,6 +74,15 @@ external effects out of it. Without the capability, acceptance activates the
|
|
|
74
74
|
membership only. Allow ordinary invitations; reject stale, revoked, conflicting
|
|
75
75
|
or unexpectedly missing application associations.
|
|
76
76
|
|
|
77
|
+
Provide the optional `workspaces.workspace-created-participant` capability the
|
|
78
|
+
same way to write application records for every new workspace. The
|
|
79
|
+
`workspace.workspaces.create` action and personal workspace provisioning invoke
|
|
80
|
+
`fn({ workspace, owner }, txOptions)` after writing the workspace, its owner's
|
|
81
|
+
membership and its settings, in the creation's uncommitted transaction (the
|
|
82
|
+
caller's when it passes one). Pass `txOptions` on and propagate failures: a
|
|
83
|
+
failure rolls the whole creation back. An existing personal workspace does not
|
|
84
|
+
call it.
|
|
85
|
+
|
|
77
86
|
Call `members.prepareInvite(workspace, actor, payload, txOptions)` inside
|
|
78
87
|
`repositories.workspaceInvites.withTransaction(options, async (txOptions) => …)`
|
|
79
88
|
or another resource handle's `withTransaction`. It returns
|
|
@@ -76,6 +76,31 @@ setup: ({ resources }) => ({ invoices: { list: (options) => resources.invoices.q
|
|
|
76
76
|
actions: ({ invoices }) => [{ id: "invoices.list", execute: () => invoices.list() }]
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
### Package manifest
|
|
80
|
+
|
|
81
|
+
**A package's manifest, `jskit.capabilities` in its `package.json`, lists
|
|
82
|
+
exactly what its features provide, and every capability they require beyond
|
|
83
|
+
the kernel's own (`runtime.actions`, `runtime.events`, `runtime.http`,
|
|
84
|
+
`runtime.bootstrap`) and those the package provides itself.** Optional
|
|
85
|
+
capabilities are not required. A requirement no feature has stays only when
|
|
86
|
+
the package needs it at install time, such as the database its migrations
|
|
87
|
+
need.
|
|
88
|
+
|
|
89
|
+
Why: start-up resolves every package's requirements from the manifests, and
|
|
90
|
+
refuses a manifest that disagrees with the package's features. Plain
|
|
91
|
+
`jskit check` loads each application package's features (the server providers
|
|
92
|
+
`jskit.runtime.server.providers` declares) and reports the drift before that
|
|
93
|
+
(`manifest/capabilities`), each capability to add or remove; it lists the
|
|
94
|
+
requirements no feature has for review.
|
|
95
|
+
|
|
96
|
+
```jsonc
|
|
97
|
+
// good: BooksFeature provides app.books and requires crud.contracts and runtime.actions
|
|
98
|
+
"capabilities": { "provides": ["app.books"], "requires": ["crud.contracts"] }
|
|
99
|
+
|
|
100
|
+
// bad: app.books missing from provides, crud.contracts from requires
|
|
101
|
+
"capabilities": { "provides": ["app.book"], "requires": [] }
|
|
102
|
+
```
|
|
103
|
+
|
|
79
104
|
### Capability types
|
|
80
105
|
|
|
81
106
|
**Each provided token has one `@typedef` in its package's `src/server/types.js`,
|
|
@@ -691,6 +716,11 @@ way (is this user an operator) is a member of its owner's capability.**
|
|
|
691
716
|
meaning of 0 and false before replacing a copy.
|
|
692
717
|
- A helper two packages of an application use lives in its shared package,
|
|
693
718
|
never inside one of them.
|
|
719
|
+
- A component's closure over its own state is not a helper: a function of at
|
|
720
|
+
most two statements in `<script setup>` whose every outside name is a
|
|
721
|
+
binding `<script setup>` declares (not an import or a global). Two pages
|
|
722
|
+
that reload their own resources the same way keep their own `reload()`;
|
|
723
|
+
sharing it would take a module that receives each page's state.
|
|
694
724
|
|
|
695
725
|
Why: the kernel's helpers fix one meaning of empty, and a copy brings its own.
|
|
696
726
|
|
|
@@ -1170,8 +1200,9 @@ Why: a comment that narrates history is wrong the day after it is written.
|
|
|
1170
1200
|
|
|
1171
1201
|
`npm run lint` runs ESLint with `@jskit-ai/config-eslint`, and `npm run
|
|
1172
1202
|
verify` runs `jskit check` (the package graph, navigation, [data
|
|
1173
|
-
access](data-access.md#exceptions)
|
|
1174
|
-
runs](#test-run-rules)), lint, the
|
|
1203
|
+
access](data-access.md#exceptions), [test
|
|
1204
|
+
runs](#test-run-rules) and [package manifests](#package-manifest)), lint, the
|
|
1205
|
+
tests and the build. The foundations'
|
|
1175
1206
|
`eslint.config.mjs` already holds a new
|
|
1176
1207
|
application's code to every check:
|
|
1177
1208
|
|