@jskit-ai/agent-docs 0.1.69 → 0.1.70
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 +14 -9
- package/package.json +1 -1
- package/reference/autogen/packages/auth-provider-local-core.md +3 -2
- package/reference/autogen/packages/auth-web.md +3 -0
- package/reference/autogen/packages/users-core.md +4 -0
- package/reference/autogen/packages/workspaces-core.md +22 -1
- package/reference/autogen/packages/workspaces-web.md +15 -0
|
@@ -58,9 +58,10 @@ The app gets three database scripts in `package.json`:
|
|
|
58
58
|
```json
|
|
59
59
|
{
|
|
60
60
|
"scripts": {
|
|
61
|
-
"db:
|
|
61
|
+
"db:migrations:sync": "jskit migrations changed",
|
|
62
|
+
"db:migrate": "npm run db:migrations:sync && knex --knexfile ./knexfile.js migrate:latest",
|
|
62
63
|
"db:migrate:rollback": "knex --knexfile ./knexfile.js migrate:rollback",
|
|
63
|
-
"db:migrate:status": "knex --knexfile ./knexfile.js migrate:list"
|
|
64
|
+
"db:migrate:status": "npm run db:migrations:sync && knex --knexfile ./knexfile.js migrate:list"
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
```
|
|
@@ -95,12 +96,14 @@ The app has two different migration-related layers:
|
|
|
95
96
|
|
|
96
97
|
Those are **not** the same step.
|
|
97
98
|
|
|
99
|
+
The npm scripts hide the easy-to-miss first step for normal use. `npm run db:migrate` and `npm run db:migrate:status` run `npm run db:migrations:sync` first, then run Knex. That means package upgrades can add new JSKIT-managed migration files before Knex checks what is pending.
|
|
100
|
+
|
|
98
101
|
### `jskit migrations ...` writes managed migration files
|
|
99
102
|
|
|
100
|
-
If you run:
|
|
103
|
+
If you run the sync script directly:
|
|
101
104
|
|
|
102
105
|
```bash
|
|
103
|
-
|
|
106
|
+
npm run db:migrations:sync
|
|
104
107
|
```
|
|
105
108
|
|
|
106
109
|
JSKIT checks the installed package state in `.jskit/lock.json` and materializes any managed migration files that need to exist in `migrations/`.
|
|
@@ -538,9 +541,10 @@ After installing the MySQL runtime, the important new pieces in `package.json` l
|
|
|
538
541
|
"mysql2": "^3.11.2"
|
|
539
542
|
},
|
|
540
543
|
"scripts": {
|
|
541
|
-
"db:
|
|
544
|
+
"db:migrations:sync": "jskit migrations changed",
|
|
545
|
+
"db:migrate": "npm run db:migrations:sync && knex --knexfile ./knexfile.js migrate:latest",
|
|
542
546
|
"db:migrate:rollback": "knex --knexfile ./knexfile.js migrate:rollback",
|
|
543
|
-
"db:migrate:status": "knex --knexfile ./knexfile.js migrate:list"
|
|
547
|
+
"db:migrate:status": "npm run db:migrations:sync && knex --knexfile ./knexfile.js migrate:list"
|
|
544
548
|
}
|
|
545
549
|
}
|
|
546
550
|
```
|
|
@@ -552,11 +556,12 @@ Those new dependencies divide into two roles:
|
|
|
552
556
|
- `knex` is the database toolkit used by both runtime code and migration commands
|
|
553
557
|
- `mysql2` is the actual Node driver that speaks to MySQL
|
|
554
558
|
|
|
555
|
-
The
|
|
559
|
+
The migration scripts are also worth reading carefully:
|
|
556
560
|
|
|
557
|
-
- `db:
|
|
561
|
+
- `db:migrations:sync` writes or refreshes JSKIT-managed migration files in `migrations/`
|
|
562
|
+
- `db:migrate` syncs JSKIT-managed migration files, then applies all pending Knex migrations
|
|
558
563
|
- `db:migrate:rollback` rolls back the last migration batch
|
|
559
|
-
- `db:migrate:status` lists applied and pending migrations
|
|
564
|
+
- `db:migrate:status` syncs JSKIT-managed migration files, then lists applied and pending migrations
|
|
560
565
|
|
|
561
566
|
They are not special JSKIT commands. They are ordinary project scripts, which makes them easy to run in any environment.
|
|
562
567
|
|
package/package.json
CHANGED
|
@@ -62,7 +62,7 @@ Local functions
|
|
|
62
62
|
|
|
63
63
|
### `src/server/lib/service.js`
|
|
64
64
|
Exports
|
|
65
|
-
- `createLocalAuthService({ backend, config, profileProjector = null, passwordStrategy = null })`
|
|
65
|
+
- `createLocalAuthService({ backend, config, profileProjector = null, passwordStrategy = null, invitationContextResolver = null })`
|
|
66
66
|
Local functions
|
|
67
67
|
- `nowSeconds()`
|
|
68
68
|
- `isoFromNow(seconds)`
|
|
@@ -75,11 +75,12 @@ Local functions
|
|
|
75
75
|
- `clearCookieOptions(isProduction)`
|
|
76
76
|
- `buildProfile(user)`
|
|
77
77
|
- `buildActor(user, profile = null)`
|
|
78
|
-
- `buildAuthPayload({ user, session, profileProjector })`
|
|
78
|
+
- `buildAuthPayload({ user, session, profileProjector, profileOptions = {} })`
|
|
79
79
|
- `buildAccessToken({ user, session, secret, ttlSeconds = ACCESS_TTL_SECONDS })`
|
|
80
80
|
- `buildSessionPayload({ user, session, refreshToken, secret })`
|
|
81
81
|
- `validatePasswordInput(password)`
|
|
82
82
|
- `validateEmailInput(email)`
|
|
83
|
+
- `normalizeInvitationInput(value = null)`
|
|
83
84
|
- `maybeSendRecoveryEmail(config, recoveryUrl, email)`
|
|
84
85
|
|
|
85
86
|
### `src/server/lib/tokens.js`
|
|
@@ -56,6 +56,9 @@ Exports
|
|
|
56
56
|
### `src/client/composables/loginView/useLoginViewState.js`
|
|
57
57
|
Exports
|
|
58
58
|
- `useLoginViewState({ placementContext } = {})`
|
|
59
|
+
Local functions
|
|
60
|
+
- `readWindowSearchParam(name = "")`
|
|
61
|
+
- `resolveInitialMode()`
|
|
59
62
|
|
|
60
63
|
### `src/client/composables/loginView/useLoginViewValidation.js`
|
|
61
64
|
Exports
|
|
@@ -207,11 +207,26 @@ Exports
|
|
|
207
207
|
Local functions
|
|
208
208
|
- `resolveWorkspaceAggregateRecordId(record = {}, context = {})`
|
|
209
209
|
|
|
210
|
+
### `src/server/workspaceMembers/defaultWorkspaceInviteEmail.js`
|
|
211
|
+
Exports
|
|
212
|
+
- `renderDefaultWorkspaceInviteEmail({ inviteUrl = "", workspace = {}, inviter = null, roleSid = "member", expiresAt = "" } = {})`
|
|
213
|
+
Local functions
|
|
214
|
+
- `escapeHtml(value = "")`
|
|
215
|
+
|
|
210
216
|
### `src/server/workspaceMembers/registerWorkspaceMembers.js`
|
|
211
217
|
Exports
|
|
212
218
|
- `registerWorkspaceMembers(app)`
|
|
213
219
|
Local functions
|
|
214
220
|
- `resolveWorkspaceMembersInviteExpiresInMs(appConfig = {})`
|
|
221
|
+
- `resolveWorkspaceInviteEmailTemplate(scope, appConfig = {})`
|
|
222
|
+
|
|
223
|
+
### `src/server/workspaceMembers/workspaceInviteUrls.js`
|
|
224
|
+
Exports
|
|
225
|
+
- `buildInvitePath(token, pathTemplate = "/invite/:token")`
|
|
226
|
+
- `createWorkspaceInviteUrlBuilder({ appConfig = {}, env = {} } = {})`
|
|
227
|
+
Local functions
|
|
228
|
+
- `normalizeInvitePathTemplate(value = "")`
|
|
229
|
+
- `normalizeBaseUrl(value = "")`
|
|
215
230
|
|
|
216
231
|
### `src/server/workspaceMembers/workspaceMembersActions.js`
|
|
217
232
|
Exports
|
|
@@ -219,13 +234,14 @@ Exports
|
|
|
219
234
|
|
|
220
235
|
### `src/server/workspaceMembers/workspaceMembersService.js`
|
|
221
236
|
Exports
|
|
222
|
-
- `createService({ workspaceMembershipsRepository, workspaceInvitesRepository, inviteExpiresInMs, roleCatalog = null, workspaceInvitationsEnabled = true } = {})`
|
|
237
|
+
- `createService({ workspaceMembershipsRepository, workspaceInvitesRepository, inviteExpiresInMs, roleCatalog = null, workspaceInvitationsEnabled = true, inviteUrlBuilder = null, workspaceInviteMailer = null, workspaceInviteEmailTemplate = renderDefaultWorkspaceInviteEmail } = {})`
|
|
223
238
|
|
|
224
239
|
### `src/server/workspacePendingInvitations/bootWorkspacePendingInvitations.js`
|
|
225
240
|
Exports
|
|
226
241
|
- `bootWorkspacePendingInvitations(app)`
|
|
227
242
|
Local functions
|
|
228
243
|
- `resolveAuthenticatedUserRecordId(_record, context = {})`
|
|
244
|
+
- `resolveInviteResolutionRecordId(record = {})`
|
|
229
245
|
|
|
230
246
|
### `src/server/workspacePendingInvitations/registerWorkspacePendingInvitations.js`
|
|
231
247
|
Exports
|
|
@@ -287,6 +303,7 @@ Exports
|
|
|
287
303
|
- `WORKSPACE_INVITES_TRANSPORT`
|
|
288
304
|
- `WORKSPACE_INVITE_CREATE_TRANSPORT`
|
|
289
305
|
- `WORKSPACE_INVITE_REDEEM_TRANSPORT`
|
|
306
|
+
- `WORKSPACE_INVITATION_RESOLVE_TRANSPORT`
|
|
290
307
|
- `WORKSPACE_PENDING_INVITATIONS_TRANSPORT`
|
|
291
308
|
|
|
292
309
|
### `src/shared/operationMessages.js`
|
|
@@ -427,6 +444,10 @@ Local functions
|
|
|
427
444
|
- `hasColumn(knex, tableName, columnName)`
|
|
428
445
|
- `normalizeHexColor(value)`
|
|
429
446
|
|
|
447
|
+
### `templates/packages/main/src/server/email/workspaceInviteEmail.js`
|
|
448
|
+
Exports
|
|
449
|
+
- `renderWorkspaceInviteEmail({ inviteUrl = "", workspace = {}, inviter = null, roleSid = "member", expiresAt = "" } = {})`
|
|
450
|
+
|
|
430
451
|
### root
|
|
431
452
|
|
|
432
453
|
### `package.descriptor.mjs`
|
|
@@ -39,6 +39,7 @@ Local functions
|
|
|
39
39
|
- `isRevokeInviteLoading(inviteId)`
|
|
40
40
|
- `isRemoveMemberLoading(memberUserId)`
|
|
41
41
|
- `onSubmitInvite()`
|
|
42
|
+
- `onCopyInviteLink()`
|
|
42
43
|
- `onRevokeInvite(inviteId)`
|
|
43
44
|
- `onMemberRoleUpdate(member, roleSid)`
|
|
44
45
|
- `onRemoveMember(member)`
|
|
@@ -73,6 +74,14 @@ Exports
|
|
|
73
74
|
Exports
|
|
74
75
|
- None
|
|
75
76
|
|
|
77
|
+
### `src/client/components/WorkspaceInviteLanding.vue`
|
|
78
|
+
Exports
|
|
79
|
+
- None
|
|
80
|
+
Local functions
|
|
81
|
+
- `buildAuthUrl(mode)`
|
|
82
|
+
- `refreshInvite()`
|
|
83
|
+
- `acceptInvite()`
|
|
84
|
+
|
|
76
85
|
### `src/client/components/WorkspaceMembersClientElement.vue`
|
|
77
86
|
Exports
|
|
78
87
|
- None
|
|
@@ -91,6 +100,7 @@ Local functions
|
|
|
91
100
|
- `applyWorkspaceSettingsPolicy(payload = {})`
|
|
92
101
|
- `refreshLoad()`
|
|
93
102
|
- `submitInvite()`
|
|
103
|
+
- `copyCreatedInviteLink()`
|
|
94
104
|
- `submitRevokeInvite(inviteId)`
|
|
95
105
|
- `submitMemberRoleUpdate(member, roleSid)`
|
|
96
106
|
- `submitRemoveMember(member)`
|
|
@@ -125,6 +135,7 @@ Local functions
|
|
|
125
135
|
Exports
|
|
126
136
|
- `WorkspacesWebClientProvider`
|
|
127
137
|
- `WorkspaceMembersClientElement`
|
|
138
|
+
- `WorkspaceInviteLanding`
|
|
128
139
|
- `clientProviders`
|
|
129
140
|
|
|
130
141
|
### `src/client/lib/bootstrap.js`
|
|
@@ -335,6 +346,10 @@ Exports
|
|
|
335
346
|
Exports
|
|
336
347
|
- None
|
|
337
348
|
|
|
349
|
+
### `templates/src/pages/invite/[token].vue`
|
|
350
|
+
Exports
|
|
351
|
+
- None
|
|
352
|
+
|
|
338
353
|
### `templates/src/surfaces/admin/index.vue`
|
|
339
354
|
Exports
|
|
340
355
|
- None
|