@jskit-ai/agent-docs 0.1.332 → 0.1.334
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 +106 -8
- package/guide/agent/framework/crud-form-actions.md +18 -7
- package/guide/agent/framework/crud-operations.md +5 -0
- package/guide/agent/framework/data-access.md +61 -1
- package/guide/agent/framework/material-3.md +11 -4
- package/guide/agent/framework/quality-pass.md +8 -2
- package/guide/agent/framework/security-pass.md +3 -1
- package/package.json +1 -1
- package/patterns/minimal-foundation/example/package.json +2 -2
- package/patterns/shell-foundation/example/package.json +3 -3
- package/reference/autogen/PATTERN_INDEX.md +34 -34
- package/reference/autogen/packages/auth-core.md +13 -0
- package/reference/autogen/packages/auth-provider-local-core.md +40 -5
- package/reference/autogen/packages/auth-provider-local-db-core.md +15 -0
- package/reference/autogen/packages/auth-web.md +26 -0
- package/reference/autogen/packages/http-web.md +2 -0
- package/reference/autogen/packages/resource-runtime.md +1 -0
- package/reference/autogen/packages/shell-web.md +42 -0
- package/skills/jskit/references/crud-form-actions.md +18 -7
- package/skills/jskit/references/crud-operations.md +5 -0
- package/skills/jskit/references/data-access.md +61 -1
- package/skills/jskit/references/heuristics/client-requests.md +1 -1
- package/skills/jskit/references/heuristics/crud-authoring.md +3 -2
- package/skills/jskit/references/heuristics/live-actions.md +4 -1
- package/skills/jskit/references/heuristics/ui-contract.md +9 -1
- package/skills/jskit/references/material-3.md +11 -4
- package/skills/jskit/references/pattern-index.md +34 -34
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +2 -2
- package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +3 -3
- package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +1 -1
- package/skills/jskit/references/patterns/auth/auth-surface/PATTERN.md +10 -8
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/pages/auth/email-change.vue +17 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/views/auth/EmailChangeView.vue +12 -0
- 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 +2 -2
- package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +1 -1
- package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsNotificationsSection.vue +3 -1
- package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsPreferencesSection.vue +3 -1
- package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsProfileSection.vue +4 -1
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +4 -4
- package/skills/jskit/references/quality-pass.md +8 -2
- package/skills/jskit/references/security-pass.md +3 -1
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@local/main": "0.1.0",
|
|
36
36
|
"@fastify/static": "^10.1.3",
|
|
37
37
|
"@jskit-ai/kernel": "0.2.27",
|
|
38
|
-
"@jskit-ai/material-web": "0.1.
|
|
38
|
+
"@jskit-ai/material-web": "0.1.9",
|
|
39
39
|
"@tanstack/vue-query": "^5.101.0",
|
|
40
40
|
"fastify": "^5.12.7",
|
|
41
41
|
"pino": "^10.3.1",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"vue-router": "^5.3.1",
|
|
46
46
|
"vuetify": "^4.3.0",
|
|
47
47
|
"@jskit-ai/http-runtime": "0.2.27",
|
|
48
|
-
"@jskit-ai/shell-web": "0.2.
|
|
48
|
+
"@jskit-ai/shell-web": "0.2.40",
|
|
49
49
|
"@fastify/fast-json-stringify-compiler": "^5.1.0",
|
|
50
50
|
"@vue/devtools-api": "^8.2.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@jskit-ai/config-eslint": "0.1.252",
|
|
54
|
-
"@jskit-ai/jskit-catalog": "0.2.
|
|
54
|
+
"@jskit-ai/jskit-catalog": "0.2.86",
|
|
55
55
|
"@playwright/test": "1.61.1",
|
|
56
56
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
57
57
|
"eslint": "^10.8.0",
|
|
@@ -27,8 +27,8 @@ Those choices must be known before adapting the example.
|
|
|
27
27
|
## Framework APIs
|
|
28
28
|
|
|
29
29
|
Use the views, auth guard, HTTP client integration, sign-out runtime, providers,
|
|
30
|
-
and Playwright auth helper exported by `@jskit-ai/auth-web`. The sign-in, reset
|
|
31
|
-
and sign-out screens show the app's identity: the pages render the app's view
|
|
30
|
+
and Playwright auth helper exported by `@jskit-ai/auth-web`. The sign-in, reset,
|
|
31
|
+
email change and sign-out screens show the app's identity: the pages render the app's view
|
|
32
32
|
wrappers (`src/views/auth/`), and each wrapper fills the default view's `brand`
|
|
33
33
|
slot (given `{ compact }`) with `src/components/AppBrand.vue`, the app's name
|
|
34
34
|
as `index.html`'s `<title>` spells it. JSKIT lays the slot out as a pane beside
|
|
@@ -107,9 +107,10 @@ a user as a side effect.
|
|
|
107
107
|
exercised.
|
|
108
108
|
- Public auth routes do not require an existing session.
|
|
109
109
|
- Protected routes use the framework auth policy rather than page-local checks.
|
|
110
|
-
- Login, sign-out, and
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
- Login, sign-out, reset and email change views use the public auth
|
|
111
|
+
components/composables.
|
|
112
|
+
- The sign-in, reset, email change and sign-out pages render the app's view
|
|
113
|
+
wrappers, which fill the `brand` slot with the app's identity (`AppBrand.vue`): a person
|
|
113
114
|
always sees which app they are signing in to. Renaming the app renames
|
|
114
115
|
`AppBrand.vue` with `index.html`'s `<title>`; the brand adds no heading.
|
|
115
116
|
- A custom login view must preserve the default view's initial session check:
|
|
@@ -152,9 +153,10 @@ placements, and post-auth destinations while retaining the runtime contracts.
|
|
|
152
153
|
|
|
153
154
|
## Verification
|
|
154
155
|
|
|
155
|
-
Check that the sign-in, reset and sign-out screens show the
|
|
156
|
-
pane on a wide window and in the row on a phone. Exercise
|
|
157
|
-
login, sign-out, reset,
|
|
156
|
+
Check that the sign-in, reset, email change and sign-out screens show the
|
|
157
|
+
app's name, in the pane on a wide window and in the row on a phone. Exercise
|
|
158
|
+
failed and successful login, sign-out, reset, an email change link, protected
|
|
159
|
+
navigation,
|
|
158
160
|
keyboard interaction, warm-cache return navigation, and browser refresh.
|
|
159
161
|
Open the login route with an existing authenticated session and confirm it
|
|
160
162
|
returns to the requested screen; repeat signed out and confirm the form remains.
|
package/skills/jskit/references/patterns/auth/auth-surface/example/src/pages/auth/email-change.vue
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<route lang="json">
|
|
2
|
+
{
|
|
3
|
+
"meta": {
|
|
4
|
+
"guard": {
|
|
5
|
+
"policy": "public"
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
</route>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
import EmailChangeView from "@/views/auth/EmailChangeView.vue";
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<EmailChangeView />
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import DefaultEmailChangeView from "@jskit-ai/auth-web/client/views/DefaultEmailChangeView";
|
|
3
|
+
import AppBrand from "@/components/AppBrand.vue";
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<DefaultEmailChangeView>
|
|
8
|
+
<template #brand="{ compact }">
|
|
9
|
+
<AppBrand :compact="compact" />
|
|
10
|
+
</template>
|
|
11
|
+
</DefaultEmailChangeView>
|
|
12
|
+
</template>
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"db:migrate:status": "knex --knexfile ./knexfile.js migrate:list"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@jskit-ai/connectors-core": "0.2.
|
|
11
|
-
"@jskit-ai/connector-google-calendar": "0.2.
|
|
10
|
+
"@jskit-ai/connectors-core": "0.2.41",
|
|
11
|
+
"@jskit-ai/connector-google-calendar": "0.2.41",
|
|
12
12
|
"@jskit-ai/database-runtime": "0.1.276",
|
|
13
13
|
"@jskit-ai/database-runtime-mysql": "0.1.274",
|
|
14
14
|
"@jskit-ai/kernel": "0.2.27",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { vPending } from "@jskit-ai/shell-web/client/directives/vPending";
|
|
3
|
+
|
|
2
4
|
const props = defineProps({
|
|
3
5
|
runtime: {
|
|
4
6
|
type: Object,
|
|
@@ -41,7 +43,7 @@ const notifications = props.runtime.notifications;
|
|
|
41
43
|
color="primary"
|
|
42
44
|
class="mt-4"
|
|
43
45
|
:loading="notifications.isSaving.value"
|
|
44
|
-
|
|
46
|
+
v-pending="notifications.isSaving.value || notifications.isRefreshing.value"
|
|
45
47
|
>
|
|
46
48
|
Save notification settings
|
|
47
49
|
</v-btn>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { vPending } from "@jskit-ai/shell-web/client/directives/vPending";
|
|
3
|
+
|
|
2
4
|
const props = defineProps({
|
|
3
5
|
runtime: {
|
|
4
6
|
type: Object,
|
|
@@ -119,7 +121,7 @@ const preferences = props.runtime.preferences;
|
|
|
119
121
|
color="primary"
|
|
120
122
|
class="mt-4"
|
|
121
123
|
:loading="preferences.isSaving.value"
|
|
122
|
-
|
|
124
|
+
v-pending="preferences.isSaving.value || preferences.isRefreshing.value"
|
|
123
125
|
>
|
|
124
126
|
Save preferences
|
|
125
127
|
</v-btn>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { vPending } from "@jskit-ai/shell-web/client/directives/vPending";
|
|
3
|
+
|
|
2
4
|
const props = defineProps({
|
|
3
5
|
runtime: {
|
|
4
6
|
type: Object,
|
|
@@ -81,7 +83,8 @@ const profile = props.runtime.profile;
|
|
|
81
83
|
color="primary"
|
|
82
84
|
class="mt-4"
|
|
83
85
|
:loading="profile.isSaving.value"
|
|
84
|
-
|
|
86
|
+
v-pending="profile.isSaving.value || profile.isRefreshing.value"
|
|
87
|
+
:disabled="profile.isDeletingAvatar.value"
|
|
85
88
|
>
|
|
86
89
|
Save profile
|
|
87
90
|
</v-btn>
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"./shared": "./src/shared/index.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@jskit-ai/crud-core": "0.2.
|
|
13
|
+
"@jskit-ai/crud-core": "0.2.42",
|
|
14
14
|
"@jskit-ai/resource-crud-core": "0.1.220",
|
|
15
|
-
"@jskit-ai/users-core": "0.2.
|
|
15
|
+
"@jskit-ai/users-core": "0.2.51"
|
|
16
16
|
},
|
|
17
17
|
"jskit": {
|
|
18
18
|
"kind": "runtime",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"./shared": "./src/shared/index.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@jskit-ai/crud-core": "0.2.
|
|
13
|
+
"@jskit-ai/crud-core": "0.2.42",
|
|
14
14
|
"@jskit-ai/resource-crud-core": "0.1.220",
|
|
15
|
-
"@jskit-ai/users-core": "0.2.
|
|
16
|
-
"@jskit-ai/workspaces-core": "0.2.
|
|
15
|
+
"@jskit-ai/users-core": "0.2.51",
|
|
16
|
+
"@jskit-ai/workspaces-core": "0.2.51"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"@jskit-ai/kernel": "0.2.27",
|
|
20
|
-
"@jskit-ai/resource-runtime": "0.2.
|
|
20
|
+
"@jskit-ai/resource-runtime": "0.2.38"
|
|
21
21
|
},
|
|
22
22
|
"jskit": {
|
|
23
23
|
"kind": "runtime",
|
|
@@ -12,8 +12,8 @@ in a JSKIT app. The rules it applies are already in [Material 3](material-3.md),
|
|
|
12
12
|
## States on every screen
|
|
13
13
|
|
|
14
14
|
- **Loading:** Material skeletons with the geometry of the content they stand
|
|
15
|
-
for, never a spinner; an action keeps a stable label
|
|
16
|
-
cannot be sent twice ([Components, state, and feedback](material-3.md#components-state-and-feedback)).
|
|
15
|
+
for, never a spinner; an action keeps a stable label and its keyboard focus
|
|
16
|
+
while it runs, and cannot be sent twice ([Components, state, and feedback](material-3.md#components-state-and-feedback)).
|
|
17
17
|
Ordinary reads stop after 30 seconds, so a slow read ends in its error state.
|
|
18
18
|
- **Empty:** a list's empty state carries an icon, a line saying what would be
|
|
19
19
|
there and one action, such as New; with filters or a search applied it
|
|
@@ -55,6 +55,12 @@ in a JSKIT app. The rules it applies are already in [Material 3](material-3.md),
|
|
|
55
55
|
width.
|
|
56
56
|
- **Double submit:** click Save twice quickly; the command's pending state
|
|
57
57
|
must send one request.
|
|
58
|
+
- **Keyboard through a running command:** Tab to Save (or Send, "Load more",
|
|
59
|
+
a dialog's confirm), press Enter and answer the request late
|
|
60
|
+
(`page.route`). Focus should stay on the button while it runs, and move to
|
|
61
|
+
the field a refusal marks. Focus on the page body there usually means the
|
|
62
|
+
button was `disabled` while it ran; mark it pending instead when possible
|
|
63
|
+
([Material 3 rules](material-3.md#components-state-and-feedback)).
|
|
58
64
|
- **Session and tabs:** sign out in another tab and come back; let the session
|
|
59
65
|
expire mid-form. The auth guard sends the person to sign-in and back.
|
|
60
66
|
- **Time:** dates follow [strict temporal values](crud-operations.md#strict-temporal-values);
|
|
@@ -48,7 +48,9 @@ a JSKIT app. The rules it applies are already in [Typed features](typed-features
|
|
|
48
48
|
context built by hand skips that scope: search for each. Confirm every
|
|
49
49
|
`public` table is meant to be read by anyone.
|
|
50
50
|
- Who acts is `resolveActor(context)`; the workspace comes from the context
|
|
51
|
-
only,
|
|
51
|
+
only, and so does the user whose `user` or `workspace_user` rows a request
|
|
52
|
+
reaches (the signed-in user, on every route), never from the body or another
|
|
53
|
+
input
|
|
52
54
|
([Request context](typed-features.md#request-context)). A row
|
|
53
55
|
policy decides from `caller` and the server-resolved `context.workspace`,
|
|
54
56
|
`context.membership` and `context.permissions`, never from request input.
|