@jskit-ai/agent-docs 0.1.193 → 0.1.194

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 (28) hide show
  1. package/guide/agent/app-setup/database-layer.md +74 -5
  2. package/guide/agent/app-setup/existing-application-migration.md +34 -29
  3. package/guide/agent/app-setup/multi-homing.md +93 -116
  4. package/guide/agent/framework/crud-operations.md +16 -2
  5. package/package.json +1 -1
  6. package/patterns/feature-package/example/booking-engine/package.json +1 -1
  7. package/patterns/minimal-foundation/example/package.json +4 -4
  8. package/patterns/shell-foundation/example/package.json +5 -5
  9. package/patterns/shell-foundation/example/packages/main/package.json +1 -1
  10. package/reference/autogen/PATTERN_INDEX.md +35 -35
  11. package/skills/jskit/SKILL.md +1 -1
  12. package/skills/jskit/references/crud-operations.md +16 -2
  13. package/skills/jskit/references/existing-application-migration.md +34 -29
  14. package/skills/jskit/references/multi-homing.md +93 -116
  15. package/skills/jskit/references/pattern-index.md +35 -35
  16. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +4 -4
  17. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +5 -5
  18. package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
  19. package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
  20. package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
  21. package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/package.json +2 -2
  22. package/skills/jskit/references/patterns/database/mysql-application/example/package.json +1 -1
  23. package/skills/jskit/references/patterns/database/postgres-application/example/package.json +1 -1
  24. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  25. package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
  26. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
  27. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +3 -3
  28. package/skills/jskit/references/patterns/workspaces/workspace-server/PATTERN.md +23 -28
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "@local/main": "0.1.0",
36
36
  "@fastify/static": "^10.1.3",
37
- "@jskit-ai/kernel": "0.1.221",
37
+ "@jskit-ai/kernel": "0.1.222",
38
38
  "@tanstack/vue-query": "^5.101.0",
39
39
  "fastify": "^5.8.5",
40
40
  "json-rest-schema": "^1.0.17",
@@ -42,15 +42,15 @@
42
42
  "vue": "^3.5.43",
43
43
  "vue-router": "^5.3.1",
44
44
  "vuetify": "^4.1.2",
45
- "@jskit-ai/http-runtime": "0.1.219",
45
+ "@jskit-ai/http-runtime": "0.1.220",
46
46
  "@mdi/js": "^7.4.47",
47
- "@jskit-ai/shell-web": "0.1.225",
47
+ "@jskit-ai/shell-web": "0.1.226",
48
48
  "@fastify/fast-json-stringify-compiler": "^5.1.0",
49
49
  "@vue/devtools-api": "^8.2.1"
50
50
  },
