@jskit-ai/agent-docs 0.1.191 → 0.1.193

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 (32) hide show
  1. package/guide/agent/app-setup/existing-application-migration.md +30 -0
  2. package/guide/agent/app-setup/multi-homing.md +212 -0
  3. package/guide/agent/framework/material-3.md +11 -2
  4. package/guide/agent/framework/ui-operations.md +35 -0
  5. package/package.json +1 -1
  6. package/patterns/INDEX.md +1 -1
  7. package/patterns/feature-package/example/booking-engine/package.json +1 -1
  8. package/patterns/minimal-foundation/example/package.json +4 -4
  9. package/patterns/page-scaffolding.md +2 -0
  10. package/patterns/shell-foundation/example/package.json +5 -5
  11. package/patterns/shell-foundation/example/packages/main/package.json +1 -1
  12. package/patterns/ui-contract.md +7 -0
  13. package/reference/autogen/PATTERN_INDEX.md +35 -35
  14. package/skills/jskit/SKILL.md +9 -4
  15. package/skills/jskit/references/existing-application-migration.md +30 -0
  16. package/skills/jskit/references/material-3.md +11 -2
  17. package/skills/jskit/references/multi-homing.md +274 -0
  18. package/skills/jskit/references/pattern-index.md +35 -35
  19. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +4 -4
  20. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +5 -5
  21. package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
  22. package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
  23. package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
  24. package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/package.json +2 -2
  25. package/skills/jskit/references/patterns/database/mysql-application/example/package.json +1 -1
  26. package/skills/jskit/references/patterns/database/postgres-application/example/package.json +1 -1
  27. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  28. package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
  29. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
  30. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +3 -3
  31. package/skills/jskit/references/patterns/workspaces/workspace-server/PATTERN.md +49 -0
  32. package/skills/jskit/references/ui-operations.md +35 -0
@@ -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.1.36",
11
- "@jskit-ai/connector-google-calendar": "0.1.36",
12
- "@jskit-ai/database-runtime": "0.1.219",
13
- "@jskit-ai/database-runtime-mysql": "0.1.217",
10
+ "@jskit-ai/connectors-core": "0.1.38",
11
+ "@jskit-ai/connector-google-calendar": "0.1.38",
12
+ "@jskit-ai/database-runtime": "0.1.221",
13
+ "@jskit-ai/database-runtime-mysql": "0.1.219",
14
14
  "knex": "^3.1.0"
15
15
  }
16
16
  }
@@ -8,8 +8,8 @@
8
8
  "./shared": "./src/shared/index.js"
9
9
  },
10
10
  "dependencies": {
11
- "@jskit-ai/crud-core": "0.1.230",
12
- "@jskit-ai/resource-crud-core": "0.1.161"
11
+ "@jskit-ai/crud-core": "0.1.232",
12
+ "@jskit-ai/resource-crud-core": "0.1.163"
13
13
  },
14
14
  "jskit": {
15
15
  "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.217"
11
+ "@jskit-ai/database-runtime-mysql": "0.1.219"
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.216"
11
+ "@jskit-ai/database-runtime-postgres": "0.1.218"
12
12
  }
13
13
  }
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/realtime": "0.1.216",
6
- "@jskit-ai/shell-web": "0.1.223"
5
+ "@jskit-ai/realtime": "0.1.218",
6
+ "@jskit-ai/shell-web": "0.1.225"
7
7
  }
8
8
  }
@@ -5,7 +5,7 @@
5
5
  "private": true,
6
6
  "type": "module",
7
7
  "dependencies": {
8
- "@jskit-ai/kernel": "0.1.219",
8
+ "@jskit-ai/kernel": "0.1.221",
9
9
  "json-rest-schema": "^1.0.17"
10
10
  },
11
11
  "exports": {
@@ -9,8 +9,8 @@
9
9
  "./shared": "./src/shared/index.js"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/crud-core": "0.1.230",
13
- "@jskit-ai/resource-crud-core": "0.1.161"
12
+ "@jskit-ai/crud-core": "0.1.232",
13
+ "@jskit-ai/resource-crud-core": "0.1.163"
14
14
  },
15
15
  "jskit": {
16
16
  "kind": "runtime",
@@ -9,9 +9,9 @@
9
9
  "./shared": "./src/shared/index.js"
10
10
  },
11
11
  "dependencies": {
12
- "@jskit-ai/crud-core": "0.1.230",
13
- "@jskit-ai/resource-crud-core": "0.1.161",
14
- "@jskit-ai/workspaces-core": "0.1.197"
12
+ "@jskit-ai/crud-core": "0.1.232",
13
+ "@jskit-ai/resource-crud-core": "0.1.163",
14
+ "@jskit-ai/workspaces-core": "0.1.199"
15
15
  },
