@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.
- package/guide/agent/app-setup/database-layer.md +74 -5
- package/guide/agent/app-setup/existing-application-migration.md +34 -29
- package/guide/agent/app-setup/multi-homing.md +93 -116
- package/guide/agent/framework/crud-operations.md +16 -2
- package/package.json +1 -1
- package/patterns/feature-package/example/booking-engine/package.json +1 -1
- package/patterns/minimal-foundation/example/package.json +4 -4
- package/patterns/shell-foundation/example/package.json +5 -5
- package/patterns/shell-foundation/example/packages/main/package.json +1 -1
- package/reference/autogen/PATTERN_INDEX.md +35 -35
- package/skills/jskit/SKILL.md +1 -1
- package/skills/jskit/references/crud-operations.md +16 -2
- package/skills/jskit/references/existing-application-migration.md +34 -29
- package/skills/jskit/references/multi-homing.md +93 -116
- package/skills/jskit/references/pattern-index.md +35 -35
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +4 -4
- package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +5 -5
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
- 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/json-api-resource-package/example/packages/books/package.json +2 -2
- package/skills/jskit/references/patterns/database/mysql-application/example/package.json +1 -1
- package/skills/jskit/references/patterns/database/postgres-application/example/package.json +1 -1
- 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 +1 -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 +3 -3
- 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.
|
|
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.
|
|
45
|
+
"@jskit-ai/http-runtime": "0.1.220",
|
|
46
46
|
"@mdi/js": "^7.4.47",
|
|
47
|
-
"@jskit-ai/shell-web": "0.1.
|
|
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.
|
|
53
|
-
"@jskit-ai/jskit-catalog": "0.1.
|
|
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",
|
|
@@ -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.
|
|
11
|
-
"@jskit-ai/connector-google-calendar": "0.1.
|
|
12
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
13
|
-
"@jskit-ai/database-runtime-mysql": "0.1.
|
|
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.
|
|
12
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
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",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"./shared": "./src/shared/index.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@jskit-ai/crud-core": "0.1.
|
|
13
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
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.
|
|
13
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
14
|
-
"@jskit-ai/workspaces-core": "0.1.
|
|
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
|
-
|
|
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
|
|
38
|
-
and membership
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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.
|
|
53
|
-
|
|
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
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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`.
|
|
67
|
-
|
|
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
|
|
71
|
-
|
|
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
|
|
77
|
-
|
|
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
|
|