51
51
  "devDependencies": {
52
- "@jskit-ai/config-eslint": "0.1.218",
53
- "@jskit-ai/jskit-catalog": "0.1.246",
52
+ "@jskit-ai/config-eslint": "0.1.219",
53
+ "@jskit-ai/jskit-catalog": "0.1.247",
54
54
  "@playwright/test": "1.61.1",
55
55
  "@vitejs/plugin-vue": "^6.0.7",
56
56
  "eslint": "^10.8.0",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "description": "App-local runtime composition and lightweight glue.",
11
11
  "dependencies": {
12
- "@jskit-ai/kernel": "0.1.221"
12
+ "@jskit-ai/kernel": "0.1.222"
13
13
  },
14
14
  "jskit": {
15
15
  "kind": "runtime",
@@ -2,6 +2,6 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/auth-provider-supabase-core": "0.1.218"
5
+ "@jskit-ai/auth-provider-supabase-core": "0.1.219"
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.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",
10
+ "@jskit-ai/connectors-core": "0.1.39",
11
+ "@jskit-ai/connector-google-calendar": "0.1.39",
12
+ "@jskit-ai/database-runtime": "0.1.222",
13
+ "@jskit-ai/database-runtime-mysql": "0.1.220",
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.232",
12
- "@jskit-ai/resource-crud-core": "0.1.163"
11
+ "@jskit-ai/crud-core": "0.1.233",
12
+ "@jskit-ai/resource-crud-core": "0.1.164"
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.219"
11
+ "@jskit-ai/database-runtime-mysql": "0.1.220"
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.218"
11
+ "@jskit-ai/database-runtime-postgres": "0.1.219"
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.218",
6
- "@jskit-ai/shell-web": "0.1.225"
5
+ "@jskit-ai/realtime": "0.1.219",
6
+ "@jskit-ai/shell-web": "0.1.226"
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.221",
8
+ "@jskit-ai/kernel": "0.1.222",
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.232",
13
- "@jskit-ai/resource-crud-core": "0.1.163"
12
+ "@jskit-ai/crud-core": "0.1.233",
13
+ "@jskit-ai/resource-crud-core": "0.1.164"
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.232",
13
- "@jskit-ai/resource-crud-core": "0.1.163",
14
- "@jskit-ai/workspaces-core": "0.1.199"
12
+ "@jskit-ai/crud-core": "0.1.233",
13
+ "@jskit-ai/resource-crud-core": "0.1.164",
14
+ "@jskit-ai/workspaces-core": "0.1.200"
15
15
  },
16
16
  "jskit": {
17
17
  "kind": "runtime",
@@ -30,52 +30,47 @@ contracts exported by `@jskit-ai/workspaces-core`.
30
30
 
31
31
  ## Transactional invitation participation
32
32
 
33
- Use the existing `workspaces.core` capability. During application feature setup,
34
- register one callback with
33
+ Through `workspaces.core`, register one callback during feature setup with
35
34
  `workspaces.services.pendingInvitations.registerAcceptanceParticipant(fn)`.
36
35
  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,
36
+ `fn({ invite, user }, { trx, context })` after validating the recipient, state and
37
+ expiry and activating membership in the uncommitted transaction. Forward `trx`
38
+ to every application owner and propagate failures. JSKIT marks accepted and
39
+ commits after the callback succeeds. Keep external effects out of the callback.
40
+ Registration rejects non-functions, duplicates and calls after acceptance/refusal
41
+ begins. Allow ordinary invitations; reject stale, revoked, conflicting or
42
+ unexpectedly missing application associations.
43
+
44
+ Use `members.prepareInvite(workspace, actor,
47
45
  payload, { trx, context })` in `repositories.workspaceInvites.withTransaction`
48
46
  or the same JSON REST API's managed `transaction`. It returns
49
47
  `{ createdInviteId, inviteTokenPreview }` without delivery. Lock the workspace
50
48
  with `repositories.workspaceInvites.lockWorkspaceForInvitations(workspace.id,
51
49
  { 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.
50
+ association and retry receipt before commit. Failure restores the previous
51
+ pending invitation. Keep access drafts separate: preparation creates a real token.
54
52
 
55
53
  After confirmed commit, call `members.sendInvite(workspace, actor, prepared,
56
54
  { 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.
55
+ reloads the committed pending invitation and uses its saved recipient, role and
56
+ expiry. `inviteDelivery` reports `mailer_unconfigured`, `failed` on a renderer/mailer
57
+ exception, or the normalized mailer result. Persistence is unchanged by delivery
58
+ failure. A provider may accept a message before failing; the application owns
59
+ receipts and retries. Keep tokens/URLs out of logs and use controlled mailers in tests.
64
60
 
65
61
  `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
62
+ borrowed `options.trx`. Use preparation followed by delivery after commit for
63
+ transactional creation; put related acceptance writes in the participant. Revocation may join
68
64
  a managed transaction. Raw Knex/savepoint transactions cannot own resource
69
65
  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
66
+ current state and reject changes to accepted/revoked invitations. Expiry rejection
67
+ for the matching recipient commits revocation before returning 409. Preserve transaction
72
68
  outcomes and causes; a completion-hook error after commit cannot undo writes.
73
69
 
74
70
  See the human guide's **Workspace tenancy → Transactional invitation
75
71
  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.
72
+ compatibility notes and native verification commands. Application services own
73
+ authorization, identity/training linking, scope eligibility and required audit.
79
74
 
80
75
  ## Invariants
81
76