16
16
  "jskit": {
17
17
  "kind": "runtime",
@@ -28,6 +28,55 @@ member permissions, personal-workspace behavior, and surface access rules.
28
28
  Use workspace routes, resources, scope helpers, tenancy profiles, and settings
29
29
  contracts exported by `@jskit-ai/workspaces-core`.
30
30
 
31
+ ## Transactional invitation participation
32
+
33
+ Use the existing `workspaces.core` capability. During application feature setup,
34
+ register one callback with
35
+ `workspaces.services.pendingInvitations.registerAcceptanceParticipant(fn)`.
36
+ The built-in `workspace.invite.redeem` action invokes
37
+ `fn({ invite, user }, { trx, context })` after recipient/state/expiry validation
38
+ and membership activation inside the same uncommitted managed transaction.
39
+ Forward `trx` to every application owner; throw on invalid reviewed associations
40
+ or failed writes. The framework marks accepted and commits only after success.
41
+ Do not perform external effects or complete the transaction in the participant.
42
+ Non-functions, duplicate registrations and registrations after acceptance/refusal
43
+ begins reject. Ordinary invitations can pass through without an association;
44
+ expected-but-missing, stale, revoked or conflicting associations must fail closed.
45
+
46
+ For deliberate invitation creation, use `members.prepareInvite(workspace, actor,
47
+ payload, { trx, context })` in `repositories.workspaceInvites.withTransaction`
48
+ or the same JSON REST API's managed `transaction`. It returns
49
+ `{ createdInviteId, inviteTokenPreview }` without delivery. Lock the workspace
50
+ with `repositories.workspaceInvites.lockWorkspaceForInvitations(workspace.id,
51
+ { trx })` before application draft/receipt rows, and save the exact invitation
52
+ association and retry receipt before commit. Failed association restores any
53
+ prior pending invitation. A draft of intended access should not call preparation.
54
+
55
+ After confirmed commit, call `members.sendInvite(workspace, actor, prepared,
56
+ { context })`. A later attempt can pass only `{ createdInviteId }`. Delivery
57
+ reloads the committed pending invitation and uses stored recipient/role/expiry;
58
+ it does not replace the invitation. Its `inviteDelivery` is separate from
59
+ persistence: `mailer_unconfigured` when no mailer is supplied, `failed` on a
60
+ renderer/mailer exception, or the normalized controlled/provider result.
61
+ Interruption or failure may still mean a provider accepted the message. Receipt
62
+ idempotency and delivery retries are application-owned; email is not exactly once.
63
+ Do not log the returned token/URL. No SMTP setup is required for testing.
64
+
65
+ `createInvite`, acceptance and refusal now own managed transactions and reject
66
+ borrowed `options.trx`. Move transactional creation to preparation/post-commit
67
+ sending and acceptance-related writes into the participant. Revocation may join
68
+ a managed transaction. Raw Knex/savepoint transactions cannot own resource
69
+ writes. Invitation mutations lock workspace then invitation rows, revalidate
70
+ current state and reject attempts to overwrite terminal state. Matching-recipient
71
+ expiry rejection commits revocation before returning 409. Preserve transaction
72
+ outcomes and causes; a completion-hook error after commit cannot undo writes.
73
+
74
+ See the human guide's **Workspace tenancy → Transactional invitation
75
+ participation** for the full consumer example, errors, controlled mailer,
76
+ compatibility notes and native verification commands. Application services still
77
+ own authorization, identity/training linking, reviewed scope eligibility and
78
+ required audit. This seam adds no application domain tables or policy.
79
+
31
80
  ## Invariants
32
81
 
33
82
  - Workspace membership and role are checked before scoped application actions.
@@ -18,6 +18,38 @@ only when defining or diagnosing topology. Resolve current dynamic parameters
18
18
  to an absolute URL or route object for sibling/child links—never bind a route
19
19
  template or relative string raw to Vue Router `to`.
20
20
 
21
+ ## Back navigation
22
+
23
+ Check every page for a visible Back button that returns to the previous page.
24
+ Omit it only when returning makes no product sense, such as the app's root
25
+ landing page or a completed flow that must not reopen an expired step. State
26
+ the reason in the implementation or review result; a drawer link is not Back.
27
+
28
+ Plain **Back** normally follows the person's actual route history, retaining
29
+ the originating page's query, filters, tab, and pagination. Reuse the existing
30
+ JSKIT screen/navigation owner and its public seams. For history traversal use
31
+ the app's Vue Router instance (`useRouter()` from `vue-router`, then
32
+ [`router.back()`](https://router.vuejs.org/guide/essentials/navigation.html#traverse-history));
33
+ `usePaths().page()` from `@jskit-ai/shell-web/client/navigation/usePaths`
34
+ resolves a destination, not history. Do not invent a second navigation stack.
35
+
36
+ For direct links, new tabs, or no usable in-app history, use a deliberate safe
37
+ fallback resolved through the existing surface/workspace-aware path helpers.
38
+ Do not infer a usable previous page from `window.history.length` alone or send
39
+ people outside the app unexpectedly. Keep existing unsaved-change guards.
40
+
41
+ A fixed parent/list destination is valid when the task calls for it; name it
42
+ explicitly, for example **Back to appointments**. It must not silently replace
43
+ ordinary Back. Shared CRUD `listLocation`/`listUrlTemplate` links are fixed
44
+ destinations, not proof of previous-page behavior. Keep Back distinct from
45
+ Cancel, Close, and a wizard's Previous step.
46
+
47
+ Place Back consistently near the start of the page's existing action region,
48
+ before forward/primary actions in reading and keyboard order. Reuse shell or
49
+ shared-screen controls; avoid duplicates, drawer-only access, or adding a page
50
+ heading just to house it. Keep its meaning and accessible name clear at every
51
+ supported width.
52
+
21
53
  ## Application-owned files
22
54
 
23
55
  Pattern source is ordinary customizable application source. When replacing a
@@ -62,6 +94,9 @@ Exercise user-facing changes with Playwright at compact, medium, and expanded
62
94
  widths. Check overflow, clipped text, duplicate navigation, route placement,
63
95
  actions, skeleton replacement, error feedback, and target sizes. Use relative
64
96
  URLs. When `PLAYWRIGHT_BASE_URL` is provided, start no duplicate server.
97
+ For Back, enter the same page from two different origins and verify each
98
+ returns to its own origin with context intact. Also check direct entry, reload,
99
+ browser back/forward, fixed-destination exceptions, and any unsaved-change guard.
65
100
 
66
101
  Vibe64 owns its managed browser and may provide
67
102
  `VIBE64_PLAYWRIGHT_STORAGE_STATE`; never print or commit that value, bypass it,